- All Modules
- All Functions
-
www.w3.org
- 2005
- XDM
- store
- introspection
- reflection
- external
-
xqdoc
-
xqdoc
(E)
-
project_xqdoc
- xqdoc2xhtml
-
xqdoc
(E)
- data processing
- expath.org
- www.functx.com
- debugger
- error
- jsoniq.org
- www.zorba-xquery.com
http://www.zorba-xquery.com/modules/store/static/collections/dml
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.
Nicolae Brinza, Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis
xquery version "3.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:
- Data Lifecycle
- 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
- http://www.zorba-xquery.com/errors
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 |
![]() ![]() |
apply-insert
(
$name as xs:QName,
$content as item()*
) as item()* This function does the same as the insert function except it immediately applies the resulting pending updates and returns the items that have been inserted. |
![]() ![]() |
apply-insert-after
(
$name as xs:QName,
$pos as item(),
$content as item()*
) as item()* This 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()* This 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()* This 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()* This 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. |
![]() ![]() |
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. |
![]() ![]() |
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. |
![]() ![]() |
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. |
![]() ![]() |
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. |
![]() ![]() |
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:QName
) as item()* The 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()* The 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()* The collection function returns the sequence of nodes and/or json items that belong to the collection identified by the given name. |
![]() |
collection-name
(
$item as item()
) as xs:QName The collection-name function returns the name of the collection the given item (node or json item) belongs to. |
![]() ![]() |
delete
(
$target as item()*
) as The delete function is an updating function that deletes zero of more items (nodes and/or json items) from a collection. |
![]() ![]() |
delete-first
(
$name as xs:QName
) as The 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
) as The delete-first function is an updating function that deletes the first N items from an ordered collection. |
![]() ![]() |
delete-last
(
$name as xs:QName
) as The 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
) as The delete-last function is an updating function that deletes the last N items from an ordered collection. |
![]() ![]() |
The delete-node-first function is an updating function that deletes the first node from an ordered collection. |
![]() ![]() |
The delete-node-last function is an updating function that deletes the last node from an ordered collection. |
![]() ![]() |
The delete-nodes function is an updating function that deletes zero of more nodes from a collection. |
![]() ![]() |
The delete-nodes-first function is an updating function that deletes the first n nodes from an ordered collection. |
![]() ![]() |
The delete-nodes-last function is an updating function that deletes the last n nodes from an ordered collection. |
![]() |
index-of
(
$item as item()
) as xs:integer The index-of function returns the position of the given item (node or json item) within its containing collection. |
![]() ![]() |
insert
(
$name as xs:QName,
$content as item()*
) as The insert function is an updating function that inserts copies of the given items (nodes and/or json items) into a collection. |
![]() ![]() |
insert-after
(
$name as xs:QName,
$target as item(),
$content as item()*
) as The 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()*
) as The 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()*
) as The 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()*
) as The 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. |
![]() ![]() |
The insert-nodes function is an updating function that inserts copies of the given nodes into a collection. |
![]() ![]() |
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. |
![]() ![]() |
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. |
![]() ![]() |
The insert-nodes-first function is an updating function that inserts copies of the given nodes at the beginning of a collection. |
![]() ![]() |
The insert-nodes-last function is an updating function that inserts copies of the given nodes at the end of a collection. |
![]() ![]() |
truncate
(
$name as xs:QName
) as The truncate function is an updating function that deletes the entire contents of collection. |
declare function cdml:apply-insert ( $name as xs:QName, $content as item()* ) as item()*
This function does the same as the insert function except it immediately applies the resulting pending updates and returns the items that have been inserted.
- $name The name of the collection to which the items should be added.
- $content The sequences of items whose copies should be added to the collection.
- The result of the function is the sequence of items that have been inserted into the collection.
- 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.
- cdml:insert
declare function cdml:apply-insert-after ( $name as xs:QName, $pos as item(), $content as item()* ) as item()*
This 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.
- $name The name of the collection to which the items should be added.
- $target The item in the collection after which the $content sequence should be inserted.
- $content The sequences of items whose copies should be added to the collection.
- The result of the function is the sequence of items that have been inserted into the collection.
- 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.
- cdml:insert-after
declare function cdml:apply-insert-before ( $name as xs:QName, $target as item(), $content as item()* ) as item()*
This 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.
- $name The name of the collection to which the items should be added.
- $target The item in the collection before which the $content sequence should be inserted.
- $content The sequences of items whose copies should be added to the collection.
- The result of the function is the sequence of items that have been inserted into the collection.
- 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.
- cdml:insert-before
declare function cdml:apply-insert-first ( $name as xs:QName, $content as item()* ) as item()*
This 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.
- $name The name of the collection to which the items should be added.
- $content The sequences of items whose copies should be added to the collection.
- The result of the function is the sequence of items that have been inserted into the collection.
- 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.
- cdml:insert-first
declare function cdml:apply-insert-last ( $name as xs:QName, $content as item()* ) as item()*
This 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.
- $name The name of the collection to which the items should be added.
- $content The sequences of items whose copies should be added to the collection.
- The result of the function is the sequence of items that have been inserted into the collection.
- 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.
- cdml:insert-last
Deprecated - please use the cdml:apply-insert#2 function
declare function cdml:apply-insert-nodes ( $name as xs:QName, $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.
- $name The name of the collection to which the nodes should be added.
- $content The sequences of nodes whose copies should be added to the collection.
- The result of the function is the sequence of nodes that have been inserted into the collection.
- 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.
- cdml:insert-nodes
Deprecated - please use the cdml:apply-insert-after#3 function
declare function cdml:apply-insert-nodes-after ( $name as xs:QName, $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.
- $name The name of the collection to which the nodes should be added.
- $target The node in the collection after which the $content sequence should be inserted.
- $content The sequences of nodes whose copies should be added to the collection.
- The result of the function is the sequence of nodes that have been inserted into the collection.
- 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.
- cdml:insert-nodes-after
Deprecated - please use the cdml:apply-insert-before#3 function
declare function cdml:apply-insert-nodes-before ( $name as xs:QName, $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.
- $name The name of the collection to which the nodes should be added.
- $target The node in the collection before which the $content sequence should be inserted.
- $content The sequences of nodes whose copies should be added to the collection.
- The result of the function is the sequence of nodes that have been inserted into the collection.
- 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.
- cdml:insert-nodes-before
Deprecated - please use the cdml:apply-insert-first#2 function
declare function cdml:apply-insert-nodes-first ( $name as xs:QName, $content as node()* ) as node()*
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.
- $name The name of the collection to which the nodes should be added.
- $content The sequences of nodes whose copies should be added to the collection.
- The result of the function is the sequence of nodes that have been inserted into the collection.
- 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.
- cdml:insert-nodes-first
Deprecated - please use the cdml:apply-insert-last#2 function
declare function cdml:apply-insert-nodes-last ( $name as xs:QName, $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.
- $name The name of the collection to which the nodes should be added.
- $content The sequences of nodes whose copies should be added to the collection.
- The result of the function is the sequence of nodes that have been inserted into the collection.
- 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.
- cdml:insert-nodes-last
declare function cdml:collection ( $name as xs:QName ) as item()*
The collection function returns the sequence of nodes and/or json items that belong to the collection identified by the given name.
- $name The name of the collection.
- The sequence contained in the given collection.
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
declare function cdml:collection ( $name as xs:QName, $skip as xs:integer ) as item()*
The collection function returns the sequence of nodes and/or json items that belong to the collection identified by the given name.
- $name The name of the collection.
- $skip The number of collection items to skip.
- The sequence contained in the given collection.
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.
declare function cdml:collection ( $name as xs:QName, $start as xs:anyURI, $skip as xs:integer ) as item()*
The 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.
- $name The name of the collection.
- $start The reference to the first item to return. All items before
- $skip The number of collection items to skip.
- The sequence contained in the given collection.
- 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.
declare function cdml:collection-name ( $item as item() ) as xs:QName
The collection-name function returns the name of the collection the given item (node or json item) belongs to.
- $item The item for which to get the name of the collection
- The result of this function is a QName which identifies the collection to which the given item belongs to.
- zerr:ZDDY0011 if the given item does not belong to a collection.
declare function cdml:delete ( $target as item()* ) as
The delete function is an updating function that deletes zero of more items (nodes and/or json items) from a collection.
- $target the items in the collection that should be deleted.
- The result of this function is an empty XDM instance and a pending update list which, once applied, deletes the items from their collections.
- 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.
declare function cdml:delete-first ( $name as xs:QName ) as
The delete-first function is an updating function that deletes the first item from an ordered collection.
- $name The name of the collection from which the first item should be deleted.
- The result of this function is an empty XDM instance and a pending update list which, once applied, deletes the first item from the collection.
- 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.
declare function cdml:delete-first ( $name as xs:QName, $number as xs:integer ) as
The delete-first function is an updating function that deletes the first N items from an ordered collection.
- $name The name of the collection from which the first N items should be deleted.
- $number The number N of items that should be removed from the beginning of the collection.
- The result of this function is an empty XDM instance and a pending update list which, once applied, deletes the items from the collection.
- 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.
declare function cdml:delete-last ( $name as xs:QName ) as
The delete-last function is an updating function that deletes the last item from an ordered collection.
- $name The name of the collection from which the last item should be deleted.
- The result of this function is an empty XDM instance and a pending update list which, once applied, deletes the last item from the collection.
- 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.
declare function cdml:delete-last ( $name as xs:QName, $number as xs:integer ) as
The delete-last function is an updating function that deletes the last N items from an ordered collection.
- $name The name of the collection from which the last N items should be deleted.
- $number The number of items to delete.
- The result of this function is an empty XDM instance and a pending update list which, once applied, deletes the items.
- 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.
Deprecated - please use the cdml:delete-first#1 function
declare function cdml:delete-node-first ( $name as xs:QName ) as
The delete-node-first function is an updating function that deletes the first node from an ordered collection.
- $name The name of the collection from which the first node should be deleted.
- The result of this function is an empty XDM instance and a pending update list which, once applied, deletes the first node from the collection.
- 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.
Deprecated - please use the cdml:delete-last#1 function
declare function cdml:delete-node-last ( $name as xs:QName ) as
The delete-node-last function is an updating function that deletes the last node from an ordered collection.
- $name The name of the collection from which the last node should be deleted.
- The result of this function is an empty XDM instance and a pending update list which, once applied, deletes the last node from the collection.
- 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.
Deprecated - please use the cdml:delete#1 function
declare function cdml:delete-nodes ( $target as node()* ) as
The delete-nodes function is an updating function that deletes zero of more nodes from a collection.
- $target the nodes in the collection that should be deleted.
- The result of this function is an empty XDM instance and a pending update list which, once applied, deletes the nodes from their collections.
- 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.
Deprecated - please use the cdml:delete-first#2 function
declare function cdml:delete-nodes-first ( $name as xs:QName, $number as xs:integer ) as
The delete-nodes-first function is an updating function that deletes the first n nodes from an ordered collection.
- $name The name of the collection from which the first node should be deleted.
- $number The number of nodes that should be removed from the beginning of the collection.
- The result of this function is an empty XDM instance and a pending update list which, once applied, deletes the nodes from the collection.
- 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.
Deprecated - please use the cdml:delete-last#2 function
declare function cdml:delete-nodes-last ( $name as xs:QName, $number as xs:integer ) as
The delete-nodes-last function is an updating function that deletes the last n nodes from an ordered collection.
- $name The name of the collection from which the first node should be deleted.
- $number The number of nodes to delete.
- The result of this function is an empty XDM instance and a pending update list which, once applied, deletes the nodes.
- 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.
declare function cdml:index-of ( $item as item() ) as xs:integer
The index-of function returns the position of the given item (node or json item) within its containing collection.
- $node The item to retrieve the index for.
- Returns the position as xs:integer of the given item in the collection.
- zerr:ZDDY0011 if the item is not stored in any collection.
- zerr:ZDDY0012 if the order property of the collection is unordered.
declare function cdml:insert ( $name as xs:QName, $content as item()* ) as
The 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.
- $name The name of the collection to which the items should be added.
- $content The sequences of items whose copies should be added to the collection.
- The result of the function is an empty XDM instance and a pending update list which, once applied, inserts the items into the collection.
- 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.
declare function cdml:insert-after ( $name as xs:QName, $target as item(), $content as item()* ) as
The 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.
- $name The name of the collection to which the items should be added.
- $target The item in the collection after which the $content sequence should be inserted.
- $content The sequences of items whose copies should be added to the collection.
- The result of the function is an empty XDM instance and a pending update list which, once applied, inserts the items into the collection.
- 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.
declare function cdml:insert-before ( $name as xs:QName, $target as item(), $content as item()* ) as
The 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.
- $name The name of the collection to which the items should be added.
- $target The item in the collection before which the $content sequence should be inserted.
- $content The sequences of items whose copies should be added to the collection.
- The result of the function is an empty XDM instance and a pending update list which, once applied, inserts the items into the collection.
- 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.
declare function cdml:insert-first ( $name as xs:QName, $content as item()* ) as
The 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.
- $name The name of the collection to which the items should be added.
- $content The sequences of items whose copies should be added to the collection.
- The result of the function is an empty XDM instance and a pending update list which, once applied, inserts the items into the collection.
- 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.
declare function cdml:insert-last ( $name as xs:QName, $content as item()* ) as
The 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.
- $name The name of the collection to which the items should be added.
- $content The sequences of itemss whose copies should be added to the collection.
- The result of the function is an empty XDM instance and a pending update list which, once applied, inserts the items into the collection.
- 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.
Deprecated - please use the cdml:insert#2 function
declare function cdml:insert-nodes ( $name as xs:QName, $content as node()* ) as
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.
- $name The name of the collection to which the nodes should be added.
- $content The sequences of nodes whose copies should be added to the collection.
- The result of the function is an empty XDM instance and a pending update list which, once applied, inserts the nodes into the collection.
- 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.
Deprecated - please use the cdml:insert-after#3 function
declare function cdml:insert-nodes-after ( $name as xs:QName, $target as node(), $content as node()* ) as
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.
- $name The name of the collection to which the nodes should be added.
- $target The node in the collection after which the $content sequence should be inserted.
- $content The sequences of nodes whose copies should be added to the collection.
- The result of the function is an empty XDM instance and a pending update list which, once applied, inserts the nodes into the collection.
- 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.
Deprecated - please use the cdml:insert-before#3 function
declare function cdml:insert-nodes-before ( $name as xs:QName, $target as node(), $content as node()* ) as
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.
- $name The name of the collection to which the nodes should be added.
- $target The node in the collection before which the $content sequence should be inserted.
- $content The sequences of nodes whose copies should be added to the collection.
- The result of the function is an empty XDM instance and a pending update list which, once applied, inserts the nodes into the collection.
- 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.
Deprecated - please use the cdml:insert-first#2 function
declare function cdml:insert-nodes-first ( $name as xs:QName, $content as node()* ) as
The insert-nodes-first function is an updating function that inserts copies of the given nodes at the beginning of a collection.
- $name The name of the collection to which the nodes should be added.
- $content The sequences of nodes whose copies should be added to the collection.
- The result of the function is an empty XDM instance and a pending update list which, once applied, inserts the nodes into the collection.
- 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.
Deprecated - please use the cdml:insert-last#2 function
declare function cdml:insert-nodes-last ( $name as xs:QName, $content as node()* ) as
The insert-nodes-last function is an updating function that inserts copies of the given nodes at the end of a collection.
- $name The name of the collection to which the nodes should be added.
- $content The sequences of nodes whose copies should be added to the collection.
- The result of the function is an empty XDM instance and a pending update list which, once applied, inserts the nodes into the collection.
- 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.
declare function cdml:truncate ( $name as xs:QName ) as
The 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.
- $name The name of the collection whose content to delete
- The result of this function is an empty XDM instance and a pending update list which, once applied, deletes the nodes.
- zerr:ZDDY0001 if the collection identified by $name is not declared.
- zerr:ZDDY0003 if the collection identified by $name is not available.