|
Home > Online Product Documentation > Table of Contents > Specifying Number Operations and Functions Specifying Number Operations and FunctionsThis section includes the following topics: Performing Arithmetic OperationsIn queries, a number represents a floating-point number. A number can have any double-precision 64-bit format IEEE 754 value. This includes
The numeric operators convert their operands to numbers as if by calling the
You can use the following arithmetic operators in queries:
XML allows hyphens (
Calling Number FunctionsThis section describes the number functions that you can call in a query. The operations you can perform are Converting an Object to a Number
In some situations, you might want to force a numeric comparison. The XPath processor performs a numeric comparison if either operand is numeric and neither is Boolean. (If one operand is Boolean, the XPath processor converts the other to Boolean and performs a Boolean comparison.) However, if neither operand is a numeric or Boolean value, you can call the
To perform a numeric comparison, you must call the
The format of the
If you omit the argument, the value of the argument defaults to a node set with the context node as its only member.
Table 62 shows how the
Obtaining the Sum of the Values in a Node Set
To obtain the sum of the values of the nodes in a set, call the
For each node in the argument node-set, the XPath processor converts the string value of the node to a number. The
Obtaining the Largest, Smallest, or Closest Number
To obtain the largest integer that is not greater than a particular number, call the
The
To obtain the smallest integer that is not less than a particular number, call the
The
To obtain the closest integer to a particular number, call the
The
|
EXSLT Tools
EXSLT support in Stylus Studio lets you extend XSLT 1.0 stylesheets and simplify many tasks including computing dates and times, performing mathematical computations, string manipulations and more.
Web Service Data Mapping
Stylus Studio makes it possible for you to use Web services as live XML data sources for XML mapping projects.
XML Project
Stylus Studio's Project Window is an intuitive, visual feature for organizing files belonging to a project. It supports different file-type icons and nested folders; many helpful options are available from the context menu.
Learn XQuery in 10 Minutes, by Dr. Michael Kay - An XQuery Tutorial
Learn XQuery in 10 Minutes By Dr. Michael Kay is for all those people who really want to know what XQuery is, but don't have the time to find out. It's the fastest XQuery tutorial on the planet - read it now!