The error text provided with these errors is non-normative.
Raised when fn:apply
is called and the arity of the supplied function is not
the same as the number of members in the supplied array.
This error is raised whenever an attempt is made to divide by zero.
This error is raised whenever numeric operations result in an overflow or underflow.
This error is raised when an integer used to select a member of an array is outside the range of values for that array.
This error is raised when the $length
argument to array:subarray
is negative.
Raised when casting to xs:decimal
if the supplied value exceeds the
implementation-defined limits for the datatype.
Raised by fn:resolve-QName
and fn:QName
when a supplied value does not have the lexical
form of a QName or URI respectively; and when casting to decimal, if the supplied value is NaN or Infinity.
Raised when casting to xs:integer
if the supplied value exceeds the
implementation-defined limits for the datatype.
Raised when multiplying or dividing a duration by a number, if the number supplied is NaN.
Raised when casting a string to xs:decimal
if the string has more digits of precision
than the implementation can represent (the implementation also has the option of rounding).
Raised by fn:codepoints-to-string
if the input contains an integer that is not the codepoint
of a valid XML character.
Raised by any function that uses a collation if the requested collation is not recognized.
Raised by fn:normalize-unicode
if the requested normalization form is not
supported by the implementation.
Raised by functions such as fn:contains
if the requested collation does
not operate on a character-by-character basis.
Raised by fn:id
, fn:idref
, and fn:element-with-id
if the node that identifies the tree to be searched is a node in a tree whose root is not
a document node.
Raised by fn:doc
, fn:collection
, and fn:uri-collection
to indicate that either the supplied URI cannot be dereferenced to obtain a resource, or the resource
that is returned is not parseable as XML.
Raised by fn:doc
, fn:collection
, and fn:uri-collection
to indicate that it is not possible to
return a result that is guaranteed deterministic.
Raised by fn:collection
and fn:uri-collection
if the argument is not a valid xs:anyURI
.
Raised (optionally) by fn:doc
and fn:doc-available
if the argument
is not a valid URI reference.
Raised by fn:parse-xml
if the supplied string is not a well-formed and namespace-well-formed XML document;
or if DTD validation is requested and the document is not valid against its DTD.
Raised when fn:serialize
is called and the processor does not support serialization,
in cases where the host language makes serialization an optional feature.
This error is raised if the decimal format name supplied to fn:format-number
is not a valid QName,
or if the prefix in the QName is undeclared, or if there is no decimal format in the static context with
a matching name.
This error is raised if the picture string supplied to fn:format-number
or
fn:format-integer
has invalid syntax.
Raised when casting to date/time datatypes, or performing arithmetic with date/time values, if arithmetic overflow or underflow occurs.
Raised when casting to duration datatypes, or performing arithmetic with duration values, if arithmetic overflow or underflow occurs.
Raised by adjust-date-to-timezone
and related functions if the supplied timezone is invalid.
Error code used by fn:error
when no other error code is provided.
This error is raised if the picture string or calendar supplied to fn:format-date
, fn:format-time
,
or fn:format-dateTime
has invalid syntax.
This error is raised if the picture string supplied to fn:format-date
selects a component that is not present in a date, or if the picture string supplied to fn:format-time
selects a component that is not present in a time.
Raised by functions such as fn:json-doc
, fn:parse-json
or fn:json-to-xml
if the string supplied as input does not conform to the JSON grammar (optionally with implementation-defined extensions).
Raised by functions such as map:merge
, fn:json-doc
,
fn:parse-json
or fn:json-to-xml
if the input contains duplicate keys, when the chosen policy is to reject duplicates.
Raised by fn:json-to-xml
if validation
is requested when the processor does not support schema validation or typed nodes.
Raised by functions such as map:merge
, fn:parse-json
,
and fn:xml-to-json
if the $options
map contains an invalid entry.
Raised by fn:xml-to-json
if the XML input does not
conform to the rules for the XML representation of JSON.
Raised by fn:xml-to-json
if the XML input uses the attribute
escaped="true"
or escaped-key="true"
, and the corresponding string
or key contains an invalid JSON escape sequence.
Raised by fn:resolve-QName
and analogous functions if a supplied QName has a
prefix that has no binding to a namespace.
Raised by fn:resolve-uri
if no base URI is available for resolving a relative URI.
Raised by fn:load-xquery-module
if the supplied module URI is zero-length.
Raised by fn:load-xquery-module
if no module can be found with the supplied module URI.
Raised by fn:load-xquery-module
if a static error
(including a statically detected type error) is encountered when processing the library module.
Raised by fn:load-xquery-module
if a value is supplied for the initial context
item or for an external variable, and the value does not conform to the required
type declared in the dynamically loaded module.
Raised by fn:load-xquery-module
if no XQuery processor is available supporting the requested
XQuery version (or if none is available at all).
A general-purpose error raised when casting, if a cast between two datatypes is allowed in principle, but the supplied value cannot be converted: for example when attempting to cast the string "nine" to an integer.
Raised when either argument to fn:resolve-uri
is not a valid URI/IRI.
Raised by fn:zero-or-one
if the supplied value contains more than one item.
Raised by fn:one-or-more
if the supplied value is an empty sequence.
Raised by fn:exactly-one
if the supplied value is not a singleton sequence.
Raised by functions such as fn:max
, fn:min
, fn:avg
, fn:sum
if the supplied sequence contains values inappropriate to this function.
Raised by fn:dateTime
if the two arguments both have timezones and the timezones are different.
A catch-all error for fn:resolve-uri
, recognizing that the implementation can choose between a variety
of algorithms and that some of these may fail for a variety of reasons.
Raised when the input to fn:parse-ietf-date
does not match the prescribed
grammar, or when it represents an invalid date/time such as 31 February.
Raised by regular expression functions such as fn:matches
and fn:replace
if the
regular expression flags contain a character other than i
, m
, q
, s
, or x
.
Raised by regular expression functions such as fn:matches
and fn:replace
if the
regular expression is syntactically invalid.
For functions such as fn:replace
and fn:tokenize
, raises an error if
the supplied regular expression is capable of matching a zero length string.
Raised by fn:replace
to report errors in the replacement string.
Raised by fn:replace
if both the $replacement
and $action
arguments are supplied.
Raised by fn:data
, or by implicit atomization, if applied to a node with no typed value,
the main example being an element validated against a complex type that defines it to have element-only content.
Raised by fn:data
, or by implicit atomization, if the sequence to be atomized contains
a function item.
Raised by fn:string
, or by implicit string conversion, if the input sequence contains
a function item.
Raised by fn:deep-equal
if either input sequence contains a
function item.
A dynamic error is raised if the $href
argument
contains a fragment identifier, or if it cannot be used to retrieve a resource
containing text.
A dynamic error is raised if the retrieved resource contains octets that cannot be decoded into Unicode ·characters· using the specified encoding, or if the resulting characters are not permitted XML characters. This includes the case where the processor does not support the requested encoding.
A dynamic error is raised if
$encoding
is absent and the processor cannot infer the encoding using external information and the
encoding is not UTF-8.
A dynamic error is raised if no XSLT processor suitable for evaluating a call on fn:transform
is available.
A dynamic error is raised if the parameters supplied to fn:transform
are invalid, for example
if two mutually exclusive parameters are supplied. If a suitable XSLT error code is available (for example in the
case where the requested initial-template
does not exist in the stylesheet), that error code should
be used in preference.
A dynamic error is raised if an XSLT transformation invoked using fn:transform
fails with a
static or dynamic error. The XSLT error code is used if available; this error code provides a fallback when no XSLT
error code is returned, for example because the processor is an XSLT 1.0 processor.
A dynamic error is raised if the fn:transform
function is invoked when XSLT transformation (or a specific
transformation option) has been disabled for security or other reasons.
A dynamic error is raised if the result of the fn:transform
function contains characters available
only in XML 1.1 and the calling processor cannot handle such characters.