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
3435c9aa
Commit
3435c9aa
authored
Jul 25, 2018
by
MRodz
Committed by
mrodzis
Feb 05, 2019
Browse files
Fix bug in
a6187015
parent
646fbae8
Changes
3
Hide whitespace changes
Inline
Side-by-side
modules/fontane/teisimpleprint/tests/tidysimple-test.xql
View file @
3435c9aa
...
...
@@ -29,7 +29,10 @@ declare
%test:assertEquals("<body xmlns=""http://www.tei-c.org/ns/1.0""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/></body>")
%test:args("<body xmlns=""http://www.tei-c.org/ns/1.0""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Friedrich_Fontane"" medium=""black_ink"" script=""Latn clean""/><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"">Dieses Buch hat 52 Blatt.</seg><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line""/><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#Fontane"" medium=""black_ink"" script=""Latn clean""/><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""paragraph""/><seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""font-size:small"">Text von Fontane</seg><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""paragraph""/></body>")
%test:assertEquals("<body xmlns=""http://www.tei-c.org/ns/1.0""><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"" medium=""black_ink"" script=""Latn clean""/><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""paragraph""/><seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""font-size:small"">Text von Fontane</seg><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""paragraph""/></body>")
%test:assertEquals("<body xmlns=""http://www.tei-c.org/ns/1.0""><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"" medium=""black_ink"" script=""Latn clean""/><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""paragraph""/><seg xmlns=""http://www.tei-c.org/ns/1.0"" rendition=""font-size:small"">Text von Fontane</seg><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""paragraph""/></body>")
%test:args("<div xmlns=""http://www.tei-c.org/ns/1.0"" type=""label"" xml:id=""a4""><handShift xmlns=""http://www.tei-c.org/ns/1.0"" new=""#fremde_Hand3"" script=""Latn clean"" medium=""""/><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line"" rendition=""align(center)""/>✓ </div>")
%test:assertEquals("<div xmlns=""http://www.tei-c.org/ns/1.0"" type=""label"" xml:id=""a4""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line"" rendition=""align(center)""/></div>")
function tidysimple-test:handShift-invalid($node as element(*)) {
tidySimple:sort-out-invalid-hands($node)
...
...
modules/fontane/teisimpleprint/tidysimple.xqm
View file @
3435c9aa
...
...
@@ -58,7 +58,11 @@ as node()* {
for $node in $nodes return
typeswitch ($node)
case text() return
$node
if($node/preceding::tei:handShift[1]
and not(simpleHelpers:is-hand-valid($tidySimple:valid-hands, $node/preceding::tei:handShift[1]))) then
()
else
$node
case element(tei:handShift) return
if(simpleHelpers:is-hand-valid($tidySimple:valid-hands, $node)) then
...
...
resources/xml/tei-simple-tmp.xml
View file @
3435c9aa
...
...
@@ -4,7 +4,8 @@
<front>
<pb
type=
"outer_front_cover"
/>
<tei:div
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
type=
"label"
xml:id=
"a4"
>
<tei:milestone
unit=
"line"
rendition=
"align(center)"
/>
✓
<tei:handShift
new=
"#Fontane"
medium=
"black_ink thick_pen"
script=
""
/>
<tei:milestone
unit=
"line"
rendition=
"align(center)"
/>
<tei:handShift
new=
"#Fontane"
medium=
"black_ink thick_pen"
script=
""
/>
<tei:seg
type=
"heading"
>
<tei:seg
rendition=
"font-size:xx-large; font-weight:bold"
>
<tei:seg
rendition=
"letter-spacing:0.2cm"
>
...
...
@@ -43,7 +44,8 @@
</front>
<body>
<pb
n=
"1r"
/>
<tei:milestone
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
unit=
"line"
/>
<tei:handShift
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
new=
"#Fontane"
script=
"Latf standard"
medium=
""
/>
<tei:milestone
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
unit=
"line"
/>
<tei:handShift
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
new=
"#Fontane"
script=
"Latf standard"
medium=
""
/>
<tei:handShift
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
new=
"#Fontane"
script=
""
medium=
""
/>
<tei:div
xmlns:tei=
"http://www.tei-c.org/ns/1.0"
type=
"section"
>
<tei:handShift
script=
"Latn clean"
new=
"#Fontane"
medium=
""
/>
...
...
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