]> granicus.if.org Git - docbook-dsssl/commitdiff
Make sure function-available is used around the node-set extension function
authorNorman Walsh <ndw@nwalsh.com>
Thu, 27 Jun 2002 17:54:05 +0000 (17:54 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Thu, 27 Jun 2002 17:54:05 +0000 (17:54 +0000)
xsl/html/footnote.xsl

index d7dd3aa66de93d8a5ec1514d78d57b5362ded2a9..20bc7bb6ddb384f448ffe1660cc6be66f0ac038d 100644 (file)
     <xsl:apply-templates select="."/>
   </xsl:variable>
 
-  <xsl:variable name="html-nodes" select="exsl:node-set($html)"/>
-
   <xsl:choose>
-    <xsl:when test="$html-nodes//p">
-      <xsl:apply-templates select="$html-nodes" mode="insert.html.p">
-        <xsl:with-param name="mark" select="$footnote.mark"/>
-      </xsl:apply-templates>
+    <xsl:when test="function-avialable('exsl:node-set')">
+      <xsl:variable name="html-nodes" select="exsl:node-set($html)"/>
+      <xsl:choose>
+        <xsl:when test="$html-nodes//p">
+          <xsl:apply-templates select="$html-nodes" mode="insert.html.p">
+            <xsl:with-param name="mark" select="$footnote.mark"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="$html-nodes" mode="insert.html.text">
+            <xsl:with-param name="mark" select="$footnote.mark"/>
+          </xsl:apply-templates>
+        </xsl:otherwise>
+      </xsl:choose>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates select="$html-nodes" mode="insert.html.text">
-        <xsl:with-param name="mark" select="$footnote.mark"/>
-      </xsl:apply-templates>
+      <xsl:copy-of select="$html"/>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>