Doing counters with extension functions (including just calling Java
classes) isn't always safe. Remember, XSLT is a non-procedural language and
there is no promise that code will actually be executed in the order you
wrote it in.

Rather than using extensions *or* recursion, you should seriously consider
structuring your code so the position() within an expression can be used to
number the items returned by that expression. Or using XSLT's built-in
numbering mechanisms.

See much discussion at the Numbering page
(http://www.dpawson.co.uk/xsl/sect2/N5758.html of Dave Pawson's XSL FAQ
website (http://www.dpawson.co.uk/xsl/index.html)

______________________________________
"... Three things are most perilous: Connectors that corrode,
  Unproven algorithms, and self-modifying code! ..."
  -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish
(http://www.ovff.org/pegasus/songs/threes-rev-11.html)

Reply via email to