module namespace my =
"http://www.example.com/my-module";
declare variable $my:variable := { "foo" : "bar" };
declare variable $my:n := 42;
declare function my:function($i as integer)
{
$i * $i
};
import module namespace other =
"http://www.example.com/my-module";
other:function($other:n)
1764
import module namespace math =
"http://www.w3.org/2005/xpath-functions/math";
math:pi(),
math:pow(2, 30),
math:exp(1),
math:exp10(2),
math:log(1),
math:log10(2),
math:sqrt(4),
math:sin(math:pi())
3.1415926535897931 1.073741824E9 2.7182818284590451 100 0 0.3010299956639812 2 1.2246467991473532E-16