Commit cb45c7a5 authored by Wolfgang's avatar Wolfgang

Escape ":" in template function names to avoid syntax errors

parent 44276496
......@@ -524,7 +524,7 @@ declare %private function pm:expand-template($model as element(tei:model), $para
<let var="content">
<function-call name="model:template-{$spec/@ident/string()}{$pos}">
<function-call name="model:template-{translate($spec/@ident/string(), ':', '_')}{$pos}">
......@@ -652,7 +652,7 @@ declare %private function pm:declare-template-functions($odd as element(), $outp
let $pos := if ($count > 1) then $count else ()
return (
<comment>generated template function for element spec: {$spec/@ident/string()}</comment>,
<code>{``[declare %private function model:template-`{$spec/@ident/string()}``{$pos}`($config as map(*), $node as node()*, $params as map(*)) {
<code>{``[declare %private function model:template-`{translate($spec/@ident/string(), ':', '_')}``{$pos}`($config as map(*), $node as node()*, $params as map(*)) {
`{pm:template-body($tmpl, true())}`
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment