xsl-list
[Top] [All Lists]

RE: [xsl] Using the Input Document to Control Generation of Numbers in the Output

2007-10-02 06:58:12
What about
<xsl:template match="incoming">
   <outgoing name="{(_at_)name}" 
index="{count(preceding-sibling::*[not(@size)]) + 1 + 
sum(preceding-sibling::*/@size)}"></outgoing>
  </xsl:template>


Sure, you can do that, but it's likely to be O(n^2).

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
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>
--~--