http://www.zorba-xquery.com/modules/store/dynamic/documents ZC

Module Description
Before using any of the functions below please remember to import the module namespace:
import module namespace doc = "http://www.zorba-xquery.com/modules/store/dynamic/documents";

This module defines a set of functions which manage documents that are persisted in the store. Specifically, it contains functions to put, remove, list, or retrieve documents.

Please refer to our documentation for more information about the lifecycle management and manipulation of documents.

Author:

Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis

XQuery version and encoding for this module:

xquery version "3.0" encoding "utf-8";

Module Resources
Related Documentation

For more details please also see:

Namespaces
doc http://www.zorba-xquery.com/modules/store/dynamic/documents
err http://www.w3.org/2005/xqt-errors
ver http://www.zorba-xquery.com/options/versioning
zerr http://www.zorba-xquery.com/errors
Function Summary
available-documents ( ) as xs:string* external
Retrieves a sequence of URIs of documents bound in the store.
document ( $uri as xs:string ) as document() external
Returns the document with the given URI from the store.
is-available-document ( $uri as xs:string ) as xs:boolean external
Returns true if a document with the given URI exists in the store.
put ( $uri as xs:string, $doc as document() ) external
Adds a document to the store.
remove ( $uri as xs:string ) external
Removes the document with the given URI from the store.
Functions
available-documents back to 'Function Summary'
declare function doc:available-documents (
 ) as xs:string* external

Retrieves a sequence of URIs of documents bound in the store.

Returns:

document back to 'Function Summary'
declare function doc:document (
            $uri as xs:string 
 ) as document() external

Returns the document with the given URI from the store. The difference to fn:doc is that this function does not attempt to retrieve the resource from the file system or the web before returning it. Its only responsibility is to return the document from the store that was bound using fn:put or doc:put.

Parameters:
Returns:
Errors:

is-available-document back to 'Function Summary'
declare function doc:is-available-document (
            $uri as xs:string 
 ) as xs:boolean external

Returns true if a document with the given URI exists in the store.

Parameters:
Returns:
Errors:

put back to 'Function Summary'
declare updating function doc:put (
            $uri as xs:string, 
            $doc as document() 
 ) external

Adds a document to the store. The document is bound to the URI given as first parameter. This URI is the name of the document and can be used by the doc:document() function to retrieve the document from the store. The semantics of the function is similar to the fn:put function. The difference is that this function accepts only document nodes as parameters. Please note that this function does not try to fetch the document from the external resource identified by $uri. Instead, the file or http-client modules can be used to retrieve the resource as string and fn:parse-xml can be used to parse the string returning a document.

Parameters:
Returns:
Errors:

remove back to 'Function Summary'
declare updating function doc:remove (
            $uri as xs:string 
 ) external

Removes the document with the given URI from the store.

Parameters:
Returns:
Errors:

blog comments powered by Disqus