W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2009

Re: emptiable content in particle inheritance

From: Tobias Koenig <tobias.koenig@trolltech.com>
Date: Tue, 3 Feb 2009 10:56:20 +0100
To: xmlschema-dev@w3.org
Message-Id: <200902031056.20811.tobias.koenig@trolltech.com>

On Monday 02 February 2009 21:47:25 Pete Cordell wrote:
Hej,

> Isn't there something about "if an element has a maxOccurs = 0, then it is 
> nothing at all", i.e. it does not exist.  If so, the second schema becomes:
> 
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <xsd:element name="doc" type="foo"/>
> <xsd:complexType name="foo">
>   <xsd:choice>
>     <xsd:element name="e2"/>
>   </xsd:choice>
> </xsd:complexType>
> </xsd:schema>
> 
> which requires an e2 child does it not?
Ok, that was the rule I missed :)
Thanks to everyone who gave some insight on that topic!

Ciao,
Tobias
Received on Tuesday, 3 February 2009 09:57:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:15:10 GMT