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

Re: return nodeset to xsl:variable

Subject: Re: return nodeset to xsl:variable
From: Francis Norton <francis@xxxxxxxxxxx>
Date: Thu, 08 Mar 2001 17:20:14 +0000
xsl nodeset

Michael Kay wrote:
> 
> > I see how to set an xsl:variable by 'returning' a string from a called
> > template, but how do you return a node set to an xsl:variable?.
> 
> A called template doesn't actually return a result, it writes to a tree.
> 
> What do you actually want to achieve?
> 
A general note - if you want to get a nodeset into a variable, and it
can be generated by a single XPath expression, then you can do this with
xsl:variable/@select.

If you want to create a variable which contains a nodeset which can only
be generated with XSLT logic, then the short answer is you can't. But in
fact you can work round this if you need to badly enough by using
parameters instead, typically building up the contents of a parameter by
recursive calls until it is complete, and then calling the next stage in
your transform with your complete value as an input parameter.

Francis.

 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.