W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2000

Re: complexType names

From: Gino Basso <GBasso@ware2.com>
Date: Fri, 1 Dec 2000 11:40:14 -0500
Message-ID: <8022A77178C84548B49F5965D38776C805F36D@wopr.ware2.com>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
David Valera wrote:

> what about this:
>
> <xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema">
>   <xsd:element name="Cat" type="AnimalType"/>
>   <xsd:element name="Dog" type="AnimalType"/>

>   <xsd:complexType name="AnimalType">
>     <xsd:sequence>
>       <xsd:element name="height" .../>
>       <xsd:element name="weight" .../>
>     </xsd:sequence>
>   </xsd:complexType>
> ...
> </xsd:schema>
>
> I recall using a construction like this when I started with XML schema's.
> XMLSpy did validate, but I am not quite sure if it is allowed. I prefer
> using different XML schema's...

This is correct (as was Eric's last suggestion). And from what I understand
I don't think there's any requirement that a schema only describe one class
of document. Any global element for a schema may be used as the root element
of an instance document.

Gino Basso
Ware2 Software Corp.
Received on Friday, 1 December 2000 12:01:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:19 GMT