This looks very much like a bug [1] that was recently fixed in CVS. You 
may want to check whether this works with the lastest build [2]. Note that 
the version of the XInclude processor in CVS implements the XInclude 
Proposed Recommendation which went back to using the 
"http://www.w3.org/2001/XInclude"; namespace.

Thanks.

[1] http://issues.apache.org/jira/browse/XERCESJ-1044
[2] http://brutus.apache.org/gump/public-jars/xml-xerces2/

Leonardo Palozzi <[EMAIL PROTECTED]> wrote on 03/11/2005 07:19:37 PM:

> Hi there,
> 
> I have 3 files (see below) where foo.xml includes bar.xml which
> includes baz.xml. The inclusion fails when the include of bar.xml is
> not made from within the root element of foo.xml.
> 
> When I run
> 
>   org.apache.xalan.xslt.Process -in foo.xml -xsl foo.xslt
> 
> I get the following error
> 
>   file:///C:/test/foo.xml; Line #5; Column #76; XSLT Error
> (javax.xml.transform.TransformerException): Error attempting to parse
> XML file (href='bar.xml').
> 
> When I run the same command against foo2.xml I get the expected
> output.  Whats going on here?
> 
> Thanks.
> 
> ---foo.xml (fails)
> <?xml version="1.0" ?>
> <root>
>   <foo>
>     <xi:include href="bar.xml" 
xmlns:xi="http://www.w3.org/2003/XInclude"/>
>   </foo>
> </root>
> 
> 
> ---bar.xml
> <?xml version="1.0" ?>
> <bar>
>   <xi:include href="baz.xml" xmlns:xi= 
"http://www.w3.org/2003/XInclude"/>
> </bar>
> 
> 
> --baz.xml
> <?xml version="1.0" ?>
> <baz>234092384</baz>
> 
> 
> ---foo2.xml (OK)
> <?xml version="1.0" ?>
> <root>
>   <!-- <foo> -->
>     <xi:include href="bar.xml" 
xmlns:xi="http://www.w3.org/2003/XInclude"/>
>   <!-- </foo> -->
> </root>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to