Re: Some questions on specifying empty XML elements

Norman Walsh <ndw@nwalsh.com> writes:

> / Gino Basso <GBasso@ware2.com> was heard to say:
> | I'm trying to duplicate the following DTD in an XML schema:
> | 
> |     <!ELEMENT nothing EMPTY>
> 
> I think the way to do this is:
> 
> <xsd:complexType name='EmptyType'>
>   <xsd:complexContent>
>     <xsd:restriction base='xsd:anyType'/>
>   </xsd:complexContent>
> </xsd:complexType>

This works, but so do the two other forms that Gino offered:

>    <complexType name="EmptyType" />
>    <element name="nothing" type="EmptyType" />

>    <element name="nothing">
>        <complexType />
>    </element>

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/

Received on Thursday, 30 November 2000 07:15:36 UTC