From e4af0aa5d9672b0b60e131bf94da02f3836e29db Mon Sep 17 00:00:00 2001 From: uwe <arokis.u@gmail.com> Date: Sun, 25 Feb 2018 22:46:58 +0100 Subject: [PATCH] added helper functions --- modules/ifutils.xqm | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/modules/ifutils.xqm b/modules/ifutils.xqm index c429585..3eedd50 100644 --- a/modules/ifutils.xqm +++ b/modules/ifutils.xqm @@ -8,7 +8,7 @@ xquery version "3.1"; : @status developing : @author Uwe Sikora :) -module namespace ifutils="http://bdn.edition.de/intermediate_format/utils"; +module namespace ifutils="http://bdn-edition.de/intermediate_format/utils"; import module namespace http = "http://expath.org/ns/http-client"; (:############################# Modules Variables #############################:) @@ -60,6 +60,25 @@ declare function ifutils:get-resource }; +(:~ + : ifutils:ls() + : This function lists all documents from a collection + : + : @param $collection the path of a collection + : @return all document-base-uris from the collection + : + : @version 1.0 (2018-03-23) + : @status developing + : @author Uwe Sikora + :) +declare function ifutils:ls + ( $collection as xs:string ) { + + for $doc in collection($collection) + return base-uri($doc) +}; + + (:~ : ifutils:request() : This http wrapper function models a request -- GitLab