]> granicus.if.org Git - docbook-dsssl/commitdiff
Made file extension selection case insensitive.
authorBob Stayton <bobs@sagehill.net>
Wed, 11 Aug 2004 17:15:30 +0000 (17:15 +0000)
committerBob Stayton <bobs@sagehill.net>
Wed, 11 Aug 2004 17:15:30 +0000 (17:15 +0000)
xsl/html/graphics.xsl

index c7738a23284bc4debac7899c71401d42196bd581..de702d3b8683298b91877770f604fcf9521a43cc 100644 (file)
 
 <xsl:template name="is.graphic.extension">
   <xsl:param name="ext"></xsl:param>
-  <xsl:if test="$ext = 'svg'
-                or $ext = 'png'
-                or $ext = 'jpeg'
-                or $ext = 'jpg'
-                or $ext = 'avi'
-                or $ext = 'mpg'
-                or $ext = 'mpeg'
-                or $ext = 'qt'
-                or $ext = 'gif'
-                or $ext = 'bmp'">1</xsl:if>
+  <xsl:variable name="lcext" select="translate($ext,
+                                       'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+                                       'abcdefghijklmnopqrstuvwxyz')"/>
+  <xsl:if test="$lcext = 'svg'
+             or $lcext = 'png'
+             or $lcext = 'jpeg'
+             or $lcext = 'jpg'
+             or $lcext = 'avi'
+             or $lcext = 'mpg'
+             or $lcext = 'mpeg'
+             or $lcext = 'qt'
+             or $lcext = 'gif'
+             or $lcext = 'bmp'">1</xsl:if>
 </xsl:template>
 
 <!-- ==================================================================== -->