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
f14fe31a
Commit
f14fe31a
authored
Jun 29, 2018
by
MRodz
Committed by
mrodzis
Feb 05, 2019
Browse files
Add first draft for 3.22.18 written additions in print
parent
1831999c
Changes
3
Hide whitespace changes
Inline
Side-by-side
modules/fontane/tei2teisimple.xqm
View file @
f14fe31a
...
...
@@ -217,6 +217,16 @@ declare function fontaneSimple:transform($nodes as node()*) as node()* {
case element(tei:hi) return
fontaneSimpleHelpers:copy-element($node)
(: TODO if $node/@type = "highlighted" then make
a hi[@type = "vertical-mark"] in the second stage of creating the
simple format. use fontaneSimpleHelpers:get-xml-chunk($node) for this.:)
case element(tei:mod) return
if($node/@type = "highlighted"
and fontaneSimpleHelpers:is-hand-contemporary($node/@hand)) then
fontaneSimpleHelpers:copy-element($node)
else
fontaneSimple:transform($node/node())
case element(tei:anchor) return
fontaneSimpleHelpers:copy-element($node)
...
...
modules/fontane/teisimple-test.xql
View file @
f14fe31a
...
...
@@ -1000,6 +1000,17 @@ declare
};
(: 3.22.18 Print: additions in writing :)
declare
%test:name("Print: additions in writing")
%test:args("<mod xmlns=""http://www.tei-c.org/ns/1.0"" type=""highlighted"" hand=""#Fontane"" spanTo=""#C04_36rfr_a"" style=""border-right-style:solid"" rend=""border-medium:pencil""/>")
%test:assertEquals("<mod xmlns=""http://www.tei-c.org/ns/1.0"" type=""highlighted"" hand=""#Fontane"" spanTo=""#C04_36rfr_a"" style=""border-right-style:solid"" rend=""border-medium:pencil""/>")
function teisimple-test:analyze-print-writing($node as element(*)) {
fontaneSimple:transform($node)
};
(: SECTIONS :)
declare
...
...
modules/fontane/teisimplehelpers.xqm
View file @
f14fe31a
...
...
@@ -19,7 +19,7 @@ import module namespace functx = "http://www.functx.com";
:
: TODO: check if we reach backside of calendar pages at all
: @author Michelle Rodzis
: @param $hand the tei:handShift/@new to be checked
: @param $hand the tei:handShift/@new
or tei:mod/@hand
to be checked
: @return xs:boolean
: :)
declare function fontaneSimpleHelpers:is-hand-contemporary($hand as xs:string?)
...
...
@@ -321,4 +321,12 @@ as element(tei:seg) {
attribute rendition {$new-rendition},
fontaneSimple:transform($node/node())
}
};
declare function fontaneSimpleHelpers:get-xml-chunk($node as node()) as node()* {
let $target-id := substring-after($node/@spanTo, "#")
let $target := //tei:anchor[matches(@xml:id, $target-id)]
return
util:get-fragment-between($node, $target, false(), false())
};
\ No newline at end of file
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