It is a static error if analysis of an expression relies on some component of the static context that is absentDM31 .
It is a dynamic error if evaluation of an expression relies on some part of the dynamic context that is absentDM31 .
It is a static error if an expression is not a valid instance of the grammar defined in A.1 EBNF.
It is a type error if, during the static analysis phase, an expression is found to have a static type that is not appropriate for the context in which the expression occurs, or during the dynamic evaluation phase, the dynamic type of a value does not match a required type as specified by the matching rules in 3.5 Sequence Type Matching.
During the analysis phase, it is a static
error if the static type assigned
to an expression other than the expression ()
or data(())
is
empty-sequence()
.
It is a static error if an expression refers to an element name, attribute name, schema type name, namespace prefix, or variable name that is not defined in the static context, except for an ElementName in an ElementTest or an AttributeName in an AttributeTest.
An implementation that does not support the namespace axis must raise a static error if it encounters a reference to the namespace axis and XPath 1.0 compatibility mode is false.
It is a static error if the expanded QName and number of arguments in a static function call do not match the name and arity range of a function definition in the static context.
It is a type error if the result of a path operator contains both nodes and non-nodes.
It is a type error if E1
in a path
expression E1/E2
does not evaluate to a sequence of nodes.
It is a type error if, in an axis step, the context item is not a node.
It is a static error for an inline function expression to have more than one parameter with the same name.
An implementation MAY raise a static error if the value of a BracedURILiteral is of nonzero length and is neither an absolute URI nor a relative URI.
It is a dynamic error if the dynamic type of the operand of a treat
expression does not match the sequence type
specified by the treat
expression. This error might also be raised by a
path expression beginning with "/
" or "//
" if the context node
is not in a tree that is rooted at a document node. This is because a leading
"/
" or "//
" in a path expression is an abbreviation for an
initial step that includes the clause treat as document-node()
.
It is a static error if an expanded QName used as an ItemType in a SequenceType is not defined in the static context either as a type alias or as a generalized atomic type in the in-scope schema types.
The type named in a cast or castable expression must be the name of a type defined in the in-scope
schema types, and the type must be
simple
.
A static error is raised if any of the following conditions is statically detected in any expression:
The prefix xml
is bound to some namespace URI other than
http://www.w3.org/XML/1998/namespace
.
A prefix other than xml
is bound to the namespace URI
http://www.w3.org/XML/1998/namespace
.
The prefix xmlns
is bound to any namespace URI.
A prefix other than xmlns
is bound to the namespace URI
http://www.w3.org/2000/xmlns/
.
It is a static error if the target type of a
cast
or castable
expression is
xs:NOTATION
,
xs:anySimpleType
, or
xs:anyAtomicType
.
It is a static error if a QName used in an expression contains a namespace prefix that cannot be expanded into a namespace URI by using the statically known namespaces.
When applying the function conversion rules, if an item is of type xs:untypedAtomic
and the
expected type is namespace-sensitive, a
type error
[err:XPTY0117] is raised.
An implementation-dependent limit has been exceeded.
The namespace axis is not supported.
No two keys in a map may have the same key value.
It is a static error if a self-reference
within a RecordTest
appears as the type of a field declaration that is not
optional and not emptiable.
In a static function call, every required parameter in the corresponding function definition must be matched to exactly one argument in the function call, and every optional parameter in the corresponding function definition must be matched to zero or one arguments in the function call.
In a static function call, every keyword used in a KeywordArgument (after expansion to a QName) must match the name of a parameter in the corresponding function definition.