com.icl.saxon.pattern
public final class LocationPathPattern extends Pattern
| Field Summary | |
|---|---|
| Pattern | ancestorPattern |
| protected Expression | equivalentExpr |
| protected Expression[] | filters |
| protected boolean | firstElementPattern |
| protected boolean | lastElementPattern |
| NodeTest | nodeTest |
| protected int | numberOfFilters |
| Pattern | parentPattern |
| protected boolean | specialFilter |
| Method Summary | |
|---|---|
| void | addFilter(Expression filter)
Add a filter to the pattern (while under construction) |
| int | getFingerprint()
Determine the fingerprint of nodes to which this pattern applies.
|
| short | getNodeType()
Determine the types of nodes to which this pattern applies. |
| boolean | isRelative()
Determine if the pattern uses positional filters |
| boolean | matches(NodeInfo node, Context context) |
| boolean | matchesX(NodeInfo node, Context context)
Determine whether the pattern matches a given node. |
| Pattern | simplify()
Simplify the pattern: perform any context-independent optimisations |
Parameters: filter The predicate (a boolean expression or numeric expression) to be added
Returns: the fingerprint of nodes matched by this pattern.
Returns: the type of node matched by this pattern. e.g. Node.ELEMENT or Node.TEXT
Returns: true if there is a numeric filter in the pattern, or one that uses the position() or last() functions
Parameters: node the node to be tested
Returns: true if the pattern matches, else false