Commit 42d294d2 authored by mrodzis's avatar mrodzis 🌎
Browse files

Fix bug in tei:ref processing

parent 4f786357
...@@ -81,7 +81,8 @@ declare function fontaneSimple:transform($nodes as node()*, $uri as xs:string) a ...@@ -81,7 +81,8 @@ declare function fontaneSimple:transform($nodes as node()*, $uri as xs:string) a
if($node/ancestor::tei:line if($node/ancestor::tei:line
or $node/ancestor::tei:figDesc or $node/ancestor::tei:figDesc
or $node/ancestor::tei:desc[@type = "edited_text"] or $node/ancestor::tei:desc[@type = "edited_text"]
or $node/ancestor::tei:note[@type = "editorial"]) then or $node/ancestor::tei:note[@type = "editorial"]
or $node/ancestor::tei:ref[not(matches(@target, "getty") or matches(@target, "xpath"))]) then
if($node/parent::tei:rs and starts-with($node, " ") if($node/parent::tei:rs and starts-with($node, " ")
and not($node/preceding-sibling::*[1][self::tei:handShift or self::tei:hi]) and not($node/preceding-sibling::*[1][self::tei:handShift or self::tei:hi])
and simpleHelpers:is-trimming-necessary($node)) then and simpleHelpers:is-trimming-necessary($node)) then
...@@ -575,9 +576,10 @@ declare function fontaneSimple:transform($nodes as node()*, $uri as xs:string) a ...@@ -575,9 +576,10 @@ declare function fontaneSimple:transform($nodes as node()*, $uri as xs:string) a
fontaneSimple:transform($node/node(), $uri) fontaneSimple:transform($node/node(), $uri)
else if($node/@xml:id) then else if($node/@xml:id) then
(if($node/@xml:id = "C06_14r_9") then (
util:log-system-out($node) (: if($node/@xml:id = "C06_14r_9") then:)
else (), (: util:log-system-out($node):)
(: else (),:)
element {QName("http://www.tei-c.org/ns/1.0", "seg")} { element {QName("http://www.tei-c.org/ns/1.0", "seg")} {
$node/@xml:id, $node/@xml:id,
$node/@prev, $node/@prev,
...@@ -670,7 +672,8 @@ declare function fontaneSimple:transform($nodes as node()*, $uri as xs:string) a ...@@ -670,7 +672,8 @@ declare function fontaneSimple:transform($nodes as node()*, $uri as xs:string) a
fontaneSimple:copy-element($node, $uri) fontaneSimple:copy-element($node, $uri)
case element(tei:ref) return case element(tei:ref) return
fontaneSimple:copy-element($node, $uri) (fontaneSimple:copy-element($node, $uri),
util:log-system-out($node))
case element(tei:space) return case element(tei:space) return
fontaneSimple:copy-element($node, $uri) fontaneSimple:copy-element($node, $uri)
...@@ -748,10 +751,10 @@ declare function fontaneSimple:transform($nodes as node()*, $uri as xs:string) a ...@@ -748,10 +751,10 @@ declare function fontaneSimple:transform($nodes as node()*, $uri as xs:string) a
: @return node() a copy of the current node : @return node() a copy of the current node
:) :)
declare function fontaneSimple:copy-element($node as node(), $uri as xs:string) as node() { declare function fontaneSimple:copy-element($node as node(), $uri as xs:string) as node() {
if($node[self::tei:note]) then (: if($node[self::tei:note]) then:)
util:log-system-out($node) (: util:log-system-out($node):)
else (: else:)
(), (: (),:)
element {QName("http://www.tei-c.org/ns/1.0", $node/name())}{ element {QName("http://www.tei-c.org/ns/1.0", $node/name())}{
$node/(@* except @rend), $node/(@* except @rend),
if($node/@rend) then if($node/@rend) then
...@@ -952,7 +955,7 @@ as xs:boolean { ...@@ -952,7 +955,7 @@ as xs:boolean {
declare function fontaneSimple:make-index-infos($node as element(tei:rs), declare function fontaneSimple:make-index-infos($node as element(tei:rs),
$index-type as xs:string) as element()* { $index-type as xs:string) as element()* {
let $bla := util:log-system-out($node) (: let $bla := util:log-system-out($node):)
let $refs := tokenize($node/@ref, " ") let $refs := tokenize($node/@ref, " ")
let $no-of-refs := count($refs) let $no-of-refs := count($refs)
return return
......
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