Functions, operators, and data types for XPath 2.0
The normalize-space()
function now returns a zero-length string if the argument is an empty sequence.
Casting from xs:anyURI
to xdt:untypedAtomic
is now allowed.
Integers of unlimited size are now supported when using the xs:integer
data type.
The full range of xs:unsignedLong
is now supported.
Decimal division has been changed. The scale of the result (the number of digits after the
decimal point) is now the maximum of (18, s1, s2) where s1 is the scale of the first operand and
s2 is the scale of the second. An extension function
The idiv
operator now allows operands of any numeric type.
A negative year is allowed in values of type xs:dateTime
, xs:gYear
,
and xs:gYearMonth
. (Negative years were allowed in xs:date
in Saxon 7.9.1)
Division of one duration by another to produce a double is implemented.
Some operations on durations are now performed using long arithmetic rather than double arithmetic, which improves the precision of the result.
The eq
, gt
... family of operators now allow either operand to be an empty
sequence, in which case the result is an empty sequence.
The id()
function now accepts a second parameter, this is a node that identifies the
document to be searched to find the required ID value. (The corresponding change to other functions
such as idref()
, lang()
, and key()
has not yet been made)
The deep-equals()
function now compares attributes using their typed value rather than
their string value.
If the fragment identifier included in a URI reference passed to the document()
function is not a valid
NCName, it is now ignored, and the function returns the document node. Previously an empty sequence would
be returned.