Hi Radu,
I am definitely looking forward to this DITA 2.0 ability of books to self-declare their global DITAVAL conditions!
Hi Uma,
We run into this same limitation too. We do a couple of things to work around it.
First, we use DITA project files to define book contexts:
A context lets you associate a DITAVAL file with a map:
<context id="context-mybook" name="mybook">
<input href="mybook.ditamap"/>
<profile>
<ditaval href="filter-test/conditions.ditaval"/>
</profile>
</context>
You can then define publications that publish these contexts. If you are using Oxygen, you can add your DITA project to the Main Files list and it will present only map-relevant contexts in the DITA Maps Manager, which is quite handy when you have many books and filtering conditions (as we do). We do not use project files for publishing; we use them only to inform Oxygen of our bookmap/DITAVAL associations.
Another method is to create an intermediate "wrapper map" (not a bookmap) that does nothing more than instantiate a bookmap in a particular condition:
<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="urn:oasis:names:tc:dita:rng:map.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<map>
<title>My Book Title</title>
<ditavalref href="_warehouse/_ditaval/filter_synthesis_FC.ditaval"/>
<mapref href="mybook.ditamap"/>
</map>
You must redefine your book title in this wrapper map, as the topmost title in the map hierarchy is used for publication. You will need to test this method in your publishing environment to see if it works. Oxygen's PDF Chemistry does supports wrapper maps, and it renders book structures correctly. We use wrapper maps to create multiple conditional versions of a book from a single-sourced shared map. We can then include these conditional books (via their wrapper maps) in higher-level online help collections.
Note that to use these "wrapper maps," you must use DITA-OT 3.6 or later to get a required bug fix.
- Chris