Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Re: SimpleType as valid derivation of abstract type in 1.1 ? [Thread Next] Re: SimpleType as valid derivation of abstract type in 1.1 ?To: Pete Cordell <petexmldev@--------------.---> Date: 3/9/2007 3:19:00 AM 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 From petexmldev@t... Fri Mar 09 17:57:15 2007 Rec | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
