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

Right now XInclude says just compare the locations (which is the href
attribute value after some normalization, can't recall right now whether
post-normalization was better or just eaisier to spec.)  This seemed
like the cheapest way to test the node identity of the xi:include
element without requiring additional infoset properties (there isn't a
defined node-id property anyway).  I was thinking we'd just update that
to add the lexical value of the xpointer attribute, which used to be
part of the loop detection algorithm.

BTW two different XPointers identifying the same node doesn't seem to
have much to do with loop detection.  If they are different XPointers,
it's not a loop.  Same with URIs.

> -----Original Message-----
> From: Elliotte Rusty Harold [mailto:elharo@metalab.unc.edu]
> Sent: Wednesday, January 07, 2004 1:31 PM
> To: Jonathan Marsh
> Cc: www-xml-xinclude-comments@w3.org
> Subject: 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/cafeaula
it
> A

Received on Wednesday, 7 January 2004 18:00:03 UTC