- From: Henry S. Thompson <ht@inf.ed.ac.uk>
- Date: Tue, 02 Mar 2004 10:42:29 +0000
- To: public-qt-comments@w3.org
This comment pertains to the 12 November 2003 internal WD of XQuery 1.0: An XML Query Language [1]. Please accept our sincere apologies on being past-due with this submission, which discharges the promise made in [2]. Regards, Henry S. Thompson (on behalf of the XML Schema WG) ------------------------- There is what appears to us an inconsistency between section 3.13 Validate Expressions [1] (repeated in 3.7.1.5 Type of a Constructed Element) in XQuery itself and section 3.3 Construction from a PSVI [2] in the Data Model, based on the interpretation placed on the *validation mode*. The latter says: "The data model supports incompletely validated documents. Elements and attributes that are not valid are treated as having unknown types." The former says: "If the [validity] property of the topmost element information item in this PSVI is not valid, a type error is raised." In concrete terms this means that starting from e.g. a document + schema where the document element is not declared, but one or more of whose descendants are declared, not only can a data model be constructed, but also it will have useful type information for those elements, since they will be [validity]='valid' and "If the [validity] property exists and is "valid", the type of an element or attribute information item is represented by an expanded-QName . . ." In contrast having constructed such a document node in a query context, the result of validating it will either be a type error (if *validation mode* is 'strict' or 'lax') or a tree with uniformly untyped data (if *validation mode* is 'skip'). This change in the interpretation of 'lax' from the one it is defined to have in XML Schema not only will confuse users, it is inconsistent with the way Data Model instances are constructed from PSVIs, and also means that undeclared elements are treated differently if they are at the validation root ('lax' has the new meaning) or internal to it ('lax' means what XML Schema says it means). We would very much hope that the power and flexibilty reflected in the detailed reporting of schema validity assessment outcome be available no only at Data Model construction time, but also via the 'validate' expression, by bringing the treatment of 'lax' as a *validation mode* in to line with XML Schema and Data Model construction. [1] http://www.w3.org/TR/2003/WD-xquery-20031112/ [2] http://lists.w3.org/Archives/Public/public-qt-comments/2004Feb/1162.html -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Tuesday, 2 March 2004 05:43:04 UTC