Re: complexType names

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 UTC