http://www.zorba-xquery.com/modules/store/static/collections/dml
Description
Before using any of the functions below please remember to import the module namespace:
import module namespace cdml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";This modules provides a set of functions to modify a collection and retrieve the items contained in a particular collection.
This module is part of Zorba's XQuery Data Definition Facility. All the collections managed by this module have to be pre-declared in the prolog of a module. Please refer to the general documentation for more information and examples.
See also
XQuery Data Definition Facility
http://www.zorba-xquery.com/modules/store/static/collections/ddl
http://www.zorba-xquery.com/modules/store/static/indexes/ddl
http://www.zorba-xquery.com/modules/store/static/indexes/dml
http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl
http://www.zorba-xquery.com/modules/store/static/integrity_constraints/dml
Author
Nicolae Brinza, Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis
XQuery version and encoding
xquery version "3.0" encoding "utf-8";
Namespaces
| an | http://www.zorba-xquery.com/annotations |
| cdml | http://www.zorba-xquery.com/modules/store/static/collections/dml |
| ver | http://www.zorba-xquery.com/options/versioning |
| zerr | http://www.zorba-xquery.com/errors |
Function Summary
apply-insert-after($name as xs:QName, $pos as item(), $content as item()*) as item()* externalThis function does the same as the insert-after function except it immediately applies the resulting pending updates and returns the items that have been inserted. | |
apply-insert-before($name as xs:QName, $target as item(), $content as item()*) as item()* externalThis function does the same as the insert-before function except it immediately applies the resulting pending updates and returns the items that have been inserted. | |
apply-insert-first($name as xs:QName, $content as item()*) as item()* externalThis function does the same as the insert-first function except it immediately applies the resulting pending updates and returns the items that have been inserted. | |
apply-insert-last($name as xs:QName, $content as item()*) as item()* externalThis function does the same as the insert-last function except it immediately applies the resulting pending updates and returns the items that have been inserted. | |
apply-insert-nodes-after($name as xs:QName, $pos as node(), $content as node()*) as node()* externalThis 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. | |
apply-insert-nodes-before($name as xs:QName, $target as node(), $content as node()*) as node()* externalThis 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. | |
apply-insert-nodes-first($name as xs:QName, $content as node()*) as node()* externalThis function does the same as the insert-nodes-first function except it immediately applies the resulting pending updates and returns the nodes that have been inserted. | |
apply-insert-nodes-last($name as xs:QName, $content as node()*) as node()* externalThis 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. | |
apply-insert-nodes($name as xs:QName, $content as node()*) as node()* externalThis 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. | |
apply-insert($name as xs:QName, $content as item()*) as item()* externalThis function does the same as the insert function except it immediately applies the resulting pending updates and returns the items that have been inserted. | |
collection-name($item as item()) as xs:QName externalThe collection-name function returns the name of the collection the given item (node or json item) belongs to. | |
collection($name as xs:QName) as item()* externalThe collection function returns the sequence of nodes and/or json items that belong to the collection identified by the given name. | |
collection($name as xs:QName, $skip as xs:integer) as item()* externalThe collection function returns the sequence of nodes and/or json items that belong to the collection identified by the given name. | |
collection($name as xs:QName, $start as xs:anyURI, $skip as xs:integer) as item()* externalThe collection function returns the sequence of nodes and/or json items that belong to the collection identified by the given name. | |
delete-first($name as xs:QName) externalThe delete-first function is an updating function that deletes the first item from an ordered collection. | |
delete-first($name as xs:QName, $number as xs:integer) externalThe delete-first function is an updating function that deletes the first N items from an ordered collection. | |
delete-last($name as xs:QName) externalThe delete-last function is an updating function that deletes the last item from an ordered collection. | |
delete-last($name as xs:QName, $number as xs:integer) externalThe delete-last function is an updating function that deletes the last N items from an ordered collection. | |
delete-node-first($name as xs:QName) externalThe delete-node-first function is an updating function that deletes the first node from an ordered collection. | |
delete-node-last($name as xs:QName) externalThe delete-node-last function is an updating function that deletes the last node from an ordered collection. | |
delete-nodes-first($name as xs:QName, $number as xs:integer) externalThe delete-nodes-first function is an updating function that deletes the first n nodes from an ordered collection. | |
delete-nodes-last($name as xs:QName, $number as xs:integer) externalThe delete-nodes-last function is an updating function that deletes the last n nodes from an ordered collection. | |
delete-nodes($target as node()*) externalThe delete-nodes function is an updating function that deletes zero of more nodes from a collection. | |
delete($target as item()*) externalThe delete function is an updating function that deletes zero of more items (nodes and/or json items) from a collection. | |
edit($target as item(), $content as item()) externalThe edit function is an updating function that edits the first supplied item so as to make it look exactly like a copy of the second supplied item, while retaining its original identity. | |
index-of($item as item()) as xs:integer externalThe index-of function returns the position of the given item (node or json item) within its containing collection. | |
insert-after($name as xs:QName, $target as item(), $content as item()*) externalThe insert-after function is an updating function that inserts copies of the given items (nodes and/or json items) into a collection at the position directlry following the given target item. | |
insert-before($name as xs:QName, $target as item(), $content as item()*) externalThe insert-before function is an updating function that inserts copies of the given items (nodes and/or json items) into a collection at the position directly preceding the given target item. | |
insert-first($name as xs:QName, $content as item()*) externalThe insert-first function is an updating function that inserts copies of the given items (nodes and/or json items) at the beginning of a collection. | |
insert-last($name as xs:QName, $content as item()*) externalThe insert-last function is an updating function that inserts copies of the given items (nodes and/or json items) at the end of a collection. | |
insert-nodes-after($name as xs:QName, $target as node(), $content as node()*) externalThe 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. | |
insert-nodes-before($name as xs:QName, $target as node(), $content as node()*) externalThe 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. | |
insert-nodes-first($name as xs:QName, $content as node()*) externalThe insert-nodes-first function is an updating function that inserts copies of the given nodes at the beginning of a collection. | |
insert-nodes-last($name as xs:QName, $content as node()*) externalThe insert-nodes-last function is an updating function that inserts copies of the given nodes at the end of a collection. | |
insert-nodes($name as xs:QName, $content as node()*) externalThe insert-nodes function is an updating function that inserts copies of the given nodes into a collection. | |
insert($name as xs:QName, $content as item()*) externalThe insert function is an updating function that inserts copies of the given items (nodes and/or json items) into a collection. | |
truncate($name as xs:QName) externalThe truncate function is an updating function that deletes the entire contents of collection. |
Functions
apply-insert-after#3
declare %an:sequential function cdml:apply-insert-after(
$name as xs:QName,
$pos as item(),
$content as item()*
) as item()* externalThis function does the same as the insert-after function except it immediately applies the resulting pending updates and returns the items that have been inserted.
Parameters
$name as xs:QNameThe name of the collection to which the items should be added.$pos as item()$content as item()The sequences of items whose copies should be added to the collection.
Returns
item()*The result of the function is the sequence of items that have been inserted into the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const, append-only, or queue.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
- zerr:ZDDY0011 if the $target item is not an item that is contained in the collection $name.
See also
apply-insert-before#3
declare %an:sequential function cdml:apply-insert-before(
$name as xs:QName,
$target as item(),
$content as item()*
) as item()* externalThis function does the same as the insert-before function except it immediately applies the resulting pending updates and returns the items that have been inserted.
Parameters
$name as xs:QNameThe name of the collection to which the items should be added.$target as item()The item in the collection before which the $content sequence should be inserted.$content as item()The sequences of items whose copies should be added to the collection.
Returns
item()*The result of the function is the sequence of items that have been inserted into the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const, append-only, or queue.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
- zerr:ZDDY0011 if the $target item is not an item that is contained in the collection $name.
See also
apply-insert-first#2
declare %an:sequential function cdml:apply-insert-first(
$name as xs:QName,
$content as item()*
) as item()* externalThis function does the same as the insert-first function except it immediately applies the resulting pending updates and returns the items that have been inserted.
Parameters
$name as xs:QNameThe name of the collection to which the items should be added.$content as item()The sequences of items whose copies should be added to the collection.
Returns
item()*The result of the function is the sequence of items that have been inserted into the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is append-only, const, or queue.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
See also
apply-insert-last#2
declare %an:sequential function cdml:apply-insert-last(
$name as xs:QName,
$content as item()*
) as item()* externalThis function does the same as the insert-last function except it immediately applies the resulting pending updates and returns the items that have been inserted.
Parameters
$name as xs:QNameThe name of the collection to which the items should be added.$content as item()The sequences of items whose copies should be added to the collection.
Returns
item()*The result of the function is the sequence of items that have been inserted into the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
See also
apply-insert-nodes-after#3
declare %an:sequential function cdml:apply-insert-nodes-after(
$name as xs:QName,
$pos as node(),
$content as node()*
) as node()* externalThis function is deprecated
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
$name as xs:QNameThe name of the collection to which the nodes should be added.$pos as node()$content as node()The sequences of nodes whose copies should be added to the collection.
Returns
node()*The result of the function is the sequence of nodes that have been inserted into the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const, append-only, or queue.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
- zerr:ZDDY0011 if the $target node is not a node that is contained in the collection $name.
See also
apply-insert-nodes-before#3
declare %an:sequential function cdml:apply-insert-nodes-before(
$name as xs:QName,
$target as node(),
$content as node()*
) as node()* externalThis function is deprecated
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
$name as xs:QNameThe name of the collection to which the nodes should be added.$target as node()The node in the collection before which the $content sequence should be inserted.$content as node()The sequences of nodes whose copies should be added to the collection.
Returns
node()*The result of the function is the sequence of nodes that have been inserted into the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const, append-only, or queue.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
- zerr:ZDDY0011 if the $target node is not a node that is contained in the collection $name.
See also
apply-insert-nodes-first#2
declare %an:sequential function cdml:apply-insert-nodes-first(
$name as xs:QName,
$content as node()*
) as node()* externalThis function is deprecated
This function does the same as the insert-nodes-first function except it immediately applies the resulting pending updates and returns the nodes that have been inserted.
Parameters
$name as xs:QNameThe name of the collection to which the nodes should be added.$content as node()The sequences of nodes whose copies should be added to the collection.
Returns
node()*The result of the function is the sequence of nodes that have been inserted into the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is append-only, const, or queue.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type according to the rules for SequenceType Matching.
See also
apply-insert-nodes-last#2
declare %an:sequential function cdml:apply-insert-nodes-last(
$name as xs:QName,
$content as node()*
) as node()* externalThis function is deprecated
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
$name as xs:QNameThe name of the collection to which the nodes should be added.$content as node()The sequences of nodes whose copies should be added to the collection.
Returns
node()*The result of the function is the sequence of nodes that have been inserted into the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
See also
apply-insert-nodes#2
declare %an:sequential function cdml:apply-insert-nodes(
$name as xs:QName,
$content as node()*
) as node()* externalThis function is deprecated
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
$name as xs:QNameThe name of the collection to which the nodes should be added.$content as node()The sequences of nodes whose copies should be added to the collection.
Returns
node()*The result of the function is the sequence of nodes that have been inserted into the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is append-only, const, or queue.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
See also
apply-insert#2
declare %an:sequential function cdml:apply-insert(
$name as xs:QName,
$content as item()*
) as item()* externalThis function does the same as the insert function except it immediately applies the resulting pending updates and returns the items that have been inserted.
Parameters
$name as xs:QNameThe name of the collection to which the items should be added.$content as item()The sequences of items whose copies should be added to the collection.
Returns
item()*The result of the function is the sequence of items that have been inserted into the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is append-only, const, or queue.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
See also
collection-name#1
declare function cdml:collection-name(
$item as item()
) as xs:QName externalThe collection-name function returns the name of the collection the given item (node or json item) belongs to.
Parameters
$item as item()The item for which to get the name of the collection
Returns
xs:QNameThe result of this function is a QName which identifies the collection to which the given item belongs to.
Errors
- zerr:ZDDY0011 if the given item does not belong to a collection.
collection#1
declare function cdml:collection(
$name as xs:QName
) as item()* externalThe collection function returns the sequence of nodes and/or json items that belong to the collection identified by the given name.
Parameters
$name as xs:QNameThe name of the collection.
Returns
item()*The sequence contained in the given collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
collection#2
declare function cdml:collection(
$name as xs:QName,
$skip as xs:integer
) as item()* externalThe collection function returns the sequence of nodes and/or json items that belong to the collection identified by the given name.
Parameters
$name as xs:QNameThe name of the collection.$skip as xs:integerThe number of collection items to skip.
Returns
item()*The sequence contained in the given collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
collection#3
declare function cdml:collection(
$name as xs:QName,
$start as xs:anyURI,
$skip as xs:integer
) as item()* externalThe collection function returns the sequence of nodes and/or json items that belong to the collection identified by the given name. The parameters $start and $skip can be used to skip over some items at the beginning of the collection. If both are given, both are applied: first $start to skip to the referenced item and then $skip to skip an additional number of items.
Parameters
$name as xs:QNameThe name of the collection.$start as xs:anyURIThe reference to the first item to return. All items before$skip as xs:integerThe number of collection items to skip.
Returns
item()*The sequence contained in the given collection.
Errors
- zerr:ZAPI0028 If the given URI is not a valid node position computed by the np:node-position function.
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZSTR0066 if the passed reference $start does not reference a node from the collection identified by $name.
delete-first#1
declare updating function cdml:delete-first(
$name as xs:QName
) as item()* externalThe delete-first function is an updating function that deletes the first item from an ordered collection.
Parameters
$name as xs:QNameThe name of the collection from which the first item should be deleted.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const or append-only.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDDY0011 If the collection is empty.
delete-first#2
declare updating function cdml:delete-first(
$name as xs:QName,
$number as xs:integer
) as item()* externalThe delete-first function is an updating function that deletes the first N items from an ordered collection.
Parameters
$name as xs:QNameThe name of the collection from which the first N items should be deleted.$number as xs:integerThe number N of items that should be removed from the beginning of the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const or append-only.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDDY0011 If the collection contains less than $number items.
delete-last#1
declare updating function cdml:delete-last(
$name as xs:QName
) as item()* externalThe delete-last function is an updating function that deletes the last item from an ordered collection.
Parameters
$name as xs:QNameThe name of the collection from which the last item should be deleted.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const, append-only, or queue.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDDY0011 If the collection is empty.
delete-last#2
declare updating function cdml:delete-last(
$name as xs:QName,
$number as xs:integer
) as item()* externalThe delete-last function is an updating function that deletes the last N items from an ordered collection.
Parameters
$name as xs:QNameThe name of the collection from which the last N items should be deleted.$number as xs:integerThe number of items to delete.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDDY0011 If the collection contains less than $number items.
delete-node-first#1
declare updating function cdml:delete-node-first(
$name as xs:QName
) as item()* externalThis function is deprecated
The delete-node-first function is an updating function that deletes the first node from an ordered collection.
Parameters
$name as xs:QNameThe name of the collection from which the first node should be deleted.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const or append-only.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDDY0011 If the collection is empty.
delete-node-last#1
declare updating function cdml:delete-node-last(
$name as xs:QName
) as item()* externalThis function is deprecated
The delete-node-last function is an updating function that deletes the last node from an ordered collection.
Parameters
$name as xs:QNameThe name of the collection from which the last node should be deleted.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const, append-only, or queue.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDDY0011 If the collection is empty.
delete-nodes-first#2
declare updating function cdml:delete-nodes-first(
$name as xs:QName,
$number as xs:integer
) as item()* externalThis function is deprecated
The delete-nodes-first function is an updating function that deletes the first n nodes from an ordered collection.
Parameters
$name as xs:QNameThe name of the collection from which the first node should be deleted.$number as xs:integerThe number of nodes that should be removed from the beginning of the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const or append-only.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDDY0011 If the collection contains less than $number nodes.
delete-nodes-last#2
declare updating function cdml:delete-nodes-last(
$name as xs:QName,
$number as xs:integer
) as item()* externalThis function is deprecated
The delete-nodes-last function is an updating function that deletes the last n nodes from an ordered collection.
Parameters
$name as xs:QNameThe name of the collection from which the first node should be deleted.$number as xs:integerThe number of nodes to delete.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDDY0011 If the collection contains less than $number nodes.
delete-nodes#1
declare updating function cdml:delete-nodes(
$target as node()*
) as item()* externalThis function is deprecated
The delete-nodes function is an updating function that deletes zero of more nodes from a collection.
Parameters
$target as node()the nodes in the collection that should be deleted.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const, append-only, or queue.
- zerr:ZDDY0011 if any node in the $target sequence is not a member of a collection or not all nodes of the $target sequence belong to the same collection.
delete#1
declare updating function cdml:delete(
$target as item()*
) as item()* externalThe delete function is an updating function that deletes zero of more items (nodes and/or json items) from a collection.
Parameters
$target as item()the items in the collection that should be deleted.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const, append-only, or queue.
- zerr:ZDDY0011 if any item in the $target sequence is not a member of a collection or not all items of the $target sequence belong to the same collection.
edit#2
declare updating function cdml:edit(
$target as item(),
$content as item()
) as item()* externalThe edit function is an updating function that edits the first supplied item so as to make it look exactly like a copy of the second supplied item, while retaining its original identity.
Parameters
$target as item()The target item ,that must be edited.$content as item()The content item, that serves as an edit goal.
Errors
- zerr:ZDDY0001 if the collection to which $target belongs is not declared.
- zerr:ZDDY0003 if the collection to which $target belongs is not available.
- zerr:ZDDY0006 if the modifier property of the collection to which $target belongs is append-only, const, or queue.
- zerr:ZDDY0017 if the $target item is not a member of a collection.
- zerr:ZDDY0037 if the collection is append-only.
- zerr:ZDDY0038 if the collection is a queue.
- zerr:ZDDY0039 if the $target item is not a root.
- zerr:ZDDY0040 if the target cannot be updated to match the content (for example because the target is a node and the content is an object).
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
index-of#1
declare function cdml:index-of(
$item as item()
) as xs:integer externalThe index-of function returns the position of the given item (node or json item) within its containing collection.
Parameters
$item as item()
Returns
xs:integerReturns the position as xs:integer of the given item in the collection.
Errors
- zerr:ZDDY0011 if the item is not stored in any collection.
- zerr:ZDDY0012 if the order property of the collection is unordered.
insert-after#3
declare updating function cdml:insert-after(
$name as xs:QName,
$target as item(),
$content as item()*
) as item()* externalThe insert-after function is an updating function that inserts copies of the given items (nodes and/or json items) into a collection at the position directlry following the given target item.
Parameters
$name as xs:QNameThe name of the collection to which the items should be added.$target as item()The item in the collection after which the $content sequence should be inserted.$content as item()The sequences of items whose copies should be added to the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const, append-only, or queue.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
- zerr:ZDDY0011 if the $target node is not a node that is contained in the collection $name.
insert-before#3
declare updating function cdml:insert-before(
$name as xs:QName,
$target as item(),
$content as item()*
) as item()* externalThe insert-before function is an updating function that inserts copies of the given items (nodes and/or json items) into a collection at the position directly preceding the given target item.
Parameters
$name as xs:QNameThe name of the collection to which the items should be added.$target as item()The item in the collection before which the $content sequence should be inserted.$content as item()The sequences of items whose copies should be added to the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const, append-only, or queue.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
- zerr:ZDDY0011 if the $target item is not an item that is contained in the collection $name.
insert-first#2
declare updating function cdml:insert-first(
$name as xs:QName,
$content as item()*
) as item()* externalThe insert-first function is an updating function that inserts copies of the given items (nodes and/or json items) at the beginning of a collection.
Parameters
$name as xs:QNameThe name of the collection to which the items should be added.$content as item()The sequences of items whose copies should be added to the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is append-only, const, or queue.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
insert-last#2
declare updating function cdml:insert-last(
$name as xs:QName,
$content as item()*
) as item()* externalThe insert-last function is an updating function that inserts copies of the given items (nodes and/or json items) at the end of a collection.
Parameters
$name as xs:QNameThe name of the collection to which the items should be added.$content as item()The sequences of itemss whose copies should be added to the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
insert-nodes-after#3
declare updating function cdml:insert-nodes-after(
$name as xs:QName,
$target as node(),
$content as node()*
) as item()* externalThis function is deprecated
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
$name as xs:QNameThe name of the collection to which the nodes should be added.$target as node()The node in the collection after which the $content sequence should be inserted.$content as node()The sequences of nodes whose copies should be added to the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const, append-only, or queue.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
- zerr:ZDDY0011 if the $target node is not a node that is contained in the collection $name.
insert-nodes-before#3
declare updating function cdml:insert-nodes-before(
$name as xs:QName,
$target as node(),
$content as node()*
) as item()* externalThis function is deprecated
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
$name as xs:QNameThe name of the collection to which the nodes should be added.$target as node()The node in the collection before which the $content sequence should be inserted.$content as node()The sequences of nodes whose copies should be added to the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const, append-only, or queue.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
- zerr:ZDDY0011 if the $target node is not a node that is contained in the collection $name.
insert-nodes-first#2
declare updating function cdml:insert-nodes-first(
$name as xs:QName,
$content as node()*
) as item()* externalThis function is deprecated
The insert-nodes-first function is an updating function that inserts copies of the given nodes at the beginning of a collection.
Parameters
$name as xs:QNameThe name of the collection to which the nodes should be added.$content as node()The sequences of nodes whose copies should be added to the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is append-only, const, or queue.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
insert-nodes-last#2
declare updating function cdml:insert-nodes-last(
$name as xs:QName,
$content as node()*
) as item()* externalThis function is deprecated
The insert-nodes-last function is an updating function that inserts copies of the given nodes at the end of a collection.
Parameters
$name as xs:QNameThe name of the collection to which the nodes should be added.$content as node()The sequences of nodes whose copies should be added to the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is const.
- zerr:ZDDY0012 if the order property of the collection $name is unordered.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
insert-nodes#2
declare updating function cdml:insert-nodes(
$name as xs:QName,
$content as node()*
) as item()* externalThis function is deprecated
The insert-nodes function is an updating function that inserts copies of the given nodes into a collection. Please note that the insertion position of the nodes in the collection is not defined.
Parameters
$name as xs:QNameThe name of the collection to which the nodes should be added.$content as node()The sequences of nodes whose copies should be added to the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is append-only, const, or queue.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
insert#2
declare updating function cdml:insert(
$name as xs:QName,
$content as item()*
) as item()* externalThe insert function is an updating function that inserts copies of the given items (nodes and/or json items) into a collection. Please note that the insertion position of the items in the collection is not defined.
Parameters
$name as xs:QNameThe name of the collection to which the items should be added.$content as item()The sequences of items whose copies should be added to the collection.
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
- zerr:ZDDY0006 if the modifier property of the collection $name is append-only, const, or queue.
- zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.
truncate#1
declare updating function cdml:truncate(
$name as xs:QName
) as item()* externalThe truncate function is an updating function that deletes the entire contents of collection. Please note that applying this function can not be undone in case an error happens during the application of the containing PUL.
Parameters
$name as xs:QNameThe name of the collection whose content to delete
Errors
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.