<?xml version="1.0" encoding="UTF-8"?>
<!--
  ibtwsh.dtd
  This is the Itsy Bitsy Teeny Weeny Simple Hypertext DTD.
  Its public identifier is -//XML-DEV List//DTD IBTWSH 6.0//EN
  The contents are dedicated to the public domain by
  	the author, John Cowan <cowan@ccil.org>, except that
  	John Cowan retains the moral right to be known as the author.
  This is draft 6.2
  Diff from 6.1: rel|rel now rel|rev, th|td@headers now IDREFS,
  	table width no longer an integer, non-basic table attrs gone,
  	rowspan and colspan must be non-negative
  Diff from 6.0: added attributes to ul, comment about img, new meta
-->
<!--
  This is a RELAX NG schema which describes a subset of XHTML Basic for
  use within other schemas.  It is by intention equivalent
  (within its scope) to -//W3C//DTD XHTML 1.1//EN, but is
  not a derived work in the copyright sense.
-->
<!--
  It is often convenient for XML documents to have a bit of
  documentation somewhere in them.  In the absence of a schema like
  this one, that documentation winds up being <text/> only, which is
  a pity, because rich text adds measurably to the readability of
  documents.  By incorporating this schema by reference (as an
  external parameter entity) into another schema, that schema inherits
  the capabilities of this one.  Using HTML-compatible elements
  and attributes allows the documentation to be passed straight
  through to HTML renderers.
-->
<!--
  Current HTML renderers can cope with most XML tags, but empty
  tags require special treatment.  Inserting a space before the
  terminating "/>" usually makes the "/" (which is not HTML)
  invisible.  Using "<tag></tag>" is not as effective, as the
  latter is often misinterpreted as a second "<tag>".
-->
<!--
  Note that since the elements of this schema are intended to be
  used within domain-specific elements of the surrounding DTD,
  it is not necessary that every fragment begin with an "html"
  element, as in HTML.  Recommended <define>s for elements
  containing documentation are "horiz.model" for simple
  text fragments and "struct.model" for documents in extenso.
-->
<!-- Declarations -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
  <!-- Common attributes -->
  <!-- All elements (except full-document elements) can have these attributes -->
  <xs:attributeGroup name="all">
    <xs:attribute name="id" type="xs:ID"/>
    <xs:attribute name="class" type="xs:token"/>
    <xs:attribute name="title"/>
  </xs:attributeGroup>
  <!-- All non-empty elements can have these attributes -->
  <xs:attributeGroup name="i18n">
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="dir">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="ltr"/>
          <xs:enumeration value="rtl"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:attributeGroup name="basic">
    <xs:attributeGroup ref="all"/>
    <xs:attributeGroup ref="i18n"/>
  </xs:attributeGroup>
  <!-- Models -->
  <xs:group name="horiz.model">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="horiz"/>
    </xs:sequence>
  </xs:group>
  <xs:attributeGroup name="horiz.model">
    <xs:attributeGroup ref="basic"/>
  </xs:attributeGroup>
  <xs:complexType name="vert.model" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:group ref="horiz.model"/>
      <xs:element ref="vert"/>
    </xs:choice>
    <xs:attributeGroup ref="horiz.model"/>
  </xs:complexType>
  <xs:complexType name="struct.model">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="vert"/>
    </xs:sequence>
    <xs:attributeGroup ref="basic"/>
  </xs:complexType>
  <!-- Horizontal formatting elements -->
  <xs:element name="horiz" abstract="true"/>
  <xs:element name="a" substitutionGroup="horiz">
    <xs:complexType mixed="true">
      <xs:group ref="horiz.model"/>
      <xs:attribute name="href" type="xs:anyURI"/>
      <xs:attribute name="name"/>
      <xs:attribute name="rel" type="xs:anyURI"/>
      <xs:attribute name="rev" type="xs:anyURI"/>
      <xs:attributeGroup ref="horiz.model"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="br" substitutionGroup="horiz">
    <xs:complexType>
      <xs:attributeGroup ref="all"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="horiz.other" abstract="true" substitutionGroup="horiz">
    <xs:complexType mixed="true">
      <xs:group ref="horiz.model"/>
      <xs:attributeGroup ref="horiz.model"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="abbr" substitutionGroup="horiz.other"/>
  <xs:element name="acronym" substitutionGroup="horiz.other"/>
  <xs:element name="cite" substitutionGroup="horiz.other"/>
  <xs:element name="code" substitutionGroup="horiz.other"/>
  <xs:element name="dfn" substitutionGroup="horiz.other"/>
  <xs:element name="em" substitutionGroup="horiz.other"/>
  <xs:element name="img" substitutionGroup="horiz.other"/>
  <xs:element name="kbd" substitutionGroup="horiz.other"/>
  <xs:element name="q" substitutionGroup="horiz.other"/>
  <xs:element name="samp" substitutionGroup="horiz.other"/>
  <xs:element name="span" substitutionGroup="horiz.other"/>
  <xs:element name="strong" substitutionGroup="horiz.other"/>
  <xs:element name="var" substitutionGroup="horiz.other"/>
  <!-- Vertical formatting elements -->
  <xs:element name="vert" abstract="true"/>
  <xs:element name="header" abstract="true" substitutionGroup="vert">
    <xs:complexType mixed="true">
      <xs:group ref="horiz.model"/>
      <xs:attributeGroup ref="horiz.model"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="h1" substitutionGroup="header"/>
  <xs:element name="h2" substitutionGroup="header"/>
  <xs:element name="h3" substitutionGroup="header"/>
  <xs:element name="List" abstract="true" substitutionGroup="vert"/>
  <xs:element name="dl" substitutionGroup="List">
    <xs:complexType>
      <xs:choice maxOccurs="unbounded">
        <xs:element ref="dt"/>
        <xs:element ref="dd"/>
      </xs:choice>
      <xs:attributeGroup ref="basic"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="dt">
    <xs:complexType mixed="true">
      <xs:group ref="horiz.model"/>
      <xs:attributeGroup ref="horiz.model"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="dd">
    <xs:complexType mixed="true">
      <xs:group ref="horiz.model"/>
      <xs:attributeGroup ref="horiz.model"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="ol" substitutionGroup="List">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="li"/>
      </xs:sequence>
      <xs:attributeGroup ref="basic"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="li">
    <xs:complexType mixed="true">
      <xs:group ref="horiz.model"/>
      <xs:attributeGroup ref="horiz.model"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="ul" substitutionGroup="List">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="li"/>
      </xs:sequence>
      <xs:attributeGroup ref="basic"/>
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="aligns">
    <xs:attribute name="align">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="left"/>
          <xs:enumeration value="center"/>
          <xs:enumeration value="right"/>
          <xs:enumeration value="justified"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="valign">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="top"/>
          <xs:enumeration value="middle"/>
          <xs:enumeration value="bottom"/>
          <xs:enumeration value="baseline"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:element name="table" substitutionGroup="vert">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" ref="caption"/>
        <xs:element maxOccurs="unbounded" ref="tr"/>
      </xs:sequence>
      <xs:attributeGroup ref="basic"/>
      <xs:attribute name="summary"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="caption">
    <xs:complexType mixed="true">
      <xs:group ref="horiz.model"/>
      <xs:attributeGroup ref="horiz.model"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="tr">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="tabledata"/>
      </xs:sequence>
      <xs:attributeGroup ref="basic"/>
      <xs:attributeGroup ref="aligns"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="tabledata" abstract="true">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="vert.model">
          <xs:attributeGroup ref="aligns"/>
          <xs:attribute name="abbr"/>
          <xs:attribute name="axis"/>
          <xs:attribute name="colspan" type="xs:nonNegativeInteger"/>
          <xs:attribute name="headers" type="xs:IDREFS"/>
          <xs:attribute name="rowspan" type="xs:nonNegativeInteger"/>
          <xs:attribute name="scope">
            <xs:simpleType>
              <xs:restriction base="xs:token">
                <xs:enumeration value="row"/>
                <xs:enumeration value="col"/>
                <xs:enumeration value="rowgroup"/>
                <xs:enumeration value="colgroup"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="th" substitutionGroup="tabledata"/>
  <xs:element name="td" substitutionGroup="tabledata"/>
  <xs:element name="vert.other" abstract="true" substitutionGroup="vert"/>
  <xs:element name="address" substitutionGroup="vert.other">
    <xs:complexType mixed="true">
      <xs:group ref="horiz.model"/>
      <xs:attributeGroup ref="horiz.model"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="blockquote" substitutionGroup="vert.other">
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="struct.model">
          <xs:attribute name="cite" type="xs:anyURI"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="div" substitutionGroup="vert.other" type="struct.model"/>
  <xs:element name="p" substitutionGroup="vert.other">
    <xs:complexType mixed="true">
      <xs:group ref="horiz.model"/>
      <xs:attributeGroup ref="horiz.model"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="pre" substitutionGroup="vert.other">
    <xs:complexType mixed="true">
      <xs:group ref="horiz.model"/>
      <xs:attributeGroup ref="horiz.model"/>
    </xs:complexType>
  </xs:element>
  <!-- Support for complete HTML documents -->
  <xs:element name="html">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="head"/>
        <xs:element ref="body"/>
      </xs:sequence>
      <xs:attributeGroup ref="i18n"/>
      <xs:attribute ref="xml:base"/>
      <xs:attribute ref="xml:space"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="body">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="vert"/>
      </xs:sequence>
      <xs:attributeGroup ref="basic"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="head">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="title"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="meta"/>
      </xs:sequence>
      <xs:attributeGroup ref="i18n"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="title">
    <xs:complexType mixed="true">
      <xs:attributeGroup ref="i18n"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="meta">
    <xs:complexType>
      <xs:attribute name="name" type="xs:token"/>
      <xs:attribute name="http-equiv" type="xs:token"/>
      <xs:attribute name="content" use="required"/>
    </xs:complexType>
  </xs:element>
</xs:schema>
<!-- END OF ibtwsh.rnx -->
