[XSLT] choose/when vs. if

D

Daniel M. Fichtner

Hello,

due to performance reasons I need to know whether the xsl:when-Statement has
an implied "break" statement, so that the parser do not touch the other when
statements or if it is similar to the if statements.

listing
----------------------
<xls:for-each ...>
<xls:choose>
<much xls:when ...>
do sth.
</much>
<xls:eek:therwise>
</xls:eek:therwise>
</xls:choose>
</xls:for-each>
 
M

Martin Honnen

Daniel M. Fichtner wrote:

due to performance reasons I need to know whether the xsl:when-Statement has
an implied "break" statement, so that the parser do not touch the other when
statements or if it is similar to the if statements.

The first matching
<xsl:when test>
is used, or the
<xsl:eek:therwise>
whichever comes first. There is no need to exit or break from an
<xsl:when> as the spec
http://www.w3.org/TR/xslt#section-Conditional-Processing-with-xsl:choose
clearly says "The content of the first, and only the first, xsl:when
element whose test is true is instantiated.".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,835
Latest member
lila30

Latest Threads

Top