<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
<xsl:strip-space elements="doc chapter section"/>
<xsl:output method="xml" indent="yes" encoding="iso-8859-1"
doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"/>
<xsl:template match="doc">
-<html>
- <xsl:attribute name='xmlns'>http://www.w3.org/1999/xhtml</xsl:attribute>
+<xsl:element name="html" namespace="http://www.w3.org/1999/xhtml">
<head>
+ <meta charset="utf-8"/>
<link>
<xsl:attribute name="rel">stylesheet</xsl:attribute>
<xsl:attribute name="type">text/css</xsl:attribute>
<xsl:attribute name="href"><xsl:value-of select="@style"/></xsl:attribute>
</link>
<title>
+ <xsl:if test='not(*/titlepage/title)'>
+ -
+ </xsl:if>
<xsl:value-of select="*/titlepage/title"/>
</title>
<style type="text/css">
}
</style>
</head>
+
<body>
<xsl:apply-templates/>
<hr/>
<xsl:apply-templates select="//footnote" mode="footnotes"/>
</body>
-</html>
+</xsl:element>
</xsl:template>
<xsl:template match="titlepage">
</xsl:template>
<xsl:template match="math">
-<math>
-<xsl:attribute name="xmlns">http://www.w3.org/1998/Math/MathML</xsl:attribute>
-<xsl:copy-of select='./*'/>
-</math>
+<xsl:element name="math" namespace="http://www.w3.org/1998/Math/MathML">
+ <xsl:copy-of select='./*'/>
+</xsl:element>
</xsl:template>
<xsl:template match="svg">
<xsl:copy-of select="document(@src)"/>
</xsl:if>
<xsl:if test='not(@src)'>
- <svg>
- <xsl:attribute name="xmlns">http://www.w3.org/2000/svg</xsl:attribute>
- <xsl:copy-of select='./*'/>
- </svg>
+ <xsl:element name="svg" namespace="http://www.w3.org/2000/svg">
+ <xsl:copy-of select='./*'/>
+ </xsl:element>
</xsl:if>
</xsl:template>