> The main reason why I want to do 'loop rolling' here is that I plan to > have a couple of different templates that would make use of this > construct with all the same global variable. If I want to make some > (consistent) changes in the parameter values of the template calls, I > only need to make the required changes with the global variable, instead
> of querying hundreds of lines of code. > > My questions here are > - is 'loop rolling' a legal concept with XSLT? > - is the reaction of Xalan (The expression does not evaluate to a > node-set.) a bug - or a feature? Whenever you use xsl:variable with content, you are creating a result tree fragment (RTF). In XSLT 1.0, the only thing you can do with an RTF is copy it to the result tree, or use it like a string. In your case, you are trying to treat it like a node-set, which is explicitly forbidden: http://www.w3.org/TR/xslt#section-Result-Tree-Fragments There are two ways around this. You can avoid use constructing new things by using the select attribute of xsl:variable. This also has the advantage of being more efficient, since you are not creating new nodes. The other is you can use the EXSLT node-set function to "convert" the RTF to a node-set: http://exslt.org/exsl/functions/node-set/index.html both the Java and C++ processors support this function. You can consult the XSL FAQ for more information: http://www.dpawson.co.uk/xsl/index.html Also, the Mulberry XSL list is by far the best source of information and insight into the sorts of issues: http://www.mulberrytech.com/xsl/xsl-list/index.html Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
