W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2006

xs:choice and xs:sequence question

From: David Carver <d_a_carver@yahoo.com>
Date: Wed, 11 Jan 2006 10:37:35 -0500
Message-ID: <43C5263F.1090409@yahoo.com>
To: xmlschema-dev@w3.org

I have the following complexType coded:

   <xs:complexType name="ProcessingOutcomeMessage">
               <xs:element ref="DescriptionMessage" minOccurs="0" 
maxOccurs="unbounded" />
               <xs:element ref="MessageReasonCode" minOccurs="0" />
               <xs:element ref="DescriptionMessage" type="Description" 
minOccurs="1" maxOccurs="unbounded" />
               <xs:element ref="MessageReasonCode" 
type="MessageReasonCode" minOccurs="1" />
               <xs:element ref="ApplicationReasonCode" 
type="ApplicationReasonCode" minOccurs="1">
source="http://www.starstandard.org">Contains a software specific 
application reason code.</xs:documentation>

It validates fine if using Xerces J 2.7.0 or XSV 2.5.  However, 
Microsoft's XML, XML Spy 2006 SP2, and Oxygen complain about 
DescriptionMessage being defined twice, even though they are in seperate 
sequence groups.

What I want to do is require DescriptionMessage, MeassageReasonCode if 
there is an ApplicationReasonCode, if there isn't an 
ApplicationReasonCode, then DescriptionMessage and MessageReasonCode are 

Any help would be appreciated.


Received on Thursday, 12 January 2006 04:16:39 UTC

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