W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2009

Re: Extending "choice" model group in a xsd schema

From: Kevin Braun <kbraun@obj-sys.com>
Date: Wed, 30 Dec 2009 10:18:59 -0500
Message-ID: <4B3B6F63.9070500@obj-sys.com>
To: Jaikiran Pai <jai_forums2005@yahoo.co.in>
CC: xmlschema-dev@w3.org
On 12/28/2009 9:28 AM, Jaikiran Pai wrote:
> (red | blue)* (dark-red | dark-blue)*

What you actually have is:
  (red | blue)+ (dark-red | dark-blue)+

Your choice groups don't have minOccurs=0. 

If you are after (red | blue | dark-red | dark-blue)+, you aren't going 
to achieve it the way you are going.  Walmsley suggests using 
substitution groups to extend choice groups (see 19.5.2 Extensions for 
Choice Groups, in Definitive XML Schema).  You might take a look at that 
approach and see if it meets your needs.

-- 
Kevin Braun
Objective Systems, Inc.
REAL WORLD ASN.1 AND XML SOLUTIONS
Tel: +1 (484) 875-9841
Fax: +1 (484) 875-9830
Toll-free: (877) 307-6855 (USA only)
http://www.obj-sys.com
Received on Wednesday, 30 December 2009 15:21:50 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:17 UTC