Hi Jan,

Looks like you've hit XERCESJ-1102 [1]. This is a long standing defect in 
the XInclude support. There's a patch attached to the JIRA issue that you 
might want to try though it hasn't been evaluated yet.

Thanks.

[1] https://issues.apache.org/jira/browse/XERCESJ-1102

Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

"Jan Tosovsky" <jan.tosovsky...@gmail.com> wrote on 09/26/2013 12:24:24 
PM:

> Dear All,
> 
> I have modular document with nested XIncludes and relative URIs to 
images
> stored in different folders.
> 
> When it is parsed and stored into a single file using Xerces-J 2.11, 
these
> URIs in nested files are processed incorrectly and point to the wrong
> location.
> 
> Parsing it with the xmllint tool produces all the outputs correctly.
> 
> Both source files and final results are available at
> http://drifted.in/other/xincludes.zip
> 
> The difference is an invalid xml:base in that nested case:
> 
> Xerces : xml:base="Common/Examples/XInclude/Image.xml"
> xmllint: xml:base="XInclude/Image.xml"
> 
> For parsing I use something like this:
> 
> DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
> factory.setNamespaceAware(true);
> factory.setXIncludeAware(true);
> DocumentBuilder parser = factory.newDocumentBuilder();
> parser.setEntityResolver(new CatalogResolver());
> Document document = parser.parse(xmlFile);
> 
> Is there available any feature which I should switch on? 
> Is there any workaround?
> 
> Using xmllint in the Java ecosystem is problematic.
> 
> Thanks, Jan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
> For additional commands, e-mail: j-users-h...@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to