]> granicus.if.org Git - docbook-dsssl/commitdiff
Added a xsl:stylesheet template to add the xhtml namespace
authorBob Stayton <bobs@sagehill.net>
Thu, 3 Jul 2003 20:53:13 +0000 (20:53 +0000)
committerBob Stayton <bobs@sagehill.net>
Thu, 3 Jul 2003 20:53:13 +0000 (20:53 +0000)
as the default namespace for the stylesheet modules.

xsl/xhtml/html2xhtml.xsl

index 93b99c15d5827b31bbdd79329fd7e70385570360..4b0ca85bae92eb96936796ebb0715adce5e9ca94 100644 (file)
@@ -1,5 +1,7 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:exsl="http://exslt.org/common"
+                exclude-result-prefixes="exsl"
                 version="1.0">
 
 <xsl:output method="xml" encoding="US-ASCII"/>
   <xsl:text>&#10;</xsl:text>
 </xsl:template>
 
+<xsl:template match="xsl:stylesheet" >
+  <xsl:variable name="a">
+      <xsl:element name="dummy" namespace="http://www.w3.org/1999/xhtml"/>
+  </xsl:variable>
+    <xsl:copy>
+      <xsl:copy-of select="exsl:node-set($a)//namespace::*"/>
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates/>
+   </xsl:copy>
+</xsl:template>
+
 <!-- Make sure we override some templates and parameters appropriately for XHTML -->
 <xsl:template match="xsl:output">
   <xsl:copy>