teisimple-test.xql 128 KB
Newer Older
MRodz's avatar
MRodz committed
1
2
3
4
5
6
7
xquery version "3.1";

(: This library module contains XQSuite tests for the iu:analyze-date-string() 
 : module storedd transform2teisimple.xqm :)

module namespace teisimple-test = "http://fontane-nb.dariah.eu/teisimple-test";

8
import module namespace fontaneSimple="http://fontane-nb.dariah.eu/teisimple" at "../tei2teisimple.xqm";
MRodz's avatar
MRodz committed
9

MRodz's avatar
MRodz committed
10
declare namespace tei="http://www.tei-c.org/ns/1.0";
MRodz's avatar
MRodz committed
11
12
13
declare namespace test="http://exist-db.org/xquery/xqsuite";


Michelle Rodzis's avatar
Michelle Rodzis committed
14
15
16
17
18
19
(: milestones :)
declare 
    %test:name("Milestone")
    %test:args("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""paragraph""/>")
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""paragraph""/>")
    function teisimple-test:analyze-milestones($node as element(*)) {
20
        fontaneSimple:transform($node)
Michelle Rodzis's avatar
Michelle Rodzis committed
21
22
};

23
24
25
26
27

(: segs :)
declare 
    %test:name("Segs")
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:0.3cm""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Friedrich_Fontane"" medium=""black_ink"" script=""Latn clean""/><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""font-size:small"">Dieses Buch hat 52 Blatt.</seg></line>")
28
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Friedrich_Fontane"" medium=""black_ink"" script=""Latn clean""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""font-size:small"">Dieses Buch hat 52 Blatt.</seg>")
MRodz's avatar
MRodz committed
29
    
MRodz's avatar
MRodz committed
30
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""letter-spacing:0.2cm""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Dieses Buch hat 52 Blatt.</seg></line>")
31
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""letter-spacing:0.2cm""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Dieses Buch hat 52 Blatt.</seg>")
MRodz's avatar
MRodz committed
32
    
MRodz's avatar
MRodz committed
33
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-transform:uppercase""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Dieses Buch hat 52 Blatt.</seg></line>")
34
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""text-transform:uppercase""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Dieses Buch hat 52 Blatt.</seg>")    
MRodz's avatar
MRodz committed
35
    
MRodz's avatar
MRodz committed
36
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""font-size:small""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Dieses Buch hat 52 Blatt.</seg></line>")
37
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""font-size:small""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Dieses Buch hat 52 Blatt.</seg>")
38
    function teisimple-test:analyze-seg($node as element(*)) {
39
        fontaneSimple:transform($node)
40
41
};

42
43
44
45
46
(: 3.2 Intervening in texts :)

declare 
    %test:name("Intervening in texts")
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""10v""><zone xmlns=""http://www.tei-c.org/ns/1.0""><line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C03_10v_1"">mar</seg>-</line></zone><zone><line><add copyOf=""#C03_10v_1"" cause=""catchword"">mar</add>mor</line></zone></surface></zone>")
47
    %test:assertEquals("<pb xmlns=""http://www.tei-c.org/ns/1.0"" n=""10v""/>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "mar", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""reduplication""><hi xmlns=""http://www.tei-c.org/ns/1.0"" >‹</hi>mar<hi xmlns=""http://www.tei-c.org/ns/1.0"" >›</hi></seg>", "mor")   
48
    
49
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><line xmlns=""http://www.tei-c.org/ns/1.0"">ei<mod xmlns=""http://www.tei-c.org/ns/1.0"" type=""subst""><del xmlns=""http://www.tei-c.org/ns/1.0"" rend=""overwritten"">l</del><add xmlns=""http://www.tei-c.org/ns/1.0"" place=""superimposed"">n</add></mod>la<seg xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C02_32r_1"">den</seg>-</line><line xmlns=""http://www.tei-c.org/ns/1.0""><add xmlns=""http://www.tei-c.org/ns/1.0"" copyOf=""#C02_32r_1"">den</add>den</line></zone>")
50
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "ei", "n", "la", "den", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""reduplication""><hi xmlns=""http://www.tei-c.org/ns/1.0"" >‹</hi>den<hi xmlns=""http://www.tei-c.org/ns/1.0"" >›</hi></seg>", "den")       
51
    
52
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><seg  xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""D08_7v_1"">und</seg><add  xmlns=""http://www.tei-c.org/ns/1.0"" place=""above"" copyOf=""#D08_7v_1"" cause=""unclear"">und</add></line>")
53
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "und")    
54
55
    
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><add place=""above"" style=""margin-left:-0.4cm"" xmlns=""http://www.tei-c.org/ns/1.0"" rend=""caret:bow(1.5cm,pos-right)"">ringt <seg xmlns=""http://www.tei-c.org/ns/1.0"" copyOf=""#B05_5r_z"">und</seg></add></line>")
56
57
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "ringt ", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""reduplication""><hi xmlns=""http://www.tei-c.org/ns/1.0"" >‹</hi>und<hi xmlns=""http://www.tei-c.org/ns/1.0"" >›</hi></seg>")  
    
58
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><add xmlns=""http://www.tei-c.org/ns/1.0"">oder Ende des 17<seg xmlns=""http://www.tei-c.org/ns/1.0"" copyOf=""#D08_30r_a"">.</seg></add></line>")
59
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "oder Ende des 17", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""reduplication""><hi xmlns=""http://www.tei-c.org/ns/1.0"" >‹</hi>.<hi xmlns=""http://www.tei-c.org/ns/1.0"" >›</hi></seg>")    
60
     
61
62
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><line xmlns=""http://www.tei-c.org/ns/1.0"">Sei</line><lb xmlns=""http://www.tei-c.org/ns/1.0"" break=""no""/><line xmlns=""http://www.tei-c.org/ns/1.0"">ten</line></zone>")
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "Se", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""missing-hyphen""><hi xmlns=""http://www.tei-c.org/ns/1.0"" >‹</hi>i<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>t<hi xmlns=""http://www.tei-c.org/ns/1.0"" >›</hi></seg>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "en")  
63
64
    
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><choice xmlns=""http://www.tei-c.org/ns/1.0""><sic xmlns=""http://www.tei-c.org/ns/1.0""/><corr xmlns=""http://www.tei-c.org/ns/1.0"">.</corr></choice></line>")
65
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<choice xmlns=""http://www.tei-c.org/ns/1.0""><sic xmlns=""http://www.tei-c.org/ns/1.0""/><corr xmlns=""http://www.tei-c.org/ns/1.0"">.</corr></choice>")
66
67
68
    
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0"" type=""verse""><surplus xmlns=""http://www.tei-c.org/ns/1.0"">„</surplus>Für die vielen Anſtrengungen</line>")
    %test:assertEquals("<milestone unit=""start-lg"" xmlns=""http://www.tei-c.org/ns/1.0""/>", "<l xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""surplus""><hi xmlns=""http://www.tei-c.org/ns/1.0"" >‹</hi>„<hi xmlns=""http://www.tei-c.org/ns/1.0"" >›</hi></seg>Für die vielen Anstrengungen</l>", "<milestone unit=""end-lg"" xmlns=""http://www.tei-c.org/ns/1.0""/>")
69
70
71
72
73

    function teisimple-test:analyze-interventions($node as element(*)) {
        fontaneSimple:transform($node)
};

MRodz's avatar
MRodz committed
74
75
76
77
78
79
(: 3.5 Glued Pages :)
declare 
    %test:name("Glued pages")
    %test:args("<surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""Ir"" facs=""http://textgridrep.org/textgrid:18qcd"" type=""clipping"" subtype=""Kalenderblatt"" attachment=""partially_glued-posthumous"" ulx=""1.8"" uly=""2.3"" lrx=""8.8"" lry=""13.5""><graphic xmlns=""http://www.tei-c.org/ns/1.0"" n=""B03_002"" url=""http://textgridrep.org/textgrid:18qcd"" mimeType=""image/jpeg""/></surface>")
    %test:assertEquals("<pb xmlns=""http://www.tei-c.org/ns/1.0"" n=""Ir""/>")    
    
80
    %test:args("<surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""30var"" facs=""http://textgridrep.org/textgrid:167nm"" type=""clipping"" subtype=""Zeitungsausschnitt"" attachment=""formerly_partially_glued""><line xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Test</line></surface>")
81
    %test:assertEquals("<pb xmlns=""http://www.tei-c.org/ns/1.0"" n=""30var""/>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "Test")
MRodz's avatar
MRodz committed
82
83
    
    %test:args("<surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""30var"" facs=""http://textgridrep.org/textgrid:167nm"" type=""pocket"" subtype=""angeklebte_cremefarbige_Tasche_von_Fontane_angefertigt_-_Angeklebtes_Blatt"" attachment=""formerly_partially_glued""><line xmlns=""http://www.tei-c.org/ns/1.0"">Test</line></surface>")
84
    %test:assertEquals("<pb xmlns=""http://www.tei-c.org/ns/1.0"" n=""30var""/>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "Test")    
MRodz's avatar
MRodz committed
85
86
87
88
    
    %test:args("<surface xmlns=""http://www.tei-c.org/ns/1.0"" facs=""http://textgridrep.org/textgrid:169hc"" type=""label"" subtype=""Oblate"" ulx=""6.2"" uly=""3.7"" lrx=""7.6"" lry=""5.4""/>")
    %test:assertEmpty
    function teisimple-test:analyze-glued($node as element(*)) {
89
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
90
91
};

MRodz's avatar
MRodz committed
92
93
94
95
96
97
98
99
100
101
102

(: 3.6 Glue and page fragments :)
declare 
    %test:name("Glue and page fragments")
    %test:args("<mod xmlns=""http://www.tei-c.org/ns/1.0"" rend=""glue_trace""/>")
    %test:assertEmpty    
    
    %test:args("<surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""28rar"" facs=""http://textgridrep.org/textgrid:18zt9"" type=""clipping"" subtype=""Zeitungsausschnitt_Fragment"" attachment=""glued"" ulx=""2.9"" uly=""1.9"" lrx=""8.9"" lry=""4.1""><graphic xmlns=""http://www.tei-c.org/ns/1.0"" n=""D05_038"" url=""http://textgridrep.org/textgrid:18zt9"" mimeType=""image/jpeg""/></surface>")
    %test:assertEquals("<pb xmlns=""http://www.tei-c.org/ns/1.0"" n=""28rar""/>")
    
    function teisimple-test:analyze-glue-page-fragments($node as element(*)) {
103
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
104
105
};

MRodz's avatar
MRodz committed
106
107
108
109

(: 3.7 Sketches :)
declare 
    %test:name("Sketches")
MRodz's avatar
MRodz committed
110
    %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>")
111
    %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""/><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Dach</seg></ab>")   
MRodz's avatar
MRodz committed
112
    
MRodz's avatar
MRodz committed
113
    %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>")
114
    %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>")    
MRodz's avatar
MRodz committed
115
    
MRodz's avatar
MRodz committed
116
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><zone xmlns=""http://www.tei-c.org/ns/1.0""><zone xmlns=""http://www.tei-c.org/ns/1.0"" uly=""11.3"" lrx=""8.6"" lry=""11.8"" ><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1.2cm""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Eimer in dieſer Form</line></zone><zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""illustration""  ulx=""9.0"" uly=""11.0"" lrx=""10.6"" lry=""11.8""><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/300124063"">Technische Illustration</ref></figDesc></figure></zone></zone></line>")
117
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "Eimer in dieser Form", "<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/300124063"">Technische Illustration</ref></figDesc></figure></ab>")
MRodz's avatar
MRodz committed
118
    
MRodz's avatar
MRodz committed
119
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""list"" subtype=""legend""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1.4cm"" type=""item""><seg xmlns=""http://www.tei-c.org/ns/1.0""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#C04_4v_3""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>A. Kloſterkirche.</ref></seg></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:1.4cm""><seg xmlns=""http://www.tei-c.org/ns/1.0""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#C04_4v_2 #C04_4v_4"">B. und C. Moderniſirte Kloſter-</ref></seg></line></zone></zone></line>")
120
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<list xmlns=""http://www.tei-c.org/ns/1.0"" subtype=""legend""><item xmlns=""http://www.tei-c.org/ns/1.0""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#C04_4v_3""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>A. Klosterkirche.</ref></item><item xmlns=""http://www.tei-c.org/ns/1.0""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#C04_4v_2 #C04_4v_4"">B. und C. Modernisirte Kloster</ref></item></list>")    
MRodz's avatar
MRodz committed
121
    
MRodz's avatar
MRodz committed
122
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""legend""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1.4cm""><seg xmlns=""http://www.tei-c.org/ns/1.0""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#C04_4v_3""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>A. Kloſterkirche.</ref></seg></line></zone></line>")
123
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<div xmlns=""http://www.tei-c.org/ns/1.0"" type=""legend""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""#C04_4v_3""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>A. Klosterkirche.</ref></div>")    
MRodz's avatar
MRodz committed
124
125
126
127
    
    %test:args("<certainty xmlns=""http://www.tei-c.org/ns/1.0"" cert=""high"" target=""#C02_8v_1"" locus=""value""><desc xmlns=""http://www.tei-c.org/ns/1.0"" type=""edited_text"">Unsicherer Befund. Bei den Linien könnte es sich auch um Abgrenzungslinien handeln. Da allerdings kein Text angrenzt, wurde für eine Codierung als Skizze optiert.</desc></certainty>")
    %test:assertEquals("<note xmlns=""http://www.tei-c.org/ns/1.0"" type=""editorial"" subtype=""certainty"" cert=""high"" target=""#C02_8v_1"">Unsicherer Befund. Bei den Linien könnte es sich auch um Abgrenzungslinien handeln. Da allerdings kein Text angrenzt, wurde für eine Codierung als Skizze optiert.</note>")    
    
MRodz's avatar
MRodz committed
128
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""illustration"" style=""text-decoration:line-through"" rend=""line-through-style:zigzag"" ulx=""4.2"" uly=""9.0"" lrx=""7.1"" lry=""11.1""><del xmlns=""http://www.tei-c.org/ns/1.0""><figure xmlns=""http://www.tei-c.org/ns/1.0""/></del></zone>")
MRodz's avatar
MRodz committed
129
130
    %test:assertEmpty
    
MRodz's avatar
MRodz committed
131
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""illustration""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""illustration""/><zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""illustration"" ulx=""0.8"" uly=""0.0"" lrx=""5.9"" lry=""7.6""><figure xml:id=""a4"" xmlns=""http://www.tei-c.org/ns/1.0""><figDesc xmlns=""http://www.tei-c.org/ns/1.0"" copyOf=""#C08_16r_a""/></figure></zone><zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""illustration"" ulx=""6.9"" uly=""1.1"" lrx=""8.5"" lry=""3.8""><figure xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""a5""><figDesc xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C08_16r_a""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""http://vocab.getty.edu/aat/300015566"">Umgebungsplan</ref> Venedig mit Markusplatz, San Giorgio Maggiore und La Giudecca</figDesc></figure></zone></zone></line>")
132
    %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=""composed-sketch""><ab rendition=""margin-left:0.8cm; margin-top:0.0cm"" xmlns=""http://www.tei-c.org/ns/1.0"" type=""sketch""><figure xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""a4""><figDesc xmlns=""http://www.tei-c.org/ns/1.0"" copyOf=""#C08_16r_a""/></figure></ab><ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""sketch"" rendition=""margin-left:6.9cm; margin-top:1.1cm""><figure xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""a5""><figDesc xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C08_16r_a""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""http://vocab.getty.edu/aat/300015566"">Umgebungsplan</ref> Venedig mit Markusplatz, San Giorgio Maggiore und La Giudecca</figDesc></figure></ab></ab>")   
MRodz's avatar
MRodz committed
133
134
    
    function teisimple-test:analyze-sketches($node as element(*)) {
135
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
136
137
};

MRodz's avatar
MRodz committed
138
 
MRodz's avatar
MRodz committed
139
(: 3.8.1 Line counting :)
MRodz's avatar
MRodz committed
140
141
142
declare 
    %test:name("Line counting")
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""label"" rotate=""357"" ulx=""1.5"" uly=""4.7"" lrx=""8.4"" lry=""9.2""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#fremde_Hand3""/><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:0.4cm"">✓<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/> 1873.</line></zone>")
143
    %test:assertEquals("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#fremde_Hand3"" script="""" medium=""""/>","<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "✓", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", " 1873.")
MRodz's avatar
MRodz committed
144
    function teisimple-test:analyze-line-counting($node as element(*)) {
145
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
146
147
};

148
149
150
151
152
153
154
155
156
157
158
159
160

(: 3.8.2 Paragraphs :)
declare 
    %test:name("Paragraphs")
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1.0cm"">noch nicht recht aufgehn.</line><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""paragraph""/><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:2.8cm"" rend=""indent"">Unter den andern</line></zone>")
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "noch nicht recht aufgehn.", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""paragraph""/>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line"" rend=""indent""/>", "Unter den andern")    
    
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.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"">horizontale einfache Absatzlinie</ref></figDesc></figure><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""paragraph""/></zone>")
    %test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""short-paragraph-line""/>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""paragraph""/>")
    function teisimple-test:analyze-paragraphs($node as element(*)) {
        fontaneSimple:transform($node)
};

MRodz's avatar
MRodz committed
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190

(: 3.8.2.2.1 Verses :)
declare 
    %test:name("Verses")
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" rend=""indent""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1.3cm"" type=""verse"">Für König und für Vaterland,</line><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1.3cm"" type=""verse"">Mit Gott, im blutgen Krieg,</line></zone>")
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""start-lg""/>", "<l xmlns=""http://www.tei-c.org/ns/1.0"">Für König und für Vaterland,</l>", "<l xmlns=""http://www.tei-c.org/ns/1.0"">Mit Gott, im blutgen Krieg,</l>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""end-lg""/>")        
    
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""verse"" rend=""indent""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1.8cm"">Ein leiſes Wölkchen ſteigt</line><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:2.0cm"">Ein Knall rollt herüber</line></zone></zone>")
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""start-lg""/>", "<l xmlns=""http://www.tei-c.org/ns/1.0"">Ein leises Wölkchen steigt<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>Ein Knall rollt herüber</l>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""end-lg""/>")  
    
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><zone xmlns=""http://www.tei-c.org/ns/1.0""><line xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C05_52v_a"" next=""#C05_52v_b"" type=""verse"">Denkt an</line></zone><zone xmlns=""http://www.tei-c.org/ns/1.0""><line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""verse"" xml:id=""C05_52v_b"" prev=""#C05_52v_a"">Luther.</seg> Zum</line><line xmlns=""http://www.tei-c.org/ns/1.0"">Andenken</line></zone></zone>")
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""start-lg""/>", "<l xmlns=""http://www.tei-c.org/ns/1.0"">Denkt an<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>Luther.</l>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""end-lg""/>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", " Zum", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "Andenken")    
    
    function teisimple-test:analyze-verse($node as element(*)) {
        fontaneSimple:transform($node)
};

(: 3.8.2.2.2 Dialogues :)
declare 
    %test:name("Dialogues")
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""dialogue""><line xmlns=""http://www.tei-c.org/ns/1.0""><hi xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underlinie"">Er</seg></hi>. <seg><said xmlns=""http://www.tei-c.org/ns/1.0"">Nun kommt der Däne nicht wieder.</said></seg></line><line xmlns=""http://www.tei-c.org/ns/1.0""><hi xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underlinie"">Ich</seg></hi>. <seg><said xmlns=""http://www.tei-c.org/ns/1.0"">Wer weiß.</said></seg></line></zone>")
    %test:assertEquals("<div xmlns=""http://www.tei-c.org/ns/1.0"" type=""dialogue""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><hi xmlns=""http://www.tei-c.org/ns/1.0"">Er</hi>. <seg xmlns=""http://www.tei-c.org/ns/1.0"" type =""said"">Nun kommt der Däne nicht wieder.</seg><lb xmlns=""http://www.tei-c.org/ns/1.0"" type=""edited_text""/><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><hi>Ich</hi>. <seg xmlns=""http://www.tei-c.org/ns/1.0"" type =""said"">Wer weiß.</seg></div>")         
    
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""dialogue""><line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""D07_69v_a"" next=""#D07_69v_1"" type=""said"">Hören Se, </seg></line><zone xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""D07_69v_1"" prev=""#D07_69v_a"" type=""said""><line xmlns=""http://www.tei-c.org/ns/1.0"">der ganze Krieg war nich</line><line xmlns=""http://www.tei-c.org/ns/1.0"">nöthig.</line></zone><zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""said""><line xmlns=""http://www.tei-c.org/ns/1.0"" rend=""indent"">Nich?</line></zone></zone>")
    %test:assertEquals("<div xmlns=""http://www.tei-c.org/ns/1.0"" type=""dialogue""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><seg xmlns=""http://www.tei-c.org/ns/1.0"" type =""said"">Hören Se, <milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>der ganze Krieg war nich<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>nöthig.</seg><lb xmlns=""http://www.tei-c.org/ns/1.0"" type=""edited_text""/><seg xmlns=""http://www.tei-c.org/ns/1.0"" type =""said""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line"" rend=""indent""/>Nich?</seg></div>")        
    
    function teisimple-test:analyze-dialogues($node as element(*)) {
        fontaneSimple:transform($node)
};

MRodz's avatar
MRodz committed
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
(: 3.8.2.3 Headings :)
declare 
    %test:name("Headings")
        %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:3.1cm"" type=""heading"" subtype=""chapter"" rend=""align(center)""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/><hi xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""font-size:large; letter-spacing:0.2cm; text-decoration:underline"">Luther</seg></hi></line>")
    %test:assertEquals("<head xmlns=""http://www.tei-c.org/ns/1.0"" type=""large"" subtype=""chapter"" rend=""align(center)""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/><hi xmlns=""http://www.tei-c.org/ns/1.0"">Luther</hi></head>")    
    
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""heading"" subtype=""chapter""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1.5cm""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>4. <seg xmlns=""http://www.tei-c.org/ns/1.0""><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""plc:Luetzen"">Lützen</rs></seg></line><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:3.7cm""><seg xmlns=""http://www.tei-c.org/ns/1.0""><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""psn:Gustav_Adolf"">Guſtav <retrace xmlns=""http://www.tei-c.org/ns/1.0"">Ad</retrace>olf</rs></seg>. <seg xmlns=""http://www.tei-c.org/ns/1.0""><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""plc:Weissenfels"">Weißenfels</rs></seg>.</line></zone>")
    %test:assertEquals("<head xmlns=""http://www.tei-c.org/ns/1.0"" type=""default"" subtype=""chapter""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>4. <rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""plc:Luetzen"">Lützen</rs><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><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("<line xmlns=""http://www.tei-c.org/ns/1.0""><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""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>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></line>")
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""heading""><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""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>1873</hi></date>.</seg></seg></seg>")
    
    (:examples from here on from 3.8.2.3. :)
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:3.1cm"" type=""heading"" rend=""align(center)""><hi xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline"">Luther</seg></hi></line>")
    %test:assertEquals("<head xmlns=""http://www.tei-c.org/ns/1.0"" type=""default"" rend=""align(center)""><hi xmlns=""http://www.tei-c.org/ns/1.0"">Luther</hi></head>")        
    
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""heading""><hi xmlns=""http://www.tei-c.org/ns/1.0"">E<seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline"">lfter Brief.</seg></hi></seg></line>")
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""heading""><hi xmlns=""http://www.tei-c.org/ns/1.0"">Elfter Brief.</hi></seg>")       
    
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0"" type=""heading"" subtype=""section"" rend=""align(right)""><hi xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline"">Riva d. 15. A</seg>ugust</hi></line>")
    %test:assertEquals("<head xmlns=""http://www.tei-c.org/ns/1.0"" type=""default"" subtype=""section"" rend=""align(right)""><hi xmlns=""http://www.tei-c.org/ns/1.0"">Riva d. 15. August</hi></head>")          
    
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""heading"" rend=""align(center)""><line xmlns=""http://www.tei-c.org/ns/1.0""><hi>O<seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline"">ertlichkeite</seg>n</hi></line><line xmlns=""http://www.tei-c.org/ns/1.0""><hi>d<seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline"">eutſcher Sage und Geſ</seg>chichte</hi>.</line></zone>")
    %test:assertEquals("<head xmlns=""http://www.tei-c.org/ns/1.0"" type=""default"" rend=""align(center)""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><hi xmlns=""http://www.tei-c.org/ns/1.0"">Oertlichkeiten</hi><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><hi>deutscher Sage und Geschichte</hi>.</head>")         
    
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""heading"" subtype=""section"" rend=""align(center)""><line xmlns=""http://www.tei-c.org/ns/1.0""><hi>O<seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline"">ertlichkeite</seg>n</hi></line><line xmlns=""http://www.tei-c.org/ns/1.0""><hi>d<seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline"">eutſcher Sage und Geſ</seg>chichte</hi>.</line></zone>")
    %test:assertEquals("<head xmlns=""http://www.tei-c.org/ns/1.0"" type=""default"" subtype=""section"" rend=""align(center)""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><hi xmlns=""http://www.tei-c.org/ns/1.0"">Oertlichkeiten</hi><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><hi>deutscher Sage und Geschichte</hi>.</head>")         
    
    function teisimple-test:analyze-headings($node as element(*)) {
        fontaneSimple:transform($node)
};

MRodz's avatar
MRodz committed
223

MRodz's avatar
MRodz committed
224
225
226
227
228
229
230
231
232
233
234
(: 3.8.2.4 Lists :)
declare 
    %test:name("Lists")
        %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""list"" rend=""indent""><line xmlns=""http://www.tei-c.org/ns/1.0"" type=""item"">Ludwig der Springer,</line><line xmlns=""http://www.tei-c.org/ns/1.0"" type=""item"">Ludwig der Eiſerne,</line></zone>")
    %test:assertEquals("<list xmlns=""http://www.tei-c.org/ns/1.0"" rend=""indent""><item xmlns=""http://www.tei-c.org/ns/1.0"">Ludwig der Springer,</item><item xmlns=""http://www.tei-c.org/ns/1.0"">Ludwig der Eiserne,</item></list>")    
    
    function teisimple-test:analyze-lists($node as element(*)) {
        fontaneSimple:transform($node)
};


MRodz's avatar
MRodz committed
235

MRodz's avatar
MRodz committed
236
237
238
239
240
241
(: BOOK COVERS :)

declare 
    %test:name("Book covers: outer_front_cover")
    %test:args("<surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""outer_front_cover"" 
        facs=""http://textgridrep.org/textgrid:164g9"" xml:id=""a5""/>")
242
    %test:assertEquals("<pb xmlns=""http://www.tei-c.org/ns/1.0"" type=""outer_front_cover""/>")
MRodz's avatar
MRodz committed
243
    function teisimple-test:analyze-outer-front-covers($node as element(*)) {
244
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
245
246
247
248
249
250
};  

declare 
    %test:name("Book covers: inner_front_cover")            
    %test:args("<surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""inner_front_cover"" 
        facs=""http://textgridrep.org/textgrid:164g9"" xml:id=""a5""/>")
251
    %test:assertEquals("<pb xmlns=""http://www.tei-c.org/ns/1.0"" type=""inner_front_cover""/>")
MRodz's avatar
MRodz committed
252
    function teisimple-test:analyze-inner-front-covers($node as element(*)) {
253
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
254
255
256
257
258
259
};

declare 
    %test:name("Book covers: outer_back_cover")
    %test:args("<surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""outer_back_cover"" 
        facs=""http://textgridrep.org/textgrid:164g9"" xml:id=""a5""/>")
260
    %test:assertEquals("<pb xmlns=""http://www.tei-c.org/ns/1.0"" type=""outer_back_cover""/>")
MRodz's avatar
MRodz committed
261
    function teisimple-test:analyze-outer-back-covers($node as element(*)) {
262
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
263
264
265
266
267
268
}; 

declare 
    %test:name("Book covers: inner_back_cover")
    %test:args("<surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""inner_back_cover"" 
        facs=""http://textgridrep.org/textgrid:164g9"" xml:id=""a5""/>")
269
    %test:assertEquals("<pb xmlns=""http://www.tei-c.org/ns/1.0"" type=""inner_back_cover""/>")
MRodz's avatar
MRodz committed
270
    function teisimple-test:analyze-inner-back-covers($node as element(*)) {
271
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
272
273
};

MRodz's avatar
MRodz committed
274
275
276
277
declare 
    %test:name("Labels on Covers")
    %test:args("<surface xmlns=""http://www.tei-c.org/ns/1.0"" type=""label"" subtype=""Signaturen-Klebchen_Archivar_alt""/>") 
    %test:assertEmpty
MRodz's avatar
MRodz committed
278
279
    
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><surface xmlns=""http://www.tei-c.org/ns/1.0"" type=""label"" subtype=""Etikett_vom_Notizbuch-Hersteller_angefertigt""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Test</surface></line>")
280
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<div xmlns=""http://www.tei-c.org/ns/1.0"" type=""label""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Test</div>")    
MRodz's avatar
MRodz committed
281
282
    
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><surface xmlns=""http://www.tei-c.org/ns/1.0"" type=""label"" subtype=""Etikett_von_Fontane_angefertigt_-_Aufgeklebtes_Blatt""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Test</surface></line>")
283
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<div xmlns=""http://www.tei-c.org/ns/1.0"" type=""label""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Test</div>")
MRodz's avatar
MRodz committed
284
    function teisimple-test:analyze-labels($node as element(*)) {
285
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
286
287
288
289
290
291
292
};

(: PAGES :)

declare
    %test:name("Pages")
    %test:args("<surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""1r"" facs=""http://textgridrep.org/textgrid:164h2""/>")
293
294
    %test:assertEquals("<pb xmlns=""http://www.tei-c.org/ns/1.0"" n=""1r""/>")
    
MRodz's avatar
MRodz committed
295
        %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""1r"" facs=""http://textgridrep.org/textgrid:164h2""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Test</surface></line>")
296
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<pb xmlns=""http://www.tei-c.org/ns/1.0"" n=""1r""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "Test")
MRodz's avatar
MRodz committed
297
    function teisimple-test:analyze-pages($node as element(*)) {
298
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
299
300
301
302
303
304
305
};


(: GRAPHICS :)
declare
    %test:name("Graphics")
    %test:args("<graphic xmlns=""http://www.tei-c.org/ns/1.0"" n=""C07_001"" url=""http://textgridrep.org/textgrid:164g9"" mimeType=""image/jpeg""/>")
MRodz's avatar
MRodz committed
306
    %test:assertEmpty
MRodz's avatar
MRodz committed
307
    function teisimple-test:analyze-graphics($node as element(*)) {
308
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
309
310
};

MRodz's avatar
MRodz committed
311

MRodz's avatar
MRodz committed
312
313
(: GENETIC INFORMATION :)

MRodz's avatar
MRodz committed
314
(: 3.21.11. DELETIONS :)
MRodz's avatar
MRodz committed
315
316
317
318
declare
    %test:name("Deletions")
    %test:args("<del xmlns=""http://www.tei-c.org/ns/1.0"">(Dann folgen wohl Reiſe</del>")
    %test:assertEmpty
MRodz's avatar
MRodz committed
319
    
320
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/><line xmlns=""http://www.tei-c.org/ns/1.0"">herab über <seg xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""A02_76v_1"" next=""#A02_76v_2"" type=""cancel"">den nordiſchſten</seg></line><zone xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""A02_76v_2"" prev=""#A02_76v_1"" type=""cancel""><line xmlns=""http://www.tei-c.org/ns/1.0"">Gardinenſchnittkleidern und</line></zone></zone>")
321
    %test:assertEquals("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "herab über ")
MRodz's avatar
MRodz committed
322
323
    
    (: restoring text :)
MRodz's avatar
MRodz committed
324
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><restore xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/><del xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C12_48r_b"" prev=""#C12_48r_a"" style=""text-decoration:line-through"" rend=""line-through-style:double"">z. B.</seg></del></restore></line>")
325
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C12_48r_b"" prev=""#C12_48r_a"" rendition=""text-decoration:line-through"" rend=""line-through-style:double"">z. B.</seg>")
MRodz's avatar
MRodz committed
326
327
328
329
330
331
    
    (: restored deletion that was again deleted :)
    %test:args("<del xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:line-through"" rend=""line-through-style:single_oblique(45deg)""><restore xmlns=""http://www.tei-c.org/ns/1.0""><del xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:line-through"">ſich</seg></del></restore></seg></del>")
    %test:assertEmpty
    
    (: partly restored deletion :)
MRodz's avatar
MRodz committed
332
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><del xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""B04_52v_d"" prev=""#B04_52v_c""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:line-through"">hand <restore xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>führen kann</restore></seg></del></line>")
333
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "führen kann")
MRodz's avatar
MRodz committed
334
335
    
    (: restored deletion :)
336
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/><mod xmlns=""http://www.tei-c.org/ns/1.0"" type=""subst""><del xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:line-through"" rend=""line-through-medium:blue_pencil""> Herbstesbunte </seg><restore xmlns=""http://www.tei-c.org/ns/1.0""><mod xmlns=""http://www.tei-c.org/ns/1.0"" type=""subst""><del xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""B04_53v_a"">Waldes</del></mod></restore><add xmlns=""http://www.tei-c.org/ns/1.0"">Wälder</add></del><redo xmlns=""http://www.tei-c.org/ns/1.0"" target=""#B04_53v_a"" style=""text-decoration:line-through"" rend=""line-through-medium:blue_pencil""/><add xmlns=""http://www.tei-c.org/ns/1.0"">Rot und gelbe Herbstes</add></mod>lehnen </line>")
337
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "Rot und gelbe Herbstes","lehnen ")
MRodz's avatar
MRodz committed
338
339
    
    (: marking something as complete :)
340
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""marked_off"" xml:id=""E04_39r_2"" uly=""0.5""><line xmlns=""http://www.tei-c.org/ns/1.0""><hi xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>3<seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline"">. Kapitel</seg></hi>.</line></zone>")
341
    %test:assertEquals("<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""marked_off"" xml:id=""E04_39r_2""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><hi xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>3. Kapitel</hi>.</seg>")
MRodz's avatar
MRodz committed
342
    
MRodz's avatar
MRodz committed
343
    function teisimple-test:analyze-del($node as element(*)) {
344
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
345
346
347
348
349
350
351
352
353
};

(: PAGINATION AND STAMPS, AUCTIONS :)
  
declare
    %test:name("Pagination alone")
    %test:args("<fw xmlns=""http://www.tei-c.org/ns/1.0"" type=""pageNum"">5</fw>")
    %test:assertEmpty
    function teisimple-test:analyze-pag-so($node as element(*)) {
354
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
355
356
357
358
359
360
361
};

declare
    %test:name("Pagination with lines")
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><fw xmlns=""http://www.tei-c.org/ns/1.0"" type=""pageNum"">5</fw></line>")
    %test:assertEmpty
    function teisimple-test:analyze-pag-lines($node as element(*)) {
362
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
363
364
365
366
};

declare
    %test:name("Pagination with handschift before")
MRodz's avatar
MRodz committed
367
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Archivar1""/><line xmlns=""http://www.tei-c.org/ns/1.0""><fw xmlns=""http://www.tei-c.org/ns/1.0"" type=""pageNum"">5</fw></line></zone>")
MRodz's avatar
MRodz committed
368
    %test:assertEquals("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Archivar1"" script="""" medium=""""/>")
MRodz's avatar
MRodz committed
369
    function teisimple-test:analyze-pag-hs($node as element(*)) {
370
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
371
372
373
374
375
376
377
};

declare
    %test:name("Stamp alone")
    %test:args("<stamp xmlns=""http://www.tei-c.org/ns/1.0"">STAATSBIBLIOTHEK •BERLIN•</stamp>")
    %test:assertEmpty
    function teisimple-test:analyze-stamp($node as element(*)) {
378
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
379
380
381
382
383
384
385
};

declare
    %test:name("Stamp in seg")
    %test:args("<seg xmlns=""http://www.tei-c.org/ns/1.0""><stamp xmlns=""http://www.tei-c.org/ns/1.0"">STAATSBIBLIOTHEK •BERLIN•</stamp></seg>")
    %test:assertEmpty
    function teisimple-test:analyze-stamp-seg($node as element(*)) {
386
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
387
388
389
390
};

declare
    %test:name("Stamp with handschift before")
MRodz's avatar
MRodz committed
391
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Stempel1""/><seg xmlns=""http://www.tei-c.org/ns/1.0""><stamp xmlns=""http://www.tei-c.org/ns/1.0"">STAATSBIBLIOTHEK •BERLIN•</stamp></seg></zone>")
MRodz's avatar
MRodz committed
392
    %test:assertEquals("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Stempel1"" script="""" medium=""""/>")
MRodz's avatar
MRodz committed
393
    function teisimple-test:analyze-stamp-hs($node as element(*)) {
394
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
395
396
397
398
};

declare
    %test:name("Auction numbers")
Michelle Rodzis's avatar
Michelle Rodzis committed
399
    %test:args("<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""auction_number"">5<mod xmlns=""http://www.tei-c.org/ns/1.0"" type=""subst""><del xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""overwritten"">10</del><add place=""superimposed"">09</add></mod>-7</seg>")
MRodz's avatar
MRodz committed
400
401
    %test:assertEmpty
    function teisimple-test:analyze-auction($node as element(*)) {
402
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
403
404
405
406
407
408
};

(: PAGE FRAGMENTS AND EMPTY PAGES :)

declare
    %test:name("Empty pages")
409
    %test:args("<surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""26r"" type=""fragment"" attachment=""torn""><zone xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Archivar1""/><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:0.5cm""><fw xmlns=""http://www.tei-c.org/ns/1.0"" type=""pageNum"">26</fw></line><handShift xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:0.5cm"" new=""#Fontane""/></zone></surface>")
MRodz's avatar
MRodz committed
410
    %test:assertEquals("<pb xmlns=""http://www.tei-c.org/ns/1.0"" n=""26r""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Archivar1"" script="""" medium=""""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:0.5cm"" new=""#Fontane"" script="""" medium=""""/>")    
MRodz's avatar
MRodz committed
411
412
    
    (: adapt when further pages are implemented :)
MRodz's avatar
MRodz committed
413
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""26r"" type=""fragment"" attachment=""torn""><zone xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Archivar1""/><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:0.5cm""><fw xmlns=""http://www.tei-c.org/ns/1.0"" type=""pageNum"">26</fw></line><handShift new=""#Fontane""/><line>Gewöhnliches Briefpapier.</line></zone></surface></line>")
414
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<pb xmlns=""http://www.tei-c.org/ns/1.0"" n=""26r""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Archivar1"" script="""" medium=""""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "Gewöhnliches Briefpapier.")
MRodz's avatar
MRodz committed
415
    function teisimple-test:analyze-page-fragment($node as element(*)) {
416
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
417
418
};

MRodz's avatar
MRodz committed
419
420
421
(: 3.12 EMPTY PAGES :)
declare
    %test:name("Empty pages")
422
    %test:args("<surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""30r""><zone xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Archivar2""/><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:5.7cm""><fw xmlns=""http://www.tei-c.org/ns/1.0"" type=""pageNum"">[<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Archivar1""/>26<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Archivar2""/>]</fw></line><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:6.2cm""><fw xmlns=""http://www.tei-c.org/ns/1.0"" type=""pageNum"">30</fw></line></zone></surface>")
MRodz's avatar
MRodz committed
423
    %test:assertEquals("<pb xmlns=""http://www.tei-c.org/ns/1.0"" n=""30r""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Archivar2"" script="""" medium=""""/>")    
MRodz's avatar
MRodz committed
424
425
    
    (: adapt when further pages are implemented :)
MRodz's avatar
MRodz committed
426
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><surface xmlns=""http://www.tei-c.org/ns/1.0"" n=""26r"" type=""fragment"" attachment=""torn""><zone xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Archivar1""/><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:0.5cm""><fw xmlns=""http://www.tei-c.org/ns/1.0"" type=""pageNum"">26</fw></line><handShift new=""#Fontane""/><line>Gewöhnliches Briefpapier.</line></zone></surface></line>")
427
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<pb xmlns=""http://www.tei-c.org/ns/1.0"" n=""26r""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Archivar1"" script="""" medium=""""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "Gewöhnliches Briefpapier.")
MRodz's avatar
MRodz committed
428
    function teisimple-test:analyze-empty-pages($node as element(*)) {
429
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
430
431
};

MRodz's avatar
MRodz committed
432
433
434
435
436

(: GEMINATION :)

declare
    %test:name("Gemination")
MRodz's avatar
MRodz committed
437
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><g xmlns=""http://www.tei-c.org/ns/1.0"" ref=""#mgem""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>mm</g></line>")
438
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "mm")
MRodz's avatar
MRodz committed
439
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><g xmlns=""http://www.tei-c.org/ns/1.0"" ref=""#ngem""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>nn</g></line>")
440
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "nn")
MRodz's avatar
MRodz committed
441
    function teisimple-test:analyze-gemination($node as element(*)) {
442
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
443
444
445
446
447
448
449
};

(: HANDSHIFTS :)
(: Friedrich Fontane, hier noch Besonderheiten beachten! :)
declare
    %test:name("Handshifts")
    %test:args("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>")
MRodz's avatar
MRodz committed
450
    %test:assertEquals("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>")
451
    
MRodz's avatar
MRodz committed
452
    %test:args("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Friedrich_Fontane""/>")
MRodz's avatar
MRodz committed
453
    %test:assertEquals("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Friedrich_Fontane"" script="""" medium=""""/>")
454
    
MRodz's avatar
MRodz committed
455
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><surface xmlns=""http://www.tei-c.org/ns/1.0"" type=""label"" subtype=""Etikett_vom_Notizbuch-Hersteller_angefertigt""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Friedrich_Fontane""/>Test</surface></line>")
456
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<div xmlns=""http://www.tei-c.org/ns/1.0"" type=""label""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Friedrich_Fontane"" script="""" medium=""""/>Test</div>")
MRodz's avatar
MRodz committed
457

MRodz's avatar
MRodz committed
458
    %test:args("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script=""Latn clean""/>")
MRodz's avatar
MRodz committed
459
    %test:assertEquals("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script=""Latn clean"" medium=""""/>")  
MRodz's avatar
MRodz committed
460
    
MRodz's avatar
MRodz committed
461
    %test:args("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script=""Latn clean""/>")
MRodz's avatar
MRodz committed
462
    %test:assertEquals("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script=""Latn clean"" medium=""""/>")
463
    
MRodz's avatar
MRodz committed
464
    function teisimple-test:analyze-handshift($node as element(*)) {
465
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
466
467
};

468
469
(: the tests for handshift-omissions are deprecated and therefore deleted since
 : it's easier to handle this phenomenon in the second stage of processing :)
470

MRodz's avatar
MRodz committed
471
472
473
474
(: FONTS :)

declare
    %test:name("Fonts")
MRodz's avatar
MRodz committed
475
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""initials""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/><handShift xmlns=""http://www.tei-c.org/ns/1.0"" script=""Latn""/></seg></line>")
476
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""initials""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" medium="""" script=""Latn""/></seg>")
MRodz's avatar
MRodz committed
477
478
    
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""initials""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>LVNGiS</seg></line>")
479
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""initials""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>LVNGiS</seg>")
MRodz's avatar
MRodz committed
480
481
    
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""monogram""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>LC</seg></line>")
482
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""monogram""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>LC</seg>")
MRodz's avatar
MRodz committed
483
    function teisimple-test:analyze-fonts($node as element(*)) {
484
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
485
486
487
488
489
};

(: WRITING MEDIUM :)
declare
    %test:name("Writing medium")
490
    %test:args("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" medium=""black_ink thin_pen""/>")
MRodz's avatar
MRodz committed
491
    %test:assertEquals("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""black_ink thin_pen""/>")
492
    %test:args("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" medium=""pencil""/>")
MRodz's avatar
MRodz committed
493
    %test:assertEquals("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""pencil""/>")
MRodz's avatar
MRodz committed
494
    function teisimple-test:analyze-medium($node as element(*)) {
495
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
496
497
498
499
500
};

(: WORD, LETTER AND CHARACTER SPACING :)
declare
    %test:name("Spacing")
MRodz's avatar
MRodz committed
501
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""letter-spacing:0.2cm;""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>1</seg></line>")
502
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""letter-spacing:0.2cm;""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>1</seg>")
MRodz's avatar
MRodz committed
503
    function teisimple-test:analyze-spacing($node as element(*)) {
504
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
505
506
};

507
508
509
510
511
512
513
514
(: ILLEGIBLE CHARACTERS AND WORDS :)
declare
    %test:name("Illegible characters and words")
    %test:args("<gap xmlns=""http://www.tei-c.org/ns/1.0"" reason=""illegible"" unit=""uc_chars"" quantity=""1""/>")
    %test:assertEquals("<gap xmlns=""http://www.tei-c.org/ns/1.0"" reason=""illegible"" unit=""uc_chars"" quantity=""1""/>")
    %test:args("<gap xmlns=""http://www.tei-c.org/ns/1.0"" reason=""damage"" unit=""mm"" quantity=""64""/>")
    %test:assertEquals("<gap xmlns=""http://www.tei-c.org/ns/1.0"" reason=""damage"" unit=""mm"" quantity=""64""/>")
    function teisimple-test:analyze-illeg-word($node as element(*)) {
515
        fontaneSimple:transform($node)
516
517
};

MRodz's avatar
MRodz committed
518
519
520
521
(: 3.18 languages :)
declare
    %test:name("Languages")
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" xml:lang=""la-Latn""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>ac delecta Romae sede</seg></line>")
522
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" xml:lang=""la-Latn""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>ac delecta Romae sede</seg>")
MRodz's avatar
MRodz committed
523
524
525
526
527
528

    function teisimple-test:analyze-languages($node as element(*)) {
        fontaneSimple:transform($node)
};


529
530
531
532
(: 3.21.9 TOPOGRPHY OF THE PAGE :)
 
declare
    %test:name("Topography of the page")
533
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" rotate=""270"" uly=""16"" style=""border-bottom-style:solid; border-right-style:solid; padding-bottom:0.5cm; padding-right:0.5cm""><line style=""margin-left:0cm""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/> 4. Iron and Steel.</line></zone>")
534
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", " 4. Iron and Steel.")
535
    
536
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" rotate=""326""><line style=""margin-left:0.0cm""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>werfen </line></zone>")
537
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "werfen ")    
538
    
539
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><zone xmlns=""http://www.tei-c.org/ns/1.0"" style=""font-size:x-large"" ulx=""2.1"" uly=""13.8"" lrx=""2.9"" lry=""15.0""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:0.0cm""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>(</line></zone></zone>")
540
    %test:assertEquals("<seg xmlns=""http://www.tei-c.org/ns/1.0"" unit=""zone"" rendition=""font-size:x-large"" ulx=""2.1"" uly=""13.8"" lrx=""2.9"" lry=""15.0""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>(</seg>")
541
    
542
    function teisimple-test:analyze-topography($node as element(*)) {
543
        fontaneSimple:transform($node)
544
545
546
547
548
549
};

(: 3.21.10 FRAMES ETC. :)

declare
    %test:name("Rectangular frames")
550
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" style=""border-style:solid"" ulx=""0.3"" uly=""6.1"" lrx=""8.3"" lry=""9.3""><line style=""margin-left:1.1cm""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Test</line></zone>")
551
    %test:assertEquals("<div xmlns=""http://www.tei-c.org/ns/1.0"" type=""frame""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Test</div>")
MRodz's avatar
MRodz committed
552
    
553
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" style=""border-left-style:solid; border-top-style:solid; border-right-style:solid"" ulx=""0.4"" uly=""7.3"" lrx=""9.9"" lry=""16.1""><zone xmlns=""http://www.tei-c.org/ns/1.0"" ulx=""0.0"" uly=""0.5"" lrx=""9.2"" lry=""5.8""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:0.5cm""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>„Es hätte ſie ſehr</line></zone></zone>")
554
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "„Es hätte sie sehr")
555
    function teisimple-test:analyze-rect-frames($node as element(*)) {
556
        fontaneSimple:transform($node)
557
558
559
560
};

declare
    %test:name("Other frames")
561
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" style=""border-style:solid; border-radius:50%"" rend=""border-medium:red_pencil"" ulx=""2.4"" uly=""1.6"" lrx=""5.7"" lry=""9.0""><zone xmlns=""http://www.tei-c.org/ns/1.0"" rotate=""270"" ulx=""3.1"" uly=""7.6"" lrx=""7.8"" lry=""5.1""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:0.0cm""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>S. 260</line></zone></zone>")
562
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "S. 260")
MRodz's avatar
MRodz committed
563
    
564
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" style=""border-style:solid"" rend=""border-style:house"" rotate=""180"" ulx=""2.4"" uly=""6.4"" lrx=""4.2"" lry=""7.3""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/><line style=""margin-left:0.0cm"">Die</line></zone>")
565
    %test:assertEquals("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "Die")
566
    function teisimple-test:analyze-other-frames($node as element(*)) {
567
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
568
569
570
571
572
573
};

(: 3.21.10.1. BOUNDARY MARKERS :)

declare
    %test:name("Boundary markers")
574
    %test:args("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/><zone xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C07_61r_2"" prev=""#C07_61r_1"" next=""#C07_61r_3"" rotate=""85"" ulx=""1.2"" uly=""10.8"" style=""border-left-style:solid""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:0.8cm"">des Feindes an und</line></zone>")
575
    %test:assertEquals("<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "des Feindes an und")
MRodz's avatar
MRodz committed
576
    function teisimple-test:analyze-boundary($node as element(*)) {
577
        fontaneSimple:transform($node)
578
579
580
581
582
583
};

declare
    %test:name("Boundary lines")
    %test:args("<metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""integrate"" rend=""bracket_left"" corresp=""#D02_43v_2"" target=""#D02_43v_4""/>")
    %test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" function=""integrate"" rend=""bracket_left"" corresp=""#D02_43v_2"" target=""#D02_43v_4""/>")
MRodz's avatar
MRodz committed
584
    
585
    %test:args("<metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""integrate"" rend=""bracket_right"" corresp=""#D02_43v_2"" target=""#D02_43v_4""/>")
MRodz's avatar
MRodz committed
586
587
    %test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" function=""integrate"" rend=""bracket_right"" corresp=""#D02_43v_2"" target=""#D02_43v_4""/>")  
    
588
589
590
    %test:args("<metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""authorial_note"" rend=""bracket_right"" corresp=""#D02_43v_2"" target=""#D02_43v_4""/>")
    %test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" function=""authorial_note"" rend=""bracket_right"" corresp=""#D02_43v_2"" target=""#D02_43v_4""/>")
    function teisimple-test:analyze-boundary($node as element(*)) {
591
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
592
593
594
595
596
597
};

(: 3.21.10.2.1.2.3 GENEALOGY :)
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>")
598
599
600
601
(: 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
MRodz's avatar
MRodz committed
602
    function teisimple-test:analyze-genealogy($node as element(*)) {
603
        fontaneSimple:transform($node)
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
};


(: 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""/>")    
    
624
    %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""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Weiß und Gold</line></zone>")
625
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "Weiß und Gold","<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""bottom-brace""/>")  
626
627
628
629
630
    
    %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(*)) {
631
        fontaneSimple:transform($node)
632
633
634
635
636
637
638
639
640
641
642
643
644
645
};

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 :)
MRodz's avatar
MRodz committed
646
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""paragraph""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>+&#x2003;+&#x2003;+</metamark></line>")
647
    %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=""paragraph""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>+&#x2003;+&#x2003;+</ab>")
648
    
MRodz's avatar
MRodz committed
649
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""paragraph""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>*&#x2003;*&#x2003;*</metamark></line>")
650
    %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=""paragraph""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>*&#x2003;*&#x2003;*</ab>")
651
652
653
654
655
656
    
    (: 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(*)) {
657
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
658
659
660
661
662
};

(: 3.21.12 WRITING OVER TEXT :)
declare
    %test:name("Writing over text")
MRodz's avatar
MRodz committed
663
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><mod xmlns=""http://www.tei-c.org/ns/1.0"" type=""subst""><del xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:line-through"">ſ</seg></del><del xmlns=""http://www.tei-c.org/ns/1.0"" rend=""overwritten"">eine</del><add xmlns=""http://www.tei-c.org/ns/1.0"" place=""superimposed""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>ihre</add></mod></line>")
664
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "ihre")
MRodz's avatar
MRodz committed
665
    
MRodz's avatar
MRodz committed
666
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><retrace xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>n</retrace></line>")
667
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "n")
MRodz's avatar
MRodz committed
668
    
MRodz's avatar
MRodz committed
669
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><retrace xmlns=""http://www.tei-c.org/ns/1.0"" rend=""retrace-medium:brown_ink""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>D</retrace></line>")
670
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""retrace-medium:brown_ink""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>D</seg>")
MRodz's avatar
MRodz committed
671
672
    
    function teisimple-test:analyze-overwritten($node as element(*)) {
673
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
674
};
675
676
677
678
679


(: 3.21.13 ADDITIONS :)
declare
    %test:name("Additions")
MRodz's avatar
MRodz committed
680
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><add xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>en</add></line>")
681
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "en")
682
    
683
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1.3cm""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/><mod xmlns=""http://www.tei-c.org/ns/1.0"" type=""subst""><del xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:line-through"">Mari</seg>a</del><add xmlns=""http://www.tei-c.org/ns/1.0"" place=""below"" style=""margin-left:0.2cm"">die büßende</add></mod> Magdalena</line>")
684
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "die büßende", " Magdalena")
685
686
687
688

    %test:args("<addSpan xmlns=""http://www.tei-c.org/ns/1.0"" spanTo=""#C07_1r_s"" place=""interlinear""/>")
    %test:assertEmpty
    
MRodz's avatar
MRodz committed
689
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><add xmlns=""http://www.tei-c.org/ns/1.0"" type=""edited_text"" subtype=""interlinear"" place=""above"" corresp=""#C07_62v_a""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>I.</add></line>")
690
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<add xmlns=""http://www.tei-c.org/ns/1.0"" type=""edited_text"" subtype=""interlinear"" place=""above"" corresp=""#C07_62v_a""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>I.</add>")
691
692
    
    function teisimple-test:analyze-additions($node as element(*)) {
693
        fontaneSimple:transform($node)
694
695
696
};

(: 3.21.14 TRANSPOSITIONS :)
697
698
699
(: TODO :)

(: 3.21.15 TEXT WRITTEN ABOVE AND ADDED :)
700
declare
701
    %test:name("Written above and added")
702
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1.8cm""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>junge „wenn ic<mod xmlns=""http://www.tei-c.org/ns/1.0""  type=""subst""><del xmlns=""http://www.tei-c.org/ns/1.0""  rend=""overwritten"">h</del><add xmlns=""http://www.tei-c.org/ns/1.0"">k</add></mod></line>")
703
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>","junge „wenn ic", "k")
704
    function teisimple-test:analyze-added-above($node as element(*)) {
705
        fontaneSimple:transform($node)
706
707
708
709
710
711
712
713
714
715
716
717
};

(: 3.21.16 Multiphrases :)
 
declare
    %test:name("Multiphrases")
    
    (: this test results in an error:
    java:org.exist.xquery.XPathException" message="exerr:ERROR The actual return type does not match the sequence type declared in the function's signature: test:equals(item(), item()) xs:boolean. Expected cardinality: exactly one, got 0.
    
    reason unclear since a test with an XML yielded the desired output :)
(:    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""multiphrase"" xml:id=""B02_78v_a"" corresp=""#B02_78v_b"">an<anchor xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""B02_78v_c""/>geſehenſten</seg> <add xmlns=""http://www.tei-c.org/ns/1.0"" corresp=""#B02_78v_c"" place=""above""><seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""multiphrase"" xml:id=""B02_78v_b"" corresp=""#B02_78v_a"">vornehmſten</seg></add> Financiers</line>"):)
MRodz's avatar
MRodz committed
718
(:    %test:assertEquals("<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""multiphrase"" xml:id=""B02_78v_a"" corresp=""#B02_78v_b"">an<anchor xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""B02_78v_c""/>gesehensten</seg>", " ", "<add xmlns=""http://www.tei-c.org/ns/1.0"" corresp=""#B02_78v_c"" place=""above""><seg type=""multiphrase"" xml:id=""B02_78v_b"" corresp=""#B02_78v_a"">vornehmsten</seg></add>", " Financiers"):)
719
720
721
722
    
    %test:args("<addSpan xmlns=""http://www.tei-c.org/ns/1.0"" type=""multiphrase"" subtype=""extensive"" xml:id=""D04_10r_c"" corresp=""#D04_10r_2"" spanTo=""#D04_10r_a"" place=""margin""/>")
    %test:assertEmpty
    
723
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""multiphrase"" subtype=""extensive"" xml:id=""D04_10r_2"" next=""#D04_10v_a"" corresp=""#D04_10r_c""><zone style=""border-left-style:solid""><line xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>mit einem ſlaviſch⸗ſtubs-</line></zone></zone>")
724
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "mit einem slavisch⸗stubs")  
725
    function teisimple-test:analyze-multiphrase($node as element(*)) {
726
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
727
728
729
730
731
732
733
734
};

(: 3.21.17 WRITER ABORTS TO WRITE :)
declare
    %test:name("Aborts to write")
    %test:args("<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""abort"">Nicht</seg>")
    %test:assertEmpty
    function teisimple-test:analyze-abort($node as element(*)) {
735
        fontaneSimple:transform($node)
736
737
738
739
740
741
742
743
744
};

(: 3.21.18 INSERTION MARKS :)

declare
    %test:name("Insertion marks")
    %test:args("<seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""vertical-align:super""><metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""caret"">╒</metamark></seg>")
    %test:assertEmpty
    
745
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1cm""><add xmlns=""http://www.tei-c.org/ns/1.0"" place=""above"" style=""margin-left:-0.7cm"" rend=""caret:slash""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>un</add> ventaglio ein</line>")
746
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>","un"," ventaglio ein")
747
    
MRodz's avatar
MRodz committed
748
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><add place=""above"" style=""margin-left:-0.4cm"" rend=""caret:backslash""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>aber</add></line>")
749
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "aber")
750
751
    
    function teisimple-test:analyze-insertions($node as element(*)) {
752
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
753
754
755
756
757
};

(: 3.21.19 UNDERLINE :)
declare
    %test:name("Underline")
MRodz's avatar
MRodz committed
758
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><hi xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>K<mod xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline"" rend=""underline-style:retrace"">aiſer</mod></hi></line>")
759
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<hi xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Kaiser</hi>")
MRodz's avatar
MRodz committed
760
761
    
    function teisimple-test:analyze-underline($node as element(*)) {
762
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
763
764
765
766
767
};

(: 3.21.20 VERTICAL MARKS :)
declare
    %test:name("Vertical marks")
768
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""highlighted"" style=""border-left-style:solid""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1.9cm""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Aber alles mehr</line></zone>")
769
    %test:assertEquals("<hi xmlns=""http://www.tei-c.org/ns/1.0"" type=""vertical-mark""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Aber alles mehr</hi>")
MRodz's avatar
MRodz committed
770

771
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""highlighted"" style=""border-left-style:double""><zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""highlighted"" style=""border-left-style:double""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:0.2cm""><hi xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""B11_49v_a"" next=""#B11_41v_b""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Ein<seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline"">e koloſſa</seg>le</hi></line></zone></zone>")
772
    %test:assertEquals("<hi xmlns=""http://www.tei-c.org/ns/1.0"" type=""vertical-mark""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><hi xmlns=""http://www.tei-c.org/ns/1.0""  xml:id=""B11_49v_a"" next=""#B11_41v_b""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Eine kolossale</hi></hi>")
MRodz's avatar
MRodz committed
773
774
    
    function teisimple-test:analyze-vertical-marks($node as element(*)) {
775
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
776
777
};

MRodz's avatar
MRodz committed
778
779
780
781
(: 3.21.21 SPECIAL CASES (CHARACTERS) :)
(: hyphens :)
declare
    %test:name("Special cases (hyphens)")
782
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><line xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Coſtümen, unter beſti<g ref=""#mgem"">mm</g>ter Um-</line><line xmlns=""http://www.tei-c.org/ns/1.0"">gebung.</line></zone>")
783
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "Costümen, unter besti", "mm", "ter Um", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "gebung.")    
MRodz's avatar
MRodz committed
784
    
785
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><line xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Coſtümen, unter beſti<g ref=""#mgem"">mm</g>ter Um⸗</line><line xmlns=""http://www.tei-c.org/ns/1.0"">gebung.</line></zone>")
786
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "Costümen, unter besti", "mm", "ter Um", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "gebung.")    
MRodz's avatar
MRodz committed
787
    
788
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><line xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Kunſt-Vereins-</line><lb xmlns=""http://www.tei-c.org/ns/1.0"" break=""keepHyphen""/><line xmlns=""http://www.tei-c.org/ns/1.0"">Lokal.</line></zone>")
789
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "Kunst-Vereins-", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "Lokal.")
MRodz's avatar
MRodz committed
790
    
791
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><line xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Kunſt-Vereins⸗</line><lb xmlns=""http://www.tei-c.org/ns/1.0"" break=""keepHyphen""/><line xmlns=""http://www.tei-c.org/ns/1.0"">Lokal.</line></zone>")
792
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "Kunst-Vereins⸗", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "Lokal.")
MRodz's avatar
MRodz committed
793
    
794
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><line xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>ſich durch den Baurath um<g xmlns=""http://www.tei-c.org/ns/1.0"" ref=""#vds"">⸗</g></line><line xmlns=""http://www.tei-c.org/ns/1.0"">ſtimmen; wir fahren um</line></zone>")
795
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "sich durch den Baurath um", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "stimmen; wir fahren um")
MRodz's avatar
MRodz committed
796
797
    
    function teisimple-test:analyze-hyphens($node as element(*)) {
798
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
799
800
801
802
803
};

(: tremata :)
declare
    %test:name("Special cases (tremata)")
804
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>eine blühende Aloë, eine Ananas, ei<retrace xmlns=""http://www.tei-c.org/ns/1.0"">n</retrace></line>")
805
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "eine blühende Aloë, eine Ananas, ei", "n") 
MRodz's avatar
MRodz committed
806
    
807
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Du Baste de l‘Héro&#x1e2f;ne</line>")
808
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "Du Baste de l‘Héro&#x1e2f;ne")    
MRodz's avatar
MRodz committed
809
810
    
    function teisimple-test:analyze-tremata($node as element(*)) {
811
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
812
813
814
815
816
};

(: superscript :)
declare
    %test:name("Special cases (superscript and subscript)")
MRodz's avatar
MRodz committed
817
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""vertical-align:super; text-decoration:underline""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>r</seg></line></zone>")
818
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""vertical-align:super;""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>r</seg>")     
MRodz's avatar
MRodz committed
819
    
820
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><hi xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Dinstag d. 20</seg>.</hi><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline; vertical-align:super"">ten</seg></line>")
821
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<hi xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Dinstag d. 20.</hi>","<seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""vertical-align:super"">ten</seg>") 
MRodz's avatar
MRodz committed
822
    
MRodz's avatar
MRodz committed
823
    %test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0""><line xmlns=""http://www.tei-c.org/ns/1.0""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""vertical-align:sub; text-decoration:underline""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>r</seg></line></zone>")
824
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""vertical-align:sub;""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>r</seg>")
MRodz's avatar
MRodz committed
825
826
    
    function teisimple-test:analyze-superscript($node as element(*)) {
827
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
828
};
MRodz's avatar
MRodz committed
829

MRodz's avatar
MRodz committed
830
831
832
833
834
835
836
837
838
(: spaces :)
declare
    %test:name("Special cases (spaces)")
    %test:args("<space xmlns=""http://www.tei-c.org/ns/1.0"" type=""placeholder""/>")
    %test:assertEquals("<space xmlns=""http://www.tei-c.org/ns/1.0"" type=""placeholder""/>")     
    
    %test:args("<space xmlns=""http://www.tei-c.org/ns/1.0"" type=""pause""/>")
    %test:assertEquals("<space xmlns=""http://www.tei-c.org/ns/1.0"" type=""pause""/>")       
    
MRodz's avatar
MRodz committed
839
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""placeholder""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>. . .</metamark></line>")
840
    %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=""placeholder""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>. . .</ab>")     
MRodz's avatar
MRodz committed
841
842
    
    function teisimple-test:analyze-spaces($node as element(*)) {
843
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
844
};
MRodz's avatar
MRodz committed
845

MRodz's avatar
MRodz committed
846
847
848
(: repetitions :)
declare
    %test:name("Special cases (repetitions)")
849
850
    %test:args("<add xmlns=""http://www.tei-c.org/ns/1.0"" cause=""catchword"">dem </add>")
    %test:assertEmpty
MRodz's avatar
MRodz committed
851
852
853
854
855
    
    %test:args("<add xmlns=""http://www.tei-c.org/ns/1.0"" place=""above"" style=""margin-left:-0.0cm"" copyOf=""#C05_31v_a"" cause=""unclear"">engſten</add>")
    %test:assertEmpty
    
    function teisimple-test:analyze-repetitions($node as element(*)) {
856
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
857
858
859
860
861
};

(: abbreviations :)
declare
    %test:name("Special cases (abbreviations)")
MRodz's avatar
MRodz committed
862
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><choice xmlns=""http://www.tei-c.org/ns/1.0""><abbr xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>fr.</abbr><expan xmlns=""http://www.tei-c.org/ns/1.0"">Franken</expan></choice></line>")
863
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<choice xmlns=""http://www.tei-c.org/ns/1.0""><abbr xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>fr.</abbr><expan xmlns=""http://www.tei-c.org/ns/1.0"">Franken</expan></choice>")      
MRodz's avatar
MRodz committed
864
    
865
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>6 &#x20b0;</line>")
866
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "6 &#x20b0;")  
MRodz's avatar
MRodz committed
867
868
    
    (: TODO: insert character from Fontine :)
869
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>mit Küche 60 <g xmlns=""http://www.tei-c.org/ns/1.0"" ref=""#rth"">Reichstaler</g></line>")
870
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "mit Küche 60 ", "<g xmlns=""http://www.tei-c.org/ns/1.0"" ref=""#rth"">Reichstaler</g>")     
MRodz's avatar
MRodz committed
871
    
MRodz's avatar
MRodz committed
872
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""etc.""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>...</metamark></line>")
873
    %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=""etc.""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>...</ab>")     
MRodz's avatar
MRodz committed
874
    
875
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>ſind bedeutend. 1 <seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""font-size:small""><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""vertical-align:super"">1</seg><g xmlns=""http://www.tei-c.org/ns/1.0"" ref=""#hb"">/</g><seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""vertical-align:sub"">2</seg></seg> Sgr</line>")
876
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "sind bedeutend. 1 ", "<seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""font-size:small""><seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""vertical-align:super"">1</seg><g xmlns=""http://www.tei-c.org/ns/1.0"" ref=""#hb"">/</g><seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""vertical-align:sub"">2</seg></seg>", " Sgr") 
MRodz's avatar
MRodz committed
877
878
    
    function teisimple-test:analyze-abbreviations($node as element(*)) {
879
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
880
};
MRodz's avatar
MRodz committed
881
882
883
884

(: 3.21.22 REPETITION MARKS :)
declare
    %test:name("Repetition marks")
885
    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:1.0cm""><seg xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""E01_inner_front_cover_a""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>eine</seg> Paßkarte u.</line><lb xmlns=""http://www.tei-c.org/ns/1.0"" type=""keepIndent""/></line>")
886
    %test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>", "eine", " Paßkarte u.", "<lb xmlns=""http://www.tei-c.org/ns/1.0"" type=""keepIndent""/>")      
MRodz's avatar
MRodz committed
887
888
    
    function teisimple-test:analyze-repetition-marks($node as element(*)) {
889
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
890
};
MRodz's avatar
MRodz committed
891
892
893
894
895
896
897
898
899


(: 3.21.23 NOTES :)
declare
    %test:name("Notes")
    %test:args("<note xmlns=""http://www.tei-c.org/ns/1.0"" type=""authorial"" subtype=""text""><line style=""margin-left:0.0cm"">Dies iſt nicht richtig;</line></note>")
    %test:assertEmpty  
    
    function teisimple-test:analyze-notes($node as element(*)) {
900
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
901
};
MRodz's avatar
MRodz committed
902

MRodz's avatar
MRodz committed
903
(: 3.21.24+25 CORRECTION MARKS :)
MRodz's avatar
MRodz committed
904
905
906
907
908
909
910
911
912
913
declare
    %test:name("Correction marks")
    (: TODO: find out why test doesn't work :)
(:    %test:args("<line xmlns=""http://www.tei-c.org/ns/1.0"" style=""margin-left:0.3cm"">Macchiavell. Alfieri<add xmlns=""http://www.tei-c.org/ns/1.0"" rend=""|""> </add>gefiel</line>"):)
(:    %test:assertEquals("Macchiavell. Alfieri", " ", "gefiel")  :)
    
    %test:args("<metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""connect"" rend=""arc""/>") 
    %test:assertEmpty    
    
    %test:args("<metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""paragraph"">z</metamark>") 
MRodz's avatar
MRodz committed
914
    %test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type =""paragraph""/>")
MRodz's avatar
MRodz committed
915
916
917
918
    
    %test:args("<metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""connect"" corresp=""#A19_23r_6"" target=""#A19_23r_a""><figure rend=""medium:blue_pencil""><figDesc><ref target=""http://vocab.getty.edu/aat/300200009"">Anschlusszeichen Stufe</ref></figDesc></figure></metamark>") 
    %test:assertEmpty
    
919
920
921
    %test:args("<metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""transposition"" corresp=""#A19_23r_6"" target=""#A19_23r_a""/>") 
    %test:assertEmpty
    
MRodz's avatar
MRodz committed
922
    function teisimple-test:analyze-correction-marks($node as element(*)) {
923
        fontaneSimple:transform($node)
MRodz's avatar
MRodz committed
924
925
926
927
928
929
930
931
932
933
};


(: 3.21.26 UNCLEAR CHARACTERS :)
declare
    %test:name("Unclear characters")
    %test:args("<seg xmlns=""http://www.tei-c.org/ns/1.0"" function=""unknown"">||</seg>") 
    %test:assertEmpty    
    
    function teisimple-test:analyze-unclear($node as element(*)) {