Re: return nodeset to xsl:variable
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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format