Wednesday, 4 February 2015

Case-Insensitive XQuery Fails. Non-Case-Insensitive Works



I am trying to edit my XQuery to perform a case-insensitive text comparison. Previously the XQuery worked just fine (it wasn't case-insensitive though) but now with the edit it doesn't find the element text.


Have I done something wrong?


Original XQuery that works fine:



ns:attributes/ns:text/ns:name[. = 'display name']/following-sibling::ns:value


New Case-Insensitive comparison that fails:



ns:attributes/ns:text/ns:name[fn:lower-case(text()) = 'display name']/following-sibling::ns:value


Any ideas what I am doing wrong?


The XML data structure looks like this:



<attributes>
<text>
<name>display name</name>
<value>Abc Def</value>
</text>
</attributes>

No comments:

Post a Comment