Commit 413164be authored by MRodz's avatar MRodz Committed by mrodzis
Browse files

Add new draft that works for all index types

parent e4cc5aa6
......@@ -84,7 +84,6 @@ declare function index-info:get-full-maps() {
$index-info:wrk-map
};
declare function local:get-main-entry($ref as xs:string,
$index-type as xs:string) as map()* {
let $key := substring-after($ref, ":")
......
......@@ -882,38 +882,49 @@ $index-type as xs:string) as element()* {
for $iii in 1 to $no-of-refs
let $ref := $refs[$iii]
return
switch ($index-type)
case "eve" return ()
case "org" return
()
case "plc" return ()
case "psn" return
element tei:person {
element tei:name {text{index-info:get-info-about($index-type, $ref, "regular-name")}},
element tei:birth {text{index-info:get-info-about($index-type, $ref, "birth")}},
element tei:death {text{index-info:get-info-about($index-type, $ref, "death")}},
element tei:occupation {text{index-info:get-info-about($index-type, $ref, "occupation")}}
}
case "wrk" return
()
default return
()
(: (attribute {"regular-name-" || $iii} {index-info:get-info-about($index-type, $ref, "regular-name")},:)
(: attribute {"occs-" || $iii} {index-info:get-info-about($index-type, $ref, "occs-in-nbs")},:)
(: switch ($index-type):)
(: case "eve" return :)
(: attribute {"place-" || $iii} {index-info:get-info-about($index-type, $ref, "place")}:)
(: case "org" return :)
(: ():)
(: case "plc" return :)
(: attribute {"subref-of-" || $iii} {index-info:get-info-about($index-type, $ref, "subref-of")}:)
(: case "psn" return :)
(: (attribute {"birth-" || $iii} {index-info:get-info-about($index-type, $ref, "birth")},:)
(: attribute {"death-" || $iii} {index-info:get-info-about($index-type, $ref, "death")},:)
(: attribute {"occupation-" || $iii} {index-info:get-info-about($index-type, $ref, "occupation")}):)
(: case "wrk" return :)
(: ():)
(: default return :)
(: ()):)
element tei:index {
attribute indexName {$index-type},
element tei:term {
attribute type {"main"},
index-info:get-info-about($index-type, $ref, "regular-name")
},
switch ($index-type)
case "eve" return
let $place := index-info:get-info-about($index-type, $ref, "place")
return
fontaneSimple:make-term("place", $place)
case "org" return
()
case "plc" return
let $subref := index-info:get-info-about($index-type, $ref, "subref-of")
return
fontaneSimple:make-term("subref-of", $subref)
case "psn" return
let $birth := index-info:get-info-about($index-type, $ref, "birth")
let $death := index-info:get-info-about($index-type, $ref, "death")
let $occupation := index-info:get-info-about($index-type, $ref, "occupation")
return
(fontaneSimple:make-term("birth", $birth),
fontaneSimple:make-term("death", $death),
fontaneSimple:make-term("occupation", $occupation))
case "wrk" return
()
default return
()
}
};
declare function fontaneSimple:make-term($type as xs:string, $info as xs:string)
as element(tei:term)* {
if($info != "") then
element tei:term {
attribute type {$type},
$info
}
else
()
};
\ No newline at end of file
......@@ -115,8 +115,8 @@ declare
declare
%test:name("Persons: Transformation result")
%test:args("<rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""psn:Luther""/>")
%test:assertEquals("<rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""psn:Luther""><person xmlns=""http://www.tei-c.org/ns/1.0""><name xmlns=""http://www.tei-c.org/ns/1.0"">Luther, Martin</name><birth xmlns=""http://www.tei-c.org/ns/1.0"">1483</birth><death xmlns=""http://www.tei-c.org/ns/1.0"">1546</death><occupation xmlns=""http://www.tei-c.org/ns/1.0"">dt. Reformator</occupation></person></rs>")
%test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""psn:Luther"">Luther</rs></line>")
%test:assertEquals("<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:Luther""><index xmlns=""http://www.tei-c.org/ns/1.0"" indexName=""psn""><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""main"">Luther, Martin</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""birth"">1483</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""death"">1546</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""occupation"">dt. Reformator</term></index>Luther</rs>")
function index-info-test:events-full-reference-xml($node as element(*)) {
fontaneSimple:transform($node)
......
......@@ -132,7 +132,7 @@ declare
%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>")
%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=""9.6"" uly=""11.8"" lrx=""10.2"" lry=""13.2""><seg xmlns=""http://www.tei-c.org/ns/1.0""><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""plc:Gentzrode_Schloss""><figure xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""a18""><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>; Gentzrode, Speicher mit Wohnturm (Seitenfront)</figDesc></figure></rs></seg></zone></line>")
%test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""sketch""><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""plc:Gentzrode_Schloss""><figure xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""a18""><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>; Gentzrode, Speicher mit Wohnturm (Seitenfront)</figDesc></figure></rs></ab>")
%test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""sketch""><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""plc:Gentzrode_Schloss""><index xmlns=""http://www.tei-c.org/ns/1.0"" indexName=""plc""><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""main"">Gentzrode, Gentzrode. Speicher und Wohnturm</term></index><figure xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""a18""><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>; Gentzrode, Speicher mit Wohnturm (Seitenfront)</figDesc></figure></rs></ab>")
function teisimple-test:analyze-sketches($node as element(*)) {
......@@ -199,7 +199,7 @@ declare
%test:assertEquals("<head xmlns=""http://www.tei-c.org/ns/1.0"" style=""large"" type=""former-line"" 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"" style=""default"" type=""former-zone"" 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:assertEquals("<head xmlns=""http://www.tei-c.org/ns/1.0"" style=""default"" type=""former-zone"" 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""><index xmlns=""http://www.tei-c.org/ns/1.0"" indexName=""plc""><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""main"">Lützen</term></index>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""><index xmlns=""http://www.tei-c.org/ns/1.0"" indexName=""psn""><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""main"">Gustav II. Adolf</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""birth"">1594</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""death"">1632</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""occupation"">seit 1611 König von Schweden</term></index>Gustav Adolf</rs>. <rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""plc:Weissenfels""><index xmlns=""http://www.tei-c.org/ns/1.0"" indexName=""plc""><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""main"">Weißenfels</term></index>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""/>", "<head xmlns=""http://www.tei-c.org/ns/1.0"" style=""xx-large"" type=""former-seg""><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></head>")
......@@ -1298,10 +1298,10 @@ declare
declare
%test:name("Places")
%test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""plc:Erfurt""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Erfurt</rs></line>")
%test:assertEquals("<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=""plc:Erfurt""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Erfurt</rs>")
%test:assertEquals("<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=""plc:Erfurt""><index xmlns=""http://www.tei-c.org/ns/1.0"" indexName=""plc""><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""main"">Erfurt</term></index><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Erfurt</rs>")
%test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""indirect"" ref=""plc:Erfurt""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Erfurt</rs></line>")
%test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""indirect"" ref=""plc:Erfurt""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Erfurt</rs>")
%test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""indirect"" ref=""plc:Erfurt""><index xmlns=""http://www.tei-c.org/ns/1.0"" indexName=""plc""><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""main"">Erfurt</term></index><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Erfurt</rs>")
function teisimple-test:analyze-entity-places($node as element(*)) {
fontaneSimple:transform($node)
......@@ -1311,17 +1311,17 @@ declare
declare
%test:name("Persons")
%test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""psn:Luther""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Luther</rs></line>")
%test:assertEquals("<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:Luther""><person xmlns=""http://www.tei-c.org/ns/1.0""><name xmlns=""http://www.tei-c.org/ns/1.0"">Luther, Martin</name><birth xmlns=""http://www.tei-c.org/ns/1.0"">1483</birth><death xmlns=""http://www.tei-c.org/ns/1.0"">1546</death><occupation xmlns=""http://www.tei-c.org/ns/1.0"">dt. Reformator</occupation></person><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Luther</rs>")
%test:assertEquals("<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:Luther""><index xmlns=""http://www.tei-c.org/ns/1.0"" indexName=""psn""><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""main"">Luther, Martin</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""birth"">1483</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""death"">1546</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""occupation"">dt. Reformator</term></index><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Luther</rs>")
%test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""psn:Luebke""><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""/>W.</abbr><expan xmlns=""http://www.tei-c.org/ns/1.0"">Wilhelm</expan></choice> Lübke</rs></line>")
%test:assertEquals("<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:Luebke""><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=""""/>W.</abbr><expan xmlns=""http://www.tei-c.org/ns/1.0"">Wilhelm</expan></choice> Lübke</rs>")
%test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""indirect"" ref=""psn:Luther""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Luther</rs></line>")
%test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""indirect"" ref=""psn:Luther""><person xmlns=""http://www.tei-c.org/ns/1.0""><name xmlns=""http://www.tei-c.org/ns/1.0"">Luther, Martin</name><birth xmlns=""http://www.tei-c.org/ns/1.0"">1483</birth><death xmlns=""http://www.tei-c.org/ns/1.0"">1546</death><occupation xmlns=""http://www.tei-c.org/ns/1.0"">dt. Reformator</occupation></person><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Luther</rs>")
%test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""indirect"" ref=""psn:Luther""><index xmlns=""http://www.tei-c.org/ns/1.0"" indexName=""psn""><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""main"">Luther, Martin</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""birth"">1483</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""death"">1546</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""occupation"">dt. Reformator</term></index><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Luther</rs>")
(: this is a case where actually this tei:rs and its corresponding @next should be merged into one element.for convenience we do that in the second processing step :)
%test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><rs xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C07_12r_m"" next=""#C07_12r_n"" type=""indirect"" ref=""psn:Balthasar psn:Wilhelm_I_Graf""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>ſeinen</rs></line>")
%test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<rs xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C07_12r_m"" next=""#C07_12r_n"" type=""indirect"" ref=""psn:Balthasar psn:Wilhelm_I_Graf""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>seinen</rs>")
%test:assertEquals("<milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/>", "<rs xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""C07_12r_m"" next=""#C07_12r_n"" type=""indirect"" ref=""psn:Balthasar psn:Wilhelm_I_Graf""><index xmlns=""http://www.tei-c.org/ns/1.0"" indexName=""psn""><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""main"">Balthasar von Wettin</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""birth"">1336</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""death"">1406</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""occupation"">Landgraf von Thüringen und Markgraf von Meißen</term></index><index xmlns=""http://www.tei-c.org/ns/1.0"" indexName=""psn""><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""main"">Wilhelm I. (gen. der Einäugige)</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""birth"">1343 oder 1346</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""death"">1407</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""occupation"">Markgraf von Meißen</term></index><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>seinen</rs>")
function teisimple-test:analyze-entity-persons($node as element(*)) {
fontaneSimple:transform($node)
......@@ -1332,7 +1332,7 @@ declare
declare
%test:name("Works")
%test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""wrk:Ein_feste_Burg""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Ein’ feste Burg ist unser Gott</rs></line>")
%test:assertEquals("<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=""wrk:Ein_feste_Burg""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Ein’ feste Burg ist unser Gott</rs>")
%test:assertEquals("<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=""wrk:Ein_feste_Burg""><index xmlns=""http://www.tei-c.org/ns/1.0"" indexName=""wrk""><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""main"">Ein’ feste Burg ist unser Gott</term></index><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Ein’ feste Burg ist unser Gott</rs>")
function teisimple-test:analyze-entity-works($node as element(*)) {
fontaneSimple:transform($node)
......@@ -1343,7 +1343,7 @@ declare
declare
%test:name("Organisations")
%test:args("<line xmlns=""http://www.tei-c.org/ns/1.0""><rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""org:Schmalkaldischer_Bund""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane""/>Schmalkaldischer Bund</rs></line>")
%test:assertEquals("<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=""org:Schmalkaldischer_Bund""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Schmalkaldischer Bund</rs>")
%test:assertEquals("<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=""org:Schmalkaldischer_Bund""><index xmlns=""http://www.tei-c.org/ns/1.0"" indexName=""org""><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""main"">Schmalkaldischer Bund</term></index><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" script="""" medium=""""/>Schmalkaldischer Bund</rs>")
function teisimple-test:analyze-entity-organisations($node as element(*)) {
fontaneSimple:transform($node)
......@@ -1355,7 +1355,7 @@ declare
declare
%test:name("Sketches")
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" type=""illustration"" ulx=""0.0"" uly=""2.4"" lrx=""9.4"" lry=""16.7""><figure xml:id=""a19""><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/300034158"">Grundriss</ref> von <rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""indirect"" ref=""plc:Schloss_Cunersdorf"">Schloss Cunersdorf</rs></figDesc></figure></zone>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""sketch""><figure xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""a19""><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/300034158"">Grundriss</ref> von <rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""indirect"" ref=""plc:Schloss_Cunersdorf"">Schloss Cunersdorf</rs></figDesc></figure></ab>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""sketch""><figure xmlns=""http://www.tei-c.org/ns/1.0"" xml:id=""a19""><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/300034158"">Grundriss</ref> von <rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""indirect"" ref=""plc:Schloss_Cunersdorf""><index xmlns=""http://www.tei-c.org/ns/1.0"" indexName=""plc""><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""main"">Schloss Cunersdorf</term><term xmlns=""http://www.tei-c.org/ns/1.0"" type=""subref-of"">Kunersdorf (heute: Ortsteil der Gemeinde Bliesdorf), Friedland-Cunersdorff</term></index>Schloss Cunersdorf</rs></figDesc></figure></ab>")
function teisimple-test:analyze-entity-sketches($node as element(*)) {
fontaneSimple:transform($node)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment