<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.5730.13" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY 
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space" 
bgColor=#ffffff>
<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.&nbsp;&nbsp;Other&nbsp;XInclude processors may not.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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.&nbsp; Neither Xerces 2.9.0 nor xmllint seem 
to support href="".&nbsp; when I tested this in 2007, here is what xerces 
said:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>xmllint said:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></DIV>
<DIV>Bob Stayton<BR>Sagehill Enterprises<BR><A 
href="mailto:bobs@sagehill.net">bobs@sagehill.net</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=tchristensen@nordija.com 
  href="mailto:tchristensen@nordija.com">Thomas Christensen</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=xep-support@renderx.com 
  href="mailto:xep-support@renderx.com">xep-support@renderx.com</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, November 27, 2008 9:35 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> 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 (&lt;phrase id=xxx&gt;), it 
  fails to copy it using the xpointer reference:&nbsp;&lt;xi:include 
  href=""&nbsp;xmlns:xi="<A 
  href="http://www.w3.org/2001/XInclude">http://www.w3.org/2001/XInclude</A>"&nbsp;xpointer="element(xxx)" 
  /&gt; .
  <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 &lt;<A 
    href="mailto:tchristensen@nordija.com">tchristensen@nordija.com</A>&gt;:<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>-- <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 majordomo@renderx.com from the address<BR>you are 
    subscribed from.<BR>(*) By using the Service, you expressly agree to these 
    Terms of Service 
  http://www.renderx.com/terms-of-service.html<BR></DIV></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></BODY></HTML>