Commit ecb276d1 authored by mrodzis's avatar mrodzis 🌿
Browse files

Correct test (cf. 557569ec) and update captions

parent 63b6c78e
......@@ -456,8 +456,6 @@ declare function fontaneSimple:transform($nodes as node()*, $uri as xs:string) a
or $node/parent::tei:zone/@type = "printed_illustration") then
element {QName("http://www.tei-c.org/ns/1.0", "seg")} {
attribute type {"caption"},
attribute rendition {"margin-left:" || $node/@ulx || "cm; "
|| "margin-top:" || $node/@uly || "cm"},
fontaneSimple:transform($node/node(), $uri)
}
......
......@@ -111,7 +111,7 @@ declare
declare
%test:name("Sketches")
%test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""illustration"" ulx=""0.6"" uly=""0.0"" lry=""10.9"" lrx=""9.6""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""illustration""/><figure xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""a2""/><zone xmlns=""http://www.tei-c.org/ns/1.0"" ulx=""6.1"" uly=""0.8""><line xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Dach</line></zone></zone></line>")
%test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""sketch""><figure xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""a2""/><seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""caption"" rendition=""margin-left:6.1cm; margin-top:0.8cm""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""handshift"" subtype=""#Fontane"" rend=""script() medium()""/>Dach</seg></ab>")
%test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""sketch""><figure xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""a2""/><seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""caption""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""handshift"" subtype=""#Fontane"" rend=""script() medium()""/>Dach</seg></ab>")
%test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""illustration"" ulx=""1.4"" uly=""5.6"" lrx=""8.3"" lry=""15.5""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""illustration""/><figure xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""a2""><figDesc xmlns=""http://www.tei-c.org/ns/1.0""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""http://vocab.getty.edu/aat/300034065"">Gebäudeaufriss</ref>; Jagdschloss Stern.</figDesc></figure></zone></line>")
%test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""sketch""><figure xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""a2""><figDesc xmlns=""http://www.tei-c.org/ns/1.0""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""http://vocab.getty.edu/aat/300034065"">Gebäudeaufriss</ref>; Jagdschloss Stern.</figDesc></figure></ab>")
......@@ -1451,7 +1451,7 @@ declare
declare
%test:name("3.7.13 sketches as entities")
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""illustration"" ulx=""1.3"" uly=""7.6"" lrx=""5.3"" lry=""12.8""><milestone unit=""illustration""/><zone rotate=""128"" ulx=""4.2"" uly=""11.6""><line>Peristylium</line></zone><zone rotate=""158"" ulx=""4.4"" uly=""9.2""><line>Atrium</line></zone><zone rotate=""177"" ulx=""5.7"" uly=""7.5""><line>Alae</line></zone></zone>")
%test:assertEmpty
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""sketch""><seg type=""caption""><milestone unit=""line""/>Peristylium</seg><seg type=""caption""><milestone unit=""line""/>Atrium</seg><seg type=""caption""><milestone unit=""line""/>Alae</seg></ab>")
function teisimple-test:sketches-with-rotation($node as element(*)) {
fontaneSimple:transform($node, "16b00")
......
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