| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.apache.xalan.lib.ExsltBaseorg.apache.xalan.lib.ExsltDynamicpublic class ExsltDynamicextends ExsltBase
xmlns:dyn="http://exslt.org/dynamic"
The documentation for each function has been copied from the relevant
EXSLT Implementer page.
EXSLTField Summary | |
static String | |
Method Summary | |
static NodeList |
|
static XObject |
|
static NodeList |
|
static double |
|
static double |
|
static double |
|
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 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.
- 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.
public static String time()
See above.
public static String time(String timeIn)
throws ParseExceptionThe 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.
public static double weekInYear()
See above.
public static double weekInYear(String datetimeIn)
throws ParseExceptionThe date:week-in-year function returns the week of the year as a number. If no argument is given, then the current local date/time, as returned by date:date-time is used as the default argument. For the purposes of numbering, counting follows ISO 8601: week 1 in a year is the week containing the first Thursday of the year, with new weeks beginning on a Monday. 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:date (CCYY-MM-DD) If the date/time string is not in one of these formats, then NaN is returned.
public static double year()
See above.
public static double year(String datetimeIn)
throws ParseExceptionThe date:year function returns the year of a date as a number. 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 specified as the first argument must be 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:date (CCYY-MM-DD) xs:gYearMonth (CCYY-MM) xs:gYear (CCYY) If the date/time string is not in one of these formats, then NaN is returned.