]> granicus.if.org Git - docbook-dsssl/commitdiff
Preserve element namespace for non-DocBook elements. This is necessary to for handlin...
authorJirka Kosek <jirka@kosek.cz>
Wed, 28 Nov 2007 16:12:01 +0000 (16:12 +0000)
committerJirka Kosek <jirka@kosek.cz>
Wed, 28 Nov 2007 16:12:01 +0000 (16:12 +0000)
docbook/relaxng/tools/include.xsl

index c5198a78672986e761ba80f526d20f4cb9969b62..ca8fcad039b738596d62f1e476c06cc7b0552a35 100644 (file)
@@ -67,6 +67,9 @@
   <xsl:template match="*" mode="include">
     <xsl:copy>
       <xsl:copy-of select="@*"/>
+      <xsl:if test="self::rng:element">
+        <xsl:copy-of select="ancestor::*[@ns][1]/@ns[. != 'http://docbook.org/ns/docbook']"/>
+      </xsl:if>      
       <xsl:apply-templates mode="include"/>
     </xsl:copy>
   </xsl:template>