Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: choice with a single choice

From: "Ralf Lammel" <Ralf.Lammel@---------.--->
To: "Florent Georges" <darkman_spam@-----.-->, <xmlschema-dev@--.--->
Date: 6/13/2006 6:41:00 PM
Since composites and element declarations do not live in the same =
`syntactic' category (in particular, the latter cannot occur directly =
under a complexType element whereas the former can), one has to make =
*some* "choice" -- be it choice or sequence. For some reason, people =
prefer the choice "sequence" rather than the choice "choice"; however =
semantically these two choices are identical as long as these =
compositors are used in their degenerated form, i.e., when there is only =
one child, as it is the case for the example at hand. In fact, there is =
a notion of "pointless" particles (composites), which however cannot be =
applied here exactly for the reason of XSD's mysterious distinction of =
expressions below complexType vs. expressions for content models in =
general ... EBNF makes my head hurt much less.

HTH,
Ralf Lammel


> -----Original Message-----
> From: xmlschema-dev-request@w... =
[mailto:xmlschema-dev-request@w...]
> On Behalf Of Florent Georges
> Sent: Wednesday, June 14, 2006 12:50 AM
> To: xmlschema-dev@w...
> Subject: xs:choice with a single choice
> 
> 
>   Hi
> 
>   I just saw the following complex type definition in the
> last XQTS (XQuery Test Suite 0.9.4) XQTSCatalog.xsd:
> 
>     <xs:complexType>
>       <xs:choice maxOccurs="unbounded">
>         <xs:element name="citation-spec" maxOccurs="unbounded">
>           <xs:complexType>
>             <xs:complexContent>
>               <xs:extension base="test:infoBase">
>                 <xs:sequence>
>                   <xs:element name="spec-URI" type="xs:anyURI"/>
>                 </xs:sequence>
>                 <xs:attribute name="name" use="required"
>                               type="test:citation-spec-enum"/>
>               </xs:extension>
>             </xs:complexContent>
>           </xs:complexType>
>         </xs:element>
>       </xs:choice>
>     </xs:complexType>
> 
>   I wonder if there is any reason to use a choice with a
> single element.  Any idea?
> 
>   Regards,
> 
> --drkm
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> En finir avec le spam? Yahoo! Mail vous offre la meilleure protection
> possible contre les messages non sollicit=E9s
> http://mail.yahoo.fr Yahoo! Mail


From darkman_spam@y... Wed Jun 14 11:22:26 2006
Received: from lisa.w3.org ([128.30.52.41])
	by frink.w3.org with esmtp (


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent