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