Writing a URI Resolver for Input Files

Saxon allows you to write your own URIResolver to handle the URIs of input documents, as defined in the JAXP 1.2 specification. Such a URIResolver is used to process the URIs supplied to the doc() and document() functions. It is also used to process the URIs supplied for the source document and the stylesheet on the command line. In XSLT it is used to process the URIs used in the xsl:include and xsl:import and xsl:import-schema declarations, and in XQuery it supports the location URIs in import module and import schema.

The URIResolver is called to process the supplied URI, and it returns a JAXP Source object, which Saxon uses as the source of the input. Note that the Source must be one of the implementations of Source that Saxon recognizes: you cannot write your own implementations of the JAXP Source class.

Expand

Next