Skip to content
Snippets Groups Projects
Commit c60c30ec authored by bwbohl's avatar bwbohl Committed by Peter Stadler
Browse files

getLinkTarget.xql: add support for MEI3 and older in function getWorkTitle

parent 30b7e7b5
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment