generate list of references from ditamap

Posts: 10
Joined: Tue Sep 02, 2014 8:20 pm

generate list of references from ditamap

Post by idtp » Tue Sep 02, 2014 8:26 pm


I need to get an overview of all referenced images in my ditamap. does oXygen provide an option to generate such a list of references (either images, conrefs, topicrefs, xrefs, ecc..)? Including some attributes (like heighth and width, or other).

If not, anyone has an XSLT available for that?



Posts: 6272
Joined: Fri Jul 09, 2004 5:18 pm

Re: generate list of references from ditamap

Post by Radu » Wed Sep 03, 2014 10:49 am

Hi Wim,

Right now we do not have an out of the box solution for this.

You could probably try perform a Find/Replace in Files over the entire DITA Map using a regular expression to find all image @href attribute values, something like: <image(\s+)href=.
Then you can select all the Find results, right click them and choose "Save Results as XML", then possibly apply some XSLT processing over that to get the results in another form.

Another possible approach would be to apply XSLT 2.0 processing on the entire DITA Map.
In the folder OXYGEN_INSTALL_DIR/frameworks/dita/report/ there is an XSLT stylesheet called report.xsl which can be applied using the Saxon 9 XSLT engine over a DITA Map to obtain some statistics from it. Right now this report does not gather images and information about it but it might be used as a starting point to see how the DITA Map is navigated via the XSLT stylesheet and each referenced resource is loaded and processed.

Radu Coravu
<oXygen/> XML Editor

Post Reply