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

getLinkTarget.xql: local:getWindowTitle move mei fallback to end

parent 47d1fd16
No related branches found
No related tags found
No related merge requests found
......@@ -185,10 +185,6 @@ declare function local:getWindowTitle($doc as node()+, $type as xs:string) as xs
($doc//mei:source)[1]//mei:identifier[lower-case(@type) = 'shelfmark'][1]), ' | ')
=> normalize-space())
(: MEI fallback if no title is found :)
else if (exists($doc//mei:mei) and exists(($doc//mei:titleStmt)[1])) then
(eutil:getLocalizedTitle(($doc//mei:titleStmt)[1], $lang))
(: Text :)
else if ($type = 'text') then
(eutil:getLocalizedTitle($doc//tei:fileDesc/tei:titleStmt[1], $lang))
......@@ -196,6 +192,10 @@ declare function local:getWindowTitle($doc as node()+, $type as xs:string) as xs
(: HTML :)
else if ($type = 'html') then
($doc//head/data(title))
(: MEI fallback if no title is found :)
else if (exists($doc//mei:mei) and exists(($doc//mei:titleStmt)[1])) then
(eutil:getLocalizedTitle(($doc//mei:titleStmt)[1], $lang))
else
(string('unknown'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment