Subject: Re: question on EXSLT data partitioning
From: iwanttokeepanon <iwanttokeepanon@xxxxxxxxx>
Date: Wed, 20 Oct 2010 16:50:49 -0500
|
> <xsl:key name="part" match="Entity" use="(position() - (position() mod
1000)) div 1000 ">
> [...]
> <xsl:for-each select="Entity[position() mod 1000 = 0]">
> <arguments>
> <xsl:apply-templates select ="key('part',position() div 1000) ">
</arguments>
> </xsl:for-each>
>
> [...]
Shouldn't that be: <xsl:for-each select="Entity[position() - 1 mod
1000 = 0]"> ? B/c as coded, the first 'mod' to == 0 would be node
1000. What if you only have 999 nodes? You seem to be "triggering"
off the last node in a group and you want to "trigger" off the FIRST
node in a group. Right? You could potentially drop all nodes in the
last group. Right?
Recognizing the caveat of position()=1 of course.
| Current Thread |
|
Michael Kay - 19 Oct 2010 15:33:33 -0000
|
|