RelaxNG/publidoc.rng
author Patrick PIERRE <patrick.pierre@prismallia.fr>
dim., 05 juin 2011 16:40:16 +0200
changeset 3 59e42ac69f8f
parent 2 417bb62f2a77
child 5 69310bc35b63
permissions -rw-r--r--
Nettoyage de la présentation
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@0
    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@0
    49
      <ref name="metadata"/>
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@0
    64
      <ref name="topic.content"/>
patrick@0
    65
    </element>
patrick@0
    66
  </define>
patrick@0
    67
  <!--
patrick@0
    68
    =============================================================================
patrick@0
    69
                                  Metadata level
patrick@0
    70
    =============================================================================
patrick@0
    71
  -->
patrick@0
    72
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
    73
  <define name="metadata">
patrick@0
    74
    <element name="metadata">
patrick@0
    75
      <ref name="metadata.content"/>
patrick@0
    76
    </element>
patrick@0
    77
  </define>
patrick@0
    78
  <define name="metadata.content">
patrick@0
    79
    <interleave>
patrick@0
    80
      <ref name="title"/>
patrick@0
    81
      <optional>
patrick@0
    82
        <ref name="subtitle"/>
patrick@0
    83
      </optional>
patrick@0
    84
      <zeroOrMore>
patrick@0
    85
        <ref name="author"/>
patrick@0
    86
      </zeroOrMore>
patrick@0
    87
      <optional>
patrick@0
    88
        <ref name="publisher"/>
patrick@0
    89
      </optional>
patrick@0
    90
      <optional>
patrick@0
    91
        <ref name="language"/>
patrick@0
    92
      </optional>
patrick@0
    93
      <optional>
patrick@0
    94
        <ref name="date"/>
patrick@0
    95
      </optional>
patrick@0
    96
      <optional>
patrick@0
    97
        <ref name="place"/>
patrick@0
    98
      </optional>
patrick@0
    99
      <zeroOrMore>
patrick@0
   100
        <ref name="source"/>
patrick@0
   101
      </zeroOrMore>
patrick@0
   102
      <optional>
patrick@0
   103
        <ref name="subjectset"/>
patrick@0
   104
      </optional>
patrick@0
   105
      <optional>
patrick@0
   106
        <ref name="abstract"/>
patrick@0
   107
      </optional>
patrick@0
   108
      <zeroOrMore>
patrick@0
   109
        <ref name="annotation"/>
patrick@0
   110
      </zeroOrMore>
patrick@0
   111
    </interleave>
patrick@0
   112
  </define>
patrick@0
   113
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   114
  <define name="title">
patrick@0
   115
    <element name="title">
patrick@0
   116
      <ref name="title.content"/>
patrick@0
   117
    </element>
patrick@0
   118
  </define>
patrick@0
   119
  <define name="title.content">
patrick@0
   120
    <ref name="inlines"/>
patrick@0
   121
  </define>
patrick@0
   122
  <define name="subtitle">
patrick@0
   123
    <element name="subtitle">
patrick@0
   124
      <ref name="title.content"/>
patrick@0
   125
    </element>
patrick@0
   126
  </define>
patrick@0
   127
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   128
  <define name="author">
patrick@0
   129
    <element name="author">
patrick@0
   130
      <ref name="author.content"/>
patrick@0
   131
    </element>
patrick@0
   132
  </define>
patrick@0
   133
  <define name="author.content">
patrick@0
   134
    <optional>
patrick@0
   135
      <ref name="firstname"/>
patrick@0
   136
    </optional>
patrick@0
   137
    <ref name="lastname"/>
patrick@0
   138
  </define>
patrick@0
   139
  <define name="publisher">
patrick@0
   140
    <element name="publisher">
patrick@0
   141
      <ref name="publisher.content"/>
patrick@0
   142
    </element>
patrick@0
   143
  </define>
patrick@0
   144
  <define name="publisher.content">
patrick@0
   145
    <ref name="inlines"/>
patrick@0
   146
  </define>
patrick@2
   147
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   148
  <define name="language">
patrick@2
   149
    <element name="language">
patrick@2
   150
      <ref name="language.attributes"/>
patrick@2
   151
    </element>
patrick@2
   152
  </define>
patrick@2
   153
  <define name="language.attributes">
patrick@2
   154
    <ref name="lang.attribute"/>
patrick@2
   155
  </define>
patrick@2
   156
  <define name="lang.attribute">
patrick@2
   157
    <attribute name="xml:lang">
patrick@2
   158
      <data type="language"/>
patrick@2
   159
    </attribute>
patrick@2
   160
  </define>
patrick@2
   161
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   162
  <define name="place">
patrick@2
   163
    <element name="place">
patrick@2
   164
      <ref name="place.content"/>
patrick@2
   165
    </element>
patrick@2
   166
  </define>
patrick@2
   167
  <define name="place.content">
patrick@2
   168
    <ref name="inlines"/>
patrick@2
   169
  </define>
patrick@0
   170
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   171
  <!-- ~~~~~~ source -->
patrick@0
   172
  <define name="source">
patrick@0
   173
    <element name="source">
patrick@0
   174
      <ref name="source.attributes"/>
patrick@0
   175
      <choice>
patrick@0
   176
        <group>
patrick@0
   177
          <attribute name="type">
patrick@0
   178
            <value>book</value>
patrick@0
   179
          </attribute>
patrick@0
   180
          <ref name="source.content.book"/>
patrick@0
   181
        </group>
patrick@0
   182
        <attribute name="type">
patrick@0
   183
          <value>file</value>
patrick@0
   184
        </attribute>
patrick@0
   185
      </choice>
patrick@0
   186
      <ref name="source.content"/>
patrick@0
   187
    </element>
patrick@0
   188
  </define>
patrick@0
   189
  <define name="source.attributes">
patrick@0
   190
    <ref name="source.id.attribute"/>
patrick@0
   191
  </define>
patrick@0
   192
  <define name="source.id.attribute">
patrick@0
   193
    <attribute name="id">
patrick@0
   194
      <data type="NMTOKEN"/>
patrick@0
   195
    </attribute>
patrick@0
   196
  </define>
patrick@0
   197
  <define name="source.content.book">
patrick@0
   198
    <ref name="title"/>
patrick@0
   199
    <zeroOrMore>
patrick@0
   200
      <ref name="pagenumber"/>
patrick@0
   201
    </zeroOrMore>
patrick@0
   202
  </define>
patrick@0
   203
  <define name="source.content">
patrick@0
   204
    <zeroOrMore>
patrick@0
   205
      <ref name="annotation"/>
patrick@0
   206
    </zeroOrMore>
patrick@0
   207
  </define>
patrick@2
   208
  <!-- ~~~~~~ pagenumber -->
patrick@0
   209
  <define name="pagenumber">
patrick@0
   210
    <element name="pagenumber">
patrick@0
   211
      <ref name="pagenumber.attributes"/>
patrick@0
   212
    </element>
patrick@0
   213
  </define>
patrick@0
   214
  <define name="pagenumber.attributes">
patrick@0
   215
    <ref name="pagenumber.value.attribute"/>
patrick@0
   216
  </define>
patrick@0
   217
  <define name="pagenumber.value.attribute">
patrick@0
   218
    <attribute name="value">
patrick@0
   219
      <ref name="pagenumber.value.enumeration"/>
patrick@0
   220
    </attribute>
patrick@0
   221
  </define>
patrick@0
   222
  <define name="pagenumber.value.enumeration">
patrick@0
   223
    <data type="positiveInteger"/>
patrick@0
   224
  </define>
patrick@0
   225
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   226
  <!-- ~~~~~~ subjectset -->
patrick@0
   227
  <define name="subjectset">
patrick@0
   228
    <element name="subjectset">
patrick@0
   229
      <ref name="subjectset.content"/>
patrick@0
   230
    </element>
patrick@0
   231
  </define>
patrick@0
   232
  <define name="subjectset.content">
patrick@0
   233
    <oneOrMore>
patrick@0
   234
      <ref name="subject"/>
patrick@0
   235
    </oneOrMore>
patrick@0
   236
  </define>
patrick@2
   237
  <!-- ~~~~~~ subject -->
patrick@0
   238
  <define name="subject">
patrick@0
   239
    <element name="subject">
patrick@0
   240
      <ref name="subject.attributes"/>
patrick@0
   241
    </element>
patrick@0
   242
  </define>
patrick@0
   243
  <define name="subject.attributes">
patrick@0
   244
    <ref name="subject.id.attribute"/>
patrick@0
   245
  </define>
patrick@0
   246
  <define name="subject.id.attribute">
patrick@0
   247
    <attribute name="id">
patrick@0
   248
      <data type="NMTOKEN"/>
patrick@0
   249
    </attribute>
patrick@0
   250
  </define>
patrick@2
   251
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   252
  <define name="abstract">
patrick@2
   253
    <element name="abstract">
patrick@2
   254
      <ref name="abstract.content"/>
patrick@2
   255
    </element>
patrick@2
   256
  </define>
patrick@2
   257
  <define name="abstract.content">
patrick@2
   258
    <oneOrMore>
patrick@2
   259
      <ref name="parag"/>
patrick@2
   260
    </oneOrMore>
patrick@2
   261
  </define>
patrick@0
   262
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   263
  <define name="annotation">
patrick@0
   264
    <element name="annotation">
patrick@0
   265
      <ref name="annotation.content"/>
patrick@0
   266
    </element>
patrick@0
   267
  </define>
patrick@0
   268
  <define name="annotation.content">
patrick@0
   269
    <ref name="inlines"/>
patrick@0
   270
  </define>
patrick@0
   271
  <!--
patrick@0
   272
    =============================================================================
patrick@0
   273
                                    Division level
patrick@0
   274
    =============================================================================
patrick@0
   275
  -->
patrick@0
   276
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   277
  <define name="division">
patrick@0
   278
    <element name="division">
patrick@0
   279
      <ref name="division.content"/>
patrick@0
   280
    </element>
patrick@0
   281
  </define>
patrick@0
   282
  <define name="division.content">
patrick@0
   283
    <optional>
patrick@0
   284
      <ref name="metadata"/>
patrick@0
   285
    </optional>
patrick@0
   286
    <choice>
patrick@0
   287
      <oneOrMore>
patrick@0
   288
        <ref name="division"/>
patrick@0
   289
      </oneOrMore>
patrick@0
   290
      <oneOrMore>
patrick@0
   291
        <ref name="topic"/>
patrick@0
   292
      </oneOrMore>
patrick@0
   293
    </choice>
patrick@0
   294
  </define>
patrick@0
   295
  <!--
patrick@0
   296
    =============================================================================
patrick@0
   297
                                  Component level
patrick@0
   298
    =============================================================================
patrick@0
   299
  -->
patrick@0
   300
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   301
  <define name="topic">
patrick@0
   302
    <element name="topic">
patrick@0
   303
      <ref name="topic.attributes"/>
patrick@0
   304
      <ref name="topic.content"/>
patrick@0
   305
    </element>
patrick@0
   306
  </define>
patrick@0
   307
  <define name="top.topic.attributes">
patrick@0
   308
    <interleave>
patrick@0
   309
      <ref name="topic.id.attribute"/>
patrick@0
   310
      <optional>
patrick@0
   311
        <ref name="topic.type.attribute"/>
patrick@0
   312
      </optional>
patrick@0
   313
    </interleave>
patrick@0
   314
  </define>
patrick@0
   315
  <define name="topic.attributes">
patrick@0
   316
    <interleave>
patrick@0
   317
      <optional>
patrick@0
   318
        <ref name="topic.id.attribute"/>
patrick@0
   319
      </optional>
patrick@0
   320
      <optional>
patrick@0
   321
        <ref name="topic.type.attribute"/>
patrick@0
   322
      </optional>
patrick@0
   323
    </interleave>
patrick@0
   324
  </define>
patrick@0
   325
  <define name="topic.id.attribute">
patrick@0
   326
    <attribute name="xml:id">
patrick@0
   327
      <data type="ID"/>
patrick@0
   328
    </attribute>
patrick@0
   329
  </define>
patrick@0
   330
  <define name="topic.type.attribute">
patrick@0
   331
    <attribute name="type">
patrick@0
   332
      <data type="NCName"/>
patrick@0
   333
    </attribute>
patrick@0
   334
  </define>
patrick@0
   335
  <define name="topic.content">
patrick@0
   336
    <optional>
patrick@0
   337
      <ref name="metadata"/>
patrick@0
   338
    </optional>
patrick@0
   339
    <oneOrMore>
patrick@0
   340
      <ref name="section"/>
patrick@0
   341
    </oneOrMore>
patrick@0
   342
  </define>
patrick@0
   343
  <!--
patrick@0
   344
    =============================================================================
patrick@0
   345
                                    Section level
patrick@0
   346
    =============================================================================
patrick@0
   347
  -->
patrick@0
   348
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   349
  <define name="section">
patrick@0
   350
    <element name="section">
patrick@0
   351
      <ref name="section.content"/>
patrick@0
   352
      <ref name="section.attributes"/>
patrick@0
   353
    </element>
patrick@0
   354
  </define>
patrick@0
   355
  <define name="section.content">
patrick@0
   356
    <optional>
patrick@0
   357
      <ref name="metadata"/>
patrick@0
   358
    </optional>
patrick@0
   359
    <choice>
patrick@0
   360
      <oneOrMore>
patrick@0
   361
        <ref name="section"/>
patrick@0
   362
      </oneOrMore>
patrick@0
   363
      <oneOrMore>
patrick@0
   364
        <choice>
patrick@0
   365
          <ref name="parag"/>
patrick@0
   366
          <ref name="media"/>
patrick@0
   367
        </choice>
patrick@0
   368
      </oneOrMore>
patrick@0
   369
    </choice>
patrick@0
   370
  </define>
patrick@0
   371
  <define name="section.attributes">
patrick@0
   372
    <optional>
patrick@0
   373
      <ref name="status.attribute"/>
patrick@0
   374
    </optional>
patrick@0
   375
  </define>
patrick@0
   376
  <define name="status.attribute">
patrick@0
   377
    <attribute name="status">
patrick@0
   378
      <data type="NCName"/>
patrick@0
   379
    </attribute>
patrick@0
   380
  </define>
patrick@0
   381
  <!--
patrick@0
   382
    =============================================================================
patrick@0
   383
                                    Block level
patrick@0
   384
    =============================================================================
patrick@0
   385
  -->
patrick@0
   386
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ parag ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   387
  <define name="parag">
patrick@0
   388
    <element name="parag">
patrick@0
   389
      <ref name="parag.content"/>
patrick@0
   390
    </element>
patrick@0
   391
  </define>
patrick@0
   392
  <define name="parag.content">
patrick@0
   393
    <interleave>
patrick@0
   394
      <ref name="inlines"/>
patrick@0
   395
      <zeroOrMore>
patrick@0
   396
        <ref name="link"/>
patrick@0
   397
      </zeroOrMore>
patrick@0
   398
    </interleave>
patrick@0
   399
  </define>
patrick@0
   400
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@2
   401
  <!-- ~~~~~~ media -->
patrick@0
   402
  <define name="media">
patrick@0
   403
    <element name="media">
patrick@0
   404
      <ref name="media.content"/>
patrick@0
   405
    </element>
patrick@0
   406
  </define>
patrick@0
   407
  <define name="media.content">
patrick@0
   408
    <oneOrMore>
patrick@0
   409
      <ref name="image"/>
patrick@0
   410
    </oneOrMore>
patrick@0
   411
    <optional>
patrick@0
   412
      <ref name="media.caption"/>
patrick@0
   413
    </optional>
patrick@0
   414
  </define>
patrick@0
   415
  <define name="media.id.attribute">
patrick@0
   416
    <attribute name="id">
patrick@0
   417
      <data type="NMTOKEN"/>
patrick@0
   418
    </attribute>
patrick@0
   419
  </define>
patrick@2
   420
  <!-- ~~~~~~ image -->
patrick@0
   421
  <define name="image">
patrick@0
   422
    <element name="image">
patrick@0
   423
      <ref name="image.attributes"/>
patrick@0
   424
      <ref name="image.content"/>
patrick@0
   425
    </element>
patrick@0
   426
  </define>
patrick@0
   427
  <define name="image.attributes">
patrick@0
   428
    <ref name="media.id.attribute"/>
patrick@0
   429
  </define>
patrick@0
   430
  <define name="image.content">
patrick@0
   431
    <optional>
patrick@0
   432
      <ref name="copyright"/>
patrick@0
   433
    </optional>
patrick@0
   434
  </define>
patrick@3
   435
  <!-- ~~~~~~ caption -->
patrick@3
   436
  <define name="media.caption">
patrick@3
   437
    <element name="caption">
patrick@3
   438
      <ref name="media.caption.content"/>
patrick@3
   439
    </element>
patrick@3
   440
  </define>
patrick@3
   441
  <define name="media.caption.content">
patrick@3
   442
    <oneOrMore>
patrick@3
   443
      <ref name="parag"/>
patrick@3
   444
    </oneOrMore>
patrick@3
   445
  </define>
patrick@2
   446
  <!-- ~~~~~~ copyright -->
patrick@0
   447
  <define name="copyright">
patrick@0
   448
    <element name="copyright">
patrick@0
   449
      <ref name="copyright.content"/>
patrick@0
   450
    </element>
patrick@0
   451
  </define>
patrick@0
   452
  <define name="copyright.content">
patrick@0
   453
    <ref name="inlines"/>
patrick@0
   454
  </define>
patrick@0
   455
  <!--
patrick@0
   456
    =============================================================================
patrick@0
   457
                                    Inline level
patrick@0
   458
    =============================================================================
patrick@0
   459
  -->
patrick@0
   460
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   461
  <define name="inlines">
patrick@0
   462
    <mixed>
patrick@0
   463
      <interleave>
patrick@0
   464
        <zeroOrMore>
patrick@0
   465
          <ref name="sup"/>
patrick@0
   466
        </zeroOrMore>
patrick@0
   467
        <zeroOrMore>
patrick@0
   468
          <ref name="sub"/>
patrick@0
   469
        </zeroOrMore>
patrick@0
   470
        <zeroOrMore>
patrick@0
   471
          <ref name="romannum"/>
patrick@0
   472
        </zeroOrMore>
patrick@0
   473
        <zeroOrMore>
patrick@0
   474
          <ref name="date"/>
patrick@0
   475
        </zeroOrMore>
patrick@0
   476
        <zeroOrMore>
patrick@0
   477
          <ref name="name"/>
patrick@0
   478
        </zeroOrMore>
patrick@0
   479
        <zeroOrMore>
patrick@0
   480
          <ref name="footnote"/>
patrick@0
   481
        </zeroOrMore>
patrick@0
   482
        <zeroOrMore>
patrick@0
   483
          <ref name="foreign"/>
patrick@0
   484
        </zeroOrMore>
patrick@0
   485
        <zeroOrMore>
patrick@0
   486
          <ref name="highlight"/>
patrick@0
   487
        </zeroOrMore>
patrick@0
   488
      </interleave>
patrick@0
   489
    </mixed>
patrick@0
   490
  </define>
patrick@0
   491
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   492
  <define name="sup">
patrick@0
   493
    <element name="sup">
patrick@0
   494
      <ref name="inlines"/>
patrick@0
   495
    </element>
patrick@0
   496
  </define>
patrick@0
   497
  <define name="sub">
patrick@0
   498
    <element name="sub">
patrick@0
   499
      <ref name="inlines"/>
patrick@0
   500
    </element>
patrick@0
   501
  </define>
patrick@0
   502
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ romannum ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   503
  <define name="romannum">
patrick@0
   504
    <element name="romannum">
patrick@0
   505
      <data type="token">
patrick@0
   506
        <param name="pattern">([dlxvi]+)</param>
patrick@0
   507
      </data>
patrick@0
   508
    </element>
patrick@0
   509
  </define>
patrick@0
   510
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   511
  <define name="date">
patrick@0
   512
    <element name="date">
patrick@0
   513
      <ref name="date.attributes"/>
patrick@0
   514
      <ref name="date.content"/>
patrick@0
   515
    </element>
patrick@0
   516
  </define>
patrick@0
   517
  <define name="date.attributes">
patrick@0
   518
    <ref name="date.of.attribute"/>
patrick@0
   519
  </define>
patrick@0
   520
  <define name="date.of.attribute">
patrick@0
   521
    <attribute name="of">
patrick@0
   522
      <ref name="date.of.enumeration"/>
patrick@0
   523
    </attribute>
patrick@0
   524
  </define>
patrick@0
   525
  <define name="date.of.enumeration">
patrick@0
   526
    <choice>
patrick@0
   527
      <value>event</value>
patrick@0
   528
      <value>birth</value>
patrick@0
   529
      <value>death</value>
patrick@0
   530
    </choice>
patrick@0
   531
  </define>
patrick@0
   532
  <define name="date.content">
patrick@0
   533
    <choice>
patrick@0
   534
      <data type="date"/>
patrick@0
   535
      <data type="gYearMonth"/>
patrick@0
   536
      <data type="gYear"/>
patrick@0
   537
    </choice>
patrick@0
   538
  </define>
patrick@2
   539
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   540
  <define name="firstname">
patrick@0
   541
    <element name="firstname">
patrick@0
   542
      <ref name="inlines"/>
patrick@0
   543
    </element>
patrick@0
   544
  </define>
patrick@0
   545
  <define name="lastname">
patrick@0
   546
    <element name="lastname">
patrick@0
   547
      <ref name="inlines"/>
patrick@0
   548
    </element>
patrick@0
   549
  </define>
patrick@0
   550
  <define name="name">
patrick@0
   551
    <element name="name">
patrick@0
   552
      <ref name="name.attributes"/>
patrick@0
   553
      <ref name="name.content"/>
patrick@0
   554
    </element>
patrick@0
   555
  </define>
patrick@0
   556
  <define name="name.attributes">
patrick@0
   557
    <optional>
patrick@0
   558
      <ref name="name.of.attribute"/>
patrick@0
   559
    </optional>
patrick@0
   560
  </define>
patrick@0
   561
  <define name="name.of.attribute">
patrick@0
   562
    <attribute name="of">
patrick@0
   563
      <ref name="name.of.enumeration"/>
patrick@0
   564
    </attribute>
patrick@0
   565
  </define>
patrick@0
   566
  <define name="name.of.enumeration">
patrick@0
   567
    <choice>
patrick@0
   568
      <value>person</value>
patrick@0
   569
      <value>company</value>
patrick@0
   570
      <value>book</value>
patrick@0
   571
      <value>newspaper</value>
patrick@0
   572
      <value>party</value>
patrick@0
   573
    </choice>
patrick@0
   574
  </define>
patrick@2
   575
  <define name="name.content">
patrick@2
   576
    <ref name="inlines"/>
patrick@2
   577
  </define>
patrick@0
   578
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ footnote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   579
  <define name="footnote">
patrick@0
   580
    <element name="footnote">
patrick@0
   581
      <ref name="footnote.attributes"/>
patrick@0
   582
      <ref name="footnote.content"/>
patrick@0
   583
    </element>
patrick@0
   584
  </define>
patrick@0
   585
  <define name="footnote.attributes">
patrick@0
   586
    <optional>
patrick@0
   587
      <ref name="footnote.label.attribute"/>
patrick@0
   588
    </optional>
patrick@0
   589
  </define>
patrick@0
   590
  <define name="footnote.label.attribute">
patrick@0
   591
    <attribute name="label"/>
patrick@0
   592
  </define>
patrick@0
   593
  <define name="footnote.content">
patrick@0
   594
    <oneOrMore>
patrick@0
   595
      <ref name="parag"/>
patrick@0
   596
    </oneOrMore>
patrick@0
   597
  </define>
patrick@0
   598
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   599
  <define name="foreign">
patrick@0
   600
    <element name="foreign">
patrick@0
   601
      <ref name="foreign.attributes"/>
patrick@0
   602
      <ref name="foreign.content"/>
patrick@0
   603
    </element>
patrick@0
   604
  </define>
patrick@0
   605
  <define name="foreign.attributes">
patrick@0
   606
    <optional>
patrick@0
   607
      <ref name="lang.attribute"/>
patrick@0
   608
    </optional>
patrick@0
   609
  </define>
patrick@0
   610
  <define name="foreign.content">
patrick@0
   611
    <ref name="inlines"/>
patrick@0
   612
  </define>
patrick@0
   613
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   614
  <define name="highlight">
patrick@0
   615
    <element name="highlight">
patrick@0
   616
      <ref name="highlight.content"/>
patrick@0
   617
    </element>
patrick@0
   618
  </define>
patrick@0
   619
  <define name="highlight.content">
patrick@0
   620
    <ref name="inlines"/>
patrick@0
   621
  </define>
patrick@0
   622
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   623
  <define name="link">
patrick@0
   624
    <element name="link">
patrick@0
   625
      <ref name="link.attributes"/>
patrick@0
   626
      <ref name="link.content"/>
patrick@0
   627
    </element>
patrick@0
   628
  </define>
patrick@0
   629
  <define name="link.attributes">
patrick@0
   630
    <empty/>
patrick@0
   631
  </define>
patrick@0
   632
  <define name="link.content">
patrick@0
   633
    <ref name="inlines"/>
patrick@0
   634
  </define>
patrick@0
   635
</grammar>