- All Modules
- All Functions
-
www.w3.org
- 2005
- XDM
- store
- introspection
- reflection
- external
-
xqdoc
-
project_xqdoc
-
xqdoc
(E)
- xqdoc2xhtml
-
project_xqdoc
- data processing
- expath.org
- www.functx.com
- error
http://www.zorba-xquery.com/modules/store/dynamic/collections/w3c/ddl
import module namespace ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/w3c/ddl";
This modules defines a set of functions for managing persistent, ordered, and updatable collections.
Such collections are identified by a URI as defined in the XQuery specification. However, please note that we do not advice users to use collections identified by URIs. Instead, we refer to the data lifecycle documentation. It gives an overview over serveral ways to work with collections, documents, and other data-structures.
Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis
xquery version "3.0" encoding "utf-8";
- the XQuery module can be found here.
Imported modules:
For more details please also see:
- Data Lifecycle
- http://www.zorba-xquery.com/modules/store/dynamic/collections/w3c/dml
- http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl
- http://www.zorba-xquery.com/modules/store/dynamic/collections/dml
- http://www.zorba-xquery.com/errors
ddl | http://www.zorba-xquery.com/modules/store/dynamic/collections/w3c/ddl |
qddl | http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl |
ver | http://www.zorba-xquery.com/options/versioning |
zerr | http://www.zorba-xquery.com/errors |
available-collections
(
) as xs:string* The function returns a sequence of URIs of the collections that are available. |
|
![]() |
create
(
$coll-name as xs:string)
) The create function is an updating function which creates the collection with the given URI and the empty-sequence as contents. |
![]() |
create
(
$coll-name as xs:string,
$content as node()*)
) The create function is an updating function which creates the collection with the given URI. |
![]() |
delete
(
$coll-name as xs:string)
) The delete function is an updating function that removes the collection with the given URI. |
from-qname
(
$name as xs:QName
) as xs:string Function used for internal purposes only. |
|
is-available-collection
(
$coll-name as xs:string
) as xs:boolean The function returns true if a collection with the given URI is available (i. |
|
to-qname
(
$name as xs:string
) as xs:QName Function used for internal purposes only. |
declare function ddl:available-collections ( ) as xs:string*
The function returns a sequence of URIs of the collections that are available. The sequence will be empty if there are no collections.
- A sequence of URIs, one for each available collection, or an emtpy sequence.
declare updating function ddl:create (
$coll-name as xs:string)
)
The create function is an updating function which creates the collection with the given URI and the empty-sequence as contents.
- $name The URI of the collection to create.
- The result of the function is an empty XDM instance and a pending update list which, once applied, creates a collection with the given name.
- zerr:ZDDY0002 if a collection with the given URI already exists.
declare updating function ddl:create ( $coll-name as xs:string, $content as node()*) )
The create function is an updating function which creates the collection with the given URI. Moreover, it adds copies of the sequence $content to the new collection.
- $name The URI of the collection to create.
- $content The sequences of nodes that should be added to the new collection.
- The result of the function is an empty XDM instance and a pending update list which, once applied, creates a collection with the given name and inserts the given nodes into it.
- zerr:ZDDY0002 if a collection with the given URI already exists.
declare updating function ddl:delete (
$coll-name as xs:string)
)
The delete function is an updating function that removes the collection with the given URI.
- $name The URI of the collection to delete.
- The result of the function is an empty XDM instance and a pending update list which, once applied, deletes the collection with the given name.
- zerr:ZDDY0003 if the URI $name is not equal to any of the available collections.
- zerr:ZDDY0015 if any of the in-scope variables references a node that belongs to the collection with the given URI.
declare function ddl:from-qname (
$name as xs:QName
) as xs:string
Function used for internal purposes only. It returns the namespace component of the given QName.
- $name QName whose namespace component should be returned
- the namespace componentn of the given QName
declare function ddl:is-available-collection (
$coll-name as xs:string
) as xs:boolean
The function returns true if a collection with the given URI is available (i.e. has been created).
- $name The URI of the collection that is being checked.
- true if the collection is available and false otherwise.
declare function ddl:to-qname (
$name as xs:string
) as xs:QName
Function used for internal purposes only. It converts a URI given as string into a reserved QName. This QName is used in the module to be able to store collections identified by URIs using dynamic collections which are identified by QNames.
- $name URI to convert to a reserved QName.
- The reserved QName for the given URI.