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

Place editorial comments in separate element

Although we once changed this and placed the comments right where there are
encoded, this leads to problems with the blocklevel element processing in the
digital view of the website: rdgMarkers seem to disappear because they are
sorted into the editorial comments.

Therefore we decided to revert the changes once made. This will have to be
considered for the print edition also.
parent 2a25323b
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
element{$node/name()}{
$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
: @author Uwe Sikora
:)
declare function pre:preprocessing
($nodes as node()*, $replace-whitespace as xs:boolean)
($nodes as node()*, $replace-whitespace as xs:boolean)
as item()* {
for $node in $nodes
......@@ -164,7 +166,11 @@ declare function pre:preprocessing
element{$node/name()}{
$node/@*,
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
$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) )
......@@ -219,7 +225,11 @@ declare function pre:preprocessing
)
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 (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment