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