Images in HTML source not copied

Post here questions and problems related to editing and publishing DITA content.
syed
Posts: 76
Joined: Tue Nov 14, 2017 8:34 pm

Images in HTML source not copied

Post by syed »

Hi,

Some of the topics are in HTML source. There are images being referred from the HTML topics. Regular img tag is used. When generating the WebHelp Responsive output, the images are not copied to the 'out' folder. The images and HTML topics are in folders below the master ditamap level.

Is this expected because the source is HTML or is there a way to copy the images from HTML topics?

Thanks...
Syed
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Images in HTML source not copied

Post by radu_pisoi »

Hi,

Yes, this is the expected behavior for non DITA resource like HTML. Non DITA resources are not processed by the DITA-OT publishing engine to gather referenced to other resources.

You have two options to copy images referenced in the HTML files to the WebHelp transformation output:
1. Declare images in the DITA map as resource only:

Code: Select all

<topicref href="images/image.jpg" format="jpg" processing-role="resource-only"/>
2. If you store all images in a folder, you can use the webhelp.custom.resources parameter.

You can see more details in the How to Copy Additional Resources to Output Directory topic from our documentation.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
syed
Posts: 76
Joined: Tue Nov 14, 2017 8:34 pm

Re: Images in HTML source not copied

Post by syed »

Thanks Radu.

Do you know if there is a way to call all the files of a particular format using one topicref? Maybe use a regular expression?

For example

Code: Select all

<topicref href="images/*.jpg" format="jpg" processing-role="resource-only"/>
Syed
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Images in HTML source not copied

Post by radu_pisoi »

Hi,

No, I don't think the topicref/@href attribute supports regular expressions.

You can read more details in DITA specs:
https://www.oxygenxml.com/dita/1.3/spec ... ibute.html
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply