123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- <?xml version="1.0" encoding="UTF-8"?>
- <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:ctrl="http://nwalsh.com/xmlns/schema-control/" xmlns="http://relaxng.org/ns/structure/1.0">
- <start combine="choice">
- <choice>
- <ref name="db.equation"/>
- <ref name="db.informalequation"/>
- </choice>
- </start>
- <define name="db.formal.blocks" combine="choice">
- <ref name="db.equation"/>
- </define>
- <define name="db.informal.blocks" combine="choice">
- <ref name="db.informalequation"/>
- </define>
- <define name="db.math.inlines">
- <ref name="db.inlineequation"/>
- </define>
- <define name="db.domain.inlines" combine="choice">
- <ref name="db.math.inlines"/>
- </define>
- <define name="db.initializer.inlines" combine="choice">
- <ref name="db.mathphrase"/>
- </define>
-
- <define name="db.equation.content">
- <choice>
- <oneOrMore>
- <ref name="db.mediaobject"/>
- </oneOrMore>
- <oneOrMore>
- <ref name="db.mathphrase"/>
- </oneOrMore>
- </choice>
- </define>
- <define name="db.inlineequation.content">
- <choice>
- <oneOrMore>
- <ref name="db.inlinemediaobject"/>
- </oneOrMore>
- <oneOrMore>
- <ref name="db.mathphrase"/>
- </oneOrMore>
- </choice>
- </define>
-
- <div>
- <db:refname>equation</db:refname>
- <db:refpurpose>A displayed mathematical equation</db:refpurpose>
- <define name="db.equation.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db.equation.label.attribute">
- <ref name="db.label.attribute"/>
- </define>
- <define name="db.equation.attlist">
- <interleave>
- <optional>
- <ref name="db.equation.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- <optional>
- <ref name="db.equation.label.attribute"/>
- </optional>
- <optional>
- <ref name="db.pgwide.attribute"/>
- </optional>
- <optional>
- <ref name="db.floatstyle.attribute"/>
- </optional>
- </interleave>
- </define>
- <define name="db.equation.info">
- <ref name="db._info.title.only"/>
- </define>
- <define name="db.equation">
- <element name="equation">
- <ref name="db.equation.attlist"/>
- <ref name="db.equation.info"/>
- <optional>
- <ref name="db.alt"/>
- </optional>
- <ref name="db.equation.content"/>
- <optional>
- <ref name="db.caption"/>
- </optional>
- </element>
- </define>
- </div>
-
- <div>
- <db:refname>informalequation</db:refname>
- <db:refpurpose>A displayed mathematical equation without a title</db:refpurpose>
- <define name="db.informalequation.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db.informalequation.attlist">
- <interleave>
- <optional>
- <ref name="db.informalequation.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- </interleave>
- </define>
- <define name="db.informalequation.info">
- <ref name="db._info.title.forbidden"/>
- </define>
- <define name="db.informalequation">
- <element name="informalequation">
- <ref name="db.informalequation.attlist"/>
- <ref name="db.informalequation.info"/>
- <optional>
- <ref name="db.alt"/>
- </optional>
- <ref name="db.equation.content"/>
- <optional>
- <ref name="db.caption"/>
- </optional>
- </element>
- </define>
- </div>
-
- <div>
- <db:refname>inlineequation</db:refname>
- <db:refpurpose>A mathematical equation or expression occurring inline</db:refpurpose>
- <define name="db.inlineequation.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db.inlineequation.attlist">
- <interleave>
- <optional>
- <ref name="db.inlineequation.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- </interleave>
- </define>
- <define name="db.inlineequation">
- <element name="inlineequation">
- <ref name="db.inlineequation.attlist"/>
- <optional>
- <ref name="db.alt"/>
- </optional>
- <ref name="db.inlineequation.content"/>
- </element>
- </define>
- </div>
-
- <div>
- <db:refname>mathphrase</db:refname>
- <db:refpurpose>A mathematical phrase that can be represented with ordinary text and a small amount of markup</db:refpurpose>
- <define name="db.mathphrase.role.attribute">
- <attribute name="role"/>
- </define>
- <define name="db.mathphrase.attlist">
- <interleave>
- <optional>
- <ref name="db.mathphrase.role.attribute"/>
- </optional>
- <ref name="db.common.attributes"/>
- <ref name="db.common.linking.attributes"/>
- </interleave>
- </define>
- <define name="db.mathphrase">
- <element name="mathphrase">
- <ref name="db.mathphrase.attlist"/>
- <zeroOrMore>
- <choice>
- <ref name="db._text"/>
- <ref name="db.ubiq.inlines"/>
- <ref name="db._emphasis"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- </div>
- </grammar>
|