Page 1 of 1
generate list of references from ditamap
Posted: 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?
Re: generate list of references from ditamap
Posted: Wed Sep 03, 2014 10:49 am
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.