SAXONICA

Saxon Documentation
Full Contents
About Saxon
Changes in this Release
Conditions of Use
Using XSLT 2.0
Using XQuery
Handling Source Documents
XML Schema Processing
XPath API for Java
Saxon on .NET
Extensibility
Saxon Extensions
Sample Saxon Applications
The Saxon SQL Extension
XSLT Elements
XPath 2.0 Expression Syntax
Function Library
Standards Conformance

# fn:sum

fn:sum($srcval as xdt:anyAtomicType*) → xdt:anyAtomicType?

Function signature

$arg | xdt:anyAtomicType *
Result | xdt:anyAtomicType

Returns the total of a sequence of numbers or durations

XPath 2.0 Specification

fn:sum($srcval as xdt:anyAtomicType*, $zero as xdt:anyAtomicType?) → xdt:anyAtomicType?

Function signature

$arg | xdt:anyAtomicType *
$zero | xdt:anyAtomicType ?
Result | xdt:anyAtomicType ?

Returns the total of a sequence of numbers, specifying the value to be returned for an empty sequence

XPath 2.0 Specification

Next