<?xml version="1.0" encoding="UTF-8"?>
<!--
  This file is part of DocBook V5.0
  
  Copyright 1992-2008 HaL Computer Systems, Inc.,
  O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
  Corporation, Norman Walsh, Sun Microsystems, Inc., and the
  Organization for the Advancement of Structured Information
  Standards (OASIS).
  
  Release: $Id: index.rnc 8931 2010-10-20 13:29:20Z nwalsh $
  
  Permission to use, copy, modify and distribute the DocBook schema
  and its accompanying documentation for any purpose and without fee
  is hereby granted in perpetuity, provided that the above copyright
  notice and this paragraph appear in all copies. The copyright
  holders make no representation about the suitability of the schema
  for any purpose. It is provided "as is" without expressed or implied
  warranty.
  
  If you modify the DocBook schema in any way, label your schema as a
  variant of DocBook. See the reference documentation
  (http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook)
  for more information.
  
  Please direct all questions, bug reports, or suggestions for changes
  to the docbook@lists.oasis-open.org mailing list. For more
  information, see http://www.oasis-open.org/docbook/.
  
  ======================================================================
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://docbook.org/ns/docbook" xmlns:dbs="http://docbook.org/ns/docbook-slides" xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
  <xs:import namespace="http://docbook.org/ns/docbook-slides" schemaLocation="slides.xsd"/>
  <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
  <!-- ====================================================================== -->
  <xs:simpleType name="db.significance.enumeration">
    <xs:restriction base="xs:token">
      <xs:enumeration value="normal">
        <xs:annotation>
          <xs:documentation>Normal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="preferred">
        <xs:annotation>
          <xs:documentation>Preferred</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:attributeGroup name="db.significance.attribute">
    <xs:attribute name="significance" use="required" type="db:db.significance.enumeration"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.zone.attribute">
    <xs:attribute name="zone" use="required" type="xs:IDREFS"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.indexterm.pagenum.attribute">
    <xs:attribute name="pagenum" use="required"/>
  </xs:attributeGroup>
  <xs:simpleType name="db.scope.enumeration">
    <xs:restriction base="xs:token">
      <xs:enumeration value="all">
        <xs:annotation>
          <xs:documentation>All indexes</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="global">
        <xs:annotation>
          <xs:documentation>The global index (as for a combined index of a set of books)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="local">
        <xs:annotation>
          <xs:documentation>The local index (the index for this document only)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:attributeGroup name="db.scope.attribute">
    <xs:attribute name="scope" use="required" type="db:db.scope.enumeration"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.sortas.attribute">
    <xs:attribute name="sortas" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.index.type.attribute">
    <xs:attribute name="type" use="required"/>
  </xs:attributeGroup>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.itermset.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.itermset.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attributeGroup ref="db:db.common.linking.attributes"/>
  </xs:attributeGroup>
  <xs:element name="itermset">
    <xs:complexType>
      <xs:group maxOccurs="unbounded" ref="db:db.indexterm.singular"/>
      <xs:attributeGroup ref="db:db.itermset.attlist"/>
    </xs:complexType>
  </xs:element>
  <!-- ====================================================================== -->
  <xs:complexType name="db.indexterm.contentmodel">
    <xs:sequence>
      <xs:element minOccurs="0" ref="db:primary"/>
      <xs:choice minOccurs="0">
        <xs:sequence>
          <xs:element ref="db:secondary"/>
          <xs:choice minOccurs="0">
            <xs:sequence>
              <xs:element ref="db:tertiary"/>
              <xs:choice minOccurs="0">
                <xs:element ref="db:see"/>
                <xs:element maxOccurs="unbounded" ref="db:seealso"/>
              </xs:choice>
            </xs:sequence>
            <xs:element ref="db:see"/>
            <xs:element maxOccurs="unbounded" ref="db:seealso"/>
          </xs:choice>
        </xs:sequence>
        <xs:element ref="db:see"/>
        <xs:element maxOccurs="unbounded" ref="db:seealso"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.indexterm.singular.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.indexterm.singular.class.attribute">
    <xs:attribute name="class" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="singular">
            <xs:annotation>
              <xs:documentation>A singular index term</xs:documentation>
            </xs:annotation>
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.indexterm.singular.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attributeGroup ref="db:db.common.linking.attributes"/>
    <xs:attribute name="significance" type="db:db.significance.enumeration"/>
    <xs:attribute name="zone" type="xs:IDREFS"/>
    <xs:attribute name="pagenum"/>
    <xs:attribute name="scope" type="db:db.scope.enumeration"/>
    <xs:attribute name="type"/>
    <xs:attribute name="class">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="singular">
            <xs:annotation>
              <xs:documentation>A singular index term</xs:documentation>
            </xs:annotation>
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:group name="db.indexterm.singular">
    <xs:sequence>
      <xs:element name="indexterm">
        <xs:complexType>
          <xs:complexContent>
            <xs:extension base="db:db.indexterm.contentmodel">
              <xs:attributeGroup ref="db:db.indexterm.singular.attlist"/>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.indexterm.startofrange.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.indexterm.startofrange.class.attribute">
    <xs:attribute name="class" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="startofrange">
            <xs:annotation>
              <xs:documentation>The start of a range</xs:documentation>
            </xs:annotation>
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.indexterm.startofrange.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attributeGroup ref="db:db.common.linking.attributes"/>
    <xs:attribute name="significance" type="db:db.significance.enumeration"/>
    <xs:attribute name="zone" type="xs:IDREFS"/>
    <xs:attribute name="pagenum"/>
    <xs:attribute name="scope" type="db:db.scope.enumeration"/>
    <xs:attribute name="type"/>
    <xs:attributeGroup ref="db:db.indexterm.startofrange.class.attribute"/>
  </xs:attributeGroup>
  <xs:group name="db.indexterm.startofrange">
    <xs:sequence>
      <xs:element name="indexterm">
        <xs:complexType>
          <xs:complexContent>
            <xs:extension base="db:db.indexterm.contentmodel">
              <xs:attributeGroup ref="db:db.indexterm.startofrange.attlist"/>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.indexterm.endofrange.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.indexterm.endofrange.class.attribute">
    <xs:attribute name="class" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="endofrange">
            <xs:annotation>
              <xs:documentation>The end of a range</xs:documentation>
            </xs:annotation>
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.indexterm.endofrange.startref.attribute">
    <xs:attribute name="startref" use="required" type="xs:IDREF"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.indexterm.endofrange.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attributeGroup ref="db:db.common.linking.attributes"/>
    <xs:attributeGroup ref="db:db.indexterm.endofrange.class.attribute"/>
    <xs:attributeGroup ref="db:db.indexterm.endofrange.startref.attribute"/>
  </xs:attributeGroup>
  <xs:group name="db.indexterm.endofrange">
    <xs:sequence>
      <xs:element name="indexterm">
        <xs:complexType>
          <xs:attributeGroup ref="db:db.indexterm.endofrange.attlist"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <!-- ====================================================================== -->
  <xs:group name="db.indexterm">
    <xs:choice>
      <xs:group ref="db:db.indexterm.singular"/>
      <xs:group ref="db:db.indexterm.startofrange"/>
      <xs:group ref="db:db.indexterm.endofrange"/>
    </xs:choice>
  </xs:group>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.primary.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.primary.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attributeGroup ref="db:db.common.linking.attributes"/>
    <xs:attribute name="sortas"/>
  </xs:attributeGroup>
  <xs:element name="primary">
    <xs:complexType mixed="true">
      <xs:group minOccurs="0" maxOccurs="unbounded" ref="db:db.all.inlines"/>
      <xs:attributeGroup ref="db:db.primary.attlist"/>
    </xs:complexType>
  </xs:element>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.secondary.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.secondary.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attributeGroup ref="db:db.common.linking.attributes"/>
    <xs:attribute name="sortas"/>
  </xs:attributeGroup>
  <xs:element name="secondary">
    <xs:complexType mixed="true">
      <xs:group minOccurs="0" maxOccurs="unbounded" ref="db:db.all.inlines"/>
      <xs:attributeGroup ref="db:db.secondary.attlist"/>
    </xs:complexType>
  </xs:element>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.tertiary.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.tertiary.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attributeGroup ref="db:db.common.linking.attributes"/>
    <xs:attribute name="sortas"/>
  </xs:attributeGroup>
  <xs:element name="tertiary">
    <xs:complexType mixed="true">
      <xs:group minOccurs="0" maxOccurs="unbounded" ref="db:db.all.inlines"/>
      <xs:attributeGroup ref="db:db.tertiary.attlist"/>
    </xs:complexType>
  </xs:element>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.see.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.see.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attributeGroup ref="db:db.common.linking.attributes"/>
  </xs:attributeGroup>
  <xs:element name="see">
    <xs:complexType mixed="true">
      <xs:group minOccurs="0" maxOccurs="unbounded" ref="db:db.all.inlines"/>
      <xs:attributeGroup ref="db:db.see.attlist"/>
    </xs:complexType>
  </xs:element>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.seealso.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.seealso.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attributeGroup ref="db:db.common.linking.attributes"/>
  </xs:attributeGroup>
  <xs:element name="seealso">
    <xs:complexType mixed="true">
      <xs:group minOccurs="0" maxOccurs="unbounded" ref="db:db.all.inlines"/>
      <xs:attributeGroup ref="db:db.seealso.attlist"/>
    </xs:complexType>
  </xs:element>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.index.status.attribute">
    <xs:attributeGroup ref="db:db.status.attribute"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.index.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.index.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attributeGroup ref="db:db.common.linking.attributes"/>
    <xs:attribute name="label"/>
    <xs:attribute name="status"/>
    <xs:attribute name="type"/>
  </xs:attributeGroup>
  <xs:group name="db.index.info">
    <xs:sequence>
      <xs:group ref="db:db._info"/>
    </xs:sequence>
  </xs:group>
  <!--
    Yes, db.indexdiv* and db.indexentry*; that way an <index/> is valid.
    Authors can use an empty index to indicate where a generated index should
    appear.
  -->
  <xs:element name="index">
    <xs:complexType>
      <xs:sequence>
        <xs:group ref="db:db.index.info"/>
        <xs:group minOccurs="0" maxOccurs="unbounded" ref="db:db.all.blocks"/>
        <xs:choice>
          <xs:element minOccurs="0" maxOccurs="unbounded" ref="db:indexdiv"/>
          <xs:element minOccurs="0" maxOccurs="unbounded" ref="db:indexentry"/>
          <xs:element ref="db:segmentedlist"/>
        </xs:choice>
      </xs:sequence>
      <xs:attributeGroup ref="db:db.index.attlist"/>
    </xs:complexType>
  </xs:element>
  <!--  ====================================================================== -->
  <xs:attributeGroup name="db.setindex.status.attribute">
    <xs:attributeGroup ref="db:db.status.attribute"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.setindex.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.setindex.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attributeGroup ref="db:db.common.linking.attributes"/>
    <xs:attribute name="label"/>
    <xs:attribute name="status"/>
    <xs:attribute name="type"/>
  </xs:attributeGroup>
  <xs:group name="db.setindex.info">
    <xs:sequence>
      <xs:group ref="db:db._info"/>
    </xs:sequence>
  </xs:group>
  <xs:element name="setindex" substitutionGroup="db:db.setindex.components"/>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.indexdiv.status.attribute">
    <xs:attributeGroup ref="db:db.status.attribute"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.indexdiv.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.indexdiv.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attributeGroup ref="db:db.common.linking.attributes"/>
    <xs:attribute name="label"/>
    <xs:attribute name="status"/>
  </xs:attributeGroup>
  <xs:group name="db.indexdiv.info">
    <xs:sequence>
      <xs:group ref="db:db._info.title.req"/>
    </xs:sequence>
  </xs:group>
  <xs:element name="indexdiv">
    <xs:complexType>
      <xs:sequence>
        <xs:group ref="db:db.indexdiv.info"/>
        <xs:group minOccurs="0" maxOccurs="unbounded" ref="db:db.all.blocks"/>
        <xs:choice>
          <xs:element maxOccurs="unbounded" ref="db:indexentry"/>
          <xs:element ref="db:segmentedlist"/>
        </xs:choice>
      </xs:sequence>
      <xs:attributeGroup ref="db:db.indexdiv.attlist"/>
    </xs:complexType>
  </xs:element>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.indexentry.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.indexentry.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attributeGroup ref="db:db.common.linking.attributes"/>
  </xs:attributeGroup>
  <xs:element name="indexentry">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="db:primaryie"/>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element ref="db:seeie"/>
          <xs:element ref="db:seealsoie"/>
        </xs:choice>
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
          <xs:element ref="db:secondaryie"/>
          <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="db:seeie"/>
            <xs:element ref="db:seealsoie"/>
            <xs:element ref="db:tertiaryie"/>
          </xs:choice>
        </xs:sequence>
      </xs:sequence>
      <xs:attributeGroup ref="db:db.indexentry.attlist"/>
    </xs:complexType>
  </xs:element>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.primaryie.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.primaryie.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attribute name="linkends" type="xs:IDREFS"/>
  </xs:attributeGroup>
  <xs:element name="primaryie">
    <xs:complexType mixed="true">
      <xs:group minOccurs="0" maxOccurs="unbounded" ref="db:db.all.inlines"/>
      <xs:attributeGroup ref="db:db.primaryie.attlist"/>
    </xs:complexType>
  </xs:element>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.secondaryie.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.secondaryie.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attribute name="linkends" type="xs:IDREFS"/>
  </xs:attributeGroup>
  <xs:element name="secondaryie">
    <xs:complexType mixed="true">
      <xs:group minOccurs="0" maxOccurs="unbounded" ref="db:db.all.inlines"/>
      <xs:attributeGroup ref="db:db.secondaryie.attlist"/>
    </xs:complexType>
  </xs:element>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.tertiaryie.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.tertiaryie.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attribute name="linkends" type="xs:IDREFS"/>
  </xs:attributeGroup>
  <xs:element name="tertiaryie">
    <xs:complexType mixed="true">
      <xs:group minOccurs="0" maxOccurs="unbounded" ref="db:db.all.inlines"/>
      <xs:attributeGroup ref="db:db.tertiaryie.attlist"/>
    </xs:complexType>
  </xs:element>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.seeie.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.seeie.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attribute name="linkend" type="xs:IDREF"/>
  </xs:attributeGroup>
  <xs:element name="seeie">
    <xs:complexType mixed="true">
      <xs:group minOccurs="0" maxOccurs="unbounded" ref="db:db.all.inlines"/>
      <xs:attributeGroup ref="db:db.seeie.attlist"/>
    </xs:complexType>
  </xs:element>
  <!-- ====================================================================== -->
  <xs:attributeGroup name="db.seealsoie.role.attribute">
    <xs:attribute name="role" use="required"/>
  </xs:attributeGroup>
  <xs:attributeGroup name="db.seealsoie.attlist">
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="dbs:db.common.attributes"/>
    <xs:attribute name="linkends" type="xs:IDREFS"/>
  </xs:attributeGroup>
  <xs:element name="seealsoie">
    <xs:complexType mixed="true">
      <xs:group minOccurs="0" maxOccurs="unbounded" ref="db:db.all.inlines"/>
      <xs:attributeGroup ref="db:db.seealsoie.attlist"/>
    </xs:complexType>
  </xs:element>
</xs:schema>
