<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">After a bit of poking around, I can confirm that in 2008, the status of xerces (2.9.1)and xmllint v20616 regarding the problems below hasn't changed.<div><br></div><div>Thomas</div><div><br><div><div>On 28 Nov 2008, at 09:44, Bob Stayton wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div bgcolor="#ffffff" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><font face="Arial" size="2">Hi,</font></div><div><font face="Arial" size="2">I believe XMLMind uses an XML parser whose XInclude features include support for href="" to mean the current document. Other XInclude processors may not.</font></div><div><font face="Arial" size="2"></font> </div><div><div><font face="Arial" size="2">An href="" or a missing href mean the same thing in the XInclude standard, which is a reference to the current document. That is permitted in the standard, but the standard explicitly says that there are cases where the processor may not handle it because of the streaming nature of processing that is sometimes used. Neither Xerces 2.9.0 nor xmllint seem to support href="". when I tested this in 2007, here is what xerces said:</font></div><div><font face="Arial" size="2"></font> </div><div><font face="Arial" size="2">"org.xml.sax.SAXParseException: Include operation failed, reverting to fallback.<br>Resource error reading file as XML (href=''). Reason: An xpointer was specified<br>that points to a location in the source infoset. This location cannot be accessed<br>due to the streaming nature of the processor."</font></div><div> </div><div><font face="Arial" size="2">xmllint said:</font></div><div><font face="Arial" size="2"></font> </div><div><font face="Arial" size="2">"element include: XInclude error : detected a recursion in myfile.xml"</font></div><div><font face="Arial" size="2"></font> </div><div><font face="Arial" size="2"></font> </div></div><div>Bob Stayton<br>Sagehill Enterprises<br><a href="mailto:bobs@sagehill.net">bobs@sagehill.net</a></div><div> </div><div> </div><blockquote dir="ltr" style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left-color: rgb(0, 0, 0); border-left-width: 2px; border-left-style: solid; margin-right: 0px; "><div style="font: normal normal normal 10pt/normal arial; ">----- Original Message -----</div><div style="background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(228, 228, 228); font: normal normal normal 10pt/normal arial; background-position: initial initial; "><b>From:</b><span class="Apple-converted-space"> </span><a title="tchristensen@nordija.com" href="mailto:tchristensen@nordija.com">Thomas Christensen</a></div><div style="font: normal normal normal 10pt/normal arial; "><b>To:</b><span class="Apple-converted-space"> </span><a title="xep-support@renderx.com" href="mailto:xep-support@renderx.com">xep-support@renderx.com</a></div><div style="font: normal normal normal 10pt/normal arial; "><b>Sent:</b><span class="Apple-converted-space"> </span>Thursday, November 27, 2008 9:35 PM</div><div style="font: normal normal normal 10pt/normal arial; "><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [xep-support] Problem with xinclude?</div><div><br></div>The weird thing is that all other xincludes are resolved correctly, meaning that XEP does operate on the full expanded xml document. It's only the xincludes with xpointers referring to content defined by id's. Since the parse has passed the defined paragraph (<phrase id=xxx>), it fails to copy it using the xpointer reference: <xi:include href="" xmlns:xi="<a href="http://www.w3.org/2001/XInclude">http://www.w3.org/2001/XInclude</a>" xpointer="element(xxx)" /> .<div><br></div><div>If I remove all xincludes with href="" and xpointers, then it works with XEP commandline as well as from withint XMLEditor.</div><div><br></div><div>Could it be that XMLEditor has a speciel resolver that XEP outside of it doesn't?</div><div><br></div><div>Thomas</div><div><br><div><div>On 26 Nov 2008, at 14:56, Dave Pawson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>2008/11/26 Thomas Christensen <<a href="mailto:tchristensen@nordija.com">tchristensen@nordija.com</a>>:<br><blockquote type="cite">Ok. Generating a complete all in one xml file will also improve the<br></blockquote><blockquote type="cite">validation part of docbook 4.5+xincludes.<br></blockquote><blockquote type="cite">However - it works when I use XEP from within XMLEditor instead of the<br></blockquote><blockquote type="cite">commmand line XEP!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The normal xincludes (ie. href actually points to a file) works in both<br></blockquote><blockquote type="cite">places, and only the xpointer versions fails.<br></blockquote><br>Once you can see what is happening on the command line,<br>you can guess what the editor is doing behind the scenes and<br>then you choose how to do it.<br><br>Someone / something has to expand the includes prior to processing.<br>xInclude is just the same in docbook 5 btw, just that you have<br>relax NG to work with instead of the DTD's.<br><br>HTH<br><br><br><br><br>--<span class="Apple-converted-space"> </span><br>Dave Pawson<br>XSLT XSL-FO FAQ.<br>Docbook FAQ.<br><a href="http://www.dpawson.co.uk">http://www.dpawson.co.uk</a><br>-------------------<br>(*) To unsubscribe, send a message with words 'unsubscribe xep-support'<br>in the body of the message to<span class="Apple-converted-space"> </span><a href="mailto:majordomo@renderx.com">majordomo@renderx.com</a><span class="Apple-converted-space"> </span>from the address<br>you are subscribed from.<br>(*) By using the Service, you expressly agree to these Terms of Service<span class="Apple-converted-space"> </span><a href="http://www.renderx.com/terms-of-service.html">http://www.renderx.com/terms-of-service.html</a><br></div></blockquote></div><br></div></blockquote></div></span><br class="Apple-interchange-newline"></blockquote></div><br></div></body></html>