Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Performance on node set and result tree fragment

From: =?utf-8?B?5YG95ouJ?= <mcha226@-----.--->
To: 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



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent