| Modifier and Type | Field and Description |
|---|---|
| private static final boolean | DEBUG_MATCHES
Set to true to get diagnostic messages about the result of match pattern testing. |
| private transient FunctionTable | m_funcTable
The function table for xpath build-in functions |
| private Expression | m_mainExp
The top of the expression tree. |
| pack-priv String | m_patternString
The pattern string, mainly kept around for diagnostic purposes. |
| public static final int | MATCH
Represents a match type expression. |
| public static final double | MATCH_SCORE_NODETEST
The match score if the pattern consists of just a NodeTest. |
| public static final double | MATCH_SCORE_NONE
The match score if no match is made. |
| public static final double | MATCH_SCORE_NSWILD
The match score if the pattern pattern has the form NCName:*. |
| public static final double | MATCH_SCORE_OTHER
The match score if the pattern consists of something other than just a NodeTest or just a qname. |
| public static final double | MATCH_SCORE_QNAME
The match score if the pattern has the form of a QName optionally preceded by an @ character. |
| public static final int | SELECT
Represents a select type expression. |
| pack-priv static final long |
| Access | Constructor and Description |
|---|---|
| public | XPath(String
The XPath expression. exprString, SourceLocator The location of the expression, may be null. locator, PrefixResolver A prefix resolver to use to resolve prefixes to
namespace URIs. prefixResolver, int type, ErrorListener The error listener, or null if default should be used. errorListener)Construct an XPath object. |
| public | XPath(String
The XPath expression. exprString, SourceLocator The location of the expression, may be null. locator, PrefixResolver A prefix resolver to use to resolve prefixes to
namespace URIs. prefixResolver, int type, ErrorListener The error listener, or null if default should be used. errorListener, FunctionTable the function table funcTable, XMLSecurityManager the XML security manager xmlSecMgr)Construct an XPath object. |
| public | XPath(String
The XPath expression. exprString, SourceLocator The location of the expression, may be null. locator, PrefixResolver A prefix resolver to use to resolve prefixes to
namespace URIs. prefixResolver, int type)Construct an XPath object. |
| public | XPath(String
The XPath expression. exprString, SourceLocator The location of the expression, may be null. locator, PrefixResolver A prefix resolver to use to resolve prefixes to
namespace URIs. prefixResolver, int type, ErrorListener The error listener, or null if default should be used. errorListener, FunctionTable the function table funcTable)Constructs an XPath object. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | bool(XPathContext
The execution context. xctxt, int The node that "." expresses. contextNode, PrefixResolver The context in which namespaces in the
XPath are supposed to be expanded. namespaceContext)Given an expression and a context, evaluate the XPath and return the result. |
| public void | callVisitors(ExpressionOwner
The owner of the visitor, where that path may be
rewritten if needed. owner, XPathVisitor The visitor whose appropriate method will be called. visitor)This will traverse the heararchy, calling the visitor for each member. |
| public void | error(XPathContext
The XPath runtime context. xctxt, int Not used. sourceNode, String An error msgkey that corresponds to one of the constants found
in msg, Object[] com., which is
a key for a format string.An array of arguments represented in the format string, which
may be null. args)Tell the user of an error, and probably throw an exception. |
| public XObject | Returns: The result of the XPath or null if callbacks are used.The execution context. xctxt, Node The node that "." expresses. contextNode, PrefixResolver The context in which namespaces in the
XPath are supposed to be expanded. namespaceContext)Given an expression and a context, evaluate the XPath and return the result. |
| public XObject | execute(XPathContext
The execution context. xctxt, int The node that "." expresses. contextNode, PrefixResolver The context in which namespaces in the
XPath are supposed to be expanded. namespaceContext)Given an expression and a context, evaluate the XPath and return the result. |
| public void | fixupVariables(List<QName>
List of QNames that correspond to variables. This list
should be searched backwards for the first qualified name that
corresponds to the variable reference qname. The position of the
QName in the vector from the start of the vector will be its position
in the stack frame (but variables above the globalsTop value will need
to be offset to the current stack frame). vars, int globalsSize)This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time. |
| public Expression | Returns: the raw Expression object, which should not normally be null.Implements com. Get the raw Expression object that this class wraps. |
| public SourceLocator | Returns: the SourceLocator on the expression object, which may be null.Get the SourceLocator on the expression object. |
| public double | Returns: score, one ofMATCH_SCORE_NODETEST,
MATCH_SCORE_NONE, MATCH_SCORE_OTHER,
or MATCH_SCORE_QNAME.XPath runtime context. xctxt, int The current source tree context node. context)Get the match score of the given node. |
| public String | Returns: the XPath string associated with this object.Return the XPath string associated with this object. |
| private void | |
| public void | setExpression(Expression
the raw Expression object, which should not normally be null. exp)Implements com. Set the raw expression object for this object. |
| public void | warn(XPathContext
The XPath runtime context. xctxt, int Not used. sourceNode, String An error msgkey that corresponds to one of the constants found
in msg, Object[] com., which is
a key for a format string.An array of arguments represented in the format string, which
may be null. args)Warn the user of an problem. |
| DEBUG_MATCHES | back to summary |
|---|---|
| private static final boolean DEBUG_MATCHES Set to true to get diagnostic messages about the result of match pattern testing. | |
| m_funcTable | back to summary |
|---|---|
| private transient FunctionTable m_funcTable The function table for xpath build-in functions | |
| m_mainExp | back to summary |
|---|---|
| private Expression m_mainExp The top of the expression tree. | |
| m_patternString | back to summary |
|---|---|
| pack-priv String m_patternString The pattern string, mainly kept around for diagnostic purposes. | |
| MATCH | back to summary |
|---|---|
| public static final int MATCH Represents a match type expression. | |
| MATCH_SCORE_NODETEST | back to summary |
|---|---|
| public static final double MATCH_SCORE_NODETEST The match score if the pattern consists of just a NodeTest. | |
| MATCH_SCORE_NONE | back to summary |
|---|---|
| public static final double MATCH_SCORE_NONE The match score if no match is made. | |
| MATCH_SCORE_NSWILD | back to summary |
|---|---|
| public static final double MATCH_SCORE_NSWILD The match score if the pattern pattern has the form NCName:*. | |
| MATCH_SCORE_OTHER | back to summary |
|---|---|
| public static final double MATCH_SCORE_OTHER The match score if the pattern consists of something other than just a NodeTest or just a qname. | |
| MATCH_SCORE_QNAME | back to summary |
|---|---|
| public static final double MATCH_SCORE_QNAME The match score if the pattern has the form of a QName optionally preceded by an @ character. | |
| SELECT | back to summary |
|---|---|
| public static final int SELECT Represents a select type expression. | |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| XPath | back to summary |
|---|---|
| public XPath(String exprString, SourceLocator locator, PrefixResolver prefixResolver, int type, ErrorListener errorListener) throws TransformerException Construct an XPath object. (Needs review -sc) This method initializes an XPathParser/ Compiler and compiles the expression.
| |
| XPath | back to summary |
|---|---|
| public XPath(String exprString, SourceLocator locator, PrefixResolver prefixResolver, int type, ErrorListener errorListener, FunctionTable funcTable, XMLSecurityManager xmlSecMgr) throws TransformerException Construct an XPath object. (Needs review -sc) This method initializes an XPathParser/ Compiler and compiles the expression.
| |
| XPath | back to summary |
|---|---|
| public XPath(String exprString, SourceLocator locator, PrefixResolver prefixResolver, int type) throws TransformerException Construct an XPath object. (Needs review -sc) This method initializes an XPathParser/ Compiler and compiles the expression.
| |
| XPath | back to summary |
|---|---|
| public XPath(String exprString, SourceLocator locator, PrefixResolver prefixResolver, int type, ErrorListener errorListener, FunctionTable funcTable) throws TransformerException Constructs an XPath object.
| |
| XPath | back to summary |
|---|---|
| public XPath(Expression expr) Construct an XPath object.
| |
| assertion | back to summary |
|---|---|
| public void assertion(boolean b, String msg) Tell the user of an assertion error, and probably throw an exception.
| |
| bool | back to summary |
|---|---|
| public boolean bool(XPathContext xctxt, int contextNode, PrefixResolver namespaceContext) throws TransformerException Given an expression and a context, evaluate the XPath and return the result.
| |
| callVisitors | back to summary |
|---|---|
| public void callVisitors(ExpressionOwner owner, XPathVisitor visitor) This will traverse the heararchy, calling the visitor for each member. If the called visitor method returns false, the subtree should not be called.
| |
| error | back to summary |
|---|---|
| public void error(XPathContext xctxt, int sourceNode, String msg, Object[] args) throws TransformerException Tell the user of an error, and probably throw an exception.
| |
| execute | back to summary |
|---|---|
| public XObject execute(XPathContext xctxt, Node contextNode, PrefixResolver namespaceContext) throws TransformerException Given an expression and a context, evaluate the XPath and return the result.
| |
| execute | back to summary |
|---|---|
| public XObject execute(XPathContext xctxt, int contextNode, PrefixResolver namespaceContext) throws TransformerException Given an expression and a context, evaluate the XPath and return the result.
| |
| fixupVariables | back to summary |
|---|---|
| public void fixupVariables(List<QName> vars, int globalsSize) This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.
| |
| getExpression | back to summary |
|---|---|
| public Expression getExpression() Implements com. Get the raw Expression object that this class wraps.
| |
| getLocator | back to summary |
|---|---|
| public SourceLocator getLocator() Get the SourceLocator on the expression object.
| |
| getMatchScore | back to summary |
|---|---|
| public double getMatchScore(XPathContext xctxt, int context) throws TransformerException Get the match score of the given node.
| |
| getPatternString | back to summary |
|---|---|
| public String getPatternString() Return the XPath string associated with this object.
| |
| initFunctionTable | back to summary |
|---|---|
| private void initFunctionTable() initial the function table | |
| setExpression | back to summary |
|---|---|
| public void setExpression(Expression exp) Implements com. Set the raw expression object for this object.
| |
| warn | back to summary |
|---|---|
| public void warn(XPathContext xctxt, int sourceNode, String msg, Object[] args) throws TransformerException Warn the user of an problem.
| |