Commit c0c6ae1d authored by MRodz's avatar MRodz Committed by mrodzis
Browse files

Change attribute in order to be compliant with TEI simplePrint

parent 330b26f4
......@@ -188,7 +188,7 @@ declare
%test:assertEquals("<head xmlns=""http://www.tei-c.org/ns/1.0"" type=""default"" subtype=""chapter"">4. <rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""plc:Luetzen"">Lützen</rs><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""psn:Gustav_Adolf"">Gustav Adolf</rs>. <rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""plc:Weissenfels"">Weißenfels</rs>.</head>")
%test:args("<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""heading""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""font-size:xx-large; font-weight:bold""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""letter-spacing:0.2cm""><seg xmlns=""http://www.tei-c.org/ns/1.0""><date xmlns=""http://www.tei-c.org/ns/1.0"" type=""synchronous"" when-iso=""1873""><hi xmlns=""http://www.tei-c.org/ns/1.0"">1<seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline"" rend=""underline-style:wavy"">873</seg></hi></date></seg>.</seg></seg></seg>")
%test:assertEquals("<head xmlns=""http://www.tei-c.org/ns/1.0"" type=""xx-large""><seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""font-size:xx-large; font-weight:bold""><seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""letter-spacing:0.2cm""><date xmlns=""http://www.tei-c.org/ns/1.0"" type=""synchronous"" when-iso=""1873""><hi xmlns=""http://www.tei-c.org/ns/1.0"">1873</hi></date>.</seg></seg></head>")
%test:assertEquals("<head xmlns=""http://www.tei-c.org/ns/1.0"" type=""xx-large""><seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""font-size:xx-large; font-weight:bold""><seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""letter-spacing:0.2cm""><date xmlns=""http://www.tei-c.org/ns/1.0"" type=""synchronous"" when=""1873""><hi xmlns=""http://www.tei-c.org/ns/1.0"">1873</hi></date>.</seg></seg></head>")
function teisimple-test:analyze-headings($node as element(*)) {
fontane-simple:transform($node)
};
......
......@@ -462,7 +462,11 @@ declare function fontane-simple:transform($nodes as node()*) as node()* {
local:keep-element($node)
case element(tei:date) return
local:keep-element($node)
element {QName("http://www.tei-c.org/ns/1.0", $node/name())}{
attribute when {$node/@when-iso},
$node/(@* except @when-iso),
fontane-simple:transform($node/node())
}
case element(tei:ptr) return
let $target-id := substring-after($node/@target, "#")
......
This diff is collapsed.
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