Package com.icl.saxon.pattern
Class IDPattern
- java.lang.Object
-
- com.icl.saxon.pattern.Pattern
-
- com.icl.saxon.pattern.IDPattern
-
public final class IDPattern extends Pattern
An IDPattern is a pattern of the form id(literal)
-
-
Field Summary
-
Fields inherited from class com.icl.saxon.pattern.Pattern
originalText, staticContext
-
-
Constructor Summary
Constructors Constructor Description IDPattern(java.lang.String idvalue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description short
getNodeType()
Determine the type of nodes to which this pattern applies.boolean
matches(NodeInfo e, Context c)
Determine whether this Pattern matches the given Node-
Methods inherited from class com.icl.saxon.pattern.Pattern
getDefaultPriority, getFingerprint, getLineNumber, getStaticContext, getSystemId, make, setOriginalText, setStaticContext, simplify, toString
-
-
-
-
Method Detail
-
matches
public boolean matches(NodeInfo e, Context c) throws XPathException
Determine whether this Pattern matches the given Node- Specified by:
matches
in classPattern
- Parameters:
e
- The NodeInfo representing the Element or other node to be tested against the Patternc
- The context in which the match is to take place. Only relevant if the pattern uses variables.- Returns:
- true if the node matches the Pattern, false otherwise
- Throws:
XPathException
-
getNodeType
public short getNodeType()
Determine the type of nodes to which this pattern applies.- Overrides:
getNodeType
in classPattern
- Returns:
- NodeInfo.ELEMENT
-
-