diff --git a/modules/ifutils.xqm b/modules/ifutils.xqm index c429585a5df68d580cd4105ffc90fd9b2d1bf93e..3eedd5083e3a785fd1b1a160a5fa2312bace3b06 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