- From: Arnold, Curt <Curt.Arnold@hyprotech.com>
- Date: Thu, 24 Jun 1999 15:06:16 -0600
- To: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
Some picky little items that I didn't see mentioned in other messages. 1. In this fragment of the schema, all the targets of the modelGroupRef's are defined as elementType's. <modelGroup name="unordered"> <choice> <modelGroupRef name="lexicalRepresentation"/> <modelGroupRef name="enumeration"/> <modelGroupRef name="length"/> <modelGroupRef name="maxLength"/> </choice> </modelGroup> Should it not be <modelGroup name="unordered"> <choice> <elementTypeRef name="lexicalRepresentation"/> <elementTypeRef name="enumeration"/> <elementTypeRef name="length"/> <elementTypeRef name="maxLength"/> </choice> </modelGroup> 2. In both the schema and DTD, you allow zero or more occurances of either the ordered or unordered groups. <!ELEMENT datatype (basetype, (%ordered; | %unordered;)*)> <choice minOccur="0" maxOccur="*"> <modelGroupRef name="ordered"/> <modelGroupRef name="unordered"/> </choice> This counteracts any other constraints that you try to add in any of the other groups. For example, it looks like, in the bounds group, you were trying to enforce that minInclusive appear before maxInclusive and to prohibit minInclusive being matched with a maxExclusive. <choice> <sequence> <elementTypeRef name="minInclusive" minOccur="0" maxOccur="1"/> <elementTypeRef name="maxInclusive" minOccur="0" maxOccur="1"/> </sequence> <sequence> <elementTypeRef name="minExclusive" minOccur="0" maxOccur="1"/> <elementTypeRef name="maxExclusive" minOccur="0" maxOccur="1"/> </sequence> </choice> With the schema and DTD, basically you have to have the basetype and then you can have any combination and any number of repetitions of any other element. I think that it would be much more beneficial to attempt to provide some restraint (for example, not specifying minInclusive and minExclusive) for the same data type and either only specifying ordered qualifiers or unordered qualifiers, even though that would enforce a more rigid sequence of elements. 3. Bounds group Wouldn't the previous sequence (assuming that you address the previous issue with the * on the (ordered | unordered) clause, be better as <sequence> <choice> <elementTypeRef name="minInclusive" minOccur="0" maxOccur="1"/> <elementTypeRef name="minExclusive" minOccur="0" maxOccur="1"/> </choice> <choice> <elementTypeRef name="maxInclusive" minOccur="0" maxOccur="1"/> <elementTypeRef name="maxExclusive" minOccur="0" maxOccur="1"/> </choice> </sequence> Which would enforce that min occurs before max and that you could mix and match a minInclusive with a maxExclusive. If desired I can email diagrams of the current schema and/or my pass at a tightened up schema and DTD.
Received on Thursday, 24 June 1999 17:07:59 UTC