]> granicus.if.org Git - docbook-dsssl/commitdiff
Add command to generate docbook-no-doctype.xsl to overcome Saxon doctype bug.
authorBob Stayton <bobs@sagehill.net>
Mon, 29 Oct 2012 20:30:53 +0000 (20:30 +0000)
committerBob Stayton <bobs@sagehill.net>
Mon, 29 Oct 2012 20:30:53 +0000 (20:30 +0000)
xsl/xhtml/Makefile
xsl/xhtml/html2xhtml.xsl

index 98cff4e3e777be15f001aa9bbd3956f5b5124466..702390ec98dc763c8729b5b1a51b9a67cb66e8ec 100644 (file)
@@ -25,6 +25,10 @@ xsl-files: remove-old add-new
         fi; \
        done
 
+       # Also Generate special docbook-no-doctype.xsl file
+       $(XSLT) ../html/docbook.xsl html2xhtml.xsl docbook-no-doctype.xsl \
+               include.output.doctype=0 ;  \
+
 profile-docbook.xsl: docbook.xsl ../profiling/xsl2profile.xsl
        $(XSLT) $< ../profiling/xsl2profile.xsl $@
 
index 6dd23e1eabb087b12d9f5360b75faacbf2c468bf..52ee16a58e9aca5be62aca0dbcfcc1198cbde7b0 100644 (file)
@@ -11,6 +11,7 @@
   encoding="ASCII"
   saxon:character-representation="decimal"
   />
+<xsl:param name="include.output.doctype" select="1"/>
 
 <xsl:namespace-alias stylesheet-prefix="xslo" result-prefix="xsl"/>
 
     <xsl:copy-of select="@*"/>
     <xsl:attribute name="method">xml</xsl:attribute>
     <xsl:attribute name="encoding">UTF-8</xsl:attribute>
-    <xsl:attribute name="doctype-public">-//W3C//DTD XHTML 1.0 Transitional//EN</xsl:attribute>
-    <xsl:attribute name="doctype-system">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</xsl:attribute>
+    <xsl:if test="$include.output.doctype != 0">
+      <xsl:attribute name="doctype-public">-//W3C//DTD XHTML 1.0 Transitional//EN</xsl:attribute>
+      <xsl:attribute name="doctype-system">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</xsl:attribute>
+    </xsl:if>
   </xsl:copy>
 </xsl:template>