RelaxNG/publidoc.rng
author Patrick PIERRE <patrick.pierre@prismallia.fr>
sam., 11 juin 2011 01:26:31 +0200
changeset 11 2b32b535705c
parent 10 0c7725713208
child 12 2885b2c3ff59
permissions -rw-r--r--
Ajout d'un exemple de citation
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@10
   384
        <ref name="block"/>
patrick@0
   385
      </oneOrMore>
patrick@0
   386
    </choice>
patrick@0
   387
  </define>
patrick@0
   388
  <define name="section.attributes">
patrick@0
   389
    <optional>
patrick@0
   390
      <ref name="status.attribute"/>
patrick@0
   391
    </optional>
patrick@0
   392
  </define>
patrick@0
   393
  <define name="status.attribute">
patrick@0
   394
    <attribute name="status">
patrick@0
   395
      <data type="NCName"/>
patrick@0
   396
    </attribute>
patrick@0
   397
  </define>
patrick@0
   398
  <!--
patrick@0
   399
    =============================================================================
patrick@0
   400
                                    Block level
patrick@0
   401
    =============================================================================
patrick@0
   402
  -->
patrick@10
   403
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blocks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@10
   404
  <define name="block">
patrick@10
   405
    <choice>
patrick@10
   406
      <ref name="parag"/>
patrick@10
   407
      <ref name="list"/>
patrick@11
   408
      <ref name="speech"/>
patrick@10
   409
      <ref name="media"/>
patrick@10
   410
    </choice>
patrick@10
   411
  </define>
patrick@10
   412
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ parag ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   413
  <define name="parag">
patrick@0
   414
    <element name="parag">
patrick@0
   415
      <ref name="parag.content"/>
patrick@0
   416
    </element>
patrick@0
   417
  </define>
patrick@0
   418
  <define name="parag.content">
patrick@0
   419
    <interleave>
patrick@0
   420
      <ref name="inlines"/>
patrick@0
   421
      <zeroOrMore>
patrick@0
   422
        <ref name="link"/>
patrick@0
   423
      </zeroOrMore>
patrick@0
   424
    </interleave>
patrick@0
   425
  </define>
patrick@10
   426
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@10
   427
  <!-- ~~~~~~ list -->
patrick@10
   428
  <define name="list">
patrick@10
   429
    <element name="list">
patrick@10
   430
      <ref name="list.content"/>
patrick@10
   431
    </element>
patrick@10
   432
  </define>
patrick@10
   433
  <define name="list.content">
patrick@10
   434
    <optional>
patrick@10
   435
      <ref name="title"/>
patrick@10
   436
    </optional>
patrick@10
   437
    <choice>
patrick@10
   438
      <group>
patrick@10
   439
        <optional>
patrick@10
   440
          <attribute name="type">
patrick@11
   441
            <value>itemized</value>
patrick@10
   442
          </attribute>
patrick@10
   443
        </optional>
patrick@10
   444
        <ref name="item"/>
patrick@10
   445
        <oneOrMore>
patrick@10
   446
          <ref name="item"/>
patrick@10
   447
        </oneOrMore>
patrick@10
   448
      </group>
patrick@10
   449
      <group>
patrick@10
   450
        <attribute name="type">
patrick@11
   451
          <value>ordered</value>
patrick@10
   452
        </attribute>
patrick@10
   453
        <ref name="item"/>
patrick@10
   454
        <oneOrMore>
patrick@10
   455
          <ref name="item"/>
patrick@10
   456
        </oneOrMore>
patrick@10
   457
      </group>
patrick@10
   458
      <group>
patrick@10
   459
        <attribute name="type">
patrick@10
   460
          <value>glossary</value>
patrick@10
   461
        </attribute>
patrick@10
   462
        <oneOrMore>
patrick@10
   463
          <ref name="glossary.item"/>
patrick@10
   464
        </oneOrMore>
patrick@10
   465
      </group>
patrick@10
   466
    </choice>
patrick@10
   467
  </define>
patrick@10
   468
  <!-- ~~~~~~ item -->
patrick@10
   469
  <define name="item">
patrick@10
   470
    <element name="item">
patrick@10
   471
      <ref name="item.content"/>
patrick@10
   472
    </element>
patrick@10
   473
  </define>
patrick@10
   474
  <define name="item.content">
patrick@10
   475
    <oneOrMore>
patrick@10
   476
      <ref name="block"/>
patrick@10
   477
    </oneOrMore>
patrick@10
   478
  </define>
patrick@10
   479
  <!-- ~~~~~~ glossary.item -->
patrick@10
   480
  <define name="glossary.item">
patrick@10
   481
    <element name="item">
patrick@10
   482
      <ref name="glossary.item.content"/>
patrick@10
   483
    </element>
patrick@10
   484
  </define>
patrick@10
   485
  <define name="glossary.item.content">
patrick@10
   486
    <ref name="label"/>
patrick@10
   487
    <oneOrMore>
patrick@10
   488
      <ref name="block"/>
patrick@10
   489
    </oneOrMore>
patrick@10
   490
  </define>
patrick@10
   491
  <!-- ~~~~~~ label -->
patrick@10
   492
  <define name="label">
patrick@10
   493
    <element name="label">
patrick@10
   494
      <ref name="label.content"/>
patrick@10
   495
    </element>
patrick@10
   496
  </define>
patrick@10
   497
  <define name="label.content">
patrick@10
   498
    <ref name="inlines"/>
patrick@10
   499
  </define>
patrick@11
   500
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@11
   501
  <!-- ~~~~~~ speech -->
patrick@11
   502
  <define name="speech">
patrick@11
   503
    <element name="speech">
patrick@11
   504
      <ref name="speech.content"/>
patrick@11
   505
    </element>
patrick@11
   506
  </define>
patrick@11
   507
  <define name="speech.content">
patrick@11
   508
    <optional>
patrick@11
   509
      <ref name="speaker"/>
patrick@11
   510
    </optional>
patrick@11
   511
    <optional>
patrick@11
   512
      <ref name="stage"/>
patrick@11
   513
    </optional>
patrick@11
   514
    <oneOrMore>
patrick@11
   515
      <ref name="parag"/>
patrick@11
   516
    </oneOrMore>
patrick@11
   517
  </define>
patrick@11
   518
  <!-- ~~~~~~ speaker -->
patrick@11
   519
  <define name="speaker">
patrick@11
   520
    <element name="speaker">
patrick@11
   521
      <ref name="speaker.content"/>
patrick@11
   522
    </element>
patrick@11
   523
  </define>
patrick@11
   524
  <define name="speaker.content">
patrick@11
   525
    <ref name="inlines"/>
patrick@11
   526
  </define>
patrick@11
   527
  <!-- ~~~~~~ stage -->
patrick@11
   528
  <define name="stage">
patrick@11
   529
    <element name="stage">
patrick@11
   530
      <ref name="stage.content"/>
patrick@11
   531
    </element>
patrick@11
   532
  </define>
patrick@11
   533
  <define name="stage.content">
patrick@11
   534
    <ref name="inlines"/>
patrick@11
   535
  </define>
patrick@0
   536
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   537
  <!-- ~~~~~~ media -->
patrick@0
   538
  <define name="media">
patrick@0
   539
    <element name="media">
patrick@0
   540
      <ref name="media.content"/>
patrick@0
   541
    </element>
patrick@0
   542
  </define>
patrick@0
   543
  <define name="media.content">
patrick@0
   544
    <oneOrMore>
patrick@0
   545
      <ref name="image"/>
patrick@0
   546
    </oneOrMore>
patrick@0
   547
    <optional>
patrick@0
   548
      <ref name="media.caption"/>
patrick@0
   549
    </optional>
patrick@0
   550
  </define>
patrick@0
   551
  <define name="media.id.attribute">
patrick@0
   552
    <attribute name="id">
patrick@0
   553
      <data type="NMTOKEN"/>
patrick@0
   554
    </attribute>
patrick@0
   555
  </define>
patrick@2
   556
  <!-- ~~~~~~ image -->
patrick@0
   557
  <define name="image">
patrick@0
   558
    <element name="image">
patrick@0
   559
      <ref name="image.attributes"/>
patrick@0
   560
      <ref name="image.content"/>
patrick@0
   561
    </element>
patrick@0
   562
  </define>
patrick@0
   563
  <define name="image.attributes">
patrick@0
   564
    <ref name="media.id.attribute"/>
patrick@0
   565
  </define>
patrick@0
   566
  <define name="image.content">
patrick@0
   567
    <optional>
patrick@0
   568
      <ref name="copyright"/>
patrick@0
   569
    </optional>
patrick@0
   570
  </define>
patrick@3
   571
  <!-- ~~~~~~ caption -->
patrick@3
   572
  <define name="media.caption">
patrick@3
   573
    <element name="caption">
patrick@3
   574
      <ref name="media.caption.content"/>
patrick@3
   575
    </element>
patrick@3
   576
  </define>
patrick@3
   577
  <define name="media.caption.content">
patrick@3
   578
    <oneOrMore>
patrick@3
   579
      <ref name="parag"/>
patrick@3
   580
    </oneOrMore>
patrick@3
   581
  </define>
patrick@2
   582
  <!-- ~~~~~~ copyright -->
patrick@0
   583
  <define name="copyright">
patrick@0
   584
    <element name="copyright">
patrick@0
   585
      <ref name="copyright.content"/>
patrick@0
   586
    </element>
patrick@0
   587
  </define>
patrick@0
   588
  <define name="copyright.content">
patrick@0
   589
    <ref name="inlines"/>
patrick@0
   590
  </define>
patrick@0
   591
  <!--
patrick@0
   592
    =============================================================================
patrick@0
   593
                                    Inline level
patrick@0
   594
    =============================================================================
patrick@0
   595
  -->
patrick@0
   596
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   597
  <define name="inlines">
patrick@0
   598
    <mixed>
patrick@0
   599
      <interleave>
patrick@0
   600
        <zeroOrMore>
patrick@0
   601
          <ref name="sup"/>
patrick@0
   602
        </zeroOrMore>
patrick@0
   603
        <zeroOrMore>
patrick@0
   604
          <ref name="sub"/>
patrick@0
   605
        </zeroOrMore>
patrick@0
   606
        <zeroOrMore>
patrick@0
   607
          <ref name="romannum"/>
patrick@0
   608
        </zeroOrMore>
patrick@0
   609
        <zeroOrMore>
patrick@0
   610
          <ref name="date"/>
patrick@0
   611
        </zeroOrMore>
patrick@0
   612
        <zeroOrMore>
patrick@0
   613
          <ref name="name"/>
patrick@0
   614
        </zeroOrMore>
patrick@0
   615
        <zeroOrMore>
patrick@5
   616
          <ref name="note"/>
patrick@0
   617
        </zeroOrMore>
patrick@0
   618
        <zeroOrMore>
patrick@0
   619
          <ref name="foreign"/>
patrick@0
   620
        </zeroOrMore>
patrick@0
   621
        <zeroOrMore>
patrick@0
   622
          <ref name="highlight"/>
patrick@0
   623
        </zeroOrMore>
patrick@5
   624
        <zeroOrMore>
patrick@5
   625
          <ref name="mentioned"/>
patrick@5
   626
        </zeroOrMore>
patrick@5
   627
        <zeroOrMore>
patrick@5
   628
          <ref name="quote"/>
patrick@5
   629
        </zeroOrMore>
patrick@8
   630
        <zeroOrMore>
patrick@8
   631
          <ref name="acronym"/>
patrick@8
   632
        </zeroOrMore>
patrick@10
   633
        <zeroOrMore>
patrick@10
   634
          <ref name="term"/>
patrick@10
   635
        </zeroOrMore>
patrick@0
   636
      </interleave>
patrick@0
   637
    </mixed>
patrick@0
   638
  </define>
patrick@0
   639
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   640
  <define name="sup">
patrick@0
   641
    <element name="sup">
patrick@0
   642
      <ref name="inlines"/>
patrick@0
   643
    </element>
patrick@0
   644
  </define>
patrick@0
   645
  <define name="sub">
patrick@0
   646
    <element name="sub">
patrick@0
   647
      <ref name="inlines"/>
patrick@0
   648
    </element>
patrick@0
   649
  </define>
patrick@0
   650
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ romannum ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   651
  <define name="romannum">
patrick@0
   652
    <element name="romannum">
patrick@0
   653
      <data type="token">
patrick@0
   654
        <param name="pattern">([dlxvi]+)</param>
patrick@0
   655
      </data>
patrick@0
   656
    </element>
patrick@0
   657
  </define>
patrick@0
   658
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   659
  <define name="date">
patrick@0
   660
    <element name="date">
patrick@0
   661
      <ref name="date.attributes"/>
patrick@0
   662
      <ref name="date.content"/>
patrick@0
   663
    </element>
patrick@0
   664
  </define>
patrick@0
   665
  <define name="date.attributes">
patrick@5
   666
    <optional>
patrick@5
   667
      <ref name="date.of.attribute"/>
patrick@5
   668
    </optional>
patrick@0
   669
  </define>
patrick@0
   670
  <define name="date.of.attribute">
patrick@0
   671
    <attribute name="of">
patrick@0
   672
      <ref name="date.of.enumeration"/>
patrick@0
   673
    </attribute>
patrick@0
   674
  </define>
patrick@0
   675
  <define name="date.of.enumeration">
patrick@0
   676
    <choice>
patrick@0
   677
      <value>event</value>
patrick@0
   678
      <value>birth</value>
patrick@0
   679
      <value>death</value>
patrick@0
   680
    </choice>
patrick@0
   681
  </define>
patrick@0
   682
  <define name="date.content">
patrick@0
   683
    <choice>
patrick@0
   684
      <data type="date"/>
patrick@0
   685
      <data type="gYearMonth"/>
patrick@0
   686
      <data type="gYear"/>
patrick@0
   687
    </choice>
patrick@0
   688
  </define>
patrick@2
   689
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   690
  <define name="name">
patrick@0
   691
    <element name="name">
patrick@0
   692
      <ref name="name.attributes"/>
patrick@0
   693
      <ref name="name.content"/>
patrick@0
   694
    </element>
patrick@0
   695
  </define>
patrick@0
   696
  <define name="name.attributes">
patrick@0
   697
    <optional>
patrick@0
   698
      <ref name="name.of.attribute"/>
patrick@0
   699
    </optional>
patrick@0
   700
  </define>
patrick@0
   701
  <define name="name.of.attribute">
patrick@0
   702
    <attribute name="of">
patrick@0
   703
      <ref name="name.of.enumeration"/>
patrick@0
   704
    </attribute>
patrick@0
   705
  </define>
patrick@0
   706
  <define name="name.of.enumeration">
patrick@0
   707
    <choice>
patrick@0
   708
      <value>person</value>
patrick@0
   709
      <value>company</value>
patrick@0
   710
      <value>book</value>
patrick@0
   711
      <value>newspaper</value>
patrick@0
   712
      <value>party</value>
patrick@0
   713
    </choice>
patrick@0
   714
  </define>
patrick@2
   715
  <define name="name.content">
patrick@2
   716
    <ref name="inlines"/>
patrick@2
   717
  </define>
patrick@5
   718
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
   719
  <define name="note">
patrick@5
   720
    <element name="note">
patrick@5
   721
      <ref name="note.attributes"/>
patrick@5
   722
      <ref name="note.content"/>
patrick@0
   723
    </element>
patrick@0
   724
  </define>
patrick@5
   725
  <define name="note.attributes">
patrick@0
   726
    <optional>
patrick@5
   727
      <ref name="note.label.attribute"/>
patrick@0
   728
    </optional>
patrick@0
   729
  </define>
patrick@5
   730
  <define name="note.label.attribute">
patrick@0
   731
    <attribute name="label"/>
patrick@0
   732
  </define>
patrick@5
   733
  <define name="note.content">
patrick@0
   734
    <oneOrMore>
patrick@0
   735
      <ref name="parag"/>
patrick@0
   736
    </oneOrMore>
patrick@0
   737
  </define>
patrick@0
   738
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   739
  <define name="foreign">
patrick@0
   740
    <element name="foreign">
patrick@0
   741
      <ref name="foreign.attributes"/>
patrick@0
   742
      <ref name="foreign.content"/>
patrick@0
   743
    </element>
patrick@0
   744
  </define>
patrick@0
   745
  <define name="foreign.attributes">
patrick@0
   746
    <optional>
patrick@0
   747
      <ref name="lang.attribute"/>
patrick@0
   748
    </optional>
patrick@0
   749
  </define>
patrick@0
   750
  <define name="foreign.content">
patrick@0
   751
    <ref name="inlines"/>
patrick@0
   752
  </define>
patrick@0
   753
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   754
  <define name="highlight">
patrick@0
   755
    <element name="highlight">
patrick@0
   756
      <ref name="highlight.content"/>
patrick@0
   757
    </element>
patrick@0
   758
  </define>
patrick@0
   759
  <define name="highlight.content">
patrick@0
   760
    <ref name="inlines"/>
patrick@0
   761
  </define>
patrick@5
   762
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
   763
  <define name="mentioned">
patrick@5
   764
    <element name="mentioned">
patrick@5
   765
      <ref name="mentioned.content"/>
patrick@5
   766
    </element>
patrick@5
   767
  </define>
patrick@5
   768
  <define name="mentioned.content">
patrick@5
   769
    <ref name="inlines"/>
patrick@5
   770
  </define>
patrick@5
   771
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
   772
  <define name="quote">
patrick@5
   773
    <element name="quote">
patrick@5
   774
      <ref name="quote.content"/>
patrick@5
   775
    </element>
patrick@5
   776
  </define>
patrick@5
   777
  <define name="quote.content">
patrick@5
   778
    <ref name="inlines"/>
patrick@5
   779
  </define>
patrick@8
   780
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@8
   781
  <define name="acronym">
patrick@8
   782
    <element name="acronym">
patrick@8
   783
      <ref name="acronym.content"/>
patrick@8
   784
    </element>
patrick@8
   785
  </define>
patrick@8
   786
  <define name="acronym.content">
patrick@8
   787
    <ref name="inlines"/>
patrick@8
   788
  </define>
patrick@10
   789
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@10
   790
  <define name="term">
patrick@10
   791
    <element name="term">
patrick@10
   792
      <ref name="term.content"/>
patrick@10
   793
    </element>
patrick@10
   794
  </define>
patrick@10
   795
  <define name="term.content">
patrick@10
   796
    <ref name="inlines"/>
patrick@10
   797
  </define>
patrick@0
   798
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   799
  <define name="link">
patrick@0
   800
    <element name="link">
patrick@0
   801
      <ref name="link.attributes"/>
patrick@0
   802
      <ref name="link.content"/>
patrick@0
   803
    </element>
patrick@0
   804
  </define>
patrick@0
   805
  <define name="link.attributes">
patrick@10
   806
    <optional>
patrick@10
   807
      <choice>
patrick@10
   808
        <ref name="uri.attribute"/>
patrick@10
   809
        <ref name="idref.attribute"/>
patrick@10
   810
      </choice>
patrick@10
   811
    </optional>
patrick@10
   812
  </define>
patrick@10
   813
  <define name="uri.attribute">
patrick@10
   814
    <attribute name="uri">
patrick@10
   815
      <data type="anyURI"/>
patrick@10
   816
    </attribute>
patrick@10
   817
  </define>
patrick@10
   818
  <define name="idref.attribute">
patrick@10
   819
    <attribute name="idref">
patrick@10
   820
      <data type="IDREF"/>
patrick@10
   821
    </attribute>
patrick@0
   822
  </define>
patrick@0
   823
  <define name="link.content">
patrick@0
   824
    <ref name="inlines"/>
patrick@0
   825
  </define>
patrick@0
   826
</grammar>