diff options
author | Shaun McCance <shaunm@gnome.org> | 2015-04-03 10:41:29 -0400 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2015-04-03 10:41:29 -0400 |
commit | e821975a42cafefef5d36953c6aa2ba40837c226 (patch) | |
tree | 6aa05142009a0e49ee6e5d2317e7915ea8c304c7 | |
parent | d05795d79b8ab3de873623e5c130fc0ee95e6d82 (diff) | |
download | yelp-xsl-e821975a42cafefef5d36953c6aa2ba40837c226.tar.gz |
html.xsl: Set HTML5 DOCTYPE for non-XHTML output
-rw-r--r-- | xslt/common/html.xsl | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/xslt/common/html.xsl b/xslt/common/html.xsl index 22c952a0..fca47771 100644 --- a/xslt/common/html.xsl +++ b/xslt/common/html.xsl @@ -229,11 +229,23 @@ use this to process output files without blocking earlier output. </xsl:otherwise> </xsl:choose> </xsl:param> - <exsl:document href="{$href}"> - <xsl:call-template name="html.page"> - <xsl:with-param name="node" select="$node"/> - </xsl:call-template> - </exsl:document> + <xsl:choose> + <xsl:when test="$html.xhtml"> + <exsl:document href="{$href}"> + <xsl:call-template name="html.page"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + </exsl:document> + </xsl:when> + <xsl:otherwise> + <exsl:document href="{$href}" method="html" + doctype-system="about:legacy-compat"> + <xsl:call-template name="html.page"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + </exsl:document> + </xsl:otherwise> + </xsl:choose> <xsl:apply-templates mode="html.output.after.mode" select="$node"/> </xsl:template> |