W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 1999

Notes on Structure document

From: Arnold, Curt <Curt.Arnold@hyprotech.com>
Date: Fri, 25 Jun 1999 18:42:20 -0600
Message-ID: <61DAD58E8F4ED211AC8400A0C9B468731AADDA@THOR>
To: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
1. attrDecl does not appear to be defined in the schema file but is defined
in the DTD

2. The inclusion of the ordered and unordered elements in the datatypeRef
pushes the ref into what I would have done as a new datatype.  You should be
allowed to specify a default value in the datatype (which does not appear in
the datatype document), but should be able to override it in the
datatypeRef.

3. Archetypes add very little that can't be done by an attrGroupRef and a
modelGroupRef.  I don't think they justify the complexity.

4. It may be desirable to allow an empty attributeGroup.  This would be
useful if you had previously defined an attributeGroup with some elements
and referenced it all over the place and then decided you didn't need that
element after all or if you want to add a placeholder for some anticipated
attributes.

5. attrDecl seems to be at odds with the naming in the rest of the document
where a definition has know suffix and a reference has a Ref prefix.  Was
there a good reason it wasn't just <attribute

6. It would be useful to define an attrGroup within the scope of an element.
Currently, these have to be declared at the top level of the document.  Was
the justification that you could translate these to entity definitions in a
DTD cleanly?

7. The definition of elementType differs between the schema and the DTD

<!ELEMENT elementType ( refines?,
                       ( datatypeRef | archetypeRef |
                        (%model; | modelGroupRef) )?,
                       (attrDecl | attrGroupRef)* ) >

  <elementType name="elementType">
    <refines> <archetypeRef name="component"/> </refines>
    <sequence> 
      <elementTypeRef name="refines"/> 
      <choice> 
        <elementTypeRef name="datatypeRef"/> 
        <elementTypeRef name="archetypeRef"/> 
        <modelGroupRef name="model"/> 
      </choice> 
      <elementTypeRef name="attrDecl"/> 
      <elementTypeRef name="attrGroupRef"/> 
    </sequence>
    <attrGroupRef name="model"/> 
  </elementType>

In the schema, you must have one attrDecl followed by one attrGroupRef.  In
the DCD, you can have zero or more of either.  To me, the DTD looks correct.
Though per the previous note, I would add attrGroup to the <choice>.

8. In the content models for import and include, the schema requires one
instance of the choice.  The DTD allows zero or more.  The DTD again looks
correct.  I think you are missing an minOccur="0" and a maxOccur="*" on the
choice element.

  <elementType name="import">
    <choice> 
      <elementTypeRef name="datatypeRef"/> 
      <elementTypeRef name="archetypeRef"/> 
      <elementTypeRef name="elementTypeRef"/> 
      <elementTypeRef name="attrGroupRef"/> 
      <elementTypeRef name="modelGroupRef"/> 
      <elementTypeRef name="entityRef"/> 
      <elementTypeRef name="notationRef"/> 
    </choice> 


<!ELEMENT import (( elementTypeRef | archetypeRef | datatypeRef 
                  | modelGroupRef | attrGroupRef | entityRef 
                  | notationRef )* ) >

9. What does the model attribute for the attrGroup element mean?

10. Should modelGroupRef's be allowed as content to the mixed tag.  Of
course, any order or occurance defined in the modelGroup would be lost?

11. Shoud a modelGroup be able to contain a modelGroup element (it currently
can contain a modelGroupRef).?
Received on Friday, 25 June 1999 20:44:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:46 GMT