Re: abstract=true in a localElement

Hi Ajay,

> As per the test case particlesDa010 of
> http://www.w3.org/XML/2001/05/xmlschema-test-collection/result-ms-Particles.
> htm the following schema is expected to be correct. It passes both
> the Microsoft's and XERCES's tests.
>
> However Item 2, "3.3.4 Element Declaration Validation Rules" of
> Part1 and subsequent Comments in
> xmlschema-rec-comments#pfiElemValidType says that "element may not
> have {abstract} = true".
>
> So, is this schema invalid or am I missing something?

I think the schema is invalid. When an xs:element occurs within a
xs:sequence, it has the type 'localElement', which is defined in the
Schema for Schema as:

 <xs:complexType name="localElement">
  <xs:complexContent>
   <xs:restriction base="xs:element">
    <xs:sequence>
     <xs:element ref="xs:annotation" minOccurs="0"/>
     <xs:choice minOccurs="0">
      <xs:element name="simpleType" type="xs:localSimpleType"/>
      <xs:element name="complexType" type="xs:localComplexType"/>
     </xs:choice>
     <xs:group ref="xs:identityConstraint" minOccurs="0"
               maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="substitutionGroup" use="prohibited"/>
    <xs:attribute name="final" use="prohibited"/>
    <xs:attribute name="abstract" use="prohibited"/>
   </xs:restriction>
  </xs:complexContent>
 </xs:complexType>

As you can see, the abstract attribute is prohibited for element
declarations of this type.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Friday, 14 June 2002 06:12:21 UTC