Skip to content

Commit

Permalink
fix window title for iframes
Browse files Browse the repository at this point in the history
  • Loading branch information
riedde committed Nov 27, 2022
1 parent cf58f2d commit b92be35
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions add/data/xql/getLinkTarget.xql
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ declare function local:getWindowTitle($doc as node()+, $type as xs:string) as xs
(: Work :)
if(exists($doc//mei:mei) and exists($doc//mei:workDesc/mei:work) and not(exists($doc//mei:perfMedium)))
then(eutil:getLocalizedTitle(($doc//mei:work)[1]/mei:titleStmt[1], $lang))

else if(exists($doc/root()/mei:work))
then(eutil:getLocalizedTitle($doc/root()/mei:work, $lang))

(: Recording :)
else if(exists($doc//mei:mei) and exists($doc//mei:recording))
then(eutil:getLocalizedTitle($doc//mei:fileDesc/mei:titleStmt[1], $lang))
Expand All @@ -170,9 +172,9 @@ declare function local:getWindowTitle($doc as node()+, $type as xs:string) as xs
then(eutil:getLocalizedTitle($doc//tei:fileDesc/tei:titleStmt[1], $lang))

(: HTML :)
else if($type = 'html')
then($doc//head/data(title))

else if($type = 'html' and $doc//html:head/html:title)
then($doc//html:head/data(html:title))
else(string('unknown'))
};

Expand Down

0 comments on commit b92be35

Please sign in to comment.