Re: [xep-support] Problem with xinclude?

From: Bob Stayton <bobs@sagehill.net>
Date: Fri Nov 28 2008 - 00:44:22 PST

Hi,
I believe XMLMind uses an XML parser whose XInclude features include support for href="" to mean the current document. Other XInclude processors may not.

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:

"org.xml.sax.SAXParseException: Include operation failed, reverting to fallback.
Resource error reading file as XML (href=''). Reason: An xpointer was specified
that points to a location in the source infoset. This location cannot be accessed
due to the streaming nature of the processor."

xmllint said:

"element include: XInclude error : detected a recursion in myfile.xml"

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

  ----- Original Message -----
  From: Thomas Christensen
  To: xep-support@renderx.com
  Sent: Thursday, November 27, 2008 9:35 PM
  Subject: Re: [xep-support] Problem with xinclude?

  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="http://www.w3.org/2001/XInclude" xpointer="element(xxx)" /> .

  If I remove all xincludes with href="" and xpointers, then it works with XEP commandline as well as from withint XMLEditor.

  Could it be that XMLEditor has a speciel resolver that XEP outside of it doesn't?

  Thomas

  On 26 Nov 2008, at 14:56, Dave Pawson wrote:

    2008/11/26 Thomas Christensen <tchristensen@nordija.com>:

      Ok. Generating a complete all in one xml file will also improve the

      validation part of docbook 4.5+xincludes.

      However - it works when I use XEP from within XMLEditor instead of the

      commmand line XEP!

      The normal xincludes (ie. href actually points to a file) works in both

      places, and only the xpointer versions fails.

    Once you can see what is happening on the command line,
    you can guess what the editor is doing behind the scenes and
    then you choose how to do it.

    Someone / something has to expand the includes prior to processing.
    xInclude is just the same in docbook 5 btw, just that you have
    relax NG to work with instead of the DTD's.

    HTH

    --
    Dave Pawson
    XSLT XSL-FO FAQ.
    Docbook FAQ.
    http://www.dpawson.co.uk
    -------------------
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Fri Nov 28 01:04:46 2008

This archive was generated by hypermail 2.1.8 : Fri Nov 28 2008 - 01:04:47 PST