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