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

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