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