collection() ➔ node()*
Returns the nodes making up the default collection.
There are no arguments
collection($arg as xs:string?) ➔ node()*
Returns the nodes making up the collection whose URI is supplied.
The supplied collection URI
Links to W3C specifications
Notes on the Saxon implementation
Saxon implements the zero-argument function by passing a null URI to the registered
CollectionURIResolver. The default
implementation supplied with the product handles this by returning an empty sequence, but
CollectionURIResolver is free to handle this case any way it
If a user-defined
CollectionURIResolver has been registered, the action of
this function is entirely user-defined. A resolver may be registered using the
setCollectionResolver() method on the
Configuration object, or (in XSLT) using
setAttribute() on the
CollectionURIResolver may also be nominated using the
option on the command line.
For details of the behavior of the standard
CollectionURIResolver, see Collections.
collection() function is multi-threaded in Saxon-EE (since 9.5). Each
document in the collection is parsed in a separate thread, and the documents are processed
in the order in which parsing completes. This makes the order of the documents