I am not sure how to use user defined extension functions in Xpath expressions using Java/JDOM . For example I have an expression of the form "$book1//line[date()]" where date is a user defined function used to look for any date formats in the book.
XPathSelector s = xpath.compile("$book1//line[date()]").load();
XdmValue val = (XdmValue)s.evaluate();
Could you please tell me how to use my own functions in the expressions.