[FS] Non-wellformed XML Schema example, Section 2.3.5

I was testing the XML Schema import of our XQuery compiler on a number
of examples contained in the Formal Semantics Documents (Aug 22
Draft), when the import complained about a non-wellformed XML Schema
instance in Section 2.3.5:


  <complexType name="NYCAddress">
    <complexContent>
     <extension base="USAddress">
      <sequence>
       <element ref="apt"/>
      </sequence>
     </extension>
    </complexContent>
  </complexType>

  <element name="apt"/>
                    ^^^
    <xsd:simpleType>
     <xsd:restriction base="xsd:positiveInteger">
      <xsd:maxExclusive value="10000"/>
     </xsd:restriction>
    </xsd:simpleType>
  <element>
  ^^^

  <element name="usaddress" substitutionGroup="address" type="USAddress"/>
  <element name="nycaddress" substitutionGroup="usaddress" type="NYCAddress"/>


This probably needs to replaced by


  <complexType name="NYCAddress">
    <complexContent>
     <extension base="USAddress">
      <sequence>
       <element ref="apt"/>
      </sequence>
     </extension>
    </complexContent>
  </complexType>

  <element name="apt">
    <xsd:simpleType>
     <xsd:restriction base="xsd:positiveInteger">
      <xsd:maxExclusive value="10000"/>
     </xsd:restriction>
    </xsd:simpleType>
  </element>

  <element name="usaddress" substitutionGroup="address" type="USAddress"/>
  <element name="nycaddress" substitutionGroup="usaddress" type="NYCAddress"/>


Cheers,
   --Torsten

--
  | Dr. Torsten Grust                          Torsten.Grust@uni-konstanz.de |
  |                                   http://www.inf.uni-konstanz.de/~grust/ |
  | Database Research Group, University of Konstanz (Lake Constance/Germany) |
  |             (Please avoid sending me MS Word or PowerPoint attachments.) |

Received on Friday, 31 October 2003 04:46:11 UTC