summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2016-07-04 19:36:11 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2016-07-04 19:36:11 +0200
commit7e27e66b7e01cec8f0adc8aaaa0f569b283c1b56 (patch)
tree57d3b9e1161fdc5359802699410a97c5196078fb
parent0fa513473ce7eb0ac309db3652c7f05f99519cb1 (diff)
downloadmutti-web-7e27e66b7e01cec8f0adc8aaaa0f569b283c1b56.tar.gz
mutti-web-7e27e66b7e01cec8f0adc8aaaa0f569b283c1b56.tar.bz2
mutti-web-7e27e66b7e01cec8f0adc8aaaa0f569b283c1b56.zip
html output: Remove namespaces from root
-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="@*"/>