<?xml 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 -->

<!-- Common attributes -->

<!-- All elements (except full-document elements) can have these attributes -->

<!ENTITY % all "
  id ID #IMPLIED
  class CDATA #IMPLIED
  title CDATA #IMPLIED">

<!-- All non-empty elements can have these attributes -->

<!ENTITY % i18n "
  xml:lang CDATA #IMPLIED
  dir (ltr|rtl) #IMPLIED">

<!ENTITY % basic "
  %all;
  %i18n;">

<!ENTITY % horiz.other "abbr|acronym|cite|code|dfn|em|img|kbd|q|samp
                        |span|strong|var">

<!-- Horizontal formatting elements -->

<!ENTITY % horiz "a|br|%horiz.other;">

<!-- Models -->

<!ENTITY % horiz.model "(#PCDATA|%horiz;)*">

<!ELEMENT abbr %horiz.model;>
<!ATTLIST abbr
  %basic;>

<!ELEMENT acronym %horiz.model;>
<!ATTLIST acronym
  %basic;>

<!ELEMENT cite %horiz.model;>
<!ATTLIST cite
  %basic;>

<!ELEMENT code %horiz.model;>
<!ATTLIST code
  %basic;>

<!ELEMENT dfn %horiz.model;>
<!ATTLIST dfn
  %basic;>

<!ELEMENT em %horiz.model;>
<!ATTLIST em
  %basic;>

<!ELEMENT img %horiz.model;>
<!ATTLIST img
  %basic;>

<!ELEMENT kbd %horiz.model;>
<!ATTLIST kbd
  %basic;>

<!ELEMENT q %horiz.model;>
<!ATTLIST q
  %basic;>

<!ELEMENT samp %horiz.model;>
<!ATTLIST samp
  %basic;>

<!ELEMENT span %horiz.model;>
<!ATTLIST span
  %basic;>

<!ELEMENT strong %horiz.model;>
<!ATTLIST strong
  %basic;>

<!ELEMENT var %horiz.model;>
<!ATTLIST var
  %basic;>

<!ENTITY % vert.other "address|blockquote|div|p|pre">

<!ENTITY % List "dl|ol|ul">

<!ENTITY % header "h1|h2|h3">

<!-- Vertical formatting elements -->

<!ENTITY % vert "%header;|%List;|table|%vert.other;">

<!ENTITY % vert.model "(#PCDATA|%horiz;|%vert;)*">

<!ELEMENT h1 %horiz.model;>
<!ATTLIST h1
  %basic;>

<!ELEMENT h2 %horiz.model;>
<!ATTLIST h2
  %basic;>

<!ELEMENT h3 %horiz.model;>
<!ATTLIST h3
  %basic;>

<!ELEMENT dl (dt|dd)+>
<!ATTLIST dl
  %basic;>

<!ELEMENT ol (li)+>
<!ATTLIST ol
  %basic;>

<!ELEMENT ul (li)+>
<!ATTLIST ul
  %basic;>

<!ELEMENT address %horiz.model;>
<!ATTLIST address
  %basic;>

<!ENTITY % struct.model "(%vert;)*">

<!ELEMENT blockquote (%struct.model;)>
<!ATTLIST blockquote
  cite CDATA #IMPLIED
  %basic;>

<!ELEMENT div (%struct.model;)>
<!ATTLIST div
  %basic;>

<!ELEMENT p %horiz.model;>
<!ATTLIST p
  %basic;>

<!ELEMENT pre %horiz.model;>
<!ATTLIST pre
  %basic;>

<!ELEMENT dt %horiz.model;>
<!ATTLIST dt
  %basic;>

<!ELEMENT dd %horiz.model;>
<!ATTLIST dd
  %basic;>

<!ELEMENT li %horiz.model;>
<!ATTLIST li
  %basic;>

<!ELEMENT a %horiz.model;>
<!ATTLIST a
  href CDATA #IMPLIED
  name CDATA #IMPLIED
  rel CDATA #IMPLIED
  rev CDATA #IMPLIED
  %basic;>

<!ELEMENT br EMPTY>
<!ATTLIST br
  %all;>

<!ENTITY % aligns "
  align (left|center|right|justified) #IMPLIED
  valign (top|middle|bottom|baseline) #IMPLIED">

<!ELEMENT table (caption?,tr+)>
<!ATTLIST table
  %basic;
  summary CDATA #IMPLIED>

<!ELEMENT caption %horiz.model;>
<!ATTLIST caption
  %basic;>

<!ENTITY % tabledata "th|td">

<!ELEMENT tr (%tabledata;)+>
<!ATTLIST tr
  %basic;
  %aligns;>

<!ELEMENT th %vert.model;>
<!ATTLIST th
  %aligns;
  abbr CDATA #IMPLIED
  axis CDATA #IMPLIED
  colspan CDATA #IMPLIED
  headers IDREFS #IMPLIED
  rowspan CDATA #IMPLIED
  scope (row|col|rowgroup|colgroup) #IMPLIED
  %basic;>

<!ELEMENT td %vert.model;>
<!ATTLIST td
  %aligns;
  abbr CDATA #IMPLIED
  axis CDATA #IMPLIED
  colspan CDATA #IMPLIED
  headers IDREFS #IMPLIED
  rowspan CDATA #IMPLIED
  scope (row|col|rowgroup|colgroup) #IMPLIED
  %basic;>

<!-- Support for complete HTML documents -->

<!ELEMENT html (head,body)>
<!ATTLIST html
  %i18n;
  xml:base CDATA #IMPLIED
  xml:space (preserve|default) #IMPLIED>

<!ELEMENT body (%vert;)*>
<!ATTLIST body
  %basic;>

<!ELEMENT head (title,meta*)>
<!ATTLIST head
  %i18n;>

<!ELEMENT title (#PCDATA)>
<!ATTLIST title
  %i18n;>

<!ELEMENT meta EMPTY>
<!ATTLIST meta
  name CDATA #IMPLIED
  http-equiv CDATA #IMPLIED
  content CDATA #REQUIRED>

<!-- END OF ibtwsh.rnx -->
