Commit 3435c9aa authored by MRodz's avatar MRodz Committed by mrodzis
Browse files

Fix bug in a6187015

parent 646fbae8
......@@ -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)
......
......@@ -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
......
......@@ -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=""/>
......
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