xsl-list
[Top] [All Lists]

Re: [xsl] question on EXSLT data partitioning

2010-10-20 16:51:04
<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.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--