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 java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
UnionPattern
public UnionPattern()
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
Copyright � 2000 Apache XML Project. All Rights Reserved.