Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
fontane-notizbuecher
SADE
Commits
50be11b0
Commit
50be11b0
authored
Jun 20, 2018
by
MRodz
Committed by
mrodzis
Feb 05, 2019
Browse files
Add first draft for 3.21.19 underline
parent
258ad594
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
modules/fontane/teisimple-test.xql
View file @
50be11b0
...
...
@@ -137,7 +137,7 @@ declare
(: marking something as complete :)
%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"">3<seg xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline"">. Kapitel</seg></hi>.</line></zone>")
%test:assertEquals("<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""marked_off"" xml:id=""E04_39r_2"">
3<seg
xmlns=""http://www.tei-c.org/ns/1.0""
style=""text-decoration:underline""
>. Kapitel</
seg
>.</seg>")
%test:assertEquals("<seg xmlns=""http://www.tei-c.org/ns/1.0"" type=""marked_off"" xml:id=""E04_39r_2"">
<hi
xmlns=""http://www.tei-c.org/ns/1.0"">
3
. Kapitel</
hi
>.</seg>")
function teisimple-test:analyze-del($node as element(*)) {
fontane-simple:transform($node)
...
...
@@ -516,4 +516,14 @@ declare
function teisimple-test:analyze-insertions($node as element(*)) {
fontane-simple:transform($node)
};
(: 3.21.19 UNDERLINE :)
declare
%test:name("Underline")
%test:args("<hi xmlns=""http://www.tei-c.org/ns/1.0"">K<mod xmlns=""http://www.tei-c.org/ns/1.0"" style=""text-decoration:underline"" rend=""underline-style:retrace"">aiſer</mod></hi>")
%test:assertEquals("<hi xmlns=""http://www.tei-c.org/ns/1.0"">Kaiſer</hi>")
function teisimple-test:analyze-underline($node as element(*)) {
fontane-simple:transform($node)
};
\ No newline at end of file
modules/fontane/transform2teisimple.xqm
View file @
50be11b0
...
...
@@ -173,9 +173,11 @@ declare function fontane-simple:transform($nodes as node()*) as node()* {
case element(tei:seg)
return
if(count($node/*) = 1 and
($node/child::tei:stamp
or
or $node/child::tei:metamark[@function = "caret"]))
($node/child::tei:stamp or $node/child::tei:metamark[@function = "caret"]))
then
()
else if(matches($node/@style, "underline")) then
fontane-simple:transform($node/node())
else if($node/@type = "initials" or $node/@type = "monogram"
or $node/@style or $node/@type = "multiphrase")
then
...
...
@@ -190,6 +192,11 @@ declare function fontane-simple:transform($nodes as node()*) as node()* {
()
else
fontane-simple:transform($node/node())
case element(tei:hi) return
element tei:hi {
fontane-simple:transform($node/node())
}
case element(tei:anchor) return
$node
...
...
resources/xml/tei-simple.xml
View file @
50be11b0
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment