Open
Description
Tiny modification in apputil.xql:
As apputil:resolve and apputil:resolve-abbrev can return an empty sequence, the signature should be xs:string?
instead of just xs:string
as it is now.
Cheers,
C.
(:~
: Try to find an application by its unique name and return the relative path to which it
: has been deployed inside the database.
:
: @param $pkgURI unique name of the application
: @return database path relative to the collection returned by repo:get-root()
: or the empty sequence if the package could not be found or is not deployed into the db
:)
declare function apputil:resolve($uri as xs:string) as xs:string **?** {
let $path := collection(repo:get-root())//expath:package[@name = $uri]
return
if ($path) then
substring-after(util:collection-name($path), repo:get-root())
else
()
};
(:~
: Try to find an application by its abbreviated name and return the relative path to which it
: has been deployed inside the database.
:
: @param $pkgURI unique name of the application
: @return database path relative to the collection returned by repo:get-root()
: or the empty sequence if the package could not be found or is not deployed into the db
:)
declare function apputil:resolve-abbrev($abbrev as xs:string) as xs:string **?** {
let $path := $apputil:PACKAGES($abbrev)
return
if ($path) then
substring-after($path, repo:get-root())
else
()
};
Metadata
Metadata
Assignees
Labels
No labels