Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Making XSLT Transform faster >Thread Next - Re: Making XSLT Transform faster Re: Making XSLT Transform fasterTo: NULL Date: 4/7/2009 1:16:00 PM Zest4Quest wrote:
> <xsl:for-each select="AssessmentData/PSHistory">
> <xsl:variable name ="SHVar" >
> <xsl:if test ="HelpAtHome = '1'">
> <xsl:text>has help at home, </xsl:text>
> </xsl:if>
> <xsl:if test ="HelpAtHome = '2'">
> <xsl:text>does not have help at home, </xsl:text>
> </xsl:if>
It looks to me as if an xsl:choose should be slightly more efficient
<xsl:choose>
<xsl:when test="HelpAtHome = '1'">
...
</xsl:when test="HelpAtHome = '2'">
...
</xsl:when>
</xsl:choose>
That way, if HelpAtHome = '1', the second test is not performed while in
your case with two xsl:if it is.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
