Commit 90bf5aa4 authored by Wolfgang's avatar Wolfgang

Escape ':' in generated class names

parent 056751bc
......@@ -68,9 +68,9 @@ declare function css:generate-css($root as document-node(), $output as xs:string
$spec/@ident/string()
let $class :=
if ($rend/@scope) then
$className || ":" || $rend/@scope
translate($className, ":", "_") || ":" || $rend/@scope
else
$className
translate($className, ":", "_")
return
"
.tei-" || $class || " { " ||
normalize-space($rend) || " }"
......
......@@ -479,6 +479,7 @@ declare %private function pm:modelSequence($ident as xs:string, $seq as element(
declare %private function pm:get-class($ident as xs:string, $model as element(tei:model)) as xs:string+ {
let $spec := $model/ancestor::tei:elementSpec[1]
let $ident := translate($ident, ":", "_")
let $count := count($spec//tei:model)
let $genClass := "tei-" || $ident || (if ($count > 1) then count($spec//tei:model[. << $model]) + 1 else ())
return
......
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