[xsl] Dealing with footnotes

Subject: [xsl] Dealing with footnotes
From: Scott Meadows <scott@xxxxxxxxxxx>
Date: Thu, 09 May 2002 16:03:19 -0500
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. Also how can I display the value of the "id"
attribute that references the actual footnote?

Here's the xml doc:

<?xml version="1.0"?>

<?xsl-stylesheet type="text/xsl" href="II_18.xsl"?>

<part n="2">

    <chapter n="18">CHAPTER XVIII</chapter>

    <title n="1">My Title</title>

    <direction n="1">

            <para>Paragraph one goes here...
            
            <footnote id="a">This is a footnote
            </footnote>
                
            Continuation of paragraph one...
            </para>
            
            <para>Paragraph two goes here
            </para>
            
            
    </direction>



</part>


------------------------------------------------

Here's the xsl doc:

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
    
    
    <xsl:output method="html"/>

    
    <xsl:template match="part">
        <html>
            <head>
            <title><xsl:value-of select="title"/></title>
            </head>
            <body>
            <xsl:apply-templates select="title"/>
            <xsl:apply-templates select="direction/para"/>
            <xsl:apply-templates select="direction/para/footnote"/>
            </body>
        </html>  
    </xsl:template>
    
    <xsl:template match="title">
        <div align="center"><h2><xsl:value-of select="."/></h2></div>
    </xsl:template>
    
    <xsl:template match="direction/para">
        <p><xsl:value-of select="."/></p>
    </xsl:template>
    
    <xsl:template match="direction/para/footnote">
        <p><em><xsl:value-of select="."/></em></p>
    </xsl:template>
    
    
</xsl:stylesheet>


Any suggestions?

Scott Meadows
scott@xxxxxxxxxxx


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


Current Thread