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