Commit 149f2b00 authored by MRodz's avatar MRodz Committed by mrodzis
Browse files

Add 3.21.27 footnote marks and footnotes

parent 009b323c
......@@ -410,10 +410,10 @@ declare
(: horizontal lines with stars or plus-signs :)
%test:args("<metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""paragraph"">+&#x2003;+&#x2003;+</metamark>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""paragraph-line-special"">+&#x2003;+&#x2003;+</ab>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""paragraph"">+&#x2003;+&#x2003;+</ab>")
%test:args("<metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""paragraph"">*&#x2003;*&#x2003;*</metamark>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""paragraph-line-special"">*&#x2003;*&#x2003;*</ab>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""paragraph"">*&#x2003;*&#x2003;*</ab>")
(: unsure cases :)
%test:args("<zone xmlns=""http://www.tei-c.org/ns/1.0"" ulx=""0.7"" uly=""6.3"" lrx=""9.3"" lry=""6.0""><figure xmlns=""http://www.tei-c.org/ns/1.0""><figDesc xmlns=""http://www.tei-c.org/ns/1.0""><ref xmlns=""http://www.tei-c.org/ns/1.0"" target=""http://vocab.getty.edu/aat/300200009"">vertikale einfache Abgrenzungslinie</ref> (unsicher)</figDesc></figure></zone>")
......@@ -698,4 +698,18 @@ declare
function teisimple-test:analyze-unclear($node as element(*)) {
fontane-simple:transform($node)
};
(: 3.21.27 FOOTNOTE MARKS AND FOOTNOTES :)
declare
%test:name("Footnote marks and footnotes")
%test:args("<note xmlns=""http://www.tei-c.org/ns/1.0"" type=""authorial"" subtype=""footnote""><line xmlns=""http://www.tei-c.org/ns/1.0""><metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""caret"">*</metamark> Das Bild von der Havel-Luch Entwäſſerung</line></note>")
%test:assertEquals("<note xmlns=""http://www.tei-c.org/ns/1.0"" type=""authorial"" subtype=""footnote""><ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""caret"">*</ab> Das Bild von der Havel-Luch Entwässerung</note>")
%test:args("<metamark xmlns=""http://www.tei-c.org/ns/1.0"" function=""footnotes""><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 Fußnotenlinie</ref></figDesc></figure></metamark>")
%test:assertEquals("<ab xmlns=""http://www.tei-c.org/ns/1.0"" type=""footnotes""/>")
function teisimple-test:analyze-footnote-marks($node as element(*)) {
fontane-simple:transform($node)
};
\ No newline at end of file
......@@ -271,16 +271,16 @@ declare function fontane-simple:transform($nodes as node()*) as node()* {
element tei:ab {
$node/@*
}
else if($node/@function = "paragraph") then
element tei:ab {
attribute type {"paragraph-line-special"},
fontane-simple:transform($node/node())
}
else if($node/@function = "placeholder" or $node/@function ="etc.") then
else if($node/@function = "placeholder"
or $node/@function ="etc."
or $node/@function ="caret"
or $node/@function ="footnotes"
or $node/@function ="ellipsis"
or $node/@function = "paragraph") then
element tei:ab {
attribute type {$node/@function},
fontane-simple:transform($node/node())
}
}
else
()
......@@ -368,10 +368,11 @@ declare function fontane-simple:transform($nodes as node()*) as node()* {
local:keep-element($node)
case element(tei:note) return
if($node/@type = "authorial") then
if($node/@type = "authorial"
and not($node/@subtype = "footnote")) then
()
else
fontane-simple:transform($node/node())
local:keep-element($node)
case element(tei:figDesc) return
local:keep-element($node)
......
......@@ -860,7 +860,7 @@
<handShift script="clean"/>
<tei:ab type="caret"></tei:ab>
......@@ -928,7 +928,7 @@
Wittenberg</hi>
.
<tei:ab type="caret"></tei:ab>
......
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