SAXONICA

Saxon Documentation
Full Contents
About Saxon
Changes in this Release
Conditions of Use
Using XSLT 2.0
Using XQuery
Handling Source Documents
XML Schema Processing
The XPath API
Saxon on .NET
Extensibility
| Introduction
| Writing extension functions in Java
| Converting Arguments to Java Extension Functions
| Converting the Result of a Java Extension Function
| Writing extension instructions
| Writing input filters
| Writing output filters
| Implementing a collating sequence
| Localizing numbers and dates
| Adding an output encoding
| Writing a URI Resolver for Input Files
» | Writing a URI Resolver for Output Files
Saxon Extensions
Sample Saxon Applications
The Saxon SQL Extension
XSLT Elements
XPath 2.0 Expression Syntax
Function Library
Standards Conformance

# Writing a URI Resolver for Output Files

Saxon also allows you to write an `OutputURIResolver`, which performs an analogous role for URIs specified in the `href` attribute of `xsl:result-document`. This is therefore applicable to XSLT only. The `OutputURIResolver` is called when writing of the output document starts, at which point it must return a JAXP `Result` object to act as the output destination. It is called again when writing of an output document is complete.

You can nominate an `OutputURIResolver` by calling `((Controller)transformer).setOutputURIResolver(new UserOutputResolver())`, or by calling `factory.setAttribute("http://saxon.sf.net/feature/outputURIResolver", new UserOutputResolver())`.