Re: [xsl] Recursive for loop & xslt 2.0

Subject: Re: [xsl] Recursive for loop & xslt 2.0
From: Israel Viente <israel.viente@xxxxxxxxx>
Date: Thu, 18 Jun 2009 12:37:08 +0300
Thanks for your answers.
Can you please send me an example of how to write this hello world
loop with the
xsl:for-each select=" 1 to 10"?

Thanks

On Wed, Jun 17, 2009 at 3:13 PM, David Carlisle<davidc@xxxxxxxxx> wrote:
>
>
>     <xsl:with-param name="i">1</xsl:with-param>
>
> It's inefficient to do that for xslt 1 and wrong and inefficient in xslt2.
>
>
> the above makes a document node (rtf in xslt 1) with a text node child with
string value
> "1"
>
> whereas what you want is
>
>
>  <xsl:with-param name="i" select="1"/>
>
> which makes a number (in xslt1) or integer (xslt 2) 1.
>
> In xslt 1 it's just inefficient as the result tree fragment has to be
> coerced back to a number, but in xslt 2 it gets the wrong values as the
> < operator on document nodes will do a lexical comparison of the string
> values of the nodes, so "10" will be less than "2" unless you have a non
> standard default collation.
>
> of course in xslt 2 it's easier to doi
>
> xsl:for-each select=" 1 to 10"
>
>
> David
>
>
> ________________________________________________________________________
> The Numerical Algorithms Group Ltd is a company registered in England
> and Wales with company number 1249803. The registered office is:
> Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
>
> This e-mail has been scanned for all viruses by Star. The service is
> powered by MessageLabs.
> ________________________________________________________________________

Current Thread