]> granicus.if.org Git - docbook-dsssl/commitdiff
Use function-available to select extension functions
authorNorman Walsh <ndw@nwalsh.com>
Sat, 6 Oct 2001 20:31:40 +0000 (20:31 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sat, 6 Oct 2001 20:31:40 +0000 (20:31 +0000)
xsl/html/table.xsl

index 13cb7c9fb1ad6ec44e301dcd50bdd5c31324c200..63b1ac34ecebeeaacd14f319dbbd9338f941cbba 100644 (file)
@@ -71,8 +71,6 @@
       </xsl:otherwise>
     </xsl:choose>
 
-    <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-
     <xsl:variable name="colgroup">
       <colgroup>
         <xsl:call-template name="generate.colgroup">
           <xsl:when test="$use.extensions != 0
                           and $tablecolumns.extension != 0">
             <xsl:choose>
-              <xsl:when test="contains($vendor, 'SAXON 6')">
+              <xsl:when test="function-available('stbl:convertLength')">
                 <xsl:value-of select="stbl:convertLength($table.width)"/>
               </xsl:when>
-              <xsl:when test="contains($vendor, 'SAXON 5')">
-                <!-- the saxon5 extension doesn't support this (yet) -->
-                <xsl:value-of select="$table.width"/>
-              </xsl:when>
-              <xsl:when test="contains($vendor, 'Apache Software Foundation')">
+              <xsl:when test="function-available('xtbl:convertLength')">
                 <xsl:value-of select="xtbl:convertLength($table.width)"/>
               </xsl:when>
               <xsl:otherwise>
                 <xsl:message terminate="yes">
-                  <xsl:text>Don't know how to do convert lengths with </xsl:text>
-                  <xsl:value-of select="$vendor"/>
+                  <xsl:text>No convertLength function available.</xsl:text>
                 </xsl:message>
               </xsl:otherwise>
             </xsl:choose>
       <xsl:when test="$use.extensions != 0
                       and $tablecolumns.extension != 0">
         <xsl:choose>
-          <xsl:when test="contains($vendor, 'SAXON 6')">
+          <xsl:when test="function-available('stbl:adjustColumnWidths')">
             <xsl:copy-of select="stbl:adjustColumnWidths($colgroup)"/>
           </xsl:when>
-          <xsl:when test="contains($vendor, 'SAXON 5')">
-            <!-- the saxon5 extension doesn't support this (yet) -->
-            <xsl:copy-of select="$colgroup"/>
-          </xsl:when>
-          <xsl:when test="contains($vendor, 'Apache Software Foundation')">
+          <xsl:when test="function-available('xtbl:adjustColumnWidths')">
             <xsl:copy-of select="xtbl:adjustColumnWidths($colgroup)"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:message terminate="yes">
-              <xsl:text>Don't know how to do adjust column widths with </xsl:text>
-              <xsl:value-of select="$vendor"/>
+              <xsl:text>No adjustColumnWidths function available.</xsl:text>
             </xsl:message>
           </xsl:otherwise>
         </xsl:choose>