XHTML 1.0 in XML Schema: table definition

I was just giving the strict schema a quick look-over and noticed what
seems to be an error in the definition for <table>.  According to the
schema a <table> element can have <tr> children when it also has a
<thead> and/or <tfoot> child.  I could be wrong, but I thought that
<tbody> elements were required to wrap any <tr> elements when mixed with
<thead> or <tfoot>.  If I'm right in my logic, shouldn't the schema
definition be as follows:

  <xs:element name="table">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" ref="caption"/>
        <xs:choice>
          <xs:element minOccurs="0" maxOccurs="unbounded" ref="col"/>
          <xs:element minOccurs="0" maxOccurs="unbounded"
ref="colgroup"/>
        </xs:choice>
        <xs:choice>
          <xs:sequence>
            <xs:element minOccurs="0" ref="thead"/>
            <xs:element minOccurs="0" ref="tfoot"/>
            <xs:element maxOccurs="unbounded" ref="tbody"/>
          </xs:sequence>
          <xs:element maxOccurs="unbounded" ref="tr"/>
        </xs:choice>
      </xs:sequence>
      <xs:attributeGroup ref="attrs"/>
      <xs:attribute name="summary" type="Text"/>
      <xs:attribute name="width" type="Length"/>
      <xs:attribute name="border" type="Pixels"/>
      <xs:attribute name="frame" type="TFrame"/>
      <xs:attribute name="rules" type="TRules"/>
      <xs:attribute name="cellspacing" type="Length"/>
      <xs:attribute name="cellpadding" type="Length"/>
    </xs:complexType>
  </xs:element>


--
===========================
Richard E. Rathmann
TPMC Web Designer/Programmer
NOAA Coastal Services Center
2234 S Hobson Avenue
Charleston, SC  29405-2413
(843) 740-1314 (phone)
(843) 740-1315 (fax)
Richard.Rathmann@noaa.gov

Received on Wednesday, 11 September 2002 10:18:21 UTC