Jump to content

XSLT For-Each

Recommended Posts

With XSLT 2.0 you can process any sequence so

<xsl:for-each select="1 to 5">...</xsl:for-each>

processes a sequence of five integers 1,2,3,4,5.


Make sure you store the input document you want to process outside of the for-each in a variable if you want to access it inside of the for-each as the context item is the currently processed integer number.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now