<grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:z="http://www.daisy.org/ns/z3998/annotations/#" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:sch="http://purl.oclc.org/dsdl/schematron" xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" ns="http://www.daisy.org/ns/z3998/authoring/">
<info xmlns="http://docbook.org/ns/docbook" xml:lang="en">
<title>The index module </title>
<annotation annotates="/">
<para>This module defines the index element for structuring indices. </para>
<para>More information about this module is available at http://www.daisy.org/z3998/2012/auth/cm/#z3998.index.module</para>
</annotation>
<author>
<personname>Markus Gylling</personname>
<email>mgylling@daisy.org</email>
</author>
<author>
<personname>Matt Garrish</personname>
</author>
<copyright>
<year>2009</year>
<year>2010</year>
<year>2011</year>
<year>2012</year>
<holder>DAISY Consortium</holder>
</copyright>
<legalnotice>
<para>This module is licensed under a Creative Commons Attribution 3.0 license, a copy of which is available at
<link xlink:href="http://creativecommons.org/licenses/by/3.0/">http://creativecommons.org/licenses/by/3.0/</link>
</para>
<para>For complete licensing information, please refer to the LICENSE file that came with this distribution, a copy of which is also available from the DAISY web site at
<link xlink:href="http://www.daisy.org">www.daisy.org</link>
</para>
</legalnotice>
<revhistory>
<revision>
<date>2012-12-19</date>
<authorinitials>MGy</authorinitials>
<revdescription>
<para>Initial version</para>
</revdescription>
</revision>
</revhistory>
</info>
<div>
<define name="z3998.index">
<element name="index">
<a:documentation>The index element represents a topical reference section in a book. The entries in an index may be grouped into sections by topic or alphabetic letter. </a:documentation>
<ref name="z3998.index.attlist"/>
<ref name="z3998.index.content"/>
</element>
</define>
<define name="z3998.index.attlist">
<ref name="z3998.Section.attrib"/>
</define>
<define name="z3998.index.content">
<ref name="z3998.index.model"/>
</define>
<define name="z3998.index.model">
<interleave>
<optional>
<ref name="z3998.h"/>
</optional>
<zeroOrMore>
<choice>
<ref name="z3998.index.extra.class"/>
</choice>
</zeroOrMore>
</interleave>
<choice>
<group>
<interleave>
<oneOrMore>
<ref name="z3998.index.entry"/>
</oneOrMore>
<zeroOrMore>
<ref name="z3998.index.extended.entry.class"/>
</zeroOrMore>
</interleave>
<zeroOrMore>
<ref name="z3998.index.section"/>
</zeroOrMore>
</group>
<group>
<zeroOrMore>
<ref name="z3998.index.entry"/>
</zeroOrMore>
<oneOrMore>
<ref name="z3998.index.section"/>
</oneOrMore>
</group>
</choice>
</define>
<define name="z3998.index.extra.class">
<choice>
<ref name="z3998.Block.basic.model"/>
<ref name="z3998.Global.extra.class"/>
</choice>
</define>
<define name="z3998.index.extended.entry.class">
<choice>
<ref name="z3998.hd"/>
<ref name="z3998.Global.extra.class"/>
</choice>
</define>
</div>
<div>
<define name="z3998.index.section">
<element name="section">
<a:documentation>The index section element represents a major structural division of an index . The index section element is a specialization of the section element that provides a content model to fit the unique requirements of index divisions. The republishing of documents often requires the insertion of content that was not a part of the original source document. For example, in the case of indexes, bibliographies and other ordered sections, this requirement may take the form of placeholder sections to mark gaps in the alphabetic list of entries. To indicate that an element presents content that is a deviation from the source, the role attribute can be used with the value custom. No behaviors are defined for how a processing agent should handle sections so identified, however. </a:documentation>
<ref name="z3998.index.attlist"/>
<ref name="z3998.index.model"/>
</element>
</define>
</div>
<div>
<define name="z3998.index.entry">
<element name="entry">
<a:documentation>The index entry element represents a single entry in an index , including all related child entries. The ref element can be used to link page number references back to the corresponding location in the document. </a:documentation>
<ref name="z3998.index.entry.attlist"/>
<ref name="z3998.index.entry.content"/>
<sch:rule context="default:entry[ancestor::default:index]">
<sch:assert test="normalize-space(.) or *">The entry element must neither be empty nor contain only whitespace. </sch:assert>
</sch:rule>
</element>
</define>
<define name="z3998.index.entry.attlist">
<ref name="z3998.Block.attrib"/>
</define>
<define name="z3998.index.entry.content">
<ref name="z3998.Phrase.Text.mix.model"/>
<zeroOrMore>
<choice>
<ref name="z3998.index.entry"/>
<ref name="z3998.Global.extra.class"/>
</choice>
</zeroOrMore>
</define>
</div>
<div>
<a:documentation>index - default content model contribution </a:documentation>
<define name="z3998.backmatter.content.class" combine="choice">
<ref name="z3998.index"/>
</define>
</div>
</grammar>