Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Subclassing types in XSD Subclassing types in XSDTo: NULL Date: 9/3/2007 5:41:00 AM Hi, if I have defined a type in a schema, can I subclass it (refine it) without rewriting all of the type? E.g. I have: <xs:element name="Apple" type="xs:string"/> <xs:element name="Banana" type="xs:string"/> <xs:element name="Citrus" type="xs:string"/> <xs:complexType name="MyType"> <xs:sequence> <xs:element ref="Apple"/> <xs:element ref="Banana" minOccurs="0" maxOccurs="unbounded"/> <xs:element ref="Citrus"/> </xs:sequence> </xs:complexType> And I want a derived type (where the new thing is that there must be one or more Banana): <xs:complexType name="MyDerivedType"> <xs:sequence> <xs:element ref="Apple"/> <xs:element ref="Banana" maxOccurs="unbounded"/> <xs:element ref="Citrus"/> </xs:sequence> </xs:complexType> Can I do this without having to write Apple and Citrus in MyDerivedType? Thanks for any advice! | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
