Commit f842e8e0 authored by mrodzis's avatar mrodzis 🌎
Browse files

Fixes bug in tei:line processing, adds fictional places (cf. #140)

parent 8d3a0eb9
......@@ -218,12 +218,12 @@ $log as xs:string) as node()* {
or matches($node/@rendition, "roman")) then
fontaneSimple:make-seg-with-rendition($node, $uri, $log)
else if($node/following::*[1][self::tei:lb[@break = "no"]]
  • @mgoebel I absolutely don't understand why this change (and the similar one below) was necessary. In notebook B3, page 57r I noticed that most of the tei:lines evaluated true() to this condition, even though there wasn't a single tei:lb on the page.

    I can only explain this by eXist's implementation of the self:: axis to be buggy. 🤷🏾

    Edited by mrodzis
  • i tried to reproduce with

    xquery version "3.1";
    declare namespace tei="http://www.tei-c.org/ns/1.0";
    
    doc("https://fontane-nb.dariah.eu/rest/data/22jt8.xml") (: B3 :)
    //tei:line[
        following::*
        [1]
        [ self::tei:lb[@break = "no"] ]
    ]

    but got 0 results, what seems to be fine.

  • Alas, that's not why I observe in the Pipeline. 😕

Please register or sign in to reply
else if($node/following::*[1]/local-name() = "lb" and $node/following::*[1]/@break = "no"
and not($node/child::*[last()][self::tei:choice])) then
(simpleHelpers:start-line($node),
simpleHelpers:trim-last-char($node))
else if($node/preceding::*[1][self::tei:lb[@break = "no"]]
else if($node/preceding::*[1]/local-name() = "lb" and $node/preceding::*[1]/@break = "no"
and not($node/child::*[1][self::tei:choice])) then
(simpleHelpers:start-line($node),
simpleHelpers:trim-first-char($node))
......@@ -1199,11 +1199,11 @@ $index-type as xs:string) as element()* {
fontaneSimple:make-infos-about-work($ref, $index-type)
(: the index "wrk" not only encompasses works but
also fictional characters that occur in them. @part-of-id
denotes this relationship. to put the character into the
right place we also have to provide the whole informatiom
about the work. :)
else if(index-info:get-info-about($index-type, $ref, "type") = "person") then
also fictional characters or places that occur in
them. @part-of-id denotes this relationship. to put
the character into the right place we also have to
provide the whole information about the work. :)
else if(index-info:get-info-about($index-type, $ref, "type") = ("person", "place")) then
let $work-id :=
try {
index-info:get-info-about($index-type, $ref, "part-of-id")
......@@ -1217,6 +1217,7 @@ $index-type as xs:string) as element()* {
fontaneSimple:make-infos-about-work($work-id, $index-type),
fontaneSimple:make-infos-about-fictional-character($ref, $index-type, $work-name)
)
else
()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment