|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.icl.saxon.pattern.Pattern
A Pattern represents the result of parsing an XSLT pattern string.
Patterns are created by calling the static method Pattern.make(string).
The pattern is used to test a particular node by calling match().
Field Summary | |
protected StaticContext |
staticContext
|
Constructor Summary | |
Pattern()
|
Method Summary | |
double |
getDefaultPriority()
Determine the default priority to use if this pattern appears as a match pattern for a template with no explicit priority attribute. |
Name |
getName()
Determine the names of nodes to which this pattern applies. |
NameTest |
getNameTest()
Determine the names of nodes to which this pattern applies. |
StaticContext |
getStaticContext()
Determine the static context used when the pattern was parsed |
int |
getType()
Determine the types of nodes to which this pattern applies. |
abstract boolean |
isRelative()
Determine whether the pattern uses positional filters |
static Pattern |
make(java.lang.String pattern)
Parse a pattern using a default compile-time context. |
static Pattern |
make(java.lang.String pattern,
StaticContext env)
Static method to make a Pattern by parsing a String. |
abstract boolean |
matches(NodeInfo node,
Context context)
Determine whether this Pattern matches the given Node |
void |
setStaticContext(StaticContext sc)
Set the static context used when the pattern was parsed |
Pattern |
simplify()
Simplify the pattern by applying any context-independent optimisations. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected StaticContext staticContext
Constructor Detail |
public Pattern()
Method Detail |
public static Pattern make(java.lang.String pattern, StaticContext env) throws org.xml.sax.SAXException
pattern
- The pattern text as a Stringenv
- An object defining the compile-time context for the expressionpublic static Pattern make(java.lang.String pattern) throws org.xml.sax.SAXException
expression
- The expression (as a character string)env
- An object giving information about the compile-time context of the expressionpublic Pattern simplify() throws org.xml.sax.SAXException
public final void setStaticContext(StaticContext sc)
public StaticContext getStaticContext()
public abstract boolean matches(NodeInfo node, Context context) throws org.xml.sax.SAXException
node
- The NodeInfo representing the Element or other node to be tested against the Patterncontext
- The context in which the match is to take place. Only relevant if the pattern
uses variables.public int getType()
public Name getName()
public NameTest getNameTest()
public abstract boolean isRelative() throws org.xml.sax.SAXException
public double getDefaultPriority()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |