|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.caucho.xpath.Pattern
A node selection pattern. Patterns represent compiled XPath node selectors. They can be used to find nodes, select nodes, and test if a node matches a pattern.
There are two types of patterns: select patterns and match patterns.
Select patterns match a node relative to another node.
find and select use select patterns.
Match patterns match a node in isolation. isMatch uses
match patterns.
| Field Summary | |
protected static WriteStream |
dbg
|
| Method Summary | |
Node |
find(Node context)
Returns the first node matching the pattern. |
Node |
find(Node context,
Env env)
Returns the first node matching the pattern. |
java.lang.String |
getNodeName()
Returns the name of the matching node or '*' if many nodes match. |
protected java.lang.String |
getPrefix()
|
double |
getPriority()
Returns the pattern's default priority as defined by the XSLT draft. |
boolean |
isMatch(Node node)
Test if the node matches the pattern. |
boolean |
isMatch(Node node,
Env env)
Test if the node matches the pattern. |
java.util.Iterator |
select(Node context)
Selects all nodes matching the pattern. |
java.util.Iterator |
select(Node node,
Env env)
Selects all nodes matching the pattern. |
java.lang.String |
toPatternString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static WriteStream dbg
| Method Detail |
public Node find(Node context)
context - node represented by '.' and start of match.
public Node find(Node context,
Env env)
context - node represented by '.' and start of match.env - variable environment.public java.util.Iterator select(Node context)
context - node represented by '.' and start of match.
public java.util.Iterator select(Node node,
Env env)
context - node represented by '.' and start of match.env - variable environment.public boolean isMatch(Node node)
node - node to test
public boolean isMatch(Node node,
Env env)
node - node to testenv - variable environment.public double getPriority()
public java.lang.String getNodeName()
The Xsl package uses this to speed template matching.
protected java.lang.String getPrefix()
public java.lang.String toPatternString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||