W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2002

Should this schema be invalid?

From: Dare Obasanjo <dareo@microsoft.com>
Date: Wed, 31 Jul 2002 17:38:29 -0700
Message-ID: <8BD7226E07DDFF49AF5EF4030ACE0B7E06621E8B@red-msg-06.redmond.corp.microsoft.com>
To: <xmlschema-dev@w3.org>

Given the rules at http://www.w3.org/TR/xmlschema-1/#cos-particle-restrict it seems the following schema is invalid. Should it be?
 
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <xs:complexType name="Person" > 
       <xs:sequence> 
         <xs:element name="name" type="xs:string" /> 
         <xs:element name="age" type="xs:double" /> 
         <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"  /> 
       </xs:sequence> 
     </xs:complexType> 
  <xs:complexType name="WageSlave" > 
      <xs:complexContent> 
        <xs:restriction base="Person" > 
          <xs:sequence> 
            <xs:element name="name" type="xs:string" /> 
            <xs:element name="age" type="xs:double" /> 
            <xs:sequence> 
              <xs:element name="ssn" type="xs:string" /> 
              <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" /> 
            </xs:sequence> 
          </xs:sequence> 
        </xs:restriction> 
      </xs:complexContent> 
    </xs:complexType> 

</xs:schema>
Received on Wednesday, 31 July 2002 20:39:01 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:57 UTC