Re: ResolvedValues log file? was Allow variables to be referenced from @scope="peer" maps


David Hollis
 

Hi Eliot,

The DITA-OT obviously has to resolve all the reuse mechanisms, and related content.

How feasible would it be to tap into this process, and for the DITA-OT to produce a log file of all the resolved content? Maybe as part of a build, or as its own build.

Something like:

map id: topic id: element name: scope or branch: keys or ditaval: resolved content

Many thanks,
David

This is an example of where a local, targeted solution is relatively easy (just a bit of preprocessing or relying on knowledge of cases that won't occur in your content) but the general solution would be hard (because it has to handle all cases, perform well, be extensible, report exception conditions clearly, etc.).

It's not hard to implement simple processes that operate on maps and do specific things, either using the output of the OT preprocessing stage or just operating on the maps directly if you know you don't need to worry about stuff like filtering, metadata propagation, etc.

The DITA Community utilities area on github has general XSLT scripts for operating on maps, including resolving key references and resolving topicrefs to topics. With that code as a base it should be as easy as it can be to extract topic titles or book titles.https://github.com/dita-community/dita-utilities/tree/master/src/xslt

Then, as you say, it's a matter of optimizing performance: do you do the processing every time or cache results? If you cache results, how do you keep the cache up to date?

Cheers,

E.

--
Eliot Kimber
http://contrext.com

Join main@dita-users.groups.io to automatically receive all group messages.