tmpl:expand-template($input as item(), $map as element()?) as item()*
Expand the XML fragment given in $input and replace all occurrences of template parameters within text strings or attributes with the replacements given in parameter $map. Template parameters are delimited with double $: $$parameter$$. The parameter map contains a mapping of template parameter names to values: <parameters> <param name="param1" value="value1"/> </parameters>
$input | $input |
$map? | $map? |
tmpl:parse($str as xs:string, $parameters as element()?) as item()*
Helper function: recursively replace parameters in the given string.
$str | $str |
$parameters? | $parameters? |
tmpl:process($node as node(), $parameters as element()) as item()*
$node | $node |
$parameters | $parameters |