src/java.xml/share/classes/javax/xml/xpath/XPathExpression.java

Print this page


   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
  23  * questions.
  24  */
  25 
  26 package javax.xml.xpath;
  27 
  28 import javax.xml.namespace.QName;
  29 import org.xml.sax.InputSource;
  30 
  31 /**
  32  * {@code XPathExpression} provides access to compiled XPath expressions.
  33  *
  34  * <a name="XPathExpression-evaluation"></a>
  35  * <table border="1" cellpadding="2">
  36  *   <thead>
  37  *     <tr>
  38  *       <th colspan="2">Evaluation of XPath Expressions.</th>
  39  *     </tr>
  40  *   </thead>
  41  *   <tbody>
  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  *        An {@link XPathExpressionException} is raised if the variable resolver is undefined or
  56  *        the resolver returns {@code null} for the variable.
  57  *        The value of a variable must be immutable through the course of any single evaluation.
  58  *      </td>
  59  *    </tr>
  60  *    <tr>
  61  *      <td>functions</td>
  62  *      <td>
  63  *        If the expression contains a function reference, the function will be found through the {@link XPathFunctionResolver}.
  64  *        An {@link XPathExpressionException} is raised if the function resolver is undefined or
  65  *        the function resolver returns {@code null} for the function.
  66  *      </td>


   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
  23  * questions.
  24  */
  25 
  26 package javax.xml.xpath;
  27 
  28 import javax.xml.namespace.QName;
  29 import org.xml.sax.InputSource;
  30 
  31 /**
  32  * {@code XPathExpression} provides access to compiled XPath expressions.
  33  *
  34  * <a name="XPathExpression-evaluation"></a>
  35  * <table border="1" cellpadding="2">
  36  *    <thead>
  37  *      <tr>
  38  *        <th colspan="2">Evaluation of XPath Expressions.</th>
  39  *      </tr>
  40  *    </thead>

  41  *    <tr>
  42  *      <td>context</td>
  43  *      <td>
  44  *        The type of the context is implementation-dependent. If the value is 
  45  *        null, the operation must have no dependency on the context, otherwise 
  46  *        an XPathExpressionException will be thrown.
  47  *         
  48  *        For the purposes of evaluating XPath expressions, a DocumentFragment
  49  *        is treated like a Document node.
  50  *      </td>
  51  *    </tr>
  52  *    <tr>
  53  *      <td>variables</td>
  54  *      <td>
  55  *        If the expression contains a variable reference, its value will be found through the {@link XPathVariableResolver}.
  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  *        An {@link XPathExpressionException} is raised if the function resolver is undefined or
  66  *        the function resolver returns {@code null} for the function.
  67  *      </td>