collection() ➔ item()*
Returns a sequence of items making up the default collection.
There are no arguments
collection($arg as xs:string?) ➔ item()*
Returns a sequence of items 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
implementation supplied with the product handles this by returning an empty sequence, but
CollectionFinder is free to handle this case any way it
If a user-defined
CollectionFinder has been registered, the action of
this function is entirely user-defined. A collection finder may be registered using the
setCollectionFinder() method on the Configuration object, or (in XSLT) using
setAttribute() on the
CollectionFinder may also be nominated using the
option on the command line.
For details of the behavior of the standard collection finder, and more information on supplying your own, 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