Register a named collection. A collection is identified by a URI (the collection URI),
and its content is represented by an IEnumerable
that enumerates the contents
of the collection. The values delivered by this enumeration are Uri values, which
can be mapped to nodes using the registered XmlResolver
.
collection()
function. The default collection is registered
by supplying null as the value of this argument (this is the collection returned
when the XPath collection()
function is called with no arguments).Collections should be stable: that is, two calls to retrieve the same collection URI should return the same sequence of document URIs. This requirement is imposed by the W3C specifications, but in the case of a user-defined collection it is not enforced by the Saxon product.
A collection may be "unregistered" by providing null as the value of the contents argument. A collection may be replaced by specifying the URI of an existing collection.
Collections registered with a processor are available to all queries and stylesheets running under the control that processor. Collections should not normally be registered while queries and transformations are in progress.