| java.lang.Object net.sf.saxon.functions.StandardCollectionURIResolver
StandardCollectionURIResolver | public class StandardCollectionURIResolver implements CollectionURIResolver,MappingFunction(Code) | | This class implements the default collection URI Resolver.
This supports two implementations of collections. If the URI supplied uses the "file:/" scheme, and the
file that is referenced is a directory, then the collection is the set of files in that directory. Query parameters
may be included in the URI:
- recurse=yes|no controls whether the directory is scanned recursively;
- strip=yes|no determines whether whitespace text nodes are stripped from the selected documents;
- val=strict|lax|preserve|strip determines whether schema validation is applied;
- select=pattern determines which files in the directory are selected.
- onerror=fail|warn|ignore determines the action taken if processing of a file fails
- parser=qualified.class.name selects the parser (XMLReader) to be used to read the files
Otherwise, the resolver attempts to dereference the URI to obtain a catalog file. This is an XML file
containing a list of documents, in the format:
|
map | public Object map(Item item, XPathContext context) throws XPathException(Code) | | Map from doc elements in the catalogue document to nodes
returned in the result
Parameters: item - A doc element in the catalogue document Parameters: context - The dynamic evaluation context the document or element referenced by the @href attribute of the docelement in the catalogue throws: net.sf.saxon.trans.XPathException - if the document cannot be retrieved or parsed, unlesserror recovery has been chosen. |
resolve | public SequenceIterator resolve(String href, String base, XPathContext context) throws XPathException(Code) | | Resolve a URI.
Parameters: href - The relative URI of the collection. This corresponds to theargument supplied to the collection() function. If the collection() functionwas called with no arguments (to get the "default collection") this argumentwill be null. Parameters: base - The base URI that should be used. This is the base URI of thestatic context in which the call to collection() was made, typically the URIof the stylesheet or query module an Iterator over the documents in the collection. The items returnedby this iterator must implement the net.sf.saxon.om.NodeInfo interface.If the URI is not recognized, the method may either return an empty iterator,in which case no error is reported, or it may throw an exception, in which casethe query or transformation fails. Returning null has the same effect as returningan empty iterator. |
|
|