Re: The minimum valid anonymous complex type declaration

> What's the minimum valid anonymous complex type declaration embedded
> in
> a valid element declaration?
>
> Is it like this:
>      <xs:element name="name1">
>          <xs:complexType/>
>      </xs:element>
> and what does it mean?

Yes, that should be the minimum anonymous type declaration enbedded in
an element declaration and the result will be an empty element with no
attributes.
The reason for this is that <complexType/> is shorthand for:

<complexType>
   <complexContent>
      <restriction base="anyType">
      </restriction>
   </complexContent>
</complexType>

So, this means we have a complexType that restricts the anyType and
since we don't declare any elements or attributes we get an empty
content model.

Cheers,
/Eddie

Received on Wednesday, 5 December 2001 17:28:36 UTC