1 Introduction

This document defines the syntax and semantics of an extension to [XQuery 3.0: An XML Query Language] called the XQuery Update Facility 3.0. This language extension is designed to meet the requirements for updating instances of the [XQuery and XPath Data Model (XDM) 3.0], as defined in [XQuery Update Facility 3.0 Requirements and Use Cases].

The XQuery Update Facility 3.0 provides facilities to perform any or all of the following operations on an XDM instance:

Additionally, this document defines an XML syntax for the XQuery Update Facility 3.0. The most recent versions of the two XQueryX XML Schemas and the XQueryX XSLT stylesheet for the XQuery Update Facility 3.0 are available at http://www.w3.org/2015/02/xquery-update-30/xquery-update-30-xqueryx.xsd, http://www.w3.org/2015/02/xquery-update-30/xquery-update-30-xqueryx-redef.xsd, and http://www.w3.org/2015/02/xquery-update-30/xquery-update-30-xqueryx.xsl, respectively.

1.1 Terminology

[Definition: Within this document, the term XQuery 3.0 refers to the language specified by [XQuery 3.0: An XML Query Language].] [Definition: The term data model refers to the data model specified by [XQuery and XPath Data Model (XDM) 3.0].] [Definition: The term XDM instance denotes an unconstrained sequence of zero or more nodes and/or atomic values as defined by the data model.] [Definition: The term node identity denotes the unique identity that is a property of every node in an XDM instance (see Section 2.3 Node Identity DM30.)]

As described in Section 3.3.3 QNames and NOTATIONS DM30, names in XQuery are qualified names (QNames) that consist of an optional namespace prefix, a local name, and an optional namespace URI. [Definition: The implied namespace binding of a QName is the association of its namespace prefix (or absence thereof) with its namespace URI (or absence thereof).] [Definition: Two namespace bindings are said to conflict if their namespace prefixes (or absence thereof) are the same but their namespace URI's (or absence thereof) are different.] Update operations that result in conflicting namespace bindings generally raise errors, as described in this document. However, if the namespace prefix of an attribute is absent, it is in no namespace, and its implied namespace binding is not added to the namespace bindings of its parent element. Therefore, an update operation can create such an attribute in an element even though its implied namespace binding conflicts with a namespace binding in the "namespaces" property of the element.

In this document, examples and material labeled as "Note" are provided for explanatory purposes and are not normative.