Skip to content

Commit

Permalink
add fallback for missing user-prefs
Browse files Browse the repository at this point in the history
When no preferences are found an error occurs. The Edirom then should use the default preferences.
  • Loading branch information
riedde authored Apr 12, 2024
1 parent b6fc47f commit 5b7a340
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion add/data/xqm/edition.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ declare function edition:getLanguageCodesSorted($uri as xs:string) as xs:string
:)
declare function edition:getPreferencesURI($uri as xs:string) as xs:string {

doc($uri)//edirom:preferences/@xlink:href => string()
if(doc($uri)//edirom:preferences/@xlink:href => string()) then(
doc($uri)//edirom:preferences/@xlink:href => string()
) else ('../prefs/edirom-prefs.xml')
};

(:~
Expand Down

0 comments on commit 5b7a340

Please sign in to comment.