Re: Processing node-sets in batches
so I'm trying to read all of the nodes into a node-set() and process them out into a series of 100-row tables.
if you need the node-set() extension then probably you have copied the entire source into a result tree fragment, which might account for your
memory problems. hard to say. But that may not be what you mean (node-set() isn't valid xpath syntax so I'm having to guess)
I'm assuming you are using xslt 1 (you don't say) as xslt 2 doesn't have node sets.
If $x contains a node set then
<xsl:for-each select="$x[position() mod 100 = 1]">
<xsl:variable name="p" select="position()"/>
<xsl:for-each select="$x[position()> $p * 100][position()<= ($p+1) * 100]">
will process the nodes in batches of a hundred
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format