<?xml version="1.0" encoding="UTF-8"?>
<!-- revised DTD for the RFC document series, draft of 2009-10-06 -->
<!--
  Typical invocation:
      <!DOCTYPE rfc PUBLIC "-//IETF//DTD RFC 2629//EN"
                           "http://xml.resource.org/authoring/rfc2629.dtd" [
        ... dtd subset ...
      ]>
    or
      <!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
        ... dtd subset ...
      ]>
-->
<!--
  Contents
  
    Character entities
  
    DTD data types
  
    The top-level
  
    Front matter
  
    The Body
  
    Back matter
-->
<!-- Character entities -->
<!--
  DTD data types:
  
        entity        description
        ======        ===============================================
        NUMBER        [0-9]+
        NUMBERS       a comma-separated list of NUMBER
  
        DAY           the day of the month, e.g., "1"
        MONTH         the month of the year, e.g., "January"
        YEAR          a four-digit year, e.g., "1999"
  
        URI           e.g., "http://invisible.net/"
  
        ATEXT/CTEXT   printable ASCII text (no line-terminators)
  
        TEXT          character data
-->
<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"/>
  <xs:simpleType name="NUMBER">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="NUMBERS">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="DAY">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="MONTH">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="YEAR">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="URI">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <xs:simpleType name="ATEXT">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>
  <!-- The top-level -->
  <!--
    attributes for the "rfc" element are supplied by the RFC
    editor. when preparing drafts, authors should leave them blank.
    
    the "seriesNo" attribute is used if the category is, e.g., BCP.
  -->
  <xs:element name="rfc">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="front"/>
        <xs:element ref="middle"/>
        <xs:element minOccurs="0" ref="back"/>
      </xs:sequence>
      <xs:attribute name="number" type="NUMBER"/>
      <xs:attribute name="obsoletes" default="" type="NUMBERS"/>
      <xs:attribute name="updates" default="" type="NUMBERS"/>
      <xs:attribute name="category">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="std"/>
            <xs:enumeration value="bcp"/>
            <xs:enumeration value="info"/>
            <xs:enumeration value="exp"/>
            <xs:enumeration value="historic"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="consensus">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="no"/>
            <xs:enumeration value="yes"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="seriesNo" type="NUMBER"/>
      <xs:attribute name="ipr">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="full2026"/>
            <xs:enumeration value="noDerivativeWorks2026"/>
            <xs:enumeration value="none"/>
            <xs:enumeration value="full3667"/>
            <xs:enumeration value="noModification3667"/>
            <xs:enumeration value="noDerivatives3667"/>
            <xs:enumeration value="full3978"/>
            <xs:enumeration value="noModification3978"/>
            <xs:enumeration value="noDerivatives3978"/>
            <xs:enumeration value="trust200811"/>
            <xs:enumeration value="noModificationTrust200811"/>
            <xs:enumeration value="noDerivativesTrust200811"/>
            <xs:enumeration value="trust200902"/>
            <xs:enumeration value="noModificationTrust200902"/>
            <xs:enumeration value="noDerivativesTrust200902"/>
            <xs:enumeration value="pre5378Trust200902"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="iprExtract" type="xs:IDREF"/>
      <xs:attribute name="submissionType" default="IETF">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="IETF"/>
            <xs:enumeration value="IAB"/>
            <xs:enumeration value="IRTF"/>
            <xs:enumeration value="independent"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="docName" type="ATEXT"/>
      <xs:attribute ref="xml:lang" default="en"/>
    </xs:complexType>
  </xs:element>
  <!-- Front matter -->
  <xs:element name="front">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="title"/>
        <xs:element maxOccurs="unbounded" ref="author"/>
        <xs:element ref="date"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="area"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="workgroup"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="keyword"/>
        <xs:element minOccurs="0" ref="abstract"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="note"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <!-- the "abbrev" attribute is used for headers, etc. -->
  <xs:element name="title">
    <xs:complexType mixed="true">
      <xs:attribute name="abbrev" type="ATEXT"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="author">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" ref="organization"/>
        <xs:element minOccurs="0" ref="address"/>
      </xs:sequence>
      <xs:attribute name="initials" type="ATEXT"/>
      <xs:attribute name="surname" type="ATEXT"/>
      <xs:attribute name="fullname" type="ATEXT"/>
      <xs:attribute name="role">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="editor"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="organization">
    <xs:complexType mixed="true">
      <xs:attribute name="abbrev" type="ATEXT"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="address">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" ref="postal"/>
        <xs:element minOccurs="0" ref="phone"/>
        <xs:element minOccurs="0" ref="facsimile"/>
        <xs:element minOccurs="0" ref="email"/>
        <xs:element minOccurs="0" ref="uri"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <!--
    this content model should be more strict:
    at most one of each the city, region, code, and country
    elements may be present
  -->
  <xs:element name="postal">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="street"/>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element ref="city"/>
          <xs:element ref="region"/>
          <xs:element ref="code"/>
          <xs:element ref="country"/>
        </xs:choice>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="street" type="xs:string"/>
  <xs:element name="city" type="xs:string"/>
  <xs:element name="region" type="xs:string"/>
  <xs:element name="code" type="xs:string"/>
  <xs:element name="country" type="xs:string"/>
  <xs:element name="phone" type="xs:string"/>
  <xs:element name="facsimile" type="xs:string"/>
  <xs:element name="email" type="xs:string"/>
  <xs:element name="uri" type="xs:string"/>
  <xs:element name="date">
    <xs:complexType>
      <xs:attribute name="day" type="DAY"/>
      <xs:attribute name="month" type="MONTH"/>
      <xs:attribute name="year" type="YEAR"/>
    </xs:complexType>
  </xs:element>
  <!-- meta-data... -->
  <xs:element name="area" type="xs:string"/>
  <xs:element name="workgroup" type="xs:string"/>
  <xs:element name="keyword" type="xs:string"/>
  <xs:element name="abstract">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="t"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="note">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="t"/>
      </xs:sequence>
      <xs:attribute name="title" use="required" type="ATEXT"/>
    </xs:complexType>
  </xs:element>
  <!-- The body -->
  <xs:element name="middle">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="section"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="section">
    <xs:complexType>
      <xs:sequence>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element ref="t"/>
          <xs:element ref="figure"/>
          <xs:element ref="texttable"/>
          <xs:element ref="iref"/>
        </xs:choice>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="section"/>
      </xs:sequence>
      <xs:attribute name="anchor" type="xs:ID"/>
      <xs:attribute name="title" use="required" type="ATEXT"/>
      <xs:attribute name="toc" default="default">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="include"/>
            <xs:enumeration value="exclude"/>
            <xs:enumeration value="default"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <!--
    use of <appendix/> is deprecated...
    <!ELEMENT appendix    ((t|figure|texttable|iref)*,appendix*)>
    <!ATTLIST appendix
              anchor      ID                 #IMPLIED
              title       %ATEXT;            #REQUIRED
              toc         (include|exclude|default)
                                             "default">
  -->
  <!-- use of <figure/> is deprecated... -->
  <xs:element name="t">
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="list"/>
        <xs:element ref="figure"/>
        <xs:element ref="xref"/>
        <xs:element ref="eref"/>
        <xs:element ref="iref"/>
        <xs:element ref="cref"/>
        <xs:element ref="spanx"/>
        <xs:element ref="vspace"/>
      </xs:choice>
      <xs:attribute name="anchor" type="xs:ID"/>
      <xs:attribute name="hangText" type="ATEXT"/>
    </xs:complexType>
  </xs:element>
  <!--
    the value of the style attribute is inherited from the closest 
    parent
  -->
  <xs:element name="list">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="t"/>
      </xs:sequence>
      <xs:attribute name="style" type="ATEXT"/>
      <xs:attribute name="hangIndent" type="NUMBER"/>
      <xs:attribute name="counter" type="ATEXT"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="xref">
    <xs:complexType mixed="true">
      <xs:attribute name="target" use="required" type="xs:IDREF"/>
      <xs:attribute name="pageno" default="false">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="true"/>
            <xs:enumeration value="false"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="format" default="default">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="counter"/>
            <xs:enumeration value="title"/>
            <xs:enumeration value="none"/>
            <xs:enumeration value="default"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="eref">
    <xs:complexType mixed="true">
      <xs:attribute name="target" use="required" type="URI"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="iref">
    <xs:complexType>
      <xs:attribute name="item" use="required" type="ATEXT"/>
      <xs:attribute name="subitem" default="" type="ATEXT"/>
      <xs:attribute name="primary" default="false">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="true"/>
            <xs:enumeration value="false"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="cref">
    <xs:complexType mixed="true">
      <xs:attribute name="anchor" type="xs:ID"/>
      <xs:attribute name="source" type="ATEXT"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="spanx">
    <xs:complexType mixed="true">
      <xs:attribute ref="xml:space" default="preserve"/>
      <xs:attribute name="style" default="emph" type="ATEXT"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="vspace">
    <xs:complexType>
      <xs:attribute name="blankLines" default="0" type="NUMBER"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="figure">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="iref"/>
        <xs:element minOccurs="0" ref="preamble"/>
        <xs:element ref="artwork"/>
        <xs:element minOccurs="0" ref="postamble"/>
      </xs:sequence>
      <xs:attribute name="anchor" type="xs:ID"/>
      <xs:attribute name="title" default="" type="ATEXT"/>
      <xs:attribute name="suppress-title" default="false">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="true"/>
            <xs:enumeration value="false"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="src" type="URI"/>
      <xs:attribute name="align" default="left">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="left"/>
            <xs:enumeration value="center"/>
            <xs:enumeration value="right"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="alt" default="" type="ATEXT"/>
      <xs:attribute name="width" default="" type="ATEXT"/>
      <xs:attribute name="height" default="" type="ATEXT"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="preamble">
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="xref"/>
        <xs:element ref="eref"/>
        <xs:element ref="iref"/>
        <xs:element ref="cref"/>
        <xs:element ref="spanx"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="artwork">
    <xs:complexType mixed="true">
      <xs:attribute ref="xml:space" default="preserve"/>
      <xs:attribute name="name" default="" type="ATEXT"/>
      <xs:attribute name="type" default="" type="ATEXT"/>
      <xs:attribute name="src" type="URI"/>
      <xs:attribute name="align" default="left">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="left"/>
            <xs:enumeration value="center"/>
            <xs:enumeration value="right"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="alt" default="" type="ATEXT"/>
      <xs:attribute name="width" default="" type="ATEXT"/>
      <xs:attribute name="height" default="" type="ATEXT"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="postamble">
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="xref"/>
        <xs:element ref="eref"/>
        <xs:element ref="iref"/>
        <xs:element ref="cref"/>
        <xs:element ref="spanx"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="texttable">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" ref="preamble"/>
        <xs:element maxOccurs="unbounded" ref="ttcol"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="c"/>
        <xs:element minOccurs="0" ref="postamble"/>
      </xs:sequence>
      <xs:attribute name="anchor" type="xs:ID"/>
      <xs:attribute name="title" default="" type="ATEXT"/>
      <xs:attribute name="suppress-title" default="false">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="true"/>
            <xs:enumeration value="false"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="align" default="center">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="left"/>
            <xs:enumeration value="center"/>
            <xs:enumeration value="right"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="style" default="full">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="all"/>
            <xs:enumeration value="none"/>
            <xs:enumeration value="headers"/>
            <xs:enumeration value="full"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="ttcol">
    <xs:complexType mixed="true">
      <xs:attribute name="width" type="ATEXT"/>
      <xs:attribute name="align" default="left">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="left"/>
            <xs:enumeration value="center"/>
            <xs:enumeration value="right"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="c">
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="xref"/>
        <xs:element ref="eref"/>
        <xs:element ref="iref"/>
        <xs:element ref="cref"/>
        <xs:element ref="spanx"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <!-- Back matter -->
  <!-- sections, if present, are appendices -->
  <xs:element name="back">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="references"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="section"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="references">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="reference"/>
      </xs:sequence>
      <xs:attribute name="title" default="References" type="ATEXT"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="reference">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="front"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="seriesInfo"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="format"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="annotation"/>
      </xs:sequence>
      <xs:attribute name="anchor" type="xs:ID"/>
      <xs:attribute name="target" type="URI"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="seriesInfo">
    <xs:complexType>
      <xs:attribute name="name" use="required" type="ATEXT"/>
      <xs:attribute name="value" use="required" type="ATEXT"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="format">
    <xs:complexType>
      <xs:attribute name="target" type="URI"/>
      <xs:attribute name="type" use="required" type="ATEXT"/>
      <xs:attribute name="octets" type="NUMBER"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="annotation">
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="xref"/>
        <xs:element ref="eref"/>
        <xs:element ref="iref"/>
        <xs:element ref="cref"/>
        <xs:element ref="spanx"/>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>
