[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: what are node set fragments and why are they ruining my

Subject: RE: what are node set fragments and why are they ruining my life?
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Wed, 15 Dec 1999 13:58:03 -0000
RE: what are node set fragments and why are they ruining my
>then I get the bizarre result [from Saxon] - 

>member local-name=member, id=1
>member local-name=member, id=2
>member local-name=RESULT-TREE-FRAGMENT, id=
>member 1member 2

> - which looks like a new bug to me. 

Bizarre perhaps, but not a bug. sxf:node-set is documented to work this way.
As well as putting the dummy root node in as a parent for the user-written
nodes, it also wraps a dummy element around them, to make the fragment a
well-formed document. This was basically done for code reuse reasons, and
because at the time it was written the implementation of result tree
fragments was not exposed to the application.

This will change in the next version to work the same as xt.

I'm hitting a few other problems in the area of output XML not needing to be
a well-formed document, e.g. when calling a DocumentHandler to process the
output, or when chaining it into another stylesheet. (The contract with a
SAX DocumentHandler of course says that the sequence of events will always
be well-formed). It's an area where the spec seems a bit vague, e.g. it
seems perfectly possible to output

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<element1/>
<element2/>

which is neither a well-formed document nor a well-formed external entity.


Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.