Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Performance on node set and result tree fragment [Thread Next] Re: Performance on node set and result tree fragmentTo: NULL Date: 4/30/2007 8:55:00 PM On Apr 30, 11:49 pm, Martin Honnen <mahotr...@yahoo.de> wrote: > I don't think you have much of a choice, if you use an xsl:variable with > contents then you have a result tree fragment, there is no way to avoid > that and make a variable return a node set if you construct some new > contents inside of the xsl:variable. > Of course sometimes you have the choice to avoid the result tree fragment as > <xsl:variable name="varname" select="2"/> > gives you a variable with number type whereas > <xsl:variable name="varname">2</xsl:variable> > gives you a result tree fragment so in that case of simple types like > number, boolean or string you can avoid having a result tree fragment by > using the select attribute. However in this case you do not choose > between node set and result tree fragment but between simple type and > result tree fragment. Cool, thanks a lot. Just one more question. Say I have to access the same node set over and over again through out the stylesheet, and the select condition for this node set is complicated. Which way is the better way? 1. node set variable: <xsl:variable name="a" select="......"/> 2. RTF: <xsl:variable name="a"> .... </xsl> This is assuming both ways work, and no xsl recursion required. Cheers | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
