This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: LOOP-LIMIT
- From: Hans Huber <hans dot huber at ecube dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 01 Mar 2002 16:11:46 +0100
- Subject: Re: [xsl] LOOP-LIMIT
- Organization: eCube GmbH
- References: <OF3510A7A9.66FBC9F4-ON85256B6F.0051F5C6@prci.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi,
I have a comment concerning performance: you can easily obtain the most
performant of the two possible ways by profiling your transformations.
If this is of relevance to you check out
http://www.xslprofiler.org
Cheers, Hans.
Corey_Haines@progressive.com wrote:
> You could do something like
>
> <xsl:for-each select="root/child[@id<4]">
> Do Something
> </xsl:for-each>
> <xsl:for-each select="root/child[@id>3]">
> Do Something Else
> </xsl:for-each>
>
> Or,
>
> <xsl:for-each select="root/child">
> <xsl:choose>
> <xsl:when test="@id < 4">
> Do Something
> </xsl:when>
> <xsl:otherwise>
> Do Something Else
> </xsl:otherwise>
> </xsl:choose>
> </xsl:for-each>
>
> -Corey
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list