KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > saxon > OutputURIResolver


1 package net.sf.saxon;
2 import javax.xml.transform.Result JavaDoc;
3 import javax.xml.transform.TransformerException JavaDoc;
4
5
6 /**
7 * This interface defines an OutputURIResolver. This is a counterpart to the JAXP
8 * URIResolver, but is used to map the URI of a secondary result document to a Result object
9 * which acts as the destination for the new document.
10 * @author Michael H. Kay
11 */

12
13 public interface OutputURIResolver {
14
15     /**
16     * Resolve an output URI.
17     * @param href The relative URI of the output document. This corresponds to the
18     * href attribute of the xsl:result-document instruction.
19     * @param base The base URI that should be used. This is the base URI of the
20     * element that contained the href attribute. It may be null if no systemID was supplied
21     * for the stylesheet.
22     * @return a Result object representing the destination for the XML document. The
23     * method can also return null, in which case the standard output URI resolver
24     * will be used to create a Result object.
25     */

26
27     public Result JavaDoc resolve(String JavaDoc href, String JavaDoc base) throws TransformerException JavaDoc;
28
29     /**
30     * Signal completion of the result document. This method is called by the system
31     * when the result document has been successfully written. It allows the resolver
32     * to perform tidy-up actions such as closing output streams, or firing off
33     * processes that take this result tree as input. Note that the OutputURIResolver
34     * is stateless, so the the original Result object is supplied to identify the document
35     * that has been completed.
36      * @param result The result object returned by the previous call of resolve()
37     */

38
39     public void close(Result JavaDoc result) throws TransformerException JavaDoc;
40
41 }
42
43
44
45
46
47 //
48
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
49
// you may not use this file except in compliance with the License. You may obtain a copy of the
50
// License at http://www.mozilla.org/MPL/
51
//
52
// Software distributed under the License is distributed on an "AS IS" basis,
53
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
54
// See the License for the specific language governing rights and limitations under the License.
55
//
56
// The Original Code is: all this file.
57
//
58
// The Initial Developer of the Original Code is Michael H. Kay
59
//
60
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
61
//
62
// Contributor(s): none.
63
//
64
Popular Tags