Re: XPath vs Fragment Interchange [revisited] (fwd)

At 13:04 2000 04 19 -0700, you wrote:
>I just read through the complete archives and was baffled to not find any
>response to Jesse Holle's excellent observation about the apparent overlap
>between XPath and Fragments (see:
http://lists.w3.org/Archives/Public/www-xml-fragment-comments/1999Sep/0001.h
tml).
>
>Can someone please respond to this issue (or forward me responses if the 
>archive is incomplete)?

It appears there was no answer to this.  Comment lists aren't
necessarily for discussion, and the Fragment Interchange spec
isn't currently in active review, so no action was taken with
regard to this comment.  (However, that's no excuse for no one
having taken the effort to make a polite reply.)

Being as there is no working group with this spec currently
on its plate, I can only make a personal reply.  

It is almost tautologically true that there is a homomorphism 
between XPointer and the syntax of a fragment entity because
XPointer is designed to be able to address into the structure
of an XML document, and a fragment entity is designed to
represent the context of a fragment body using XML syntax.

One goal of the fragment spec was to define a
fragment entity to be a well-formed XML document, whereas
a goal of XPointer was to be embeddable in a URI, so the
syntaxes chosen are different.

But more importantly, what the XML Fragment Interchange spec is
defining is a way to exchange the *context* of a well-balanced chunk
of XML, not the chunk itself.  XPointer addresses the chunk, and
the fragment format expects XPointer to be used to do so, but 
the whole point of the fragment spec--and what the bulk of what
gets transmitted is doing--is to define the fragment context.

Whereas the XPointer shown in Jess' example does appear to
"reflect" the context, an XPointer implementation would use
that XPointer to address a chunk, but it wouldn't know or do
anything about context.  While it might be logically possible
to write some code that would parse an XPointer and intuit the
context from what was given in the XPointer, the idea of the
fragment syntax was that a regular XML parser would find the 
fragment body at a point when the parser had naturally been
put into the right context with no extra effort.

Furthermore, a fragment entity could be written to process
a given fragment body in *any* context, not just the one from
which the fragment body was actually retrieved, whereas if
the retrieving XPointer also encodes the context, that couldn't
be the case.

paul

Received on Thursday, 20 April 2000 16:11:13 UTC