Best way of adding external funcs to XPath S9
Added by Anonymous about 16 years ago
Legacy ID: #5660786 Legacy Poster: David Lee (daldei)
What is the recommend way of adding an external (extension) function to XPath. I read the page http://www.saxonica.com/documentation/extensibility/functions.html And I have that working in Xquery, but it doesnt describe how to do this in pure XPath. I'm using the S9API XPath. Can I use the declareNamespace() from XPathCompiler ? Is that the correct way of doing it ? Or is there some other way of registering extension functions. My fallback position is to use XQuery but I'd rather not in this case expose the ability for users to enter in xquery expressions where XPath expressions are required. Thanks for any suggestions.
Replies (1)
RE: Best way of adding external funcs to XPath S9 - Added by Anonymous about 16 years ago
Legacy ID: #5660863 Legacy Poster: Michael Kay (mhkay)
Extension functions in XPath work the same way as in XQuery. The only difference is that you can't declare the namespace from within the query prolog, you have to do it externally from the API using declareNamespace().
Please register to reply