EXSLT - date:sum - Version 1

Version: 1
Status: implemented
User Page: index.html
XML Definition: date.sum.xml
Function Package: date.sum.zip

Function Syntax

string date:sum(node-set)

The date:sum function adds a set of durations together. The string values of the nodes in the node set passed as an argument are interpreted as durations and added together as if using the date:add-duration function.

The string values of the nodes in the node set passed as the argument must be in the format defined for xs:duration in [3.2.6 duration] of [XML Schema Part 2: Datatypes]. If any of the string values of these nodes are not in this format, or if the node set is empty, the function returns an empty string ('').

The result is a string in the format defined for xs:duration in [3.2.6 duration] of [XML Schema Part 2: Datatypes].

The durations can be summed by summing the numbers given for each of the components in the durations.

An implementation of this extension function in the EXSLT date namespace must conform to the behaviour described in this document.

Implementations

No XSLT processors that we know of have built-in support for date:sum.

The following implementations of date:sum are available:

LanguageImplemented VersionCreatorDateDownload
Javascript1Chris Bayes2001-06-11date.js
Msxsl1Chris Bayes2001-06-16date.msxsl.xsl

Change History

Submitted: 2001-05-12
Creator: Jeni Tennison(http://www.jenitennison.com/)

Adds a set of durations together.

VersionModifiedByDetails
1.12001-06-11Jeni Tennison

Added Javascript implementation.

1.22001-06-16Jeni Tennison
  • Updated Javascript implementation.
  • Added Microsoft-specific stylesheet.

http://www.exslt.org/date/functions/sum/date.sum.1.html last modified 2001-06-16