Dear Gitlab users, due to maintenance reasons, Gitlab will not be available on Thursday 30.09.2021 from 5:00 pm to approximately 5:30 pm.

Commit 66201ff3 authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

Release 4.9.0

\## edited text
* improved view
* whitespaces

\## index
* sort work items inside personal entity view
* add name of parent item (places) to list and @title on very long entity paths
* fix issue searching for work entries
* style nested entities
* fake relation to Fontane on work items in list @type='Fontane'

\## commentary
* editorial commentary on sketches

\## transcription
* new feature: present reverted overwritings
* add stamp: Deutsche Bibliothek Theodor-Fontane-Archiv
* special styling for initials
* improved tei:mod with multiple instruction in @style
* bugfix: highlighted areas

\## Bugfixes
* #114 #113 #109 #110 #119 #117 #105
parents 7d5e14e4 39447953
project.name=http://textgrid.de/ns/SADE-fontane-develop project.name=http://textgrid.de/ns/SADE-fontane-develop
project.version=4.8.0 project.version=4.9.0
project.title=[Fontane] SADE project.title=[Fontane] SADE
project.abbrev=SADE-fontane-develop project.abbrev=SADE-fontane-develop
project.processorversion=4.7.0 project.processorversion=4.7.0
......
...@@ -13,6 +13,7 @@ xquery version "3.1"; ...@@ -13,6 +13,7 @@ xquery version "3.1";
module namespace etTransfo="http://fontane-nb.dariah.eu/etTransfo"; module namespace etTransfo="http://fontane-nb.dariah.eu/etTransfo";
declare namespace err="http://www.w3.org/2005/xqt-errors";
declare namespace tei="http://www.tei-c.org/ns/1.0"; declare namespace tei="http://www.tei-c.org/ns/1.0";
declare namespace xi="http://www.w3.org/2001/XInclude"; declare namespace xi="http://www.w3.org/2001/XInclude";
...@@ -29,14 +30,14 @@ import module namespace tidySimple ="http://fontane-nb.dariah.eu/tidysimple" at ...@@ -29,14 +30,14 @@ import module namespace tidySimple ="http://fontane-nb.dariah.eu/tidysimple" at
declare variable $etTransfo:cases := declare variable $etTransfo:cases :=
( (
(: "3qtcz.xml", (: case C :):) "3qtcz.xml", (: case C :)
"3qtqv.xml" (: case A :) "3qtqv.xml", (: case A :)
(: "3qtqw.xml" (: case B :) :) "3qtqw.xml", (: case B :)
(: "3qtqx.xml" (: case D :):) "3qtqx.xml", (: case D :)
(: "3qtqz.xml" (: case E :):) "3qtqz.xml" (: case E :)
); );
declare variable $etTransfo:dir := "/db/apps/SADE/modules/fontane/edited-text/"; declare variable $etTransfo:coll := "/db/apps/SADE/modules/fontane/edited-text/";
(:~ (:~
...@@ -47,6 +48,8 @@ declare variable $etTransfo:dir := "/db/apps/SADE/modules/fontane/edited-text/"; ...@@ -47,6 +48,8 @@ declare variable $etTransfo:dir := "/db/apps/SADE/modules/fontane/edited-text/";
: @return An intermediate TEI/XML with all notebooks in it in /db/sade-projects/textgrid/data/print/xml/fontane-full.xml : @return An intermediate TEI/XML with all notebooks in it in /db/sade-projects/textgrid/data/print/xml/fontane-full.xml
:) :)
declare function etTransfo:complete() { declare function etTransfo:complete() {
etTransfo:assure-coll-available("print"),
etTransfo:assure-coll-available("log"),
for $case in $etTransfo:cases return for $case in $etTransfo:cases return
(etTransfo:create-case($case), (etTransfo:create-case($case),
etTransfo:create-htmls($case)), etTransfo:create-htmls($case)),
...@@ -56,7 +59,41 @@ declare function etTransfo:complete() { ...@@ -56,7 +59,41 @@ declare function etTransfo:complete() {
} catch * { } catch * {
error(QName("error", "ETTRANSFO02"), "An error occured while creating the whole TEI base for print.") error(QName("error", "ETTRANSFO02"), "An error occured while creating the whole TEI base for print.")
}, },
etTransfo:tidy-logs() etTransfo:tidy-logs(),
try {
etTransfo:report-errors()
} catch * {
error(QName("error", "ETTRANSFO15"), "An error occured while reporting errors.")
}
};
(:~
: A function to trigger the creation of the edited text for a single notebook.
: Mainly used for parallel creation of the notebooks.
:
: @param $uri The notebook's URI, e.g. "16b00" :)
declare function etTransfo:transform-single-nb($uri as xs:string) as xs:string* {
let $assure-dir-available := etTransfo:assure-coll-available("print")
let $assure-dir-available := etTransfo:assure-coll-available("log")
let $log := util:log-system-out("Start creating edited text for " || $uri)
let $log := etTransfo:create-log($uri)
let $tei := doc($config:data-root || "/data/" || $uri || ".xml")//tei:TEI
let $updated-notebook :=
element tei:TEI {
attribute id {$uri},
$tei/@*,
$tei/*
}
return
(try {
etTransfo:transform-tei($updated-notebook, $log)
} catch * {
etTransfo:add-log-entry($log, "ETTRANSFO08: Couldn't transform TEI. ")
},
etTransfo:tidy-logs())
}; };
...@@ -74,14 +111,12 @@ declare function etTransfo:create-case($showcase as xs:string) as xs:string { ...@@ -74,14 +111,12 @@ declare function etTransfo:create-case($showcase as xs:string) as xs:string {
} catch * { } catch * {
error(QName("error", "ETTRANSFO03"), "An error occured while opening " || $showcase || ".") error(QName("error", "ETTRANSFO03"), "An error occured while opening " || $showcase || ".")
} }
let $log := etTransfo:create-log($doc//tei:title[1] => replace(" ", "-"))
let $log := util:log-system-out("Start creating case " || $showcase || " (" || $doc//tei:title[1] || ").")
let $new-filename := $doc//tei:title[1] => replace(" ", "-") || ".xml" let $new-filename := $doc//tei:title[1] => replace(" ", "-") || ".xml"
let $assure-dir-available := let $assure-dir-available := etTransfo:assure-coll-available("print")
if(xmldb:collection-available($config:data-root || "/print/")) then
()
else
(xmldb:create-collection($config:data-root, "/print"),
xmldb:create-collection($config:data-root || "/print/", "xml"),
xmldb:create-collection($config:data-root || "/print/", "xhtml"))
let $create-new-file := xmldb:store($config:data-root || "/print/xml/", $new-filename, $doc/*) let $create-new-file := xmldb:store($config:data-root || "/print/xml/", $new-filename, $doc/*)
...@@ -93,7 +128,7 @@ declare function etTransfo:create-case($showcase as xs:string) as xs:string { ...@@ -93,7 +128,7 @@ declare function etTransfo:create-case($showcase as xs:string) as xs:string {
try { try {
doc("/db/sade-projects/textgrid/data/xml/data/" || $uri || ".xml")/tei:TEI doc("/db/sade-projects/textgrid/data/xml/data/" || $uri || ".xml")/tei:TEI
} catch * { } catch * {
error(QName("error", "ETTRANSFO04"), "Couldn't find the node tei:TEI of " || $uri || ".") etTransfo:add-log-entry($log, "ETTRANSFO04: Couldn't find the node tei:TEI of " || $uri || ".")
} }
let $updated-notebook := let $updated-notebook :=
element tei:TEI { element tei:TEI {
...@@ -115,18 +150,16 @@ declare function etTransfo:create-case($showcase as xs:string) as xs:string { ...@@ -115,18 +150,16 @@ declare function etTransfo:create-case($showcase as xs:string) as xs:string {
: @param $showcase The filename of a showcase, e.g. "12345.xml" : @param $showcase The filename of a showcase, e.g. "12345.xml"
: @return All notebooks of a showcase in-memory, i.e. a sequence of tei:TEI : @return All notebooks of a showcase in-memory, i.e. a sequence of tei:TEI
:) :)
declare function etTransfo:get-teis($showcase as xs:string) as element(tei:TEI)+ { declare function etTransfo:get-teis($showcase as xs:string) as element(tei:TEI)* {
let $doc := doc("/db/sade-projects/textgrid/data/xml/data/" || $showcase) let $doc := doc("/db/sade-projects/textgrid/data/xml/data/" || $showcase)
let $summary-file-name := $doc//tei:title[1] => replace(" ", "-") || ".xml" let $summary-file-name := $doc//tei:title[1] => replace(" ", "-") || ".xml"
let $summary-file := let $log := doc($etTransfo:coll || "logs/" || $doc//tei:title[1] => replace(" ", "-") || "-log.xml")
return
try { try {
doc($config:data-root || "/print/xml/" || $summary-file-name) doc($config:data-root || "/print/xml/" || $summary-file-name)//tei:TEI
} catch * { } catch * {
error(QName("error", "ETTRANSFO04"), "Summary file for case " || $showcase || "couldn't be opened.") etTransfo:add-log-entry($log, "ETTRANSFO05: Summary file for case " || $showcase || "couldn't be opened.")
} }
return
$summary-file//tei:TEI
}; };
...@@ -137,13 +170,18 @@ declare function etTransfo:get-teis($showcase as xs:string) as element(tei:TEI)+ ...@@ -137,13 +170,18 @@ declare function etTransfo:get-teis($showcase as xs:string) as element(tei:TEI)+
: @param $showcase The filename of a showcase, e.g. "12345.xml" : @param $showcase The filename of a showcase, e.g. "12345.xml"
: @return One or more strings indicating the location where the XHTML(s) have been stored to. : @return One or more strings indicating the location where the XHTML(s) have been stored to.
:) :)
declare function etTransfo:create-htmls($showcase as xs:string) as xs:string+ { declare function etTransfo:create-htmls($showcase as xs:string) as xs:string* {
let $teis := etTransfo:get-teis($showcase) let $teis := etTransfo:get-teis($showcase)
for $tei in $teis return for $tei in $teis return
let $log := util:log-system-out("Start creating edited text for " || $tei//tei:idno[@type = "TextGrid"])
let $log := etTransfo:create-log(substring-after($tei//tei:idno[@type = "TextGrid"], "textgrid:")) let $log := etTransfo:create-log(substring-after($tei//tei:idno[@type = "TextGrid"], "textgrid:"))
return return
etTransfo:transform-tei($tei, $log) try {
etTransfo:transform-tei($tei, $log)
} catch * {
etTransfo:add-log-entry($log, "ETTRANSFO08: Couldn't transform TEI. ")
}
}; };
...@@ -155,12 +193,53 @@ declare function etTransfo:create-htmls($showcase as xs:string) as xs:string+ { ...@@ -155,12 +193,53 @@ declare function etTransfo:create-htmls($showcase as xs:string) as xs:string+ {
:) :)
declare function etTransfo:transform-tei($tei as element(tei:TEI), $log as xs:string) { declare function etTransfo:transform-tei($tei as element(tei:TEI), $log as xs:string) {
(: macro-sort:main($tei, $tei/@id):) (: macro-sort:main($tei, $tei/@id):)
(: => fsort:main():) (: let $macro-sorted :=:)
fsort:main($tei, $log) (: try {:)
=> prepCom:main($tei/@id) (: macro-sort:main($tei, $tei/@id):)
=> fontaneSimple:main($tei/@id, $log) (: } catch * {:)
=> tidySimple:main($tei/@id) (: etTransfo:add-log-entry($log, "ETTRANSFO14: Error while macro sorting this notebook. Reason: 
" ||:)
=> simple2xhtml:main($tei/@id) (: concat("[", $err:line-number, ": ", $err:column-number, "] Error ", $err:code, ": ", $err:description)):)
(: }:)
let $sorted :=
try {
fsort:main($tei, $log)
(: fsort:main($macro-sorted, $log) :)
} catch * {
etTransfo:add-log-entry($log, "ETTRANSFO09: Error while sorting this notebook. Reason: 
" ||
concat("[", $err:line-number, ": ", $err:column-number, "] Error ", $err:code, ": ", $err:description))
}
let $prepare-comment :=
try {
prepCom:main($sorted, $tei/@id)
} catch * {
etTransfo:add-log-entry($log, "ETTRANSFO10: Error while preparing commentary for this notebook. Reason: 
" ||
concat("[", $err:line-number, ": ", $err:column-number, "] Error ", $err:code, ": ", $err:description))
}
let $transform-to-interform :=
try {
fontaneSimple:main($prepare-comment, $tei/@id, $log)
} catch * {
etTransfo:add-log-entry($log, "ETTRANSFO11: Error while transforming this notebook to an intermediate format. Reason: 
" ||
concat("[", $err:line-number, ": ", $err:column-number, "] Error ", $err:code, ": ", $err:description))
}
let $tidy-interform :=
try {
tidySimple:main($transform-to-interform, $tei/@id)
} catch * {
etTransfo:add-log-entry($log, "ETTRANSFO12: Error while tidying up the intermediate format for this notebook. Reason: 
" ||
concat("[", $err:line-number, ": ", $err:column-number, "] Error ", $err:code, ": ", $err:description))
}
return
try {
simple2xhtml:main($tidy-interform, $tei/@id)
} catch * {
etTransfo:add-log-entry($log, "ETTRANSFO13: Error while creating XHTML for this notebook. Reason: 
" ||
concat("[", $err:line-number, ": ", $err:column-number, "] Error ", $err:code, ": ", $err:description))
}
}; };
...@@ -173,19 +252,20 @@ declare function etTransfo:transform-tei($tei as element(tei:TEI), $log as xs:st ...@@ -173,19 +252,20 @@ declare function etTransfo:transform-tei($tei as element(tei:TEI), $log as xs:st
:) :)
declare function etTransfo:create-print-tei() as xs:string { declare function etTransfo:create-print-tei() as xs:string {
let $xmls := etTransfo:get-all-xmls() let $xmls := etTransfo:get-all-xmls()
let $log := etTransfo:create-log("general-print-creation")
let $complete-print-file := let $complete-print-file :=
element {QName("http://www.tei-c.org/ns/1.0", "teiCorpus")} { element {QName("http://www.tei-c.org/ns/1.0", "teiCorpus")} {
$xmls, $xmls,
try { try {
etTransfo:get-literature() etTransfo:get-literature()
} catch * { } catch * {
error(QName("error", "ETTRANSFO06"), "An error occured while creating the bibliography.") etTransfo:add-log-entry($log, "ETTRANSFO06: An error occured while creating the bibliography.")
}, },
try { try {
abbrev-index:main() abbrev-index:main()
} catch * { } catch * {
error(QName("error", "ETTRANSFO07"), "An error occured while creating the index of abbreviations.") etTransfo:add-log-entry($log, "ETTRANSFO07: An error occured while creating the index of abbreviations.")
} }
} }
return return
...@@ -313,32 +393,94 @@ declare function etTransfo:make-bib-entries($type as xs:string) as element(tei:d ...@@ -313,32 +393,94 @@ declare function etTransfo:make-bib-entries($type as xs:string) as element(tei:d
}; };
(:~
: Creates a log file for a given notebook.
:
: @author Michelle Weidling
: @param $uri The notebook's URI, e.g. "12345.xml"
: @return The location of the stored log-file, e.g. "/db/apps/sade/modules/fontane/edited-text/logs/12345-log.xml"
:)
declare function etTransfo:create-log($uri as xs:string) as xs:string { declare function etTransfo:create-log($uri as xs:string) as xs:string {
let $assure-dir-available := etTransfo:assure-dir-available("logs") let $assure-dir-available := etTransfo:assure-coll-available("logs")
let $log-name := $uri || "-log.xml" let $log-name := $uri || "-log.xml"
return xmldb:store($etTransfo:dir || "logs", $log-name, <log/>) return xmldb:store($etTransfo:coll || "logs", $log-name, <log/>)
}; };
declare function etTransfo:assure-dir-available($dir-name as xs:string) { (:~
if(xmldb:collection-available($etTransfo:dir || "logs")) then : Makes sure a requested collection is available.
$etTransfo:dir || "logs" :
else : @author Michelle Weidling
xmldb:create-collection($etTransfo:dir, "logs") : @param $flag a string indicating the target collection
: @return The location of the log collection, "/db/apps/sade/modules/fontane/edited-text/logs/"
:)
declare function etTransfo:assure-coll-available($flag as xs:string) {
switch ($flag)
case "logs" return
if(xmldb:collection-available($etTransfo:coll || "logs")) then
$etTransfo:coll || "logs"
else
xmldb:create-collection($etTransfo:coll, "logs")
case "print" return
if(xmldb:collection-available($config:data-root || "/print/")) then
()
else
(xmldb:create-collection($config:data-root, "/print"),
xmldb:create-collection($config:data-root || "/print/", "xml"),
xmldb:create-collection($config:data-root || "/print/", "xhtml"))
default return ()
}; };
(:~ (:~
: Only the logs which acutally contain info should be kept. : Adds a log entry to a given log file.
: :
: @author Michelle Weidling
: @param $log-file The path to the log file, e.g. "/db/apps/sade/modules/fontane/edited-text/logs/12345-log.xml"
: @param $message The message of the log entry
: @return The location of the log collection, "/db/apps/sade/modules/fontane/edited-text/logs/"
:)
declare function etTransfo:add-log-entry($log-file as xs:string,
$message as xs:string) as empty-sequence() {
let $entry := <LogEntry timestamp="{util:system-time()}">{$message}</LogEntry>
return update insert $entry into doc($log-file)/*
};
(:~
: Removes all log files that don't contain any information.
: @author Michelle Weidling
:) :)
declare function etTransfo:tidy-logs() { declare function etTransfo:tidy-logs() as item()* {
for $log in collection($etTransfo:dir || "logs/") return for $log in collection($etTransfo:coll || "logs/") return
if($log//LogEntry) then if($log//LogEntry) then
() ()
else else
let $uri := substring-after(base-uri($log), "logs/") let $uri := substring-after(base-uri($log), "logs/")
return return
xmldb:remove($etTransfo:dir || "logs/", $uri) xmldb:remove($etTransfo:coll || "logs/", $uri)
};
(:~
: Prints all errors found to stdout.
: @author Michelle Weidling
:)
declare function etTransfo:report-errors() as item()* {
let $log-path := $etTransfo:coll || "logs/"
return
if(normalize-space(string-join(xmldb:get-child-resources($log-path), "")) = "") then
util:log-system-out("No errors found while creating the edited text! Yay!")
else
(
util:log-system-out("Errors detected in the following notebooks:"),
for $log in collection($log-path) return
(
util:log-system-out("*&#8195;" ||
substring-after(base-uri($log), "logs/")
=> substring-before("-log")),
util:log-system-out($log)
),
util:log-system-out("Total: " || count(xmldb:get-child-resources($log-path)) || " notebook(s).")
)
}; };
...@@ -17,9 +17,10 @@ import module namespace config="http://textgrid.de/ns/SADE/config" at "../../con ...@@ -17,9 +17,10 @@ import module namespace config="http://textgrid.de/ns/SADE/config" at "../../con
declare function simple2xhtml:main($nodes as node()*, $uri as xs:string) { declare function simple2xhtml:main($nodes as node()*, $uri as xs:string) {
let $xhtml := element xhtml:div {simple2xhtml:recursion($nodes//tei:text)} let $xhtml := element xhtml:div {simple2xhtml:recursion($nodes//tei:text)}
let $store := xmldb:store($config:data-root || "/print/xhtml/", $uri || ".html", $xhtml) let $tidy := element xhtml:div {simple2xhtml:tidy($xhtml)}
let $store := xmldb:store($config:data-root || "/print/xhtml/", $uri || ".html", $tidy)
return return
$xhtml $tidy
}; };
(:~ (:~
...@@ -56,12 +57,15 @@ declare function simple2xhtml:recursion($nodes as node()*) as node()* { ...@@ -56,12 +57,15 @@ declare function simple2xhtml:recursion($nodes as node()*) as node()* {
else else
element xhtml:span { element xhtml:span {
simple2xhtml:set-hs-info($node, ()), simple2xhtml:set-hs-info($node, ()),
replace($node, "@P", "") replace($node, " ,", ",")
=> replace(" ,", ",")
=> replace(" \?", "?") => replace(" \?", "?")
=> replace(" \.", ".") => replace(" \.", ".")
=> replace(" ;", ";") => replace(" ;", ";")
=> replace("@", " ") => replace("@@", " ")
=> replace("@P", "")
=> replace(" &#x2003;", "&#x2003;")
=> replace(":", ": ")
=> replace(" “", "“")
} }
case element(tei:body) return case element(tei:body) return
...@@ -658,3 +662,25 @@ declare function simple2xhtml:make-integration($node as element(tei:seg)) { ...@@ -658,3 +662,25 @@ declare function simple2xhtml:make-integration($node as element(tei:seg)) {
} }
} }
}; };
declare function simple2xhtml:tidy($nodes as node()*) as node()* {
for $node in $nodes return
typeswitch ($node)
case text() return
if(string-length($node) = 1 and normalize-space($node) = ""
and matches(substring($node/following::text()[1], 1, 1), "[,\.\?]")) then
()
else
text{ replace($node, "[\s]+", " ")
=> replace(" ,", ",")
=> replace(" \.", ".")
=> replace(" :", ":") }
default return
element {QName("http://www.w3.org/1999/xhtml", $node/name())} {
$node/@*,
simple2xhtml:tidy($node/node())
}
};
...@@ -170,6 +170,13 @@ declare function fsort:apply-all-nexts($node as node(), $log as xs:string) as no ...@@ -170,6 +170,13 @@ declare function fsort:apply-all-nexts($node as node(), $log as xs:string) as no
return return
if(count($next-node) = 1) then if(count($next-node) = 1) then
(fsort:keep-node($node, "sort", $log), (fsort:keep-node($node, "sort", $log),
(: check if the parts are in different lines :)
if($node/ancestor::tei:line = $next-node/ancestor::tei:line) then
()
else
element tei:milestone {
attribute unit {"line"}
},
fsort:apply-all-nexts($next-node, $log)) fsort:apply-all-nexts($next-node, $log))
else if(not($next-node)) then else if(not($next-node)) then
fsort:add-log-entry($log, "No next node found for " || $node/@next) fsort:add-log-entry($log, "No next node found for " || $node/@next)
...@@ -189,6 +196,13 @@ declare function fsort:apply-all-nexts($node as node(), $log as xs:string) as no ...@@ -189,6 +196,13 @@ declare function fsort:apply-all-nexts($node as node(), $log as xs:string) as no
if(count($next-node) = 1) then if(count($next-node) = 1) then
($prev-handshift, ($prev-handshift,
fsort:keep-node($node, "sort", $log), fsort:keep-node($node, "sort", $log),
(: check if the parts are in different lines :)
if($node/ancestor::tei:line = $next-node/ancestor::tei:line) then
()
else
element tei:milestone {
attribute unit {"line"}
},
fsort:apply-all-nexts($next-node, $log)) fsort:apply-all-nexts($next-node, $log))
else if(not($next-node)) then else if(not($next-node)) then
fsort:add-log-entry($log, "No next node found for " || $node/@next) fsort:add-log-entry($log, "No next node found for " || $node/@next)
......
...@@ -56,7 +56,8 @@ xs:string) as node()? { ...@@ -56,7 +56,8 @@ xs:string) as node()? {
</text> </text>
</TEI> </TEI>
</teiCorpus> </teiCorpus>
let $store := xmldb:store($config:data-root || "/print/xml/", $uri || "-tmp.xml", $tei)
let $store := xmldb:store($config:data-root || "/print/xml/", $uri || "-tmp.xml", $tei)
return $tei return $tei
}; };
...@@ -208,7 +209,10 @@ $log as xs:string) as node()* { ...@@ -208,7 +209,10 @@ $log as xs:string) as node()* {
simpleHelpers:trim-first-char($node)) simpleHelpers:trim-first-char($node))
else if($node/@type = "verse") then else if($node/@type = "verse") then
if(not($node/@next)) then if($node/@prev) then
()
else if(not($node/@next)) then
(if(not($node/preceding-sibling::tei:line[@type = "verse"])) then (if(not($node/preceding-sibling::tei:line[@type = "verse"])) then
fontaneSimple:mark-linegroup-beginning() fontaneSimple:mark-linegroup-beginning()
else else
...@@ -220,10 +224,11 @@ $log as xs:string) as node()* { ...@@ -220,10 +224,11 @@ $log as xs:string) as node()* {
fontaneSimple:mark-linegroup-end() fontaneSimple:mark-linegroup-end()
else else
()) ())
(: 3.8.2.2.1.3 Vers mit anderer Beschriftung in einer Zeile :) (: 3.8.2.2.1.3 Vers mit anderer Beschriftung in einer Zeile :)
else else
let $corresp := $node/following::tei:seg[@type = "verse" let $corresp := $node/following::*[@type = "verse"
and matches($node/@next, @xml:id)] and replace($node/@next, "#", "") = @xml:id]
return return
(fontaneSimple:mark-linegroup-beginning(), (fontaneSimple:mark-linegroup-beginning(),
element tei:l { element tei:l {
...@@ -342,13 +347,7 @@ $log as xs:string) as node()* { ...@@ -342,13 +347,7 @@ $log as xs:string) as node()* {
fontaneSimple:transform($node/node(), $uri, $log) fontaneSimple:transform($node/node(), $uri, $log)
} }
else if($node/@type = "integration") then else if($node/@type = ("integration", "editorial-label")) then
element tei:seg {
$node/@*,
fontaneSimple:transform($node/node(), $uri, $log)
}
else if($node/@type = "editorial-label") then
element tei:seg { element tei:seg {
$node/@*, $node/@*,
fontaneSimple:transform($node/node(), $uri, $log) fontaneSimple:transform($node/node(), $uri, $log)
...@@ -397,16 +396,14 @@ $log as xs:string) as node()* { ...@@ -397,16 +396,14 @@ $log as xs:string) as node()* {
} }
else if($node/@type = "pocket") then else if($node/@type = "pocket") then
(fontaneSimple:make-pb($node),
element tei:div{ element tei:div{
$node/(@* except (@n, @ulx, @uly, @lry, @lrx)), $node/(@* except (@n, @ulx, @uly, @lry, @lrx)),
fontaneSimple:transform($node/node(), $uri, $log) fontaneSimple:transform($node/node(), $uri, $log)
}) }
else if(simpleHelpers:is-page($node) else if(simpleHelpers:is-page($node)
and $node/@type = "clipping") then and $node/@type = "clipping") then
(fontaneSimple:make-pb($node), if($node/@subtype = "Kalenderblatt"
(if($node/@subtype = "Kalenderblatt"
and contains($node//tei:handShift/@new, "Friedrich_Fontane")) then and contains($node//tei:handShift/@new, "Friedrich_Fontane")) then
element tei:div { element tei:div {