Page 1 of 1

URI versus file system specific path

Posted: Thu Jul 18, 2013 5:42 am
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

Re: URI versus file system specific path

Posted: Thu Jul 18, 2013 9:53 am
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

Re: URI versus file system specific path

Posted: Thu Jul 18, 2013 3:52 pm
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