This topic describes the syntax used to declare XQuery functions. It is only necessary to declare external functions and user-defined functions.
To declare a function, use the following syntax:
declare function prefix:function-name($parameter-name as parameter-type, ...) as return-type external;For more information, see http://www.w3.org/TR/xquery/#FunctionDeclns.