http://www.zorba-xquery.com/modules/reference ZC

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

The module provides functions to compute an immutable and opaque reference for nodes, objects, or arrays and to retrieve such items given their identifier, respectively. The identifiers are immutable, i.e. a identifier does not change during the items lifetime and cannot be reused for another item after the original item gets deleted. Identifiers are unique, in that, two different items will never have the same identifier. A item, at any time during its lifetime, can be retrieved by its identifier.

Please see the data lifecycle documentation about details on storing items.

Author:

Matthias Brantner

XQuery version and encoding for this module:

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

Zorba version for this module:

The latest version of this module is 1.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
ref http://www.zorba-xquery.com/modules/reference
ver http://www.zorba-xquery.com/options/versioning
zerr http://www.zorba-xquery.com/errors
Function Summary
External dereference ( $arg as xs:string ) as item()?
Returns the node, object, or array identified by the given reference.
External reference ( $arg as item() ) as xs:string
Returns an immutable and opaque reference (with type xs:anyURI) for a given node, object, or array.
Functions
External dereference back to 'Function Summary'
declare function ref:dereference (
            $arg as xs:string
) as item()?

Returns the node, object, or array identified by the given reference.

The function returns the empty sequence if the item that is referenced does not exist.

Parameters:
Returns:

External reference back to 'Function Summary'
declare function ref:reference (
            $arg as item()
) as xs:string

Returns an immutable and opaque reference (with type xs:anyURI) for a given node, object, or array.

The generated identifier is immutable, i.e. a identifier does not change during the item's lifetime and cannot be reused for another node after the original item gets deleted.

Identifiers are also unique, in that, two different items will never have the same identifier.

A item, at any time during its lifetime, can be retrieved by its identifier, using the ref:dereference function. Please note that a reference can only be retrieved for a JSON object or JSON array if the item is a member of a collection.

Parameters:
Returns:
Errors:

blog comments powered by Disqus