Skip to content

Commit

Permalink
refactor edition:getName#1
Browse files Browse the repository at this point in the history
to not duplicate code this function now simply points at `edition:details($uri)?name`
  • Loading branch information
peterstadler committed Jan 14, 2025
1 parent 8166353 commit 788e694
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions add/data/xqm/edition.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

(:~
Expand Down

0 comments on commit 788e694

Please sign in to comment.