tags:

views:

176

answers:

2

I have to compare adminStatus value whether it is 'Down' the input may be in any case,how to igonre the case using only xslt 1.0

<xsl:if test="$adminStatus='Down'">
  do something
</xsl:if>
+1  A: 

Use the translate() function on both $adminStatus and target value.

http://stackoverflow.com/questions/586231/how-can-i-convert-a-string-to-upper-or-lower-case-with-xslt

lexicore
+1  A: 

You use the translate function to convert all upper case to lower case.

<xsl:if test="translate($adminStatus, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') ='down'">
  do something
</xsl:if>
Oded