XQuery Function Documentation
ex:addresses #2
ex:addresses ($node as node(), $model as map(*)) as map(*)- Parameters:
$node $model - Returns:
- map(*)
ex:hello #2
ex:hello ($node as node()*, $model as map(*)) as element()Simple templating function. A templating function needs to take two parameters at least. It may return any sequence, which will be inserted into the output instead of $node.
- Parameters:
$node the HTML node which contained the class attribute which triggered this call. $model an arbitrary sequence of items. Use this to pass required information between tempate functions. - Returns:
- element()
ex:hello-world #4
ex:hello-world ($node as node(), $model as map(*), $language as xs:string, $user as xs:string) as xs:string- Parameters:
$node $model $language $user - Returns:
- xs:string
ex:multiply #4
ex:multiply ($node as node()*, $model as map(*), $n1 as xs:int, $n2 as xs:int) as item()A templating function taking two additional parameters. The templating framework inspects the function signature and tries to fill in additional parameters automatically. The value to use is determined as follows: <ol> <li>if there's a (non-empty) request parameter with the same name as the variable, use it</li> <li>else if there's a (non-empty) session attribute with the same name as the variable, use it</li> <li>test if there's an annotation %templates:default(name, value) whose first parameter matches the name of the parameter variable. Use the second parameter as value if it does.</li> </ol>
- Parameters:
$node $model $n1 $n2 - Returns:
- item()*
ex:print-city #2
ex:print-city ($node as node(), $model as map(*)) as item()- Parameters:
$node $model - Returns:
- item()*
ex:print-name #2
ex:print-name ($node as node(), $model as map(*)) as item()- Parameters:
$node $model - Returns:
- item()*
ex:print-street #2
ex:print-street ($node as node(), $model as map(*)) as item()- Parameters:
$node $model - Returns:
- item()*