[15c7d39] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
| 2 | <!--
|
---|
| 3 | This file is part of DocBook V5.0
|
---|
| 4 |
|
---|
| 5 | Copyright 1992-2008 HaL Computer Systems, Inc.,
|
---|
| 6 | O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
|
---|
| 7 | Corporation, Norman Walsh, Sun Microsystems, Inc., and the
|
---|
| 8 | Organization for the Advancement of Structured Information
|
---|
| 9 | Standards (OASIS).
|
---|
| 10 |
|
---|
| 11 | Release: $Id: ebnf.rnc 8931 2010-10-20 13:29:20Z nwalsh $
|
---|
| 12 |
|
---|
| 13 | Permission to use, copy, modify and distribute the DocBook schema
|
---|
| 14 | and its accompanying documentation for any purpose and without fee
|
---|
| 15 | is hereby granted in perpetuity, provided that the above copyright
|
---|
| 16 | notice and this paragraph appear in all copies. The copyright
|
---|
| 17 | holders make no representation about the suitability of the schema
|
---|
| 18 | for any purpose. It is provided "as is" without expressed or implied
|
---|
| 19 | warranty.
|
---|
| 20 |
|
---|
| 21 | If you modify the DocBook schema in any way, label your schema as a
|
---|
| 22 | variant of DocBook. See the reference documentation
|
---|
| 23 | (http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook)
|
---|
| 24 | for more information.
|
---|
| 25 |
|
---|
| 26 | Please direct all questions, bug reports, or suggestions for changes
|
---|
| 27 | to the docbook@lists.oasis-open.org mailing list. For more
|
---|
| 28 | information, see http://www.oasis-open.org/docbook/.
|
---|
| 29 |
|
---|
| 30 | ======================================================================
|
---|
| 31 | -->
|
---|
| 32 | <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" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
---|
| 33 | <start combine="choice">
|
---|
| 34 | <choice>
|
---|
| 35 | <ref name="db.productionset"/>
|
---|
| 36 | <ref name="db.constraintdef"/>
|
---|
| 37 | </choice>
|
---|
| 38 | </start>
|
---|
| 39 | <define name="db.technical.inlines" combine="choice">
|
---|
| 40 | <ref name="db.nonterminal"/>
|
---|
| 41 | </define>
|
---|
| 42 | <define name="db.technical.blocks" combine="choice">
|
---|
| 43 | <choice>
|
---|
| 44 | <ref name="db.productionset"/>
|
---|
| 45 | <ref name="db.constraintdef"/>
|
---|
| 46 | </choice>
|
---|
| 47 | </define>
|
---|
| 48 | <!-- ====================================================================== -->
|
---|
| 49 | <div>
|
---|
| 50 | <db:refname>productionset</db:refname>
|
---|
| 51 | <db:refpurpose>A set of EBNF productions</db:refpurpose>
|
---|
| 52 | <define name="db.productionset.role.attribute">
|
---|
| 53 | <attribute name="role"/>
|
---|
| 54 | </define>
|
---|
| 55 | <define name="db.productionset.attlist">
|
---|
| 56 | <interleave>
|
---|
| 57 | <optional>
|
---|
| 58 | <ref name="db.productionset.role.attribute"/>
|
---|
| 59 | </optional>
|
---|
| 60 | <ref name="db.common.attributes"/>
|
---|
| 61 | <ref name="db.common.linking.attributes"/>
|
---|
| 62 | </interleave>
|
---|
| 63 | </define>
|
---|
| 64 | <define name="db.productionset.info">
|
---|
| 65 | <ref name="db._info.title.only"/>
|
---|
| 66 | </define>
|
---|
| 67 | <define name="db.productionset">
|
---|
| 68 | <element name="productionset">
|
---|
| 69 | <ref name="db.productionset.attlist"/>
|
---|
| 70 | <ref name="db.productionset.info"/>
|
---|
| 71 | <oneOrMore>
|
---|
| 72 | <choice>
|
---|
| 73 | <ref name="db.production"/>
|
---|
| 74 | <ref name="db.productionrecap"/>
|
---|
| 75 | </choice>
|
---|
| 76 | </oneOrMore>
|
---|
| 77 | </element>
|
---|
| 78 | </define>
|
---|
| 79 | </div>
|
---|
| 80 | <!-- ====================================================================== -->
|
---|
| 81 | <div>
|
---|
| 82 | <db:refname>production</db:refname>
|
---|
| 83 | <db:refpurpose>A production in a set of EBNF productions</db:refpurpose>
|
---|
| 84 | <define name="db.production.role.attribute">
|
---|
| 85 | <attribute name="role"/>
|
---|
| 86 | </define>
|
---|
| 87 | <define name="db.production.attlist">
|
---|
| 88 | <interleave>
|
---|
| 89 | <optional>
|
---|
| 90 | <ref name="db.production.role.attribute"/>
|
---|
| 91 | </optional>
|
---|
| 92 | <ref name="db.common.idreq.attributes"/>
|
---|
| 93 | <ref name="db.common.linking.attributes"/>
|
---|
| 94 | </interleave>
|
---|
| 95 | </define>
|
---|
| 96 | <define name="db.production">
|
---|
| 97 | <element name="production">
|
---|
| 98 | <ref name="db.production.attlist"/>
|
---|
| 99 | <ref name="db.lhs"/>
|
---|
| 100 | <ref name="db.rhs"/>
|
---|
| 101 | <zeroOrMore>
|
---|
| 102 | <ref name="db.constraint"/>
|
---|
| 103 | </zeroOrMore>
|
---|
| 104 | </element>
|
---|
| 105 | </define>
|
---|
| 106 | </div>
|
---|
| 107 | <!-- ====================================================================== -->
|
---|
| 108 | <div>
|
---|
| 109 | <db:refname>lhs</db:refname>
|
---|
| 110 | <db:refpurpose>The left-hand side of an EBNF production</db:refpurpose>
|
---|
| 111 | <define name="db.lhs.role.attribute">
|
---|
| 112 | <attribute name="role"/>
|
---|
| 113 | </define>
|
---|
| 114 | <define name="db.lhs.attlist">
|
---|
| 115 | <interleave>
|
---|
| 116 | <optional>
|
---|
| 117 | <ref name="db.lhs.role.attribute"/>
|
---|
| 118 | </optional>
|
---|
| 119 | <ref name="db.common.attributes"/>
|
---|
| 120 | <ref name="db.common.linking.attributes"/>
|
---|
| 121 | </interleave>
|
---|
| 122 | </define>
|
---|
| 123 | <define name="db.lhs">
|
---|
| 124 | <element name="lhs">
|
---|
| 125 | <ref name="db.lhs.attlist"/>
|
---|
| 126 | <text/>
|
---|
| 127 | </element>
|
---|
| 128 | </define>
|
---|
| 129 | </div>
|
---|
| 130 | <!-- ====================================================================== -->
|
---|
| 131 | <div>
|
---|
| 132 | <db:refname>rhs</db:refname>
|
---|
| 133 | <db:refpurpose>The right-hand side of an EBNF production</db:refpurpose>
|
---|
| 134 | <define name="db.rhs.role.attribute">
|
---|
| 135 | <attribute name="role"/>
|
---|
| 136 | </define>
|
---|
| 137 | <define name="db.rhs.attlist">
|
---|
| 138 | <interleave>
|
---|
| 139 | <optional>
|
---|
| 140 | <ref name="db.rhs.role.attribute"/>
|
---|
| 141 | </optional>
|
---|
| 142 | <ref name="db.common.attributes"/>
|
---|
| 143 | <ref name="db.common.linking.attributes"/>
|
---|
| 144 | </interleave>
|
---|
| 145 | </define>
|
---|
| 146 | <define name="db.rhs">
|
---|
| 147 | <element name="rhs">
|
---|
| 148 | <ref name="db.rhs.attlist"/>
|
---|
| 149 | <zeroOrMore>
|
---|
| 150 | <choice>
|
---|
| 151 | <text/>
|
---|
| 152 | <ref name="db.nonterminal"/>
|
---|
| 153 | <ref name="db.lineannotation"/>
|
---|
| 154 | <ref name="db.sbr"/>
|
---|
| 155 | </choice>
|
---|
| 156 | </zeroOrMore>
|
---|
| 157 | </element>
|
---|
| 158 | </define>
|
---|
| 159 | </div>
|
---|
| 160 | <!-- ====================================================================== -->
|
---|
| 161 | <div>
|
---|
| 162 | <db:refname>nonterminal</db:refname>
|
---|
| 163 | <db:refpurpose>A non-terminal in an EBNF production</db:refpurpose>
|
---|
| 164 | <define name="db.nonterminal.role.attribute">
|
---|
| 165 | <attribute name="role"/>
|
---|
| 166 | </define>
|
---|
| 167 | <define name="db.nonterminal.def.attribute">
|
---|
| 168 | <attribute name="def">
|
---|
| 169 | <db:refpurpose>Specifies a URI that points to a <db:tag>production</db:tag>
|
---|
| 170 | where the <db:tag>nonterminal</db:tag>
|
---|
| 171 | is defined</db:refpurpose>
|
---|
| 172 | <data type="anyURI"/>
|
---|
| 173 | </attribute>
|
---|
| 174 | </define>
|
---|
| 175 | <define name="db.nonterminal.attlist">
|
---|
| 176 | <interleave>
|
---|
| 177 | <optional>
|
---|
| 178 | <ref name="db.nonterminal.role.attribute"/>
|
---|
| 179 | </optional>
|
---|
| 180 | <ref name="db.common.attributes"/>
|
---|
| 181 | <ref name="db.common.linking.attributes"/>
|
---|
| 182 | <ref name="db.nonterminal.def.attribute"/>
|
---|
| 183 | </interleave>
|
---|
| 184 | </define>
|
---|
| 185 | <define name="db.nonterminal">
|
---|
| 186 | <element name="nonterminal">
|
---|
| 187 | <ref name="db.nonterminal.attlist"/>
|
---|
| 188 | <text/>
|
---|
| 189 | </element>
|
---|
| 190 | </define>
|
---|
| 191 | </div>
|
---|
| 192 | <!-- ====================================================================== -->
|
---|
| 193 | <div>
|
---|
| 194 | <db:refname>constraint</db:refname>
|
---|
| 195 | <db:refpurpose>A constraint in an EBNF production</db:refpurpose>
|
---|
| 196 | <define name="db.constraint.role.attribute">
|
---|
| 197 | <attribute name="role"/>
|
---|
| 198 | </define>
|
---|
| 199 | <define name="db.constraint.attlist">
|
---|
| 200 | <interleave>
|
---|
| 201 | <optional>
|
---|
| 202 | <ref name="db.constraint.role.attribute"/>
|
---|
| 203 | </optional>
|
---|
| 204 | <ref name="db.common.attributes"/>
|
---|
| 205 | <ref name="db.common.req.linking.attributes"/>
|
---|
| 206 | </interleave>
|
---|
| 207 | </define>
|
---|
| 208 | <define name="db.constraint">
|
---|
| 209 | <element name="constraint">
|
---|
| 210 | <ref name="db.constraint.attlist"/>
|
---|
| 211 | <empty/>
|
---|
| 212 | </element>
|
---|
| 213 | </define>
|
---|
| 214 | </div>
|
---|
| 215 | <!-- ====================================================================== -->
|
---|
| 216 | <div>
|
---|
| 217 | <db:refname>productionrecap</db:refname>
|
---|
| 218 | <db:refpurpose>A cross-reference to an EBNF production</db:refpurpose>
|
---|
| 219 | <define name="db.productionrecap.role.attribute">
|
---|
| 220 | <attribute name="role"/>
|
---|
| 221 | </define>
|
---|
| 222 | <define name="db.productionrecap.attlist">
|
---|
| 223 | <interleave>
|
---|
| 224 | <optional>
|
---|
| 225 | <ref name="db.productionrecap.role.attribute"/>
|
---|
| 226 | </optional>
|
---|
| 227 | <ref name="db.common.attributes"/>
|
---|
| 228 | <ref name="db.common.req.linking.attributes"/>
|
---|
| 229 | </interleave>
|
---|
| 230 | </define>
|
---|
| 231 | <define name="db.productionrecap">
|
---|
| 232 | <element name="productionrecap">
|
---|
| 233 | <ref name="db.productionrecap.attlist"/>
|
---|
| 234 | <empty/>
|
---|
| 235 | </element>
|
---|
| 236 | </define>
|
---|
| 237 | </div>
|
---|
| 238 | <!-- ====================================================================== -->
|
---|
| 239 | <div>
|
---|
| 240 | <db:refname>constraintdef</db:refname>
|
---|
| 241 | <db:refpurpose>The definition of a constraint in an EBNF production</db:refpurpose>
|
---|
| 242 | <define name="db.constraintdef.role.attribute">
|
---|
| 243 | <attribute name="role"/>
|
---|
| 244 | </define>
|
---|
| 245 | <define name="db.constraintdef.attlist">
|
---|
| 246 | <interleave>
|
---|
| 247 | <optional>
|
---|
| 248 | <ref name="db.constraintdef.role.attribute"/>
|
---|
| 249 | </optional>
|
---|
| 250 | <ref name="db.common.attributes"/>
|
---|
| 251 | <ref name="db.common.linking.attributes"/>
|
---|
| 252 | </interleave>
|
---|
| 253 | </define>
|
---|
| 254 | <define name="db.constraintdef.info">
|
---|
| 255 | <ref name="db._info.title.only"/>
|
---|
| 256 | </define>
|
---|
| 257 | <define name="db.constraintdef">
|
---|
| 258 | <element name="constraintdef">
|
---|
| 259 | <ref name="db.constraintdef.attlist"/>
|
---|
| 260 | <ref name="db.constraintdef.info"/>
|
---|
| 261 | <oneOrMore>
|
---|
| 262 | <ref name="db.all.blocks"/>
|
---|
| 263 | </oneOrMore>
|
---|
| 264 | </element>
|
---|
| 265 | </define>
|
---|
| 266 | </div>
|
---|
| 267 | </grammar>
|
---|