Marklogic XQuery Functions Library is another try of filling up at least some gaps of missing funcionality or functions that are available elsewhere (for instance, in XSLT). List of currently added functions is:
- mxfl:generate-uuid-v4()
- mxfl:remove-files-incrementally($collection as xs:string)
In order to import this library, download and put onto ML server where it would be accessible by your application. After that, call it in to your XQuery function like this:
xquery version "1.0";
import module namespace mxfl='http://www.vaitkus.com/xquery/functions' at '/lib/mxfl.xquery';
This is a generic implementation of generating UUID in XQuery. It only relies on xdmp:* functions of MarkLogic to create this according to UUID v4 format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where x is any hexadecimal digit and y is one of 8, 9, a, or b.
This removes files incrementally from a selected collection. //TODO: work-in-progress
Any issues please log it on github.com, blog, or email arunas@vaitkus.com