W3C home > Mailing lists > Public > xsl-editors@w3.org > October to December 2000

Re: What's an "XML Fragment"?

From: John E. Simpson <simpson@polaris.net>
Date: Sun, 08 Oct 2000 16:43:43 -0400
Message-Id: <4.3.2.7.2.20001008163100.00bb4ef0@nexus.polaris.net>
To: xsl-list@mulberrytech.com, xsl-editors@w3.org
At 01:06 PM 10/08/2000 -0700, Elliotte Rusty Harold wrote:
>Section 13 of the XSLT specification, Messages, makes references to an
>"XML fragment" data type that is mentioned nowhere else in the spec.
>Specifically,
>
>"The xsl:message is instantiated by instantiating the content to create
>an XML fragment. This XML fragment is the content of the message."
>
>I'm 90% certain that what's meant here is what is elsewhere called a
>"result tree fragment". Can anybody confirm or deny that? In any case,
>this seems to need an erratum to clarify the point.

I have no inside information, obviously, but I just read that as a 
reference to XML fragments as defined by the apparently moribund XML 
Fragment Interchange WD (last updated 6/30/99). Although nothing seems to 
be happening with that WD, it was still fairly current as of the time the 
XSLT WD went to Recommendation.

See:
    http://www.w3.org/TR/WD-xml-fragment#terminology
Particularly this:

    fragment: A general term to refer to part of an XML document,
    plus possibly some extra information, that may be useful to
    use and interchange in the absence of the rest of the XML
    document. See the rest of the fragment-related terms when a
    more precise definition is required.

Among the "rest of the fragment-related terms" is this one:

    fragment body: A well-balanced region of an XML document being
    considered as (logically and/or physically) separate from the
    rest of the document for the purposes of defining it as a
    fragment. Also, that part of a fragment entity that consists
    solely of the well-balanced region from the complete XML document.

The definition of "well-balanced" says:

    A region (consecutive sequence of characters) of an XML document
    is said to be (well-)balanced if it matches production [43]
    content of XML 1.0. Informally this means that, if the region
    includes any part of the markup of any construct, it contains
    all of the markup of that construct (e.g., in the case of
    elements, all of both the start and end tag)

So a well-balanced fragment might look like this:

    <element>...</element>
    <element>...</element>

even though it's not well-*formed* (i.e. lacks a root element). I think 
this is how Mike Kay's book defines well-balanced, too, although I don't 
recall his referring to the Fragment Interchange WD.

Just a guess!

===============================================================
John E. Simpson               | "He asked me if I knew what
http://www.flixml.org         | time it was. I said, 'Yes, but
XML Q&A: http://www.xml.com   | not right now.'" (Steven Wright) 
Received on Sunday, 8 October 2000 16:45:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:51 GMT