Writing a URI Resolver for Collections
Saxon also allows you to write a CollectionURIResolver
, which handles URIs
describing collections, particularly the argument to the collection() function. The
CollectionURIResolver
is called either with the specfied URI or a null URI
in the zero-argument form, when resolving the result of this function and is is expected
to return a sequence of nodes.
A resolver may be registered using the setCollectionResolver()
method on the
Configuration object,
or (in XSLT) using setAttribute()
on the
TransformerFactory
. The CollectionURIResolver
may also be
nominated using the -cr
option on the command line.