Skip to content

Commit

Permalink
Fix: handling for works encoded with mei4+ in getLinkTarget (#491)
Browse files Browse the repository at this point in the history
## Description, Context and related Issue
I extended the XPath to make shure that work titles of MEI4+ files can
also be found.

Closes #337 

## How Has This Been Tested?
eXist-db 6.2.0 by manipulating data in the database.

## Types of changes
- Bug fix (non-breaking change which fixes an issue)
  • Loading branch information
peterstadler authored Dec 10, 2024
2 parents fd45a49 + 6482ac0 commit 97bc2f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion add/data/xql/getLinkTarget.xql
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ declare function local:getViews($type as xs:string, $docUri as xs:string, $doc a
declare function local:getWindowTitle($doc as node()+, $type as xs:string) as xs:string {

(: Work :)
if (exists($doc//mei:mei) and exists($doc//mei:workDesc/mei:work) and not(exists($doc//mei:perfMedium))) then
if (exists($doc//mei:mei) and exists($doc//(mei:workDesc|mei:workList)/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))
Expand Down

0 comments on commit 97bc2f5

Please sign in to comment.