Class ExceptPattern
java.lang.Object
net.sf.saxon.pattern.Pattern
net.sf.saxon.pattern.VennPattern
net.sf.saxon.pattern.ExceptPattern
- All Implemented Interfaces:
Serializable, SourceLocator, Container, PatternFinder
A pattern formed as the difference of two other patterns
- See Also:
-
Field Summary
Fields inherited from class VennPattern
p1, p2 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine whether this pattern is the same as another patterninthashCode()Hashcode supporting equals()booleanmatches(Item item, XPathContext context) Determine if the supplied node matches the patternbooleanmatchesBeneathAnchor(NodeInfo node, NodeInfo anchor, XPathContext context) Determine whether this pattern matches a given Node within the subtree rooted at a given anchor node.Methods inherited from class VennPattern
allocateSlots, analyze, bindVariable, gatherComponentPatterns, getDependencies, getItemType, getLHS, getNodeKind, getRHS, getVariableBindingExpression, iterateSubExpressions, promote, replaceSubExpression, resolveCurrent, setExecutable, setLineNumber, setOriginalText, setSystemId, setVariableBindingExpression, simplifyMethods inherited from class Pattern
getColumnNumber, getContainerGranularity, getDefaultPriority, getExecutable, getFingerprint, getHostLanguage, getLineNumber, getLocationProvider, getPublicId, getSystemId, internalMatches, make, selectNodes, toString
-
Constructor Details
-
ExceptPattern
-
-
Method Details
-
matches
Determine if the supplied node matches the pattern- Specified by:
matchesin classPattern- Parameters:
item- the node to be comparedcontext- The dynamic context. Only relevant if the pattern uses variables, or contains calls on functions such as document() or key().- Returns:
- true if the node matches either of the operand patterns
- Throws:
XPathException- if a dynamic error occurs during pattern matching
-
matchesBeneathAnchor
public boolean matchesBeneathAnchor(NodeInfo node, NodeInfo anchor, XPathContext context) throws XPathException Determine whether this pattern matches a given Node within the subtree rooted at a given anchor node. This method is used when the pattern is used for streaming.- Overrides:
matchesBeneathAnchorin classPattern- Parameters:
node- The NodeInfo representing the Element or other node to be tested against the Patternanchor- The anchor node, which must match any AnchorPattern subpatterncontext- The dynamic context. Only relevant if the pattern uses variables, or contains calls on functions such as document() or key().- Returns:
- true if the node matches the Pattern, false otherwise
- Throws:
XPathException- if a dynamic error occurs during pattern matching
-
equals
Determine whether this pattern is the same as another pattern- Overrides:
equalsin classVennPattern- Parameters:
other- the other object
-
hashCode
-