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

index 2f871cc59cf9112f61719a43fdbeca97ae690383..6bec5c29c2b7a7b82da5842469ab1037f6bcf586 100644 (file)
@@ -21,8 +21,9 @@
 
 <xsl:template match="programlisting|screen|synopsis">
   <xsl:param name="suppress-numbers" select="'0'"/>
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-  <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+  <xsl:variable name="id">
+    <xsl:call-template name="object.id"/>
+  </xsl:variable>
 
   <xsl:call-template name="anchor"/>
 
@@ -67,7 +68,6 @@
 
 <xsl:template match="literallayout">
   <xsl:param name="suppress-numbers" select="'0'"/>
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
 
   <xsl:variable name="rtf">
     <xsl:apply-templates/>
 
 <xsl:template match="address">
   <xsl:param name="suppress-numbers" select="'0'"/>
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
 
   <xsl:variable name="rtf">
     <xsl:apply-templates/>
     </xsl:choose>
   </xsl:variable>
 
-  <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
-
   <xsl:choose>
-    <xsl:when test="contains($vendor, 'SAXON ')">
+    <xsl:when test="function-available('sverb:numberLines')">
       <xsl:copy-of select="sverb:numberLines($rtf)"/>
     </xsl:when>
-    <xsl:when test="contains($vendor, 'Apache Software Foundation')">
+    <xsl:when test="function-available('xverb:numberLines')">
       <xsl:copy-of select="xverb:numberLines($rtf)"/>
     </xsl:when>
     <xsl:otherwise>
       <xsl:message terminate="yes">
-        <xsl:text>Don't know how to do line numbering with </xsl:text>
-        <xsl:value-of select="$vendor"/>
+        <xsl:text>No numberLines function available.</xsl:text>
       </xsl:message>
     </xsl:otherwise>
   </xsl:choose>