RelaxNG/publidoc.rng
author Patrick PIERRE <patrick.pierre@prismallia.fr>
mar., 07 juin 2011 11:11:29 +0200
changeset 7 4f3dcb980cd1
parent 5 69310bc35b63
child 8 1d4ee28efd68
permissions -rw-r--r--
Suppression coquille
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@0
    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@0
    49
      <ref name="metadata"/>
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@0
    64
      <ref name="topic.content"/>
patrick@0
    65
    </element>
patrick@0
    66
  </define>
patrick@0
    67
  <!--
patrick@0
    68
    =============================================================================
patrick@0
    69
                                  Metadata level
patrick@0
    70
    =============================================================================
patrick@0
    71
  -->
patrick@0
    72
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
    73
  <define name="metadata">
patrick@0
    74
    <element name="metadata">
patrick@0
    75
      <ref name="metadata.content"/>
patrick@0
    76
    </element>
patrick@0
    77
  </define>
patrick@0
    78
  <define name="metadata.content">
patrick@0
    79
    <interleave>
patrick@0
    80
      <ref name="title"/>
patrick@0
    81
      <optional>
patrick@0
    82
        <ref name="subtitle"/>
patrick@0
    83
      </optional>
patrick@0
    84
      <zeroOrMore>
patrick@0
    85
        <ref name="author"/>
patrick@0
    86
      </zeroOrMore>
patrick@0
    87
      <optional>
patrick@0
    88
        <ref name="publisher"/>
patrick@0
    89
      </optional>
patrick@0
    90
      <optional>
patrick@0
    91
        <ref name="language"/>
patrick@0
    92
      </optional>
patrick@0
    93
      <optional>
patrick@0
    94
        <ref name="date"/>
patrick@0
    95
      </optional>
patrick@0
    96
      <optional>
patrick@0
    97
        <ref name="place"/>
patrick@0
    98
      </optional>
patrick@0
    99
      <zeroOrMore>
patrick@0
   100
        <ref name="source"/>
patrick@0
   101
      </zeroOrMore>
patrick@0
   102
      <optional>
patrick@0
   103
        <ref name="subjectset"/>
patrick@0
   104
      </optional>
patrick@0
   105
      <optional>
patrick@0
   106
        <ref name="abstract"/>
patrick@0
   107
      </optional>
patrick@0
   108
      <zeroOrMore>
patrick@0
   109
        <ref name="annotation"/>
patrick@0
   110
      </zeroOrMore>
patrick@0
   111
    </interleave>
patrick@0
   112
  </define>
patrick@0
   113
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   114
  <define name="title">
patrick@0
   115
    <element name="title">
patrick@0
   116
      <ref name="title.content"/>
patrick@0
   117
    </element>
patrick@0
   118
  </define>
patrick@0
   119
  <define name="title.content">
patrick@0
   120
    <ref name="inlines"/>
patrick@0
   121
  </define>
patrick@0
   122
  <define name="subtitle">
patrick@0
   123
    <element name="subtitle">
patrick@0
   124
      <ref name="title.content"/>
patrick@0
   125
    </element>
patrick@0
   126
  </define>
patrick@0
   127
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
   128
  <!-- ~~~~~~ author -->
patrick@0
   129
  <define name="author">
patrick@0
   130
    <element name="author">
patrick@0
   131
      <ref name="author.content"/>
patrick@0
   132
    </element>
patrick@0
   133
  </define>
patrick@0
   134
  <define name="author.content">
patrick@0
   135
    <optional>
patrick@0
   136
      <ref name="firstname"/>
patrick@0
   137
    </optional>
patrick@0
   138
    <ref name="lastname"/>
patrick@0
   139
  </define>
patrick@5
   140
  <!-- ~~~~~~ publisher -->
patrick@0
   141
  <define name="publisher">
patrick@0
   142
    <element name="publisher">
patrick@0
   143
      <ref name="publisher.content"/>
patrick@0
   144
    </element>
patrick@0
   145
  </define>
patrick@0
   146
  <define name="publisher.content">
patrick@0
   147
    <ref name="inlines"/>
patrick@0
   148
  </define>
patrick@5
   149
  <!-- ~~~~~~ firstname -->
patrick@5
   150
  <define name="firstname">
patrick@5
   151
    <element name="firstname">
patrick@5
   152
      <ref name="firstname.content"/>
patrick@5
   153
    </element>
patrick@5
   154
  </define>
patrick@5
   155
  <define name="firstname.content">
patrick@5
   156
    <ref name="inlines"/>
patrick@5
   157
  </define>
patrick@5
   158
  <!-- ~~~~~~ lastname -->
patrick@5
   159
  <define name="lastname">
patrick@5
   160
    <element name="lastname">
patrick@5
   161
      <ref name="lastname.content"/>
patrick@5
   162
    </element>
patrick@5
   163
  </define>
patrick@5
   164
  <define name="lastname.content">
patrick@5
   165
    <ref name="inlines"/>
patrick@5
   166
  </define>
patrick@2
   167
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   168
  <define name="language">
patrick@2
   169
    <element name="language">
patrick@2
   170
      <ref name="language.attributes"/>
patrick@2
   171
    </element>
patrick@2
   172
  </define>
patrick@2
   173
  <define name="language.attributes">
patrick@2
   174
    <ref name="lang.attribute"/>
patrick@2
   175
  </define>
patrick@2
   176
  <define name="lang.attribute">
patrick@2
   177
    <attribute name="xml:lang">
patrick@2
   178
      <data type="language"/>
patrick@2
   179
    </attribute>
patrick@2
   180
  </define>
patrick@2
   181
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   182
  <define name="place">
patrick@2
   183
    <element name="place">
patrick@2
   184
      <ref name="place.content"/>
patrick@2
   185
    </element>
patrick@2
   186
  </define>
patrick@2
   187
  <define name="place.content">
patrick@2
   188
    <ref name="inlines"/>
patrick@2
   189
  </define>
patrick@0
   190
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   191
  <!-- ~~~~~~ source -->
patrick@0
   192
  <define name="source">
patrick@0
   193
    <element name="source">
patrick@0
   194
      <ref name="source.attributes"/>
patrick@0
   195
      <choice>
patrick@0
   196
        <group>
patrick@0
   197
          <attribute name="type">
patrick@0
   198
            <value>book</value>
patrick@0
   199
          </attribute>
patrick@0
   200
          <ref name="source.content.book"/>
patrick@0
   201
        </group>
patrick@0
   202
        <attribute name="type">
patrick@0
   203
          <value>file</value>
patrick@0
   204
        </attribute>
patrick@0
   205
      </choice>
patrick@0
   206
      <ref name="source.content"/>
patrick@0
   207
    </element>
patrick@0
   208
  </define>
patrick@0
   209
  <define name="source.attributes">
patrick@0
   210
    <ref name="source.id.attribute"/>
patrick@0
   211
  </define>
patrick@0
   212
  <define name="source.id.attribute">
patrick@0
   213
    <attribute name="id">
patrick@0
   214
      <data type="NMTOKEN"/>
patrick@0
   215
    </attribute>
patrick@0
   216
  </define>
patrick@0
   217
  <define name="source.content.book">
patrick@0
   218
    <ref name="title"/>
patrick@0
   219
    <zeroOrMore>
patrick@0
   220
      <ref name="pagenumber"/>
patrick@0
   221
    </zeroOrMore>
patrick@0
   222
  </define>
patrick@0
   223
  <define name="source.content">
patrick@0
   224
    <zeroOrMore>
patrick@0
   225
      <ref name="annotation"/>
patrick@0
   226
    </zeroOrMore>
patrick@0
   227
  </define>
patrick@2
   228
  <!-- ~~~~~~ pagenumber -->
patrick@0
   229
  <define name="pagenumber">
patrick@0
   230
    <element name="pagenumber">
patrick@0
   231
      <ref name="pagenumber.attributes"/>
patrick@0
   232
    </element>
patrick@0
   233
  </define>
patrick@0
   234
  <define name="pagenumber.attributes">
patrick@0
   235
    <ref name="pagenumber.value.attribute"/>
patrick@0
   236
  </define>
patrick@0
   237
  <define name="pagenumber.value.attribute">
patrick@0
   238
    <attribute name="value">
patrick@0
   239
      <ref name="pagenumber.value.enumeration"/>
patrick@0
   240
    </attribute>
patrick@0
   241
  </define>
patrick@0
   242
  <define name="pagenumber.value.enumeration">
patrick@0
   243
    <data type="positiveInteger"/>
patrick@0
   244
  </define>
patrick@0
   245
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   246
  <!-- ~~~~~~ subjectset -->
patrick@0
   247
  <define name="subjectset">
patrick@0
   248
    <element name="subjectset">
patrick@0
   249
      <ref name="subjectset.content"/>
patrick@0
   250
    </element>
patrick@0
   251
  </define>
patrick@0
   252
  <define name="subjectset.content">
patrick@0
   253
    <oneOrMore>
patrick@0
   254
      <ref name="subject"/>
patrick@0
   255
    </oneOrMore>
patrick@0
   256
  </define>
patrick@2
   257
  <!-- ~~~~~~ subject -->
patrick@0
   258
  <define name="subject">
patrick@0
   259
    <element name="subject">
patrick@0
   260
      <ref name="subject.attributes"/>
patrick@0
   261
    </element>
patrick@0
   262
  </define>
patrick@0
   263
  <define name="subject.attributes">
patrick@0
   264
    <ref name="subject.id.attribute"/>
patrick@0
   265
  </define>
patrick@0
   266
  <define name="subject.id.attribute">
patrick@0
   267
    <attribute name="id">
patrick@0
   268
      <data type="NMTOKEN"/>
patrick@0
   269
    </attribute>
patrick@0
   270
  </define>
patrick@5
   271
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   272
  <define name="abstract">
patrick@2
   273
    <element name="abstract">
patrick@2
   274
      <ref name="abstract.content"/>
patrick@2
   275
    </element>
patrick@2
   276
  </define>
patrick@2
   277
  <define name="abstract.content">
patrick@2
   278
    <oneOrMore>
patrick@2
   279
      <ref name="parag"/>
patrick@2
   280
    </oneOrMore>
patrick@2
   281
  </define>
patrick@0
   282
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   283
  <define name="annotation">
patrick@0
   284
    <element name="annotation">
patrick@0
   285
      <ref name="annotation.content"/>
patrick@0
   286
    </element>
patrick@0
   287
  </define>
patrick@0
   288
  <define name="annotation.content">
patrick@0
   289
    <ref name="inlines"/>
patrick@0
   290
  </define>
patrick@0
   291
  <!--
patrick@0
   292
    =============================================================================
patrick@0
   293
                                    Division level
patrick@0
   294
    =============================================================================
patrick@0
   295
  -->
patrick@0
   296
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   297
  <define name="division">
patrick@0
   298
    <element name="division">
patrick@0
   299
      <ref name="division.content"/>
patrick@0
   300
    </element>
patrick@0
   301
  </define>
patrick@0
   302
  <define name="division.content">
patrick@0
   303
    <optional>
patrick@0
   304
      <ref name="metadata"/>
patrick@0
   305
    </optional>
patrick@0
   306
    <choice>
patrick@0
   307
      <oneOrMore>
patrick@0
   308
        <ref name="division"/>
patrick@0
   309
      </oneOrMore>
patrick@0
   310
      <oneOrMore>
patrick@0
   311
        <ref name="topic"/>
patrick@0
   312
      </oneOrMore>
patrick@0
   313
    </choice>
patrick@0
   314
  </define>
patrick@0
   315
  <!--
patrick@0
   316
    =============================================================================
patrick@0
   317
                                  Component level
patrick@0
   318
    =============================================================================
patrick@0
   319
  -->
patrick@0
   320
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   321
  <define name="topic">
patrick@0
   322
    <element name="topic">
patrick@0
   323
      <ref name="topic.attributes"/>
patrick@0
   324
      <ref name="topic.content"/>
patrick@0
   325
    </element>
patrick@0
   326
  </define>
patrick@0
   327
  <define name="top.topic.attributes">
patrick@0
   328
    <interleave>
patrick@0
   329
      <ref name="topic.id.attribute"/>
patrick@0
   330
      <optional>
patrick@0
   331
        <ref name="topic.type.attribute"/>
patrick@0
   332
      </optional>
patrick@0
   333
    </interleave>
patrick@0
   334
  </define>
patrick@0
   335
  <define name="topic.attributes">
patrick@0
   336
    <interleave>
patrick@0
   337
      <optional>
patrick@0
   338
        <ref name="topic.id.attribute"/>
patrick@0
   339
      </optional>
patrick@0
   340
      <optional>
patrick@0
   341
        <ref name="topic.type.attribute"/>
patrick@0
   342
      </optional>
patrick@0
   343
    </interleave>
patrick@0
   344
  </define>
patrick@0
   345
  <define name="topic.id.attribute">
patrick@0
   346
    <attribute name="xml:id">
patrick@0
   347
      <data type="ID"/>
patrick@0
   348
    </attribute>
patrick@0
   349
  </define>
patrick@0
   350
  <define name="topic.type.attribute">
patrick@0
   351
    <attribute name="type">
patrick@0
   352
      <data type="NCName"/>
patrick@0
   353
    </attribute>
patrick@0
   354
  </define>
patrick@0
   355
  <define name="topic.content">
patrick@0
   356
    <optional>
patrick@0
   357
      <ref name="metadata"/>
patrick@0
   358
    </optional>
patrick@0
   359
    <oneOrMore>
patrick@0
   360
      <ref name="section"/>
patrick@0
   361
    </oneOrMore>
patrick@0
   362
  </define>
patrick@0
   363
  <!--
patrick@0
   364
    =============================================================================
patrick@0
   365
                                    Section level
patrick@0
   366
    =============================================================================
patrick@0
   367
  -->
patrick@0
   368
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   369
  <define name="section">
patrick@0
   370
    <element name="section">
patrick@0
   371
      <ref name="section.content"/>
patrick@0
   372
      <ref name="section.attributes"/>
patrick@0
   373
    </element>
patrick@0
   374
  </define>
patrick@0
   375
  <define name="section.content">
patrick@0
   376
    <optional>
patrick@0
   377
      <ref name="metadata"/>
patrick@0
   378
    </optional>
patrick@0
   379
    <choice>
patrick@0
   380
      <oneOrMore>
patrick@0
   381
        <ref name="section"/>
patrick@0
   382
      </oneOrMore>
patrick@0
   383
      <oneOrMore>
patrick@0
   384
        <choice>
patrick@0
   385
          <ref name="parag"/>
patrick@0
   386
          <ref name="media"/>
patrick@5
   387
          <ref name="speech"/>
patrick@0
   388
        </choice>
patrick@0
   389
      </oneOrMore>
patrick@0
   390
    </choice>
patrick@0
   391
  </define>
patrick@0
   392
  <define name="section.attributes">
patrick@0
   393
    <optional>
patrick@0
   394
      <ref name="status.attribute"/>
patrick@0
   395
    </optional>
patrick@0
   396
  </define>
patrick@0
   397
  <define name="status.attribute">
patrick@0
   398
    <attribute name="status">
patrick@0
   399
      <data type="NCName"/>
patrick@0
   400
    </attribute>
patrick@0
   401
  </define>
patrick@0
   402
  <!--
patrick@0
   403
    =============================================================================
patrick@0
   404
                                    Block level
patrick@0
   405
    =============================================================================
patrick@0
   406
  -->
patrick@0
   407
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ parag ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   408
  <define name="parag">
patrick@0
   409
    <element name="parag">
patrick@0
   410
      <ref name="parag.content"/>
patrick@0
   411
    </element>
patrick@0
   412
  </define>
patrick@0
   413
  <define name="parag.content">
patrick@0
   414
    <interleave>
patrick@0
   415
      <ref name="inlines"/>
patrick@0
   416
      <zeroOrMore>
patrick@0
   417
        <ref name="link"/>
patrick@0
   418
      </zeroOrMore>
patrick@0
   419
    </interleave>
patrick@0
   420
  </define>
patrick@0
   421
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   422
  <!-- ~~~~~~ media -->
patrick@0
   423
  <define name="media">
patrick@0
   424
    <element name="media">
patrick@0
   425
      <ref name="media.content"/>
patrick@0
   426
    </element>
patrick@0
   427
  </define>
patrick@0
   428
  <define name="media.content">
patrick@0
   429
    <oneOrMore>
patrick@0
   430
      <ref name="image"/>
patrick@0
   431
    </oneOrMore>
patrick@0
   432
    <optional>
patrick@0
   433
      <ref name="media.caption"/>
patrick@0
   434
    </optional>
patrick@0
   435
  </define>
patrick@0
   436
  <define name="media.id.attribute">
patrick@0
   437
    <attribute name="id">
patrick@0
   438
      <data type="NMTOKEN"/>
patrick@0
   439
    </attribute>
patrick@0
   440
  </define>
patrick@2
   441
  <!-- ~~~~~~ image -->
patrick@0
   442
  <define name="image">
patrick@0
   443
    <element name="image">
patrick@0
   444
      <ref name="image.attributes"/>
patrick@0
   445
      <ref name="image.content"/>
patrick@0
   446
    </element>
patrick@0
   447
  </define>
patrick@0
   448
  <define name="image.attributes">
patrick@0
   449
    <ref name="media.id.attribute"/>
patrick@0
   450
  </define>
patrick@0
   451
  <define name="image.content">
patrick@0
   452
    <optional>
patrick@0
   453
      <ref name="copyright"/>
patrick@0
   454
    </optional>
patrick@0
   455
  </define>
patrick@3
   456
  <!-- ~~~~~~ caption -->
patrick@3
   457
  <define name="media.caption">
patrick@3
   458
    <element name="caption">
patrick@3
   459
      <ref name="media.caption.content"/>
patrick@3
   460
    </element>
patrick@3
   461
  </define>
patrick@3
   462
  <define name="media.caption.content">
patrick@3
   463
    <oneOrMore>
patrick@3
   464
      <ref name="parag"/>
patrick@3
   465
    </oneOrMore>
patrick@3
   466
  </define>
patrick@2
   467
  <!-- ~~~~~~ copyright -->
patrick@0
   468
  <define name="copyright">
patrick@0
   469
    <element name="copyright">
patrick@0
   470
      <ref name="copyright.content"/>
patrick@0
   471
    </element>
patrick@0
   472
  </define>
patrick@0
   473
  <define name="copyright.content">
patrick@0
   474
    <ref name="inlines"/>
patrick@0
   475
  </define>
patrick@5
   476
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
   477
  <!-- ~~~~~~ speech -->
patrick@5
   478
  <define name="speech">
patrick@5
   479
    <element name="speech">
patrick@5
   480
      <ref name="speech.content"/>
patrick@5
   481
    </element>
patrick@5
   482
  </define>
patrick@5
   483
  <define name="speech.content">
patrick@5
   484
    <optional>
patrick@5
   485
      <ref name="speaker"/>
patrick@5
   486
    </optional>
patrick@5
   487
    <optional>
patrick@5
   488
      <ref name="stage"/>
patrick@5
   489
    </optional>
patrick@5
   490
    <oneOrMore>
patrick@5
   491
      <ref name="parag"/>
patrick@5
   492
    </oneOrMore>
patrick@5
   493
  </define>
patrick@5
   494
  <!-- ~~~~~~ speaker -->
patrick@5
   495
  <define name="speaker">
patrick@5
   496
    <element name="speaker">
patrick@5
   497
      <ref name="speaker.content"/>
patrick@5
   498
    </element>
patrick@5
   499
  </define>
patrick@5
   500
  <define name="speaker.content">
patrick@5
   501
    <ref name="inlines"/>
patrick@5
   502
  </define>
patrick@5
   503
  <!-- ~~~~~~ stage -->
patrick@5
   504
  <define name="stage">
patrick@5
   505
    <element name="stage">
patrick@5
   506
      <ref name="stage.content"/>
patrick@5
   507
    </element>
patrick@5
   508
  </define>
patrick@5
   509
  <define name="stage.content">
patrick@5
   510
    <ref name="inlines"/>
patrick@5
   511
  </define>
patrick@0
   512
  <!--
patrick@0
   513
    =============================================================================
patrick@0
   514
                                    Inline level
patrick@0
   515
    =============================================================================
patrick@0
   516
  -->
patrick@0
   517
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   518
  <define name="inlines">
patrick@0
   519
    <mixed>
patrick@0
   520
      <interleave>
patrick@0
   521
        <zeroOrMore>
patrick@0
   522
          <ref name="sup"/>
patrick@0
   523
        </zeroOrMore>
patrick@0
   524
        <zeroOrMore>
patrick@0
   525
          <ref name="sub"/>
patrick@0
   526
        </zeroOrMore>
patrick@0
   527
        <zeroOrMore>
patrick@0
   528
          <ref name="romannum"/>
patrick@0
   529
        </zeroOrMore>
patrick@0
   530
        <zeroOrMore>
patrick@0
   531
          <ref name="date"/>
patrick@0
   532
        </zeroOrMore>
patrick@0
   533
        <zeroOrMore>
patrick@0
   534
          <ref name="name"/>
patrick@0
   535
        </zeroOrMore>
patrick@0
   536
        <zeroOrMore>
patrick@5
   537
          <ref name="note"/>
patrick@0
   538
        </zeroOrMore>
patrick@0
   539
        <zeroOrMore>
patrick@0
   540
          <ref name="foreign"/>
patrick@0
   541
        </zeroOrMore>
patrick@0
   542
        <zeroOrMore>
patrick@0
   543
          <ref name="highlight"/>
patrick@0
   544
        </zeroOrMore>
patrick@5
   545
        <zeroOrMore>
patrick@5
   546
          <ref name="term"/>
patrick@5
   547
        </zeroOrMore>
patrick@5
   548
        <zeroOrMore>
patrick@5
   549
          <ref name="mentioned"/>
patrick@5
   550
        </zeroOrMore>
patrick@5
   551
        <zeroOrMore>
patrick@5
   552
          <ref name="quote"/>
patrick@5
   553
        </zeroOrMore>
patrick@0
   554
      </interleave>
patrick@0
   555
    </mixed>
patrick@0
   556
  </define>
patrick@0
   557
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   558
  <define name="sup">
patrick@0
   559
    <element name="sup">
patrick@0
   560
      <ref name="inlines"/>
patrick@0
   561
    </element>
patrick@0
   562
  </define>
patrick@0
   563
  <define name="sub">
patrick@0
   564
    <element name="sub">
patrick@0
   565
      <ref name="inlines"/>
patrick@0
   566
    </element>
patrick@0
   567
  </define>
patrick@0
   568
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ romannum ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   569
  <define name="romannum">
patrick@0
   570
    <element name="romannum">
patrick@0
   571
      <data type="token">
patrick@0
   572
        <param name="pattern">([dlxvi]+)</param>
patrick@0
   573
      </data>
patrick@0
   574
    </element>
patrick@0
   575
  </define>
patrick@0
   576
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   577
  <define name="date">
patrick@0
   578
    <element name="date">
patrick@0
   579
      <ref name="date.attributes"/>
patrick@0
   580
      <ref name="date.content"/>
patrick@0
   581
    </element>
patrick@0
   582
  </define>
patrick@0
   583
  <define name="date.attributes">
patrick@5
   584
    <optional>
patrick@5
   585
      <ref name="date.of.attribute"/>
patrick@5
   586
    </optional>
patrick@0
   587
  </define>
patrick@0
   588
  <define name="date.of.attribute">
patrick@0
   589
    <attribute name="of">
patrick@0
   590
      <ref name="date.of.enumeration"/>
patrick@0
   591
    </attribute>
patrick@0
   592
  </define>
patrick@0
   593
  <define name="date.of.enumeration">
patrick@0
   594
    <choice>
patrick@0
   595
      <value>event</value>
patrick@0
   596
      <value>birth</value>
patrick@0
   597
      <value>death</value>
patrick@0
   598
    </choice>
patrick@0
   599
  </define>
patrick@0
   600
  <define name="date.content">
patrick@0
   601
    <choice>
patrick@0
   602
      <data type="date"/>
patrick@0
   603
      <data type="gYearMonth"/>
patrick@0
   604
      <data type="gYear"/>
patrick@0
   605
    </choice>
patrick@0
   606
  </define>
patrick@2
   607
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   608
  <define name="name">
patrick@0
   609
    <element name="name">
patrick@0
   610
      <ref name="name.attributes"/>
patrick@0
   611
      <ref name="name.content"/>
patrick@0
   612
    </element>
patrick@0
   613
  </define>
patrick@0
   614
  <define name="name.attributes">
patrick@0
   615
    <optional>
patrick@0
   616
      <ref name="name.of.attribute"/>
patrick@0
   617
    </optional>
patrick@0
   618
  </define>
patrick@0
   619
  <define name="name.of.attribute">
patrick@0
   620
    <attribute name="of">
patrick@0
   621
      <ref name="name.of.enumeration"/>
patrick@0
   622
    </attribute>
patrick@0
   623
  </define>
patrick@0
   624
  <define name="name.of.enumeration">
patrick@0
   625
    <choice>
patrick@0
   626
      <value>person</value>
patrick@0
   627
      <value>company</value>
patrick@0
   628
      <value>book</value>
patrick@0
   629
      <value>newspaper</value>
patrick@0
   630
      <value>party</value>
patrick@0
   631
    </choice>
patrick@0
   632
  </define>
patrick@2
   633
  <define name="name.content">
patrick@2
   634
    <ref name="inlines"/>
patrick@2
   635
  </define>
patrick@5
   636
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
   637
  <define name="note">
patrick@5
   638
    <element name="note">
patrick@5
   639
      <ref name="note.attributes"/>
patrick@5
   640
      <ref name="note.content"/>
patrick@0
   641
    </element>
patrick@0
   642
  </define>
patrick@5
   643
  <define name="note.attributes">
patrick@0
   644
    <optional>
patrick@5
   645
      <ref name="note.label.attribute"/>
patrick@0
   646
    </optional>
patrick@0
   647
  </define>
patrick@5
   648
  <define name="note.label.attribute">
patrick@0
   649
    <attribute name="label"/>
patrick@0
   650
  </define>
patrick@5
   651
  <define name="note.content">
patrick@0
   652
    <oneOrMore>
patrick@0
   653
      <ref name="parag"/>
patrick@0
   654
    </oneOrMore>
patrick@0
   655
  </define>
patrick@0
   656
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   657
  <define name="foreign">
patrick@0
   658
    <element name="foreign">
patrick@0
   659
      <ref name="foreign.attributes"/>
patrick@0
   660
      <ref name="foreign.content"/>
patrick@0
   661
    </element>
patrick@0
   662
  </define>
patrick@0
   663
  <define name="foreign.attributes">
patrick@0
   664
    <optional>
patrick@0
   665
      <ref name="lang.attribute"/>
patrick@0
   666
    </optional>
patrick@0
   667
  </define>
patrick@0
   668
  <define name="foreign.content">
patrick@0
   669
    <ref name="inlines"/>
patrick@0
   670
  </define>
patrick@0
   671
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   672
  <define name="highlight">
patrick@0
   673
    <element name="highlight">
patrick@0
   674
      <ref name="highlight.content"/>
patrick@0
   675
    </element>
patrick@0
   676
  </define>
patrick@0
   677
  <define name="highlight.content">
patrick@0
   678
    <ref name="inlines"/>
patrick@0
   679
  </define>
patrick@5
   680
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
   681
  <define name="term">
patrick@5
   682
    <element name="term">
patrick@5
   683
      <ref name="term.content"/>
patrick@5
   684
    </element>
patrick@5
   685
  </define>
patrick@5
   686
  <define name="term.content">
patrick@5
   687
    <ref name="inlines"/>
patrick@5
   688
  </define>
patrick@5
   689
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
   690
  <define name="mentioned">
patrick@5
   691
    <element name="mentioned">
patrick@5
   692
      <ref name="mentioned.content"/>
patrick@5
   693
    </element>
patrick@5
   694
  </define>
patrick@5
   695
  <define name="mentioned.content">
patrick@5
   696
    <ref name="inlines"/>
patrick@5
   697
  </define>
patrick@5
   698
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
   699
  <define name="quote">
patrick@5
   700
    <element name="quote">
patrick@5
   701
      <ref name="quote.content"/>
patrick@5
   702
    </element>
patrick@5
   703
  </define>
patrick@5
   704
  <define name="quote.content">
patrick@5
   705
    <ref name="inlines"/>
patrick@5
   706
  </define>
patrick@0
   707
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   708
  <define name="link">
patrick@0
   709
    <element name="link">
patrick@0
   710
      <ref name="link.attributes"/>
patrick@0
   711
      <ref name="link.content"/>
patrick@0
   712
    </element>
patrick@0
   713
  </define>
patrick@0
   714
  <define name="link.attributes">
patrick@0
   715
    <empty/>
patrick@0
   716
  </define>
patrick@0
   717
  <define name="link.content">
patrick@0
   718
    <ref name="inlines"/>
patrick@0
   719
  </define>
patrick@0
   720
</grammar>