Re: [xsl] LOOP-LIMIT

Subject: Re: [xsl] LOOP-LIMIT
From: Hans Huber <hans.huber@xxxxxxxx>
Date: Fri, 01 Mar 2002 16:11:46 +0100
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@xxxxxxxxxxxxxxx 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



Current Thread