GNOME Bugzilla – Bug 355373
XInclude rangeto() loses nodes
Last modified: 2007-07-19 14:31:47 UTC
Please describe the problem: Libxml (CVS version from 10 September 2006) seems have a error with XInclude and rangeto(). [doc.xml] <doc> <ok> <xi:include href="inc.xml" xpointer="xpointer(/subdoc/sect[@id='id1']/range-to(following::sect[@id='id2']))" xmlns:xi="http://www.w3.org/2001/XInclude"/> </ok> <error> <xi:include href="inc.xml" xpointer="xpointer(/subdoc/sect[@id='id1']/range-to(following::sect[@id='id3']))" xmlns:xi="http://www.w3.org/2001/XInclude"/> </error> </doc> [/doc.xml] [inc.xml] <subdoc> <sect id="id1">lalala</sect> <sect id="id2">lalala</sect> <sect id="id3"><p>la</p></sect> </subdoc> [/inc.xml] [screen] $ xmllint --xinclude doc.xml <?xml version="1.0"?> <doc> <ok> <sect id="id1">lalala</sect> <sect id="id2">lalala</sect> </ok> <error> <sect id="id1">lalala</sect> <sect id="id2">lalala</sect> <sect id="id3"><p/></sect> </error> </doc> [/screen] The text content of the section with id='id3' is lost. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Range-to includes the target node but no node later than that in document order, so it's normal the <p> and its children are not included. on the other hand the first pointer with id2 seems wrong it should not include the subsequent text node... XPointer has not seen much usage especially things like ranges and points which are extensions to XPath core, you may be hitting bugs more frequently if you use those... Daniel
Same as bug #306081...
*** This bug has been marked as a duplicate of 306081 ***