<?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,v 1.2 2003/09/20 01:41:37 speruvem Exp $
    </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: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: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: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: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:schema>
