|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.icl.saxon.functions.Extensions
This class implements functions that are supplied as standard with SAXON, but which are not defined in the XSLT or XPath specifications.
To invoke these functions, use a function call of the form prefix:name() where name is the method name, and prefix maps to a URI such as http://icl.com/saxon/com.icl.saxon.functions.Extensions (only the part of the URI after the last slash is important).
Constructor Summary | |
Extensions()
|
Method Summary | |
static NodeSetValue |
after(Context context,
NodeSetValue ns1,
NodeSetValue ns2)
Find all the nodes in ns1 that are after the first node in ns2. |
static java.lang.String |
baseUri(Context c)
Return the base URI of the context node |
static NodeSetValue |
before(Context context,
NodeSetValue ns1,
NodeSetValue ns2)
Find all the nodes in ns1 that are before the last node in ns2. |
static NodeEnumeration |
closure(Context c,
NodeEnumeration enm,
Expression expr)
Evaluate the transitive closure of a node-set expression |
static NodeEnumeration |
difference(Context c,
NodeEnumeration p1,
NodeEnumeration p2)
Return the difference of two node-sets |
static NodeEnumeration |
distinct(Context context,
NodeEnumeration in)
Given a node-set, return a subset that includes only nodes with distinct string-values |
static NodeEnumeration |
distinct(Context context,
NodeEnumeration in,
Expression exp)
Given a node-set, return a subset that includes only nodes with distinct string-values for the supplied expression |
static Value |
eval(Context c,
Expression expr)
Evaluate the stored expression supplied in the first argument |
static Value |
evaluate(Context c,
java.lang.String expr)
Evaluate the expression supplied in the first argument as a string |
static boolean |
exists(Context context,
NodeEnumeration nsv,
Expression expression)
Test whether node-set contains a node that satisfies a given condition |
static Value |
expression(Context c,
java.lang.String expr)
Return an object representing a stored expression, from the string supplied in the first argument. |
static boolean |
forAll(Context context,
NodeEnumeration nsv,
Expression expression)
Test whether all nodes in a node-set satisfy a given condition |
static Context |
getContext(Context c)
Return the Context object |
static java.lang.String |
getPseudoAttribute(Context c,
java.lang.String name)
Get a pseudo-attribute of a processing instruction. |
static Value |
getUserData(Context c,
java.lang.String name)
Retrieve a value associated with the context node |
static boolean |
hasSameNodes(Context context,
NodeEnumeration p1,
NodeEnumeration p2)
Determine whether two node-sets contain the same nodes |
static NodeSetValue |
highest(Context c,
NodeEnumeration nsv)
Get the node with maximum numeric value of the string-value of each of a set of nodes |
static NodeEnumeration |
highest(Context context,
NodeEnumeration nsv,
Expression expression)
Get the maximum numeric value of a stored expression over a set of nodes |
static Value |
IF(Value test,
Value thenValue,
Value elseValue)
Return the value of the second argument if the first is true, or the third argument otherwise. |
static NodeEnumeration |
intersection(Context c,
NodeEnumeration p1,
NodeEnumeration p2)
Return the intersection of two node-sets |
static boolean |
isNull(java.lang.Object x)
Test whether an encapsulated Java object is null |
static NodeEnumeration |
leading(Context context,
NodeEnumeration in,
Expression exp)
Get the nodes that satisfy the given expression, up to and excluding the first one (in document order) that doesn't |
static double |
lineNumber(Context c)
Return the line number of the context node. |
static NodeSetValue |
lowest(Context c,
NodeEnumeration nsv)
Get the node with minimum numeric value of the string-value of each of a set of nodes |
static NodeEnumeration |
lowest(Context context,
NodeEnumeration nsv,
Expression expression)
Get the node with minimum numeric value of a stored expression over a set of nodes |
static double |
max(Context context,
NodeEnumeration nsv,
Expression expression)
Get the maximum numeric value of a stored expression over a set of nodes |
static double |
max(NodeEnumeration nsv)
Get the maximum numeric value of the string-value of each of a set of nodes |
static double |
min(Context context,
NodeEnumeration nsv,
Expression expression)
Get the minimum numeric value of a stored expression over a set of nodes |
static double |
min(NodeEnumeration nsv)
Get the minimum numeric value of the string-value of each of a set of nodes |
static NodeSetValue |
nodeset(Context c,
Value frag)
Alternative spelling (allows "nodeset()") |
static NodeSetValue |
nodeSet(Context c,
Value frag)
Convert a result tree fragment to a node-set. |
static java.lang.String |
path(Context c)
Return an XPath expression that identifies the current node |
static void |
pauseTracing(Context c)
|
static NodeEnumeration |
range(Context context,
double start,
double finish)
Return a node-set whose nodes have string-values "1", "2", ... |
static void |
resumeTracing(Context c)
|
static void |
setUserData(Context c,
java.lang.String name,
Value value)
Save a value associated with the context node |
static java.lang.String |
showNodeset(Context c,
NodeSetValue in)
A diagnostic function to print the contents of a node-set |
static double |
sum(Context context,
NodeEnumeration nsv,
Expression expression)
Total a stored expression over a set of nodes |
static java.lang.String |
systemId(Context c)
Return the system identifier of the context node |
static NodeEnumeration |
tokenize(Context context,
java.lang.String s)
Return a node-set by tokenizing a supplied string. |
static NodeEnumeration |
tokenize(Context context,
java.lang.String s,
java.lang.String delim)
Return a node-set by tokenizing a supplied string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Extensions()
Method Detail |
public static void pauseTracing(Context c)
public static void resumeTracing(Context c)
public static NodeSetValue nodeSet(Context c, Value frag) throws XPathException
XPathException
public static NodeSetValue nodeset(Context c, Value frag) throws XPathException
XPathException
public static java.lang.String systemId(Context c) throws XPathException
XPathException
public static double lineNumber(Context c) throws XPathException
XPathException
public static java.lang.String baseUri(Context c) throws XPathException
XPathException
public static NodeEnumeration intersection(Context c, NodeEnumeration p1, NodeEnumeration p2) throws XPathException
p1
- The first node-setp2
- The second node-set
XPathException
public static NodeEnumeration difference(Context c, NodeEnumeration p1, NodeEnumeration p2) throws XPathException
p1
- The first node-setp2
- The second node-set
XPathException
public static boolean hasSameNodes(Context context, NodeEnumeration p1, NodeEnumeration p2) throws XPathException
p1
- The first node-setp2
- The second node-set
XPathException
public static Value IF(Value test, Value thenValue, Value elseValue) throws XPathException
test
- A value treated as a booleanthenValue
- Any valueelseValue
- Any value
XPathException
public static Value evaluate(Context c, java.lang.String expr) throws XPathException
XPathException
public static Value eval(Context c, Expression expr) throws XPathException
XPathException
public static Value expression(Context c, java.lang.String expr) throws XPathException
XPathException
public static double sum(Context context, NodeEnumeration nsv, Expression expression) throws XPathException
XPathException
public static double max(NodeEnumeration nsv) throws XPathException
XPathException
public static double max(Context context, NodeEnumeration nsv, Expression expression) throws XPathException
XPathException
public static double min(NodeEnumeration nsv) throws XPathException
XPathException
public static double min(Context context, NodeEnumeration nsv, Expression expression) throws XPathException
XPathException
public static NodeSetValue highest(Context c, NodeEnumeration nsv) throws XPathException
XPathException
public static NodeEnumeration highest(Context context, NodeEnumeration nsv, Expression expression) throws XPathException
XPathException
public static NodeSetValue lowest(Context c, NodeEnumeration nsv) throws XPathException
XPathException
public static NodeEnumeration lowest(Context context, NodeEnumeration nsv, Expression expression) throws XPathException
XPathException
public static NodeEnumeration distinct(Context context, NodeEnumeration in) throws XPathException
XPathException
public static NodeEnumeration distinct(Context context, NodeEnumeration in, Expression exp) throws XPathException
XPathException
public static NodeEnumeration closure(Context c, NodeEnumeration enm, Expression expr) throws XPathException
XPathException
public static NodeEnumeration leading(Context context, NodeEnumeration in, Expression exp) throws XPathException
XPathException
public static NodeSetValue before(Context context, NodeSetValue ns1, NodeSetValue ns2) throws XPathException
XPathException
public static NodeSetValue after(Context context, NodeSetValue ns1, NodeSetValue ns2) throws XPathException
XPathException
public static boolean exists(Context context, NodeEnumeration nsv, Expression expression) throws XPathException
XPathException
public static boolean forAll(Context context, NodeEnumeration nsv, Expression expression) throws XPathException
XPathException
public static NodeEnumeration range(Context context, double start, double finish) throws XPathException
XPathException
public static NodeEnumeration tokenize(Context context, java.lang.String s) throws XPathException
XPathException
public static NodeEnumeration tokenize(Context context, java.lang.String s, java.lang.String delim) throws XPathException
XPathException
public static java.lang.String path(Context c) throws XPathException
XPathException
public static java.lang.String showNodeset(Context c, NodeSetValue in) throws XPathException
XPathException
public static boolean isNull(java.lang.Object x) throws XPathException
XPathException
public static void setUserData(Context c, java.lang.String name, Value value) throws XPathException
XPathException
public static Value getUserData(Context c, java.lang.String name) throws XPathException
XPathException
public static Context getContext(Context c)
public static java.lang.String getPseudoAttribute(Context c, java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |