|
Subject: [xsl] key() function issue From: Bruce D'Arcus <bdarcus@xxxxxxxxx> Date: Wed, 1 Jun 2005 21:09:32 -0400 |
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bib="http://purl.org/NET/xbiblio/citeproc" exclude-result-prefixes="xs bib" version="2.0">
<xsl:template match="doc">
<list>
<xsl:apply-templates
select="//footnote|//citation[not(ancestor::footnote)]"/>
</list>
</xsl:template> <xsl:template match="footnote">
<number>
<xsl:value-of select="bib:footcite(.)"/>
<xsl:apply-templates select="citation"/>
</number>
</xsl:template> <xsl:template match="citation">
<xsl:variable name="first">
<xsl:value-of select="bib:first-reference(.)"/>
</xsl:variable>
<number first="{$first}">
<xsl:value-of select="bib:footcite(.)"/>
</number>
</xsl:template> <xsl:template match="citation[ancestor::footnote]">
<xsl:variable name="first">
<xsl:value-of select="bib:first-reference(.)"/>
</xsl:variable>
<nonumber first="{$first}"/>
</xsl:template> <xsl:function name="bib:footcite" as="xs:string">
<xsl:param name="footciteable" as="element()"/>
<xsl:for-each select="$footciteable">
<xsl:number level="any" select="."
count="footnote|citation[not(ancestor::footnote)]"/>
</xsl:for-each>
</xsl:function><list> <number first="true">1</number> <number>2<nonumber first="true"/> </number> <number first="false">3</number> </list>
<list> <number first="true">1</number> <number>2<nonumber first="true"/> </number> <number first="true">3</number> </list>
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] RE: Javascript quote escaping, Bovy, Stephen J | Thread | RE: [xsl] key() function issue, Michael Kay |
| RE: [xsl] Convert html:br to paragr, Aron Bock | Date | RE: [xsl] xsl:number and conditiona, Michael Kay |
| Month |