- From: <bugzilla@wiggum.w3.org>
- Date: Mon, 30 Nov 2009 15:56:27 +0000
- To: public-qt-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=8402
           Summary: [XSLT 2.1] xsl:number start-at attribute
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 2.1
        AssignedTo: mike@saxonica.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org
A simple and useful addition to xsl:number would be an attribute
start-at="expression"
to control the first number in the numbering sequence (defaulting to 1).
Useful for example where numbering is to run across the documents in a
collection: 
<xsl:iterate select="collection('chapters')">
  <xsl:param name="first-fig" select="1"/>
  <xsl:apply-templates>
    <xsl:with-param name="first-fig" select="$first-fig" tunnel="yes"/>
  </xsl:apply-templates>
  ...
  <xsl:next-iteration>
   <xsl:param name="first-fig" select="$first-fig + count(.//figure)"/>
  </xsl:next-iteration>
</xsl:iterate>
<xsl:template match="figure">
  <xsl:param name="first-fig" tunnel="yes"/>
  Figure <xsl:number level="any" start-at="$first-fig"/>
</xsl:template>
Requirement extrapolated from a question on xsl-list today.
-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Monday, 30 November 2009 15:56:29 UTC