[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: minor grouping issue

Subject: Re: minor grouping issue
From: Bruce D'Arcus <bdarcus@xxxxxxxxx>
Date: Sat, 7 May 2005 08:25:10 -0400
alex neblett
On May 6, 2005, at 6:03 PM, Michael Kay wrote:

I don't know why each group contains all the notes for the entire book, but
I suspect it's an error in the template that gets invoked by the
apply-templates call that you've shown us.

OK, I now have this:


<xsl:for-each select="$chapters/db:chapter">
   <h3>Chapter <xsl:value-of select="@label"/></h3>
   <xsl:apply-templates select="//db:footnote" mode="footnote-list"/>
</xsl:for-each>

... which applies this template:

  <xsl:template match="db:footnote" mode="footnote-list">
    <xsl:variable name="incr">
      <xsl:number level="any" count="db:footnote"/>
    </xsl:variable>
    <p id="fn{$incr}">
      <a href="#fnm{$incr}" class="footnote-anchor">
        <xsl:value-of select="$incr"/>
      </a>
      <xsl:text>. &#xa0;</xsl:text>
      <xsl:apply-templates/>
    </p>
  </xsl:template>

The solution to the all-footnotes-repeated-in-each-chapter was to select ".//db:footnote" instead of "//db:footnote".

However, the xsl:number element is still counting footnotes throughout the whole document. How would I modify that to only count in the chapter?

Bruce

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.