Re: [xsl] Dealing with footnotes

Subject: Re: [xsl] Dealing with footnotes
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 09 May 2002 17:31:15 -0400

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="/">
        <hr/> <!-- putting in a rule just to separate off the notes -->
        <xsl:apply-templates select="//footnote" mode="notes"/>

<xsl:template match="footnote">
  <sup><xsl:value-of select="@id"/></sup>
  <!-- displays the value of the ID but nothing else -->

<xsl:template match="footnote" mode="notes">
    <xsl:apply-templates select="."/>
    <!-- processing the node again in the default mode just to get the ID -->
    <!-- next just descending the tree to get the note's contents -->

 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.


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

XSL-List info and archive:

Current Thread