Thanks Pavani,
A followup question to my first one. How would I then construct a schema that
allows an element that is an enumeration with an attribute? I.e. An
enumeration OrderEvent with attribute OrderID?
/Peter
On Tuesday 23 April 2002 11:28, you wrote:
> Peter Tornberg wrote :
> > <element name="OrderEvent">
> > <complexType>
> > <simpleContent>
> > <restriction base="string">
> > <enumeration value="Accepted"/>
> > <enumeration value="Rejected"/>
> > <enumeration
> > value="ReceivedAwaitingClearing"/>
> > <enumeration
> > value="ReceivedAwaitingPayment"/>
> > <enumeration value="ChangeRequest"/>
> > <enumeration value="ChangeAccepted"/>
> > <enumeration value="ChangeDenied"/>
> > <enumeration value="Enquiry"/>
> > <enumeration value="Other"/>
> > <attribute
> > name="OrderID" type="base:LatinString40"
> > use="required"/>
> > </restriction>
> > </simpleContent>
> > </complexType>
> > </element>
>
> This is not valid according to the spec :
>
> [[
> Schema Component Constraint: Complex Type Definition Properties Correct
> All of the following must be true:
> 1 The values of the properties of a complex type definition
> must be as described in the property tableau in The Complex Type Definition
> Schema Component (�3.4.1), modulo the impact of Missing Sub-components
> (�5.3).
> 2 If the {base type definition} is a simple type definition,
> the {derivation method} must be extension.
> 3 ...
> ]]
>
> The second point says that simple type definitions should be derived by
> extension.
>
> HTH
> -Pavani
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]