[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Processing node-sets in batches

Subject: Re: Processing node-sets in batches
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 08 Mar 2010 00:04:06 +0000
Re:  Processing node-sets in batches
On 07/03/2010 23:50, Jeff Hooker wrote:
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()&gt; $p * 100][position()&lt;= ($p+1) * 100]">


will process the nodes in batches of a hundred

David

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.