page1
import module namespace
ex = “http://example.com/MyMath” at “myMath.xq”;
declare function local:myFunction($arg as element(x:p)+) as xs:string
{
“The function body”
};
“This is the query body”,
ex:pi
module namespace ex = “http://example.com/MyMath”;
declare variable $tt:pi as xs:decimal := 3.14;
myQuery.xq
myMath.xq
query prolog
query body
query prolog