D Error Conditions

D.1 New Error Codes

err:XUST0001

It is a static error if an updating expression is used where the expression category rules prohibit it.

err:XUST0003

It is a static error if a Prolog contains more than one revalidation declaration.

err:XUTY0004

It is a type error if the insertion sequence of an insert expression contains an attribute node following a node that is not an attribute node.

err:XUTY0005

In an insert expression where into, as first into, or as last into is specified, it is a type error if the target expression returns a non-empty result that does not consist of a single element or document node.

err:XUTY0006

In an insert expression where before or after is specified, it is a type error if the target expression returns a non-empty result that does not consist of a single element, text, comment, or processing instruction node.

err:XUTY0007

It is a type error if the target expression of a delete expression does not return a sequence of zero or more nodes.

err:XUTY0008

In a replace expression, it is a type error if the target expression returns a non-empty result that does not consist of a single element, attribute, text, comment, or processing instruction node.

err:XUDY0009

In a replace expression where value of is not specified, it is a dynamic error if the node returned by the target expression does not have a parent.

err:XUTY0010

In a replace expression where value of is not specified and the target is an element, text, comment, or processing instruction node, it is a type error if the replacement sequence does not consist of zero or more element, text, comment, or processing instruction nodes.

err:XUTY0011

In a replace expression where value of is not specified and the target is an attribute node, it is a type error if the replacement sequence does not consist of zero or more attribute nodes.

err:XUTY0012

In a rename expression, it is a type error if the target expression returns a non-empty result that does not consist of a single element, attribute, or processing instruction node.

err:XUTY0013

In a copy modify expression, it is a type error if a source expression in the copy clause does not return a single node.

err:XUDY0014

In a copy modify expression, it is a dynamic error if the modify clause modifies any node that was not created by the copy clause.

err:XUDY0015

It is a dynamic error if any node is the target of more than one rename expression within the same query.

err:XUDY0016

It is a dynamic error if any node is the target of more than one replace expression (without value of being specified) within the same query.

err:XUDY0017

It is a dynamic error if any node is the target of more than one replace value of expression within the same query.

err:XUDY0018

It is a dynamic error if a function that was declared to be external but not updating returns a non-empty pending update list.

err:XUDY0021

It is a dynamic error if the XDM instance that would result from applying all the updates in a query violates any constraint specified in [XQuery and XPath Data Model (XDM) 3.0]. In this case, none of the updates in the query are made effective.

err:XUTY0022

It is a type error if an insert expression specifies the insertion of an attribute node into a document node.

err:XUDY0023

It is a dynamic error if an insert, replace, or rename expression affects an element node by introducing a new namespace binding that conflicts with one of its existing namespace bindings.

err:XUDY0024

It is a dynamic error if the effect of a set of updating expressions is to introduce conflicting namespace bindings into an element node.

err:XUDY0025

(Not currently used.)

err:XUST0026

It is a static error if a revalidation declaration in a Prolog specifies a revalidation mode that is not supported by the current implementation.

err:XUDY0027

It is a dynamic error if the target expression of an insert, replace, or rename expression evaluates to an empty sequence.

err:XUDY0029

In an insert expression where before or after is specified, it is a dynamic error if the node returned by the target expression does not have a parent.

err:XUDY0030

It is a dynamic error if an insert expression specifies the insertion of an attribute node before or after a child of a document node.

err:XUDY0031

It is a dynamic error if multiple calls to fn:put in the same snapshot specify the same URI (after resolution of relative URIs).

err:XUST0032

It is a static error if an %updating or %simple annotation is used on a VarDecl.

err:XUST0033

It is a static error to use more than one %updating or %simple annotation in a given annotation set.

err:XUST0034

It is a static error to use more than one updating function assertion in the function assertionXQ30 set of a FunctionTest.

err:XUDY0037

It is a dynamic error if the pending update list returned by the modify expression of a CopyModifyExpr or TransformWithExpr contains a upd:put update primitive.

err:XUDY0038

It is a dynamic error if the function returned by the PrimaryExpr of a dynamic function invocation is an updating function, and the dynamic function invocation is not a partial function applicationXQ30.

err:FOUP0001

It is a dynamic error if the first operand of fn:put is not a node of a supported kind.

err:FOUP0002

It is a dynamic error if the second operand of fn:put is not a valid lexical representation of the xs:anyURI type.

D.2 Amendments to Existing Error Codes

err:XQDY0026

It is a dynamic error if a constructor or replace expression would result in a processing instruction node whose content includes the string "?>".

err:XQDY0041

It is a dynamic error if the name assigned to a processing node by a constructor or rename expression cannot be cast to the type xs:NCName.

err:XQDY0072

It is a dynamic error if a constructor or replace expression would result in a comment node whose content ends with a hyphen or contains two adjacent hyphens.

err:XQDY0074

It is a dynamic error if the value of the name expression in a computed element constructor, computed attribute constructor, or rename expression cannot be converted to an expanded QName (for example, because it contains a namespace prefix not found in the statically known namespaces.)