53
54
: @error zerr:ZDDY0003 if the collection identified by $name is not available.
56
declare updating function dml:insert-nodes-first(
58
$content as node()*) external;
56
: @deprecated please use the cdml:insert-first#2 function
59
declare updating function
60
dml:insert-nodes-first($name as xs:QName, $content as node()*) external;
64
: The insert-first function is an updating function that inserts copies of the
65
: given items (nodes or json items) at the beginning of the collection.
67
: @param $name The name of the collection to which the items should be added.
68
: @param $content The sequences of items whose copies should be added to the collection.
70
: @return The result of the function is an empty XDM instance and a pending update
71
: list which, once applied, inserts the items into the collection.
73
: @error zerr:ZDDY0003 if the collection identified by $name is not available.
76
declare updating function
77
dml:insert-first($name as xs:QName, $content as item()*) external;
61
81
: The insert-nodes-last function is an updating function that inserts copies of the
70
90
: @error zerr:ZDDY0003 if the collection identified by $name is not available.
73
declare updating function dml:insert-nodes-last(
75
$content as node()*) external;
92
: @deprecated please use the cdml:insert-last#2 function
95
declare updating function
96
dml:insert-nodes-last($name as xs:QName, $content as node()*) external;
100
: The insert-last function is an updating function that inserts copies of the
101
: given items (nodes or json items) at the end of the collection.
103
: @param $name The name of the collection to which the items should be added.
104
: @param $content The sequences of items whose copies should be added to the collection.
106
: @return The result of the function is an empty XDM instance and a pending update list
107
: which, once applied, inserts the items into the collection.
109
: @error zerr:ZDDY0003 if the collection identified by $name is not available.
112
declare updating function
113
dml:insert-last($name as xs:QName, $content as item()*) external;
78
117
: The insert-nodes-before function is an updating function that inserts
90
129
: @error zerr:ZDDY0003 if the collection identified by $name is not available.
91
130
: @error zerr:ZDDY0011 if the target node is not contained in the collection.
132
: @deprecated please use the cdml:insert-before#3 function
94
declare updating function dml:insert-nodes-before(
135
declare updating function
136
dml:insert-nodes-before(
95
137
$name as xs:QName,
96
138
$target as node(),
97
139
$content as node()*) external;
142
: The insert-before function is an updating function that inserts copies of
143
: the given items (nodes or json items) into a collection at the position
144
: directly preceding the given target item.
146
: @param $name The name of the collection to which the items should be added.
147
: @param $target The item in the collection before which the $content
148
: sequence should be inserted.
149
: @param $content The sequences of items whose copies should be added to the collection.
151
: @return The result of the function is an empty XDM instance and a pending update list
152
: which, once applied, inserts the items into the collection.
154
: @error zerr:ZDDY0003 if the collection identified by $name is not available.
155
: @error zerr:ZDDY0011 if the target item is not contained in the collection.
158
declare updating function
159
dml:insert-before($name as xs:QName, $target as item(), $content as item()*) external;
100
163
: The insert-nodes-after function is an updating function that inserts
101
164
: copies of the given nodes into a collection at the position directly following the
102
165
: given target node.
112
175
: @error zerr:ZDDY0003 if the collection identified by $name is not available.
113
176
: @error zerr:ZDDY0011 if the target node is not contained in the collection.
178
: @deprecated please use the cdml:insert-after#3 function
116
declare updating function dml:insert-nodes-after(
181
declare updating function
182
dml:insert-nodes-after(
117
183
$name as xs:QName,
119
185
$content as node()*) external;
122
: This function does the same as the insert-nodes function except
189
: The insert-after function is an updating function that inserts copies of
190
: the given items (nodes and/or json items) into a collection at the position
191
: directly following the given target item.
193
: @param $name The name of the collection to which the items should be added.
194
: @param $target The item in the collection after which the $content
195
: sequence should be inserted.
196
: @param $content The sequences of items whose copies should be added to the collection.
198
: @return The result of the function is an empty XDM instance and a pending update list
199
: which, once applied, inserts the items into the collection.
201
: @error zerr:ZDDY0003 if the collection identified by $name is not available.
202
: @error zerr:ZDDY0011 if the target node is not contained in the collection.
205
declare updating function
206
dml:insert-after($name as xs:QName, $pos as item(), $content as item()*) external;
210
: This function does the same as the insert-nodes-first function except
123
211
: it immediately applies the resulting pending updates and returns the
124
212
: nodes that have been inserted.
134
222
: @see dml:insert-nodes-first
224
: @deprecated please use the cdml:apply-insert-first#2 function
137
declare %an:sequential function dml:apply-insert-nodes-first(
227
declare %an:sequential function
228
dml:apply-insert-nodes-first(
138
229
$name as xs:QName,
139
230
$content as node()*) as node()* external;
234
: This function does the same as the insert-first function except it immediately
235
: applies the resulting pending updates and returns the items that have been inserted.
237
: @param $name The name of the collection to which the items should be added.
238
: @param $content The sequences of items whose copies should be added to the collection.
240
: @return The result of the function is the sequence of items that have been
241
: inserted into the collection.
243
: @error zerr:ZDDY0003 if the collection identified by $name is not available.
245
: @see dml:insert-first
248
declare %an:sequential function
249
dml:apply-insert-first($name as xs:QName, $content as item()*) as item()* external;
142
253
: This function does the same as the insert-nodes-last function except
143
254
: it immediately applies the resulting pending updates and returns the
154
265
: @see dml:insert-nodes-last
267
: @deprecated please use the cdml:apply-insert-last#2 function
157
270
declare %an:sequential function dml:apply-insert-nodes-last(
158
271
$name as xs:QName,
159
272
$content as node()*) as node()* external;
276
: This function does the same as the insert-last function except it immediately
277
: applies the resulting pending updates and returns the items that have been
280
: @param $name The name of the collection to which the items should be added.
281
: @param $content The sequences of items whose copies should be added to the collection.
283
: @return The result of the function is the sequence of items that have been
284
: inserted into the collection.
286
: @error zerr:ZDDY0003 if the collection identified by $name is not available.
288
: @see dml:insert-last
291
declare %an:sequential function dml:apply-insert-last(
293
$content as item()*) as item()* external;
162
297
: This function does the same as the insert-nodes-before function except
163
298
: it immediately applies the resulting pending updates and returns the
176
311
: @see dml:insert-nodes-before
313
: @deprecated please use the cdml:apply-insert-before#3 function
179
declare %an:sequential function dml:apply-insert-nodes-before(
316
declare %an:sequential function
317
dml:apply-insert-nodes-before(
180
318
$name as xs:QName,
181
319
$target as node(),
182
320
$content as node()*) as node()* external;
324
: This function does the same as the insert-before function except it immediately
325
: applies the resulting pending updates and returns the items that have been
328
: @param $name The name of the collection to which the items should be added.
329
: @param $target The item in the collection before which the $content
330
: sequence should be inserted.
331
: @param $content The sequences of items whose copies should be added to the collection.
333
: @return The result of the function is the sequence of items that have been
334
: inserted into the collection.
336
: @error zerr:ZDDY0003 if the collection identified by $name is not available.
338
: @see dml:insert-before
341
declare %an:sequential function
342
dml:apply-insert-before(
345
$content as item()*) as item()* external;
185
349
: This function does the same as the insert-nodes-after function except
186
350
: it immediately applies the resulting pending updates and returns the
199
363
: @see dml:insert-nodes-after
365
: @deprecated please use the cdml:apply-insert-after#3 function
202
declare %an:sequential function dml:apply-insert-nodes-after(
368
declare %an:sequential function
369
dml:apply-insert-nodes-after(
203
370
$name as xs:QName,
205
372
$content as node()*) as node()* external;
376
: This function does the same as the insert-after function except it immediately
377
: applies the resulting pending updates and returns the items that have been
380
: @param $name The name of the collection to which the items should be added.
381
: @param $target The item in the collection after which the $content
382
: sequence should be inserted.
383
: @param $content The sequences of items whose copies should be added to the collection.
385
: @return The result of the function is the sequence of items that have been
386
: inserted into the collection.
388
: @error zerr:ZDDY0003 if the collection identified by $name is not available.
390
: @see dml:insert-after
393
declare %an:sequential function
394
dml:apply-insert-after(
397
$content as item()*) as item()* external;
208
401
: The delete-nodes function is an updating function that deletes zero of more
209
402
: nodes from a collection.
213
406
: @return The result of this function is an empty XDM instance and a pending update
214
407
: list which, once applied, deletes the nodes from their collections.
216
: @error zerr:ZDDY0011 if any nodes in the $target sequence is not a member of a collection
217
: or not all nodes of the $target sequence belong to the same collection.
220
declare updating function dml:delete-nodes($target as node()*) external;
409
: @error zerr:ZDDY0011 if any nodes in the $target sequence is not a member of
410
: a collection or not all nodes of the $target sequence belong to the same
413
: @deprecated please use the cdml:delete#1 function
416
declare updating function
417
dml:delete-nodes($target as node()*) external;
421
: The delete function is an updating function that deletes zero of more items
422
: (nodes and/or json items) from a collection.
424
: @param $target the items in the collection that should be deleted.
426
: @return The result of this function is an empty XDM instance and a pending update
427
: list which, once applied, deletes the items from their collections.
429
: @error zerr:ZDDY0011 if any item in the $target sequence is not a member of
430
: a collection or not all items of the $target sequence belong to the
434
declare updating function
435
dml:delete($target as item()*) external;
223
439
: The delete-node-first function is an updating function that deletes the
231
447
: @error zerr:ZDDY0011 if the collection doesn't contain any node.
234
declare updating function dml:delete-node-first($name as xs:QName) external;
449
: @deprecated please use the cdml:delete-first#1 function
452
declare updating function
453
dml:delete-node-first($name as xs:QName) external;
457
: The delete-first function is an updating function that deletes the first item
460
: @param $name The name of the collection from which the first item should be deleted.
462
: @return The result of this function is an empty XDM instance and a pending update
463
: list which, once applied, deletes the first item from the collection.
465
: @error zerr:ZDDY0011 if the collection doesn't contain any item.
468
declare updating function
469
dml:delete-first($name as xs:QName) external;
237
473
: The delete-nodes-first function is an updating function that deletes the
247
483
: @error zerr:ZDDY0011 if the collection doesn't contain the given number of nodes.
250
declare updating function dml:delete-nodes-first(
252
$number as xs:integer) external;
485
: @deprecated please use the cdml:delete-first#2 function
488
declare updating function
489
dml:delete-nodes-first($name as xs:QName, $number as xs:integer) external;
493
: The delete-first function is an updating function that deletes the first N
494
: items from a collection.
496
: @param $name The name of the collection from which the first N items should be deleted.
497
: @param $number The number N of items that should be removed from the beginning of
500
: @return The result of this function is an empty XDM instance and a pending update
501
: list which, once applied, deletes the items from the collection.
503
: @error zerr:ZDDY0011 if the collection doesn't contain the given number of items.
506
declare updating function
507
dml:delete-first($name as xs:QName, $number as xs:integer) external;
255
511
: The delete-node-last function is an updating function that deletes the
256
512
: last node from a collection.
258
: @param $name The name of the collection from which the first node should be deleted.
514
: @param $name The name of the collection from which the last node should be deleted.
260
516
: @return The result of this function is an empty XDM instance and a pending update
261
517
: list which, once applied, deletes the last node from the collection.
264
520
: for the expanded QName $name.
265
521
: @error zerr:ZDDY0011 if the collection doesn't contain any node.
268
declare updating function dml:delete-node-last($name as xs:QName) external;
523
: @deprecated please use the cdml:delete-last#1 function
526
declare updating function
527
dml:delete-node-last($name as xs:QName) external;
531
: The delete-last function is an updating function that deletes the last item
534
: @param $name The name of the collection from which the last item should be deleted.
536
: @return The result of this function is an empty XDM instance and a pending update
537
: list which, once applied, deletes the last item from the collection.
539
: @error zerr:ZDDY0003 If available collections does not provide a mapping
540
: for the expanded QName $name.
541
: @error zerr:ZDDY0011 if the collection doesn't contain any item.
544
declare updating function
545
dml:delete-last($name as xs:QName) external;
282
559
: for the expanded QName $name.
283
560
: @error zerr:ZDDY0011 if the collection doesn't contain the given number of nodes.
286
declare updating function dml:delete-nodes-last(
288
$number as xs:integer) external;
562
: @deprecated please use the cdml:delete-last#2 function
565
declare updating function
566
dml:delete-nodes-last($name as xs:QName, $number as xs:integer) external;
570
: The delete-last function is an updating function that deletes the last N
571
: items from an ordered collection.
573
: @param $name The name of the collection from which the lsat N items should be deleted.
574
: @param $number The number N of items to delete.
576
: @return The result of this function is an empty XDM instance and a pending update
577
: list which, once applied, deletes the last N items.
579
: @error zerr:ZDDY0003 If available collections does not provide a mapping
580
: for the expanded QName $name.
581
: @error zerr:ZDDY0011 if the collection doesn't contain the given number of items.
584
declare updating function
585
dml:delete-last($name as xs:QName, $number as xs:integer) external;
291
589
: The truncate function is an updating function that deletes the
301
599
declare updating function dml:truncate($name as xs:QName) external;
304
: The index-of function return the index of the given node in the collection.
306
: @param $node The node to retrieve the index from.
308
: @return Returns the position as xs:integer of the given node in the collection.
310
: @error zerr:ZDDY0011 if node is not contained in any collection.
313
declare function dml:index-of($node as node()) as xs:integer external;
316
: The collection function returns the sequence of nodes of the collection
317
: identified by the given name.
319
: @param $name The name of the collection.
321
: @return The sequence contained in the given collection.
323
: @error zerr:ZDDY0003 If available collections does not provide a mapping
324
: for the expanded QName $name.
327
declare function dml:collection($name as xs:QName) as node()* external;
330
: This function returns the name of the collection the given node belongs
333
: @param $node The node for which to get the name of the collection
603
: The collection function returns the sequence of nodes and/or json items
604
: that belong to the collection identified by the given name.
606
: @param $name The name of the collection.
608
: @return The sequence contained in the given collection.
610
: @error zerr:ZDDY0003 If available collections does not provide a mapping
611
: for the expanded QName $name.
614
declare function dml:collection($name as xs:QName) as item()* external;
618
: The collection function returns the sequence of nodes and/or json items
619
: that belong to the collection identified by the given name.
621
: @param $name The name of the collection.
622
: @param $skip The number of collection items to skip.
624
: @return The sequence contained in the given collection.
626
: @error zerr:ZDDY0003 If available collections does not provide a mapping
627
: for the expanded QName $name.
631
dml:collection($name as xs:QName, $skip as xs:integer) as item()* external;
635
: The collection function returns the sequence of nodes and/or json items
636
: that belong to the collection identified by the given name.
637
: The parameters $start and $skip can be used to skip over some items at
638
: the beginning of the collection. If both are given, both are applied:
639
: first $start to skip to the referenced item and then $skip to skip an
640
: additional number of items.
642
: @param $name The name of the collection.
643
: @param $start A reference to the first item to return. All items before
645
: @param $skip The number of collection items to skip.
647
: @return The sequence contained in the given collection.
649
: @error zerr:ZAPI0028 If the given URI is not a valid node
650
: position computed by the <tt>np:node-position</tt> function.
651
: @error zerr:ZDDY0003 If available collections does not provide a mapping
652
: for the expanded QName $name.
653
: @error zerr:ZSTR0066 If the passed reference $start does not reference
654
: a node from the collection identified by $name.
658
dml:collection($name as xs:QName,
660
$skip as xs:integer) as item()* external;
664
: The collection-name function returns the name of the collection the given
665
: item (node or json item) belongs to.
667
: @param $item The item for which to get the name of the collection
334
668
: @return The result of this function is a QName which identifies the collection
335
: to which the given node belongs to.
337
: @error zerr:ZDDY0011 if the given node does not belong to a collection.
340
declare function dml:collection-name($node as node()) as xs:QName external;
669
: to which the given item belongs to.
671
: @error zerr:ZDDY0011 if the given item does not belong to a collection.
674
declare function dml:collection-name($item as item()) as xs:QName external;
678
: The index-of function returns the position of the given item (node or
679
: json item) within its containing the collection.
681
: @param $item The item to retrieve the index from.
683
: @return Returns the position as xs:integer of the given item in the collection.
685
: @error zerr:ZDDY0011 if the item is not contained in any collection.
688
declare function dml:index-of($item as item()) as xs:integer external;