[yelp-xsl] html.xsl: Set HTML5 DOCTYPE for non-XHTML output



commit e821975a42cafefef5d36953c6aa2ba40837c226
Author: Shaun McCance <shaunm gnome org>
Date:   Fri Apr 3 10:41:29 2015 -0400

    html.xsl: Set HTML5 DOCTYPE for non-XHTML output

 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 22c952a..fca4777 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>
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]