RelaxNG/publidoc.rng
author Patrick PIERRE <patrick.pierre@prismallia.fr>
ven., 30 sept. 2011 10:19:28 +0200
changeset 46 54a18fd10638
parent 45 8dbf4d305813
child 49 e533ca9494a6
permissions -rw-r--r--
sound --> audio
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@0
   978
  </define>
patrick@17
   979
  <define name="media.id.attribute">
patrick@17
   980
    <attribute name="id">
patrick@17
   981
      <data type="NMTOKEN"/>
patrick@17
   982
    </attribute>
patrick@17
   983
  </define>
patrick@0
   984
  <define name="image.content">
patrick@0
   985
    <optional>
patrick@0
   986
      <ref name="copyright"/>
patrick@0
   987
    </optional>
patrick@0
   988
  </define>
patrick@45
   989
  <!-- ~~~~~~ audio -->
patrick@45
   990
  <define name="audio">
patrick@45
   991
    <element name="audio">
patrick@45
   992
      <ref name="audio.attributes"/>
patrick@43
   993
    </element>
patrick@43
   994
  </define>
patrick@45
   995
  <define name="audio.attributes">
patrick@43
   996
    <ref name="media.id.attribute"/>
patrick@43
   997
  </define>
patrick@0
   998
  <!--
patrick@0
   999
    =============================================================================
patrick@20
  1000
                                    INLINE LEVEL
patrick@0
  1001
    =============================================================================
patrick@0
  1002
  -->
patrick@0
  1003
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1004
  <define name="inlines">
patrick@0
  1005
    <mixed>
patrick@0
  1006
      <interleave>
patrick@0
  1007
        <zeroOrMore>
patrick@0
  1008
          <ref name="sup"/>
patrick@0
  1009
        </zeroOrMore>
patrick@0
  1010
        <zeroOrMore>
patrick@0
  1011
          <ref name="sub"/>
patrick@0
  1012
        </zeroOrMore>
patrick@0
  1013
        <zeroOrMore>
patrick@42
  1014
          <ref name="var"/>
patrick@42
  1015
        </zeroOrMore>
patrick@42
  1016
        <zeroOrMore>
patrick@12
  1017
          <ref name="number"/>
patrick@0
  1018
        </zeroOrMore>
patrick@0
  1019
        <zeroOrMore>
patrick@42
  1020
          <ref name="math"/>
patrick@42
  1021
        </zeroOrMore>
patrick@42
  1022
        <zeroOrMore>
patrick@0
  1023
          <ref name="date"/>
patrick@0
  1024
        </zeroOrMore>
patrick@0
  1025
        <zeroOrMore>
patrick@0
  1026
          <ref name="name"/>
patrick@0
  1027
        </zeroOrMore>
patrick@0
  1028
        <zeroOrMore>
patrick@5
  1029
          <ref name="note"/>
patrick@0
  1030
        </zeroOrMore>
patrick@0
  1031
        <zeroOrMore>
patrick@0
  1032
          <ref name="foreign"/>
patrick@0
  1033
        </zeroOrMore>
patrick@0
  1034
        <zeroOrMore>
patrick@0
  1035
          <ref name="highlight"/>
patrick@0
  1036
        </zeroOrMore>
patrick@5
  1037
        <zeroOrMore>
patrick@5
  1038
          <ref name="mentioned"/>
patrick@5
  1039
        </zeroOrMore>
patrick@5
  1040
        <zeroOrMore>
patrick@5
  1041
          <ref name="quote"/>
patrick@5
  1042
        </zeroOrMore>
patrick@8
  1043
        <zeroOrMore>
patrick@8
  1044
          <ref name="acronym"/>
patrick@8
  1045
        </zeroOrMore>
patrick@10
  1046
        <zeroOrMore>
patrick@10
  1047
          <ref name="term"/>
patrick@10
  1048
        </zeroOrMore>
patrick@25
  1049
        <zeroOrMore>
patrick@25
  1050
          <ref name="link"/>
patrick@25
  1051
        </zeroOrMore>
patrick@42
  1052
        <zeroOrMore>
patrick@42
  1053
          <ref name="anchor"/>
patrick@42
  1054
        </zeroOrMore>
patrick@0
  1055
      </interleave>
patrick@0
  1056
    </mixed>
patrick@0
  1057
  </define>
patrick@42
  1058
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup, var ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1059
  <define name="sup">
patrick@0
  1060
    <element name="sup">
patrick@42
  1061
      <text/>
patrick@0
  1062
    </element>
patrick@0
  1063
  </define>
patrick@0
  1064
  <define name="sub">
patrick@0
  1065
    <element name="sub">
patrick@42
  1066
      <text/>
patrick@0
  1067
    </element>
patrick@0
  1068
  </define>
patrick@42
  1069
  <define name="var">
patrick@42
  1070
    <element name="var">
patrick@42
  1071
      <text/>
patrick@42
  1072
    </element>
patrick@42
  1073
  </define>
patrick@42
  1074
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ math ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@42
  1075
  <define name="math">
patrick@42
  1076
    <element name="math">
patrick@42
  1077
      <choice>
patrick@42
  1078
        <group>
patrick@42
  1079
          <attribute name="notation">
patrick@42
  1080
            <value>tex</value>
patrick@42
  1081
          </attribute>
patrick@42
  1082
          <ref name="math.attributes"/>
patrick@42
  1083
          <ref name="math.tex.content"/>
patrick@42
  1084
        </group>
patrick@42
  1085
        <group>
patrick@42
  1086
          <ref name="math.attributes"/>
patrick@42
  1087
          <ref name="math.content"/>
patrick@42
  1088
        </group>
patrick@42
  1089
      </choice>
patrick@42
  1090
    </element>
patrick@42
  1091
  </define>
patrick@42
  1092
  <define name="math.attributes">
patrick@42
  1093
    <optional>
patrick@42
  1094
      <ref name="wide.attribute"/>
patrick@42
  1095
    </optional>
patrick@42
  1096
  </define>
patrick@42
  1097
  <define name="wide.attribute">
patrick@42
  1098
    <attribute name="wide">
patrick@42
  1099
      <data type="boolean"/>
patrick@42
  1100
    </attribute>
patrick@42
  1101
  </define>
patrick@42
  1102
  <define name="math.content">
patrick@42
  1103
    <mixed>
patrick@42
  1104
      <interleave>
patrick@42
  1105
        <zeroOrMore>
patrick@42
  1106
          <ref name="sup"/>
patrick@42
  1107
        </zeroOrMore>
patrick@42
  1108
        <zeroOrMore>
patrick@42
  1109
          <ref name="sub"/>
patrick@42
  1110
        </zeroOrMore>
patrick@42
  1111
        <zeroOrMore>
patrick@42
  1112
          <ref name="var"/>
patrick@42
  1113
        </zeroOrMore>
patrick@42
  1114
      </interleave>
patrick@42
  1115
    </mixed>
patrick@42
  1116
  </define>
patrick@42
  1117
  <define name="math.tex.content">
patrick@42
  1118
    <text/>
patrick@42
  1119
  </define>
patrick@12
  1120
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@12
  1121
  <define name="number">
patrick@12
  1122
    <element name="number">
patrick@12
  1123
      <choice>
patrick@12
  1124
        <group>
patrick@12
  1125
          <attribute name="type">
patrick@12
  1126
            <value>roman</value>
patrick@12
  1127
          </attribute>
patrick@12
  1128
          <ref name="number.attributes"/>
patrick@12
  1129
          <ref name="number.roman.content"/>
patrick@12
  1130
        </group>
patrick@12
  1131
        <group>
patrick@12
  1132
          <ref name="number.attributes"/>
patrick@12
  1133
          <ref name="number.content"/>
patrick@12
  1134
        </group>
patrick@12
  1135
      </choice>
patrick@0
  1136
    </element>
patrick@0
  1137
  </define>
patrick@12
  1138
  <define name="number.attributes">
patrick@12
  1139
    <optional>
patrick@12
  1140
      <ref name="number.value.attribute"/>
patrick@12
  1141
    </optional>
patrick@12
  1142
  </define>
patrick@12
  1143
  <define name="number.value.attribute">
patrick@12
  1144
    <attribute name="value">
patrick@12
  1145
      <choice>
patrick@12
  1146
        <data type="integer"/>
patrick@12
  1147
        <data type="decimal"/>
patrick@12
  1148
      </choice>
patrick@12
  1149
    </attribute>
patrick@12
  1150
  </define>
patrick@12
  1151
  <define name="number.content">
patrick@12
  1152
    <mixed>
patrick@12
  1153
      <zeroOrMore>
patrick@12
  1154
        <ref name="sup"/>
patrick@12
  1155
      </zeroOrMore>
patrick@12
  1156
    </mixed>
patrick@12
  1157
  </define>
patrick@12
  1158
  <define name="number.roman.content">
patrick@12
  1159
    <data type="token">
patrick@12
  1160
      <param name="pattern">[dlxvi]+</param>
patrick@12
  1161
    </data>
patrick@12
  1162
  </define>
patrick@36
  1163
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1164
  <define name="date">
patrick@0
  1165
    <element name="date">
patrick@0
  1166
      <ref name="date.attributes"/>
patrick@0
  1167
      <ref name="date.content"/>
patrick@0
  1168
    </element>
patrick@0
  1169
  </define>
patrick@0
  1170
  <define name="date.attributes">
patrick@12
  1171
    <interleave>
patrick@12
  1172
      <ref name="date.value.attribute"/>
patrick@12
  1173
      <optional>
patrick@12
  1174
        <ref name="date.of.attribute"/>
patrick@12
  1175
      </optional>
patrick@12
  1176
    </interleave>
patrick@12
  1177
  </define>
patrick@12
  1178
  <define name="date.value.attribute">
patrick@12
  1179
    <attribute name="value">
patrick@12
  1180
      <choice>
patrick@12
  1181
        <data type="date"/>
patrick@12
  1182
        <data type="gYearMonth"/>
patrick@12
  1183
        <data type="gYear"/>
patrick@12
  1184
      </choice>
patrick@12
  1185
    </attribute>
patrick@0
  1186
  </define>
patrick@0
  1187
  <define name="date.of.attribute">
patrick@0
  1188
    <attribute name="of">
patrick@33
  1189
      <choice>
patrick@33
  1190
        <value>birth</value>
patrick@33
  1191
        <value>death</value>
patrick@33
  1192
      </choice>
patrick@0
  1193
    </attribute>
patrick@0
  1194
  </define>
patrick@0
  1195
  <define name="date.content">
patrick@12
  1196
    <mixed>
patrick@12
  1197
      <zeroOrMore>
patrick@12
  1198
        <ref name="sup"/>
patrick@12
  1199
      </zeroOrMore>
patrick@12
  1200
    </mixed>
patrick@0
  1201
  </define>
patrick@36
  1202
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1203
  <define name="name">
patrick@0
  1204
    <element name="name">
patrick@0
  1205
      <ref name="name.attributes"/>
patrick@0
  1206
      <ref name="name.content"/>
patrick@0
  1207
    </element>
patrick@0
  1208
  </define>
patrick@0
  1209
  <define name="name.attributes">
patrick@0
  1210
    <optional>
patrick@0
  1211
      <ref name="name.of.attribute"/>
patrick@0
  1212
    </optional>
patrick@0
  1213
  </define>
patrick@0
  1214
  <define name="name.of.attribute">
patrick@0
  1215
    <attribute name="of">
patrick@33
  1216
      <choice>
patrick@33
  1217
        <value>person</value>
patrick@33
  1218
        <value>company</value>
patrick@33
  1219
        <value>book</value>
patrick@33
  1220
        <value>newspaper</value>
patrick@33
  1221
        <value>party</value>
patrick@33
  1222
      </choice>
patrick@0
  1223
    </attribute>
patrick@0
  1224
  </define>
patrick@2
  1225
  <define name="name.content">
patrick@2
  1226
    <ref name="inlines"/>
patrick@2
  1227
  </define>
patrick@36
  1228
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
  1229
  <define name="note">
patrick@5
  1230
    <element name="note">
patrick@5
  1231
      <ref name="note.attributes"/>
patrick@5
  1232
      <ref name="note.content"/>
patrick@0
  1233
    </element>
patrick@0
  1234
  </define>
patrick@5
  1235
  <define name="note.attributes">
patrick@0
  1236
    <optional>
patrick@5
  1237
      <ref name="note.label.attribute"/>
patrick@0
  1238
    </optional>
patrick@0
  1239
  </define>
patrick@5
  1240
  <define name="note.label.attribute">
patrick@0
  1241
    <attribute name="label"/>
patrick@0
  1242
  </define>
patrick@5
  1243
  <define name="note.content">
patrick@17
  1244
    <choice>
patrick@17
  1245
      <ref name="inlines"/>
patrick@17
  1246
      <oneOrMore>
patrick@20
  1247
        <ref name="p"/>
patrick@17
  1248
      </oneOrMore>
patrick@17
  1249
    </choice>
patrick@0
  1250
  </define>
patrick@36
  1251
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1252
  <define name="foreign">
patrick@0
  1253
    <element name="foreign">
patrick@0
  1254
      <ref name="foreign.attributes"/>
patrick@0
  1255
      <ref name="foreign.content"/>
patrick@0
  1256
    </element>
patrick@0
  1257
  </define>
patrick@0
  1258
  <define name="foreign.attributes">
patrick@0
  1259
    <optional>
patrick@0
  1260
      <ref name="lang.attribute"/>
patrick@0
  1261
    </optional>
patrick@0
  1262
  </define>
patrick@0
  1263
  <define name="foreign.content">
patrick@0
  1264
    <ref name="inlines"/>
patrick@0
  1265
  </define>
patrick@36
  1266
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1267
  <define name="highlight">
patrick@0
  1268
    <element name="highlight">
patrick@0
  1269
      <ref name="highlight.content"/>
patrick@0
  1270
    </element>
patrick@0
  1271
  </define>
patrick@0
  1272
  <define name="highlight.content">
patrick@0
  1273
    <ref name="inlines"/>
patrick@0
  1274
  </define>
patrick@36
  1275
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
  1276
  <define name="mentioned">
patrick@5
  1277
    <element name="mentioned">
patrick@5
  1278
      <ref name="mentioned.content"/>
patrick@5
  1279
    </element>
patrick@5
  1280
  </define>
patrick@5
  1281
  <define name="mentioned.content">
patrick@5
  1282
    <ref name="inlines"/>
patrick@5
  1283
  </define>
patrick@36
  1284
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@5
  1285
  <define name="quote">
patrick@5
  1286
    <element name="quote">
patrick@5
  1287
      <ref name="quote.content"/>
patrick@5
  1288
    </element>
patrick@5
  1289
  </define>
patrick@5
  1290
  <define name="quote.content">
patrick@5
  1291
    <ref name="inlines"/>
patrick@5
  1292
  </define>
patrick@36
  1293
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@8
  1294
  <define name="acronym">
patrick@8
  1295
    <element name="acronym">
patrick@8
  1296
      <ref name="acronym.content"/>
patrick@8
  1297
    </element>
patrick@8
  1298
  </define>
patrick@8
  1299
  <define name="acronym.content">
patrick@8
  1300
    <ref name="inlines"/>
patrick@8
  1301
  </define>
patrick@36
  1302
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@10
  1303
  <define name="term">
patrick@10
  1304
    <element name="term">
patrick@10
  1305
      <ref name="term.content"/>
patrick@10
  1306
    </element>
patrick@10
  1307
  </define>
patrick@10
  1308
  <define name="term.content">
patrick@10
  1309
    <ref name="inlines"/>
patrick@10
  1310
  </define>
patrick@36
  1311
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
  1312
  <define name="link">
patrick@0
  1313
    <element name="link">
patrick@0
  1314
      <ref name="link.attributes"/>
patrick@0
  1315
      <ref name="link.content"/>
patrick@0
  1316
    </element>
patrick@0
  1317
  </define>
patrick@0
  1318
  <define name="link.attributes">
patrick@43
  1319
    <choice>
patrick@43
  1320
      <ref name="uri.attribute"/>
patrick@43
  1321
      <ref name="idref.attribute"/>
patrick@43
  1322
    </choice>
patrick@10
  1323
  </define>
patrick@10
  1324
  <define name="uri.attribute">
patrick@10
  1325
    <attribute name="uri">
patrick@10
  1326
      <data type="anyURI"/>
patrick@10
  1327
    </attribute>
patrick@10
  1328
  </define>
patrick@10
  1329
  <define name="idref.attribute">
patrick@10
  1330
    <attribute name="idref">
patrick@10
  1331
      <data type="IDREF"/>
patrick@10
  1332
    </attribute>
patrick@0
  1333
  </define>
patrick@0
  1334
  <define name="link.content">
patrick@0
  1335
    <ref name="inlines"/>
patrick@0
  1336
  </define>
patrick@42
  1337
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ anchor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@42
  1338
  <define name="anchor">
patrick@42
  1339
    <element name="anchor">
patrick@43
  1340
      <ref name="anchor.attributes"/>
patrick@42
  1341
    </element>
patrick@42
  1342
  </define>
patrick@42
  1343
  <define name="anchor.attributes">
patrick@42
  1344
    <ref name="anchor.id.attribute"/>
patrick@42
  1345
  </define>
patrick@42
  1346
  <define name="anchor.id.attribute">
patrick@42
  1347
    <attribute name="xml:id">
patrick@42
  1348
      <data type="ID"/>
patrick@42
  1349
    </attribute>
patrick@42
  1350
  </define>
patrick@0
  1351
</grammar>