summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--xsl/convert-xhtml-to-html.xsl12
2 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 159a975..a20203c 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ xsltproc=xsltproc --stringparam stylesheet style.min.css --stringparam version $
svg2png=rsvg-convert -f png
fix_doctype=sed 's/ SYSTEM "about:legacy-compat"//'
-to_html=$(fix_doctype) | xsltproc xsl/convert-xhtml-to-html.xsl - | $(fix_doctype) | sed -e 's/<br><\/br>/<br>/g' -e 's/<\/img>//g' -e 's/<\/link>//g' -e 's/<\/meta>//g'
+to_html=$(fix_doctype) | xsltproc xsl/convert-xhtml-to-html.xsl - | $(fix_doctype) | sed -e 's/<br><\/br>/<br>/g' -e 's/<\/img>//g' -e 's/<\/link>//g' -e 's/<\/meta>//g' -e 's/<html xmlns="http:\/\/www.w3.org\/1999\/xhtml"/<html/'
pages=$(shell xsltproc xsl/main_filenames.xsl main.xml)
diff --git a/xsl/convert-xhtml-to-html.xsl b/xsl/convert-xhtml-to-html.xsl
index 54a651b..67f6363 100644
--- a/xsl/convert-xhtml-to-html.xsl
+++ b/xsl/convert-xhtml-to-html.xsl
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
- exclude-result-prefixes="html xlink svg"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:svg="http://www.w3.org/2000/svg">
+ xmlns:svg="http://www.w3.org/2000/svg"
+ exclude-result-prefixes="html xlink svg"
+ >
<xsl:output method="html" indent="yes" encoding="utf-8"
cdata-section-elements="script style"
@@ -13,6 +14,13 @@
doctype-system="about:legacy-compat"
/>
+ <xsl:template match="html:html">
+ <html>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates />
+ </html>
+ </xsl:template>
+
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>