Structure for 'schema' element

I would like to comment on the schema element in XML Schema:

<!ELEMENT schema
  ((include | import | annotation)*,
   (simpleType | complexType | element | attribute | attributeGroup | 
group | notation),
   (annotation | simpleType | complexType | element | attribute | 
attributeGroup | group | notation)*)>

Note also that annotation is allowed inside all of the elements in 
schema, and that this is the ONLY element in which annotation is 
allowed more than once!

It is clear that this rather artificial structure was intended to be:

<!ELEMENT schema
  ((include | import | annotation)*,
   (annotation | simpleType | complexType | element | attribute | 
attributeGroup | group | notation)*)>

but this is non-deterministic.

It is also clear that the repeating groups are not ordered in the 
sense that the same schema can be defined with the elements in 
different orders, but with 'annotation' in there each 'annotation' 
element instance is, I suppose, associated with the item following 
(or preceding? who knows!).

Since annotation is clearly within each of the other items, I suggest 
a *much* better representation of the schema element would be:

<!ELEMENT schema
  ((annotation)?,
   (include | import)*,
   (simpleType | complexType | element | attribute | attributeGroup | 
group | notation)*)>

*Please* change it to make it consistent with all other elements!

Robin

-- -----------------------------------------------------------------
Robin La Fontaine, Monsell EDM Ltd
(R&D Project Management, Engineering Data Exchange using XML, EDIF)
Tel: +44 1684 592 144 Fax: +44 1684 594 504 or +44 870 054 2811
Email: robin@monsell.co.uk       http://www.monsell.co.uk

Received on Friday, 11 August 2000 11:19:48 UTC