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

RE: consolidating footnotes/numbering with same idref

Subject: RE: consolidating footnotes/numbering with same idref
From: "Whitney, Dan (CanWest Interactive)" <DWhitney@xxxxxxxxxxx>
Date: Fri, 17 Oct 2003 14:02:21 -0400
footnotes same
Americo,

Thanks for the answer seemed to work and then I copied the first 4 lines and
tried again:

<RS>
<RI col="1">Row 1 - Column 1<RIREF refid="142">Footnote 1</RIREF></RI>
<RI col="2">Row 1 - Column 2</RI>
<RI col="3">Row 1 - Column 3<RIREF refid="140">Footnote 2</RIREF></RI>
<RI col="4">Row 1 - Column 4</RI>
<RI col="1">Row 1 - Column 1<RIREF refid="142">Footnote 1</RIREF></RI>
<RI col="2">Row 1 - Column 2</RI>
<RI col="3">Row 1 - Column 3<RIREF refid="140">Footnote 2</RIREF></RI>
<RI col="4">Row 1 - Column 4</RI>
<RI col="1">Row 2 - Column 1</RI>
<RI col="2">Row 2 - Column 2<RIREF refid="150">Footnote 3</RIREF></RI>
<RI col="3">Row 2 - Column 3</RI>
<RI col="4">Row 2 - Column 4<RIREF refid="142">Footnote 1</RIREF></RI>
</RS>

does consolidate the footnotes but when I hit <RIREF refid="150">Footnote
3</RIREF>
it numbers it 5. instead of 3. 

Don't know if this is the best way but changed the count="RIREF" to
count="RIREF[generate-id()=generate-id(key('RIREF',@refid)[1])]" in both the
RIREF templates and it seems to do the trick.

Thanks,

Dan 

 
Try this stylesheet:

  <xsl:key match="RIREF" name="RIREF" use="@refid"/>

  <xsl:template match="RS">
    <table>
      <tr>
        <xsl:apply-templates select="RI"/>
      </tr>
    </table>
    <table>
      <xsl:apply-templates mode="footnote"
select="RI/RIREF[generate-id()=generate-id(key('RIREF',@refid)[1])]"/>
    </table>
  </xsl:template>

  <xsl:template match="RI">
    <td>
      <xsl:apply-templates select="text()"/>
      <xsl:apply-templates
select="../RI/RIREF[@refid=current()/RIREF/@refid][generate-id()=generat
e-id(key('RIREF',@refid)[1])]"/>
    </td>
  </xsl:template>

  <xsl:template match="RIREF">
    <sup>
      <xsl:number count="RIREF" format="1" from="RS" level="any"/>
    </sup>
  </xsl:template>

  <xsl:template match="RIREF" mode="footnote">
    <tr>
      <td>
        <b>
          <xsl:number count="RIREF" format="1. " from="RS" level="any"/>
        </b>
        <xsl:value-of select="."/>
      </td>
    </tr>
  </xsl:template>

Regards,
Americo Albuquerque


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.