OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] xincludes and graphics


Hello Jan,

Thank you very much for your reply.

Indeed, the situation looks very like the one described in the linked ticket. I forgot to mention that I also have nested includes (didn't think it was important).
I will investigate the suggested patch.

As for xmllint, we do have it now in our conversion process, but the whole story was about trying to get rid of it :) Not a must - if I'm not able to patch xerces, I'll just keep the current working solution - but would be nice to know if I'm able to implement the conversion in some other way.

--
Ekaterina Shikareva.


-----Original Message-----
From: Jan Tosovsky [mailto:j.tosovsky@email.cz]
Sent: Donnerstag, 23. November 2017 20:42
To: docbook-apps@lists.oasis-open.org
Subject: RE: [docbook-apps] xincludes and graphics

On 2017-11-23 Shikareva, Ekaterina wrote:
>
> I've encountered a known issue with including documents and images
> from subdirectories into one main document for PDF output, and I can't
> wrap my head around the solution. Can you please share some advice?
>
> Setup:
> - Saxon 6.5.5
> - Xerces 2.11.0
> - docbook-xsl-ns 1.79.1
>
> Folder structure:
> doc/
> |
> +-- main_file.xml
> |
> +-- doc1
> |  |
> |  +-- figures/
> |  +-- file1.xml
> |
> +-- doc2
> |  |
> |  +-- figures/
> |  +-- file2.xml
> |
> +-- doc3
> |  |
> |  +-- figures/
> |  +-- file3.xml
>
> Files in subdirectories are using images from the respective figures/
> folders with filerefs like fileref="figures/image001.png".
>

I suppose you are facing this old Xerces bug:
https://issues.apache.org/jira/browse/XERCESJ-1102

You can either:
1. patch it for yourself or
2. generate outputs in two steps:

   a. use xmllint for resolving XIncludes into a single XML file (xmllint handles xml:base correctly)
   b. generate outputs using this single file


More info about xmllint can be found at http://xmlsoft.org/xmllint.html It can be downloaded from http://xmlsoft.org/downloads.html

For DocBook v5.0+ you can call it this way:
xmllint --xinclude -o resolved.xml original.xml

Regards,

Jan


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


________________________________

This e-mail and any attachment(s) are intended only for the recipient(s) named above and others who have been specifically authorized to receive them. They may contain confidential information. If you are not the intended recipient, please do not read this email or its attachment(s). Furthermore, you are hereby notified that any dissemination, distribution or copying of this e-mail and any attachment(s) is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender by replying to this e-mail and then delete this e-mail and any attachment(s) or copies thereof from your system. Thank you.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]