xsl-list
[Top] [All Lists]

Re: [xsl] What is actually a "fragment" ?

2014-04-26 17:35:27


On 26 Apr 2014, at 20:03, Dimitre Novatchev <dnovatchev(_at_)gmail(_dot_)com> 
wrote:

According to the XDM (both 2.0 and 3.0),

"[Definition: A tree whose root node is not a Document Node is
referred to as a fragment.]"

So a fragment is a tree.

However, I have been taught (by the books of Dr. Michael Kay) that an
fragment is a node-set, that by itself may not be a well-formed
document, but wrapping this node-set in a  single element parent will
make this a well-formed document.

There is an obvious contradiction in these two definitions -- in the
former a fragment must be a tree (have a root node), while in the
latter this isn't required.


Interesting. I'm not aware of any normative use of the XDM-defined term 
anywhere in our specs, so I don't think it's a big issue. But I'm more familiar 
with the use in the sense of the DOM DocumentFragment object, which is 
essentially a Document without the constraint of having exactly one element 
node and no text node children. Either that, or the URI "fragment identifier" 
which means something quite different.

Michael Kay
Saxonica
--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


<Prev in Thread] Current Thread [Next in Thread>