[RESOLVED] Case insensitive string comparison with XSLT
Right now I'm matching a case insensitive string like this. I'm wondering if there is an easier way to ignore case when comparing strings in an XSL transform file. I've looked everywhere this is the only way I've seen to do it. Seems there should be a more elegant solution.
Code:
translate(@type,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz') = 'combobox2'
Re: Case insensitive string comparison with XSLT
Depending on which XSL engine you use, then you can perhaps utilize scripts in it.
For example if using .NET you can do something like this: http://www.svelmoe.dk/post/Using-scripts-in-XSLT
I suspect similar exists for Java.
It is not the worlds most elegant solution to the problem, but using scripts in XSLT have solved many of my problems much more elegant and faster then otherwise.
Re: Case insensitive string comparison with XSLT
Perfect, just what i was looking for, i love it thanks. Using .NET so wont be any problems using this example.