W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2005

Feature Request: Some but not empty

From: Alex Milowski <alex@milowski.com>
Date: Tue, 22 Feb 2005 09:00:31 -0800
Message-Id: <484b25f365e9e63481e3d62a0812ce23@milowski.com>
To: www-xml-schema-comments@w3.org

Many times I have the requirement for:

    * some of these elements
    * in any order
    * but not empty

An all group with optional elements doesn't quite do it because I don't
want it to be empty.  I also don't want any of the elements repeated
more than their occurrence allows.

For example, something like:

   <xs:element name="some">
   <xs:complexType>
   <xs:some>
   <xs:element ref="A"/>
   <xs:element ref="B"/>
   <xs:element ref="C"/>
   </xs:some>
   </xs:complexType>
   </xs:element>

which would make:

   <some><A/></some>
   <some><B/><A/><C/></some>
   <some><C/></some>

all valid.  But:

   <some/>

would not be valid.

-- Alex Milowski  

"The excellence of grammar as a guide is proportional to the paucity of 
the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics
Received on Tuesday, 22 February 2005 17:00:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 23 October 2007 06:13:36 GMT