Hello All,

    I've been working with libxml2 and xsltproc to process docbook files. The 
editor that we use creates xinclude tags that use empty href tags when 
referring to the same file. The problem I am encountering is that when using 
xmllint, or the library in general, in this scenario it warns about a 
recursion. I've attached a sample xml file for demonstration. Running 'xmllint 
--xinclude a.xml' will produce the following error:

a.xml:3: element include: XInclude error : detected a recursion in a.xml

    I was able to determine that the URI was being correctly calculated but 
that the code was not setting the local flag when the href was empty while it 
was doing so for a missing href or an href starting with a # character. I added 
an additional statement in xinclude.c to check for an empty href and set local 
to a true value and it corrected the problem. I have attached a diff file 
showing the change for convenience.

    I used the latest version, 2.6.31, for all my testing and changes. I also 
checked the xinclude spec to make sure this was indeed the intended behavior. 
Your consideration on this issue and submission is greatly appreciated.


Chris Ryan




      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
<a>
  <p id="dupeme">I say everything twice.</p>
  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="" xpointer="element(dupeme)" />
</a>

Attachment: xinclude_c.diff
Description: Binary data

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to