<?xml version='1.0'?>
<!DOCTYPE schema SYSTEM "../structures/structures.dtd" >
<schema name='XHTML-strict' version='1.1'>
 <!-- Reconstruction of schema for XHTML from
      http://www.w3.org/TR/1999/xhtml1-19990505/DTD/strict.dtd -->

 <!-- Version 1.1, 1999-06-14 -->
 <!-- Changes from version 1.0:
      Make a number of archetypes 'refinable' which should have been, and
       remove 'refinable' from one ('realCell') which shouldn't;
      Fix 'dd' to have correct content model (inline -> flow)
      Fix content model for 'pre': add 'a' by hand, re-parent 'map' to
       get it included;
      Fix spelling of 'dfn' (was 'defn');
      Remove incorrect comments about mixed content merger;
      Note that content model for 'form' is WRONG in DTD (cf. HTML4-strict);
      Fix run-on error which combined definitions of 'input' and 'select';
      Fix various minor errors with definition of 'button' -->

 <!-- Datatype definitions courtesy of Paul V. Biron <Paul.V.Biron@kp.org> -->
 <!-- The datatype defns actually cover the transition dtd as well -->
 
 <!-- This version does NOT have many of the explanatory comments of the
      DTD, which means it really needs to be read in conjunction with
      the DTD, not independently.  -->

 <!-- Datatype definitions end at "END OF DATATYPES" -->

 <!-- <!ENTITY % ContentType "CDATA"> -->
 <!-- media type, as per [RFC2045] -->
 <!-- need aggregates to do this one correctly, use string for now -->
 <datatype name='ContentType'>
  <basetype name='string'/>
 </datatype>

 <!-- <!ENTITY % ContentTypes "CDATA"> -->
 <!-- comma-separated list of media types, as per [RFC2045] -->
 <!-- need aggregates to do this one correctly, use string for now -->
 <datatype name='ContentTypes'>
  <basetype name='string'/>
 </datatype>

 <!-- <!ENTITY % Charset "CDATA"> -->
 <!-- a character encoding, as per [RFC2045] -->
 <!-- this is things like: US-ASCII, ISO-8859-1, etc.  Question: is this
     a closed list?  If so, then we should do an enum.  However, I think
         it is actually an open list, which means, use string for now -->
 <datatype name='Charset'>
  <basetype name='string'/>
 </datatype>

 <!-- <!ENTITY % Charsets "CDATA"> -->
 <!-- a space separated list of character encodings, as per [RFC2045] -->
 <!-- need aggregates to do this one correctly, use string for now -->
 <datatype name='Charsets'>
  <basetype name='string'/>
 </datatype>

 <!-- <!ENTITY % LanguageCode "CDATA"> -->
 <!-- a language code, as per [RFC1766] -->
 <!-- we'll be adding a language type in the next draft, use string for now -->
 <datatype name='LanguageCode'>
  <basetype name='string'/>
 </datatype>

 <!-- <!ENTITY % Character "CDATA"> -->
 <!-- a single character from [ISO10646] -->
 <datatype name='Character'>
  <basetype name='string'/>
  <length>1</length>
 </datatype>

 <!-- <!ENTITY % Number "CDATA"> -->
 <!-- one or more digits -->
 <!-- use integer -->

 <!-- <!ENTITY % LinkTypes "CDATA"> -->
 <!-- space-separated list of link types -->
 <!-- use string for now, should be an enum once I can find
     the list of types to use -->
 <datatype name='LinkTypes'>
  <basetype name='string'/>
 </datatype>

 <!-- <!ENTITY % MediaDesc "CDATA"> -->
 <!-- single or comma-separated list of media descriptors -->
 <!-- use string for now, should be an enum once I can find
     the list of medias to use -->
 <datatype name='MediaDesc'>
  <basetype name='string'/>
 </datatype>


 <!-- <!ENTITY % URI "CDATA"> -->
 <!-- a Uniform Resource Identifier, see [RFC2396] -->
 <!-- use uri -->

 <!-- <!ENTITY % UriList "CDATA"> -->
 <!-- a space separated list of Uniform Resource Identifiers -->
 <!-- can't do this one, use string -->
 <datatype name='UriList'>
  <basetype name='string'/>
 </datatype>

 <!-- <!ENTITY % Datetime "CDATA"> -->
 <!-- date and time information. ISO date format -->
 <!-- use dateTime -->

 <!-- <!ENTITY % Script "CDATA"> -->
 <!-- script expression -->
 <!-- use string -->
 <datatype name='Script'>
  <basetype name='string'/>
 </datatype>

 <!-- <!ENTITY % StyleSheet "CDATA"> -->
 <!-- style sheet data -->
 <!-- use string -->
 <datatype name='StyleSheet'>
  <basetype name='string'/>
 </datatype>

 <!-- <!ENTITY % Text "CDATA"> -->
 <!-- used for titles etc. -->
 <!-- use stringor now -->
 <datatype name='Text'>
  <basetype name='string'/>
 </datatype>

 <!-- <!ENTITY % FrameTarget "CDATA"> -->
 <!-- render in this frame -->
 <!-- use string -->
 <datatype name='FrameTarget'>
  <basetype name='string'/>
 </datatype>

 <!-- <!ENTITY % Length "CDATA"> -->
 <!-- nn for pixels or nn% for percentage length -->
 <!-- should use positive integer, but the nn% form disallows
     that, must use string for now instead -->
 <datatype name='form'>
  <basetype name='string'/>
 </datatype>

 <!-- <!ENTITY % MultiLength "CDATA"> -->
 <!-- pixel, percentage, or relative -->
 <!-- should use positive integer, but the percentage/relative forms disallow
     that, must use string for now instead -->
 <datatype name='MultiLength'>
  <basetype name='string'/>
 </datatype>

 <!-- <!ENTITY % MultiLengths "CDATA"> -->
 <!-- comma-separated list of MultiLength -->
 <!-- need list-type aggregates to do this one correctly,
     use string for now instead -->
 <datatype name='MultiLengths'>
  <basetype name='string'/>
 </datatype>

 <!-- <!ENTITY % Pixels "CDATA"> -->
 <!-- integer representing length in pixels -->
 <!-- use integer -->
 <datatype name='Pixels'>
  <basetype name='integer'/>
 </datatype>

 <!-- these are used for image maps -->
 <!-- <!ENTITY % Shape "(rect|circle|poly|default)"> -->
 <datatype name='Shape'>
  <basetype name='string'/>
  <enumeration>
   <literal>rect</literal>
   <literal>circle</literal>
   <literal>poly</literal>
   <literal>default</literal>
  </enumeration>
 </datatype>

 <!-- <!ENTITY % Coords "CDATA"> -->
 <!-- comma separated list of lengths -->
 <!-- need list-type aggregates to do this one correctly,
     use string for now instead -->
 <datatype name='Coords'>
  <basetype name='string'/>
 </datatype>

 <!-- used for object, applet, img, input and iframe -->
 <!-- <!ENTITY % ImgAlign "(top|middle|bottom|left|right)"> -->
 <datatype name='ImgAlign'>
  <basetype name='stirng'/>
  <enumeration>
   <literal>top</literal>
   <literal>middle</literal>
   <literal>bottom</literal>
   <literal>left</literal>
   <literal>right</literal>
  </enumeration>
 </datatype>

 <!-- a color using sRGB: #RRGGBB as Hex values -->
 <!-- <!ENTITY % Color "CDATA"> -->

 <!-- There are also 16 widely known color names with their sRGB values:

    Black  = #000000    Green  = #008000
    Silver = #C0C0C0    Lime   = #00FF00
    Gray   = #808080    Olive  = #808000
    White  = #FFFFFF    Yellow = #FFFF00
    Maroon = #800000    Navy   = #000080
    Red    = #FF0000    Blue   = #0000FF
    Purple = #800080    Teal   = #008080
    Fuchsia= #FF00FF    Aqua   = #00FFFF
-->
 <!-- we're planning on a color dt in a future draft, use the follow for now -->
 <datatype name='Color'>
  <basetype name='string'/>
  <lexicalRepresentation>
   <lexical>#[0-9a-fA-F]{6}</lexical>
  </lexicalRepresentation>
 </datatype>

 <!-- this is used in the i18n entity -->
 <datatype name='TextDir'>
  <basetype name='string'/>
  <enumeration>
   <literal>ltr</literal>
   <literal>rtl</literal>
  </enumeration>
 </datatype>

 <!-- <!ENTITY % TextAlign "align (left|center|right) #IMPLIED"> -->
 <datatype name='TextAlign'>
  <basetype name='string'/>
  <enumeration>
   <literal>left</literal>
   <literal>center</literal>
   <literal>right</literal>
  </enumeration>
 </datatype>

 <!-- these are used in the frameset and iframe elements -->
 <datatype name='frameborder'>
  <basetype name='integer'/>
  <enumeration>
   <literal>0</literal>
   <literal>1</literal>
  </enumeration>
 </datatype>
 <!-- or, just make frameborder a boolean -->

 <datatype name='scrolling'>
  <basetype name='string'/>
  <enumeration>
   <literal>yes</literal>
   <literal>no</literal>
   <literal>auto</literal>
  </enumeration>
 </datatype>
 <datatype name='noresize'>
  <basetype name='string'/>
  <enumeration>
   <literal>noresize</literal>
  </enumeration>
 </datatype>
 <!-- or, just make noresize a boolean -->

 <!-- Unordered list bullet styles -->
 <!-- <!ENTITY % ULStyle "(disc|square|circle)"> -->
 <datatype name='ULStyle'>
  <basetype name='string'/>
  <enumeration>
   <literal>disc</literal>
   <literal>square</literal>
   <literal>circle</literal>
  </enumeration>
 </datatype>
 <datatype name='compact'>
  <basetype name='string'/>
  <enumeration>
   <literal>compact</literal>
  </enumeration>
 </datatype>
 <!-- or, just make compact a boolean -->

 <!-- these are used on the hr element -->
 <!-- use TextAlign for align -->
 <datatype name='noshade'>
  <basetype name='string'/>
  <enumeration>
   <literal>noshade</literal>
  </enumeration>
 </datatype>
 <!-- or, just make noshade a boolean -->

 <!-- this is used for the br element -->
 <datatype name='clear'>
  <basetype name='string'/>
  <enumeration>
   <literal>left</literal>
   <literal>all</literal>
   <literal>right</literal>
   <literal>none</literal>
  </enumeration>
 </datatype>

 <!-- this is used for the object element -->
 <datatype name='declare'>
  <basetype name='string'/>
  <enumeration>
   <literal>declare</literal>
  </enumeration>
 </datatype>
 <!-- or, just make declare a boolean -->

 <!-- this is used for the param element -->
 <datatype name='valuetype'>
  <basetype name='string'/>
  <enumeration>
   <literal>data</literal>
   <literal>ref</literal>
   <literal>object</literal>
  </enumeration>
 </datatype>

 <!-- this is used for the img element -->
 <datatype name='ismap'>
  <basetype name='string'/>
  <enumeration>
   <literal>ismap</literal>
  </enumeration>
 </datatype>
 <!-- or, just make ismap a boolean -->

 <!-- this is used for the area element -->
 <datatype name='nohref'>
  <basetype name='string'/>
  <enumeration>
   <literal>nohref</literal>
  </enumeration>
 </datatype>
 <!-- or, just make nohref a boolean -->

 <!-- this is used for the form element -->
 <datatype name='method'>
  <basetype name='string'/>
  <enumeration>
   <literal>get</literal>
   <literal>post</literal>
  </enumeration>
 </datatype>

 <!-- these are used for the input element -->
 <datatype name='checked'>
  <basetype name='string'/>
  <enumeration>
   <literal>checked</literal>
  </enumeration>
 </datatype>
 <!-- or, just make checked a boolean -->
 <datatype name='disabled'>
  <basetype name='string'/>
  <enumeration>
   <literal>disabled</literal>
  </enumeration>
 </datatype>
 <!-- or, just make disabled a boolean -->
 <datatype name='readonly'>
  <basetype name='string'/>
  <enumeration>
   <literal>readonly</literal>
  </enumeration>
 </datatype>
 <!-- or, just make readonly a boolean -->

 <!-- this is used for the select element -->
 <datatype name='multiple'>
  <basetype name='string'/>
  <enumeration>
   <literal>multiple</literal>
  </enumeration>
 </datatype>
 <!-- or, just make multiple a boolean -->

 <!-- this is used for the option element -->
 <datatype name='selected'>
  <basetype name='string'/>
  <enumeration>
   <literal>selected</literal>
  </enumeration>
 </datatype>
 <!-- or, just make selected a boolean -->

 <!-- this is used for the legend element -->
 <!-- <!ENTITY % LAlign "(top|bottom|left|right)"> -->
 <datatype name='LAlign'>
  <basetype name='string'/>
  <enumeration>
   <literal>top</literal>
   <literal>bottom</literal>
   <literal>left</literal>
   <literal>right</literal>
  </enumeration>
 </datatype>

 <!-- this is used for the button element -->
 <datatype name='button.type'>
  <basetype name='string'/>
  <enumeration>
   <literal>button</literal>
   <literal>submit</literal>
   <literal>reset</literal>
  </enumeration>
 </datatype>

 <!-- these are used for various table elements -->
 <!-- <!ENTITY % TAlign "(left|center|right)"> -->
 <!-- horizontal placement of table relative to document -->
 <datatype name='TAlign'>
  <basetype name='TextAlign'/>
 </datatype>

 <datatype name='cellalign'>
  <basetype name='string'/>
  <enumeration>
   <literal>left</literal>
   <literal>center</literal>
   <literal>right</literal>
   <literal>justify</literal>
   <literal>char</literal>
  </enumeration>
 </datatype>

 <datatype name='cellvalign'>
  <basetype name='string'/>
  <enumeration>
   <literal>top</literal>
   <literal>middle</literal>
   <literal>bottom</literal>
   <literal>baseline</literal>
  </enumeration>
 </datatype>

 <datatype name='CAlign'>
  <basetype name='string'/>
  <enumeration>
   <literal>top</literal>
   <literal>bottom</literal>
   <literal>left</literal>
   <literal>left</literal>
  </enumeration>
 </datatype>

 <!-- ******** END OF DATATYPES ****** -->

 <!-- Archetypes for abstract objects carrying attributes -->

 <archetype name='core' model='refinable'>
  <attrDecl name='id'>
   <datatypeRef name='ID'/>
  </attrDecl>
  <attrDecl name='class'/>
  <attrDecl name='style'>
   <datatypeRef name='StyleSheet'/>
  </attrDecl>
  <attrDecl name='title'>
   <datatypeRef name='Text'/>
  </attrDecl>
 </archetype>

 <archetype name='i18n' model='refinable'>
  <attrDecl name='lang'>
   <datatypeRef name='LanguageCode'/>
  </attrDecl>
  <attrDecl name='xml:lang'>  <!-- Bogus!?! -->
   <datatypeRef name='LanguageCode'/>
  </attrDecl>
  <attrDecl name='dir'>
   <datatypeRef name='NMTOKEN'>
    <enumeration>
     <literal>ltr</literal>
     <literal>rtl</literal>
    </enumeration>
   </datatypeRef>
  </attrDecl>
 </archetype>
 
 <archetype name='alive' model='refinable'>
  <attrDecl name='onclick'>
   <datatypeRef name='Script'/>
  </attrDecl>
  <attrDecl name='ondblclick'>
   <datatypeRef name='Script'/>
  </attrDecl>
  <attrDecl name='onmousedown'>
   <datatypeRef name='Script'/>
  </attrDecl>
  <attrDecl name='onmouseup'>
   <datatypeRef name='Script'/>
  </attrDecl>
  <attrDecl name='onmouseover'>
   <datatypeRef name='Script'/>
  </attrDecl>
  <attrDecl name='onmousemove'>
   <datatypeRef name='Script'/>
  </attrDecl>
  <attrDecl name='onmouseout'>
   <datatypeRef name='Script'/>
  </attrDecl>
  <attrDecl name='onkeypress'>
   <datatypeRef name='Script'/>
  </attrDecl>
  <attrDecl name='onkeydown'>
   <datatypeRef name='Script'/>
  </attrDecl>
  <attrDecl name='onkeyup'>
   <datatypeRef name='Script'/>
  </attrDecl>
 </archetype>

 <archetype name='focusable' model='refinable'>
  <attrDecl name='accesskey'>
   <datatypeRef name='Character'/>
  </attrDecl>
  <attrDecl name='tabindex'>
   <datatypeRef name='Number'/>
  </attrDecl>
  <attrDecl name='onfocus'>
   <datatypeRef name='Script'/>
  </attrDecl>
  <attrDecl name='onblur'>
   <datatypeRef name='Script'/>
  </attrDecl>
 </archetype>
 
 <archetype name='linking' model='refinable'>
  <attrDecl name='charset'>
   <datatypeRef name='Charset'/>
  </attrDecl>
  <attrDecl name='href'>
   <datatypeRef name='uri'/>
  </attrDecl>
  <attrDecl name='hreflang'>
   <datatypeRef name='LanguageCode'/>
  </attrDecl>
  <attrDecl name='type'>
   <datatypeRef name='ContentType'/>
  </attrDecl>
  <attrDecl name='rel'>
   <datatypeRef name='LinkTypes'/>
  </attrDecl>
  <attrDecl name='rev'>
   <datatypeRef name='LinkTypes'/>
  </attrDecl>
 </archetype>
 
 <archetype name='common' model='refinable'>
  <refines>
   <archetypeRef name='core'/>
   <archetypeRef name='i18n'/>
   <archetypeRef name='alive'/>
  </refines>
 </archetype>
 
 <!-- Abstract element-types for elements which co-occur -->
 
 <!-- The two different diagnostics for the structure of the archetype
      lattice don't always coincide.  This version of the lattice is based
      on primarily on the co-occurence diagnostic (things in the same
      disjunction) and only secondarily on the similar structure
      (attributes and content model) diagnostic. -->

 <!-- The next two are the basic alternative for inclusion in a
      content model within a *ed disjunction -->

 <elementType name='inline' model='refinable'/>

 <elementType name='block' model='refinable'/>

<!-- 'inline' is made up of 'inlineDisplay' and 'mixedDisplay' -->

 <elementType name='inlineDisplay' model='refinable'>
  <refines>
   <archetypeRef name='inline'/>
  </refines>
 </elementType>

 <elementType name='localInlineDisplay' model='refinable'>
  <refines>
   <archetypeRef name='inlineDisplay'/>
  </refines>
 </elementType>

<!-- 'block' is made up of 'blockDisplay' and 'mixedDisplay' -->

 <elementType name='blockDisplay' model='refinable'>
  <refines>
   <archetypeRef name='block'/>
  </refines>
 </elementType>

 <!-- XHTML called this 'misc' -->
 <elementType name='mixedDisplay' model='refinable'>
  <refines>
   <archetypeRef name='inline'/>
   <archetypeRef name='block'/>
  </refines>
 </elementType>
 
 <!-- For reasons which will become clear below, we provide a separate
      shared type for 'del' and 'ins', which do NOT refine mixedDisplay,
      and a separate archetype for their special attributes -->
 
 <elementType name='correction' model='refinable'>
  <refines>
   <archetypeRef name='flowStructure'/>
   <archetypeRef name='attribution'/>
  </refines>
 </elementType>
 
 <archetype name='attribution' model='refinable'>
  <attrDecl name='cite'>
   <datatypeRef name='uri'/>
  </attrDecl>
  <attrDecl name='datetime'>
   <datatypeRef name='Datetime'/>
  </attrDecl>
 </archetype>

 <!-- This abstract archetype gives a common structure for many
      element types.
      Note this captures a generalisation that the parameter entities
      in the DTD can't, and named model groups and attributes wouldn't,
      namely that things with Inline content all have the 'common'
      attributes -->

 <archetype name='inlineStructure' model='refinable'>
  <refines>
   <archetypeRef name='common'/>  <!-- One exception, bdo, q.v. -->
  </refines>
  <mixed>
   <elementTypeRef name='inline'/>
   <!-- Our first local element type defns!  Implement the restriction
        signalled as desireable in the comment from the DTD, namely
        ins and del in inline contexts should contain only inline elts.
        These definitions intentionally shadow the top-level definitions.
        Note we'd LIKE to have a model group for these two, because we'll
        need them several more times, but that's not possible as we're
        one level too far down in the content model structure. -->
   <elementType name='ins'>
    <refines>
     <archetypeRef name='inlineStructure'/>
     <archetypeRef name='attribution'/>
    </refines>
   </elementType>
   <elementType name='del'>
    <refines>
     <archetypeRef name='inlineStructure'/>
     <archetypeRef name='attribution'/>
    </refines>
   </elementType>
  </mixed>
 </archetype>

<!-- Now the sub-types of 'inlineDisplay' -->

 <elementType name='special' model='refinable'>
  <refines>
   <archetypeRef name='core'/>
   <archetypeRef name='localInlineDisplay'/>
  </refines>
 </elementType>

 <!-- the sub-set of special which has no graphic impact, used in pre -->
 <elementType name='specialNonGraphic' model='refinable'>
  <refines>
   <archetypeRef name='special'/>
  </refines>
 </elementType>

 <elementType name='fontstyle' model='refinable'>
  <refines>
   <archetypeRef name='inlineStructure'/>
   <archetypeRef name='localInlineDisplay'/>
  </refines>
 </elementType>
 
 <!-- the sub-set of fontstyle which has no graphic impact, used in pre -->
 <elementType name='fontstyleNonGraphic' model='refinable'>
  <refines>
   <archetypeRef name='fontstyle'/>
  </refines>
 </elementType>

 <elementType name='phrase' model='refinable'>
  <refines>
   <archetypeRef name='inlineStructure'/>
   <archetypeRef name='localInlineDisplay'/>
  </refines>
 </elementType>
  
 <elementType name='inline.forms' model='refinable'>
  <refines>
   <archetypeRef name='common'/>
   <archetypeRef name='inlineDisplay'/>
  </refines>
 </elementType>

 <!-- Next sub-types of 'blockDisplay' -->
 
 <!-- Note 'blocktext' in the DTD doesn't actually seem to do any work,
      but the following, which also includes p, heading, div, lists
      and table, does -->
 <elementType name='simpleBlockDisplay' model='refinable'>
  <refines>
   <archetypeRef name='blockDisplay'/>
  </refines>
 </elementType>

 <elementType name='heading' model='refinable'>
  <refines>
   <archetypeRef name='inlineStructure'/>
   <archetypeRef name='simpleBlockDisplay'/>
  </refines>
 </elementType>
  
 <elementType name='list' model='refinable'>
  <refines>
   <archetypeRef name='simpleBlockDisplay'/>
  </refines>
 </elementType>

 <elementType name='singleItemList' model='refinable'>
  <refines>
   <archetypeRef name='list'/>
  </refines>
  <elementTypeRef name='li' minOccur='1' maxOccur='*'/>
 </elementType>

 <!-- For element types with block for content.  Again note that
      we capture the co-occurence of %Block content model with %attrs -->
 
 <archetype name='blockStructure' model='refinable'>
  <refines>
   <archetypeRef name='common'/>
  </refines>
  <choice minOccur='0' maxOccur='*'>
   <elementTypeRef name='block'/>
   <elementTypeRef name='form'/>
   <!-- See comment under 'inlineStructure' above.  Implement the restriction
        signalled as desireable in the comment from the DTD, namely
        ins and del in block contexts should contain only block elts.
        These definitions intentionally shadow the top-level definitions -->
   <elementType name='ins'>
    <refines>
     <archetypeRef name='blockStructure'/>
     <archetypeRef name='attribution'/>
    </refines>
   </elementType>
   <elementType name='del'>
    <refines>
     <archetypeRef name='blockStructure'/>
     <archetypeRef name='attribution'/>
    </refines>
   </elementType>
  </choice>
 </archetype>
 
 <!-- For element types with block OR inline for content -->
 
 <archetype name='flowStructure' model='refinable'>
  <refines>
   <archetypeRef name='common'/>
  </refines>
  <mixed>
   <elementTypeRef name='block'/>
   <elementTypeRef name='inline'/>
   <elementTypeRef name='form'/>
   <elementTypeRef name='correction'/>
  </mixed>
 </archetype>

 <!-- Leaf nodes for the basic document structure -->
 
 <elementType name='html'>
  <refines>
   <archetypeRef name='i18n'/>
  </refines>
  <sequence>
   <elementTypeRef name='head'/>
   <elementTypeRef name='body'/>   
  </sequence>
  <attrDecl name='xmlns' required='true'>
   <datatypeRef name='uri'/>
  </attrDecl>
 </elementType>

 <elementType name='head'>
  <refines>
   <archetypeRef name='i18n'/>
  </refines>
  <!-- Not clear that the semantics of 'all' gives us what we want here:
       should it? -->
  <all>
   <elementTypeRef name='title'/>
   <elementTypeRef name='base' minOccur='0' maxOccur='1'/>
   <elementTypeRef name='headInfo' minOccur='0' maxOccur='*'/>
  </all>
  <attrDecl name='profile'>
   <datatypeRef name='uri'/>
  </attrDecl>
 </elementType>
 
 <elementType name='title'>
  <refines>
   <archetypeRef name='i18n'/>
  </refines>
  <mixed/>
 </elementType>

 <elementType name='base'>
  <empty/>
  <attrDecl name='href'>
   <datatypeRef name='uri'/>
  </attrDecl>
 </elementType>
 
 <elementType name='headInfo' model='refinable'/>
 
 <elementType name='meta'>
  <refines>
   <archetypeRef name='headInfo'/>
   <archetypeRef name='i18n'/>
  </refines>
  <empty/>
  <attrDecl name='http-equiv'/>
  <attrDecl name='name'/>
  <attrDecl name='content' required='true'/>
  <attrDecl name='scheme'/>
 </elementType>
 
 <elementType name='link'>
  <refines>
   <archetypeRef name='headInfo'/>
   <archetypeRef name='common'/>
   <archetypeRef name='linking'/>
  </refines>
  <empty/>
  <attrDecl name='media'>
   <datatypeRef name='MediaDesc'/>
  </attrDecl>
 </elementType>
 
 <elementType name='style'>
  <refines>
   <archetypeRef name='headInfo'/>
   <archetypeRef name='i18n'/>
  </refines>
  <mixed/>
  <attrDecl name='type' required='true'>
   <datatypeRef name='ContentType'/>
  </attrDecl>
  <attrDecl name='media'>
   <datatypeRef name='MediaDesc'/>
  </attrDecl>
  <attrDecl name='title'>
   <datatypeRef name='Text'/>
  </attrDecl>
  <attrDecl name='xml:space'>
   <datatypeRef name='string'>
    <fixed>preserve</fixed>
   </datatypeRef>
  </attrDecl>
 </elementType>

 <elementType name='script'>
  <refines>
   <archetypeRef name='headInfo'/>
   <archetypeRef name='mixedDisplay'/>
  </refines>
  <mixed/>
  <attrDecl name='charset'>
   <datatypeRef name='Charset'/>
  </attrDecl>
  <attrDecl name='type' required='true'>
   <datatypeRef name='ContentType'/>
  </attrDecl>
  <attrDecl name='src'>
   <datatypeRef name='uri'/>
  </attrDecl>
  <attrDecl name='defer'>
   <datatypeRef name='string'>
    <enumeration>
     <literal>defer</literal>
    </enumeration>
   </datatypeRef>
  </attrDecl>
  <attrDecl name='xml:space'>
   <datatypeRef name='string'>
    <fixed>preserve</fixed>
   </datatypeRef>
  </attrDecl>
 </elementType>
 
 <elementType name='noscript'>
  <refines>
   <archetypeRef name='mixedDisplay'/>
   <archetypeRef name='blockStructure'/>
  </refines>
 </elementType>

 <elementType name='body'>
  <refines>
   <archetypeRef name='blockStructure'/>
  </refines>
  <attrDecl name='onload'>
   <datatypeRef name='Script'/>
  </attrDecl>
  <attrDecl name='onunload'>
   <datatypeRef name='Script'/>
  </attrDecl>
 </elementType>

 <!-- Leaf-nodes which instantiate 'blockDisplay' -->
 
 <elementType name='div'>
  <refines>
   <archetypeRef name='simpleBlockDisplay'/>
   <archetypeRef name='flowStructure'/>
  </refines>
 </elementType>
 
 <elementType name='p'>
  <refines>
   <archetypeRef name='simpleBlockDisplay'/>
   <archetypeRef name='inlineStructure'/>
  </refines>
 </elementType>

 <elementType name='h1'>
  <refines>
   <archetypeRef name='heading'/>
  </refines>
 </elementType>

 <elementType name='h2'>
  <refines>
   <archetypeRef name='heading'/>
  </refines>
 </elementType>

 <elementType name='h3'>
  <refines>
   <archetypeRef name='heading'/>
  </refines>
 </elementType>

 <elementType name='h4'>
  <refines>
   <archetypeRef name='heading'/>
  </refines>
 </elementType>

 <elementType name='h5'>
  <refines>
   <archetypeRef name='heading'/>
  </refines>
 </elementType>

 <elementType name='h6'>
  <refines>
   <archetypeRef name='heading'/>
  </refines>
 </elementType>

 <elementType name='ul'>
  <refines>
   <archetypeRef name='singleItemList'/>
  </refines>
 </elementType>
 
 <elementType name='ol'>
  <refines>
   <archetypeRef name='singleItemList'/>
  </refines>
 </elementType>
 
 <elementType name='li'>
  <refines>
   <archetypeRef name='flowStructure'/>
  </refines>
 </elementType>
 
 <elementType name='dl'>
  <refines>
   <archetypeRef name='list'/>
  </refines>
  <choice minOccur='1' maxOccur='*'>
   <elementTypeRef name='dt'/>
   <elementTypeRef name='dd'/>
  </choice>
 </elementType>
 
 <elementType name='dt'>
  <refines>
   <archetypeRef name='inlineStructure'/>
  </refines>
 </elementType>
 
 <elementType name='dd'>
  <refines>
   <archetypeRef name='flowStructure'/>
  </refines>
 </elementType>
 
 <elementType name='address'>
  <refines>
   <archetypeRef name='simpleBlockDisplay'/>
   <archetypeRef name='inlineStructure'/>
  </refines>
 </elementType>
 
 <elementType name='hr'>
  <refines>
   <archetypeRef name='simpleBlockDisplay'/>
   <archetypeRef name='common'/>
  </refines>
  <empty/>
 </elementType>

 <elementType name='pre'>
  <refines>
   <archetypeRef name='simpleBlockDisplay'/>
   <archetypeRef name='common'/>
  </refines>
  <mixed>
   <elementTypeRef name='specialNonGraphic'/>
   <elementTypeRef name='fontstyleNonGraphic'/>
   <elementTypeRef name='phrase'/>   <!-- see below under sub and sup -->
   <elementTypeRef name='inline.forms'/>
   <elementTypeRef name='a'/>
  </mixed>
  <attrDecl name='xml:space'>
   <datatypeRef name='string'>
    <fixed>preserve</fixed>
   </datatypeRef>
  </attrDecl>
 </elementType>
 
 <elementType name='blockquote'>
  <refines>
   <archetypeRef name='simpleBlockDisplay'/>
   <archetypeRef name='blockStructure'/>
  </refines>
  <attrDecl name='cite'>
   <datatypeRef name='uri'/>
  </attrDecl>
 </elementType>

 <!-- Correction elements, toplevel definitions --> 

 <elementType name='ins'>
  <refines>
   <archetypeRef name='correction'/>
  </refines>
 </elementType>
 
 <elementType name='del'>
  <refines>
   <archetypeRef name='correction'/>
  </refines>
 </elementType>

 <elementType name='a'>
  <refines>
   <archetypeRef name='core'/>
   <archetypeRef name='i18n'/>
   <archetypeRef name='focusable'/>
   <archetypeRef name='linking'/>
   <archetypeRef name='inlineDisplay'/>
  </refines>
  <mixed>
   <!-- This is inlineStructure minus 'a' itself -->
   <elementTypeRef name='localInlineDisplay'/>
   <elementTypeRef name='inline.forms'/>
   <elementTypeRef name='mixedDisplay'/>
   <elementType name='ins'>
    <refines>
     <archetypeRef name='inlineStructure'/>
     <archetypeRef name='attribution'/>
    </refines>
   </elementType>
   <elementType name='del'>
    <refines>
     <archetypeRef name='inlineStructure'/>
     <archetypeRef name='attribution'/>
    </refines>
   </elementType>
  </mixed>
  <attrDecl name='name'>
   <!-- I THINK this is right per the latest announced revision -->
   <datatypeRef name='NMTOKEN'/>
  </attrDecl>
  <attrDecl name='shape'>
   <datatypeRef name='Shape'>
    <default>rect</default>
   </datatypeRef>
  </attrDecl>
  <attrDecl name='coords'>
   <datatypeRef name='Coords'/>
  </attrDecl>
 </elementType>
 
 <!-- Basic inline leaf types -->
 
 <!-- Note we can't use the archetype ref form, which I did at first, because
      we need to refine 'special' to plug in to the right content models -->
 <elementType name='span'>
  <refines>
   <archetypeRef name='inlineStructure'/>
   <archetypeRef name='specialNonGraphic'/>
  </refines>
 </elementType>
 
 <elementType name='bdo'>
  <refines>
   <archetypeRef name='inlineStructure'/> <!-- Strictly speaking wrong, as
      this carries too many attributes, but this looks like a possible
      mistake in the DTD? -->
   <archetypeRef name='specialNonGraphic'/>
  </refines>
  <!-- Strictly speaking not yet allowed, but specialised an inherited
       attribute, clearly desirable to allow this -->
  <attrDecl name='dir' required='true'/>
 </elementType>
 
 <elementType name='br'>
  <refines>
   <archetypeRef name='specialNonGraphic'/>
   <archetypeRef name='core'/>
  </refines>
  <empty/>
 </elementType>
 
 <elementType name='em'>
  <refines>
   <archetypeRef name='phrase'/>
  </refines>
 </elementType>
 
 <elementType name='strong'>
  <refines>
   <archetypeRef name='phrase'/>
  </refines>
 </elementType>
 
 <elementType name='dfn'>
  <refines>
   <archetypeRef name='phrase'/>
  </refines>
 </elementType>
 
 <elementType name='code'>
  <refines>
   <archetypeRef name='phrase'/>
  </refines>
 </elementType>
 
 <elementType name='samp'>
  <refines>
   <archetypeRef name='phrase'/>
  </refines>
 </elementType>
 
 <elementType name='kbd'>
  <refines>
   <archetypeRef name='phrase'/>
  </refines>
 </elementType>
 
 <elementType name='var'>
  <refines>
   <archetypeRef name='phrase'/>
  </refines>
 </elementType>
 
 <elementType name='cite'>
  <refines>
   <archetypeRef name='phrase'/>
  </refines>
 </elementType>
 
 <elementType name='abbr'>
  <refines>
   <archetypeRef name='phrase'/>
  </refines>
 </elementType>
 
 <elementType name='acronym'>
  <refines>
   <archetypeRef name='phrase'/>
  </refines>
 </elementType>
 
 <elementType name='q'>
  <refines>
   <archetypeRef name='phrase'/>
  </refines>
  <attrDecl name='cite'>
   <datatypeRef name='uri'/>
  </attrDecl>
 </elementType>
 
 <!-- These are typed per the comment in the DTD regarding the content
      of 'pre', and their location in the DTD, NOT the parameter entity defn
     (which would make these phrases -->
 <elementType name='sub'>
  <refines>
   <archetypeRef name='fontstyle'/>
  </refines>
 </elementType>
 
 <elementType name='sup'>
  <refines>
   <archetypeRef name='fontstyle'/>
  </refines>
 </elementType>

 <elementType name='tt'>
  <refines>
   <archetypeRef name='fontstyleNonGraphic'/>
  </refines>
 </elementType>

 <elementType name='i'>
  <refines>
   <archetypeRef name='fontstyleNonGraphic'/>
  </refines>
 </elementType>

 <elementType name='b'>
  <refines>
   <archetypeRef name='fontstyleNonGraphic'/>
  </refines>
 </elementType>

 <elementType name='big'>
  <refines>
   <archetypeRef name='fontstyle'/>
  </refines>
 </elementType>

 <elementType name='small'>
  <refines>
   <archetypeRef name='fontstyle'/>
  </refines>
 </elementType>
 
 <archetype name='rectangle' model='refinable'>
  <attrDecl name='height'>
   <datatypeRef name='Length'/>
  </attrDecl>
  <attrDecl name='width'>
   <datatypeRef name='Length'/>
  </attrDecl>
  <attrDecl name='usemap'>
   <datatypeRef name='uri'/>
  </attrDecl>
 </archetype>

 <elementType name='object' model='open'> <!-- To allow arbitrary attributes
                                               as per DTD comment -->
  <refines>
   <archetypeRef name='special'/>
   <archetypeRef name='headInfo'/>
   <archetypeRef name='rectangle'/>
   <archetypeRef name='flowStructure'/>
  </refines>
  
  <mixed>
   <elementTypeRef name='param'/>
  </mixed>
  <attrDecl name='declare'>
   <datatypeRef name='string'>
    <enumeration>
     <literal>declare</literal>
    </enumeration>
   </datatypeRef>
  </attrDecl>
  <attrDecl name='classId'>
   <datatypeRef name='uri'/>
  </attrDecl>
  <attrDecl name='codebase'>
   <datatypeRef name='uri'/>
  </attrDecl>
  <attrDecl name='data'>
   <datatypeRef name='uri'/>
  </attrDecl>
  <attrDecl name='type'>
   <datatypeRef name='ContentType'/>
  </attrDecl>
  <attrDecl name='codetype'>
   <datatypeRef name='ContentType'/>
  </attrDecl>
  <attrDecl name='archive'>
   <datatypeRef name='UriList'/>
  </attrDecl>
  <attrDecl name='standby'>
   <datatypeRef name='Text'/>
  </attrDecl>
  <attrDecl name='name'>
   <datatypeRef name='NMTOKEN'/>
  </attrDecl>
  <attrDecl name='tabindex'>
   <datatypeRef name='Number'/>
  </attrDecl>
 </elementType>
 
 <!-- !!!!!!!!!!!!!! Below here I've stopped including attribute declarations
      !!!!!!!!!!!!!! where they contribute nothing to the structuring of
      !!!!!!!!!!!!!! things, purely in the interests of saving time. -->
 
 <elementType name='param'>
  <empty/>
 </elementType>
 
 <elementType name='img'>
  <refines>
   <archetypeRef name='special'/>
   <archetypeRef name='common'/>
   <archetypeRef name='rectangle'/>
  </refines>
  <empty/>
 </elementType>
 
 <elementType name='map'>
  <refines>
   <archetypeRef name='specialNonGraphic'/>  <!-- Makes pre come out right! -->
   <archetypeRef name='common'/>
  </refines>
  <choice>
   <choice minOccur='1' maxOccur='*'>
    <elementTypeRef name='block'/>
    <elementTypeRef name='form'/>
    <!-- See comment above under blockStructure -->
    <elementType name='ins'>
    <refines>
     <archetypeRef name='blockStructure'/>
     <archetypeRef name='attribution'/>
    </refines>
   </elementType>
   <elementType name='del'>
    <refines>
     <archetypeRef name='blockStructure'/>
     <archetypeRef name='attribution'/>
    </refines>
   </elementType>
   </choice>
   <elementTypeRef name='area' minOccur='1' maxOccur='*'/>
  </choice>
 </elementType>
 
 <elementType name='area'>
  <refines>
   <archetypeRef name='common'/>
   <archetypeRef name='focusable'/>
  </refines>
  <empty/>
 </elementType>
 
 <!-- DTD has <!ENTITY % form.content "(#PCDATA | %block; | %misc;)*">
      which is clearly wrong if you look back at HTML4-strict.dtd -->
 <elementType name='form'>
  <refines>
   <archetypeRef name='blockStructure'/>
  </refines>
 </elementType>
 
 <elementType name='label'>
  <refines>
   <archetypeRef name='inline.forms'/>
   <archetypeRef name='inlineStructure'/>
  </refines>
 </elementType>
 
 <elementType name='input'>
  <refines>
   <archetypeRef name='inline.forms'/>
   <archetypeRef name='common'/>
   <archetypeRef name='focusable'/>
  </refines>
  <empty/>
 </elementType>
 
 <elementType name='select'>
  <refines>
   <archetypeRef name='inline.forms'/>
   <archetypeRef name='common'/>
  </refines>
  <choice minOccur='1' maxOccur='*'>
   <elementTypeRef name='option'/>
   <elementTypeRef name='optgroup'/>
  </choice>
 </elementType>
 
 <elementType name='optgroup'>
  <refines>
   <archetypeRef name='common'/>
  </refines>
  <elementTypeRef name='option' minOccur='1' maxOccur='*'/>
 </elementType>

 <elementType name='option'>
  <refines>
   <archetypeRef name='common'/>
  </refines>
  <mixed/>
 </elementType>
 
 <elementType name='textarea'>
  <refines>
   <archetypeRef name='inline.forms'/>
   <archetypeRef name='common'/>
   <archetypeRef name='focusable'/>
  </refines>
  <mixed/>
 </elementType>
 
 <elementType name='fieldset'>
  <refines>
   <archetypeRef name='blockDisplay'/>
   <archetypeRef name='flowStructure'/>
  </refines>
  <mixed>
   <elementTypeRef name='legend'/>
  </mixed>
 </elementType>
 
 <elementType name='legend'>
  <refines>
   <archetypeRef name='inlineStructure'/>
  </refines>
 </elementType>
 
 <elementType name='button'>
  <refines>
   <archetypeRef name='common'/>
   <archetypeRef name='focusable'/>
   <archetypeRef name='inline.forms'/>
  </refines>
  <mixed>
   <elementTypeRef name='simpleBlockDisplay'/>
   <elementTypeRef name='localInlineDisplay'/>
   <elementTypeRef name='mixedDisplay'/>
   <elementTypeRef name='correction'/>
  </mixed>
 </elementType>
 
 <!-- Tables -->
 <archetype name='cell' model='refinable'>
  <refines>
   <archetypeRef name='common'/>
  </refines>
  <attrDecl name='align'>
   <datatypeRef name='cellalign'/>
  </attrDecl>
  <attrDecl name='char'>
   <datatypeRef name='Character'/>
  </attrDecl>
  <attrDecl name='valign'>
   <datatypeRef name='cellvalign'/>
  </attrDecl>
 </archetype>
 
 <elementType name='table'>
  <refines>
   <archetypeRef name='common'/>
   <archetypeRef name='simpleBlockDisplay'/>
  </refines>
  <sequence>
   <elementTypeRef name='caption' minOccur='0' maxOccur='1'/>
   <choice>
    <elementTypeRef name='col' minOccur='0' maxOccur='*'/>
    <elementTypeRef name='colgroup' minOccur='0' maxOccur='*'/>
   </choice>
   <choice>
    <sequence>
     <elementTypeRef name='thead' minOccur='0' maxOccur='1'/>
     <elementTypeRef name='tfoot' minOccur='0' maxOccur='1'/>
     <elementTypeRef name='tbody' minOccur='1' maxOccur='*'/>
    </sequence>
    <elementTypeRef name='tr' minOccur='1' maxOccur='*'/>
   </choice>
  </sequence>
 </elementType>
 
 <elementType name='caption'>
  <refines>
   <archetypeRef name='inlineStructure'/>
  </refines>
 </elementType>
 
 <!--  Maybe this is wrong, but I really wanted to have at least one instance
       of multiple elementTypes sharing a common archetype -->
 <archetype name='rowSet'>
  <refines>
   <archetypeRef name='cell'/>
  </refines>
  <elementTypeRef name='tr' minOccur='1' maxOccur='*'/>
 </archetype>
 
 <elementType name='thead'>
  <archetypeRef name='rowSet'/>
 </elementType>
 
 <elementType name='tfoot'>
  <archetypeRef name='rowSet'/>
 </elementType>
 
 <elementType name='tbody'>
  <archetypeRef name='rowSet'/>
 </elementType>
 
 <elementType name='colgroup'>
  <refines>
   <archetypeRef name='cell'/>
  </refines>
  <elementTypeRef name='col' minOccur='0' maxOccur='*'/>
 </elementType>
 
 <elementType name='col'>
  <refines>
   <archetypeRef name='cell'/>
  </refines>
  <empty/>
 </elementType>
 
 <elementType name='tr'>
  <refines>
   <archetypeRef name='cell'/>
  </refines>
  <choice minOccur='1' maxOccur='*'>
   <elementTypeRef name='th'/>
   <elementTypeRef name='td'/>   
  </choice>
 </elementType>
 
 <archetype name='realCell'>
  <refines>
   <archetypeRef name='cell'/>
   <archetypeRef name='flowStructure'/>
  </refines>
  <attrDecl name='abbr'>
   <datatypeRef name='Text'/>
  </attrDecl>
  <!-- Other attributes go here -->
 </archetype>
 
 <elementType name='th'>
  <archetypeRef name='realCell'/>
 </elementType>
 
 <elementType name='td'>
  <archetypeRef name='realCell'/>
 </elementType>
</schema>
