com.icl.saxon.om
public class Navigator extends Object
Method Summary | |
---|---|
static int | getNumberAny(NodeInfo node, Pattern count, Pattern from, Context context)
Get node number (level="any").
|
static Vector | getNumberMulti(NodeInfo node, Pattern count, Pattern from, Context context)
Get node number (level="multiple").
|
static int | getNumberSimple(NodeInfo node, Context context)
Get simple node number. |
static int | getNumberSimple(NodeInfo node)
Get simple node number. |
static int | getNumberSingle(NodeInfo node, Pattern count, Pattern from, Context context)
Get node number (level="single"). |
static String | getPath(NodeInfo node)
Get an absolute XPath expression that identifies a given node within its document |
static boolean | isAncestor(NodeInfo node, NodeInfo other)
Determine whether this node is an ancestor of another node |
static boolean | isWhite(String content)
Determine if a string is all-whitespace |
Parameters: count Pattern that identifies which nodes should be counted. Default (null) is the element name if the current node is an element, or "node()" otherwise. from Pattern that specifies where counting starts from. Default (null) is the root node. Only nodes after the first (most recent) node that matches the 'from' pattern are counted.
Returns: one plus the number of nodes that precede the current node, that match the count pattern, and that follow the first node that matches the from pattern if specified.
Parameters: count Pattern that identifies which nodes (ancestors and their previous siblings) should be counted. Default (null) is the element name if the current node is an element, or "node()" otherwise. from Pattern that specifies where counting starts from. Default (null) is the root node. Only nodes below the first (most recent) node that matches the 'from' pattern are counted.
Returns: a vector containing for each ancestor-or-self that matches the count pattern and that is below the nearest node that matches the from pattern, an Integer which is one greater than the number of previous siblings that match the count pattern.
Parameters: context Used for remembering previous result, for performance
Parameters: count Pattern that identifies which nodes should be counted. Default (null) is the element name if the current node is an element, or "node()" otherwise. from Pattern that specifies where counting starts from. Default (null) is the root node. (This parameter does not seem useful but is included for the sake of XSLT conformance.)
Returns: the node number established as follows: go to the nearest ancestor-or-self that matches the 'count' pattern and that is a descendant of the nearest ancestor that matches the 'from' pattern. Return one plus the nunber of preceding siblings of that ancestor that match the 'count' pattern. If there is no such ancestor, return 0.
Parameters: node the putative ancestor node other the other node (the putative descendant of this node)
Returns: true of this node is an ancestor of the other node