<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/1999/xhtml">

  <xs:annotation>
    <xs:documentation>
      This is the XML Schema Basic Tables module for XHTML
     $Id: xhtml-basic-table-1.xsd 28982 2006-05-04 09:40:07 +0000 (Thu, 04 May 2006) radu_coravu $
    </xs:documentation>
    <xs:documentation source="xhtml-copyright-1.xsd"/>
  </xs:annotation>

  <xs:annotation>
    <xs:documentation>
      Basic Tables
    
        * table, caption, tr, th, td
    
      This table module declares elements and attributes defining
      a table model based fundamentally on features found in the
      widely-deployed HTML 3.2 table model.  While this module
      mimics the content model and table attributes of HTML 3.2
      tables, the element types declared herein also includes all
      HTML 4 common and most of the HTML 4 table attributes.
    </xs:documentation>
    <xs:documentation source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_simpletablemodule"/>
  </xs:annotation>

  <xs:attributeGroup name="CellHAlign.attrib">
    <xs:attribute name="align">
      <xs:simpleType>
        <xs:restriction base="xs:NMTOKEN">
          <xs:enumeration value="left"/>
          <xs:enumeration value="center"/>
          <xs:enumeration value="right"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>

  <xs:attributeGroup name="CellVAlign.attrib">
    <xs:attribute name="valign">
      <xs:simpleType>
        <xs:restriction base="xs:NMTOKEN">
          <xs:enumeration value="top"/>
          <xs:enumeration value="middle"/>
          <xs:enumeration value="bottom"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>

  <xs:attributeGroup name="scope.attrib">
    <xs:attribute name="scope">
      <xs:simpleType>
        <xs:restriction base="xs:NMTOKEN">
          <xs:enumeration value="row"/>
          <xs:enumeration value="col"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>

  <xs:attributeGroup name="table.attlist">
    <xs:attributeGroup ref="Common.attrib"/>
    <xs:attribute name="summary" type="Text"/>
  </xs:attributeGroup>

  <xs:group name="table.content">
    <xs:sequence>
      <xs:element ref="caption" minOccurs="0" maxOccurs="1"/>
      <xs:element ref="tr" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:group>

  <xs:complexType name="table.type">
    <xs:group ref="table.content"/>
    <xs:attributeGroup ref="table.attlist"/>
  </xs:complexType>
  
  <xs:element name="table" type="table.type"><xs:annotation><xs:documentation>The TABLE element defines a table. Inside a TABLE element there can be table headers, table rows, table cells.</xs:documentation></xs:annotation></xs:element>

  <xs:attributeGroup name="caption.attlist">
    <xs:attributeGroup ref="Common.attrib"/>
  </xs:attributeGroup>
  
  <xs:group name="caption.content">
     <xs:sequence>
        <xs:group ref="Inline.mix" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
  </xs:group>  
  

  <xs:complexType name="caption.type" mixed="true">
    <xs:group ref="caption.content"/>   
    <xs:attributeGroup ref="caption.attlist"/>
  </xs:complexType>

  <xs:element name="caption" type="caption.type"><xs:annotation><xs:documentation>The CAPTION element defines a table caption.</xs:documentation></xs:annotation></xs:element>

  <xs:attributeGroup name="tr.attlist">
    <xs:attributeGroup ref="Common.attrib"/>
    <xs:attributeGroup ref="CellHAlign.attrib"/>
    <xs:attributeGroup ref="CellVAlign.attrib"/>
  </xs:attributeGroup>

  <xs:group name="tr.content">
    <xs:sequence>
      <xs:choice maxOccurs="unbounded">
        <xs:element ref="th"/>
        <xs:element ref="td"/>
      </xs:choice>
    </xs:sequence>    
  </xs:group>

  <xs:complexType name="tr.type">
    <xs:group ref="tr.content"/>
    <xs:attributeGroup ref="tr.attlist"/>
  </xs:complexType>

  <xs:element name="tr" type="tr.type"><xs:annotation><xs:documentation>The TR elements acts as a container for a row of table cells.</xs:documentation></xs:annotation></xs:element>

  <xs:attributeGroup name="th.attlist">
    <xs:attributeGroup ref="Common.attrib"/>
    <xs:attribute name="abbr" type="Text"/>
    <xs:attribute name="axis" type="CDATA"/>
    <xs:attribute name="headers" type="xs:IDREFS"/>
    <xs:attributeGroup ref="scope.attrib"/>
    <xs:attribute name="rowspan" type="Number" default="1"/>
    <xs:attribute name="colspan" type="Number" default="1"/>
    <xs:attributeGroup ref="CellHAlign.attrib"/>
    <xs:attributeGroup ref="CellVAlign.attrib"/>
  </xs:attributeGroup>
  
  <xs:group name="th.content">
     <xs:sequence>
        <xs:group ref="FlowNoTable.mix" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
  </xs:group>    

  <xs:complexType name="th.type" mixed="true">
    <xs:group ref="th.content"/>   
    <xs:attributeGroup ref="th.attlist"/>
  </xs:complexType>

  <xs:element name="th" type="th.type"><xs:annotation><xs:documentation>The TH element defines a cell in a table that contains header information. User agents have two pieces of header information available: the contents of the TH element and the value of the abbr attribute.</xs:documentation></xs:annotation></xs:element>

  <xs:attributeGroup name="td.attlist">
    <xs:attributeGroup ref="Common.attrib"/>
    <xs:attribute name="abbr" type="Text"/>
    <xs:attribute name="axis" type="CDATA"/>
    <xs:attribute name="headers" type="xs:IDREFS"/>
    <xs:attributeGroup ref="scope.attrib"/>
    <xs:attribute name="rowspan" type="Number" default="1"/>
    <xs:attribute name="colspan" type="Number" default="1"/>
    <xs:attributeGroup ref="CellHAlign.attrib"/>
    <xs:attributeGroup ref="CellVAlign.attrib"/>
  </xs:attributeGroup>
  
  <xs:group name="td.content">
     <xs:sequence>
        <xs:group ref="FlowNoTable.mix" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
  </xs:group>  

  <xs:complexType name="td.type" mixed="true">
    <xs:group ref="td.content"/>   
    <xs:attributeGroup ref="td.attlist"/>
  </xs:complexType>

  <xs:element name="td" type="td.type"><xs:annotation><xs:documentation>The TD element defines a cell in a table that contains data.</xs:documentation></xs:annotation></xs:element>

</xs:schema>