RelaxNG/publidoc.rng
author Patrick PIERRE <patrick.pierre@prismallia.fr>
mar., 27 sept. 2011 17:12:04 +0200
changeset 42 32381a87f807
parent 41 adde3c1288f2
child 43 5be33d03941a
permissions -rw-r--r--
Ajout des ancres et des mathématiques
patrick@0
     1
<?xml version="1.0" encoding="UTF-8"?>
patrick@0
     2
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
patrick@0
     3
  <!-- $Id$ -->
patrick@0
     4
  <start>
patrick@0
     5
    <ref name="publidoc"/>
patrick@0
     6
  </start>
patrick@0
     7
  <define name="publidoc">
patrick@0
     8
    <element name="publidoc">
patrick@0
     9
      <ref name="publidoc.attributes"/>
patrick@0
    10
      <ref name="publidoc.content"/>
patrick@0
    11
    </element>
patrick@0
    12
  </define>
patrick@0
    13
  <define name="publidoc.attributes">
patrick@0
    14
    <ref name="version.attribute"/>
patrick@0
    15
  </define>
patrick@0
    16
  <define name="version.attribute">
patrick@0
    17
    <attribute name="version">
patrick@0
    18
      <value>1.0</value>
patrick@0
    19
    </attribute>
patrick@0
    20
  </define>
patrick@0
    21
  <define name="publidoc.content">
patrick@0
    22
    <choice>
patrick@0
    23
      <ref name="document"/>
patrick@0
    24
      <ref name="top.topic"/>
patrick@0
    25
    </choice>
patrick@0
    26
  </define>
patrick@0
    27
  <!--
patrick@0
    28
    =============================================================================
patrick@20
    29
                                     TOP LEVEL
patrick@0
    30
    =============================================================================
patrick@0
    31
  -->
patrick@0
    32
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ document ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
    33
  <define name="document">
patrick@0
    34
    <element name="document">
patrick@0
    35
      <ref name="document.attributes"/>
patrick@0
    36
      <ref name="document.content"/>
patrick@0
    37
    </element>
patrick@0
    38
  </define>
patrick@0
    39
  <define name="document.attributes">
patrick@0
    40
    <ref name="document.id.attribute"/>
patrick@0
    41
  </define>
patrick@0
    42
  <define name="document.id.attribute">
patrick@0
    43
    <attribute name="xml:id">
patrick@0
    44
      <data type="ID"/>
patrick@0
    45
    </attribute>
patrick@0
    46
  </define>
patrick@0
    47
  <define name="document.content">
patrick@0
    48
    <optional>
patrick@20
    49
      <ref name="top.head"/>
patrick@0
    50
    </optional>
patrick@0
    51
    <choice>
patrick@0
    52
      <oneOrMore>
patrick@0
    53
        <ref name="division"/>
patrick@0
    54
      </oneOrMore>
patrick@0
    55
      <oneOrMore>
patrick@0
    56
        <ref name="topic"/>
patrick@0
    57
      </oneOrMore>
patrick@0
    58
    </choice>
patrick@0
    59
  </define>
patrick@0
    60
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
    61
  <define name="top.topic">
patrick@0
    62
    <element name="topic">
patrick@0
    63
      <ref name="top.topic.attributes"/>
patrick@20
    64
      <ref name="top.topic.content"/>
patrick@0
    65
    </element>
patrick@0
    66
  </define>
patrick@20
    67
  <define name="top.topic.attributes">
patrick@20
    68
    <interleave>
patrick@20
    69
      <ref name="topic.id.attribute"/>
patrick@20
    70
      <optional>
patrick@20
    71
        <ref name="topic.type.attribute"/>
patrick@20
    72
      </optional>
patrick@20
    73
    </interleave>
patrick@20
    74
  </define>
patrick@20
    75
  <define name="topic.id.attribute">
patrick@20
    76
    <attribute name="xml:id">
patrick@20
    77
      <data type="ID"/>
patrick@20
    78
    </attribute>
patrick@20
    79
  </define>
patrick@20
    80
  <define name="topic.type.attribute">
patrick@20
    81
    <attribute name="type">
patrick@20
    82
      <data type="NCName"/>
patrick@20
    83
    </attribute>
patrick@20
    84
  </define>
patrick@20
    85
  <define name="top.topic.content">
patrick@20
    86
    <optional>
patrick@20
    87
      <ref name="top.head"/>
patrick@20
    88
    </optional>
patrick@20
    89
    <oneOrMore>
patrick@20
    90
      <ref name="section"/>
patrick@20
    91
    </oneOrMore>
patrick@20
    92
  </define>
patrick@0
    93
  <!--
patrick@0
    94
    =============================================================================
patrick@20
    95
                                    HEAD LEVEL
patrick@0
    96
    =============================================================================
patrick@0
    97
  -->
patrick@20
    98
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@20
    99
  <define name="top.head">
patrick@20
   100
    <element name="head">
patrick@20
   101
      <ref name="top.head.content"/>
patrick@0
   102
    </element>
patrick@0
   103
  </define>
patrick@20
   104
  <define name="division.head">
patrick@20
   105
    <element name="head">
patrick@20
   106
      <ref name="division.head.content"/>
patrick@20
   107
    </element>
patrick@20
   108
  </define>
patrick@20
   109
  <define name="component.head">
patrick@20
   110
    <element name="head">
patrick@20
   111
      <ref name="component.head.content"/>
patrick@20
   112
    </element>
patrick@20
   113
  </define>
patrick@20
   114
  <define name="section.head">
patrick@20
   115
    <element name="head">
patrick@20
   116
      <ref name="section.head.content"/>
patrick@20
   117
    </element>
patrick@20
   118
  </define>
patrick@20
   119
  <define name="block.head">
patrick@20
   120
    <element name="head">
patrick@20
   121
      <ref name="block.head.content"/>
patrick@20
   122
    </element>
patrick@20
   123
  </define>
patrick@20
   124
  <define name="top.head.content">
patrick@0
   125
    <interleave>
patrick@0
   126
      <optional>
patrick@20
   127
        <ref name="title"/>
patrick@20
   128
        <optional>
patrick@20
   129
          <ref name="subtitle"/>
patrick@20
   130
        </optional>
patrick@20
   131
      </optional>
patrick@34
   132
      <zeroOrMore>
patrick@34
   133
        <ref name="identifier"/>
patrick@34
   134
      </zeroOrMore>
patrick@20
   135
      <optional>
patrick@20
   136
        <ref name="language"/>
patrick@0
   137
      </optional>
patrick@39
   138
      <optional>
patrick@39
   139
        <ref name="copyright"/>
patrick@39
   140
      </optional>
patrick@0
   141
      <zeroOrMore>
patrick@0
   142
        <ref name="author"/>
patrick@0
   143
      </zeroOrMore>
patrick@0
   144
      <optional>
patrick@0
   145
        <ref name="publisher"/>
patrick@0
   146
      </optional>
patrick@0
   147
      <optional>
patrick@0
   148
        <ref name="date"/>
patrick@0
   149
      </optional>
patrick@0
   150
      <optional>
patrick@0
   151
        <ref name="place"/>
patrick@0
   152
      </optional>
patrick@0
   153
      <zeroOrMore>
patrick@0
   154
        <ref name="source"/>
patrick@0
   155
      </zeroOrMore>
patrick@0
   156
      <optional>
patrick@40
   157
        <ref name="keywordset"/>
patrick@40
   158
      </optional>
patrick@40
   159
      <optional>
patrick@0
   160
        <ref name="subjectset"/>
patrick@0
   161
      </optional>
patrick@0
   162
      <optional>
patrick@0
   163
        <ref name="abstract"/>
patrick@0
   164
      </optional>
patrick@35
   165
      <optional>
patrick@35
   166
        <ref name="cover"/>
patrick@35
   167
      </optional>
patrick@0
   168
      <zeroOrMore>
patrick@0
   169
        <ref name="annotation"/>
patrick@0
   170
      </zeroOrMore>
patrick@0
   171
    </interleave>
patrick@0
   172
  </define>
patrick@20
   173
  <define name="division.head.content">
patrick@20
   174
    <interleave>
patrick@20
   175
      <optional>
patrick@20
   176
        <ref name="title"/>
patrick@20
   177
        <optional>
patrick@20
   178
          <ref name="subtitle"/>
patrick@20
   179
        </optional>
patrick@20
   180
      </optional>
patrick@20
   181
      <optional>
patrick@20
   182
        <ref name="language"/>
patrick@20
   183
      </optional>
patrick@20
   184
      <zeroOrMore>
patrick@20
   185
        <ref name="annotation"/>
patrick@20
   186
      </zeroOrMore>
patrick@20
   187
    </interleave>
patrick@20
   188
  </define>
patrick@20
   189
  <define name="component.head.content">
patrick@20
   190
    <interleave>
patrick@20
   191
      <optional>
patrick@20
   192
        <ref name="title"/>
patrick@20
   193
        <optional>
patrick@20
   194
          <ref name="subtitle"/>
patrick@20
   195
        </optional>
patrick@20
   196
      </optional>
patrick@20
   197
      <optional>
patrick@20
   198
        <ref name="language"/>
patrick@20
   199
      </optional>
patrick@20
   200
      <zeroOrMore>
patrick@20
   201
        <ref name="author"/>
patrick@20
   202
      </zeroOrMore>
patrick@41
   203
      <optional>
patrick@41
   204
        <ref name="abstract"/>
patrick@41
   205
      </optional>
patrick@20
   206
      <zeroOrMore>
patrick@20
   207
        <ref name="annotation"/>
patrick@20
   208
      </zeroOrMore>
patrick@20
   209
    </interleave>
patrick@20
   210
  </define>
patrick@20
   211
  <define name="section.head.content">
patrick@20
   212
    <interleave>
patrick@20
   213
      <optional>
patrick@20
   214
        <ref name="title"/>
patrick@20
   215
        <optional>
patrick@20
   216
          <ref name="subtitle"/>
patrick@20
   217
        </optional>
patrick@20
   218
      </optional>
patrick@20
   219
      <optional>
patrick@20
   220
        <ref name="language"/>
patrick@20
   221
      </optional>
patrick@41
   222
      <optional>
patrick@41
   223
        <ref name="abstract"/>
patrick@41
   224
      </optional>
patrick@20
   225
      <zeroOrMore>
patrick@20
   226
        <ref name="annotation"/>
patrick@20
   227
      </zeroOrMore>
patrick@20
   228
    </interleave>
patrick@20
   229
  </define>
patrick@20
   230
  <define name="block.head.content">
patrick@20
   231
    <optional>
patrick@20
   232
      <ref name="title"/>
patrick@20
   233
      <optional>
patrick@20
   234
        <ref name="subtitle"/>
patrick@20
   235
      </optional>
patrick@20
   236
    </optional>
patrick@20
   237
  </define>
patrick@0
   238
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   239
  <define name="title">
patrick@0
   240
    <element name="title">
patrick@0
   241
      <ref name="title.content"/>
patrick@0
   242
    </element>
patrick@0
   243
  </define>
patrick@0
   244
  <define name="subtitle">
patrick@0
   245
    <element name="subtitle">
patrick@0
   246
      <ref name="title.content"/>
patrick@0
   247
    </element>
patrick@0
   248
  </define>
patrick@20
   249
  <define name="title.content">
patrick@20
   250
    <ref name="inlines"/>
patrick@20
   251
  </define>
patrick@34
   252
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@38
   253
  <define name="identifier.uri">
patrick@34
   254
    <element name="identifier">
patrick@38
   255
      <attribute name="type">
patrick@38
   256
        <value>uri</value>
patrick@38
   257
      </attribute>
patrick@38
   258
      <data type="anyURI"/>
patrick@34
   259
    </element>
patrick@34
   260
  </define>
patrick@38
   261
  <define name="identifier.ean">
patrick@38
   262
    <element name="identifier">
patrick@38
   263
      <attribute name="type">
patrick@38
   264
        <value>ean</value>
patrick@38
   265
      </attribute>
patrick@38
   266
      <data type="token">
patrick@38
   267
        <param name="pattern">\d{13}</param>
patrick@38
   268
      </data>
patrick@38
   269
    </element>
patrick@34
   270
  </define>
patrick@38
   271
  <define name="identifier">
patrick@34
   272
    <choice>
patrick@38
   273
      <ref name="identifier.uri"/>
patrick@38
   274
      <ref name="identifier.ean"/>
patrick@34
   275
    </choice>
patrick@34
   276
  </define>
patrick@20
   277
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@20
   278
  <define name="language">
patrick@20
   279
    <element name="language">
patrick@20
   280
      <ref name="language.attributes"/>
patrick@20
   281
    </element>
patrick@20
   282
  </define>
patrick@20
   283
  <define name="language.attributes">
patrick@20
   284
    <ref name="lang.attribute"/>
patrick@20
   285
  </define>
patrick@20
   286
  <define name="lang.attribute">
patrick@20
   287
    <attribute name="xml:lang">
patrick@20
   288
      <data type="language"/>
patrick@20
   289
    </attribute>
patrick@20
   290
  </define>
patrick@39
   291
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@39
   292
  <define name="copyright">
patrick@39
   293
    <element name="copyright">
patrick@39
   294
      <ref name="copyright.content"/>
patrick@39
   295
    </element>
patrick@39
   296
  </define>
patrick@39
   297
  <define name="copyright.content">
patrick@39
   298
    <ref name="inlines"/>
patrick@39
   299
  </define>
patrick@0
   300
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
   301
  <!-- ~~~~~~ author -->
patrick@0
   302
  <define name="author">
patrick@0
   303
    <element name="author">
patrick@0
   304
      <ref name="author.content"/>
patrick@0
   305
    </element>
patrick@0
   306
  </define>
patrick@33
   307
  <define name="author.attributes">
patrick@33
   308
    <optional>
patrick@33
   309
      <ref name="role.attribute"/>
patrick@33
   310
    </optional>
patrick@33
   311
  </define>
patrick@33
   312
  <define name="role.attribute">
patrick@33
   313
    <attribute name="role">
patrick@33
   314
      <choice>
patrick@33
   315
        <value>author</value>
patrick@33
   316
        <value>illustrator</value>
patrick@33
   317
      </choice>
patrick@33
   318
    </attribute>
patrick@33
   319
  </define>
patrick@0
   320
  <define name="author.content">
patrick@0
   321
    <optional>
patrick@0
   322
      <ref name="firstname"/>
patrick@0
   323
    </optional>
patrick@0
   324
    <ref name="lastname"/>
patrick@33
   325
    <zeroOrMore>
patrick@33
   326
      <ref name="role"/>
patrick@33
   327
    </zeroOrMore>
patrick@33
   328
  </define>
patrick@5
   329
  <!-- ~~~~~~ publisher -->
patrick@0
   330
  <define name="publisher">
patrick@0
   331
    <element name="publisher">
patrick@0
   332
      <ref name="publisher.content"/>
patrick@0
   333
    </element>
patrick@0
   334
  </define>
patrick@0
   335
  <define name="publisher.content">
patrick@34
   336
    <ref name="label"/>
patrick@34
   337
    <optional>
patrick@36
   338
      <ref name="link"/>
patrick@34
   339
    </optional>
patrick@0
   340
  </define>
patrick@5
   341
  <!-- ~~~~~~ firstname -->
patrick@5
   342
  <define name="firstname">
patrick@5
   343
    <element name="firstname">
patrick@5
   344
      <ref name="firstname.content"/>
patrick@5
   345
    </element>
patrick@5
   346
  </define>
patrick@5
   347
  <define name="firstname.content">
patrick@5
   348
    <ref name="inlines"/>
patrick@5
   349
  </define>
patrick@5
   350
  <!-- ~~~~~~ lastname -->
patrick@5
   351
  <define name="lastname">
patrick@5
   352
    <element name="lastname">
patrick@5
   353
      <ref name="lastname.content"/>
patrick@5
   354
    </element>
patrick@5
   355
  </define>
patrick@5
   356
  <define name="lastname.content">
patrick@5
   357
    <ref name="inlines"/>
patrick@5
   358
  </define>
patrick@34
   359
  <!-- ~~~~~~ role -->
patrick@34
   360
  <define name="role">
patrick@34
   361
    <element name="role">
patrick@34
   362
      <ref name="role.attributes"/>
patrick@34
   363
    </element>
patrick@34
   364
  </define>
patrick@34
   365
  <define name="role.attributes">
patrick@34
   366
    <ref name="role.of.attribute"/>
patrick@34
   367
  </define>
patrick@34
   368
  <define name="role.of.attribute">
patrick@34
   369
    <attribute name="of">
patrick@34
   370
      <choice>
patrick@34
   371
        <value>author</value>
patrick@34
   372
        <value>illustrator</value>
patrick@34
   373
      </choice>
patrick@34
   374
    </attribute>
patrick@34
   375
  </define>
patrick@38
   376
  <!-- ~~~~~~ label -->
patrick@38
   377
  <define name="label">
patrick@38
   378
    <element name="label">
patrick@38
   379
      <ref name="label.content"/>
patrick@38
   380
    </element>
patrick@38
   381
  </define>
patrick@38
   382
  <define name="label.content">
patrick@38
   383
    <ref name="inlines"/>
patrick@38
   384
  </define>
patrick@2
   385
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   386
  <define name="place">
patrick@2
   387
    <element name="place">
patrick@2
   388
      <ref name="place.content"/>
patrick@2
   389
    </element>
patrick@2
   390
  </define>
patrick@2
   391
  <define name="place.content">
patrick@2
   392
    <ref name="inlines"/>
patrick@2
   393
  </define>
patrick@0
   394
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   395
  <!-- ~~~~~~ source -->
patrick@0
   396
  <define name="source">
patrick@0
   397
    <element name="source">
patrick@0
   398
      <choice>
patrick@0
   399
        <group>
patrick@0
   400
          <attribute name="type">
patrick@0
   401
            <value>book</value>
patrick@0
   402
          </attribute>
patrick@0
   403
          <ref name="source.content.book"/>
patrick@0
   404
        </group>
patrick@38
   405
        <group>
patrick@38
   406
          <attribute name="type">
patrick@38
   407
            <value>file</value>
patrick@38
   408
          </attribute>
patrick@38
   409
          <ref name="source.content.file"/>
patrick@38
   410
        </group>
patrick@0
   411
      </choice>
patrick@0
   412
      <ref name="source.content"/>
patrick@0
   413
    </element>
patrick@0
   414
  </define>
patrick@0
   415
  <define name="source.content.book">
patrick@38
   416
    <ref name="identifier.ean"/>
patrick@38
   417
    <optional>
patrick@38
   418
      <ref name="title"/>
patrick@38
   419
    </optional>
patrick@0
   420
    <zeroOrMore>
patrick@0
   421
      <ref name="pagenumber"/>
patrick@0
   422
    </zeroOrMore>
patrick@0
   423
  </define>
patrick@38
   424
  <define name="source.content.file">
patrick@38
   425
    <ref name="identifier.uri"/>
patrick@38
   426
  </define>
patrick@0
   427
  <define name="source.content">
patrick@0
   428
    <zeroOrMore>
patrick@0
   429
      <ref name="annotation"/>
patrick@0
   430
    </zeroOrMore>
patrick@0
   431
  </define>
patrick@2
   432
  <!-- ~~~~~~ pagenumber -->
patrick@0
   433
  <define name="pagenumber">
patrick@0
   434
    <element name="pagenumber">
patrick@0
   435
      <ref name="pagenumber.attributes"/>
patrick@0
   436
    </element>
patrick@0
   437
  </define>
patrick@0
   438
  <define name="pagenumber.attributes">
patrick@0
   439
    <ref name="pagenumber.value.attribute"/>
patrick@0
   440
  </define>
patrick@0
   441
  <define name="pagenumber.value.attribute">
patrick@0
   442
    <attribute name="value">
patrick@33
   443
      <data type="positiveInteger"/>
patrick@0
   444
    </attribute>
patrick@0
   445
  </define>
patrick@40
   446
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ keyword & subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@40
   447
  <!-- ~~~~~~ keywordset -->
patrick@40
   448
  <define name="keywordset">
patrick@40
   449
    <element name="keywordset">
patrick@40
   450
      <ref name="keywordset.content"/>
patrick@40
   451
    </element>
patrick@40
   452
  </define>
patrick@40
   453
  <define name="keywordset.content">
patrick@40
   454
    <oneOrMore>
patrick@40
   455
      <ref name="keyword"/>
patrick@40
   456
    </oneOrMore>
patrick@40
   457
  </define>
patrick@40
   458
  <!-- ~~~~~~ keyword -->
patrick@40
   459
  <define name="keyword">
patrick@40
   460
    <element name="keyword">
patrick@40
   461
      <ref name="keyword.content"/>
patrick@40
   462
    </element>
patrick@40
   463
  </define>
patrick@40
   464
  <define name="keyword.content">
patrick@40
   465
    <text/>
patrick@40
   466
  </define>
patrick@2
   467
  <!-- ~~~~~~ subjectset -->
patrick@0
   468
  <define name="subjectset">
patrick@0
   469
    <element name="subjectset">
patrick@0
   470
      <ref name="subjectset.content"/>
patrick@0
   471
    </element>
patrick@0
   472
  </define>
patrick@0
   473
  <define name="subjectset.content">
patrick@0
   474
    <oneOrMore>
patrick@0
   475
      <ref name="subject"/>
patrick@0
   476
    </oneOrMore>
patrick@0
   477
  </define>
patrick@2
   478
  <!-- ~~~~~~ subject -->
patrick@0
   479
  <define name="subject">
patrick@0
   480
    <element name="subject">
patrick@0
   481
      <ref name="subject.attributes"/>
patrick@0
   482
    </element>
patrick@0
   483
  </define>
patrick@0
   484
  <define name="subject.attributes">
patrick@0
   485
    <ref name="subject.id.attribute"/>
patrick@0
   486
  </define>
patrick@0
   487
  <define name="subject.id.attribute">
patrick@0
   488
    <attribute name="id">
patrick@0
   489
      <data type="NMTOKEN"/>
patrick@0
   490
    </attribute>
patrick@0
   491
  </define>
patrick@5
   492
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   493
  <define name="abstract">
patrick@2
   494
    <element name="abstract">
patrick@2
   495
      <ref name="abstract.content"/>
patrick@2
   496
    </element>
patrick@2
   497
  </define>
patrick@2
   498
  <define name="abstract.content">
patrick@2
   499
    <oneOrMore>
patrick@20
   500
      <ref name="p"/>
patrick@2
   501
    </oneOrMore>
patrick@2
   502
  </define>
patrick@35
   503
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@35
   504
  <define name="cover">
patrick@35
   505
    <element name="cover">
patrick@35
   506
      <ref name="cover.content"/>
patrick@35
   507
    </element>
patrick@35
   508
  </define>
patrick@35
   509
  <define name="cover.content">
patrick@35
   510
    <ref name="cover.image"/>
patrick@35
   511
  </define>
patrick@35
   512
  <define name="cover.image">
patrick@35
   513
    <element name="image">
patrick@35
   514
      <ref name="cover.image.attributes"/>
patrick@35
   515
    </element>
patrick@35
   516
  </define>
patrick@35
   517
  <define name="cover.image.attributes">
patrick@35
   518
    <ref name="cover.image.id.attribute"/>
patrick@35
   519
  </define>
patrick@35
   520
  <define name="cover.image.id.attribute">
patrick@35
   521
    <attribute name="id">
patrick@35
   522
      <data type="NMTOKEN"/>
patrick@35
   523
    </attribute>
patrick@35
   524
  </define>
patrick@0
   525
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   526
  <define name="annotation">
patrick@0
   527
    <element name="annotation">
patrick@0
   528
      <ref name="annotation.content"/>
patrick@0
   529
    </element>
patrick@0
   530
  </define>
patrick@0
   531
  <define name="annotation.content">
patrick@0
   532
    <ref name="inlines"/>
patrick@0
   533
  </define>
patrick@0
   534
  <!--
patrick@0
   535
    =============================================================================
patrick@20
   536
                                    DIVISION LEVEL
patrick@0
   537
    =============================================================================
patrick@0
   538
  -->
patrick@0
   539
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   540
  <define name="division">
patrick@0
   541
    <element name="division">
patrick@0
   542
      <ref name="division.content"/>
patrick@0
   543
    </element>
patrick@0
   544
  </define>
patrick@0
   545
  <define name="division.content">
patrick@0
   546
    <optional>
patrick@20
   547
      <ref name="division.head"/>
patrick@0
   548
    </optional>
patrick@0
   549
    <choice>
patrick@0
   550
      <oneOrMore>
patrick@0
   551
        <ref name="division"/>
patrick@0
   552
      </oneOrMore>
patrick@0
   553
      <oneOrMore>
patrick@0
   554
        <ref name="topic"/>
patrick@0
   555
      </oneOrMore>
patrick@0
   556
    </choice>
patrick@0
   557
  </define>
patrick@0
   558
  <!--
patrick@0
   559
    =============================================================================
patrick@20
   560
                                  COMPONENT LEVEL
patrick@0
   561
    =============================================================================
patrick@0
   562
  -->
patrick@0
   563
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   564
  <define name="topic">
patrick@0
   565
    <element name="topic">
patrick@0
   566
      <ref name="topic.attributes"/>
patrick@0
   567
      <ref name="topic.content"/>
patrick@0
   568
    </element>
patrick@0
   569
  </define>
patrick@0
   570
  <define name="topic.attributes">
patrick@0
   571
    <interleave>
patrick@0
   572
      <optional>
patrick@0
   573
        <ref name="topic.id.attribute"/>
patrick@0
   574
      </optional>
patrick@0
   575
      <optional>
patrick@0
   576
        <ref name="topic.type.attribute"/>
patrick@0
   577
      </optional>
patrick@0
   578
    </interleave>
patrick@0
   579
  </define>
patrick@0
   580
  <define name="topic.content">
patrick@0
   581
    <optional>
patrick@20
   582
      <ref name="component.head"/>
patrick@0
   583
    </optional>
patrick@0
   584
    <oneOrMore>
patrick@0
   585
      <ref name="section"/>
patrick@0
   586
    </oneOrMore>
patrick@0
   587
  </define>
patrick@0
   588
  <!--
patrick@0
   589
    =============================================================================
patrick@20
   590
                                    SECTION LEVEL
patrick@0
   591
    =============================================================================
patrick@0
   592
  -->
patrick@20
   593
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   594
  <define name="section">
patrick@0
   595
    <element name="section">
patrick@0
   596
      <ref name="section.content"/>
patrick@0
   597
      <ref name="section.attributes"/>
patrick@0
   598
    </element>
patrick@0
   599
  </define>
patrick@0
   600
  <define name="section.content">
patrick@0
   601
    <optional>
patrick@20
   602
      <ref name="section.head"/>
patrick@0
   603
    </optional>
patrick@0
   604
    <choice>
patrick@0
   605
      <oneOrMore>
patrick@0
   606
        <ref name="section"/>
patrick@0
   607
      </oneOrMore>
patrick@0
   608
      <oneOrMore>
patrick@10
   609
        <ref name="block"/>
patrick@0
   610
      </oneOrMore>
patrick@0
   611
    </choice>
patrick@0
   612
  </define>
patrick@0
   613
  <define name="section.attributes">
patrick@0
   614
    <optional>
patrick@37
   615
      <ref name="section.type.attribute"/>
patrick@0
   616
    </optional>
patrick@0
   617
  </define>
patrick@37
   618
  <define name="section.type.attribute">
patrick@37
   619
    <attribute name="type">
patrick@0
   620
      <data type="NCName"/>
patrick@0
   621
    </attribute>
patrick@0
   622
  </define>
patrick@0
   623
  <!--
patrick@0
   624
    =============================================================================
patrick@20
   625
                                    BLOCK LEVEL
patrick@0
   626
    =============================================================================
patrick@0
   627
  -->
patrick@20
   628
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@10
   629
  <define name="block">
patrick@10
   630
    <choice>
patrick@20
   631
      <ref name="p"/>
patrick@20
   632
      <ref name="speech"/>
patrick@10
   633
      <ref name="list"/>
patrick@17
   634
      <ref name="table"/>
patrick@10
   635
      <ref name="media"/>
patrick@10
   636
    </choice>
patrick@10
   637
  </define>
patrick@42
   638
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@20
   639
  <define name="p">
patrick@20
   640
    <element name="p">
patrick@20
   641
      <ref name="p.content"/>
patrick@0
   642
    </element>
patrick@0
   643
  </define>
patrick@20
   644
  <define name="p.content">
patrick@25
   645
    <ref name="inlines"/>
patrick@0
   646
  </define>
patrick@20
   647
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@20
   648
  <!-- ~~~~~~ speech -->
patrick@20
   649
  <define name="speech">
patrick@20
   650
    <element name="speech">
patrick@20
   651
      <ref name="speech.content"/>
patrick@20
   652
    </element>
patrick@20
   653
  </define>
patrick@20
   654
  <define name="speech.content">
patrick@20
   655
    <optional>
patrick@20
   656
      <ref name="speaker"/>
patrick@20
   657
    </optional>
patrick@20
   658
    <optional>
patrick@20
   659
      <ref name="stage"/>
patrick@20
   660
    </optional>
patrick@20
   661
    <oneOrMore>
patrick@20
   662
      <ref name="p"/>
patrick@20
   663
    </oneOrMore>
patrick@20
   664
  </define>
patrick@20
   665
  <!-- ~~~~~~ speaker -->
patrick@20
   666
  <define name="speaker">
patrick@20
   667
    <element name="speaker">
patrick@20
   668
      <ref name="speaker.content"/>
patrick@20
   669
    </element>
patrick@20
   670
  </define>
patrick@20
   671
  <define name="speaker.content">
patrick@20
   672
    <ref name="inlines"/>
patrick@20
   673
  </define>
patrick@20
   674
  <!-- ~~~~~~ stage -->
patrick@20
   675
  <define name="stage">
patrick@20
   676
    <element name="stage">
patrick@20
   677
      <ref name="stage.content"/>
patrick@20
   678
    </element>
patrick@20
   679
  </define>
patrick@20
   680
  <define name="stage.content">
patrick@20
   681
    <ref name="inlines"/>
patrick@20
   682
  </define>
patrick@17
   683
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@10
   684
  <!-- ~~~~~~ list -->
patrick@10
   685
  <define name="list">
patrick@10
   686
    <element name="list">
patrick@10
   687
      <ref name="list.content"/>
patrick@10
   688
    </element>
patrick@10
   689
  </define>
patrick@10
   690
  <define name="list.content">
patrick@10
   691
    <optional>
patrick@20
   692
      <ref name="block.head"/>
patrick@10
   693
    </optional>
patrick@10
   694
    <choice>
patrick@10
   695
      <group>
patrick@10
   696
        <optional>
patrick@10
   697
          <attribute name="type">
patrick@12
   698
            <value>ordered</value>
patrick@10
   699
          </attribute>
patrick@10
   700
        </optional>
patrick@10
   701
        <ref name="item"/>
patrick@10
   702
        <oneOrMore>
patrick@10
   703
          <ref name="item"/>
patrick@10
   704
        </oneOrMore>
patrick@10
   705
      </group>
patrick@10
   706
      <group>
patrick@10
   707
        <attribute name="type">
patrick@10
   708
          <value>glossary</value>
patrick@10
   709
        </attribute>
patrick@10
   710
        <oneOrMore>
patrick@10
   711
          <ref name="glossary.item"/>
patrick@10
   712
        </oneOrMore>
patrick@10
   713
      </group>
patrick@10
   714
    </choice>
patrick@10
   715
  </define>
patrick@10
   716
  <!-- ~~~~~~ item -->
patrick@10
   717
  <define name="item">
patrick@10
   718
    <element name="item">
patrick@10
   719
      <ref name="item.content"/>
patrick@10
   720
    </element>
patrick@10
   721
  </define>
patrick@10
   722
  <define name="item.content">
patrick@30
   723
    <choice>
patrick@30
   724
      <ref name="inlines"/>
patrick@30
   725
      <oneOrMore>
patrick@30
   726
        <ref name="block"/>
patrick@30
   727
      </oneOrMore>
patrick@30
   728
    </choice>
patrick@10
   729
  </define>
patrick@10
   730
  <!-- ~~~~~~ glossary.item -->
patrick@10
   731
  <define name="glossary.item">
patrick@10
   732
    <element name="item">
patrick@10
   733
      <ref name="glossary.item.content"/>
patrick@10
   734
    </element>
patrick@10
   735
  </define>
patrick@10
   736
  <define name="glossary.item.content">
patrick@10
   737
    <ref name="label"/>
patrick@10
   738
    <oneOrMore>
patrick@10
   739
      <ref name="block"/>
patrick@10
   740
    </oneOrMore>
patrick@10
   741
  </define>
patrick@17
   742
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@17
   743
  <define name="table">
patrick@17
   744
    <element name="table">
patrick@17
   745
      <ref name="table.content"/>
patrick@17
   746
    </element>
patrick@17
   747
  </define>
patrick@17
   748
  <define name="table.content">
patrick@17
   749
    <optional>
patrick@20
   750
      <ref name="block.head"/>
patrick@17
   751
    </optional>
patrick@17
   752
    <oneOrMore>
patrick@17
   753
      <ref name="tgroup"/>
patrick@17
   754
    </oneOrMore>
patrick@17
   755
    <optional>
patrick@17
   756
      <ref name="caption"/>
patrick@17
   757
    </optional>
patrick@17
   758
  </define>
patrick@17
   759
  <!-- ~~~~~~ tgroup -->
patrick@17
   760
  <define name="tgroup">
patrick@17
   761
    <element name="tgroup">
patrick@17
   762
      <ref name="tgroup.attributes"/>
patrick@17
   763
      <ref name="tgroup.content"/>
patrick@17
   764
    </element>
patrick@17
   765
  </define>
patrick@17
   766
  <define name="tgroup.content">
patrick@17
   767
    <optional>
patrick@17
   768
      <ref name="thead"/>
patrick@17
   769
    </optional>
patrick@17
   770
    <optional>
patrick@17
   771
      <ref name="tfoot"/>
patrick@17
   772
    </optional>
patrick@17
   773
    <ref name="tbody"/>
patrick@17
   774
  </define>
patrick@17
   775
  <define name="tgroup.attributes">
patrick@17
   776
    <interleave>
patrick@17
   777
      <ref name="cols.attribute"/>
patrick@17
   778
      <optional>
patrick@17
   779
        <ref name="align.attribute"/>
patrick@17
   780
      </optional>
patrick@17
   781
      <optional>
patrick@17
   782
        <ref name="colsep.attribute"/>
patrick@17
   783
      </optional>
patrick@17
   784
      <optional>
patrick@17
   785
        <ref name="rowsep.attribute"/>
patrick@17
   786
      </optional>
patrick@17
   787
    </interleave>
patrick@17
   788
  </define>
patrick@17
   789
  <define name="cols.attribute">
patrick@17
   790
    <attribute name="cols">
patrick@17
   791
      <data type="positiveInteger"/>
patrick@17
   792
    </attribute>
patrick@17
   793
  </define>
patrick@17
   794
  <define name="align.attribute">
patrick@17
   795
    <attribute name="align">
patrick@17
   796
      <choice>
patrick@17
   797
        <value>left</value>
patrick@17
   798
        <value>right</value>
patrick@17
   799
        <value>center</value>
patrick@17
   800
        <value>justify</value>
patrick@17
   801
      </choice>
patrick@17
   802
    </attribute>
patrick@17
   803
  </define>
patrick@17
   804
  <define name="colsep.attribute">
patrick@17
   805
    <attribute name="colsep">
patrick@17
   806
      <choice>
patrick@17
   807
        <value>0</value>
patrick@17
   808
        <value>1</value>
patrick@17
   809
      </choice>
patrick@17
   810
    </attribute>
patrick@17
   811
  </define>
patrick@17
   812
  <define name="rowsep.attribute">
patrick@17
   813
    <attribute name="rowsep">
patrick@17
   814
      <choice>
patrick@17
   815
        <value>0</value>
patrick@17
   816
        <value>1</value>
patrick@17
   817
      </choice>
patrick@17
   818
    </attribute>
patrick@17
   819
  </define>
patrick@17
   820
  <!-- ~~~~~~ thead, tfoot, tbody -->
patrick@17
   821
  <define name="thead">
patrick@17
   822
    <element name="thead">
patrick@22
   823
      <ref name="thead.attributes"/>
patrick@17
   824
      <ref name="thead.content"/>
patrick@17
   825
    </element>
patrick@17
   826
  </define>
patrick@17
   827
  <define name="tfoot">
patrick@17
   828
    <element name="tfoot">
patrick@22
   829
      <ref name="tfoot.attributes"/>
patrick@17
   830
      <ref name="tfoot.content"/>
patrick@17
   831
    </element>
patrick@17
   832
  </define>
patrick@17
   833
  <define name="tbody">
patrick@17
   834
    <element name="tbody">
patrick@22
   835
      <ref name="tbody.attributes"/>
patrick@17
   836
      <ref name="tbody.content"/>
patrick@17
   837
    </element>
patrick@17
   838
  </define>
patrick@22
   839
  <define name="thead.attributes">
patrick@22
   840
    <optional>
patrick@22
   841
      <ref name="valign.attribute"/>
patrick@22
   842
    </optional>
patrick@22
   843
  </define>
patrick@22
   844
  <define name="tfoot.attributes">
patrick@22
   845
    <optional>
patrick@22
   846
      <ref name="valign.attribute"/>
patrick@22
   847
    </optional>
patrick@22
   848
  </define>
patrick@22
   849
  <define name="tbody.attributes">
patrick@22
   850
    <optional>
patrick@22
   851
      <ref name="valign.attribute"/>
patrick@22
   852
    </optional>
patrick@22
   853
  </define>
patrick@22
   854
  <define name="valign.attribute">
patrick@22
   855
    <attribute name="valign">
patrick@22
   856
      <choice>
patrick@22
   857
        <value>top</value>
patrick@22
   858
        <value>middle</value>
patrick@22
   859
        <value>bottom</value>
patrick@22
   860
      </choice>
patrick@22
   861
    </attribute>
patrick@22
   862
  </define>
patrick@17
   863
  <define name="thead.content">
patrick@17
   864
    <oneOrMore>
patrick@17
   865
      <ref name="row"/>
patrick@17
   866
    </oneOrMore>
patrick@17
   867
  </define>
patrick@17
   868
  <define name="tfoot.content">
patrick@17
   869
    <oneOrMore>
patrick@17
   870
      <ref name="row"/>
patrick@17
   871
    </oneOrMore>
patrick@17
   872
  </define>
patrick@17
   873
  <define name="tbody.content">
patrick@17
   874
    <oneOrMore>
patrick@17
   875
      <ref name="row"/>
patrick@17
   876
    </oneOrMore>
patrick@17
   877
  </define>
patrick@17
   878
  <!-- ~~~~~~ row -->
patrick@17
   879
  <define name="row">
patrick@17
   880
    <element name="row">
patrick@17
   881
      <ref name="row.attribute"/>
patrick@17
   882
      <ref name="row.content"/>
patrick@17
   883
    </element>
patrick@17
   884
  </define>
patrick@17
   885
  <define name="row.attribute">
patrick@17
   886
    <optional>
patrick@17
   887
      <ref name="valign.attribute"/>
patrick@17
   888
    </optional>
patrick@17
   889
  </define>
patrick@17
   890
  <define name="row.content">
patrick@17
   891
    <oneOrMore>
patrick@17
   892
      <ref name="entry"/>
patrick@17
   893
    </oneOrMore>
patrick@17
   894
  </define>
patrick@17
   895
  <!-- ~~~~~~ entry -->
patrick@17
   896
  <define name="entry">
patrick@17
   897
    <element name="entry">
patrick@17
   898
      <ref name="entry.content"/>
patrick@17
   899
    </element>
patrick@17
   900
  </define>
patrick@17
   901
  <define name="entry.content">
patrick@17
   902
    <choice>
patrick@17
   903
      <ref name="inlines"/>
patrick@17
   904
      <oneOrMore>
patrick@37
   905
        <choice>
patrick@37
   906
          <ref name="p"/>
patrick@37
   907
          <ref name="media"/>
patrick@37
   908
        </choice>
patrick@17
   909
      </oneOrMore>
patrick@17
   910
    </choice>
patrick@17
   911
  </define>
patrick@17
   912
  <!-- ~~~~~~ caption -->
patrick@17
   913
  <define name="caption">
patrick@17
   914
    <element name="caption">
patrick@17
   915
      <ref name="caption.content"/>
patrick@17
   916
    </element>
patrick@17
   917
  </define>
patrick@17
   918
  <define name="caption.content">
patrick@20
   919
    <choice>
patrick@20
   920
      <ref name="inlines"/>
patrick@20
   921
      <oneOrMore>
patrick@20
   922
        <ref name="p"/>
patrick@20
   923
      </oneOrMore>
patrick@20
   924
    </choice>
patrick@11
   925
  </define>
patrick@35
   926
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   927
  <!-- ~~~~~~ media -->
patrick@0
   928
  <define name="media">
patrick@0
   929
    <element name="media">
patrick@0
   930
      <ref name="media.content"/>
patrick@0
   931
    </element>
patrick@0
   932
  </define>
patrick@0
   933
  <define name="media.content">
patrick@24
   934
    <optional>
patrick@24
   935
      <ref name="block.head"/>
patrick@24
   936
    </optional>
patrick@0
   937
    <oneOrMore>
patrick@0
   938
      <ref name="image"/>
patrick@0
   939
    </oneOrMore>
patrick@0
   940
    <optional>
patrick@17
   941
      <ref name="caption"/>
patrick@0
   942
    </optional>
patrick@35
   943
    <optional>
patrick@36
   944
      <ref name="link"/>
patrick@35
   945
    </optional>
patrick@0
   946
  </define>
patrick@2
   947
  <!-- ~~~~~~ image -->
patrick@0
   948
  <define name="image">
patrick@0
   949
    <element name="image">
patrick@0
   950
      <ref name="image.attributes"/>
patrick@0
   951
      <ref name="image.content"/>
patrick@0
   952
    </element>
patrick@0
   953
  </define>
patrick@0
   954
  <define name="image.attributes">
patrick@0
   955
    <ref name="media.id.attribute"/>
patrick@0
   956
  </define>
patrick@17
   957
  <define name="media.id.attribute">
patrick@17
   958
    <attribute name="id">
patrick@17
   959
      <data type="NMTOKEN"/>
patrick@17
   960
    </attribute>
patrick@17
   961
  </define>
patrick@0
   962
  <define name="image.content">
patrick@0
   963
    <optional>
patrick@0
   964
      <ref name="copyright"/>
patrick@0
   965
    </optional>
patrick@0
   966
  </define>
patrick@0
   967
  <!--
patrick@0
   968
    =============================================================================
patrick@20
   969
                                    INLINE LEVEL
patrick@0
   970
    =============================================================================
patrick@0
   971
  -->
patrick@0
   972
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   973
  <define name="inlines">
patrick@0
   974
    <mixed>
patrick@0
   975
      <interleave>
patrick@0
   976
        <zeroOrMore>
patrick@0
   977
          <ref name="sup"/>
patrick@0
   978
        </zeroOrMore>
patrick@0
   979
        <zeroOrMore>
patrick@0
   980
          <ref name="sub"/>
patrick@0
   981
        </zeroOrMore>
patrick@0
   982
        <zeroOrMore>
patrick@42
   983
          <ref name="var"/>
patrick@42
   984
        </zeroOrMore>
patrick@42
   985
        <zeroOrMore>
patrick@12
   986
          <ref name="number"/>
patrick@0
   987
        </zeroOrMore>
patrick@0
   988
        <zeroOrMore>
patrick@42
   989
          <ref name="math"/>
patrick@42
   990
        </zeroOrMore>
patrick@42
   991
        <zeroOrMore>
patrick@0
   992
          <ref name="date"/>
patrick@0
   993
        </zeroOrMore>
patrick@0
   994
        <zeroOrMore>
patrick@0
   995
          <ref name="name"/>
patrick@0
   996
        </zeroOrMore>
patrick@0
   997
        <zeroOrMore>
patrick@5
   998
          <ref name="note"/>
patrick@0
   999
        </zeroOrMore>
patrick@0
  1000
        <zeroOrMore>
patrick@0
  1001
          <ref name="foreign"/>
patrick@0
  1002
        </zeroOrMore>
patrick@0
  1003
        <zeroOrMore>
patrick@0
  1004
          <ref name="highlight"/>
patrick@0
  1005
        </zeroOrMore>
patrick@5
  1006
        <zeroOrMore>
patrick@5
  1007
          <ref name="mentioned"/>
patrick@5
  1008
        </zeroOrMore>
patrick@5
  1009
        <zeroOrMore>
patrick@5
  1010
          <ref name="quote"/>
patrick@5
  1011
        </zeroOrMore>
patrick@8
  1012
        <zeroOrMore>
patrick@8
  1013
          <ref name="acronym"/>
patrick@8
  1014
        </zeroOrMore>
patrick@10
  1015
        <zeroOrMore>
patrick@10
  1016
          <ref name="term"/>
patrick@10
  1017
        </zeroOrMore>
patrick@25
  1018
        <zeroOrMore>
patrick@25
  1019
          <ref name="link"/>
patrick@25
  1020
        </zeroOrMore>
patrick@42
  1021
        <zeroOrMore>
patrick@42
  1022
          <ref name="anchor"/>
patrick@42
  1023
        </zeroOrMore>
patrick@0
  1024
      </interleave>
patrick@0
  1025
    </mixed>
patrick@0
  1026
  </define>
patrick@42
  1027
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup, var ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1028
  <define name="sup">
patrick@0
  1029
    <element name="sup">
patrick@42
  1030
      <text/>
patrick@0
  1031
    </element>
patrick@0
  1032
  </define>
patrick@0
  1033
  <define name="sub">
patrick@0
  1034
    <element name="sub">
patrick@42
  1035
      <text/>
patrick@0
  1036
    </element>
patrick@0
  1037
  </define>
patrick@42
  1038
  <define name="var">
patrick@42
  1039
    <element name="var">
patrick@42
  1040
      <text/>
patrick@42
  1041
    </element>
patrick@42
  1042
  </define>
patrick@42
  1043
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ math ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@42
  1044
  <define name="math">
patrick@42
  1045
    <element name="math">
patrick@42
  1046
      <choice>
patrick@42
  1047
        <group>
patrick@42
  1048
          <attribute name="notation">
patrick@42
  1049
            <value>tex</value>
patrick@42
  1050
          </attribute>
patrick@42
  1051
          <ref name="math.attributes"/>
patrick@42
  1052
          <ref name="math.tex.content"/>
patrick@42
  1053
        </group>
patrick@42
  1054
        <group>
patrick@42
  1055
          <ref name="math.attributes"/>
patrick@42
  1056
          <ref name="math.content"/>
patrick@42
  1057
        </group>
patrick@42
  1058
      </choice>
patrick@42
  1059
    </element>
patrick@42
  1060
  </define>
patrick@42
  1061
  <define name="math.attributes">
patrick@42
  1062
    <optional>
patrick@42
  1063
      <ref name="wide.attribute"/>
patrick@42
  1064
    </optional>
patrick@42
  1065
  </define>
patrick@42
  1066
  <define name="wide.attribute">
patrick@42
  1067
    <attribute name="wide">
patrick@42
  1068
      <data type="boolean"/>
patrick@42
  1069
    </attribute>
patrick@42
  1070
  </define>
patrick@42
  1071
  <define name="math.content">
patrick@42
  1072
    <mixed>
patrick@42
  1073
      <interleave>
patrick@42
  1074
        <zeroOrMore>
patrick@42
  1075
          <ref name="sup"/>
patrick@42
  1076
        </zeroOrMore>
patrick@42
  1077
        <zeroOrMore>
patrick@42
  1078
          <ref name="sub"/>
patrick@42
  1079
        </zeroOrMore>
patrick@42
  1080
        <zeroOrMore>
patrick@42
  1081
          <ref name="var"/>
patrick@42
  1082
        </zeroOrMore>
patrick@42
  1083
      </interleave>
patrick@42
  1084
    </mixed>
patrick@42
  1085
  </define>
patrick@42
  1086
  <define name="math.tex.content">
patrick@42
  1087
    <text/>
patrick@42
  1088
  </define>
patrick@12
  1089
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@12
  1090
  <define name="number">
patrick@12
  1091
    <element name="number">
patrick@12
  1092
      <choice>
patrick@12
  1093
        <group>
patrick@12
  1094
          <attribute name="type">
patrick@12
  1095
            <value>roman</value>
patrick@12
  1096
          </attribute>
patrick@12
  1097
          <ref name="number.attributes"/>
patrick@12
  1098
          <ref name="number.roman.content"/>
patrick@12
  1099
        </group>
patrick@12
  1100
        <group>
patrick@12
  1101
          <ref name="number.attributes"/>
patrick@12
  1102
          <ref name="number.content"/>
patrick@12
  1103
        </group>
patrick@12
  1104
      </choice>
patrick@0
  1105
    </element>
patrick@0
  1106
  </define>
patrick@12
  1107
  <define name="number.attributes">
patrick@12
  1108
    <optional>
patrick@12
  1109
      <ref name="number.value.attribute"/>
patrick@12
  1110
    </optional>
patrick@12
  1111
  </define>
patrick@12
  1112
  <define name="number.value.attribute">
patrick@12
  1113
    <attribute name="value">
patrick@12
  1114
      <choice>
patrick@12
  1115
        <data type="integer"/>
patrick@12
  1116
        <data type="decimal"/>
patrick@12
  1117
      </choice>
patrick@12
  1118
    </attribute>
patrick@12
  1119
  </define>
patrick@12
  1120
  <define name="number.content">
patrick@12
  1121
    <mixed>
patrick@12
  1122
      <zeroOrMore>
patrick@12
  1123
        <ref name="sup"/>
patrick@12
  1124
      </zeroOrMore>
patrick@12
  1125
    </mixed>
patrick@12
  1126
  </define>
patrick@12
  1127
  <define name="number.roman.content">
patrick@12
  1128
    <data type="token">
patrick@12
  1129
      <param name="pattern">[dlxvi]+</param>
patrick@12
  1130
    </data>
patrick@12
  1131
  </define>
patrick@36
  1132
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1133
  <define name="date">
patrick@0
  1134
    <element name="date">
patrick@0
  1135
      <ref name="date.attributes"/>
patrick@0
  1136
      <ref name="date.content"/>
patrick@0
  1137
    </element>
patrick@0
  1138
  </define>
patrick@0
  1139
  <define name="date.attributes">
patrick@12
  1140
    <interleave>
patrick@12
  1141
      <ref name="date.value.attribute"/>
patrick@12
  1142
      <optional>
patrick@12
  1143
        <ref name="date.of.attribute"/>
patrick@12
  1144
      </optional>
patrick@12
  1145
    </interleave>
patrick@12
  1146
  </define>
patrick@12
  1147
  <define name="date.value.attribute">
patrick@12
  1148
    <attribute name="value">
patrick@12
  1149
      <choice>
patrick@12
  1150
        <data type="date"/>
patrick@12
  1151
        <data type="gYearMonth"/>
patrick@12
  1152
        <data type="gYear"/>
patrick@12
  1153
      </choice>
patrick@12
  1154
    </attribute>
patrick@0
  1155
  </define>
patrick@0
  1156
  <define name="date.of.attribute">
patrick@0
  1157
    <attribute name="of">
patrick@33
  1158
      <choice>
patrick@33
  1159
        <value>birth</value>
patrick@33
  1160
        <value>death</value>
patrick@33
  1161
      </choice>
patrick@0
  1162
    </attribute>
patrick@0
  1163
  </define>
patrick@0
  1164
  <define name="date.content">
patrick@12
  1165
    <mixed>
patrick@12
  1166
      <zeroOrMore>
patrick@12
  1167
        <ref name="sup"/>
patrick@12
  1168
      </zeroOrMore>
patrick@12
  1169
    </mixed>
patrick@0
  1170
  </define>
patrick@36
  1171
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1172
  <define name="name">
patrick@0
  1173
    <element name="name">
patrick@0
  1174
      <ref name="name.attributes"/>
patrick@0
  1175
      <ref name="name.content"/>
patrick@0
  1176
    </element>
patrick@0
  1177
  </define>
patrick@0
  1178
  <define name="name.attributes">
patrick@0
  1179
    <optional>
patrick@0
  1180
      <ref name="name.of.attribute"/>
patrick@0
  1181
    </optional>
patrick@0
  1182
  </define>
patrick@0
  1183
  <define name="name.of.attribute">
patrick@0
  1184
    <attribute name="of">
patrick@33
  1185
      <choice>
patrick@33
  1186
        <value>person</value>
patrick@33
  1187
        <value>company</value>
patrick@33
  1188
        <value>book</value>
patrick@33
  1189
        <value>newspaper</value>
patrick@33
  1190
        <value>party</value>
patrick@33
  1191
      </choice>
patrick@0
  1192
    </attribute>
patrick@0
  1193
  </define>
patrick@2
  1194
  <define name="name.content">
patrick@2
  1195
    <ref name="inlines"/>
patrick@2
  1196
  </define>
patrick@36
  1197
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
  1198
  <define name="note">
patrick@5
  1199
    <element name="note">
patrick@5
  1200
      <ref name="note.attributes"/>
patrick@5
  1201
      <ref name="note.content"/>
patrick@0
  1202
    </element>
patrick@0
  1203
  </define>
patrick@5
  1204
  <define name="note.attributes">
patrick@0
  1205
    <optional>
patrick@5
  1206
      <ref name="note.label.attribute"/>
patrick@0
  1207
    </optional>
patrick@0
  1208
  </define>
patrick@5
  1209
  <define name="note.label.attribute">
patrick@0
  1210
    <attribute name="label"/>
patrick@0
  1211
  </define>
patrick@5
  1212
  <define name="note.content">
patrick@17
  1213
    <choice>
patrick@17
  1214
      <ref name="inlines"/>
patrick@17
  1215
      <oneOrMore>
patrick@20
  1216
        <ref name="p"/>
patrick@17
  1217
      </oneOrMore>
patrick@17
  1218
    </choice>
patrick@0
  1219
  </define>
patrick@36
  1220
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1221
  <define name="foreign">
patrick@0
  1222
    <element name="foreign">
patrick@0
  1223
      <ref name="foreign.attributes"/>
patrick@0
  1224
      <ref name="foreign.content"/>
patrick@0
  1225
    </element>
patrick@0
  1226
  </define>
patrick@0
  1227
  <define name="foreign.attributes">
patrick@0
  1228
    <optional>
patrick@0
  1229
      <ref name="lang.attribute"/>
patrick@0
  1230
    </optional>
patrick@0
  1231
  </define>
patrick@0
  1232
  <define name="foreign.content">
patrick@0
  1233
    <ref name="inlines"/>
patrick@0
  1234
  </define>
patrick@36
  1235
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1236
  <define name="highlight">
patrick@0
  1237
    <element name="highlight">
patrick@0
  1238
      <ref name="highlight.content"/>
patrick@0
  1239
    </element>
patrick@0
  1240
  </define>
patrick@0
  1241
  <define name="highlight.content">
patrick@0
  1242
    <ref name="inlines"/>
patrick@0
  1243
  </define>
patrick@36
  1244
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
  1245
  <define name="mentioned">
patrick@5
  1246
    <element name="mentioned">
patrick@5
  1247
      <ref name="mentioned.content"/>
patrick@5
  1248
    </element>
patrick@5
  1249
  </define>
patrick@5
  1250
  <define name="mentioned.content">
patrick@5
  1251
    <ref name="inlines"/>
patrick@5
  1252
  </define>
patrick@36
  1253
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
  1254
  <define name="quote">
patrick@5
  1255
    <element name="quote">
patrick@5
  1256
      <ref name="quote.content"/>
patrick@5
  1257
    </element>
patrick@5
  1258
  </define>
patrick@5
  1259
  <define name="quote.content">
patrick@5
  1260
    <ref name="inlines"/>
patrick@5
  1261
  </define>
patrick@36
  1262
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@8
  1263
  <define name="acronym">
patrick@8
  1264
    <element name="acronym">
patrick@8
  1265
      <ref name="acronym.content"/>
patrick@8
  1266
    </element>
patrick@8
  1267
  </define>
patrick@8
  1268
  <define name="acronym.content">
patrick@8
  1269
    <ref name="inlines"/>
patrick@8
  1270
  </define>
patrick@36
  1271
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@10
  1272
  <define name="term">
patrick@10
  1273
    <element name="term">
patrick@10
  1274
      <ref name="term.content"/>
patrick@10
  1275
    </element>
patrick@10
  1276
  </define>
patrick@10
  1277
  <define name="term.content">
patrick@10
  1278
    <ref name="inlines"/>
patrick@10
  1279
  </define>
patrick@36
  1280
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1281
  <define name="link">
patrick@0
  1282
    <element name="link">
patrick@0
  1283
      <ref name="link.attributes"/>
patrick@0
  1284
      <ref name="link.content"/>
patrick@0
  1285
    </element>
patrick@0
  1286
  </define>
patrick@0
  1287
  <define name="link.attributes">
patrick@42
  1288
    <interleave>
patrick@42
  1289
      <choice>
patrick@42
  1290
        <ref name="uri.attribute"/>
patrick@42
  1291
        <ref name="idref.attribute"/>
patrick@42
  1292
      </choice>
patrick@42
  1293
      <optional>
patrick@42
  1294
        <ref name="anchor.attribute"/>
patrick@42
  1295
      </optional>
patrick@42
  1296
    </interleave>
patrick@10
  1297
  </define>
patrick@10
  1298
  <define name="uri.attribute">
patrick@10
  1299
    <attribute name="uri">
patrick@10
  1300
      <data type="anyURI"/>
patrick@10
  1301
    </attribute>
patrick@10
  1302
  </define>
patrick@10
  1303
  <define name="idref.attribute">
patrick@10
  1304
    <attribute name="idref">
patrick@10
  1305
      <data type="IDREF"/>
patrick@10
  1306
    </attribute>
patrick@0
  1307
  </define>
patrick@42
  1308
  <define name="anchor.attribute">
patrick@42
  1309
    <attribute name="anchor">
patrick@42
  1310
      <data type="NCName"/>
patrick@42
  1311
    </attribute>
patrick@42
  1312
  </define>
patrick@0
  1313
  <define name="link.content">
patrick@0
  1314
    <ref name="inlines"/>
patrick@0
  1315
  </define>
patrick@42
  1316
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ anchor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@42
  1317
  <define name="anchor">
patrick@42
  1318
    <element name="anchor">
patrick@42
  1319
      <choice>
patrick@42
  1320
        <group>
patrick@42
  1321
          <ref name="anchor.attributes"/>
patrick@42
  1322
          <ref name="anchor.content"/>
patrick@42
  1323
        </group>
patrick@42
  1324
        <attribute name="startref">
patrick@42
  1325
          <data type="IDREF"/>
patrick@42
  1326
        </attribute>
patrick@42
  1327
      </choice>
patrick@42
  1328
    </element>
patrick@42
  1329
  </define>
patrick@42
  1330
  <define name="anchor.attributes">
patrick@42
  1331
    <ref name="anchor.id.attribute"/>
patrick@42
  1332
  </define>
patrick@42
  1333
  <define name="anchor.id.attribute">
patrick@42
  1334
    <attribute name="xml:id">
patrick@42
  1335
      <data type="ID"/>
patrick@42
  1336
    </attribute>
patrick@42
  1337
  </define>
patrick@42
  1338
  <define name="anchor.content">
patrick@42
  1339
    <ref name="inlines"/>
patrick@42
  1340
  </define>
patrick@0
  1341
</grammar>