http://www.zorba-xquery.com/modules/store/dynamic/collections/w3c/dml ZC

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

This modules provides a set of functions to modify a collection and retrieve the nodes contained in a particular collection.

Such collections are identified by a URI as defined in the XQuery specification. However, please note that we do not advice users to use collections identified by URIs. Instead, we refer to the data lifecycle documentation. It gives an overview over serveral ways to work with collections, documents, and other data-structures.

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
Module Dependencies

Imported modules:

Related Documentation

For more details please also see:

Namespaces
an http://www.zorba-xquery.com/annotations
ddl http://www.zorba-xquery.com/modules/store/dynamic/collections/w3c/ddl
dml http://www.zorba-xquery.com/modules/store/dynamic/collections/w3c/dml
qdml http://www.zorba-xquery.com/modules/store/dynamic/collections/dml
ver http://www.zorba-xquery.com/options/versioning
zerr http://www.zorba-xquery.com/errors
Function Summary
Sequential apply-insert-nodes-after ( $name as xs:string, $pos as node(), $content as node()* ) as node()*
This function does the same as the insert-nodes-after function except it immediately applies the resulting pending updates and returns the nodes that have been inserted.
Sequential apply-insert-nodes-before ( $name as xs:string, $target as node(), $content as node()* ) as node()*
This function does the same as the insert-nodes-before function except it immediately applies the resulting pending updates and returns the nodes that have been inserted.
Sequential apply-insert-nodes-first ( $name as xs:string, $content as node()* ) as node()*
This function does the same as the insert-nodes function except it immediately applies the resulting pending updates and returns the nodes that have been inserted.
Sequential apply-insert-nodes-last ( $name as xs:string, $content as node()* ) as node()*
This function does the same as the insert-nodes-last function except it immediately applies the resulting pending updates and returns the nodes that have been inserted.
collection ( $name as xs:string ) as node()*
The collection function returns the sequence of nodes of the collection identified by the given name.
collection-name ( $node as node() ) as xs:string
This function returns the name of the collection the given node belongs to.
Updating delete-node-first ( $name as xs:string )
The delete-node-first function is an updating function that deletes the first node from a collection.
Updating delete-node-last ( $name as xs:string )
The delete-node-last function is an updating function that deletes the last node from a collection.
Updating delete-nodes ( $target as node( )*)
The delete-nodes function is an updating function that deletes zero of more nodes from a collection.
Updating delete-nodes-first ( $name as xs:string, $number as xs:integer )
The delete-nodes-first function is an updating function that deletes the first n nodes from a collection.
Updating delete-nodes-last ( $name as xs:string, $number as xs:integer )
The delete-nodes-last function is an updating function that deletes the last n nodes from an ordered collection.
index-of ( $node as node() ) as xs:integer
The index-of function return the index of the given node in the collection.
Updating insert-nodes-after ( $name as xs:string, $pos as node( ), $content as node()*)
The insert-nodes-after function is an updating function that inserts copies of the given nodes into a collection at the position directlry following the given target node.
Updating insert-nodes-before ( $name as xs:string, $target as node( ), $content as node()*)
The insert-nodes-before function is an updating function that inserts copies of the given nodes into a collection at the position directly preceding the given target node.
Updating insert-nodes-first ( $name as xs:string, $content as node( )*)
The insert-nodes-first function is an updating function that inserts copies of the given nodes at the beginning of the collection.
Updating insert-nodes-last ( $name as xs:string, $content as node( )*)
The insert-nodes-last function is an updating function that inserts copies of the given nodes at the end of the collection.
Functions
Sequential apply-insert-nodes-after back to 'Function Summary'
declare %an:sequential function dml:apply-insert-nodes-after (
            $name as xs:string, 
            $pos as node(), 
            $content as node()* 
 ) as node()*

This function does the same as the insert-nodes-after function except it immediately applies the resulting pending updates and returns the nodes that have been inserted.

Parameters:
Returns:
Errors:
See:

Sequential apply-insert-nodes-before back to 'Function Summary'
declare %an:sequential function dml:apply-insert-nodes-before (
            $name as xs:string, 
            $target as node(), 
            $content as node()* 
 ) as node()*

This function does the same as the insert-nodes-before function except it immediately applies the resulting pending updates and returns the nodes that have been inserted.

Parameters:
Returns:
Errors:
See:

Sequential apply-insert-nodes-first back to 'Function Summary'
declare %an:sequential function dml:apply-insert-nodes-first (
            $name as xs:string, 
            $content as node()* 
 ) as node()*

This function does the same as the insert-nodes function except it immediately applies the resulting pending updates and returns the nodes that have been inserted.

Parameters:
Returns:
Errors:
See:

Sequential apply-insert-nodes-last back to 'Function Summary'
declare %an:sequential function dml:apply-insert-nodes-last (
            $name as xs:string, 
            $content as node()* 
 ) as node()*

This function does the same as the insert-nodes-last function except it immediately applies the resulting pending updates and returns the nodes that have been inserted.

Parameters:
Returns:
Errors:
See:

collection back to 'Function Summary'
declare function dml:collection (
            $name as xs:string 
 ) as node()*

The collection function returns the sequence of nodes of the collection identified by the given name.

Parameters:
Returns:
Errors:

collection-name back to 'Function Summary'
declare function dml:collection-name (
            $node as node() 
 ) as xs:string

This function returns the name of the collection the given node belongs to.

Parameters:
Returns:
Errors:

Updating delete-node-first back to 'Function Summary'
declare updating function dml:delete-node-first (
            $name as xs:string 
 )

The delete-node-first function is an updating function that deletes the first node from a collection.

Parameters:
Returns:
Errors:

Updating delete-node-last back to 'Function Summary'
declare updating function dml:delete-node-last (
            $name as xs:string 
 )

The delete-node-last function is an updating function that deletes the last node from a collection.

Parameters:
Returns:
Errors:

Updating delete-nodes back to 'Function Summary'
declare updating function dml:delete-nodes (
            $target as node( 
 )*)

The delete-nodes function is an updating function that deletes zero of more nodes from a collection.

Parameters:
Returns:
Errors:

Updating delete-nodes-first back to 'Function Summary'
declare updating function dml:delete-nodes-first (
            $name as xs:string, 
            $number as xs:integer 
 )

The delete-nodes-first function is an updating function that deletes the first n nodes from a collection.

Parameters:
Returns:
Errors:

Updating delete-nodes-last back to 'Function Summary'
declare updating function dml:delete-nodes-last (
            $name as xs:string, 
            $number as xs:integer 
 )

The delete-nodes-last function is an updating function that deletes the last n nodes from an ordered collection.

Parameters:
Returns:
Errors:

index-of back to 'Function Summary'
declare function dml:index-of (
            $node as node() 
 ) as xs:integer

The index-of function return the index of the given node in the collection.

Parameters:
Returns:
Errors:

Updating insert-nodes-after back to 'Function Summary'
declare updating function dml:insert-nodes-after (
            $name as xs:string, 
            $pos as node( 
 ), $content as node()*)

The insert-nodes-after function is an updating function that inserts copies of the given nodes into a collection at the position directlry following the given target node.

Parameters:
Returns:
Errors:

Updating insert-nodes-before back to 'Function Summary'
declare updating function dml:insert-nodes-before (
            $name as xs:string, 
            $target as node( 
 ), $content as node()*)

The insert-nodes-before function is an updating function that inserts copies of the given nodes into a collection at the position directly preceding the given target node.

Parameters:
Returns:
Errors:

Updating insert-nodes-first back to 'Function Summary'
declare updating function dml:insert-nodes-first (
            $name as xs:string, 
            $content as node( 
 )*)

The insert-nodes-first function is an updating function that inserts copies of the given nodes at the beginning of the collection.

Parameters:
Returns:
Errors:

Updating insert-nodes-last back to 'Function Summary'
declare updating function dml:insert-nodes-last (
            $name as xs:string, 
            $content as node( 
 )*)

The insert-nodes-last function is an updating function that inserts copies of the given nodes at the end of the collection.

Parameters:
Returns:
Errors:

blog comments powered by Disqus