Page 1 of 1

Find unreferenced resources/ links in SVG files

Posted: Tue May 10, 2016 12:13 pm
by annetteb
Hello,
To clean up my project, I'm using the "Find unreferenced resources" feature. It works pretty well. The only drawback I see is that if an SVG file includes a link to a bitmap file, this bitmap file is seen as "unreferenced" and I could remove it inadvertently which would not cause any transformation error. If there is a possibility to track linked files in SVG and add this improvement to a feature release, that'd be great :)
Best regards,
Annette Bouillin

Re: Find unreferenced resources/ links in SVG files

Posted: Tue May 10, 2016 2:09 pm
by Radu
Hi Annette,

Indeed the action looks for dependencies only in DITA topics, it will not go through SVGs or other non-DITA resources and find dependencies to other resources. What you could do would be to also refer to those BMP images in the DITA Map as resource-only resources like:

Code: Select all

  <topicref href="path/to/image.bmp" format="bmp" processing-role="resource-only"/>
The first advantage for doing this would be that the action would consider the bitmap image as used.
The second advantage would be that the publishing stage would also know that the bitmap is used and it should automatically copy it to the output folder.

Regards,
Radu

Re: Find unreferenced resources/ links in SVG files

Posted: Tue May 10, 2016 2:33 pm
by annetteb
Hi Radu,
I didn't understand it was only for DITA files, the dialog box shows filters to include or exclude files so I thought it worked for any xml file.
Your suggestion is interesting but that would mean an extra step for the writers when they include a file and I'm pretty sure they'll forget to do it from time to time (I'm sure I would forget to do it when republishing is urgent for example). I'd rather recommend to include the bitmap in the SVG instead of a link.
Best regards,
Annette Bouillin

Re: Find unreferenced resources/ links in SVG files

Posted: Tue May 10, 2016 4:05 pm
by Radu
Hi Annette,

Sure, I already an internal issue with your use case and we'll try to handle it in a future version.

Regards,
Radu

Re: Find unreferenced resources/ links in SVG files

Posted: Tue May 10, 2016 4:19 pm
by annetteb
:D
Great, thanks!