Re: [xsl] Processing node-sets in batches

Subject: Re: [xsl] Processing node-sets in batches
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 15 Mar 2010 21:43:57 +0000
On 15/03/2010 20:37, Jeff Hooker wrote:
<xsl:variable name="setsize">10</xsl:variable> <!


It's much more efficient to use

<xsl:variable name="setsize" select="10"/>

which makes the variable hold a number rather than a document node with a text node child with string value the decimal representation of the number which needs to be cast first to a string, then to a number when used in a numeric context.

Also xslt2 is based on sequences not sets, so the terminology is a bit off (which was why I assumed XSLt1 in my first reply). node-set is the basic datatype in xpath 1, but it doesn't exist in xpath2.

David

Current Thread