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