Re: Inclusion loops rely only on href, not on xpointer

At 11:55 AM -0800 1/7/04, Jonathan Marsh wrote:


>The "bar" inclusion has the same include location (empty string) as the
>foo inclusion.  We need to say loops are detected by comparing both the
>include location and the xpointer attribute value.

Is that really good enough? What if two different XPointers identify 
the same node? Shouldn't inclusion loop detection be based on node 
identity within the same document, rather than on which of any number 
of possible XPointers is used to identify that node?

Trickier: what if two different URIs identify the same document?

Speaking as an implementer, this is very hard to get right. The 
version of XOM in CVS right now has one place where I detect loops by 
catching the resulting StackOverflowError. I really need to fix that.
-- 

   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 Wednesday, 7 January 2004 16:40:23 UTC