This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: LOOP-LIMIT


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]