summaryrefslogtreecommitdiff
path: root/xsl/convert-xhtml-to-html.xsl
blob: 694fc631ad17085badf7f45ecd12f0e8b33d8e64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="1.0"
  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"
  exclude-result-prefixes="html xlink svg"
  >

  <xsl:output method="html" indent="no" encoding="utf-8"
    cdata-section-elements="script style"
    media-type="text/html"
    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="@*"/>
      <xsl:apply-templates />
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>