Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
com.icl.saxon.functions.Extensions
public class Extensions
extends Object
Method Summary | |
static Value | |
static NodeSetValue |
|
static String | |
static NodeSetValue |
|
static NodeEnumeration |
|
static NodeEnumeration |
|
static NodeEnumeration |
|
static NodeEnumeration |
|
static Value |
|
static Value | |
static boolean |
|
static Value |
|
static boolean |
|
static Context |
|
static String |
|
static Value |
|
static boolean |
|
static NodeSetValue |
|
static NodeEnumeration |
|
static NodeEnumeration |
|
static boolean |
|
static NodeEnumeration |
|
static double |
|
static NodeSetValue |
|
static NodeEnumeration |
|
static double |
|
static double |
|
static double |
|
static double |
|
static NodeSetValue | |
static NodeSetValue | |
static String | |
static void | |
static NodeEnumeration | |
static void | |
static void |
|
static String |
|
static double |
|
static String | |
static NodeEnumeration | |
static NodeEnumeration |
public static Value IF(Value test, Value thenValue, Value elseValue) throws XPathException
Return the value of the second argument if the first is true, or the third argument otherwise. Note that all three arguments are evaluated.
- Parameters:
test
- A value treated as a booleanthenValue
- Any valueelseValue
- Any value
- Returns:
- (test ? thenValue : elseValue)
public static NodeSetValue after(Context context, NodeSetValue ns1, NodeSetValue ns2) throws XPathException
Find all the nodes in ns1 that are after the first node in ns2. Return empty set if ns2 is empty,
public static String baseUri(Context c) throws XPathException
Return the base URI of the context node
public static NodeSetValue before(Context context, NodeSetValue ns1, NodeSetValue ns2) throws XPathException
Find all the nodes in ns1 that are before the last node in ns2. Return empty set if ns2 is empty,
public static NodeEnumeration closure(Context c, NodeEnumeration enm, Expression expr) throws XPathException
Evaluate the transitive closure of a node-set expression
public static NodeEnumeration difference(Context c, NodeEnumeration p1, NodeEnumeration p2) throws XPathException
Return the difference of two node-sets
- Parameters:
p1
- The first node-setp2
- The second node-set
- Returns:
- A node-set containing all nodes that are in p1 and not in p2
public static NodeEnumeration distinct(Context context, NodeEnumeration in) throws XPathException
Given a node-set, return a subset that includes only nodes with distinct string-values
public static NodeEnumeration distinct(Context context, NodeEnumeration in, Expression exp) throws XPathException
Given a node-set, return a subset that includes only nodes with distinct string-values for the supplied expression
public static Value eval(Context c, Expression expr) throws XPathException
Evaluate the stored expression supplied in the first argument
public static Value evaluate(Context c, String expr) throws XPathException
Evaluate the expression supplied in the first argument as a string
public static boolean exists(Context context, NodeEnumeration nsv, Expression expression) throws XPathException
Test whether node-set contains a node that satisfies a given condition
public static Value expression(Context c, String expr) throws XPathException
Return an object representing a stored expression, from the string supplied in the first argument.
public static boolean forAll(Context context, NodeEnumeration nsv, Expression expression) throws XPathException
Test whether all nodes in a node-set satisfy a given condition
public static String getPseudoAttribute(Context c, String name)
Get a pseudo-attribute of a processing instruction. Return an empty string if the context node is not a processing instruction, or if the pseudo-attribute is not present. Character references and built-in entity references are expanded
public static Value getUserData(Context c, String name) throws XPathException
Retrieve a value associated with the context node
public static boolean hasSameNodes(Context context, NodeEnumeration p1, NodeEnumeration p2) throws XPathException
Determine whether two node-sets contain the same nodes
- Parameters:
p1
- The first node-setp2
- The second node-set
- Returns:
- true if p1 and p2 contain the same set of nodes
public static NodeSetValue highest(Context c, NodeEnumeration nsv) throws XPathException
Get the node with maximum numeric value of the string-value of each of a set of nodes
public static NodeEnumeration highest(Context context, NodeEnumeration nsv, Expression expression) throws XPathException
Get the maximum numeric value of a stored expression over a set of nodes
public static NodeEnumeration intersection(Context c, NodeEnumeration p1, NodeEnumeration p2) throws XPathException
Return the intersection of two node-sets
- Parameters:
p1
- The first node-setp2
- The second node-set
- Returns:
- A node-set containing all nodes that are in both p1 and p2
public static boolean isNull(Object x) throws XPathException
Test whether an encapsulated Java object is null
public static NodeEnumeration leading(Context context, NodeEnumeration in, Expression exp) throws XPathException
Get the nodes that satisfy the given expression, up to and excluding the first one (in document order) that doesn't
public static double lineNumber(Context c) throws XPathException
Return the line number of the context node. This must be returned as a double to meet the calling requirements for extension functions.
public static NodeSetValue lowest(Context c, NodeEnumeration nsv) throws XPathException
Get the node with minimum numeric value of the string-value of each of a set of nodes
public static NodeEnumeration lowest(Context context, NodeEnumeration nsv, Expression expression) throws XPathException
Get the node with minimum numeric value of a stored expression over a set of nodes
public static double max(Context context, NodeEnumeration nsv, Expression expression) throws XPathException
Get the maximum numeric value of a stored expression over a set of nodes
public static double max(NodeEnumeration nsv) throws XPathException
Get the maximum numeric value of the string-value of each of a set of nodes
public static double min(Context context, NodeEnumeration nsv, Expression expression) throws XPathException
Get the minimum numeric value of a stored expression over a set of nodes
public static double min(NodeEnumeration nsv) throws XPathException
Get the minimum numeric value of the string-value of each of a set of nodes
public static NodeSetValue nodeSet(Context c, Value frag) throws XPathException
Convert a result tree fragment to a node-set. This simply marks a result tree fragment as being available for general use.
public static NodeSetValue nodeset(Context c, Value frag) throws XPathException
Alternative spelling (allows "nodeset()")
public static String path(Context c) throws XPathException
Return an XPath expression that identifies the current node
public static NodeEnumeration range(Context context, double start, double finish) throws XPathException
Return a node-set whose nodes have string-values "1", "2", ... "n"
public static void setUserData(Context c, String name, Value value) throws XPathException
Save a value associated with the context node
public static String showNodeset(Context c, NodeSetValue in) throws XPathException
A diagnostic function to print the contents of a node-set
public static double sum(Context context, NodeEnumeration nsv, Expression expression) throws XPathException
Total a stored expression over a set of nodes
public static String systemId(Context c) throws XPathException
Return the system identifier of the context node
public static NodeEnumeration tokenize(Context context, String s) throws XPathException
Return a node-set by tokenizing a supplied string. Tokens are delimited by any sequence of whitespace characters.
public static NodeEnumeration tokenize(Context context, String s, String delim) throws XPathException
Return a node-set by tokenizing a supplied string. The argument delim is a String, any character in this string is considered to be a delimiter character, and any sequence of delimiter characters acts as a separator between tokens.