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