I'm using the uComponents-function GetNodesByXPath and I want to search in all nodes for a property with a value that matches my variable. My variable is always lowercase, but the propertyvalue isn't. How can I compare it case-insensitive.
I thought that something like this would work
For Each Node In uComponents.Core.uQuery.GetNodesByXPath("//* [@isDoc and Exslt.ExsltStrings:lower-case(merk)='" + merk + "']")
But this gives the following exception
Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.
I don't know how I can add a namespacemanager/xslcontext in this function. I hope someone can help me,
uComponents GetNodesByXPath lowercase comparison
Hi guys,
I'm using the uComponents-function GetNodesByXPath and I want to search in all nodes for a property with a value that matches my variable. My variable is always lowercase, but the propertyvalue isn't. How can I compare it case-insensitive.
I thought that something like this would work
But this gives the following exception
Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.
I don't know how I can add a namespacemanager/xslcontext in this function. I hope someone can help me,
Jeffrey
Hi Jeffrey,
Unfortunatelly you can't add/change the XsltContext to use custom namespaces/extension-methods ... (if there is a way to do it, I'd love to know!)
The alternate option is to use native XPath functions - in your case the "translate()" function.
Cheers, Lee.
Hi Lee,
This works for now.
Thanks!
Jeffrey
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.