XSLT upper-case function()
Does anybody know how to use a upper-case() function in XSLT? I have it in a XSL mapping of a routing service. I want it as below:
<xsl:when test='(upper-case(/imp1:GENERIC4) = "YES") or (/imp1:AWARDTYPE = "227")'>
<top:ccFlag>
<xsl:text disable-output-escaping="no">Y</xsl:text>
</top:ccFlag>
I want it to be true no matter what case of YES is. It can be yes/Yes/YES/or anything.
I also tried the following,
<xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable>
<xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
<xsl:choose>
<xsl:when test='(translate(/imp1:GENERIC4,$lower,$upper) = "YES") or (/imp1:AWARDTYPE = "227")'>
<top:ccFlag>
<xsl:text disable-output-escaping="no">Y</xsl:text>
</top:ccFlag>
</xsl:when>
<xsl:otherwise>
<top:ccFlag>
<xsl:text disable-output-escaping="no">N</xsl:text>
</top:ccFlag>
</xsl:otherwise>
</xsl:choose>
But doesnt work.
Thanks for helping.