{ "ns" : "http://zorba.io/modules/store/dynamic/collections/w3c/dml", "description" : " This modules provides a set of functions to modify a collection and retrieve\n the nodes contained in a particular collection.\n

\n Such collections are identified by a URI as defined in the XQuery\n specification.\n However, please note that we do not advice users to use collections\n identified by URIs.\n Instead, we refer to the\n data lifecycle documentation.\n It gives an overview of several ways to work with collections, documents,\n and other data-structures.\n", "sees" : [ "Data Lifecycle", "http://zorba.io/modules/store/dynamic/collections/w3c/ddl", "http://zorba.io/modules/store/dynamic/collections/ddl", "http://zorba.io/modules/store/dynamic/collections/dml", "http://zorba.io/errors" ], "authors" : [ "Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis" ], "version" : null, "encoding" : "utf-8", "namespaces" : [ { "uri" : "http://zorba.io/annotations", "prefix" : "an" }, { "uri" : "http://zorba.io/modules/store/dynamic/collections/w3c/ddl", "prefix" : "ddl" }, { "uri" : "http://zorba.io/modules/store/dynamic/collections/w3c/dml", "prefix" : "dml" }, { "uri" : "http://zorba.io/modules/store/dynamic/collections/dml", "prefix" : "qdml" }, { "uri" : "http://zorba.io/options/versioning", "prefix" : "ver" }, { "uri" : "http://zorba.io/errors", "prefix" : "zerr" } ], "functions" : [ { "arity" : 3, "name" : "apply-insert-nodes-after", "qname" : "dml:apply-insert-nodes-after", "signature" : "($name as xs:string, $pos as node(), $content as node()*) as node()*", "description" : " This function does the same as the insert-nodes-after()\n function except it immediately applies the resulting pending updates and\n returns the nodes that have been inserted.\n", "summary" : "

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

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "pos", "type" : "node()", "occurence" : null, "description" : "" }, { "name" : "content", "type" : "node()", "occurence" : null, "description" : "
The sequence of nodes whose copies will be inserted.
" } ], "returns" : { "type" : "node()*", "description" : "The sequence of nodes that have been inserted." }, "errors" : [ "zerr:ZDDY0003 if the collection is not available." ] }, { "arity" : 3, "name" : "apply-insert-nodes-before", "qname" : "dml:apply-insert-nodes-before", "signature" : "($name as xs:string, $target as node(), $content as node()*) as node()*", "description" : " This function does the same as the insert-nodes-before()\n function except it immediately applies the resulting pending updates and\n returns the nodes that have been inserted.\n", "summary" : "

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

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "target", "type" : "node()", "occurence" : null, "description" : "
The node in the collection before which $content will be inserted.
" }, { "name" : "content", "type" : "node()", "occurence" : null, "description" : "
The sequence of nodes whose copies will be inserted.
" } ], "returns" : { "type" : "node()*", "description" : "The sequence of nodes that have been inserted." }, "errors" : [ "zerr:ZDDY0003 if the collection is not available." ] }, { "arity" : 2, "name" : "apply-insert-nodes-first", "qname" : "dml:apply-insert-nodes-first", "signature" : "($name as xs:string, $content as node()*) as node()*", "description" : " This function does the same as the insert-nodes() function\n except it immediately applies the resulting pending updates and returns the\n nodes that have been inserted.\n", "summary" : "

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

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "content", "type" : "node()", "occurence" : null, "description" : "
The sequence of nodes whose copies will be inserted.
" } ], "returns" : { "type" : "node()*", "description" : "The sequence of nodes that have been inserted." }, "errors" : [ "zerr:ZDDY0003 if the collection is not available." ] }, { "arity" : 2, "name" : "apply-insert-nodes-last", "qname" : "dml:apply-insert-nodes-last", "signature" : "($name as xs:string, $content as node()*) as node()*", "description" : " This function does the same as the insert-nodes-last() function\n except it immediately applies the resulting pending updates and returns the\n nodes that have been inserted.\n", "summary" : "

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

", "annotation_str" : " %an:sequential", "annotations" : [ { "prefix" : "an", "ns" : "http://zorba.io/annotations", "name" : "sequential", "value" : "" } ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "content", "type" : "node()", "occurence" : null, "description" : "
The sequence of nodes whose copies will be inserted.
" } ], "returns" : { "type" : "node()*", "description" : "The sequence of nodes that have been inserted." }, "errors" : [ "zerr:ZDDY0003 if the collection is not available." ] }, { "arity" : 1, "name" : "collection-name", "qname" : "dml:collection-name", "signature" : "($node as node()) as xs:string", "description" : " Gets the name of the collection the given node belongs to.\n", "summary" : "

Gets the name of the collection the given node belongs to.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurence" : null, "description" : "
The node for which to get the name of the collection.
" } ], "returns" : { "type" : "xs:string", "description" : "The URI of the collection to which $node belongs." }, "errors" : [ "zerr:ZDDY0011 if $node does not belong to a collection." ] }, { "arity" : 1, "name" : "collection", "qname" : "dml:collection", "signature" : "($name as xs:string) as node()*", "description" : " Gets the sequence of nodes of the collection identified by the given name.\n", "summary" : "

Gets the sequence of nodes of the collection identified by the given name.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurence" : null, "description" : "
The name of the collection.
" } ], "returns" : { "type" : "node()*", "description" : "The sequence contained in the given collection." }, "errors" : [ "zerr:ZDDY0003 if the collection is not available." ] }, { "arity" : 1, "name" : "delete-node-first", "qname" : "dml:delete-node-first", "signature" : "($name as xs:string)", "description" : " Deletes the first node from a collection.\n", "summary" : "

Deletes the first node from a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurence" : null, "description" : "
The name of the collection to delete from.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, deletes the first node from the collection." }, "errors" : [ "zerr:ZDDY0011 if the collection is empty." ] }, { "arity" : 1, "name" : "delete-node-last", "qname" : "dml:delete-node-last", "signature" : "($name as xs:string)", "description" : " Deletes the last node from a collection.\n", "summary" : "

Deletes the last node from a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurence" : null, "description" : "
The name of the collection to delete from.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, deletes the last node from the collection." }, "errors" : [ "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0011 if the collection is empty." ] }, { "arity" : 2, "name" : "delete-nodes-first", "qname" : "dml:delete-nodes-first", "signature" : "($name as xs:string, $number as xs:integer)", "description" : " Deletes the first N nodes from a collection.\n", "summary" : "

Deletes the first N nodes from a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurence" : null, "description" : "
The name of the collection to delete from.
" }, { "name" : "number", "type" : "xs:integer", "occurence" : null, "description" : "
The number of nodes to delete.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, deletes the nodes from the collection." }, "errors" : [ "zerr:ZDDY0011 if the collection contains less than $number items." ] }, { "arity" : 2, "name" : "delete-nodes-last", "qname" : "dml:delete-nodes-last", "signature" : "($name as xs:string, $number as xs:integer)", "description" : " Deletes the last N nodes from a collection.\n", "summary" : "

Deletes the last N nodes from a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurence" : null, "description" : "
The name of the collection to delete from.
" }, { "name" : "number", "type" : "xs:integer", "occurence" : null, "description" : "
The number of nodes to delete.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, deletes the last n nodes." }, "errors" : [ "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0011 if the collection contains less than $number items." ] }, { "arity" : 1, "name" : "delete-nodes", "qname" : "dml:delete-nodes", "signature" : "($nodes as node()*)", "description" : " Deletes nodes from a collection.\n", "summary" : "

Deletes nodes from a collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "nodes", "type" : "node()", "occurence" : null, "description" : "
the nodes in the collection that should be deleted.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, deletes the nodes from their collections." }, "errors" : [ "zerr:ZDDY0011 if any nodes are not a member of a collection or not all nodes of belong to the same collection." ] }, { "arity" : 1, "name" : "index-of", "qname" : "dml:index-of", "signature" : "($node as node()) as xs:integer", "description" : " Gets the index of the given node in the collection.\n", "summary" : "

Gets the index of the given node in the collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : false, "parameters" : [ { "name" : "node", "type" : "node()", "occurence" : null, "description" : "
The node to get the index of.
" } ], "returns" : { "type" : "xs:integer", "description" : "Returns the position of $node in the collection." }, "errors" : [ "zerr:ZDDY0011 if $node is not contained in any collection." ] }, { "arity" : 3, "name" : "insert-nodes-after", "qname" : "dml:insert-nodes-after", "signature" : "($name as xs:string, $pos as node(), $content as node()*)", "description" : " Inserts copies of the given nodes into a collection at the position\n directly following the given target node.\n", "summary" : "

Inserts copies of the given nodes into a collection at the position\n directly following the given target node.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "pos", "type" : "node()", "occurence" : null, "description" : "" }, { "name" : "content", "type" : "node()", "occurence" : null, "description" : "
The sequence of nodes whose copies will be inserted.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, inserts the nodes into the collection." }, "errors" : [ "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0011 if $target node is not contained in the collection." ] }, { "arity" : 3, "name" : "insert-nodes-before", "qname" : "dml:insert-nodes-before", "signature" : "($name as xs:string, $target as node(), $content as node()*)", "description" : " Inserts copies of the given nodes into a collection at the position directly\n preceding the given target node.\n", "summary" : "

Inserts copies of the given nodes into a collection at the position directly\n preceding the given target node.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "target", "type" : "node()", "occurence" : null, "description" : "
The node in the collection before which $content will be inserted.
" }, { "name" : "content", "type" : "node()", "occurence" : null, "description" : "
The sequences of nodes whose copies will be inserted.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, inserts the nodes into the collection." }, "errors" : [ "zerr:ZDDY0003 if the collection is not available.", "zerr:ZDDY0011 if $target node is not contained in the collection." ] }, { "arity" : 2, "name" : "insert-nodes-first", "qname" : "dml:insert-nodes-first", "signature" : "($name as xs:string, $content as node()*)", "description" : " Inserts copies of the given nodes at the beginning of the collection.\n", "summary" : "

Inserts copies of the given nodes at the beginning of the collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "content", "type" : "node()", "occurence" : null, "description" : "
The sequence of nodes whose copies will be inserted.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, inserts $content into the collection." }, "errors" : [ "zerr:ZDDY0003 if the collection is not available." ] }, { "arity" : 2, "name" : "insert-nodes-last", "qname" : "dml:insert-nodes-last", "signature" : "($name as xs:string, $content as node()*)", "description" : " Inserts copies of the given nodes at the end of the collection.\n", "summary" : "

Inserts copies of the given nodes at the end of the collection.

", "annotation_str" : "", "annotations" : [ ], "updating" : true, "parameters" : [ { "name" : "name", "type" : "xs:string", "occurence" : null, "description" : "
The name of the collection to insert into.
" }, { "name" : "content", "type" : "node()", "occurence" : null, "description" : "
The sequence of nodes whose copies will be inserted.
" } ], "returns" : { "type" : null, "description" : "An empty XDM instance and a pending update list that, once applied, inserts the nodes into the collection." }, "errors" : [ "zerr:ZDDY0003 if the collection is not available." ] } ], "variables" : [ ] }