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

Update genealogy and add 3.21.10.2.2. horizontal lines

parent abf6d9a0
......@@ -336,7 +336,64 @@ declare
declare
%test:name("Genealogy")
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" points=""2.8,6.7 3.0,6.6 4.7,4.8""><figure xmlns=""http://www.tei-c.org/ns/1.0""><figDesc xmlns=""http://www.tei-c.org/ns/1.0""><ref target=""http://vocab.getty.edu/aat/300027016"">Stammbaumverbindungslinie</ref></figDesc></figure></zone>")
%test:assertEquals("<seg xmlns=""http://www.tei-c.org/ns/1.0"" points=""2.8,6.7 3.0,6.6 4.7,4.8""><figure xmlns=""http://www.tei-c.org/ns/1.0""><figDesc xmlns=""http://www.tei-c.org/ns/1.0""><ref target=""http://vocab.getty.edu/aat/300027016"">Stammbaumverbindungslinie</ref></figDesc></figure></seg>")
(: genealogy lines probably shouldn't be displayed, but I still have to check that.
: in case they should be serialized, I leave the code :)
(: %test:assertEquals("<seg xmlns=""http://www.tei-c.org/ns/1.0"" points=""2.8,6.7 3.0,6.6 4.7,4.8""><figure xmlns=""http://www.tei-c.org/ns/1.0""><figDesc xmlns=""http://www.tei-c.org/ns/1.0""><ref target=""http://vocab.getty.edu/aat/300027016"">Stammbaumverbindungslinie</ref></figDesc></figure></seg>"):)
%test:assertEmpty
function teisimple-test:analyze-genealogy($node as element(*)) {
fontane-simple:transform($node)
};
(: 3.21.10.2.2. HORIZONTAL BOUNDARY MARKS :)
declare
%test:name("Horizontal Boundary Marks")
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" points=""2.8,6.7 3.0,6.6 4.7,4.8""><figure xmlns=""http://www.tei-c.org/ns/1.0""><figDesc xmlns=""http://www.tei-c.org/ns/1.0""><ref target=""http://vocab.getty.edu/aat/300027016"">horizontale einfache Abgrenzungslinie</ref></figDesc></figure></zone>")
%test:assertEmpty
(: end lines :)
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" points=""2.8,6.7 3.0,6.6 4.7,4.8""><figure xmlns=""http://www.tei-c.org/ns/1.0""><figDesc xmlns=""http://www.tei-c.org/ns/1.0""><ref target=""http://vocab.getty.edu/aat/300027016"">horizontale einfache Schlusslinie</ref></figDesc></figure></zone>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""long-end-line""/>")
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" ulx=""4.0"" uly=""6.7"" lrx=""8.0"" lry=""6.7""><figure xmlns=""http://www.tei-c.org/ns/1.0""><figDesc xmlns=""http://www.tei-c.org/ns/1.0""><ref target=""http://vocab.getty.edu/aat/300027016"">Schlusslinie; horizontale Halbschleife von links oben nach rechts</ref></figDesc></figure></zone>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""long-end-line""/>")
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" ulx=""4.0"" uly=""6.7"" lrx=""8.0"" lry=""6.7""><figure xmlns=""http://www.tei-c.org/ns/1.0""><figDesc xmlns=""http://www.tei-c.org/ns/1.0""><ref target=""http://vocab.getty.edu/aat/300027016"">horizontale einfache Schlusslinie (gewellt)</ref></figDesc></figure></zone>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""long-end-line-wavy""/>")
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" style=""border-bottom-style:solid"" rend=""border-bottom-style:brace""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:2.1cm"">Weiß und Gold</line></zone>")
%test:assertEquals("Weiß und Gold","<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""bottom-brace""/>")
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" ulx=""4.0"" uly=""6.7"" lrx=""8.0"" lry=""6.7""><figure xmlns=""http://www.tei-c.org/ns/1.0""><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/300200009"">Schlusslinien; horizontale Schleife von links oben nach rechts unten</ref></figDesc></figure></zone>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""bottom-brace-short""/>")
function teisimple-test:analyze-hor-boundary($node as element(*)) {
fontane-simple:transform($node)
};
declare
%test:name("Horizontal paragraph lines")
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" ulx=""4.0"" uly=""6.7"" lrx=""8.0"" lry=""6.7""><figure xmlns=""http://www.tei-c.org/ns/1.0""><figDesc xmlns=""http://www.tei-c.org/ns/1.0""><ref target=""http://vocab.getty.edu/aat/300027016"">horizontale einfache Absatzlinie</ref></figDesc></figure></zone>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""short-paragraph-line""/>")
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" ulx=""0.7"" uly=""6.3"" lrx=""9.3"" lry=""6.0""><figure xmlns=""http://www.tei-c.org/ns/1.0""><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/300200009"">oberer Teil einer doppelten Absatzlinie (nachgezogen)</ref></figDesc></figure></zone>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""short-paragraph-line-double""/>")
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" ulx=""0.7"" uly=""6.3"" lrx=""9.3"" lry=""6.0""><figure xmlns=""http://www.tei-c.org/ns/1.0""><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/300200009"">unterer Teil einer doppelten Absatzlinie (nachgezogen)</ref></figDesc></figure></zone>")
%test:assertEmpty
(: horizontal lines with stars or plus-signs :)
%test:args("<metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""paragraph"">+&#x2003;+&#x2003;+</metamark>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""paragraph-line-special"">+&#x2003;+&#x2003;+</ab>")
%test:args("<metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""paragraph"">*&#x2003;*&#x2003;*</metamark>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""paragraph-line-special"">*&#x2003;*&#x2003;*</ab>")
(: unsure cases :)
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" ulx=""0.7"" uly=""6.3"" lrx=""9.3"" lry=""6.0""><figure xmlns=""http://www.tei-c.org/ns/1.0""><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/300200009"">vertikale einfache Abgrenzungslinie</ref> (unsicher)</figDesc></figure></zone>")
%test:assertEmpty
function teisimple-test:analyze-hor-p-lines($node as element(*)) {
fontane-simple:transform($node)
};
\ No newline at end of file
......@@ -197,6 +197,11 @@ declare function fontane-simple:transform($nodes as node()*) as node()* {
element tei:ab {
$node/@*
}
else if($node/@function = "paragraph") then
element tei:ab {
attribute type {"paragraph-line-special"},
fontane-simple:transform($node/node())
}
else
()
case element(tei:zone)
......@@ -204,25 +209,65 @@ declare function fontane-simple:transform($nodes as node()*) as node()* {
if(matches($node/@style, "border-style:solid")
and not(matches($node/@style, "border-radius"))
and not($node/@rend = "border-style:house")) then
element tei:div {
attribute type {"frame"},
fontane-simple:transform($node/node())
}
else if($node/@points) then
element tei:seg {
$node/@*,
fontane-simple:transform($node/node())
}
element tei:div {
attribute type {"frame"},
fontane-simple:transform($node/node())
}
else if(matches($node/@rend, "border-bottom-style:brace")) then
(fontane-simple:transform($node/node()),
element tei:ab {
attribute type {"bottom-brace"}
})
else
fontane-simple:transform($node/node())
case element(tei:figure) return
$node
if(count($node/child::*) = 1 and $node/child::tei:figDesc) then
(: genealogy lines probably shouldn't be displayed, but I still have to
check that. in case they should be serialized, I leave the code :)
(: if(matches($node/descendant::tei:ref, "Stammbaumverbindungslinie")) then:)
(: element tei:seg {:)
(: $node/@*,:)
(: fontane-simple:transform($node/node()):)
(: }:)
(: else if(matches($node/descendant::tei:ref, "Schlusslinie")):)
if(matches($node/descendant::tei:ref, "Schlusslinie"))
then
element tei:ab {
switch ($node/descendant::tei:ref)
case "horizontale einfache Schlusslinie" return
attribute type {"long-end-line"}
case "Schlusslinie; horizontale Halbschleife von links oben nach rechts" return
attribute type {"long-end-line"}
case "horizontale einfache Schlusslinie (gewellt)" return
attribute type {"long-end-line-wavy"}
case "Schlusslinien; horizontale Schleife von links oben nach rechts unten" return
attribute type {"bottom-brace-short"}
default return
attribute type {"end-line"}
}
else if(matches($node/descendant::tei:ref, "Absatzlinie")
(: in case of double paragraph lines the single lines are
encoded with "oberer" resp. "unterer Teil", but we only
serialize the encoding for the upper line :)
and not(matches($node/descendant::tei:ref, "unterer Teil"))
and not(matches($node/descendant::tei:figDesc, "unsicher"))) then
element tei:ab {
if(matches($node/descendant::tei:ref, "doppelt"))
then
attribute type {"short-paragraph-line-double"}
else
attribute type {"short-paragraph-line"}
}
else
()
else
$node
case element(tei:figDesc) return
$node
case element(tei:ref) return
$node
default return
fontane-simple:transform($node/node())
fontane-simple:transform($node/node())
};
(: TODO: adapt to general XML :)
......
......@@ -553,7 +553,7 @@
<tei:seg style="letter-spacing:0.2cm; font-size:large">(
Thüringen
<ref target="#xpath(//surface[@n='6r'])">Thüringen</ref>
.)</tei:seg>
......@@ -565,7 +565,7 @@
einiges über
Luther
<ref target="#xpath(//surface[@n='1r'])">Luther</ref>
,
......@@ -574,7 +574,7 @@
Lutherplätze
<ref target="#xpath(//surface[@n='1r'])">Lutherplätze</ref>
<tei:handShift script="Latn"/>
......@@ -622,7 +622,7 @@
<tei:seg style="letter-spacing:0.2cm; font-size:large">(
Thüringen
<ref target="#xpath(//surface[@n='6r'])">Thüringen</ref>
.)</tei:seg>
......@@ -634,7 +634,7 @@
einiges über
Luther
<ref target="#xpath(//surface[@n='1r'])">Luther</ref>
,
......@@ -643,7 +643,7 @@
Lutherplätze
<ref target="#xpath(//surface[@n='1r'])">Lutherplätze</ref>
<tei:handShift script="Latn"/>
......@@ -2863,9 +2863,6 @@
Lageplan des Schlachtfelds von Jena.
......@@ -2971,7 +2968,7 @@
<tei:handShift script="Latn"/>
A.
<ref target="#C07_60v_9">A.</ref>
<tei:handShift script="Latf"/>
Augerau
......@@ -2979,7 +2976,7 @@
<tei:handShift script="Latn"/>
B.
<ref target="#C07_60v_10">B.</ref>
<tei:handShift script="Latf"/>
Lannes
......@@ -2987,7 +2984,7 @@
<tei:handShift script="Latn"/>
C.
<ref target="#C07_60v_11">C.</ref>
<tei:handShift script="Latn"/>Soult<tei:handShift script="Latf"/>
......@@ -3064,9 +3061,6 @@
Lageplan des Schlachtfelds von Auerstedt
<tei:handShift script="Latn"/>
......@@ -3319,17 +3313,17 @@
I.
I
n
Thüringen
,
Sachſen
u.
Meißen
.
<ref xml:id="C07_62v_d" prev="#C07_62v_c" target="#C07_61v_1">
<add type="edited_text" subtype="interlinear" place="above" corresp="#C07_62v_e">I.</add> <mod type="subst">
<del rend="overwritten">i</del>
<add place="superimposed">I</add>
</mod>n <seg>
<rs type="direct" ref="plc:Thueringen">Thüring<anchor xml:id="C07_62v_e"/>en</rs>
</seg>, <seg>
<rs type="direct" ref="plc:Sachsen_Land">Sachſen </rs>
</seg>u. <seg>
<rs type="direct" ref="plc:Meissen_Markgrafenschaft">Meißen</rs>
</seg>.</ref>
......
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