Movatterモバイル変換


[0]ホーム

URL:


W3C

XQuery Update Facility 1.0Requirements

W3C Working GroupNote 25 January 2011

This version:
http://www.w3.org/TR/2011/NOTE-xquery-update-10-requirements-20110125/
Latest version:
http://www.w3.org/TR/xquery-update-10-requirements/
Previous version:
http://www.w3.org/TR/2008/CR-xquery-update-10-requirements-20080314/
Editors:
Don Chamberlin, IBM Almaden Research Center<chamberlin@almaden.ibm.com>
Jonathan Robie, Red Hat<jonathan.robie@redhat.com>

Copyright © 2011 W3C®(MIT,ERCIM,Keio), All Rights Reserved.W3Cliability,trademarkanddocumentuse rules apply.


Abstract

This document specifies goals and requirements for the XQueryUpdate Facility.

Status of this Document

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:

"Green" status

green status This indicates that the requirement, according toits original formulation, has been completely met. Optionalclarificatory text may follow.

"Yellow" status

yellow status 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.

"Red" status

red status 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.

Table of Contents

1Goals
2Usage Scenarios
3Requirements
    3.1Terminology
    3.2GeneralRequirements
    3.3Relationship toXQuery 1.0
    3.4XMLQuery Update Functionality
    3.5Transactioncharacteristics

Appendix

AReferences


1 Goals

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.

2 Usage Scenarios

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.

2.1 Updating persistent XML stores

Modify XML in persistent XML stores, including native XMLdatabases, XML files stored on a file system, or XML stored in SQLdatabases.

2.2 Modify XML messages

Modify XML messages to change status and add information createdwhile processing the message.

2.3 Add to existing XML document

Add new data to an existing XML document; for instance, add anew entry to a BLOG or a data log.

2.4 Updating XML registries

Perform updates on configuration files, user profiles, oradministrative logs represented in XML.

2.5 Creating edited copies

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.

2.6 Modifying XML views

Modifying XML views of non-XML sources, such as a[SQL/XML] view of a SQL database.

3 Requirements

3.1 Terminology

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:

MUST

This word means that the item is an absolute requirement.

SHOULD

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.

MAY

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.

3.2 General Requirements

3.2.1 Query Update Syntax

The syntax for updatesMAY havemore than one syntax binding. One syntaxMUST be convenient for humans to read andwrite.

green statusStatus: this requirement has beenmet.

One syntaxMUST be expressed inXML in a way that reflects the underlying structure of theoperations.

green statusStatus: this requirement has beenmet.

3.2.2 Declarativity

The XQuery Update FacilityMUSTbe declarative. Notably, itMUST beindependent of any particular evaluation strategy.

green statusStatus: this requirement has beenmet.

3.2.3 Protocol Independence

The XQuery Update FacilityMUSTbe defined independently of any protocols with which it isused.

green statusStatus: this requirement has beenmet.

3.2.4 Error Conditions

The XQuery Update FacilityMUSTdefine standard error conditions that can occur during theexecution of an update.

green statusStatus: this requirement has beenmet.

3.2.5 Static Type Checking

The XQuery Update FacilitySHOULD provide an optional static typechecking feature.

green statusStatus: this requirement has beenmet.

3.3 Relationship to XQuery1.0

3.3.1 Based on Data Model

The XQuery Update FacilityMUSTbe defined on the[XQuery 1.0 and XPath2.0 Data Model].

green statusStatus: 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.

3.3.2 Based on XQuery

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.

green statusStatus: this requirement has beenmet.

3.4 XML Query UpdateFunctionality

3.4.1 Locus of modifications

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.

green statusStatus: this requirement has beenmet.

3.4.2 Delete

The XQuery Update FacilityMUSTbe able to delete nodes.

green statusStatus: this requirement has beenmet.

3.4.3 Insert

The XQuery Update FacilityMUSTbe able to insert new nodes in specified positions.

green statusStatus: this requirement has beenmet.

3.4.4 Replace

The XQuery Update FacilityMUSTbe able to replace a node.

green statusStatus: this requirement has beenmet.

3.4.5 Changing values

The XQuery Update FacilityMUSTbe able to change the value returned by the typed-value accessorfor a node.

green statusStatus: this requirement has beenmet.

3.4.6 Modifying properties

The XQuery Update FacilitySHOULD be able to modify some of theproperties of a node such as the name, type, content, nilled,base-URI, etc.

green statusStatus: this requirement has been met.The base-URI can not be modified.

3.4.7 Moving nodes

The XQuery Update FacilityMAY beable to move a node from one location to another.

red statusStatus: 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.

3.4.8 Conditional updates

The XQuery Update FacilityMUSTbe able to do conditional updates.

green statusStatus: this requirement has beenmet.

3.4.9 Iterative updates

The XQuery Update FacilityMUSTbe able to iterate over nodes to do updates.

green statusStatus: this requirement has beenmet.

3.4.10 Validation

The XQuery Update FacilityMAYsupport an explicit XML Schema validation operation that preservesnode identity.

yellow status 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.

3.4.11 Compositionality

The XQuery Update FacilityMUSTbe able to compose update operators with other updateoperators.

green statusStatus: 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.

red statusStatus: this requirement has not been metUpdating expressions are limited to specific syntacticcontexts..

3.4.12 Parameterization

The XQuery Update FacilitySHOULD provide a means to parameterizeupdate operations.

green statusStatus: this requirement has been met.Updating functions and external variables may both be used toparameterize update operations.

3.5 Transactioncharacteristics

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].

3.5.1 Atomicity

The XQuery Update FacilityMUSTprovide a set of atomic operations, andMUST define a means to group atomicoperations into an atomic execution unit.

green statusStatus: this requirement has been met.Multiple atomic operations can be done in a single query, whichconstitutes the atomic execution unit.

3.5.2 Consistency

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.

green statusStatus: this requirement has beenmet.

The XQuery Update FacilityMAYdefine additional levels of granularity at which Data Modelconstraints are enforced.

red statusStatus: this requirement has not beenmet.

3.5.3 Isolation

The XQuery Update FacilitySHOULD define the means by whichoperations can be isolated from concurrent operations.

yellow status 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.

3.5.4 Durability

The XQuery Update FacilityMUSTdefine a means to control the durability of atomic operations andatomic execution units.

yellow status 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.

A References

TransactionProcessing Concepts and Techniques
Gray, J. and Reuter, A. 1994.Transaction ProcessingConcepts and Techniques. Morgan Kaufmann Publishers, SanMateo, CA
SQL/XML
International Organization for Standardization (ISO).ISO/IEC 9075-14:2008, Information Technology - DatabaseLanguages - SQL - Part 14, XML-Related Specifications(SQL/XML). (Available from American National StandardsInstitute, New York, NY 10036, (212) 642-4900.)
XQuery 1.0 and XPath 2.0 DataModel
XQuery1.0 and XPath 2.0 Data Model (XDM) (Second Edition),Norman Walsh, Mary Fernández, Ashok Malhotra,et. al.,Editors. World Wide Web Consortium, 14 December 2010. This versionis http://www.w3.org/TR/2010/REC-xpath-datamodel-20101214/. Thelatest versionis available at http://www.w3.org/TR/xpath-datamodel/.
XQuery1.0
XQuery 1.0: AnXML Query Language (Second Edition), Don Chamberlin,Anders Berglund, Scott Boag,et. al., Editors. World WideWeb Consortium, 14 December 2010. This version ishttp://www.w3.org/TR/2010/REC-xquery-20101214/. Thelatest version is available athttp://www.w3.org/TR/xquery/.

[8]ページ先頭

©2009-2025 Movatter.jp