OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] <xsd:sequence>: whats the advantage?

[ Lists Home | Date Index | Thread Index ]

Also,
1.   the items in xsd:all must have maxOccurs=1 (minOccurs may be 0 or 
1), while the items in xsd:sequence may have other values of both min- 
and maxOccurs. 
2.  Similarly, the all group's min- and maxOccurs are restricted 
compared to those of the sequence group.
3.  The items of an all group may only be element declarations, while 
sequence items can include other groups such as choice, all, sequence 
and wildcard.

A sequence can express a much more complex and flexible content model.

Jeff

Klotz, Leigh wrote:

>Do you mean why use xsd:sequence instead of xsd:all or xsd:any?
>There are some constraints that you can express (in XML Schema) in
>sequences that you can't express in the unordered lists, such as certain
>mixings of required and optional elements.   That's why the <title/>
>element of XHTML is required to be first under <head/> -- it's required,
>and the remaining elements are optional.  
>
>-----Original Message-----
>From: Baisak, Ranjan [mailto:ranjan_baisak@mentor.com] 
>Sent: Tuesday, May 03, 2005 2:24 AM
>To: xml-dev@lists.xml.org
>Subject: [xml-dev] <xsd:sequence>: whats the advantage?
>
>
>Is there any advantage of using <xsd:sequence> in schema except ordering
>of elements?
>
>regards,
>-Ranjan
>
>
>-----------------------------------------------------------------
>The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
>initiative of OASIS <http://www.oasis-open.org>
>
>The list archives are at http://lists.xml.org/archives/xml-dev/
>
>To subscribe or unsubscribe from this list use the subscription
>manager: <http://www.oasis-open.org/mlmanage/index.php>
>
>
>
>  
>





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS