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
6ce18514
Commit
6ce18514
authored
Dec 11, 2018
by
mrodzis
🌿
Browse files
Add test for Friedrich Fontane's TOCs
parent
6b7cd392
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/fontane/teisimpleprint/tests/tidysimple-test.xql
View file @
6ce18514
...
...
@@ -34,7 +34,7 @@ declare
%test:args("<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=""handshift"" subtype=""#fremde_Hand3"" rend=""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(*)) {
function tidysimple-test:handShift-invalid
-nodes
($node as element(*)) {
tidySimple:sort-out-invalid-hands($node)
};
...
...
@@ -80,4 +80,18 @@ declare
function tidysimple-test:tidying($node as element(*)) {
tidySimple:sort-out-surplus-elements($node)
};
(: TOC by Friedrich Fontane :)
declare
%test:name("TOC by Friedrich Fontane")
%test:args("<list type=""toc"" subtype=""Friedrich_Fontane""><milestone unit=""handshift"" subtype=""#Archivar2"" rend=""script() medium()""/><milestone unit=""line""/><milestone unit=""handshift"" subtype=""#Friedrich_Fontane"" rend=""script() medium(blue_ink)""/><milestone unit=""line""/>Material zu<milestone unit=""handshift"" subtype=""#Friedrich_Fontane"" rend=""script(Latn) medium()""/><item>Ellernklipp</item><milestone unit=""handshift"" subtype=""#Friedrich_Fontane"" rend=""script(Latn) medium(black_ink)""/><item><ref target=""#xpath(//surface[@n='21r'])"">Wanderungen (Spreeland)</ref></item><milestone unit=""handshift"" subtype=""#Fontane"" rend=""script(Latf) medium(pencil)""/></list>")
%test:assertEquals("<list type=""toc"" subtype=""Friedrich_Fontane""><milestone unit=""line""/><milestone unit=""handshift"" subtype=""#Friedrich_Fontane"" rend=""script() medium(blue_ink)""/><milestone unit=""line""/>Material zu<milestone unit=""handshift"" subtype=""#Friedrich_Fontane"" rend=""script(Latn) medium()""/><item>Ellernklipp</item><milestone unit=""handshift"" subtype=""#Friedrich_Fontane"" rend=""script(Latn) medium(black_ink)""/><item><ref target=""#xpath(//surface[@n='21r'])"">Wanderungen (Spreeland)</ref></item><milestone unit=""handshift"" subtype=""#Fontane"" rend=""script(Latf) medium(pencil)""/></list>")
function tidysimple-test:toc-by-friedrich($node as element(*)) {
tidySimple:sort-out-invalid-hands($node)
=> tidySimple:sort-out-surplus-elements()
=> tidySimple:whitespaces()
=> tidySimple:split-headings()
};
\ 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