I have a complex conversion routine in Java that I would like to call from my XQuery module. I want to call it directly and not using a service or http endpoint to minimize overhead.
This is for a routine that has to convert large geometric shapes from one coordinate system to another (RD to ETRS89). As these are part of a much larger XML document, possibly containing dozens of such shapes, I'd like to do this in MarkLogic when we actually process the document.
The MarkLogic documentation doesn't give me any information how to implement such a extension, only talks about xquery and javascript extensions which are not suitable.
Rewriting the routine in XQuery or Javascript is not really an option as it would be pretty complex and time consuming.