W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2005

[Bug 2318] SequenceType with occurrence in For/Some/Every expr doesn't make sense

From: <bugzilla@wiggum.w3.org>
Date: Thu, 29 Sep 2005 08:45:49 +0000
To: public-qt-comments@w3.org
Message-Id: <E1EKu33-0005JC-Ry@wiggum.w3.org>


chamberl@almaden.ibm.com changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

------- Additional Comments From chamberl@almaden.ibm.com  2005-09-29 08:45 -------
One of the most important principles of XQuery design is the orthogonality of 
the grammar. We define the basic parts of the grammar and use them consistently 
throughout the language--for example, the SequenceType production is used 
consistently wherever a type specification is needed.

As you have observed, a SequenceType is allowed to include an 
OccurrenceIndicator, which is not necessary when specifying a TypeDeclaration 
in a ForClause. However, if an OccurrenceIndicator is specified in this 
context, it is not harmful and its meaning is well-defined. For example, any 
variable binding that satisfies the SequenceType xs:integer also trivially 
satisfies the SequenceTypes xs:integer*, xs:integer+, and xs:integer?. I don't 
know any reason why a user would specify such a type in a ForClause, but I also 
don't know any reason to prohibit it. In general, we don't try to prevent users 
from writing expressions that are well-defined but useless.

On Sept. 28, 2005, the Query Working Group decided to close this comment 
without change to the XQuery specification. If you are satisfied with this 
resolution, please respond by closing this Bugzilla entry.

Thank you,
Don Chamberlin (on behalf of the Query Working Group)
Received on Thursday, 29 September 2005 08:46:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:08 UTC