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

Merge branch 'bugfix/rdgMarks-bdn-SADE#45' into 'develop'

Place editorial comments in separate element

See merge request !2
parents 3926b8df 0b861542
No related branches found
No related tags found
1 merge request!2Place editorial comments in separate element
...@@ -51,7 +51,9 @@ declare function pre:preprocessing-textNode ...@@ -51,7 +51,9 @@ declare function pre:preprocessing-textNode
element{$node/name()}{ element{$node/name()}{
$node/@*, $node/@*,
pre:preprocessing-textNode($node/node()), pre:preprocessing-textNode($node/node()),
element{"editorial-notes"}{} element{"editorial-notes"}{
$node//note[@type eq "editorial-commentary"]
}
} }
) )
...@@ -141,7 +143,7 @@ declare function pre:default-element ...@@ -141,7 +143,7 @@ declare function pre:default-element
: @author Uwe Sikora : @author Uwe Sikora
:) :)
declare function pre:preprocessing declare function pre:preprocessing
($nodes as node()*, $replace-whitespace as xs:boolean) ($nodes as node()*, $replace-whitespace as xs:boolean)
as item()* { as item()* {
for $node in $nodes for $node in $nodes
...@@ -164,7 +166,11 @@ declare function pre:preprocessing ...@@ -164,7 +166,11 @@ declare function pre:preprocessing
element{$node/name()}{ element{$node/name()}{
$node/@*, $node/@*,
pre:preprocessing($node/node(), $replace-whitespace), pre:preprocessing($node/node(), $replace-whitespace),
element{"editorial-notes"}{} element{"editorial-notes"}{
for $editorial-note in $node//note[@type eq "editorial-commentary"]
return
pre:default-element( $editorial-note, pre:preprocessing($editorial-note/node(), $replace-whitespace) )
}
} }
) )
...@@ -179,26 +185,26 @@ declare function pre:preprocessing ...@@ -179,26 +185,26 @@ declare function pre:preprocessing
$node/@*, $node/@*,
attribute id {generate-id($node)}, attribute id {generate-id($node)},
pre:preprocessing($node/node(), $replace-whitespace) pre:preprocessing($node/node(), $replace-whitespace)
} }
else if ($node[not(@type)][not(descendant::div)]) then else if ($node[not(@type)][not(descendant::div)]) then
element{$node/name()}{ element{$node/name()}{
attribute type {"single-div"}, attribute type {"single-div"},
attribute id {generate-id($node)}, attribute id {generate-id($node)},
pre:preprocessing($node/node(), $replace-whitespace) pre:preprocessing($node/node(), $replace-whitespace)
} }
else ( else (
pre:default-element( $node, pre:preprocessing($node/node(), $replace-whitespace) ) pre:default-element( $node, pre:preprocessing($node/node(), $replace-whitespace) )
) )
) )
case element(app) return case element(app) return
if($node/parent::div[@type = "section-group"]) then if($node/parent::div[@type = "section-group"]) then
element{$node/name()}{ element{$node/name()}{
attribute type {"standalone"}, attribute type {"standalone"},
attribute id {generate-id($node)}, attribute id {generate-id($node)},
pre:preprocessing($node/node(), $replace-whitespace) pre:preprocessing($node/node(), $replace-whitespace)
} }
else else
pre:default-element( $node, pre:preprocessing($node/node(), $replace-whitespace) ) pre:default-element( $node, pre:preprocessing($node/node(), $replace-whitespace) )
...@@ -219,7 +225,11 @@ declare function pre:preprocessing ...@@ -219,7 +225,11 @@ declare function pre:preprocessing
) )
case element(note) return ( case element(note) return (
pre:default-element( $node, pre:preprocessing($node/node(), $replace-whitespace) ) if ( $node[@type != "editorial-commentary"] or $node[ not(@type) ] ) then (
pre:default-element( $node, pre:preprocessing($node/node(), $replace-whitespace) )
) else ( )
(: pre:default-element( $node, pre:preprocessing($node/node(), $replace-whitespace) ):)
) )
case element(pb) return ( case element(pb) return (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment