org.apache.xalan.lib

Class ExsltDynamic


public class ExsltDynamic
extends ExsltBase

This class contains EXSLT dynamic extension functions. It is accessed by specifying a namespace URI as follows:
    xmlns:dyn="http://exslt.org/dynamic"
 
The documentation for each function has been copied from the relevant EXSLT Implementer page.
See Also:
EXSLT

Field Summary

static String
EXSL_URI

Method Summary

static NodeList
closure(ExpressionContext myContext, NodeList nl, String expr)
The dyn:closure function creates a node set resulting from transitive closure of evaluating the expression passed as the second argument on each of the nodes passed as the first argument, then on the node set resulting from that and so on until no more nodes are found.
static XObject
evaluate(ExpressionContext myContext, String xpathExpr)
The dyn:evaluate function evaluates a string as an XPath expression and returns the resulting value, which might be a boolean, number, string, node set, result tree fragment or external object.
static NodeList
map(ExpressionContext myContext, NodeList nl, String expr)
The dyn:map function evaluates the expression passed as the second argument for each of the nodes passed as the first argument, and returns a node set of those values.
static double
max(ExpressionContext myContext, NodeList nl, String expr)
The dyn:max function calculates the maximum value for the nodes passed as the first argument, where the value of each node is calculated dynamically using an XPath expression passed as a string as the second argument.
static double
min(ExpressionContext myContext, NodeList nl, String expr)
The dyn:min function calculates the minimum value for the nodes passed as the first argument, where the value of each node is calculated dynamically using an XPath expression passed as a string as the second argument.
static double
sum(ExpressionContext myContext, NodeList nl, String expr)
The dyn:sum function calculates the sum for the nodes passed as the first argument, where the value of each node is calculated dynamically using an XPath expression passed as a string as the second argument.

Field Details

EXSL_URI

public static final String EXSL_URI

Method Details

closure

public static NodeList closure(ExpressionContext myContext,
                               NodeList nl,
                               String expr)
            throws SAXNotSupportedException
The dyn:closure function creates a node set resulting from transitive closure of evaluating the expression passed as the second argument on each of the nodes passed as the first argument, then on the node set resulting from that and so on until no more nodes are found. For example:
  dyn:closure(., '*')
 
returns all the descendant elements of the node (its element children, their children, their children's children and so on).

The expression is thus evaluated several times, each with a different node set acting as the context of the expression. The first time the expression is evaluated, the context node set is the first argument passed to the dyn:closure function. In other words, the node set for each node is calculated by evaluating the XPath expression with all context information being the same as that for the call to the dyn:closure function itself, except for the following:

  • the context node is the node whose value is being calculated.
  • the context position is the position of the node within the node set passed as the first argument to the dyn:closure function, arranged in document order.
  • the context size is the number of nodes passed as the first argument to the dyn:closure function.
  • the current node is the node whose value is being calculated.

The result for a particular iteration is the union of the node sets resulting from evaluting the expression for each of the nodes in the source node set for that iteration. This result is then used as the source node set for the next iteration, and so on. The result of the function as a whole is the union of the node sets generated by each iteration.

If the expression string passed as the second argument is an invalid XPath expression (including an empty string) or an expression that does not return a node set, this function returns an empty 1" width-minute function returns the second of the minute as a number. If no argument is given, then the current local date/time, as returned by date:date-time is used the default argument. The date/time string specified as the argument is a right-truncated string in the format defined as the lexical representation of xs:dateTime in one of the formats defined in [XML Schema Part 2: Datatypes]. The permitted formats are as follows: xs:dateTime (CCYY-MM-DDThh:mm:ss) xs:time (hh:mm:ss) If the date/time string is not in one of these formats, then NaN is returned.


time

public static String time()
See above.

time

public static String time(String timeIn)
            throws ParseException
The date:time function returns the time specified in the date/time string given as the argument. If no argument is given, then the current local date/time, as returned by date:date-time is used as a default argument. The date/time string that's returned must be a string in the format defined as the lexical representation of xs:dateTime in [3.2.7 dateTime] of [XML Schema Part 2: Datatypes]. If the argument string is not in this format, date:time returns an empty string (''). The date/time format is basically CCYY-MM-DDThh:mm:ss, although implementers should consult [XML Schema Part 2: Datatypes] and [ISO 8601] for details. The date is returned as a string with a lexical representation as defined for xs:time in [3.2.8 time] of [XML Schema Part 2: Datatypes]. The time format is basically hh:mm:ss, although implementers should consult [XML Schema Part 2: Datatypes] and [ISO 8601] for details. If no argument is given or the argument date/time specifies a time zone, then the time string format must include a time zone, either a Z to indicate Coordinated Universal Time or a + or - followed by the difference between the difference from UTC represented as hh:mm. If an argument is specified and it does not specify a time zone, then the time string format must not include a time zone.

weekInYear

public static double weekInYear()
See above.

weekInYear

public static double weekInYear(String datetimeIn)
            throws ParseException

year

public static double year()
See above.

year

public static double year(String datetimeIn)
            throws ParseException

Copyright © 2006 Apache XML Project. All Rights Reserved../usr/share/doc/libxalan2-java-doc/api/org/apache/xalan/lib/ExsltDatetime-uses.html0000644000000000000000000000552411005065002026773 0ustar rootroot ExsltDatetime (Xalan-Java 2.7.1)

Uses of Class org.apache.xalan.lib.ExsltDatetime

Class org.apache.xalan.lib.ExsltDatetime is not used by any class in this documentation set.


Copyright © 2006 Apache XML Project. All Rights Reserved../usr/share/doc/libxalan2-java-doc/api/org/apache/xalan/lib/ExsltDynamic.html0000644000000000000000000007120211005065002025642 0ustar rootroot ExsltDynamic (Xalan-Java 2.7.1)

org.apache.xalan.lib

Class ExsltDynamic


public class ExsltDynamic
extends ExsltBase

This class contains EXSLT dynamic extension functions. It is accessed by specifying a namespace URI as follows:
    xmlns:dyn="http://exslt.org/dynamic"
 
The documentation for each function has been copied from the relevant EXSLT Implementer page.
See Also:
EXSLT

Field Summary

static String
EXSL_URI