Home
Download
Wiki
Demo
Open Source Native XML Database
About Us
Who we are
Acknowledgements
Documentation
Quick Start
Function Library
Extension Modules
Main Documentation
Feature Sheet
XQuery Wikibook
Examples
XQuery Sandbox
XML Acronyms
Bibliographic
All Examples
Community
Mailing List/IRC
Development
Javadocs
ChangeLog
Bug Tracker
Subversion
Submit Patches
Administration
Admin
Server Status
Webstart Client
A RESTful browser for eXist Java-Based Function Modules
Modules
>
xpath-functions
>
sum
http://www.w3.org/2005/xpath-functions
A module with the XQuery/XPath Core Library Functions
sum
sum($arg as xdt:anyAtomicType*) xdt:anyAtomicType
Returns a value obtained by adding together the values in $arg. If $arg is the the empty sequence the xs:double value 0.0e0 is returned.
$arg
The sequence of numbers to be summed up
Returns the sum of all numbers in $arg
sum
sum($arg as xdt:anyAtomicType*, $default as xdt:anyAtomicType?) xdt:anyAtomicType
Returns a value obtained by adding together the values in $arg. If $arg is the the empty sequence then $default is returned.
$arg
The sequence of numbers to be summed up
$default
The default value if $arg computes to the empty sequence
Returns the sum of all numbers in $arg
Return to list of all modules