W3C home > Mailing lists > Public > www-xml-xinclude-comments@w3.org > January 2004

Streaming basically impossible in the face of XPointers

From: Elliotte Rusty Harold <elharo@metalab.unc.edu>
Date: Mon, 26 Jan 2004 11:35:39 -0500
Message-Id: <p06010203bc3af0d4decb@[192.168.254.4]>
To: www-xml-xinclude-comments@w3.org

This has been brought up before, but a recent test case raised by 
Jonathan Marsh indicated that the problem was worse than I had 
thought. An XPointer without an href part can point iunto the same 
document. For exxample,

<root>
   <element id="bar"/>
   <xi:include xpointer="bar"/>
</root>

Since XPointers can point forwards and backwards this means that even 
a minimally conforming implementation has to keep the entire document 
in memory until it has been completely processed. Furthermore, even a 
tree-based implementation can't modify a document in place because it 
may need to resolve XPointers that refer to the original, unmodified 
document.

As an implemennter, I see no plausible way to handle XPointers in 
SAX, and even in tree-based APIs like XOM (and presumably other 
tree-based APIs) it's very tough. XPointers are an implementation 
dependance conformance issue to start with because some 
implementations support the xpointer scheme, some don't, and some 
support it partially. However, a lot of use cases don't require 
XPointers at all.  I wonder if it would be better if they were 
removed completely?
-- 

   Elliotte Rusty Harold
   elharo@metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA
Received on Monday, 26 January 2004 11:55:57 GMT

This archive was generated by hypermail 2.2.0 + w3c-0.30 : Thursday, 9 June 2005 12:16:09 GMT