URI versus file system specific path

Post here questions and problems related to editing and publishing DITA content.
PeterC
Posts: 3
Joined: Wed Jul 17, 2013 6:37 am

URI versus file system specific path

Post by PeterC »

Hi,

Using Oxygen 14.2

URI (href="file:////bentley/mars/single_source_images/11502.png") displays the image in the editor pane.
But when publishng to pdf or xhtml the image cannot be found. I find I have to use the filesystem specific path (href="file:/V:/single_source_images/11502.png"). And even then it only works for publishing to xhtml, with pdf publish get the error:
fop] 998 ERROR [ main ] org.apache.fop.apps.FOUserAgent - Image not found. URI: file:/C:/single_source/file:/V:/single_source_images/11502.png. (See position 3:-1)

I'm stumped, can anyone help?

Thanks
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: URI versus file system specific path

Post by Radu »

Hi Peter,

Usually when working with XML the visual editing and the published result are different.
The DITA content gets published with the DITA Open Toolkit which seems to have issues with how the absolute URL is formatted.

For example using 3 slashes I managed to make this work both with XHTML-based and PDF outputs (Oxygen 15.0, DITA OT 1.7).

Code: Select all

<image href="file:///D:/projects/eXml/samples/dita/flowers/images/Iris_sanguinea.jpg" scale="50"/>
But why use an absolute image location in the DITA content? It's fine for PDF but the generated XHTML is not portable, moving it to another computer will break the image reference.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: URI versus file system specific path

Post by Radu »

Hi again,

Looking back at your original post, I see you have an URL with 4 slashes "////", does this mean you want to reference an image from a network share? As far as I know The DITA Open Toolkit publishing does not support this.

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