I have read that in version 4.2 is possible to use query functions (Xtenstions) in XQuery, but I can
For it to work as you would like I would expect you to need to code the XTension to be able to handle/return XML as in your example.
I wrote a trivial XTension Query function called Echo that echoes back its string input. Now I am able to use the Echo function within my XQuery. Not very exciting but it is a start.
Echo.zip (2.04 KB)