RelaxNG/publiset.rng
author Patrick PIERRE <patrick.pierre@prismallia.fr>
sam., 14 janv. 2012 12:44:31 +0100
changeset 72 c85252fac80c
parent 66 29c53c3d676e
permissions -rw-r--r--
Amélioration de la gestion des listes
patrick@0
     1
<?xml version="1.0" encoding="UTF-8"?>
patrick@0
     2
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
patrick@0
     3
  <!-- $Id$ -->
patrick@0
     4
  <start>
patrick@0
     5
    <ref name="publiset"/>
patrick@0
     6
  </start>
patrick@0
     7
  <define name="publiset">
patrick@0
     8
    <element name="publiset">
patrick@0
     9
      <ref name="publiset.attributes"/>
patrick@0
    10
      <ref name="publiset.content"/>
patrick@0
    11
    </element>
patrick@0
    12
  </define>
patrick@0
    13
  <define name="publiset.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="publiset.content">
patrick@0
    22
    <oneOrMore>
patrick@0
    23
      <choice>
patrick@0
    24
        <ref name="composition"/>
patrick@0
    25
        <ref name="selection"/>
patrick@0
    26
      </choice>
patrick@0
    27
    </oneOrMore>
patrick@0
    28
  </define>
patrick@0
    29
  <!--
patrick@0
    30
    =============================================================================
patrick@20
    31
                                     TOP LEVEL
patrick@0
    32
    =============================================================================
patrick@0
    33
  -->
patrick@0
    34
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ composition ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
    35
  <define name="composition">
patrick@0
    36
    <element name="composition">
patrick@0
    37
      <ref name="composition.attributes"/>
patrick@0
    38
      <ref name="composition.content"/>
patrick@0
    39
    </element>
patrick@0
    40
  </define>
patrick@0
    41
  <define name="composition.attributes">
patrick@0
    42
    <interleave>
patrick@0
    43
      <ref name="composition.id.attribute"/>
patrick@29
    44
      <optional>
patrick@29
    45
        <ref name="path.attribute"/>
patrick@29
    46
      </optional>
patrick@29
    47
      <optional>
patrick@29
    48
        <ref name="xpath.attribute"/>
patrick@29
    49
      </optional>
patrick@29
    50
      <optional>
patrick@29
    51
        <ref name="xslt.attribute"/>
patrick@29
    52
      </optional>
patrick@0
    53
      <ref name="remap.attributes"/>
patrick@66
    54
      <optional>
patrick@66
    55
        <ref name="lang.attribute"/>
patrick@66
    56
      </optional>
patrick@0
    57
    </interleave>
patrick@0
    58
  </define>
patrick@0
    59
  <define name="composition.id.attribute">
patrick@0
    60
    <attribute name="xml:id">
patrick@0
    61
      <data type="ID"/>
patrick@0
    62
    </attribute>
patrick@0
    63
  </define>
patrick@29
    64
  <define name="path.attribute">
patrick@29
    65
    <attribute name="path">
patrick@29
    66
      <data type="anyURI"/>
patrick@29
    67
    </attribute>
patrick@29
    68
  </define>
patrick@29
    69
  <define name="xslt.attribute">
patrick@29
    70
    <attribute name="xslt">
patrick@29
    71
      <data type="anyURI"/>
patrick@29
    72
    </attribute>
patrick@29
    73
  </define>
patrick@29
    74
  <define name="xpath.attribute">
patrick@29
    75
    <attribute name="xpath"/>
patrick@29
    76
  </define>
patrick@66
    77
  <define name="lang.attribute">
patrick@66
    78
    <attribute name="xml:lang">
patrick@66
    79
      <data type="language"/>
patrick@66
    80
    </attribute>
patrick@66
    81
  </define>
patrick@0
    82
  <define name="composition.content">
patrick@0
    83
    <optional>
patrick@20
    84
      <ref name="composition.head"/>
patrick@0
    85
    </optional>
patrick@0
    86
    <oneOrMore>
patrick@0
    87
      <choice>
patrick@30
    88
        <ref name="composition.division"/>
patrick@0
    89
        <ref name="composition.file"/>
patrick@0
    90
      </choice>
patrick@0
    91
    </oneOrMore>
patrick@0
    92
  </define>
patrick@0
    93
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ selection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
    94
  <define name="selection">
patrick@0
    95
    <element name="selection">
patrick@0
    96
      <ref name="selection.attributes"/>
patrick@0
    97
      <ref name="selection.content"/>
patrick@0
    98
    </element>
patrick@0
    99
  </define>
patrick@0
   100
  <define name="selection.attributes">
patrick@29
   101
    <interleave>
patrick@29
   102
      <ref name="selection.id.attribute"/>
patrick@29
   103
      <optional>
patrick@29
   104
        <ref name="path.attribute"/>
patrick@29
   105
      </optional>
patrick@66
   106
      <optional>
patrick@66
   107
        <ref name="lang.attribute"/>
patrick@66
   108
      </optional>
patrick@29
   109
    </interleave>
patrick@0
   110
  </define>
patrick@0
   111
  <define name="selection.id.attribute">
patrick@0
   112
    <attribute name="xml:id">
patrick@0
   113
      <data type="ID"/>
patrick@0
   114
    </attribute>
patrick@0
   115
  </define>
patrick@0
   116
  <define name="selection.content">
patrick@0
   117
    <optional>
patrick@20
   118
      <ref name="selection.head"/>
patrick@0
   119
    </optional>
patrick@0
   120
    <oneOrMore>
patrick@0
   121
      <choice>
patrick@30
   122
        <ref name="selection.division"/>
patrick@0
   123
        <ref name="selection.file"/>
patrick@30
   124
        <ref name="link"/>
patrick@0
   125
      </choice>
patrick@0
   126
    </oneOrMore>
patrick@0
   127
  </define>
patrick@0
   128
  <!--
patrick@0
   129
    =============================================================================
patrick@20
   130
                                     HEAD LEVEL
patrick@0
   131
    =============================================================================
patrick@0
   132
  -->
patrick@20
   133
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@20
   134
  <define name="composition.head">
patrick@20
   135
    <element name="head">
patrick@20
   136
      <ref name="head.attributes"/>
patrick@20
   137
      <ref name="top.head.content"/>
patrick@0
   138
    </element>
patrick@0
   139
  </define>
patrick@20
   140
  <define name="selection.head">
patrick@20
   141
    <element name="head">
patrick@20
   142
      <ref name="top.head.content"/>
patrick@0
   143
    </element>
patrick@0
   144
  </define>
patrick@20
   145
  <define name="division.head">
patrick@20
   146
    <element name="head">
patrick@20
   147
      <ref name="division.head.content"/>
patrick@20
   148
    </element>
patrick@20
   149
  </define>
patrick@20
   150
  <define name="head.attributes">
patrick@0
   151
    <ref name="remap.attributes"/>
patrick@0
   152
  </define>
patrick@20
   153
  <define name="top.head.content">
patrick@5
   154
    <interleave>
patrick@5
   155
      <optional>
patrick@5
   156
        <ref name="title"/>
patrick@20
   157
        <optional>
patrick@20
   158
          <ref name="subtitle"/>
patrick@20
   159
        </optional>
patrick@5
   160
      </optional>
patrick@34
   161
      <zeroOrMore>
patrick@34
   162
        <ref name="identifier"/>
patrick@34
   163
      </zeroOrMore>
patrick@5
   164
      <optional>
patrick@66
   165
        <ref name="copyright"/>
patrick@5
   166
      </optional>
patrick@39
   167
      <optional>
patrick@66
   168
        <ref name="contributors"/>
patrick@5
   169
      </optional>
patrick@5
   170
      <optional>
yvon@52
   171
        <ref name="abstract"/>
yvon@52
   172
      </optional>
yvon@52
   173
      <optional>
patrick@35
   174
        <ref name="cover"/>
patrick@35
   175
      </optional>
patrick@20
   176
    </interleave>
patrick@20
   177
  </define>
patrick@20
   178
  <define name="division.head.content">
patrick@66
   179
    <optional>
patrick@66
   180
      <ref name="title"/>
patrick@20
   181
      <optional>
patrick@66
   182
        <ref name="subtitle"/>
patrick@20
   183
      </optional>
patrick@66
   184
    </optional>
patrick@0
   185
  </define>
patrick@0
   186
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   187
  <define name="title">
patrick@0
   188
    <element name="title">
patrick@0
   189
      <ref name="title.content"/>
patrick@0
   190
    </element>
patrick@0
   191
  </define>
patrick@0
   192
  <define name="subtitle">
patrick@0
   193
    <element name="subtitle">
patrick@0
   194
      <ref name="title.content"/>
patrick@0
   195
    </element>
patrick@0
   196
  </define>
patrick@20
   197
  <define name="title.content">
patrick@20
   198
    <ref name="inlines"/>
patrick@20
   199
  </define>
patrick@34
   200
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@38
   201
  <define name="identifier.uri">
patrick@34
   202
    <element name="identifier">
patrick@38
   203
      <attribute name="type">
patrick@38
   204
        <value>uri</value>
patrick@38
   205
      </attribute>
patrick@38
   206
      <data type="anyURI"/>
patrick@34
   207
    </element>
patrick@34
   208
  </define>
patrick@38
   209
  <define name="identifier.ean">
patrick@38
   210
    <element name="identifier">
patrick@38
   211
      <attribute name="type">
patrick@38
   212
        <value>ean</value>
patrick@38
   213
      </attribute>
patrick@38
   214
      <data type="token">
patrick@38
   215
        <param name="pattern">\d{13}</param>
patrick@38
   216
      </data>
patrick@38
   217
    </element>
patrick@34
   218
  </define>
patrick@38
   219
  <define name="identifier">
patrick@34
   220
    <choice>
patrick@38
   221
      <ref name="identifier.uri"/>
patrick@38
   222
      <ref name="identifier.ean"/>
patrick@34
   223
    </choice>
patrick@34
   224
  </define>
patrick@39
   225
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@39
   226
  <define name="copyright">
patrick@39
   227
    <element name="copyright">
patrick@39
   228
      <ref name="copyright.content"/>
patrick@39
   229
    </element>
patrick@39
   230
  </define>
patrick@39
   231
  <define name="copyright.content">
patrick@39
   232
    <ref name="inlines"/>
patrick@39
   233
  </define>
patrick@66
   234
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@66
   235
  <!-- ~~~~~~ contributors -->
patrick@66
   236
  <define name="contributors">
patrick@66
   237
    <element name="contributors">
patrick@66
   238
      <ref name="contributors.content"/>
patrick@5
   239
    </element>
patrick@5
   240
  </define>
patrick@66
   241
  <define name="contributors.content">
patrick@66
   242
    <oneOrMore>
patrick@66
   243
      <ref name="contributor"/>
patrick@66
   244
    </oneOrMore>
patrick@66
   245
  </define>
patrick@66
   246
  <!-- ~~~~~~ contributor -->
patrick@66
   247
  <define name="contributor">
patrick@66
   248
    <element name="contributor">
patrick@66
   249
      <ref name="contributor.content"/>
patrick@66
   250
    </element>
patrick@66
   251
  </define>
patrick@66
   252
  <define name="contributor.content">
patrick@66
   253
    <choice>
patrick@66
   254
      <group>
patrick@66
   255
        <optional>
patrick@66
   256
          <ref name="firstname"/>
patrick@66
   257
          <optional>
patrick@66
   258
            <ref name="secondname"/>
patrick@66
   259
          </optional>
patrick@66
   260
        </optional>
patrick@66
   261
        <ref name="lastname"/>
patrick@66
   262
      </group>
patrick@66
   263
      <ref name="label"/>
patrick@66
   264
    </choice>
patrick@34
   265
    <optional>
patrick@66
   266
      <ref name="address"/>
patrick@34
   267
    </optional>
patrick@5
   268
    <optional>
patrick@66
   269
      <ref name="link"/>
patrick@5
   270
    </optional>
patrick@34
   271
    <zeroOrMore>
patrick@34
   272
      <ref name="role"/>
patrick@34
   273
    </zeroOrMore>
patrick@5
   274
  </define>
patrick@66
   275
  <!-- ~~~~~~ firstname, secondname, lastname, label -->
patrick@5
   276
  <define name="firstname">
patrick@5
   277
    <element name="firstname">
patrick@5
   278
      <ref name="firstname.content"/>
patrick@5
   279
    </element>
patrick@5
   280
  </define>
patrick@66
   281
  <define name="secondname">
patrick@66
   282
    <element name="secondname">
patrick@66
   283
      <ref name="secondname.content"/>
patrick@66
   284
    </element>
patrick@5
   285
  </define>
patrick@5
   286
  <define name="lastname">
patrick@5
   287
    <element name="lastname">
patrick@5
   288
      <ref name="lastname.content"/>
patrick@5
   289
    </element>
patrick@5
   290
  </define>
patrick@66
   291
  <define name="label">
patrick@66
   292
    <element name="label">
patrick@66
   293
      <ref name="label.content"/>
patrick@66
   294
    </element>
patrick@66
   295
  </define>
patrick@66
   296
  <define name="firstname.content">
patrick@66
   297
    <ref name="inlines"/>
patrick@66
   298
  </define>
patrick@66
   299
  <define name="secondname.content">
patrick@66
   300
    <ref name="inlines"/>
patrick@66
   301
  </define>
patrick@5
   302
  <define name="lastname.content">
patrick@5
   303
    <ref name="inlines"/>
patrick@5
   304
  </define>
patrick@66
   305
  <define name="label.content">
patrick@66
   306
    <ref name="inlines"/>
patrick@66
   307
  </define>
patrick@66
   308
  <!-- ~~~~~~ address -->
patrick@66
   309
  <define name="address">
patrick@66
   310
    <element name="address">
patrick@66
   311
      <ref name="address.content"/>
patrick@66
   312
    </element>
patrick@66
   313
  </define>
patrick@66
   314
  <define name="address.content">
patrick@66
   315
    <ref name="inlines"/>
patrick@66
   316
  </define>
patrick@34
   317
  <!-- ~~~~~~ role -->
patrick@34
   318
  <define name="role">
patrick@34
   319
    <element name="role">
patrick@66
   320
      <ref name="role.content"/>
patrick@34
   321
    </element>
patrick@34
   322
  </define>
patrick@66
   323
  <define name="role.content">
patrick@66
   324
    <choice>
patrick@66
   325
      <value>author</value>
patrick@66
   326
      <value>illustrator</value>
patrick@66
   327
      <value>publisher</value>
patrick@66
   328
    </choice>
patrick@38
   329
  </define>
yvon@52
   330
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
yvon@52
   331
  <define name="abstract">
yvon@52
   332
    <element name="abstract">
yvon@52
   333
      <ref name="abstract.content"/>
yvon@52
   334
    </element>
yvon@52
   335
  </define>
yvon@52
   336
  <define name="abstract.content">
yvon@52
   337
    <oneOrMore>
yvon@52
   338
      <ref name="p"/>
yvon@52
   339
    </oneOrMore>
yvon@52
   340
  </define>
patrick@35
   341
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@35
   342
  <define name="cover">
patrick@35
   343
    <element name="cover">
patrick@35
   344
      <ref name="cover.content"/>
patrick@35
   345
    </element>
patrick@35
   346
  </define>
patrick@35
   347
  <define name="cover.content">
patrick@35
   348
    <ref name="cover.image"/>
patrick@35
   349
  </define>
patrick@35
   350
  <define name="cover.image">
patrick@35
   351
    <element name="image">
patrick@35
   352
      <ref name="cover.image.attributes"/>
patrick@35
   353
    </element>
patrick@35
   354
  </define>
patrick@35
   355
  <define name="cover.image.attributes">
patrick@35
   356
    <ref name="cover.image.id.attribute"/>
patrick@35
   357
  </define>
patrick@35
   358
  <define name="cover.image.id.attribute">
patrick@35
   359
    <attribute name="id">
patrick@35
   360
      <data type="NMTOKEN"/>
patrick@35
   361
    </attribute>
patrick@35
   362
  </define>
patrick@0
   363
  <!--
patrick@0
   364
    =============================================================================
patrick@20
   365
                                   DIVISION LEVEL
patrick@0
   366
    =============================================================================
patrick@0
   367
  -->
patrick@0
   368
  <define name="composition.division">
patrick@0
   369
    <element name="division">
patrick@0
   370
      <ref name="composition.division.attributes"/>
patrick@0
   371
      <ref name="composition.division.content"/>
patrick@0
   372
    </element>
patrick@0
   373
  </define>
patrick@0
   374
  <define name="selection.division">
patrick@0
   375
    <element name="division">
patrick@0
   376
      <ref name="selection.division.attributes"/>
patrick@0
   377
      <ref name="selection.division.content"/>
patrick@0
   378
    </element>
patrick@0
   379
  </define>
patrick@0
   380
  <define name="composition.division.attributes">
patrick@0
   381
    <interleave>
patrick@0
   382
      <optional>
patrick@26
   383
        <ref name="path.attribute"/>
patrick@0
   384
      </optional>
patrick@23
   385
      <optional>
patrick@29
   386
        <ref name="xpath.attribute"/>
patrick@23
   387
      </optional>
patrick@23
   388
      <optional>
patrick@29
   389
        <ref name="xslt.attribute"/>
patrick@23
   390
      </optional>
patrick@0
   391
      <ref name="remap.attributes"/>
patrick@0
   392
    </interleave>
patrick@0
   393
  </define>
patrick@0
   394
  <define name="selection.division.attributes">
patrick@30
   395
    <optional>
patrick@30
   396
      <ref name="path.attribute"/>
patrick@30
   397
    </optional>
patrick@23
   398
  </define>
patrick@0
   399
  <define name="composition.division.content">
patrick@0
   400
    <optional>
patrick@20
   401
      <ref name="composition.head"/>
patrick@0
   402
    </optional>
patrick@0
   403
    <oneOrMore>
patrick@0
   404
      <choice>
patrick@20
   405
        <ref name="composition.division"/>
patrick@0
   406
        <ref name="composition.file"/>
patrick@0
   407
      </choice>
patrick@0
   408
    </oneOrMore>
patrick@0
   409
  </define>
patrick@0
   410
  <define name="selection.division.content">
patrick@0
   411
    <optional>
patrick@20
   412
      <ref name="selection.head"/>
patrick@0
   413
    </optional>
patrick@0
   414
    <oneOrMore>
patrick@0
   415
      <choice>
patrick@20
   416
        <ref name="selection.division"/>
patrick@0
   417
        <ref name="selection.file"/>
patrick@30
   418
        <ref name="link"/>
patrick@0
   419
      </choice>
patrick@0
   420
    </oneOrMore>
patrick@0
   421
  </define>
patrick@0
   422
  <!--
patrick@0
   423
    =============================================================================
patrick@20
   424
                                     FILE LEVEL
patrick@0
   425
    =============================================================================
patrick@0
   426
  -->
patrick@0
   427
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   428
  <define name="composition.file">
patrick@0
   429
    <element name="file">
patrick@0
   430
      <ref name="composition.file.attributes"/>
patrick@0
   431
    </element>
patrick@0
   432
  </define>
patrick@0
   433
  <define name="selection.file">
patrick@0
   434
    <element name="file">
patrick@0
   435
      <ref name="selection.file.attributes"/>
patrick@2
   436
      <ref name="file.content"/>
patrick@0
   437
    </element>
patrick@0
   438
  </define>
patrick@0
   439
  <define name="composition.file.attributes">
patrick@0
   440
    <interleave>
patrick@30
   441
      <ref name="name.attribute"/>
patrick@0
   442
      <optional>
patrick@29
   443
        <ref name="xpath.attribute"/>
patrick@0
   444
      </optional>
patrick@20
   445
      <optional>
patrick@29
   446
        <ref name="xslt.attribute"/>
patrick@20
   447
      </optional>
patrick@0
   448
    </interleave>
patrick@0
   449
  </define>
patrick@0
   450
  <define name="selection.file.attributes">
patrick@30
   451
    <interleave>
patrick@30
   452
      <ref name="name.attribute"/>
patrick@30
   453
      <optional>
patrick@30
   454
        <ref name="uri.attribute"/>
patrick@30
   455
      </optional>
patrick@30
   456
    </interleave>
patrick@30
   457
  </define>
patrick@30
   458
  <define name="name.attribute">
patrick@30
   459
    <attribute name="name">
patrick@30
   460
      <data type="anyURI"/>
patrick@30
   461
    </attribute>
patrick@30
   462
  </define>
patrick@2
   463
  <define name="file.content">
patrick@30
   464
    <ref name="inlines"/>
patrick@30
   465
  </define>
patrick@0
   466
  <!--
patrick@0
   467
    =============================================================================
yvon@52
   468
                                    BLOCK LEVEL
yvon@52
   469
    =============================================================================
yvon@52
   470
  -->
yvon@52
   471
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
yvon@52
   472
  <define name="p">
yvon@52
   473
    <element name="p">
yvon@52
   474
      <ref name="p.content"/>
yvon@52
   475
    </element>
yvon@52
   476
  </define>
yvon@52
   477
  <define name="p.content">
yvon@52
   478
    <ref name="inlines"/>
yvon@52
   479
  </define>
yvon@52
   480
  <!--
yvon@52
   481
    =============================================================================
patrick@20
   482
                                    INLINE LEVEL
patrick@0
   483
    =============================================================================
patrick@0
   484
  -->
patrick@0
   485
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   486
  <define name="inlines">
patrick@0
   487
    <mixed>
patrick@0
   488
      <interleave>
patrick@0
   489
        <zeroOrMore>
patrick@0
   490
          <ref name="sup"/>
patrick@0
   491
        </zeroOrMore>
patrick@0
   492
        <zeroOrMore>
patrick@0
   493
          <ref name="sub"/>
patrick@0
   494
        </zeroOrMore>
patrick@0
   495
      </interleave>
patrick@0
   496
    </mixed>
patrick@0
   497
  </define>
patrick@0
   498
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@0
   499
  <define name="sup">
patrick@0
   500
    <element name="sup">
patrick@0
   501
      <ref name="inlines"/>
patrick@0
   502
    </element>
patrick@0
   503
  </define>
patrick@0
   504
  <define name="sub">
patrick@0
   505
    <element name="sub">
patrick@0
   506
      <ref name="inlines"/>
patrick@0
   507
    </element>
patrick@0
   508
  </define>
patrick@36
   509
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
patrick@36
   510
  <define name="link">
patrick@36
   511
    <element name="link">
patrick@36
   512
      <ref name="link.attributes"/>
patrick@36
   513
      <ref name="link.content"/>
patrick@36
   514
    </element>
patrick@36
   515
  </define>
patrick@36
   516
  <define name="link.attributes">
patrick@36
   517
    <ref name="uri.attribute"/>
patrick@36
   518
  </define>
patrick@36
   519
  <define name="uri.attribute">
patrick@36
   520
    <attribute name="uri">
patrick@36
   521
      <data type="anyURI"/>
patrick@36
   522
    </attribute>
patrick@36
   523
  </define>
patrick@36
   524
  <define name="link.content">
patrick@36
   525
    <ref name="inlines"/>
patrick@36
   526
  </define>
patrick@0
   527
  <!--
patrick@0
   528
    =============================================================================
patrick@20
   529
                                  REMAP ATTRIBUTES
patrick@0
   530
    =============================================================================
patrick@0
   531
  -->
patrick@0
   532
  <define name="remap.attributes">
patrick@0
   533
    <interleave>
patrick@0
   534
      <optional>
patrick@0
   535
        <ref name="as.attribute"/>
patrick@0
   536
      </optional>
patrick@0
   537
      <optional>
patrick@0
   538
        <ref name="attributes.attribute"/>
patrick@0
   539
      </optional>
patrick@0
   540
    </interleave>
patrick@0
   541
  </define>
patrick@0
   542
  <define name="as.attribute">
patrick@0
   543
    <attribute name="as">
patrick@0
   544
      <data type="QName"/>
patrick@0
   545
    </attribute>
patrick@0
   546
  </define>
patrick@0
   547
  <define name="attributes.attribute">
patrick@0
   548
    <attribute name="attributes">
patrick@0
   549
      <list>
patrick@0
   550
        <oneOrMore>
patrick@0
   551
          <data type="token">
patrick@0
   552
            <param name="pattern">\c+=\S+</param>
patrick@0
   553
          </data>
patrick@0
   554
        </oneOrMore>
patrick@0
   555
      </list>
patrick@0
   556
    </attribute>
patrick@0
   557
  </define>
patrick@0
   558
</grammar>