<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 elementFormDefault="qualified"
 xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"
>
    <xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" 
               schemaLocation="xhtml-datatypes-1.xsd" />
  <xs:annotation>
    <xs:documentation>
      This is the XML Schema Basic Tables module for XHTML
     $Id: xhtml-basic-table-1.xsd,v 1.1 2018/03/20 04:13:57 plehegar 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="xhtml.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="xhtml.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="xhtml.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="xhtml.table.attlist">
    <xs:attributeGroup ref="xhtml.Common.attrib"/>
    <xs:attribute name="summary" type="xh11d:Text"/>
  </xs:attributeGroup>

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

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

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

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

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

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

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

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

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

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

</xs:schema>
