Nevermind about the XQL part, the function is created as part of the -create scripts. Sorry about that.
-Roberto