Re: Schema error or validation bug ?

As far as I know, it's an error.  Extension is currently defined to (1) 
add attributes and/or (2) extend using sequences.  So, extension of all 
groups is not supported.  The pertinent restriction in the specification 
is [1], which says:

"[Definition:]  For a particle (call it E, for extension) to be a valid 
extension of another particle (call it B, for base) one of the following 
must be true:
1 They are the same particle. 
2 E's {min occurs}={max occurs}=1 and its {term} is a sequence group whose 
{particles}' first member is a particle all of whose properties, 
recursively, are identical to those of B, with the exception of 
{annotation} properties. "

Note that it calls for sequence groups.

[1] http://www.w3.org/TR/xmlschema-1/#cos-particle-extend 

------------------------------------------------------------------------
Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------------







Guillaume Rousse <rousse@ccr.jussieu.fr>
Sent by: xmlschema-dev-request@w3.org
08/29/01 12:53 PM

 
        To:     xmlschema-dev@w3.org
        cc:     (bcc: Noah Mendelsohn/CAM/Lotus)
        Subject:        Schema error or validation bug ?


The following construct make xerces complains:
<complexType name="fooType">
  <complexContent>
    <extension base="model:barType">
      <all>
        <element name="elmt1" type="string"/>
      </all>
    </extension>
  </complexContent>
</complexType>

<complexType name="barType">
  <complexContent>
    <extension base="model:fooType">
      <all>
        <element name="elmt2" type="string"/>
        <element name="elmt3" type="string"/>
      </all>
    </extension>
  </complexContent>
</complexType>

[Error] file.xml:6:4: Schema error: ComplexType 'barType': 
cos-all-limited.1.2:  An "all" model group that is part of a complex type 
definition must constitute the entire {content type} of the definition.

Does it means inheriting type with unordered elements is illegal, or is it 
a 
xerces bug ?
-- 
Guillaume Rousse <rousse@ccr.jussieu.fr>
GPG key http://bohm.snv.jussieu.fr/~rousse/gpgkey.html

Received on Wednesday, 29 August 2001 15:32:02 UTC