bug in exsl:node-set example on web site

spage <[email protected]>
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <[email protected]>
Hi there, my first post.

http://exslt.org/exsl/functions/node-set/index.html has an example 
using a result tree fragment variable named "tree".

Except the stylesheet doesn't use the variable.  It does:
	<xsl:value-of select="count(exslt:node-set(//*))" />

This just counts the nodes in the source document, which you could do 
equally well with
	<xsl:value-of select="count(//*)" />

I think you mean
	<xsl:value-of select="count(exslt:node-set($tree)//*)" />

or something like that.

It's a confusing example because both the tree variable and the source 
document have almost the same number of nodes, so 5 seems a reasonable 
answer.  It doesn't even use the source document.  I would leave out 
the source document altogether and say "Result (with any XML input)"


Cheers,
--
=S Page   www.macromedia.com senior Site Engineer

Passive voice sucks the life out of correspondence.  Say who's doing 
what!
"It has been found that passive voice is to be avoided"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.