- Syntaxe :
declare function prefix:function_name($parameter AS datatype)
as returnDatatype
{
(: indtructions ... :)
}
- Exemple :
declare function local:prixTTC($prixHT as xs:decimal, $taux as xs:decimal)
as xs:decimal
{
let $prixTTC := $prixHT * (1+$taux)
return $prixTTC
};
- Usage :
<h1>{local:prixTTC(20, .196)}</h1>