generate list of references from ditamap

Post here questions and problems related to editing and publishing DITA content.
idtp
Posts: 11
Joined: Tue Sep 02, 2014 8:20 pm

generate list of references from ditamap

Post by idtp »

Hi,

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?

Thanks,

Wim
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: generate list of references from ditamap

Post by Radu »

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.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply