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