Skip to content
Snippets Groups Projects
Commit bfdcbc15 authored by Michelle Weidling's avatar Michelle Weidling :blowfish:
Browse files

Add types to tei:app and tei:diff (cf. bdn-SADE@c1c3ed94)

parent 3deab9dc
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ xquery version "3.0";
: @version 2.0 (2018-01-29)
: @status working
: @author Uwe Sikora
: @author Michelle Weidling
:)
module namespace pre="http://bdn-edition.de/intermediate_format/preprocessing";
import module namespace whitespace = "http://bdn-edition.de/intermediate_format/whitespace_handling" at "whitespace-handling.xqm";
......@@ -176,14 +177,30 @@ declare function pre:preprocessing
else if($node[@type]) then
element{$node/name()}{
$node/@*,
attribute {"id"}{ generate-id($node)},
attribute id {generate-id($node)},
pre:preprocessing($node/node(), $replace-whitespace)
}
}
else if ($node[not(@type)][not(descendant::div)]) then
element{$node/name()}{
attribute type {"single-div"},
attribute id {generate-id($node)},
pre:preprocessing($node/node(), $replace-whitespace)
}
else (
pre:default-element( $node, pre:preprocessing($node/node(), $replace-whitespace) )
)
)
case element(app) return
if($node/parent::div[@type = "section-group"]) then
element{$node/name()}{
attribute type {"standalone"},
attribute id {generate-id($node)},
pre:preprocessing($node/node(), $replace-whitespace)
}
else
pre:default-element( $node, pre:preprocessing($node/node(), $replace-whitespace) )
case element(lem) return (
element{$node/name()}{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment