Excellent article - I didn't know that xsl:number existed, and had used an extension function to number the rows in a report - I can now junk the extension function. The report includes some sorting and I found that you get some bizarre-looking numbering if you try <xsl:number> within a sorted node-set (because the numbering is based on the position within the unsorted node-set I guess). The trick to getting this right was to use <xsl:number value="position()"/>, which gives you numbering based on the position within the sorted node-set.