com.sun.org.apache.xpath.internal.objects.XObject
,
normally has a location within a document or DOM, can send error and warning
events, and normally do not hold state and are meant to be immutable once
construction has completed. An exception to the immutibility rule is iterators
and walkers, which must be cloned in order to be used -- the original must
still be immutable.
Modifier and Type | Field and Description |
---|---|
private ExpressionNode | m_parent
The location where this expression was built from. |
pack-priv static final long |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public DTMIterator | Returns: A valid DTMIterator.The execution context. xctxt, int The node that "." expresses. contextNode)Given an select expression and a context, evaluate the XPath and return the resulting iterator. |
public DTMIterator | Returns: A valid DTMIterator.The execution context. xctxt, int The node that "." expresses. contextNode)Given an select expression and a context, evaluate the XPath and return the resulting iterator, but do not clone. |
public int | Returns: the first node out of the nodeset, or DTM.NULL.The XPath runtime context. xctxt)Return the first node out of the nodeset, if this expression is a nodeset expression. |
public void | |
public boolean | |
public boolean | Returns: true if traversal outside the context node's subtree can occur.Tell if this expression or it's subexpressions can traverse outside the current subtree. |
public abstract boolean | Returns: true if this objects class and the expr object's class are the same, and the data contained within both objects are considered equal.Another expression object. expr)Compare this object with another object and see if they are equal, include the sub heararchy. |
public void | error(XPathContext
The XPath runtime context. xctxt, 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 expression in the form of aXObject .The XPath runtime context. xctxt, int The currentNode. currentNode)Execute an expression in the XPath runtime context, and return the result of the expression. |
public XObject | Returns: The result of the expression in the form of aXObject .The XPath runtime context. xctxt, int The currentNode. currentNode, DTM The DTM of the current node. dtm, int The expanded type ID of the current node. expType)Execute an expression in the XPath runtime context, and return the result of the expression. |
public abstract XObject | Returns: The result of the expression in the form of aXObject .The XPath runtime context. xctxt)Execute an expression in the XPath runtime context, and return the result of the expression. |
public XObject | Returns: The result of the expression in the form of aXObject .The XPath runtime context. xctxt, boolean true if a "safe" object doesn't need to be returned. destructiveOK)Execute an expression in the XPath runtime context, and return the result of the expression, but tell that a "safe" object doesn't have to be returned. |
public void | Returns: The result of the expression in the form of aXObject .The XPath runtime context.
NEEDSDOC @param handler xctxt, ContentHandler handler)Execute an expression in the XPath runtime context, and return the result of the expression. |
public void | exprAddChild(ExpressionNode n, int i)
Implements com. This method tells the node to add its argument to the node's list of children. |
public ExpressionNode | exprGetChild(int i)
Implements com. This method returns a child node. |
public int | exprGetNumChildren()
Implements com. Return the number of children the node has. |
public ExpressionNode | |
public void | exprSetParent(ExpressionNode n)
Implements com. This pair of methods are used to inform the node of its parent. |
public abstract 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).
NEEDSDOC @param globalsSize vars, int globalsSize)This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time. |
public int | Returns: The column number, or -1 if none is available.Implements javax. Return the character position where the current document event ends. |
public ExpressionNode | Returns: null or first ancestor that is not an Expression.Get the first non-Expression parent of this node. |
public int | Returns: The line number, or -1 if none is available.Implements javax. Return the line number where the current document event ends. |
public String | Returns: A string containing the public identifier, or null if none is available.Implements javax. Return the public identifier for the current document event. |
public String | Returns: A string containing the system identifier, or null if none is available.Implements javax. Return the system identifier for the current document event. |
public boolean | Returns: true if the expression can be represented as a nodeset.Tell if the expression is a nodeset expression. |
protected final boolean | Returns: true of the passed in class is the exact same class as this class.This is a utility method to tell if the passed in class is the same class as this. |
public boolean | Returns: true if the expression represents a stable number.Tell if this expression returns a stable number that will not change during iterations within the expression. |
public double | Returns: The expression evaluated as a double.The XPath runtime context. xctxt)Evaluate expression to a number. |
public void | warn(XPathContext
The XPath runtime context. xctxt, String An error msgkey that corresponds to one of the conststants 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. |
public XMLString | Returns: The string this wraps or the empty string if nullThe XPath runtime context. xctxt)Cast result object to a string. |
m_parent | back to summary |
---|---|
private ExpressionNode m_parent The location where this expression was built from. Need for diagnostic messages. May be null.
|
serialVersionUID | back to summary |
---|---|
pack-priv static final long serialVersionUID |
Expression | back to summary |
---|---|
public Expression() |
asIterator | back to summary |
---|---|
public DTMIterator asIterator(XPathContext xctxt, int contextNode) throws TransformerException Given an select expression and a context, evaluate the XPath and return the resulting iterator.
|
asIteratorRaw | back to summary |
---|---|
public DTMIterator asIteratorRaw(XPathContext xctxt, int contextNode) throws TransformerException Given an select expression and a context, evaluate the XPath and return the resulting iterator, but do not clone.
|
asNode | back to summary |
---|---|
public int asNode(XPathContext xctxt) throws TransformerException Return the first node out of the nodeset, if this expression is a nodeset expression.
|
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) throws TransformerException Evaluate expression to a boolean.
|
canTraverseOutsideSubtree | back to summary |
---|---|
public boolean canTraverseOutsideSubtree() Tell if this expression or it's subexpressions can traverse outside the current subtree.
|
deepEquals | back to summary |
---|---|
public abstract boolean deepEquals(Expression expr) Compare this object with another object and see if they are equal, include the sub heararchy.
|
error | back to summary |
---|---|
public void error(XPathContext xctxt, 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, int currentNode) throws TransformerException Execute an expression in the XPath runtime context, and return the result of the expression.
|
execute | back to summary |
---|---|
public XObject execute(XPathContext xctxt, int currentNode, DTM dtm, int expType) throws TransformerException Execute an expression in the XPath runtime context, and return the result of the expression.
|
execute | back to summary |
---|---|
public abstract XObject execute(XPathContext xctxt) throws TransformerException Execute an expression in the XPath runtime context, and return the result of the expression.
|
execute | back to summary |
---|---|
public XObject execute(XPathContext xctxt, boolean destructiveOK) throws TransformerException Execute an expression in the XPath runtime context, and return the result of the expression, but tell that a "safe" object doesn't have to be returned. The default implementation just calls execute(xctxt).
|
executeCharsToContentHandler | back to summary |
---|---|
public void executeCharsToContentHandler(XPathContext xctxt, ContentHandler handler) throws TransformerException, SAXException Execute an expression in the XPath runtime context, and return the result of the expression.
|
exprAddChild | back to summary |
---|---|
public void exprAddChild(ExpressionNode n, int i) Implements com. This method tells the node to add its argument to the node's list of children. |
exprGetChild | back to summary |
---|---|
public ExpressionNode exprGetChild(int i) Implements com. This method returns a child node. The children are numbered from zero, left to right. |
exprGetNumChildren | back to summary |
---|---|
public int exprGetNumChildren() Implements com. Return the number of children the node has. |
exprGetParent | back to summary |
---|---|
public ExpressionNode exprGetParent() Implements com. |
exprSetParent | back to summary |
---|---|
public void exprSetParent(ExpressionNode n) Implements com. This pair of methods are used to inform the node of its parent. |
fixupVariables | back to summary |
---|---|
public abstract void fixupVariables(List<QName> vars, int globalsSize) This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time.
|
getColumnNumber | back to summary |
---|---|
public int getColumnNumber() Implements javax. Return the character position where the current document event ends. Warning The return value from the method is intended only as an approximation for the sake of error reporting; it is not intended to provide sufficient information to edit the character content of the original XML document. The return value is an approximation of the column number in the document entity or external parsed entity where the markup that triggered the event appears.
|
getExpressionOwner | back to summary |
---|---|
public ExpressionNode getExpressionOwner() Get the first non-Expression parent of this node.
|
getLineNumber | back to summary |
---|---|
public int getLineNumber() Implements javax. Return the line number where the current document event ends. Warning The return value from the method is intended only as an approximation for the sake of error reporting; it is not intended to provide sufficient information to edit the character content of the original XML document. The return value is an approximation of the line number in the document entity or external parsed entity where the markup that triggered the event appears.
|
getPublicId | back to summary |
---|---|
public String getPublicId() Implements javax. Return the public identifier for the current document event. The return value is the public identifier of the document entity or of the external parsed entity in which the markup that triggered the event appears.
|
getSystemId | back to summary |
---|---|
public String getSystemId() Implements javax. Return the system identifier for the current document event. The return value is the system identifier of the document entity or of the external parsed entity in which the markup that triggered the event appears. If the system identifier is a URL, the parser must resolve it fully before passing it to the application.
|
isNodesetExpr | back to summary |
---|---|
public boolean isNodesetExpr() Tell if the expression is a nodeset expression. In other words, tell
if you can execute
|
isSameClass | back to summary |
---|---|
protected final boolean isSameClass(Expression expr) This is a utility method to tell if the passed in class is the same class as this. It is to be used by the deepEquals method. I'm bottlenecking it here because I'm not totally confident that comparing the class objects is the best way to do this.
|
isStableNumber | back to summary |
---|---|
public boolean isStableNumber() Tell if this expression returns a stable number that will not change during iterations within the expression. This is used to determine if a proximity position predicate can indicate that no more searching has to occur.
|
num | back to summary |
---|---|
public double num(XPathContext xctxt) throws TransformerException Evaluate expression to a number.
|
warn | back to summary |
---|---|
public void warn(XPathContext xctxt, String msg, Object[] args) throws TransformerException Warn the user of an problem.
|
xstr | back to summary |
---|---|
public XMLString xstr(XPathContext xctxt) throws TransformerException Cast result object to a string.
|