Copyright © 2011 W3C®(MIT,ERCIM,Keio), All Rights Reserved.W3Cliability,trademarkanddocumentuse rules apply.
This section describes the status of this document at thetime of its publication. Other documents may supersede thisdocument. A list of current W3C publications and the latestrevision of this technical report can be found in theW3C technical reports index athttp://www.w3.org/TR/.
This is aWorkingGroup Note as described in theProcessDocument. It has been developed by the W3CXML Query Working Group, whichis part of theXMLActivity.
This document includes, for each requirement, a correspondingstatus, indicating the current situation of the requirement inXQuery UpdateFacility 1.0 at the time that it was issued as a finalRecommendation on 22 February 2011. Three status levels areused:
This indicates that the requirement, according toits original formulation, has been completely met. Optionalclarificatory text may follow.
This indicates that the requirement has beenpartially met according to its original formulation. When thisstatus is indicated, explanatory text is provided to better clarifythe current scope of the requirement.
This indicates that the requirement, according toits original formulation, has not been met. If this is the case,explanatory text is provided.
No substantive changes have been made to this specificationsince its publication as a Proposed Recommendation.
Please report errors in this document using W3C'spublic Bugzilla system(instructions can be found athttp://www.w3.org/XML/2005/04/qt-bugzilla).If access to that system is not feasible, you may send yourcomments to the W3C XSLT/XPath/XQuery public comments mailing list,public-qt-comments@w3.org.It will be very helpful if you include the string “[UPDreq]” in thesubject line of your report, whether made in Bugzilla or in email.Please use multiple Bugzilla entries (or, if necessary, multipleemail messages) if you have more than one comment to make. Archivesof the comments and responses are available athttp://lists.w3.org/Archives/Public/public-qt-comments/.
Publication as aWorkingGroup Note does not imply endorsement by the W3C Membership. Atthe time of publication, work on this document was consideredcomplete and no further revisions are anticipated. It is a stabledocument and may be used as reference material or cited fromanother document. However, this document may be updated, replaced,or made obsolete by other documents at any time.
This document was produced by a group operating under the5February 2004 W3C Patent Policy. W3C maintains apubliclist of any patent disclosures made in connection with thedeliverables of the group; that page also includes instructions fordisclosing a patent. An individual who has actual knowledge of apatent which the individual believes containsEssential Claim(s) must disclose the information in accordancewithsection 6 of the W3C Patent Policy.
1Goals
2Usage Scenarios
3Requirements
3.1Terminology
3.2GeneralRequirements
3.3Relationship toXQuery 1.0
3.4XMLQuery Update Functionality
3.5Transactioncharacteristics
This document describes the requirements for the XQuery UpdateFacility.[XQuery 1.0] provides queries, buthas no support for adding new values or changing existing values.The XML Query Working Group intends to add support for updates in afuture version of XQuery.
The following usage scenarios describe how the XQuery UpdateFacility may be used in various environments, and represent a widerange of activities and needs that illustrate the problem space tobe addressed. They are intended to be used as design cases duringthe development of the XQuery Update Facility, and should bereviewed when critical decisions are made. These usage scenariosshould also prove useful in helping non-members of the XML QueryWorking Group understand the intent and goals of the project.
Modify XML in persistent XML stores, including native XMLdatabases, XML files stored on a file system, or XML stored in SQLdatabases.
Modify XML messages to change status and add information createdwhile processing the message.
Add new data to an existing XML document; for instance, add anew entry to a BLOG or a data log.
Perform updates on configuration files, user profiles, oradministrative logs represented in XML.
Create a new copy of an XML document or subtree that differsfrom the original in the way specified by the update. For instance,updates could be used to modify a web message in order to add newinformation and change headers to reflect the modified status.
Modifying XML views of non-XML sources, such as a[SQL/XML] view of a SQL database.
The following key words are used throughout the document tospecify the extent to which an item is a requirement for the workof the XML Query Working Group:
This word means that the item is an absolute requirement.
This word means that there may exist valid reasons not to treatthis item as a requirement, but the full implications should beunderstood and the case carefully weighed before discarding thisitem.
This word means that an item deserves attention, but furtherstudy is needed to determine whether the item should be treated asa requirement.
When the wordsMUST,SHOULD, orMAY are used in this technical sense, theyoccur as a hyperlink to these definitions. These words will also beused with their conventional English meaning, in which case thereis no hyperlink. For instance, the phrase "the full implicationsshould be understood" uses the word "should" in its conventionalEnglish sense, and therefore occurs without the hyperlink.
The syntax for updatesMAY havemore than one syntax binding. One syntaxMUST be convenient for humans to read andwrite.
Status: this requirement has beenmet.
One syntaxMUST be expressed inXML in a way that reflects the underlying structure of theoperations.
Status: this requirement has beenmet.
The XQuery Update FacilityMUSTbe declarative. Notably, itMUST beindependent of any particular evaluation strategy.
Status: this requirement has beenmet.
The XQuery Update FacilityMUSTbe defined independently of any protocols with which it isused.
Status: this requirement has beenmet.
The XQuery Update FacilityMUSTdefine standard error conditions that can occur during theexecution of an update.
Status: this requirement has beenmet.
The XQuery Update FacilitySHOULD provide an optional static typechecking feature.
Status: this requirement has beenmet.
The XQuery Update FacilityMUSTbe defined on the[XQuery 1.0 and XPath2.0 Data Model].
Status: this requirement has beenmet.
Note:
The properties of a Data Model instance that can be modified bythe XQuery Update Facility are discussed in3.4 XML Query UpdateFunctionality.
The XQuery Update FacilityMUSTbe based on[XQuery 1.0]. The XQuery UpdateFacilityMUST use XQuery toidentify items to be updated. The XQuery Update FacilityMUST use XQuery to specify items used inthe updates.
Status: this requirement has beenmet.
The XQuery Update FacilityMUSTbe able to change the properties of existing nodes while preservingtheir identity. The XQuery Update FacilityMUST be able to create a new copy of a nodewith a specific set of changes.
Status: this requirement has beenmet.
The XQuery Update FacilityMUSTbe able to delete nodes.
Status: this requirement has beenmet.
The XQuery Update FacilityMUSTbe able to insert new nodes in specified positions.
Status: this requirement has beenmet.
The XQuery Update FacilityMUSTbe able to replace a node.
Status: this requirement has beenmet.
The XQuery Update FacilityMUSTbe able to change the value returned by the typed-value accessorfor a node.
Status: this requirement has beenmet.
The XQuery Update FacilitySHOULD be able to modify some of theproperties of a node such as the name, type, content, nilled,base-URI, etc.
Status: this requirement has been met.The base-URI can not be modified.
The XQuery Update FacilityMAY beable to move a node from one location to another.
Status: this requirement has not been met.A node can be deleted, and a copy inserted in a new location, butit will have a new identity. The Working Group felt that thisfunctionality would limit the environments in which the XQueryUpdate Facility could be implemented.
The XQuery Update FacilityMUSTbe able to do conditional updates.
Status: this requirement has beenmet.
The XQuery Update FacilityMUSTbe able to iterate over nodes to do updates.
Status: this requirement has beenmet.
The XQuery Update FacilityMAYsupport an explicit XML Schema validation operation that preservesnode identity.
This requirement has not been met according toits original formulation; however, the revalidation mode can be setto ensure that type information is recovered and the resultingdocument is valid according to the governing schema.
Note:
The XQuery 1.0 validate expression creates a new copy of eachvalidated node, with a new identity. This requirement involvespreservation of identity.
The XQuery Update FacilityMUSTbe able to compose update operators with other updateoperators.
Status: this requirement has beenmet.
The XQuery Update FacilityMAY becompositional with respect to XQuery expressions; that is, it maybe possible to use an update wherever an XQuery expression isused.
Status: this requirement has not been metUpdating expressions are limited to specific syntacticcontexts..
The XQuery Update FacilitySHOULD provide a means to parameterizeupdate operations.
Status: this requirement has been met.Updating functions and external variables may both be used toparameterize update operations.
In this section, the terms Atomicity, Consistency, Isolation,and Durability are taken from the ACID model of transactioncharacteristics for databases, which is described in[Transaction Processing Concepts and Techniques].
The XQuery Update FacilityMUSTprovide a set of atomic operations, andMUST define a means to group atomicoperations into an atomic execution unit.
Status: this requirement has been met.Multiple atomic operations can be done in a single query, whichconstitutes the atomic execution unit.
At the end of an outermost update operation (that is, an updateoperation invoked from the external environment), the data modelMUST be consistent with respect tothe constraints specified in the Data Model. In particular, alltype annotationsMUST be consistentwith the content of the items they govern.
Status: this requirement has beenmet.
The XQuery Update FacilityMAYdefine additional levels of granularity at which Data Modelconstraints are enforced.
Status: this requirement has not beenmet.
The XQuery Update FacilitySHOULD define the means by whichoperations can be isolated from concurrent operations.
The XQuery Update Facility defines operationspurely in terms of the XML Data Model. Propagation of XDM changesto an underlying persistent store or other software system isbeyond the scope of this specification. This includesisolation.
The XQuery Update FacilityMUSTdefine a means to control the durability of atomic operations andatomic execution units.
The XQuery Update Facility defines operationspurely in terms of the XML Data Model. Propagation of XDM changesto an underlying persistent store or other software system isbeyond the scope of this specification. This includesdurability.