]> granicus.if.org Git - docbook-dsssl/commitdiff
Don't strip namespace nodes from xsl:stylesheet instances when
authorMichael Smith <xmldoc@users.sourceforge.net>
Thu, 12 Jul 2007 04:04:57 +0000 (04:04 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Thu, 12 Jul 2007 04:04:57 +0000 (04:04 +0000)
generating doc files.

xsl/tools/xsl/build/fix-params-ns.xsl

index 459e7395169e12e7d99604e002207003a5a41cf0..5c72313e1bad054a3f01307097cb5981e8009838 100644 (file)
@@ -5,40 +5,34 @@
   exclude-result-prefixes="fo"
 >
   <xsl:import href="./identity.xsl"/>
-
   <xsl:output method="xml"
   encoding="ASCII"
   saxon:character-representation="decimal"
   indent="no"/>
-
-  <!-- copy all xsl:* elements but strip the extra namespaces nodes -->
-  <xsl:template match="*[namespace-uri() = 'http://www.w3.org/1999/XSL/Transform']">
+  <xsl:template match="*[not(local-name() = 'stylesheet')][namespace-uri() = 'http://www.w3.org/1999/XSL/Transform']">
+    <!-- * copy all xsl:* elements but strip the extra namespaces nodes -->
     <xsl:element name="{name()}">
       <xsl:copy-of select="@*[not(local-name() = 'exclude-result-prefixes')]"/>
       <xsl:apply-templates/>
     </xsl:element>
   </xsl:template>
-
-  <!-- copy all fo:* elements but strip the extra namespace nodes -->
-  <xsl:template match="*[namespace-uri() = 'http://www.w3.org/1999/XSL/Format']">
+  <xsl:template match="*[not(local-name() = 'stylesheet')][namespace-uri() = 'http://www.w3.org/1999/XSL/Format']">
+    <!-- * copy all fo:* elements but strip the extra namespace nodes -->
     <xsl:element name="{name()}">
       <xsl:copy-of select="@*"/>
       <xsl:apply-templates/>
     </xsl:element>
   </xsl:template>
-
   <xsl:template match="*[local-name() = 'substitution']">
     <xsl:element name="substitution">
       <xsl:copy-of select="@*"/>
       <xsl:apply-templates/>
     </xsl:element>
   </xsl:template>
-
   <xsl:template match="*[local-name() = 'code']">
     <xsl:element name="code">
       <xsl:copy-of select="@*"/>
       <xsl:apply-templates/>
     </xsl:element>
   </xsl:template>
-
 </xsl:stylesheet>