Commit 1618dd3c authored by MRodz's avatar MRodz Committed by mrodzis
Browse files

Add 3.8.2.5.1.3 invalid TOCs

parent 38bbb00a
......@@ -498,6 +498,10 @@ declare function fontaneSimple:transform($nodes as node()*) as node()* {
fontaneSimple:transform($node/node())
}
else if($node/@type = "toc"
and matches($node/@subtype, "ungültig")) then
()
else if($node/@type = "toc") then
element tei:list {
$node/(@type, @subtype),
......
......@@ -239,6 +239,9 @@ declare
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""toc"" subtype=""Fontane""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1.5cm"" type=""item"" xml:id=""C07_1r_q"" next=""#C07_1r_13""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#xpath(//surface[@n='13r'])"">Groſsbeeren</ref></line><line xmlns=""http://www.tei-c.org/ns/1.0"" type=""item""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#xpath(//surface[@n='25r'])"">Blankenfelde</ref></line></zone>")
%test:assertEquals("<list xmlns=""http://www.tei-c.org/ns/1.0"" type=""toc"" subtype=""Fontane""><item xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C07_1r_q"" next=""#C07_1r_13""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#xpath(//surface[@n='13r'])"">Grossbeeren</ref></item><item xmlns=""http://www.tei-c.org/ns/1.0""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#xpath(//surface[@n='25r'])"">Blankenfelde</ref></item></list>")
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""toc"" subtype=""Fontane_ungültig""> <line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1.6cm"">Enthält:</line><zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""item""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:3.0cm""><del>Katzbach</del></line></zone></zone>")
%test:assertEmpty
function teisimple-test:analyze-lists($node as element(*)) {
fontaneSimple:transform($node)
......
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