Re: SimpleType as valid derivation of abstract type in 1.1 ?

Pete Cordell wrote:
> Does the following schema snippet not work for you?:
>
> <xsd:complexType name="Obj">
>    <xsd:sequence>
>       <xsd:element ref="ObjId"/>
>    </xsd:sequence>
> </xsd:complexType>
>
> <xsd:complexType name="Car">
>    <xsd:complexContent>
>       <xsd:extension base="Obj">
>          <xsd:sequence>
>             ...
>          </xsd:sequence>
>       </xsd:extension>
>    </xsd:complexContent>
> </xsd:complexType>
>
Pete, this does not work for me unfortunately. What I'm trying to do is 
have an XSD that enforces abstract patterns such as "All objects have an 
Id, Info and Status elements", by defining an abstract Obj composed of 
ObjId, ObjInfo and ObjStatus, and have Car be a restriction on Obj, 
CarId be a restriction of CarId, etc. Part of this problem is that some 
concrete Id can be complex, while others can be simple. Last, I cannot 
change these requirements as I am trying to represent and enforce these 
abstract patterns in an industry XSD (IFX) that currently does not.

Guillaume

Received on Friday, 9 March 2007 13:18:52 UTC