Skip to content

Commit

Permalink
getLinkTarget.xql: rely on submitted type in function getWindowTitle
Browse files Browse the repository at this point in the history
Thsi removes doubled 'type' identification that already happens in the $type variable which gets submitted to the call of the getWindowTitle function
  • Loading branch information
bwbohl committed Dec 19, 2024
1 parent c571a5a commit c807e7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions add/data/xql/getLinkTarget.xql
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ declare function local:getWindowTitle($doc as node()+, $type as xs:string) as xs
eutil:getLocalizedTitle($workTitleContainer, $lang)

(: Recording :)
else if (exists($doc//mei:mei) and exists($doc//mei:recording)) then
else if ($type = 'recording') then
(eutil:getLocalizedTitle($doc//mei:fileDesc/mei:titleStmt[1], $lang))

(: Source / Score :)
Expand All @@ -188,7 +188,7 @@ declare function local:getWindowTitle($doc as node()+, $type as xs:string) as xs
(eutil:getLocalizedTitle(($doc//mei:titleStmt)[1], $lang))

(: Text :)
else if (exists($doc/tei:TEI)) then
else if ($type = 'text') then
(eutil:getLocalizedTitle($doc//tei:fileDesc/tei:titleStmt[1], $lang))

(: HTML :)
Expand Down

0 comments on commit c807e7a

Please sign in to comment.