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

restriction against base type (choice - elt)

From: Bharath Kumar Reddy T <bharathkr@huawei.com>
Date: Tue, 27 Jan 2009 11:03:44 +0530
To: xmlschema-dev@w3.org
Cc: ashutosh_p@huawei.com, ranjit@huawei.com
Message-id: <000601c98040$d27699a0$3a12120a@china.huawei.com>
According to specification the following schema is invalid since according
to the table in 
it is given that the case "choice (Derived particle) to element(Base
Particle) is Forbidden"
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="head"/>
<xs:element name="m1" substitutionGroup="head"/>
<xs:element name="m2" substitutionGroup="head"/>
<xs:complexType name="base">
  <xs:element ref="head"/>
<xs:complexType name="derived">
  <xs:restriction base="base">
             <xs:element ref="m1"/>
             <xs:element ref="m2"/>

Can anybody please tell me whether the above schema is valid or invalid
against the schema spec.
Thanks and Regards,
Received on Tuesday, 27 January 2009 05:34:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:50 UTC