XML.com: XML From the Inside Out

XML.comWebServices.XML.comO'Reilly Networkoreilly.com
  Articles | Weblogs | Newsletter | Safari Bookshelf
advertisement

Article:
 Automatic Numbering, Part 1
Subject: xsl:number with sorting
Date: 2002-11-08 01:33:58
From: David Neumann

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.

No Previous Message Previous Message   Next Message Next Message

Sponsored By:


Contact Us | Our Mission | Privacy Policy | Advertise With Us | | Submissions Guidelines
Copyright © 2008 O'Reilly Media, Inc. | (707) 827-7000 / (800) 998-9938