Re: XInclude and SAX Incompatibility

Elliotte Rusty Harold <[email protected]> Tue, 24 Jun 2003 15:27:58 -0400
Newsgroups gmane.text.xml.sax.devel,gmane.text.xml.devel
Message-ID <p04330101bb1e5574b881@[192.168.254.4]>
At 11:40 AM -0400 6/24/03, Peter McCracken wrote:

In general streaming processes are known to have the issues with 
XInclude you've encountered. There's no good solution, but several 
changes were made to XInclude in previous drafts to ameliorate the 
problems.

>(1) When attributes with references to unparsed entities or notations are
>encountered in included documents, these unparsed entities and notations
>must be added to the [unparsed entities] and [notations] properties of the
>document information item, as defined in the XML Infoset specification [2],

Actually no. That's a may, not a must. XInclude implementations are 
not required to support notation and unparsed entity information 
items/properties.

>(2) The XInclude spec allows document fragments to be included using
>XPointer [4] paths.  These create lots of problems with stream-based
>processing.  For instance, an XML document could include a fragment of
>itself which has already been processed, and unless the document stream can
>be re-opened and reparsed, that information is not available.

Yes, that's tricky. In general however, I would claim it is possible 
to reopen and reparse a stream in this circumstance. You can only 
point to the stream with an XPointer if it has a URL. Given that it 
has a URL you can open it. The content at the URL may be time varying 
but that it is not an issue unique to streaming implementations of 
XInclude.

>My team and I thought it would be best to bring this up with the SAX
>community, so that the issue of XInclude support with SAX is made public.
>Perhaps the restriction on DTD events in the SAX API could be adjusted to
>account for the possibility of unparsed entity and notation events occuring
>after the end of the DTD events?

No, I don't think SAX needs to change. Given the very limited use of 
unparsed entities and notations in the community today, I think 
simply omitting them from the subset of the infoset that is handled 
is fully adequate for almost all practical purposes.
-- 

   Elliotte Rusty Harold
   [email protected]
   Processing XML with Java (Addison-Wesley, 2002)
   http://www.cafeconleche.org/books/xmljava
   http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
List: sax-devel, [email protected]
See:  http://www.saxproject.org/
https://lists.sourceforge.net/lists/listinfo/sax-devel