How to call a JavaScript user extension function from Saxon-JS?

104 views Asked by At

In Java based Saxon (like 8.1.1 that I am still running after more than a decade) it was super easy to call on your own Java extension functions from within XPath, and moderately easy to build your own extension elements. The documentation had an "Extensibility" section just before "Saxon Extensions". Now in Saxon-JS, I see the "Extensibility" discussion conspicuously absent. Does this mean there is no way to easily call on your own javascript functions from within XPath run by Saxon-JS?

I already imagine a way to work around that ... but I'm weary to say it in fear of Michael Kay shutting that loophole down? I'm going to do it anyway: I think we could use his ixsl extension to drop script elements into a scratchpad area, where they would be executed and leave their result which then would be fetched back. But this seems a rather expensive round-about way of doing it.

Nothing simpler?

0

There are 0 answers