Hi,
I have problems getting an XPath expression to work which uses a custom function I have written. The expression looks like this:
@*[re:match(., '{.*}')]
and as soon as I create the XPath (I've tried DocumentFactory.createXPath(), DefaultXPath(), org.jaxen.dom4j.XPath()) I get a InvalidXPathException with the message: "Invalid XPath expression: @*[re:match(., '{.*}')] Unexpected '('".
I know that there is a FunctionContext and a NamespeceContext in Jaxen, but to set those I thought I first needed the XPath object...
I've also tried using DocumentFactory.setXPathNamespaceURIs() but without avail.
Without using the "re" namespace there isn't any problem, so the problem seems to be that the XPath constructor tries to resolve it but can't because it isn't registered yet.
The "re" namespace is not declared in the document I process, it just provides a function I want to use internally in the application when processing the document.
Can somebody help out here?
TIA,
--
knut