This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Pedagogy of Objects
- To: xsl-list at mulberrytech dot com
- Subject: Re: Pedagogy of Objects
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Sat, 1 Apr 2000 10:47:01 GMT
- References: <200004010049.TAA99068@origin.chass.utoronto.ca>
- Reply-To: xsl-list at mulberrytech dot com
> There a difference between a "result tree fragment" and a "node
> set". But isn't saving a selected & sorted list of nodes saving a node
> set?
No, it isn't according to the standard
In order to sort the list you need something like
<xsl:variable name="x">
<xsl:for-each select="zzzz">
<xsl:sort select="@qqqq"/>
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:variable>
but any use of xsl:variable with non empty content produces a result tree
fragment so although this is basically the same as a node set
containing one node with child zzzz nodes in sorted order,
you can not access those nodes by any standard means.
msxsl peview currently doesn't distinguish so there you can go
select="$x/zzzz[3]" to get the third zzzz in sorted order,
xt and saxon are more conformant and they supply an extension
function that converts the rtf back to a node set
select="xt:node-set($x)/zzzz[3]
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list