Skip to content

Commit

Permalink
some minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Jan 10, 2025
1 parent 7d53c3c commit 35fede1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions add/data/xqm/source.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ declare function source:getLabels($sources as xs:string*, $edition as xs:string)
:)
declare function source:getLabel($source as xs:string, $edition as xs:string) as xs:string {

let $sourceDoc := doc($source)
let $sourceDoc := eutil:getDoc($source)
let $language := eutil:getLanguage($edition)

let $label :=
Expand All @@ -85,7 +85,7 @@ declare function source:getLabel($source as xs:string, $edition as xs:string) as
if($label) then
($label)
else
(doc($source)//mei:meiHead/mei:fileDesc/mei:titleStmt/mei:title[not(@xml:lang) or @xml:lang = $language])
($sourceDoc//mei:meiHead/mei:fileDesc/mei:titleStmt/mei:title[not(@xml:lang) or @xml:lang = $language])

let $label :=
if($label) then
Expand All @@ -112,7 +112,7 @@ declare function source:getSigla($sources as xs:string*) as xs:string {
};

(:~
: Returns an array of source sigla
: Returns a sequence of source sigla
:
: @param $sources The URIs of the Sources' documents to process
: @return The sigla
Expand All @@ -133,7 +133,7 @@ declare function source:getSiglaAsArray($sources as xs:string*) as xs:string* {
:)
declare function source:getSiglum($source as xs:string) as xs:string? {

let $doc := doc($source)
let $doc := eutil:getDoc($source)
let $elems := $doc//mei:*[@type eq 'siglum']
return
if(exists($elems))
Expand Down

0 comments on commit 35fede1

Please sign in to comment.