W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2004

Re: Type definition for empty element

From: Keith Suderman <suderman@cs.vassar.edu>
Date: Mon, 29 Nov 2004 16:24:43 -0500
To: xmlschema-dev@w3.org
Message-id: <5.1.1.6.0.20041129161354.021e3c88@pop.verizonemail.net>
At 06:35 PM 11/26/2004 +0800, Simon.Cox@csiro.au wrote:
><complexType name="typeA">
>    <attribute name="att1" type="string"/>
></complexType>
>
>or
...
><complexType name="typeA">
>    <complexContent>
>       <restriction base="anyType">
>          <sequence/>
>          <attribute name="att1" type="string"/>
>       </restriction>
>    </complexContent>
></complexType>

I can't find anything to back up this assertion, but I had always thought 
these two definitions were the "same", that is, they both define an empty 
element with an attribute.  At least I use the first definition in our 
schemas and it seems to behave as I want/expect.

Cheers,
Keith

--------------------------------------------------
Keith Suderman
American National Corpus
suderman@cs.vassar.edu
http://americannationalcorpus.org
Received on Monday, 29 November 2004 21:26:01 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 23:40:23 UTC