XPath/XQuery numeric-unary-plus function

Summary

Returns its operand with the sign unchanged: (+ $arg).

Operator Mapping

Defines the semantics of the unary "+" operator applied to a numeric value.

Signature

op:numeric-unary-plus(
$arg as xs:numeric
) as xs:numeric

Rules

General rules: see .

The returned value is equal to $arg, and is an instance of xs:integer, xs:decimal, xs:double, or xs:float depending on the type of $arg.

Notes

Because function conversion rules are applied in the normal way, the unary + operator can be used to force conversion of an untyped node to a number: the result of +@price is the same as xs:double(@price) if the type of @price is xs:untypedAtomic.