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

RE: Footnotes, for a learner.

Subject: RE: Footnotes, for a learner.
From: "Max Dunn" <maxdunn@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 1 Jan 2002 18:03:29 -0800
max learner
There are many ways you can do footnotes, how you would do the transform
would depend on how you are maintaining the footnotes in your XML.
here's one very simple example:

================ zine.xml ================

<?xml version="1.0"?>
<?xml-stylesheet href="zine.xsl" type="text/xsl"?>
	<Para>This zine is about Egyptology<footnote>I don't really 
	know anything about Egyptology, but I thought I'd learn by 
	writing about it, if you want a serious book there's a good 
	one by Jean Vercoutter.</footnote>  Egyptology is the study
	of the culture and artifacts of the ancient Egyptian 
	Between approximately 7000 and 2000 BC Egyptian culture 
	flourished<footnote>Of course some would argue that it didn't
	flourish, as for example there was slavery, women were treated
	like cattle, and certainly not all Egyptians were happy: in any
	case, at a minimum, they flourished in the sense of churning 
	out marvels of technological innovation.</footnote>: reminders
	such as the pyramids survive to this day.

=============== zine.xsl ==================

<?xml version="1.0"?><!--zine.xsl-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
	<br /><hr />
	<xsl:apply-templates select="//footnote" mode="endlist"/>

<xsl:template match="Para">
	<xsl:apply-templates mode="default"/>

<xsl:template match="footnote" mode="default">
	<xsl:variable name="inc">
		<xsl:number level="any" count="footnote"/>
	<sup>&#xa0;<a href="#{$inc}" name="f{$inc}">
	<xsl:value-of select="$inc"/></a></sup>

<xsl:template match="footnote" mode="endlist">
	<xsl:variable name="incr">
		<xsl:number level="any" count="footnote"/>
	<a name="{$incr}">
	<sup><xsl:value-of select="$incr"/></sup>
	<xsl:value-of select="."/>
	<xsl:text> </xsl:text>
	<a href="#f{$incr}">back</a>



-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Michel Guay
Sent: Tuesday, January 01, 2002 5:27 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Footnotes, for a learner.

Hi !

First, note that my knowledge of xslt is thin. And I am far from being a

programmer like all of you. I am learning by doing. Then, please
if my question seems basic or primitive.

Presently, I am developping a model in xml / xslt for a e-zine in 
Egyptology. All goes well, using books and informations found on the
But I have a problem : I want to insert footnotes in the articles. Using
Kay?s book, I am able to generate the footnotes at the end of the
But, I really can?t build the hyperlinks between the notes number (in
text) and the specific footnote placed at the end of the article (the 
anchor in html).

My wish (for the New Year) : to find a good working exemple so that I
learn and understand how things work (in the xml document and in the

I would appreciate a suggestion or two. Maybe a link somewhre (yes, I
through the Archive, but I have only found partial info).

Thanks and Happy New Years.

Michel Guay
Université du Québec.

 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


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.
First Name
Last Name
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.