diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..716617105b8206ea0922bebeed003f4917c75800 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# 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 diff --git a/build.properties b/build.properties index 9560ec6a6ab78bc48f5db8e6807730918a0b74a4..dc32c9ca130c09a2ad1ac774bcfc159543cb1abb 100644 --- a/build.properties +++ b/build.properties @@ -1,8 +1,8 @@ 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.abbrev=interformat-develop -project.processorversion=4.5.0 +project.processorversion=4.6.0 destfile=${build.dir}/${project.abbrev}-${project.version}.xar test.dir=test diff --git a/modules/intermediate_format/ifweb.xql b/modules/intermediate_format/ifweb.xql index efb955fdf56d8941a740f6afc9fab8842e302ded..356dad32121fb6c1b0f4216c0f6a952f5c3f2e50 100644 --- a/modules/intermediate_format/ifweb.xql +++ b/modules/intermediate_format/ifweb.xql @@ -64,6 +64,7 @@ $target-dir as xs:string) as node()* { declare function ifweb:transform-split-xml($xml as node()*, $filename as xs:string, $dir as xs:string) { 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, ()) (: sometimes we have structural variance on chapter level - in these cases @@ -84,7 +85,8 @@ $dir as xs:string) { let $transformed := element tei:div { - $content + $content, + $editorial-notes } let $store := xmldb:store($dir, $filename, $transformed) diff --git a/modules/intermediate_format/preprocessing.xqm b/modules/intermediate_format/preprocessing.xqm index 54c89ac0d44ca5378819385294ae6d646d70fb09..03a0cd4efba0d93c011579c14a5c1d806a10f9b6 100644 --- a/modules/intermediate_format/preprocessing.xqm +++ b/modules/intermediate_format/preprocessing.xqm @@ -51,9 +51,7 @@ declare function pre:preprocessing-textNode element{$node/name()}{ $node/@*, pre:preprocessing-textNode($node/node()), - element{"editorial-notes"}{ - $node//note[@type eq "editorial-commentary"] - } + pre:get-editorial-notes($node, $replace-whitespace) } ) @@ -166,11 +164,7 @@ declare function pre:preprocessing element{$node/name()}{ $node/@*, pre:preprocessing($node/node(), $replace-whitespace), - 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) ) - } + pre:get-editorial-notes($node, $replace-whitespace) } ) @@ -298,7 +292,7 @@ declare function pre:preprocessing } ) else if($node[@type = 'cell']) then( - element {'row'} { + element {'cell'} { $node/@*[name() != 'type'], pre:preprocessing($node/node(), $replace-whitespace) } @@ -312,3 +306,16 @@ declare function pre:preprocessing 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)) + } +};