RelaxNG/publidoc.rng
author Patrick PIERRE <patrick.pierre@prismallia.fr>
dim., 12 juin 2011 19:35:31 +0200
changeset 23 814ea44c2469
parent 22 94b8e4454c47
child 24 53a80accc248
permissions -rw-r--r--
Transformation XSL dans les publiset
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@20
   132
      <optional>
patrick@20
   133
        <ref name="language"/>
patrick@0
   134
      </optional>
patrick@0
   135
      <zeroOrMore>
patrick@0
   136
        <ref name="author"/>
patrick@0
   137
      </zeroOrMore>
patrick@0
   138
      <optional>
patrick@0
   139
        <ref name="publisher"/>
patrick@0
   140
      </optional>
patrick@0
   141
      <optional>
patrick@0
   142
        <ref name="date"/>
patrick@0
   143
      </optional>
patrick@0
   144
      <optional>
patrick@0
   145
        <ref name="place"/>
patrick@0
   146
      </optional>
patrick@0
   147
      <zeroOrMore>
patrick@0
   148
        <ref name="source"/>
patrick@0
   149
      </zeroOrMore>
patrick@0
   150
      <optional>
patrick@0
   151
        <ref name="subjectset"/>
patrick@0
   152
      </optional>
patrick@0
   153
      <optional>
patrick@0
   154
        <ref name="abstract"/>
patrick@0
   155
      </optional>
patrick@0
   156
      <zeroOrMore>
patrick@0
   157
        <ref name="annotation"/>
patrick@0
   158
      </zeroOrMore>
patrick@0
   159
    </interleave>
patrick@0
   160
  </define>
patrick@20
   161
  <define name="division.head.content">
patrick@20
   162
    <interleave>
patrick@20
   163
      <optional>
patrick@20
   164
        <ref name="title"/>
patrick@20
   165
        <optional>
patrick@20
   166
          <ref name="subtitle"/>
patrick@20
   167
        </optional>
patrick@20
   168
      </optional>
patrick@20
   169
      <optional>
patrick@20
   170
        <ref name="language"/>
patrick@20
   171
      </optional>
patrick@20
   172
      <zeroOrMore>
patrick@20
   173
        <ref name="annotation"/>
patrick@20
   174
      </zeroOrMore>
patrick@20
   175
    </interleave>
patrick@20
   176
  </define>
patrick@20
   177
  <define name="component.head.content">
patrick@20
   178
    <interleave>
patrick@20
   179
      <optional>
patrick@20
   180
        <ref name="title"/>
patrick@20
   181
        <optional>
patrick@20
   182
          <ref name="subtitle"/>
patrick@20
   183
        </optional>
patrick@20
   184
      </optional>
patrick@20
   185
      <optional>
patrick@20
   186
        <ref name="language"/>
patrick@20
   187
      </optional>
patrick@20
   188
      <zeroOrMore>
patrick@20
   189
        <ref name="author"/>
patrick@20
   190
      </zeroOrMore>
patrick@20
   191
      <zeroOrMore>
patrick@20
   192
        <ref name="annotation"/>
patrick@20
   193
      </zeroOrMore>
patrick@20
   194
    </interleave>
patrick@20
   195
  </define>
patrick@20
   196
  <define name="section.head.content">
patrick@20
   197
    <interleave>
patrick@20
   198
      <optional>
patrick@20
   199
        <ref name="title"/>
patrick@20
   200
        <optional>
patrick@20
   201
          <ref name="subtitle"/>
patrick@20
   202
        </optional>
patrick@20
   203
      </optional>
patrick@20
   204
      <optional>
patrick@20
   205
        <ref name="language"/>
patrick@20
   206
      </optional>
patrick@20
   207
      <zeroOrMore>
patrick@20
   208
        <ref name="annotation"/>
patrick@20
   209
      </zeroOrMore>
patrick@20
   210
    </interleave>
patrick@20
   211
  </define>
patrick@20
   212
  <define name="block.head.content">
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
  </define>
patrick@0
   220
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   221
  <define name="title">
patrick@0
   222
    <element name="title">
patrick@0
   223
      <ref name="title.content"/>
patrick@0
   224
    </element>
patrick@0
   225
  </define>
patrick@0
   226
  <define name="subtitle">
patrick@0
   227
    <element name="subtitle">
patrick@0
   228
      <ref name="title.content"/>
patrick@0
   229
    </element>
patrick@0
   230
  </define>
patrick@20
   231
  <define name="title.content">
patrick@20
   232
    <ref name="inlines"/>
patrick@20
   233
  </define>
patrick@20
   234
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@20
   235
  <define name="language">
patrick@20
   236
    <element name="language">
patrick@20
   237
      <ref name="language.attributes"/>
patrick@20
   238
    </element>
patrick@20
   239
  </define>
patrick@20
   240
  <define name="language.attributes">
patrick@20
   241
    <ref name="lang.attribute"/>
patrick@20
   242
  </define>
patrick@20
   243
  <define name="lang.attribute">
patrick@20
   244
    <attribute name="xml:lang">
patrick@20
   245
      <data type="language"/>
patrick@20
   246
    </attribute>
patrick@20
   247
  </define>
patrick@0
   248
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
   249
  <!-- ~~~~~~ author -->
patrick@0
   250
  <define name="author">
patrick@0
   251
    <element name="author">
patrick@0
   252
      <ref name="author.content"/>
patrick@0
   253
    </element>
patrick@0
   254
  </define>
patrick@0
   255
  <define name="author.content">
patrick@0
   256
    <optional>
patrick@0
   257
      <ref name="firstname"/>
patrick@0
   258
    </optional>
patrick@0
   259
    <ref name="lastname"/>
patrick@0
   260
  </define>
patrick@5
   261
  <!-- ~~~~~~ publisher -->
patrick@0
   262
  <define name="publisher">
patrick@0
   263
    <element name="publisher">
patrick@0
   264
      <ref name="publisher.content"/>
patrick@0
   265
    </element>
patrick@0
   266
  </define>
patrick@0
   267
  <define name="publisher.content">
patrick@0
   268
    <ref name="inlines"/>
patrick@0
   269
  </define>
patrick@5
   270
  <!-- ~~~~~~ firstname -->
patrick@5
   271
  <define name="firstname">
patrick@5
   272
    <element name="firstname">
patrick@5
   273
      <ref name="firstname.content"/>
patrick@5
   274
    </element>
patrick@5
   275
  </define>
patrick@5
   276
  <define name="firstname.content">
patrick@5
   277
    <ref name="inlines"/>
patrick@5
   278
  </define>
patrick@5
   279
  <!-- ~~~~~~ lastname -->
patrick@5
   280
  <define name="lastname">
patrick@5
   281
    <element name="lastname">
patrick@5
   282
      <ref name="lastname.content"/>
patrick@5
   283
    </element>
patrick@5
   284
  </define>
patrick@5
   285
  <define name="lastname.content">
patrick@5
   286
    <ref name="inlines"/>
patrick@5
   287
  </define>
patrick@2
   288
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   289
  <define name="place">
patrick@2
   290
    <element name="place">
patrick@2
   291
      <ref name="place.content"/>
patrick@2
   292
    </element>
patrick@2
   293
  </define>
patrick@2
   294
  <define name="place.content">
patrick@2
   295
    <ref name="inlines"/>
patrick@2
   296
  </define>
patrick@0
   297
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   298
  <!-- ~~~~~~ source -->
patrick@0
   299
  <define name="source">
patrick@0
   300
    <element name="source">
patrick@0
   301
      <ref name="source.attributes"/>
patrick@0
   302
      <choice>
patrick@0
   303
        <group>
patrick@0
   304
          <attribute name="type">
patrick@0
   305
            <value>book</value>
patrick@0
   306
          </attribute>
patrick@0
   307
          <ref name="source.content.book"/>
patrick@0
   308
        </group>
patrick@0
   309
        <attribute name="type">
patrick@0
   310
          <value>file</value>
patrick@0
   311
        </attribute>
patrick@0
   312
      </choice>
patrick@0
   313
      <ref name="source.content"/>
patrick@0
   314
    </element>
patrick@0
   315
  </define>
patrick@0
   316
  <define name="source.attributes">
patrick@0
   317
    <ref name="source.id.attribute"/>
patrick@0
   318
  </define>
patrick@0
   319
  <define name="source.id.attribute">
patrick@0
   320
    <attribute name="id">
patrick@0
   321
      <data type="NMTOKEN"/>
patrick@0
   322
    </attribute>
patrick@0
   323
  </define>
patrick@0
   324
  <define name="source.content.book">
patrick@0
   325
    <ref name="title"/>
patrick@0
   326
    <zeroOrMore>
patrick@0
   327
      <ref name="pagenumber"/>
patrick@0
   328
    </zeroOrMore>
patrick@0
   329
  </define>
patrick@0
   330
  <define name="source.content">
patrick@0
   331
    <zeroOrMore>
patrick@0
   332
      <ref name="annotation"/>
patrick@0
   333
    </zeroOrMore>
patrick@0
   334
  </define>
patrick@2
   335
  <!-- ~~~~~~ pagenumber -->
patrick@0
   336
  <define name="pagenumber">
patrick@0
   337
    <element name="pagenumber">
patrick@0
   338
      <ref name="pagenumber.attributes"/>
patrick@0
   339
    </element>
patrick@0
   340
  </define>
patrick@0
   341
  <define name="pagenumber.attributes">
patrick@0
   342
    <ref name="pagenumber.value.attribute"/>
patrick@0
   343
  </define>
patrick@0
   344
  <define name="pagenumber.value.attribute">
patrick@0
   345
    <attribute name="value">
patrick@0
   346
      <ref name="pagenumber.value.enumeration"/>
patrick@0
   347
    </attribute>
patrick@0
   348
  </define>
patrick@0
   349
  <define name="pagenumber.value.enumeration">
patrick@0
   350
    <data type="positiveInteger"/>
patrick@0
   351
  </define>
patrick@0
   352
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   353
  <!-- ~~~~~~ subjectset -->
patrick@0
   354
  <define name="subjectset">
patrick@0
   355
    <element name="subjectset">
patrick@0
   356
      <ref name="subjectset.content"/>
patrick@0
   357
    </element>
patrick@0
   358
  </define>
patrick@0
   359
  <define name="subjectset.content">
patrick@0
   360
    <oneOrMore>
patrick@0
   361
      <ref name="subject"/>
patrick@0
   362
    </oneOrMore>
patrick@0
   363
  </define>
patrick@2
   364
  <!-- ~~~~~~ subject -->
patrick@0
   365
  <define name="subject">
patrick@0
   366
    <element name="subject">
patrick@0
   367
      <ref name="subject.attributes"/>
patrick@0
   368
    </element>
patrick@0
   369
  </define>
patrick@0
   370
  <define name="subject.attributes">
patrick@0
   371
    <ref name="subject.id.attribute"/>
patrick@0
   372
  </define>
patrick@0
   373
  <define name="subject.id.attribute">
patrick@0
   374
    <attribute name="id">
patrick@0
   375
      <data type="NMTOKEN"/>
patrick@0
   376
    </attribute>
patrick@0
   377
  </define>
patrick@5
   378
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   379
  <define name="abstract">
patrick@2
   380
    <element name="abstract">
patrick@2
   381
      <ref name="abstract.content"/>
patrick@2
   382
    </element>
patrick@2
   383
  </define>
patrick@2
   384
  <define name="abstract.content">
patrick@2
   385
    <oneOrMore>
patrick@20
   386
      <ref name="p"/>
patrick@2
   387
    </oneOrMore>
patrick@2
   388
  </define>
patrick@0
   389
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   390
  <define name="annotation">
patrick@0
   391
    <element name="annotation">
patrick@0
   392
      <ref name="annotation.content"/>
patrick@0
   393
    </element>
patrick@0
   394
  </define>
patrick@0
   395
  <define name="annotation.content">
patrick@0
   396
    <ref name="inlines"/>
patrick@0
   397
  </define>
patrick@0
   398
  <!--
patrick@0
   399
    =============================================================================
patrick@20
   400
                                    DIVISION LEVEL
patrick@0
   401
    =============================================================================
patrick@0
   402
  -->
patrick@0
   403
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   404
  <define name="division">
patrick@0
   405
    <element name="division">
patrick@0
   406
      <ref name="division.content"/>
patrick@0
   407
    </element>
patrick@0
   408
  </define>
patrick@0
   409
  <define name="division.content">
patrick@0
   410
    <optional>
patrick@20
   411
      <ref name="division.head"/>
patrick@0
   412
    </optional>
patrick@0
   413
    <choice>
patrick@0
   414
      <oneOrMore>
patrick@0
   415
        <ref name="division"/>
patrick@0
   416
      </oneOrMore>
patrick@0
   417
      <oneOrMore>
patrick@0
   418
        <ref name="topic"/>
patrick@0
   419
      </oneOrMore>
patrick@0
   420
    </choice>
patrick@0
   421
  </define>
patrick@0
   422
  <!--
patrick@0
   423
    =============================================================================
patrick@20
   424
                                  COMPONENT LEVEL
patrick@0
   425
    =============================================================================
patrick@0
   426
  -->
patrick@0
   427
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   428
  <define name="topic">
patrick@0
   429
    <element name="topic">
patrick@0
   430
      <ref name="topic.attributes"/>
patrick@0
   431
      <ref name="topic.content"/>
patrick@0
   432
    </element>
patrick@0
   433
  </define>
patrick@0
   434
  <define name="topic.attributes">
patrick@0
   435
    <interleave>
patrick@0
   436
      <optional>
patrick@0
   437
        <ref name="topic.id.attribute"/>
patrick@0
   438
      </optional>
patrick@0
   439
      <optional>
patrick@0
   440
        <ref name="topic.type.attribute"/>
patrick@0
   441
      </optional>
patrick@0
   442
    </interleave>
patrick@0
   443
  </define>
patrick@0
   444
  <define name="topic.content">
patrick@0
   445
    <optional>
patrick@20
   446
      <ref name="component.head"/>
patrick@0
   447
    </optional>
patrick@0
   448
    <oneOrMore>
patrick@0
   449
      <ref name="section"/>
patrick@0
   450
    </oneOrMore>
patrick@0
   451
  </define>
patrick@0
   452
  <!--
patrick@0
   453
    =============================================================================
patrick@20
   454
                                    SECTION LEVEL
patrick@0
   455
    =============================================================================
patrick@0
   456
  -->
patrick@20
   457
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   458
  <define name="section">
patrick@0
   459
    <element name="section">
patrick@0
   460
      <ref name="section.content"/>
patrick@0
   461
      <ref name="section.attributes"/>
patrick@0
   462
    </element>
patrick@0
   463
  </define>
patrick@0
   464
  <define name="section.content">
patrick@0
   465
    <optional>
patrick@20
   466
      <ref name="section.head"/>
patrick@0
   467
    </optional>
patrick@0
   468
    <choice>
patrick@0
   469
      <oneOrMore>
patrick@0
   470
        <ref name="section"/>
patrick@0
   471
      </oneOrMore>
patrick@0
   472
      <oneOrMore>
patrick@10
   473
        <ref name="block"/>
patrick@0
   474
      </oneOrMore>
patrick@0
   475
    </choice>
patrick@0
   476
  </define>
patrick@0
   477
  <define name="section.attributes">
patrick@0
   478
    <optional>
patrick@0
   479
      <ref name="status.attribute"/>
patrick@0
   480
    </optional>
patrick@0
   481
  </define>
patrick@0
   482
  <define name="status.attribute">
patrick@0
   483
    <attribute name="status">
patrick@0
   484
      <data type="NCName"/>
patrick@0
   485
    </attribute>
patrick@0
   486
  </define>
patrick@0
   487
  <!--
patrick@0
   488
    =============================================================================
patrick@20
   489
                                    BLOCK LEVEL
patrick@0
   490
    =============================================================================
patrick@0
   491
  -->
patrick@20
   492
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@10
   493
  <define name="block">
patrick@10
   494
    <choice>
patrick@20
   495
      <ref name="p"/>
patrick@20
   496
      <ref name="speech"/>
patrick@10
   497
      <ref name="list"/>
patrick@17
   498
      <ref name="table"/>
patrick@10
   499
      <ref name="media"/>
patrick@10
   500
    </choice>
patrick@10
   501
  </define>
patrick@20
   502
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@20
   503
  <define name="p">
patrick@20
   504
    <element name="p">
patrick@20
   505
      <ref name="p.content"/>
patrick@0
   506
    </element>
patrick@0
   507
  </define>
patrick@20
   508
  <define name="p.content">
patrick@0
   509
    <interleave>
patrick@0
   510
      <ref name="inlines"/>
patrick@0
   511
      <zeroOrMore>
patrick@0
   512
        <ref name="link"/>
patrick@0
   513
      </zeroOrMore>
patrick@0
   514
    </interleave>
patrick@0
   515
  </define>
patrick@20
   516
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@20
   517
  <!-- ~~~~~~ speech -->
patrick@20
   518
  <define name="speech">
patrick@20
   519
    <element name="speech">
patrick@20
   520
      <ref name="speech.content"/>
patrick@20
   521
    </element>
patrick@20
   522
  </define>
patrick@20
   523
  <define name="speech.content">
patrick@20
   524
    <optional>
patrick@20
   525
      <ref name="speaker"/>
patrick@20
   526
    </optional>
patrick@20
   527
    <optional>
patrick@20
   528
      <ref name="stage"/>
patrick@20
   529
    </optional>
patrick@20
   530
    <oneOrMore>
patrick@20
   531
      <ref name="p"/>
patrick@20
   532
    </oneOrMore>
patrick@20
   533
  </define>
patrick@20
   534
  <!-- ~~~~~~ speaker -->
patrick@20
   535
  <define name="speaker">
patrick@20
   536
    <element name="speaker">
patrick@20
   537
      <ref name="speaker.content"/>
patrick@20
   538
    </element>
patrick@20
   539
  </define>
patrick@20
   540
  <define name="speaker.content">
patrick@20
   541
    <ref name="inlines"/>
patrick@20
   542
  </define>
patrick@20
   543
  <!-- ~~~~~~ stage -->
patrick@20
   544
  <define name="stage">
patrick@20
   545
    <element name="stage">
patrick@20
   546
      <ref name="stage.content"/>
patrick@20
   547
    </element>
patrick@20
   548
  </define>
patrick@20
   549
  <define name="stage.content">
patrick@20
   550
    <ref name="inlines"/>
patrick@20
   551
  </define>
patrick@17
   552
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@10
   553
  <!-- ~~~~~~ list -->
patrick@10
   554
  <define name="list">
patrick@10
   555
    <element name="list">
patrick@10
   556
      <ref name="list.content"/>
patrick@10
   557
    </element>
patrick@10
   558
  </define>
patrick@10
   559
  <define name="list.content">
patrick@10
   560
    <optional>
patrick@20
   561
      <ref name="block.head"/>
patrick@10
   562
    </optional>
patrick@10
   563
    <choice>
patrick@10
   564
      <group>
patrick@10
   565
        <optional>
patrick@10
   566
          <attribute name="type">
patrick@12
   567
            <value>ordered</value>
patrick@10
   568
          </attribute>
patrick@10
   569
        </optional>
patrick@10
   570
        <ref name="item"/>
patrick@10
   571
        <oneOrMore>
patrick@10
   572
          <ref name="item"/>
patrick@10
   573
        </oneOrMore>
patrick@10
   574
      </group>
patrick@10
   575
      <group>
patrick@10
   576
        <attribute name="type">
patrick@10
   577
          <value>glossary</value>
patrick@10
   578
        </attribute>
patrick@10
   579
        <oneOrMore>
patrick@10
   580
          <ref name="glossary.item"/>
patrick@10
   581
        </oneOrMore>
patrick@10
   582
      </group>
patrick@10
   583
    </choice>
patrick@10
   584
  </define>
patrick@10
   585
  <!-- ~~~~~~ item -->
patrick@10
   586
  <define name="item">
patrick@10
   587
    <element name="item">
patrick@10
   588
      <ref name="item.content"/>
patrick@10
   589
    </element>
patrick@10
   590
  </define>
patrick@10
   591
  <define name="item.content">
patrick@10
   592
    <oneOrMore>
patrick@10
   593
      <ref name="block"/>
patrick@10
   594
    </oneOrMore>
patrick@10
   595
  </define>
patrick@10
   596
  <!-- ~~~~~~ glossary.item -->
patrick@10
   597
  <define name="glossary.item">
patrick@10
   598
    <element name="item">
patrick@10
   599
      <ref name="glossary.item.content"/>
patrick@10
   600
    </element>
patrick@10
   601
  </define>
patrick@10
   602
  <define name="glossary.item.content">
patrick@10
   603
    <ref name="label"/>
patrick@10
   604
    <oneOrMore>
patrick@10
   605
      <ref name="block"/>
patrick@10
   606
    </oneOrMore>
patrick@10
   607
  </define>
patrick@10
   608
  <!-- ~~~~~~ label -->
patrick@10
   609
  <define name="label">
patrick@10
   610
    <element name="label">
patrick@10
   611
      <ref name="label.content"/>
patrick@10
   612
    </element>
patrick@10
   613
  </define>
patrick@10
   614
  <define name="label.content">
patrick@10
   615
    <ref name="inlines"/>
patrick@10
   616
  </define>
patrick@17
   617
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@17
   618
  <define name="table">
patrick@17
   619
    <element name="table">
patrick@17
   620
      <ref name="table.content"/>
patrick@17
   621
    </element>
patrick@17
   622
  </define>
patrick@17
   623
  <define name="table.content">
patrick@17
   624
    <optional>
patrick@20
   625
      <ref name="block.head"/>
patrick@17
   626
    </optional>
patrick@17
   627
    <oneOrMore>
patrick@17
   628
      <ref name="tgroup"/>
patrick@17
   629
    </oneOrMore>
patrick@17
   630
    <optional>
patrick@17
   631
      <ref name="caption"/>
patrick@17
   632
    </optional>
patrick@17
   633
  </define>
patrick@17
   634
  <!-- ~~~~~~ tgroup -->
patrick@17
   635
  <define name="tgroup">
patrick@17
   636
    <element name="tgroup">
patrick@17
   637
      <ref name="tgroup.attributes"/>
patrick@17
   638
      <ref name="tgroup.content"/>
patrick@17
   639
    </element>
patrick@17
   640
  </define>
patrick@17
   641
  <define name="tgroup.content">
patrick@17
   642
    <optional>
patrick@17
   643
      <ref name="thead"/>
patrick@17
   644
    </optional>
patrick@17
   645
    <optional>
patrick@17
   646
      <ref name="tfoot"/>
patrick@17
   647
    </optional>
patrick@17
   648
    <ref name="tbody"/>
patrick@17
   649
  </define>
patrick@17
   650
  <define name="tgroup.attributes">
patrick@17
   651
    <interleave>
patrick@17
   652
      <ref name="cols.attribute"/>
patrick@17
   653
      <optional>
patrick@17
   654
        <ref name="align.attribute"/>
patrick@17
   655
      </optional>
patrick@17
   656
      <optional>
patrick@17
   657
        <ref name="colsep.attribute"/>
patrick@17
   658
      </optional>
patrick@17
   659
      <optional>
patrick@17
   660
        <ref name="rowsep.attribute"/>
patrick@17
   661
      </optional>
patrick@17
   662
    </interleave>
patrick@17
   663
  </define>
patrick@17
   664
  <define name="cols.attribute">
patrick@17
   665
    <attribute name="cols">
patrick@17
   666
      <data type="positiveInteger"/>
patrick@17
   667
    </attribute>
patrick@17
   668
  </define>
patrick@17
   669
  <define name="align.attribute">
patrick@17
   670
    <attribute name="align">
patrick@17
   671
      <choice>
patrick@17
   672
        <value>left</value>
patrick@17
   673
        <value>right</value>
patrick@17
   674
        <value>center</value>
patrick@17
   675
        <value>justify</value>
patrick@17
   676
      </choice>
patrick@17
   677
    </attribute>
patrick@17
   678
  </define>
patrick@17
   679
  <define name="colsep.attribute">
patrick@17
   680
    <attribute name="colsep">
patrick@17
   681
      <choice>
patrick@17
   682
        <value>0</value>
patrick@17
   683
        <value>1</value>
patrick@17
   684
      </choice>
patrick@17
   685
    </attribute>
patrick@17
   686
  </define>
patrick@17
   687
  <define name="rowsep.attribute">
patrick@17
   688
    <attribute name="rowsep">
patrick@17
   689
      <choice>
patrick@17
   690
        <value>0</value>
patrick@17
   691
        <value>1</value>
patrick@17
   692
      </choice>
patrick@17
   693
    </attribute>
patrick@17
   694
  </define>
patrick@17
   695
  <!-- ~~~~~~ thead, tfoot, tbody -->
patrick@17
   696
  <define name="thead">
patrick@17
   697
    <element name="thead">
patrick@22
   698
      <ref name="thead.attributes"/>
patrick@17
   699
      <ref name="thead.content"/>
patrick@17
   700
    </element>
patrick@17
   701
  </define>
patrick@17
   702
  <define name="tfoot">
patrick@17
   703
    <element name="tfoot">
patrick@22
   704
      <ref name="tfoot.attributes"/>
patrick@17
   705
      <ref name="tfoot.content"/>
patrick@17
   706
    </element>
patrick@17
   707
  </define>
patrick@17
   708
  <define name="tbody">
patrick@17
   709
    <element name="tbody">
patrick@22
   710
      <ref name="tbody.attributes"/>
patrick@17
   711
      <ref name="tbody.content"/>
patrick@17
   712
    </element>
patrick@17
   713
  </define>
patrick@22
   714
  <define name="thead.attributes">
patrick@22
   715
    <optional>
patrick@22
   716
      <ref name="valign.attribute"/>
patrick@22
   717
    </optional>
patrick@22
   718
  </define>
patrick@22
   719
  <define name="tfoot.attributes">
patrick@22
   720
    <optional>
patrick@22
   721
      <ref name="valign.attribute"/>
patrick@22
   722
    </optional>
patrick@22
   723
  </define>
patrick@22
   724
  <define name="tbody.attributes">
patrick@22
   725
    <optional>
patrick@22
   726
      <ref name="valign.attribute"/>
patrick@22
   727
    </optional>
patrick@22
   728
  </define>
patrick@22
   729
  <define name="valign.attribute">
patrick@22
   730
    <attribute name="valign">
patrick@22
   731
      <choice>
patrick@22
   732
        <value>top</value>
patrick@22
   733
        <value>middle</value>
patrick@22
   734
        <value>bottom</value>
patrick@22
   735
      </choice>
patrick@22
   736
    </attribute>
patrick@22
   737
  </define>
patrick@17
   738
  <define name="thead.content">
patrick@17
   739
    <oneOrMore>
patrick@17
   740
      <ref name="row"/>
patrick@17
   741
    </oneOrMore>
patrick@17
   742
  </define>
patrick@17
   743
  <define name="tfoot.content">
patrick@17
   744
    <oneOrMore>
patrick@17
   745
      <ref name="row"/>
patrick@17
   746
    </oneOrMore>
patrick@17
   747
  </define>
patrick@17
   748
  <define name="tbody.content">
patrick@17
   749
    <oneOrMore>
patrick@17
   750
      <ref name="row"/>
patrick@17
   751
    </oneOrMore>
patrick@17
   752
  </define>
patrick@17
   753
  <!-- ~~~~~~ row -->
patrick@17
   754
  <define name="row">
patrick@17
   755
    <element name="row">
patrick@17
   756
      <ref name="row.attribute"/>
patrick@17
   757
      <ref name="row.content"/>
patrick@17
   758
    </element>
patrick@17
   759
  </define>
patrick@17
   760
  <define name="row.attribute">
patrick@17
   761
    <optional>
patrick@17
   762
      <ref name="valign.attribute"/>
patrick@17
   763
    </optional>
patrick@17
   764
  </define>
patrick@17
   765
  <define name="row.content">
patrick@17
   766
    <oneOrMore>
patrick@17
   767
      <ref name="entry"/>
patrick@17
   768
    </oneOrMore>
patrick@17
   769
  </define>
patrick@17
   770
  <!-- ~~~~~~ entry -->
patrick@17
   771
  <define name="entry">
patrick@17
   772
    <element name="entry">
patrick@17
   773
      <ref name="entry.content"/>
patrick@17
   774
    </element>
patrick@17
   775
  </define>
patrick@17
   776
  <define name="entry.content">
patrick@17
   777
    <choice>
patrick@17
   778
      <ref name="inlines"/>
patrick@17
   779
      <oneOrMore>
patrick@20
   780
        <ref name="p"/>
patrick@17
   781
      </oneOrMore>
patrick@17
   782
    </choice>
patrick@17
   783
  </define>
patrick@17
   784
  <!-- ~~~~~~ caption -->
patrick@17
   785
  <define name="caption">
patrick@17
   786
    <element name="caption">
patrick@17
   787
      <ref name="caption.content"/>
patrick@17
   788
    </element>
patrick@17
   789
  </define>
patrick@17
   790
  <define name="caption.content">
patrick@20
   791
    <choice>
patrick@20
   792
      <ref name="inlines"/>
patrick@20
   793
      <oneOrMore>
patrick@20
   794
        <ref name="p"/>
patrick@20
   795
      </oneOrMore>
patrick@20
   796
    </choice>
patrick@11
   797
  </define>
patrick@0
   798
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   799
  <!-- ~~~~~~ media -->
patrick@0
   800
  <define name="media">
patrick@0
   801
    <element name="media">
patrick@0
   802
      <ref name="media.content"/>
patrick@0
   803
    </element>
patrick@0
   804
  </define>
patrick@0
   805
  <define name="media.content">
patrick@0
   806
    <oneOrMore>
patrick@0
   807
      <ref name="image"/>
patrick@0
   808
    </oneOrMore>
patrick@0
   809
    <optional>
patrick@17
   810
      <ref name="caption"/>
patrick@0
   811
    </optional>
patrick@0
   812
  </define>
patrick@2
   813
  <!-- ~~~~~~ image -->
patrick@0
   814
  <define name="image">
patrick@0
   815
    <element name="image">
patrick@0
   816
      <ref name="image.attributes"/>
patrick@0
   817
      <ref name="image.content"/>
patrick@0
   818
    </element>
patrick@0
   819
  </define>
patrick@0
   820
  <define name="image.attributes">
patrick@0
   821
    <ref name="media.id.attribute"/>
patrick@0
   822
  </define>
patrick@17
   823
  <define name="media.id.attribute">
patrick@17
   824
    <attribute name="id">
patrick@17
   825
      <data type="NMTOKEN"/>
patrick@17
   826
    </attribute>
patrick@17
   827
  </define>
patrick@0
   828
  <define name="image.content">
patrick@0
   829
    <optional>
patrick@0
   830
      <ref name="copyright"/>
patrick@0
   831
    </optional>
patrick@0
   832
  </define>
patrick@2
   833
  <!-- ~~~~~~ copyright -->
patrick@0
   834
  <define name="copyright">
patrick@0
   835
    <element name="copyright">
patrick@0
   836
      <ref name="copyright.content"/>
patrick@0
   837
    </element>
patrick@0
   838
  </define>
patrick@0
   839
  <define name="copyright.content">
patrick@0
   840
    <ref name="inlines"/>
patrick@0
   841
  </define>
patrick@0
   842
  <!--
patrick@0
   843
    =============================================================================
patrick@20
   844
                                    INLINE LEVEL
patrick@0
   845
    =============================================================================
patrick@0
   846
  -->
patrick@0
   847
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   848
  <define name="inlines">
patrick@0
   849
    <mixed>
patrick@0
   850
      <interleave>
patrick@0
   851
        <zeroOrMore>
patrick@0
   852
          <ref name="sup"/>
patrick@0
   853
        </zeroOrMore>
patrick@0
   854
        <zeroOrMore>
patrick@0
   855
          <ref name="sub"/>
patrick@0
   856
        </zeroOrMore>
patrick@0
   857
        <zeroOrMore>
patrick@12
   858
          <ref name="number"/>
patrick@0
   859
        </zeroOrMore>
patrick@0
   860
        <zeroOrMore>
patrick@0
   861
          <ref name="date"/>
patrick@0
   862
        </zeroOrMore>
patrick@0
   863
        <zeroOrMore>
patrick@0
   864
          <ref name="name"/>
patrick@0
   865
        </zeroOrMore>
patrick@0
   866
        <zeroOrMore>
patrick@5
   867
          <ref name="note"/>
patrick@0
   868
        </zeroOrMore>
patrick@0
   869
        <zeroOrMore>
patrick@0
   870
          <ref name="foreign"/>
patrick@0
   871
        </zeroOrMore>
patrick@0
   872
        <zeroOrMore>
patrick@0
   873
          <ref name="highlight"/>
patrick@0
   874
        </zeroOrMore>
patrick@5
   875
        <zeroOrMore>
patrick@5
   876
          <ref name="mentioned"/>
patrick@5
   877
        </zeroOrMore>
patrick@5
   878
        <zeroOrMore>
patrick@5
   879
          <ref name="quote"/>
patrick@5
   880
        </zeroOrMore>
patrick@8
   881
        <zeroOrMore>
patrick@8
   882
          <ref name="acronym"/>
patrick@8
   883
        </zeroOrMore>
patrick@10
   884
        <zeroOrMore>
patrick@10
   885
          <ref name="term"/>
patrick@10
   886
        </zeroOrMore>
patrick@0
   887
      </interleave>
patrick@0
   888
    </mixed>
patrick@0
   889
  </define>
patrick@0
   890
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   891
  <define name="sup">
patrick@0
   892
    <element name="sup">
patrick@0
   893
      <ref name="inlines"/>
patrick@0
   894
    </element>
patrick@0
   895
  </define>
patrick@0
   896
  <define name="sub">
patrick@0
   897
    <element name="sub">
patrick@0
   898
      <ref name="inlines"/>
patrick@0
   899
    </element>
patrick@0
   900
  </define>
patrick@12
   901
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@12
   902
  <define name="number">
patrick@12
   903
    <element name="number">
patrick@12
   904
      <choice>
patrick@12
   905
        <group>
patrick@12
   906
          <attribute name="type">
patrick@12
   907
            <value>roman</value>
patrick@12
   908
          </attribute>
patrick@12
   909
          <ref name="number.attributes"/>
patrick@12
   910
          <ref name="number.roman.content"/>
patrick@12
   911
        </group>
patrick@12
   912
        <group>
patrick@12
   913
          <ref name="number.attributes"/>
patrick@12
   914
          <ref name="number.content"/>
patrick@12
   915
        </group>
patrick@12
   916
      </choice>
patrick@0
   917
    </element>
patrick@0
   918
  </define>
patrick@12
   919
  <define name="number.attributes">
patrick@12
   920
    <optional>
patrick@12
   921
      <ref name="number.value.attribute"/>
patrick@12
   922
    </optional>
patrick@12
   923
  </define>
patrick@12
   924
  <define name="number.value.attribute">
patrick@12
   925
    <attribute name="value">
patrick@12
   926
      <choice>
patrick@12
   927
        <data type="integer"/>
patrick@12
   928
        <data type="decimal"/>
patrick@12
   929
      </choice>
patrick@12
   930
    </attribute>
patrick@12
   931
  </define>
patrick@12
   932
  <define name="number.content">
patrick@12
   933
    <mixed>
patrick@12
   934
      <zeroOrMore>
patrick@12
   935
        <ref name="sup"/>
patrick@12
   936
      </zeroOrMore>
patrick@12
   937
    </mixed>
patrick@12
   938
  </define>
patrick@12
   939
  <define name="number.roman.content">
patrick@12
   940
    <data type="token">
patrick@12
   941
      <param name="pattern">[dlxvi]+</param>
patrick@12
   942
    </data>
patrick@12
   943
  </define>
patrick@0
   944
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   945
  <define name="date">
patrick@0
   946
    <element name="date">
patrick@0
   947
      <ref name="date.attributes"/>
patrick@0
   948
      <ref name="date.content"/>
patrick@0
   949
    </element>
patrick@0
   950
  </define>
patrick@0
   951
  <define name="date.attributes">
patrick@12
   952
    <interleave>
patrick@12
   953
      <ref name="date.value.attribute"/>
patrick@12
   954
      <optional>
patrick@12
   955
        <ref name="date.of.attribute"/>
patrick@12
   956
      </optional>
patrick@12
   957
    </interleave>
patrick@12
   958
  </define>
patrick@12
   959
  <define name="date.value.attribute">
patrick@12
   960
    <attribute name="value">
patrick@12
   961
      <choice>
patrick@12
   962
        <data type="date"/>
patrick@12
   963
        <data type="gYearMonth"/>
patrick@12
   964
        <data type="gYear"/>
patrick@12
   965
      </choice>
patrick@12
   966
    </attribute>
patrick@0
   967
  </define>
patrick@0
   968
  <define name="date.of.attribute">
patrick@0
   969
    <attribute name="of">
patrick@0
   970
      <ref name="date.of.enumeration"/>
patrick@0
   971
    </attribute>
patrick@0
   972
  </define>
patrick@0
   973
  <define name="date.of.enumeration">
patrick@0
   974
    <choice>
patrick@0
   975
      <value>birth</value>
patrick@0
   976
      <value>death</value>
patrick@0
   977
    </choice>
patrick@0
   978
  </define>
patrick@0
   979
  <define name="date.content">
patrick@12
   980
    <mixed>
patrick@12
   981
      <zeroOrMore>
patrick@12
   982
        <ref name="sup"/>
patrick@12
   983
      </zeroOrMore>
patrick@12
   984
    </mixed>
patrick@0
   985
  </define>
patrick@2
   986
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   987
  <define name="name">
patrick@0
   988
    <element name="name">
patrick@0
   989
      <ref name="name.attributes"/>
patrick@0
   990
      <ref name="name.content"/>
patrick@0
   991
    </element>
patrick@0
   992
  </define>
patrick@0
   993
  <define name="name.attributes">
patrick@0
   994
    <optional>
patrick@0
   995
      <ref name="name.of.attribute"/>
patrick@0
   996
    </optional>
patrick@0
   997
  </define>
patrick@0
   998
  <define name="name.of.attribute">
patrick@0
   999
    <attribute name="of">
patrick@0
  1000
      <ref name="name.of.enumeration"/>
patrick@0
  1001
    </attribute>
patrick@0
  1002
  </define>
patrick@0
  1003
  <define name="name.of.enumeration">
patrick@0
  1004
    <choice>
patrick@0
  1005
      <value>person</value>
patrick@0
  1006
      <value>company</value>
patrick@0
  1007
      <value>book</value>
patrick@0
  1008
      <value>newspaper</value>
patrick@0
  1009
      <value>party</value>
patrick@0
  1010
    </choice>
patrick@0
  1011
  </define>
patrick@2
  1012
  <define name="name.content">
patrick@2
  1013
    <ref name="inlines"/>
patrick@2
  1014
  </define>
patrick@5
  1015
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
  1016
  <define name="note">
patrick@5
  1017
    <element name="note">
patrick@5
  1018
      <ref name="note.attributes"/>
patrick@5
  1019
      <ref name="note.content"/>
patrick@0
  1020
    </element>
patrick@0
  1021
  </define>
patrick@5
  1022
  <define name="note.attributes">
patrick@0
  1023
    <optional>
patrick@5
  1024
      <ref name="note.label.attribute"/>
patrick@0
  1025
    </optional>
patrick@0
  1026
  </define>
patrick@5
  1027
  <define name="note.label.attribute">
patrick@0
  1028
    <attribute name="label"/>
patrick@0
  1029
  </define>
patrick@5
  1030
  <define name="note.content">
patrick@17
  1031
    <choice>
patrick@17
  1032
      <ref name="inlines"/>
patrick@17
  1033
      <oneOrMore>
patrick@20
  1034
        <ref name="p"/>
patrick@17
  1035
      </oneOrMore>
patrick@17
  1036
    </choice>
patrick@0
  1037
  </define>
patrick@12
  1038
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1039
  <define name="foreign">
patrick@0
  1040
    <element name="foreign">
patrick@0
  1041
      <ref name="foreign.attributes"/>
patrick@0
  1042
      <ref name="foreign.content"/>
patrick@0
  1043
    </element>
patrick@0
  1044
  </define>
patrick@0
  1045
  <define name="foreign.attributes">
patrick@0
  1046
    <optional>
patrick@0
  1047
      <ref name="lang.attribute"/>
patrick@0
  1048
    </optional>
patrick@0
  1049
  </define>
patrick@0
  1050
  <define name="foreign.content">
patrick@0
  1051
    <ref name="inlines"/>
patrick@0
  1052
  </define>
patrick@0
  1053
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1054
  <define name="highlight">
patrick@0
  1055
    <element name="highlight">
patrick@0
  1056
      <ref name="highlight.content"/>
patrick@0
  1057
    </element>
patrick@0
  1058
  </define>
patrick@0
  1059
  <define name="highlight.content">
patrick@0
  1060
    <ref name="inlines"/>
patrick@0
  1061
  </define>
patrick@5
  1062
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
  1063
  <define name="mentioned">
patrick@5
  1064
    <element name="mentioned">
patrick@5
  1065
      <ref name="mentioned.content"/>
patrick@5
  1066
    </element>
patrick@5
  1067
  </define>
patrick@5
  1068
  <define name="mentioned.content">
patrick@5
  1069
    <ref name="inlines"/>
patrick@5
  1070
  </define>
patrick@5
  1071
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
  1072
  <define name="quote">
patrick@5
  1073
    <element name="quote">
patrick@5
  1074
      <ref name="quote.content"/>
patrick@5
  1075
    </element>
patrick@5
  1076
  </define>
patrick@5
  1077
  <define name="quote.content">
patrick@5
  1078
    <ref name="inlines"/>
patrick@5
  1079
  </define>
patrick@8
  1080
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@8
  1081
  <define name="acronym">
patrick@8
  1082
    <element name="acronym">
patrick@8
  1083
      <ref name="acronym.content"/>
patrick@8
  1084
    </element>
patrick@8
  1085
  </define>
patrick@8
  1086
  <define name="acronym.content">
patrick@8
  1087
    <ref name="inlines"/>
patrick@8
  1088
  </define>
patrick@10
  1089
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@10
  1090
  <define name="term">
patrick@10
  1091
    <element name="term">
patrick@10
  1092
      <ref name="term.content"/>
patrick@10
  1093
    </element>
patrick@10
  1094
  </define>
patrick@10
  1095
  <define name="term.content">
patrick@10
  1096
    <ref name="inlines"/>
patrick@10
  1097
  </define>
patrick@0
  1098
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1099
  <define name="link">
patrick@0
  1100
    <element name="link">
patrick@0
  1101
      <ref name="link.attributes"/>
patrick@0
  1102
      <ref name="link.content"/>
patrick@0
  1103
    </element>
patrick@0
  1104
  </define>
patrick@0
  1105
  <define name="link.attributes">
patrick@10
  1106
    <optional>
patrick@10
  1107
      <choice>
patrick@10
  1108
        <ref name="uri.attribute"/>
patrick@10
  1109
        <ref name="idref.attribute"/>
patrick@10
  1110
      </choice>
patrick@10
  1111
    </optional>
patrick@10
  1112
  </define>
patrick@10
  1113
  <define name="uri.attribute">
patrick@10
  1114
    <attribute name="uri">
patrick@10
  1115
      <data type="anyURI"/>
patrick@10
  1116
    </attribute>
patrick@10
  1117
  </define>
patrick@10
  1118
  <define name="idref.attribute">
patrick@10
  1119
    <attribute name="idref">
patrick@10
  1120
      <data type="IDREF"/>
patrick@10
  1121
    </attribute>
patrick@0
  1122
  </define>
patrick@0
  1123
  <define name="link.content">
patrick@0
  1124
    <ref name="inlines"/>
patrick@0
  1125
  </define>
patrick@0
  1126
</grammar>