Collection URIs
The default collection can be registered with the Java Processor or C# Processor (or with its underlying Configuration) by setting the configuration feature DEFAULT_COLLECTION. The value takes the form of a collection URI. When the collection() function is called with no arguments, this is exactly the same as supplying this default collection URI. If no default collection URI has been registered, an empty collection is returned.
The standard collection finder supports four different kinds of collection: registered collections, catalog-based collections, directory-based collections, and (on Java only) zip-based collections:
A registered collection is one that has been explicitly registered with the Configuration, by calling Configuration.registerCollection() in Java, or Processor.RegisterCollection() in C#. (See Registered collections.)
If the collection URI corresponds to a directory name, then a directory-based collection is used: the collection contains selected files from the named directory. (See Directories as collections.)
If the collection URI identifies a ZIP or JAR file then a zip-based collection is used. (See ZIP collections.)
Otherwise, the collection URI must be the URI of an XML file which acts as a catalog, that is, it contains a list of the resources in the collection. (See Collection catalogs.)
Saxon by default recognizes four kids of resource: XML documents, JSON documents, unparsed text documents, and binary files. The standard collection resolver attempts to identify which kind of resource to use based on the content type (media type), which in turn may be inferred from HTTP headers, from sniffing the initial bytes of the content, or from file extensions.
In the case of directory-based and ZIP-based collections, query parameters may be added to the collection URI to further control how it is to be processed.