Starting with firmware v18.104.22.168 DataPower does provide an XQuery processor.
I posted on this before, and that you can use other XQuery processors to develop off box (Saxon, Zorba, ...).
Yesterday I stumbled over XQuery in the browser project.
And then I remembered that Saxon-CE XSLT 2.0 processor for the browser was done motivated by the GWT (Google Web Toolkit) compilation of XQib before.
I did setup a small sample page with a nice "uʍopǝpᴉsd∩ tool" here:
You can go to that page and do "View Page Source" to see how it works.
For convenience find the relevant part here, it consists of
- include the Query processor (mxqueryjs/mxqueryjs.nocache.js)
- variable declarations for the unicode character mapping
- local:upsideDown() XQuery function
- local:listener2() event listener
- addition of event listener to "myButton"
So using xqib allows you to develop XQuery without installing a processor.
Just open and save the page as "Webpage complete" and start to work locally ...
(working with event listeners requires a local web server, the first XQuery output just works without)