- From: <bugzilla@wiggum.w3.org>
- Date: Tue, 10 May 2005 23:20:08 +0000
- To: public-qt-comments@w3.org
- Cc:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=1287 jim.melton@acm.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME ------- Additional Comments From jim.melton@acm.org 2005-05-10 23:20 ------- In fact, the XQueryX schema as currently written does *NOT* allow more than one node in the place you cite. The relevant schema snippet (from your message) is: <xsd:element name="piTest"> <xsd:complexType> <xsd:choice minOccurs="0"> <xsd:element name="piTarget" type="xsd:NCName"/> <xsd:element name="piValue" type="xsd:string"/> </xsd:choice> </xsd:complexType> </xsd:element> I believe that your concern stems from the fact that the <xsd:choice> element has a minOccurs attribute, but no maxOccurs attribute. It is a common error to think that the absence of a maxOccurs attribute means "any number of occurrences". In fact, according to XML Schema, section 3.3.2, XML Representation of Element Declaration Schema Components (http://www.w3.org/TR/xmlschema-1/#declare-element), the default value for maxOccurs (when it is not specified) is 1. Therefore, we believe that this is not an error in the XQueryX specification. To avoid this sort of confusion in the future, we will add an explicit maxOccurs="1" attribute to such places (this harms nothing and has the advantage of making the Schema more nearly self-documenting).
Received on Tuesday, 10 May 2005 23:20:16 UTC