Skip to content
Snippets Groups Projects
Verified Commit 17ee9d5d authored by Peter Stadler's avatar Peter Stadler
Browse files

refactor `teitext:getLabel#2`

to make use of the canonical function `eutil:getLocalizedTitle#2`
parent a068e65a
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ declare namespace tei="http://www.tei-c.org/ns/1.0";
:)
declare function teitext:isText($uri as xs:string) as xs:boolean {
exists(doc($uri)/tei:TEI)
exists(eutil:getDoc($uri)/tei:TEI)
};
......@@ -40,8 +40,6 @@ declare function teitext:isText($uri as xs:string) as xs:boolean {
:)
declare function teitext:getLabel($uri as xs:string, $edition as xs:string) as xs:string {
let $language := eutil:getLanguage($edition)
return doc($uri)//tei:titleStmt/data(tei:title[not(@xml:lang) or @xml:lang = $language])
eutil:getLocalizedTitle(eutil:getDoc($uri), eutil:getLanguage($edition))
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment