1 /*
2 * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
25
26 package javax.xml.xpath;
27
28 import javax.xml.namespace.NamespaceContext;
29 import javax.xml.namespace.QName;
30 import org.xml.sax.InputSource;
31
32 /**
33 * {@code XPath} provides access to the XPath evaluation environment and expressions.
34 *
35 * <a name="XPath-evaluation"></a>
36 * <table border="1" cellpadding="2">
37 * <thead>
38 * <tr>
39 * <th colspan="2">Evaluation of XPath Expressions.</th>
40 * </tr>
41 * </thead>
42 * <tr>
43 * <td>context</td>
44 * <td>
45 * If a request is made to evaluate the expression in the absence
46 * of a context item, an empty document node will be used for the context.
47 * For the purposes of evaluating XPath expressions, a DocumentFragment
48 * is treated like a Document node.
49 * </td>
50 * </tr>
51 * <tr>
52 * <td>variables</td>
53 * <td>
54 * If the expression contains a variable reference, its value will be found through the {@link XPathVariableResolver}
55 * set with {@link #setXPathVariableResolver(XPathVariableResolver resolver)}.
56 * An {@link XPathExpressionException} is raised if the variable resolver is undefined or
57 * the resolver returns {@code null} for the variable.
58 * The value of a variable must be immutable through the course of any single evaluation.
59 * </td>
60 * </tr>
61 * <tr>
62 * <td>functions</td>
63 * <td>
64 * If the expression contains a function reference, the function will be found through the {@link XPathFunctionResolver}
65 * set with {@link #setXPathFunctionResolver(XPathFunctionResolver resolver)}.
66 * An {@link XPathExpressionException} is raised if the function resolver is undefined or
|
1 /*
2 * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
25
26 package javax.xml.xpath;
27
28 import javax.xml.namespace.NamespaceContext;
29 import javax.xml.namespace.QName;
30 import org.xml.sax.InputSource;
31
32 /**
33 * {@code XPath} provides access to the XPath evaluation environment and expressions.
34 *
35 * <a name="XPath-evaluation"></a>
36 * <table border="1" cellpadding="2">
37 * <thead>
38 * <tr>
39 * <th colspan="2">Evaluation of XPath Expressions.</th>
40 * </tr>
41 * </thead>
42 * <tr>
43 * <td>context</td>
44 * <td>
45 * The type of the context is implementation-dependent. If the value is
46 * null, the operation must have no dependency on the context, otherwise
47 * an XPathExpressionException will be thrown.
48 *
49 * For the purposes of evaluating XPath expressions, a DocumentFragment
50 * is treated like a Document node.
51 * </td>
52 * </tr>
53 * <tr>
54 * <td>variables</td>
55 * <td>
56 * If the expression contains a variable reference, its value will be found through the {@link XPathVariableResolver}
57 * set with {@link #setXPathVariableResolver(XPathVariableResolver resolver)}.
58 * An {@link XPathExpressionException} is raised if the variable resolver is undefined or
59 * the resolver returns {@code null} for the variable.
60 * The value of a variable must be immutable through the course of any single evaluation.
61 * </td>
62 * </tr>
63 * <tr>
64 * <td>functions</td>
65 * <td>
66 * If the expression contains a function reference, the function will be found through the {@link XPathFunctionResolver}
67 * set with {@link #setXPathFunctionResolver(XPathFunctionResolver resolver)}.
68 * An {@link XPathExpressionException} is raised if the function resolver is undefined or
|