KickJava   Java API By Example, From Geeks To Geeks.

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


1 package net.sf.saxon;
2 import net.sf.saxon.expr.XPathContext;
3 import net.sf.saxon.om.SequenceIterator;
4 import net.sf.saxon.trans.XPathException;
5
6 import java.io.Serializable JavaDoc;
7
8
9 /**
10 * This interface defines a CollectionURIResolver. This is a counterpart to the JAXP
11 * URIResolver, but is used to map the URI of collection into a sequence of documents
12 * @author Michael H. Kay
13 */

14
15 public interface CollectionURIResolver extends Serializable JavaDoc {
16
17     /**
18     * Resolve a URI.
19     * @param href The relative URI of the collection. This corresponds to the
20     * argument supplied to the collection() function. If the collection() function
21     * was called with no arguments (to get the "default collection") this argument
22     * will be null.
23     * @param base The base URI that should be used. This is the base URI of the
24     * static context in which the call to collection() was made, typically the URI
25     * of the stylesheet or query module
26      * @param context The dynamic execution context
27     * @return an Iterator over the documents in the collection. The items returned
28     * by this iterator must be instances of {@link net.sf.saxon.om.NodeInfo}.
29     * <p>
30     * If the URI is not recognized, the method may either return an empty iterator,
31      * in which case no error is reported, or it may throw an exception, in which case
32      * the query or transformation fails. Returning null has the same effect as returning
33      * an empty iterator.
34     */

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