From 788e694516af90f48075b6631431eb63e51ee047 Mon Sep 17 00:00:00 2001
From: Peter Stadler <stadlerpeter@yahoo.fr>
Date: Tue, 14 Jan 2025 18:37:05 +0100
Subject: [PATCH] refactor `edition:getName#1`

to not duplicate code this function now simply points at `edition:details($uri)?name`
---
 add/data/xqm/edition.xqm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/add/data/xqm/edition.xqm b/add/data/xqm/edition.xqm
index 7318e0431..17f8ee9d8 100644
--- a/add/data/xqm/edition.xqm
+++ b/add/data/xqm/edition.xqm
@@ -159,14 +159,14 @@ declare function edition:getEditionURI($editionIDorPath as xs:string?) as xs:str
 
 (:~
  : Returns the name of the edition specified by $uri
+ : This is a shortcut function for `edition:details($uri)?name`
+ : and might get deprecated in the future.
  :
  : @param $uri The URI of the Edition's document to process
  : @return the text contents of edirom:edition/edirom:editionName
  :)
 declare function edition:getName($uri as xs:string) as xs:string {
-
-    doc($uri)/edirom:edition/edirom:editionName => fn:normalize-space()
-
+    edition:details($uri)?name
 };
 
 (:~
-- 
GitLab