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";

Zorba version for this module:

The latest version of this module is 2.0. For more information about module versioning in Zorba please check out this resource.

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
External available-documents ( ) as xs:string*
Retrieves a sequence of URIs of documents bound in the store.
External document ( $uri as xs:string ) as document()
Returns the document with the given URI from the store.
External is-available-document ( $uri as xs:string ) as xs:boolean
Returns true if a document with the given URI exists in the store.
Updating External put ( $uri as xs:string, $doc as document() ) as
Adds a document to the store.
Updating External remove ( $uri as xs:string ) as
Removes the document with the given URI from the store.
Functions
External available-documents back to 'Function Summary'
declare function doc:available-documents (

) as xs:string*

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

Returns:

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

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:

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

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

Parameters:
Returns:
Errors:

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

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:

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

Removes the document with the given URI from the store.

Parameters:
Returns:
Errors:

blog comments powered by Disqus