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
67cf878e
Commit
67cf878e
authored
Nov 12, 2018
by
MRodz
Committed by
mrodzis
Feb 05, 2019
Browse files
Add sorting and debug element creation
parent
8489b41d
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/fontane/teisimpleprint/tidysimple.xqm
View file @
67cf878e
...
...
@@ -20,6 +20,7 @@ declare namespace test="http://exist-db.org/xquery/xqsuite";
import module namespace config="http://textgrid.de/ns/SADE/config" at "../../config/config.xqm";
import module namespace console="http://exist-db.org/xquery/console";
import module namespace functx="http://www.functx.com";
import module namespace presort="http://fontane-nb.dariah.eu/presort" at "presort.xqm";
import module namespace simpleHelpers="http://fontane-nb.dariah.eu/teisimplehelpers" at "teisimplehelpers.xqm";
...
...
@@ -34,6 +35,7 @@ declare function tidySimple:main($tei as node()*) {
let $tidy := tidySimple:sort-out-invalid-hands($tei//tei:text)
=> tidySimple:sort-out-surplus-elements()
=> tidySimple:whitespaces()
=> tidySimple:sort()
(: let $text-with-sections := tidySimple:make-structure($clear-surplus-hands):)
let $header := $tei/tei:teiHeader
return
...
...
@@ -180,7 +182,7 @@ declare function tidySimple:copy-element($node as node(), $flag as xs:string)
: :)
declare function tidySimple:clear-handshift($node as element(tei:milestone))
as element(tei:milestone) {
element
tei:milestone
{
element
{QName("http://www.tei-c.org/ns/1.0", $node/name())}
{
attribute unit {"handshift"},
if($node/@subtype = "") then
()
...
...
@@ -334,4 +336,9 @@ declare function tidySimple:whitespaces($nodes as node()*) as node()* {
(),
tidySimple:whitespaces($node/node())
}
};
declare function tidySimple:sort($nodes as node()*) as node()* {
presort:main($nodes)
};
\ 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