- All Modules
- All Functions
-
www.w3.org
- 2005
- XDM
- store
- introspection
- reflection
- external
-
xqdoc
-
project_xqdoc
-
xqdoc
(E)
- xqdoc2xhtml
-
project_xqdoc
- data processing
- expath.org
- www.functx.com
- debugger
- error
- www.zorba-xquery.com
http://www.zorba-xquery.com/modules/node-reference
import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
The module provides functions to compute an immutable and opaque reference for any node and to retrieve nodes given their identifier. The identifiers are immutable, i.e. a node identifier does not change during the node lifetime and cannot be reused for another node after the original node gets deleted. Identifiers are unique, in that, two different nodes will never have the same identifier. A node, at any time during its lifetime, can be retrieved by its identifier.
Please see the data lifecycle documentation about details on storing nodes in collections or as documents.
Federico Cavalieri
xquery version "1.0" encoding "utf-8";
The latest version of this module is 2.0. For more information about module versioning in Zorba please check out this resource.
- the XQuery module can be found here.
For more details please also see:
ref | http://www.zorba-xquery.com/modules/node-reference |
ver | http://www.zorba-xquery.com/options/versioning |
zerr | http://www.zorba-xquery.com/errors |
![]() |
node-by-reference
(
$arg as xs:anyURI
) as node()? external Returns the node identified by the given node reference. |
![]() |
node-reference
(
$arg as node()
) as xs:anyURI external Returns an immutable and opaque node reference (with type xs:anyURI) for a given node. |
declare function ref:node-by-reference (
$arg as xs:anyURI
) as node()? external
Returns the node identified by the given node reference.
The function returns the empty sequence if the node that is referenced does not exist.
- $arg the URI of the node to retrieve.
- the node identified by the URI passed as parameter or the empty-sequence if no node with that URI is found.
- zerr:ZAPI0028 if the given URI is not a valid node reference computed by the ref:node-reference function.
declare function ref:node-reference (
$arg as node()
) as xs:anyURI external
Returns an immutable and opaque node reference (with type xs:anyURI) for a given node.
The generated identifier is immutable, i.e. a node identifier does not change during the node lifetime and cannot be reused for another node after the original node gets deleted.
Identifiers are also unique, in that, two different nodes will never have the same identifier.
A node, at any time during its lifetime, can be retrieved by its identifier, using the ref:node-by-reference function.- $arg the node for which the URI should be computed
- the opaque URI of the node.