Hi Rahul, Toshihiko,
We might have to solve a similar problem in the future. We have multiple books that share common content in a _warehouse/ directory:
bookA.ditamap
bookB.ditamap
bookA/
...book A topics...
bookB/ ...book B topics...
_warehouse/
...shared topics...
If we publish a top-level online help (OLH) map that includes these books:
<map>
<title>Online Help</title>
<mapref href="bookA.ditamap"/>
<mapref href="bookB.ditamap"/>
</map>
then the URLs for shared topics will have "_warehouse" instead of "bookA" or "bookB" in them. To avoid confusion, we want all content associated with a map to be included in the directory named after the bookmap using the topic.
The file/directory-naming extension in preprocess2 is interesting, but I am not yet sure how I would determine which book uses the topic. (The "input map" being processed by the DITA-OT will be the OLH map, and the bookmaps will be intermediate maps within it.)
I might need to write a perl script that traces all the file dependency structure, then reorganizes the content directories by bookmap. Or maybe the metadata exists during the transformation that I might be able to figure it out. We haven't reached that point in our evaluation yet, so right now this is just some high-level thinking about the future, and I thought it might be interesting to you to share.
- Chris