|
-
July 20th, 2009, 01:12 PM
#1
[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'
-
July 21st, 2009, 02:00 AM
#2
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.
Last edited by Alsvha; January 28th, 2011 at 01:16 AM.
-
July 21st, 2009, 09:26 AM
#3
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|