2
* Copyright 2003-2004 The Apache Software Foundation.
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
17
// $Id: URIResolver.java 226183 2005-04-08 10:39:14Z neeraj $
19
package javax.xml.transform;
22
* <p>An object that implements this interface that can be called by the processor
23
* to turn a URI used in document(), xsl:import, or xsl:include into a Source object.
25
public interface URIResolver {
28
* Called by the processor when it encounters
29
* an xsl:include, xsl:import, or document() function.
31
* @param href An href attribute, which may be relative or absolute.
32
* @param base The base URI against which the first argument will be made
33
* absolute if the absolute URI is required.
35
* @return A Source object, or null if the href cannot be resolved,
36
* and the processor should try to resolve the URI itself.
38
* @throws TransformerException if an error occurs when trying to
41
public Source resolve(String href, String base)
42
throws TransformerException;