|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Dealing with footnotes
Scott,
At 05:03 PM 5/9/2002, you wrote: I'm trying to transform an xml document into html and having difficulties in keeping the content of the footnotes from appearing in the text of the document. Is there any way to present the content of the footnotes at the bottom vs. the way it is now. Yup. Simply do something like <xsl:template match="/">
...
<xsl:apply-templates/>
<hr/> <!-- putting in a rule just to separate off the notes -->
<xsl:apply-templates select="//footnote" mode="notes"/>
...
</xsl:template><xsl:template match="footnote"> <sup><xsl:value-of select="@id"/></sup> <!-- displays the value of the ID but nothing else --> </xsl:template> <xsl:template match="footnote" mode="notes">
<p>
<xsl:apply-templates select="."/>
<!-- processing the node again in the default mode just to get the ID -->
<xsl:apply-templates/>
<!-- next just descending the tree to get the note's contents -->
</p>
</xsl:template>Also how can I display the value of the "id" attribute that references the actual footnote? See above. Modes on templates allow you to process a given set of nodes in more than one different way. Cheers, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








