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

Putting a nodeset in a variable

Subject: Putting a nodeset in a variable
From: Cams Ismael <Ismael.Cams@xxxxxxxxxxxxxxx>
Date: Fri, 22 Nov 2002 14:10:21 +0100
 Putting a nodeset in a variable

is it possible to put a nodeset in a variable. 
What I try to do is the following. I have an xml file which I want to group.
This resulting tree I want to put in a variable so I can use it later on.

		<trap id="5"/>
		<trap id="6"/>
		<trap id="2"/>
		<trap id="5"/>

	<xsl:variable name="distinctValues">
		<xsl:for-each select="traps/trap">
			<xsl:sort select="./@id"/>
			<xsl:copy-of select="."/>

	<xsl:template match="/">
		<xsl:for-each select="$distinctValues/trap">
			<xsl:value-of select="@id"/>

When I try to do this I get following error:
	Expression must evaluate to a node-set.

Can somebody give me a hint if this is possible ?

Kind regards,

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

Current Thread


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.
First Name
Last Name
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.