org.apache.xpath.patterns
Class UnionPattern
java.lang.Object
|
+--org.apache.xpath.Expression
|
+--org.apache.xpath.patterns.UnionPattern
- public class UnionPattern
- extends Expression
**For advanced use only**
This class represents a union pattern, which can have multiple individual
StepPattern patterns.
- See Also:
- Serialized Form
Methods inherited from class org.apache.xpath.Expression |
asIterator,
asNode,
assertion,
bool,
error,
execute,
execute,
executeCharsToContentHandler,
isNodesetExpr,
isStableNumber,
num,
setSourceLocator,
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 javax.xml.transform.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:
- javax.xml.transform.TransformerException -
- Overrides:
- execute in class Expression
Copyright © 2001 Apache XML Project. All Rights Reserved.