W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2007

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

From: Guillaume Lebleu <gl@brixlogic.com>
Date: Fri, 09 Mar 2007 08:18:36 -0500
Message-ID: <45F15EAC.2050808@brixlogic.com>
To: Pete Cordell <petexmldev@tech-know-ware.com>
CC: xmlschema-dev@w3.org

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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:41 UTC