BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


XSLT
Intersection and other set operations on node-sets
Grouping using xsl:key and the key() function -- the Muenchian method
Comparing Strings in XSLT for greater/less
How to do a search and replace in XSLT
How to work with more than one xml document in your XSLT transformation
Sorting (advanced) of dynamically constructed strings
In case you need a ""break"" from an xsl:for-each loop
Format XML/XSL for Documentation
Find all xsl:variables that are in scope?
Binary Search in XSLT
Get the newest 5 articles out of hundreds -- a super efficient sort in XSLT
Dynamically change the encoding of your XSLT stylesheet
Identifying an attribute or a namespace node
Build a XPath expression for a node
Avoiding an XSLT Processor crash due to deep recursive processing
Conditional generation of a string in a single XPath expression
Re: Re: ABS function implemented as a single XPath expression
Re: ABS function implemented as a single XPath expression
ABS function implemented as a single XPath expression
XML to HTML text editor


 
 

<< XQuery.NET and XML >>


By Martin
First Posted 12/03/2007
Times viewed 647

For Next Loop in XSLT


Summary So many people have said that you cannot do For Each - Next looping in XSLT. This snippet demonstrates how to do this using recursion.

There is no direct equivalent for the For-Next construct in XSLT. (This is by design...)

However, such an effect can be achieved using recursion.

This important part of this snippet was originally supplied by David Carlisle.

Look for the section, where all the hard work is done. The element is used as a pseudo-loop counter.

Additional information

Further additional information


Rate this article on a scale of 1 to 10 (2 votes, average 6)

Your vote :  

<< XQuery.NET and XML >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML