]> granicus.if.org Git - docbook-dsssl/commitdiff
need a local version of $exsl.node.set.available variable because
authorBob Stayton <bobs@sagehill.net>
Fri, 27 Nov 2009 06:56:09 +0000 (06:56 +0000)
committerBob Stayton <bobs@sagehill.net>
Fri, 27 Nov 2009 06:56:09 +0000 (06:56 +0000)
this module imported many places.

xsl/common/stripns.xsl

index 7a5afdbcae7e6cb3f329076f8379d2e46aaaae4d..e4cbf5674543ebf5c18aef2eda1273ade756baa0 100644 (file)
 </xsl:template>
 
 <xsl:template match="/" priority="-1">
+  <!-- need a local version of this variable because this module imported many places-->
+  <xsl:variable name="local.exsl.node.set.available">
+    <xsl:choose>
+      <xsl:when exsl:foo="" xmlns:exsl="http://exslt.org/common"
+        test="function-available('exsl:node-set') or
+                         contains(system-property('xsl:vendor'),
+                           'Apache Software Foundation')">1</xsl:when>
+      <xsl:otherwise>0</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
   <xsl:choose>
-    <xsl:when test="(*/self::ng:* or */self::db:*)">
+    <xsl:when test="$local.exsl.node.set.available != 0
+                    and (*/self::ng:* or */self::db:*)">
       <xsl:message>Stripping namespace from DocBook 5 document.</xsl:message>
       <xsl:variable name="nons">
         <xsl:apply-templates mode="stripNS"/>