Skip to content

Commit

Permalink
getLinkTarget.xql: add support for MEI3 and older in function getWork…
Browse files Browse the repository at this point in the history
…Title
  • Loading branch information
bwbohl committed Dec 19, 2024
1 parent 2c91ba1 commit c571a5a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions add/data/xql/getLinkTarget.xql
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,16 @@ declare function local:getWindowTitle($doc as node()+, $type as xs:string) as xs

(: Work :)
if ($type = 'work') then
(: will fail for MEI v3 or older :)
eutil:getLocalizedTitle(($doc//mei:work)[1], $lang)

let $workTitleContainer := (
(: MEI 3 and older :)
($doc//mei:work)[1]/mei:titleStmt,
(: MEI 4 and newer :)
($doc//mei:work)[1]
)[1]

return
eutil:getLocalizedTitle($workTitleContainer, $lang)

(: Recording :)
else if (exists($doc//mei:mei) and exists($doc//mei:recording)) then
Expand Down

0 comments on commit c571a5a

Please sign in to comment.