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

Merge branch 'release/1.1.1'

parents 2531bba3 3f78738c
No related branches found
No related tags found
No related merge requests found
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased]
## v1.1.1 - 2019-02-27
### Fixed
- fix bug in tei:row handling
project.name=http://bdn-edition.de/intermediate_format-develop project.name=http://bdn-edition.de/intermediate_format-develop
project.version=1.1.0 project.version=1.1.1
project.title=BdN Intermediate Format project.title=BdN Intermediate Format
project.abbrev=interformat-develop project.abbrev=interformat-develop
project.processorversion=4.5.0 project.processorversion=4.6.0
destfile=${build.dir}/${project.abbrev}-${project.version}.xar destfile=${build.dir}/${project.abbrev}-${project.version}.xar
test.dir=test test.dir=test
...@@ -64,6 +64,7 @@ $target-dir as xs:string) as node()* { ...@@ -64,6 +64,7 @@ $target-dir as xs:string) as node()* {
declare function ifweb:transform-split-xml($xml as node()*, $filename as xs:string, declare function ifweb:transform-split-xml($xml as node()*, $filename as xs:string,
$dir as xs:string) { $dir as xs:string) {
let $preprocessed-data := pre:preprocessing($xml/*, $ifweb:replace-whitespace) let $preprocessed-data := pre:preprocessing($xml/*, $ifweb:replace-whitespace)
let $editorial-notes := pre:get-editorial-notes($xml/*, $ifweb:replace-whitespace)
let $intermediate-format := ident:walk($preprocessed-data, ()) let $intermediate-format := ident:walk($preprocessed-data, ())
(: sometimes we have structural variance on chapter level - in these cases (: sometimes we have structural variance on chapter level - in these cases
...@@ -84,7 +85,8 @@ $dir as xs:string) { ...@@ -84,7 +85,8 @@ $dir as xs:string) {
let $transformed := let $transformed :=
element tei:div { element tei:div {
$content $content,
$editorial-notes
} }
let $store := xmldb:store($dir, $filename, $transformed) let $store := xmldb:store($dir, $filename, $transformed)
......
...@@ -51,9 +51,7 @@ declare function pre:preprocessing-textNode ...@@ -51,9 +51,7 @@ 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"}{ pre:get-editorial-notes($node, $replace-whitespace)
$node//note[@type eq "editorial-commentary"]
}
} }
) )
...@@ -166,11 +164,7 @@ declare function pre:preprocessing ...@@ -166,11 +164,7 @@ 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"}{ pre:get-editorial-notes($node, $replace-whitespace)
for $editorial-note in $node//note[@type eq "editorial-commentary"]
return
pre:default-element( $editorial-note, pre:preprocessing($editorial-note/node(), $replace-whitespace) )
}
} }
) )
...@@ -298,7 +292,7 @@ declare function pre:preprocessing ...@@ -298,7 +292,7 @@ declare function pre:preprocessing
} }
) )
else if($node[@type = 'cell']) then( else if($node[@type = 'cell']) then(
element {'row'} { element {'cell'} {
$node/@*[name() != 'type'], $node/@*[name() != 'type'],
pre:preprocessing($node/node(), $replace-whitespace) pre:preprocessing($node/node(), $replace-whitespace)
} }
...@@ -312,3 +306,16 @@ declare function pre:preprocessing ...@@ -312,3 +306,16 @@ declare function pre:preprocessing
pre:default-element( $node, pre:preprocessing($node/node(), $replace-whitespace) ) pre:default-element( $node, pre:preprocessing($node/node(), $replace-whitespace) )
) )
}; };
(:~
: Returns all editorial notes of a document in a new element.
:
: @author Michelle Weidling :)
declare function pre:get-editorial-notes($node as node()*, $replace-whitespace)
as 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))
}
};
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