List of images referenced in a DITA map

susannecm
Posts: 60

List of images referenced in a DITA map

Mon Jul 30, 2012 12:25 pm

I've just migrated a large manual to DITA and i believe that my images directory now contains quite a few images that are no longer used. I would like to clean this up, but it seems very cumbersome to search for the name of every image file.

What I would like to have is an alphabetically sorted list of href attributes in image elements. This would be useful for translation projects as well.

Is there a way to do this in oXygen? Maybe the result list of "Find in files" could be a starting point. On the other hand, maybe it's possible to include this information in the Metrics report.

Thanks for any suggestions

Susanne
sorin_ristache
Posts: 4144

Re: List of images referenced in a DITA map

Mon Jul 30, 2012 3:56 pm

Hello,

I suggest the following 2 steps:

  • Run the transformation DITA Map XHTML or DITA Map WebHelp on the DITA map.
  • Run Diff Directories tool to find the image files that are present in the images sub-directory of the XML source directory but absent in the images sub-directory of the XHTML output directory.

You can start the Diff Directories tool either from the Oxygen window from menu Tools or as a separate tool from the shortcut created by the Oxygen installer (or using the diffDirs.bat/diffDirs.sh/diffDirsMac.bat command line script). This tool will find the set of files that are different between two specified directories (and their sub-directories recursively), in your case the files that are present in the source image directory (in a sub-directory of the directory with the DITA map file) and are absent from the XHTML output directory.


Regards,
Sorin
sorin_ristache
Posts: 4144

Re: List of images referenced in a DITA map

Mon Jul 30, 2012 5:39 pm

Hello,

Other option: you can find a list of all the image files that are used in the transformed DITA map in the file image.list from the temporary directory of the transformation. That is set the clean.temp parameter to no in the DITA Map XHTML transformation, run the DITA transformation and after it is finished look in the file [DITA-map-directory]/temp/xhtml/image.list.


Regards,
Sorin
susannecm
Posts: 60

Re: List of images referenced in a DITA map

Mon Jul 30, 2012 6:39 pm

Thanks - I completely forgot DIFF directories ...

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 6 guests