Case sensitivity check comparing a list of objects with an input string.

I have a string x and a entity A(attribute a). Need to check if the string matches with any object of the database A by x=A/a. The condition is 1st we need to set x and a in the same case and then compare to remove any case sensitivity issues. But when I try applying an xpath for the retrieval of A as [toUpper(x)=toUpper(a)] i am not able to use toUpper function. How can I do it without using a loop or a list operation ?
2 answers

The xpath function contains() is case-insensitive, so that may be a way out.

I hope this helps.


Hello Shivani,

Using the strategy that Michiel came up with, you can have

[starts-with(Attribute, $Variable) and length(Attribute) = length($Variable)]

to make your comparison case insensitive. If the attribute starts with the same text (case-insensitive) and has the same length, it must be the same (case-insensitive).