Subject: RE: [xsl] consolidating footnotes/numbering with same idref From: "Whitney, Dan (CanWest Interactive)" <DWhitney@xxxxxxxxxxx> Date: Fri, 17 Oct 2003 14:02:21 -0400 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] firing on more than one m, Passin, Tom | Thread | [xsl] How to reference nodes that h, belangour abdessamad |
Re: [xsl] Non breaking space?, Benjamin Farrow | Date | RE: [xsl] generate XHTML header wit, Wendell Piez |
Month |