xsl-list
[Top] [All Lists]

Re: [xsl] How do I build a nodeset "programmatically" for passing to another template?

2006-08-17 09:08:32
At 11:59 AM 8/17/2006, David wrote:
in xsl 1.1 draft (and xsl2 draft which is implemented in saxon 8) then
you can do just as you suggest

<xsl:variable name="something">
 ... xsl code ..
</xsl:variable>

then
select="$something/*"

(note that $something is always a root node / soto select the top level
element (or elements) that you create in the variable you need to
use a path such as $something/*

It's a good point: this will probably be a gotcha, especially since sometimes (for example, when applying templates in a mode) select="$something" will work just fine, and other times (for example when applying templates not in a mode) it will fail inexplicably and spectacularly.

Cheers,
Wendell


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--