aboutsummaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
Diffstat (limited to 'utility')
-rw-r--r--utility/xhtml.xsl21
1 files changed, 21 insertions, 0 deletions
diff --git a/utility/xhtml.xsl b/utility/xhtml.xsl
index 00f1ef2..c450175 100644
--- a/utility/xhtml.xsl
+++ b/utility/xhtml.xsl
@@ -25,4 +25,25 @@
<xsl:copy/>
</xsl:template>
+<xsl:template match="a[@class = 'footnoteRef']" mode="xhtml">
+ <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:copy-of select="@class"/>
+ <xsl:copy-of select="@id"/>
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat('/article/', ancestor::entry/@handle, '/', @href)"/>
+ </xsl:attribute>
+ <xsl:apply-templates select="node()" mode="xhtml"/>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="div[@class = 'footnotes']/ol/li/p/a[@class = 'more']" mode="xhtml">
+ <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
+ <xsl:copy-of select="@class"/>
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat('/article/', ancestor::entry/@handle, '/', @href)"/>
+ </xsl:attribute>
+ <xsl:apply-templates select="node()" mode="xhtml"/>
+ </xsl:element>
+</xsl:template>
+
</xsl:stylesheet>