Neil,

of course I did, but this is not a problem. "b.xml" including "b.xml" causes no endless loop if you use parse="text" attribute.  In my example, Xerces includes b.xml without parsing it (> < & are resolved as &gt; &lt; &amp; etc..). Xerces behaves well.

Xerces misbehaves if you have xi:include element as a sibling of another element, that contains another xi:include element. You will find this case in a.xml file. I suppose it as bug in Xerces. XIncluder implementation works in this case well and xinclude specification does not define it as Fatal error.

Ivan

Neil Pitman wrote:
Ivan,

You know that b.xml includes b.xml.  If it did not raise an exception, you
would get an endless loop.  Have you tried including another document?
_________________________________________
Neil Pitman
[EMAIL PROTECTED]
+1.514.863.5465
ICQ#: 21101052
_________________________________________

----- Original Message ----- 
From: "Ivan Kudibal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 03, 2003 5:49 AM
Subject: A 'include' element cannot be a child of an include element.


  
Hello,

when I try to parse a.xml, I'll get this exception

[Fatal Error] a.xml:8:44: A 'include' element cannot be a child of an
include element.

Ivan


file a.xml:

<?xml version="1.0"?>
<a xmlns:xi="http://www.w3.org/2001/XInclude">
    <xi:include href="">
      <xi:fallback>Cannot load file b.xml</xi:fallback>
    </xi:include>

    <c>
      <xi:include href="" parse="text">
        <xi:fallback>Cannot load file b.xml</xi:fallback>
      </xi:include>
    </c>
</a>

file b.xml

<?xml version="1.0"?>
<b xmlns:xi="http://www.w3.org/2001/XInclude">
   <xi:include href="" parse="text">
     <xi:fallback>Cannot load file b.xml</xi:fallback>
    </xi:include>
</b>



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

    


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



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

Reply via email to