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

Re: Nested type definitions.

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 30 Oct 2000 10:10:26 +0000
To: "Jason Diamond" <jason@injektilo.org>
Cc: <xmlschema-dev@w3.org>
Message-ID: <f5bbsw24p2l.fsf@cogsci.ed.ac.uk>
"Jason Diamond" <jason@injektilo.org> writes:

> Do nested type definitions such as
> 
> <xs:element name="foo">
>  <xs:complexType>
>   <xs:attribute ...>...</xs:attribute>
>  </xs:complexType>
> </xs:element>
> 
> get added to the schema's {type definitions} property? Obviously, the lack
> of a name makes it a bit difficult to resolve but what if it did have a
> name?

There's some flexibility here.  I interpret the WG's decision as
reflected in the WD as saying they're there, but only in the sense
that they're within other named things, in this case the 'foo' element
declaration.

> <xs:element name="foo">
>  <xs:complexType name="bar">
>   <xs:attribute ...>...</xs:attribute>
>  </xs:complexType>
> </xs:element>
> 
> Is that legal or are nested type definitions required to be anonymous and
> thus unsuitable for inclusion in {type definitions}?

Nested type def'ns must be anonymous.

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 Monday, 30 October 2000 05:10:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:47 UTC