net.sf.saxon.pattern
public class UnionPattern extends Pattern
Field Summary | |
---|---|
protected Pattern | p1 |
protected Pattern | p2 |
Constructor Summary | |
---|---|
UnionPattern(Pattern p1, Pattern p2)
Constructor |
Method Summary | |
---|---|
Pattern | analyze(StaticContext env, ItemType contextItemType)
Type-check the pattern.
|
Pattern | getLHS()
Get the LHS of the union |
int | getNodeKind()
Determine the types of nodes to which this pattern applies. |
NodeTest | getNodeTest()
Get a NodeTest that all the nodes matching this pattern must satisfy |
Pattern | getRHS()
Get the RHS of the union |
boolean | matches(NodeInfo e, XPathContext context)
Determine if the supplied node matches the pattern |
void | setLineNumber(int lineNumber)
Override method to set the system ID, so it's set on both halves |
void | setOriginalText(String pattern)
Set the original text |
void | setSystemId(String systemId)
Override method to set the system ID, so it's set on both halves |
Pattern | simplify(StaticContext env)
Simplify the pattern: perform any context-independent optimisations |
Parameters: p1 the left-hand operand p2 the right-hand operand
Returns: the optimised Pattern
Returns: the type of node matched by this pattern. e.g. Node.ELEMENT or Node.TEXT
Parameters: e the node to be compared
Returns: true if the node matches either of the operand patterns