|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Several rules vs a single rule with a choose operator
Hello, friends.
How do you think, which of the following two approaches
is more effective (particularly, for MSXML):
<xsl:template match="node-test[condition2]" priority="2">
result2
</xsl:template>
<xsl:template match="node-test[condition1]" priority="1">
result1
</xsl:template>
<xsl:template match="node-test">
result0
</xsl:template>
or
<xsl:template match="node-test">
<xsl:choose>
<xsl:when test="condition2">result2</xsl:when>
<xsl:when test="condition1">result1</xsl:when>
<xsl:otherwise>result0</xsl:otherwise>
</xsl:choose>
</xsl:template>
The effectiveness question is important in my case,
since I employ a large set of template rules
and, moreover, apply it several times per request.
Thanks.
--
Alexander E. Gutman
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








