<?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet href="../make-menu.xsl" type="text/xsl"?><html> <head> <this-is section="extensibility" page="output-uri-resolver" subpage=""/> <!-- Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: Writing a URI Resolver for Output Files</title> <meta name="coverage" content="Worldwide"/> <meta name="copyright" content="Copyright Saxonica Ltd"/> <meta name="title" content="Saxonica: XSLT and XQuery Processing: Writing a URI Resolver for Output Files"/> <meta name="robots" content="noindex,nofollow"/> <link rel="stylesheet" href="../saxondocs.css" type="text/css"/> </head> <body class="main"> <h1>Writing a URI Resolver for Output Files</h1> <p>Saxon also allows you to write an <code>OutputURIResolver</code>, which performs an analogous role for URIs specified in the <code>href</code> attribute of <code>xsl:result-document</code>. This is therefore applicable to XSLT only. The <code>OutputURIResolver</code> is called when writing of the output document starts, at which point it must return a JAXP <code>Result</code> object to act as the output destination. It is called again when writing of an output document is complete.</p> <p>You can nominate an <code>OutputURIResolver</code> by calling <code>((Controller)transformer).setOutputURIResolver(new UserOutputResolver())</code>, or by calling <code>factory.setAttribute("http://saxon.sf.net/feature/outputURIResolver", new UserOutputResolver())</code>.</p> <table width="100%"> <tr> <td> <p align="right"/> </td> </tr> </table> </body> </html>