|
Subject: [xsl] Footnote generator From: "Aaron Gray" <angray@xxxxxxxx> Date: Sat, 22 Mar 2008 01:20:26 -0000 |
1) <xsl:output indent="yes"> does not seem to work. 2) elements like <br/> are being output as <br></br>
~~~~~~~~~~~~~~~~~~~ footnote.xsl ~~~~~~~~~~~~~~~~~~~~~ <?xml version="1.0"?>
<xsl:stylesheet version="2.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xhtml xsl xs">
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" mode="html"/>
</xsl:copy>
</xsl:template> <xsl:template match="xhtml:head" mode="html">
<head>
<xsl:copy-of select="*"/>
</head>
</xsl:template> <xsl:template match="xhtml:body" mode="html">
<body>
<xsl:apply-templates select="@*|node()" mode="body"/>
</body>
</xsl:template> <xsl:template match="@*|node()" mode="body">
<xsl:copy>
<xsl:apply-templates select="@*|*|node()" mode="body"/>
</xsl:copy>
</xsl:template> <xsl:template match="xhtml:footnote/*" mode="footnote">
<xsl:copy-of select="."/>
</xsl:template><?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Footnote test</title> </head> <body> Test <a href="#fn1" name="#fr1">[1]</a> <br></br> Test2 <a href="#fn2" name="#fr2">[2]</a> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <br></br> <a name="#fn1" href="#fr1">1</a>. This is a footnote<br /> <a name="#fn2" href="#fr2">2</a>. This is another footnote<br /> </body> </html>
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Transforming augmented XH, Aaron Gray | Thread | [xsl] XSLT processor for Mac OS X, Aaron Gray |
| Re: [xsl] Transforming augmented XH, Aaron Gray | Date | [xsl] XSLT processor for Mac OS X, Aaron Gray |
| Month |