org.apache.xpath.patterns
Class UnionPattern
java.lang.Object
|
+--org.apache.xpath.Expression
|
+--org.apache.xpath.patterns.UnionPattern
- public class UnionPattern
- extends Expression
This class represents a union pattern, which can have multiple individual
StepPattern patterns.
- See Also:
- Serialized Form
- Usage:
- **For advanced use only**
Methods inherited from class org.apache.xpath.Expression |
asIterator,
asIteratorRaw,
asNode,
assertion,
bool,
error,
execute,
execute,
execute,
executeCharsToContentHandler,
exprAddChild,
exprGetChild,
exprGetNumChildren,
exprGetParent,
exprSetParent,
getColumnNumber,
getExpressionOwner,
getLineNumber,
getPublicId,
getSystemId,
isNodesetExpr,
isStableNumber,
num,
warn,
xstr |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
UnionPattern
public UnionPattern()
fixupVariables
public void fixupVariables(java.util.Vector vars,
int globalsSize)
- No arguments to process, so this does nothing.
- Overrides:
- fixupVariables in class Expression
canTraverseOutsideSubtree
public boolean canTraverseOutsideSubtree()
- Tell if this expression or it's subexpressions can traverse outside
the current subtree.
- Returns:
- true if traversal outside the context node's subtree can occur.
- Overrides:
- canTraverseOutsideSubtree in class Expression
setPatterns
public void setPatterns(StepPattern[] patterns)
- Set the contained step patterns to be tested.
- Parameters:
patterns
- the contained step patterns to be tested.
getPatterns
public StepPattern[] getPatterns()
- Get the contained step patterns to be tested.
- Returns:
- an array of the contained step patterns to be tested.
execute
public XObject execute(XPathContext xctxt)
throws TransformerException
- Test a node to see if it matches any of the patterns in the union.
- Parameters:
xctxt
- XPath runtime context.- Returns:
NodeTest.SCORE_NODETEST
,
NodeTest.SCORE_NONE
,
NodeTest.SCORE_NSWILD
,
NodeTest.SCORE_QNAME
, or
NodeTest.SCORE_OTHER
.- Throws:
- TransformerException -
- Overrides:
- execute in class Expression
callVisitors
public void callVisitors(ExpressionOwner owner,
XPathVisitor visitor)
- See Also:
XPathVisitable.callVisitors(ExpressionOwner, XPathVisitor)
deepEquals
public boolean deepEquals(Expression expr)
- Overrides:
- deepEquals in class Expression
- See Also:
Expression.deepEquals(Expression)
Copyright © 2005 Apache XML Project. All Rights Reserved.