Hardy Merrill wrote:
> I have an XML document that has this structure:
>
> <applications>
> <application>
> <app_name>ABC</app_name>
> </application>
> <application>
> <app_name>DEF</app_name>
> </application>
> </applications>
>
> I'm wondering if there's a way using XPath and some pattern to find
> case *insensitive* matches for a particular app_name??
>
> For example, if I have app_name 'ABC' and I want to determine if there
> are any existing nodes that have app_names like 'ABC', or 'Abc', or
> 'abc', or 'aBC', etc. Is there some version of 'selectSingleNode' with
> a pattern that can do that? AFAICT there aren't any case
> (in)sensitivity functions in XSL or XPath.
>
Use translate(element, 'ABCDEDFHIJKLMNOPQRESTUFWXYZ',
'abcdefghijklmnopqrestuvwxyz')
e.g.
/applications/application['abc' = translate(app_name, 'ABC', 'abc')]
--
Martin Honnen
http://JavaScript.FAQTs.com/