~ubuntu-branches/ubuntu/gutsy/libjaxp1.3-java/gutsy

« back to all changes in this revision

Viewing changes to javax/xml/transform/URIResolver.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2006-08-03 10:30:58 UTC
  • Revision ID: james.westby@ubuntu.com-20060803103058-7jwwiqv9g8w9094d
Tags: upstream-1.3.03
ImportĀ upstreamĀ versionĀ 1.3.03

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2003-2004 The Apache Software Foundation.
 
3
 *
 
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
 
7
 *
 
8
 *     http://www.apache.org/licenses/LICENSE-2.0
 
9
 *
 
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.
 
15
 */
 
16
 
 
17
// $Id: URIResolver.java 226183 2005-04-08 10:39:14Z neeraj $
 
18
 
 
19
package javax.xml.transform;
 
20
 
 
21
/**
 
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.
 
24
 */
 
25
public interface URIResolver {
 
26
 
 
27
    /**
 
28
     * Called by the processor when it encounters
 
29
     * an xsl:include, xsl:import, or document() function.
 
30
     *
 
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.
 
34
     *
 
35
     * @return A Source object, or null if the href cannot be resolved,
 
36
     * and the processor should try to resolve the URI itself.
 
37
     *
 
38
     * @throws TransformerException if an error occurs when trying to
 
39
     * resolve the URI.
 
40
     */
 
41
    public Source resolve(String href, String base)
 
42
        throws TransformerException;
 
43
}