123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513 |
- <?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: glossary.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/.
-
- ======================================================================
- -->
- <grammar ns="http://docbook.org/ns/docbook" xmlns:db="http://docbook.org/ns/docbook" xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
- <start combine="choice">
- <choice>
- <ref name="db.glossary"/>
- <ref name="db.glossdiv"/>
- <ref name="db.glosslist"/>
- </choice>
- </start>
- <define name="db.publishing.inlines" combine="choice">
- <ref name="db.glossary.inlines"/>
- </define>
- <define name="db.list.blocks" combine="choice">
- <ref name="db.glosslist"/>
- </define>
- <define name="db.navigation.components" combine="choice">
- <ref name="db.glossary"/>
- </define>
- <define name="db.glossary.inlines">
- <choice>
- <ref name="db.firstterm"/>
- <ref name="db.glossterm"/>
- <ref name="db._firstterm"/>
- <ref name="db._glossterm"/>
- </choice>
- </define>
- <define name="db.ubiq.inlines" combine="choice">
- <choice>
- <ref name="db._firstterm"/>
- <ref name="db._glossterm"/>
- </choice>
- </define>
- <!-- ====================================================================== -->
- <define name="db.baseform.attribute">
- <optional>
- <attribute name="baseform">
- <db:refpurpose>Specifies the base form of the term, the one that appears in the glossary. This allows adjectival, plural, and other variations of the term to appear in the element. The element content is the default base form.</db:refpurpose>
- </attribute>
- </optional>
- </define>
- <!-- ====================================================================== -->
- <div>
- <db:refname>glosslist</db:refname>
- <db:refpurpose>A wrapper for a list of glossary entries</db:refpurpose>
- <define name="db.glosslist.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db.glosslist.attlist">
- <interleave>
- <optional>
- <ref name="db.glosslist.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- </interleave>
- </define>
- <define name="db.glosslist.info">
- <ref name="db._info.title.only"/>
- </define>
- <define name="db.glosslist">
- <element name="glosslist">
- <ref name="db.glosslist.attlist"/>
- <optional>
- <ref name="db.glosslist.info"/>
- </optional>
- <zeroOrMore>
- <ref name="db.all.blocks"/>
- </zeroOrMore>
- <oneOrMore>
- <ref name="db.glossentry"/>
- </oneOrMore>
- </element>
- </define>
- </div>
- <!-- ====================================================================== -->
- <div>
- <db:refname>glossentry</db:refname>
- <db:refpurpose>An entry in a glossary or glosslist</db:refpurpose>
- <define name="db.glossentry.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db.glossentry.sortas.attribute">
- <attribute name="sortas">
- <db:refpurpose>Specifies the string by which the element's content is to be sorted; if unspecified, the content is used</db:refpurpose>
- </attribute>
- </define>
- <define name="db.glossentry.attlist">
- <interleave>
- <optional>
- <ref name="db.glossentry.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- <optional>
- <ref name="db.glossentry.sortas.attribute"/>
- </optional>
- </interleave>
- </define>
- <define name="db.glossentry">
- <element name="glossentry">
- <ref name="db.glossentry.attlist"/>
- <ref name="db.glossterm"/>
- <optional>
- <ref name="db.acronym"/>
- </optional>
- <optional>
- <ref name="db.abbrev"/>
- </optional>
- <zeroOrMore>
- <ref name="db.indexterm"/>
- </zeroOrMore>
- <choice>
- <ref name="db.glosssee"/>
- <oneOrMore>
- <ref name="db.glossdef"/>
- </oneOrMore>
- </choice>
- </element>
- </define>
- </div>
- <!-- ====================================================================== -->
- <div>
- <db:refname>glossdef</db:refname>
- <db:refpurpose>A definition in a glossentry</db:refpurpose>
- <define name="db.glossdef.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db.glossdef.subject.attribute">
- <attribute name="subject">
- <db:refpurpose>Specifies a list of keywords for the definition</db:refpurpose>
- </attribute>
- </define>
- <define name="db.glossdef.attlist">
- <interleave>
- <optional>
- <ref name="db.glossdef.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- <optional>
- <ref name="db.glossdef.subject.attribute"/>
- </optional>
- </interleave>
- </define>
- <define name="db.glossdef">
- <element name="glossdef">
- <ref name="db.glossdef.attlist"/>
- <oneOrMore>
- <ref name="db.all.blocks"/>
- </oneOrMore>
- <zeroOrMore>
- <ref name="db.glossseealso"/>
- </zeroOrMore>
- </element>
- </define>
- </div>
- <!-- ====================================================================== -->
- <div>
- <db:refname>glosssee</db:refname>
- <db:refpurpose>A cross-reference from one <db:tag>glossentry</db:tag>
- to another</db:refpurpose>
- <define name="db.glosssee.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db.glosssee.otherterm.attribute">
- <attribute name="otherterm">
- <db:refpurpose>Identifies the other term</db:refpurpose>
- <data type="IDREF"/>
- </attribute>
- </define>
- <define name="db.glosssee.attlist">
- <interleave>
- <optional>
- <ref name="db.glosssee.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- <optional>
- <ref name="db.glosssee.otherterm.attribute"/>
- </optional>
- </interleave>
- </define>
- <define name="db.glosssee">
- <element name="glosssee">
- <s:pattern name="Glosssary 'see' type constraint">
- <s:rule context="db:glosssee[@otherterm]">
- <s:assert test="local-name(//*[@xml:id=current()/@otherterm]) = 'glossentry' and namespace-uri(//*[@xml:id=current()/@otherterm]) = 'http://docbook.org/ns/docbook'">@otherterm on glosssee must point to a glossentry.</s:assert>
- </s:rule>
- </s:pattern>
- <ref name="db.glosssee.attlist"/>
- <zeroOrMore>
- <ref name="db.all.inlines"/>
- </zeroOrMore>
- </element>
- </define>
- </div>
- <!-- ====================================================================== -->
- <div>
- <db:refname>glossseealso</db:refname>
- <db:refpurpose>A cross-reference from one glossentry to another</db:refpurpose>
- <define name="db.glossseealso.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db.glossseealso.otherterm.attribute">
- <attribute name="otherterm">
- <db:refpurpose>Identifies the other term</db:refpurpose>
- <data type="IDREF"/>
- </attribute>
- </define>
- <define name="db.glossseealso.attlist">
- <interleave>
- <optional>
- <ref name="db.glossseealso.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- <optional>
- <ref name="db.glossseealso.otherterm.attribute"/>
- </optional>
- </interleave>
- </define>
- <define name="db.glossseealso">
- <element name="glossseealso">
- <s:pattern name="Glossary 'seealso' type constraint">
- <s:rule context="db:glossseealso[@otherterm]">
- <s:assert test="local-name(//*[@xml:id=current()/@otherterm]) = 'glossentry' and namespace-uri(//*[@xml:id=current()/@otherterm]) = 'http://docbook.org/ns/docbook'">@otherterm on glossseealso must point to a glossentry.</s:assert>
- </s:rule>
- </s:pattern>
- <ref name="db.glossseealso.attlist"/>
- <zeroOrMore>
- <ref name="db.all.inlines"/>
- </zeroOrMore>
- </element>
- </define>
- </div>
- <!-- ====================================================================== -->
- <div>
- <db:refname>firstterm</db:refname>
- <db:refpurpose>The first occurrence of a term</db:refpurpose>
- <define name="db.firstterm.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db.firstterm.attlist">
- <interleave>
- <optional>
- <ref name="db.firstterm.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- <ref name="db.baseform.attribute"/>
- </interleave>
- </define>
- <define name="db.firstterm">
- <element name="firstterm">
- <s:pattern name="Glossary 'firstterm' type constraint">
- <s:rule context="db:firstterm[@linkend]">
- <s:assert test="local-name(//*[@xml:id=current()/@linkend]) = 'glossentry' and namespace-uri(//*[@xml:id=current()/@linkend]) = 'http://docbook.org/ns/docbook'">@linkend on firstterm must point to a glossentry.</s:assert>
- </s:rule>
- </s:pattern>
- <ref name="db.firstterm.attlist"/>
- <zeroOrMore>
- <ref name="db.all.inlines"/>
- </zeroOrMore>
- </element>
- </define>
- </div>
- <!-- ====================================================================== -->
- <div>
- <db:refname>firstterm</db:refname>
- <db:refpurpose>The first occurrence of a term, with limited content</db:refpurpose>
- <define name="db._firstterm.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db._firstterm.attlist">
- <interleave>
- <optional>
- <ref name="db._firstterm.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- <ref name="db.baseform.attribute"/>
- </interleave>
- </define>
- <define name="db._firstterm">
- <element name="firstterm">
- <s:pattern name="Glossary 'firstterm' type constraint">
- <s:rule context="db:firstterm[@linkend]">
- <s:assert test="local-name(//*[@xml:id=current()/@linkend]) = 'glossentry' and namespace-uri(//*[@xml:id=current()/@linkend]) = 'http://docbook.org/ns/docbook'">@linkend on firstterm must point to a glossentry.</s:assert>
- </s:rule>
- </s:pattern>
- <ref name="db._firstterm.attlist"/>
- <ref name="db._text"/>
- </element>
- </define>
- </div>
- <!-- ====================================================================== -->
- <div>
- <db:refname>glossterm</db:refname>
- <db:refpurpose>A glossary term</db:refpurpose>
- <define name="db.glossterm.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db.glossterm.attlist">
- <interleave>
- <optional>
- <ref name="db.glossterm.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- <ref name="db.baseform.attribute"/>
- </interleave>
- </define>
- <define name="db.glossterm">
- <element name="glossterm">
- <s:pattern name="Glossary 'glossterm' type constraint">
- <s:rule context="db:glossterm[@linkend]">
- <s:assert test="local-name(//*[@xml:id=current()/@linkend]) = 'glossentry' and namespace-uri(//*[@xml:id=current()/@linkend]) = 'http://docbook.org/ns/docbook'">@linkend on glossterm must point to a glossentry.</s:assert>
- </s:rule>
- </s:pattern>
- <ref name="db.glossterm.attlist"/>
- <zeroOrMore>
- <ref name="db.all.inlines"/>
- </zeroOrMore>
- </element>
- </define>
- </div>
- <!-- ====================================================================== -->
- <div>
- <db:refname>glossterm</db:refname>
- <db:refpurpose>A glossary term</db:refpurpose>
- <define name="db._glossterm.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db._glossterm.attlist">
- <interleave>
- <optional>
- <ref name="db._glossterm.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- <ref name="db.baseform.attribute"/>
- </interleave>
- </define>
- <define name="db._glossterm">
- <element name="glossterm">
- <s:pattern name="Glossary 'glossterm' type constraint">
- <s:rule context="db:glossterm[@linkend]">
- <s:assert test="local-name(//*[@xml:id=current()/@linkend]) = 'glossentry' and namespace-uri(//*[@xml:id=current()/@linkend]) = 'http://docbook.org/ns/docbook'">@linkend on glossterm must point to a glossentry.</s:assert>
- </s:rule>
- </s:pattern>
- <ref name="db._glossterm.attlist"/>
- <ref name="db._text"/>
- </element>
- </define>
- </div>
- <!-- ====================================================================== -->
- <div>
- <db:refname>glossary</db:refname>
- <db:refpurpose>A glossary</db:refpurpose>
- <define name="db.glossary.status.attribute">
- <ref name="db.status.attribute"/>
- </define>
- <define name="db.glossary.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db.glossary.attlist">
- <interleave>
- <optional>
- <ref name="db.glossary.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- <optional>
- <ref name="db.label.attribute"/>
- </optional>
- <optional>
- <ref name="db.glossary.status.attribute"/>
- </optional>
- </interleave>
- </define>
- <define name="db.glossary.info">
- <ref name="db._info"/>
- </define>
- <define name="db.glossary">
- <element name="glossary">
- <ref name="db.glossary.attlist"/>
- <ref name="db.glossary.info"/>
- <zeroOrMore>
- <ref name="db.all.blocks"/>
- </zeroOrMore>
- <choice>
- <zeroOrMore>
- <ref name="db.glossdiv"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="db.glossentry"/>
- </zeroOrMore>
- </choice>
- <optional>
- <ref name="db.bibliography"/>
- </optional>
- </element>
- </define>
- </div>
- <!-- ====================================================================== -->
- <div>
- <db:refname>glossdiv</db:refname>
- <db:refpurpose>A division in a glossary</db:refpurpose>
- <define name="db.glossdiv.status.attribute">
- <ref name="db.status.attribute"/>
- </define>
- <define name="db.glossdiv.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db.glossdiv.attlist">
- <interleave>
- <optional>
- <ref name="db.glossdiv.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- <optional>
- <ref name="db.label.attribute"/>
- </optional>
- <optional>
- <ref name="db.glossdiv.status.attribute"/>
- </optional>
- </interleave>
- </define>
- <define name="db.glossdiv.info">
- <ref name="db._info.title.req"/>
- </define>
- <define name="db.glossdiv">
- <element name="glossdiv">
- <ref name="db.glossdiv.attlist"/>
- <ref name="db.glossdiv.info"/>
- <zeroOrMore>
- <ref name="db.all.blocks"/>
- </zeroOrMore>
- <oneOrMore>
- <ref name="db.glossentry"/>
- </oneOrMore>
- </element>
- </define>
- </div>
- <!-- ====================================================================== -->
- <define name="db.technical.inlines" combine="choice">
- <ref name="db.termdef"/>
- </define>
- <div>
- <db:refname>termdef</db:refname>
- <db:refpurpose>An inline definition of a term</db:refpurpose>
- <define name="db.termdef.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db.termdef.attlist">
- <interleave>
- <optional>
- <ref name="db.termdef.role.attribute"/>
- </optional>
- <optional>
- <ref name="db.glossentry.sortas.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- <ref name="db.baseform.attribute"/>
- </interleave>
- </define>
- <define name="db.termdef">
- <element name="termdef">
- <s:pattern name="Glossary term definition constraint">
- <s:rule context="db:termdef">
- <s:assert test="count(db:firstterm) = 1">A termdef must contain exactly one firstterm</s:assert>
- </s:rule>
- </s:pattern>
- <ref name="db.termdef.attlist"/>
- <zeroOrMore>
- <ref name="db.all.inlines"/>
- </zeroOrMore>
- </element>
- </define>
- </div>
- </grammar>
|