public class IntersectPattern extends VennPattern
p1, p2
Constructor and Description |
---|
IntersectPattern(Pattern p1,
Pattern p2)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Pattern |
convertToTypedPattern(String val)
Convert the pattern to a typed pattern, in which an element name is treated as
schema-element(N)
|
boolean |
equals(Object other)
Determine whether this pattern is the same as another pattern
|
ItemType |
getItemType()
Get an ItemType that all the items matching this pattern must satisfy
|
int |
getNodeKindMask()
Get a mask indicating which kinds of nodes this NodeTest can match.
|
int |
hashCode()
Hashcode supporting equals()
|
boolean |
matches(Item item,
XPathContext context)
Determine if the supplied node matches the pattern
|
boolean |
matchesBeneathAnchor(NodeInfo node,
NodeInfo anchor,
XPathContext context)
Determine whether this pattern matches a given Node within the subtree rooted at a given
anchor node.
|
allocateSlots, analyze, bindCurrent, gatherComponentPatterns, getDependencies, getLHS, getNodeKind, getRHS, isMotionless, iterateSubExpressions, promote, replaceSubExpression, setLineNumber, setOriginalText, setSystemId, simplify
getColumnNumber, getConfiguration, getContainerGranularity, getDefaultPriority, getFingerprint, getHostLanguage, getLineNumber, getLocationProvider, getPackageData, getPublicId, getSystemId, make, replaceCurrent, selectNodes, setPackageData, setPriority, toString
public ItemType getItemType()
getItemType
in class VennPattern
public int getNodeKindMask()
getNodeKindMask
in class Pattern
public boolean matches(Item item, XPathContext context) throws XPathException
matches
in class Pattern
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().XPathException
- if an error occurs while matching the pattern (the caller will usually
treat this the same as a false result)public boolean matchesBeneathAnchor(NodeInfo node, NodeInfo anchor, XPathContext context) throws XPathException
matchesBeneathAnchor
in class Pattern
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().XPathException
- if an error occurs while matching the pattern (the caller will usually
treat this the same as a false result)public Pattern convertToTypedPattern(String val) throws XPathException
convertToTypedPattern
in class Pattern
val
- either "strict" or "lax" depending on the value of xsl:mode/@typedXPathException
- if the pattern cannot be convertedpublic boolean equals(Object other)
equals
in class VennPattern
other
- the other objectpublic int hashCode()
hashCode
in class VennPattern
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.