RelaxNG/publidoc.rnc
author Patrick PIERRE
dim., 22 juin 2014 09:47:20 +0200
changeset 316 47ffc0efdd37
parent 313 e4f154ea2837
child 350 58bbf6bb79e2
permissions -rw-r--r--
Déplacement des exemples
patrick@0
     1
# $Id$
patrick@0
     2
patrick@0
     3
start = publidoc
patrick@0
     4
patrick@0
     5
patrick@0
     6
publidoc = element publidoc {
patrick@0
     7
   publidoc.attributes,
patrick@0
     8
   publidoc.content
patrick@0
     9
}
patrick@0
    10
patrick@0
    11
publidoc.attributes =
patrick@0
    12
   version.attribute
patrick@0
    13
version.attribute = attribute version { "1.0" }
patrick@0
    14
patrick@0
    15
publidoc.content =
patrick@0
    16
   document
patrick@0
    17
 | top.topic
patrick@0
    18
patrick@0
    19
patrick@0
    20
# =============================================================================
Patrick@310
    21
#                                 HEAD LEVEL
Patrick@310
    22
# =============================================================================
Patrick@310
    23
Patrick@310
    24
# ~~~~~~~~~~~~~~~~~~~~~~~ title, shorttitle, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
    25
Patrick@310
    26
title = element title { title.content }
Patrick@310
    27
shorttitle = element shorttitle { title.content }
Patrick@310
    28
subtitle = element subtitle { title.content }
Patrick@310
    29
Patrick@310
    30
title.content = inlines
Patrick@310
    31
Patrick@310
    32
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
    33
Patrick@310
    34
# ~~~~~~ identifier
Patrick@310
    35
identifier = element identifier {
Patrick@310
    36
   (attribute type { "ean" }, for.attribute?, xsd:token {pattern = "\d{13}"})
Patrick@310
    37
 | (attribute type { "uri" }, for.attribute?, xsd:anyURI)
Patrick@310
    38
}
Patrick@310
    39
Patrick@310
    40
# ~~~~~~ identifier.ean
Patrick@310
    41
identifier.ean = element identifier {
Patrick@310
    42
   attribute type { "ean" }, for.attribute?, xsd:token {pattern = "\d{13}"}
Patrick@310
    43
}
Patrick@310
    44
Patrick@310
    45
# ~~~~~~ identifier.uri
Patrick@310
    46
identifier.uri = element identifier {
Patrick@310
    47
   attribute type { "uri" }, for.attribute?, xsd:anyURI
Patrick@310
    48
}
Patrick@310
    49
Patrick@310
    50
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
    51
Patrick@310
    52
copyright = element copyright { copyright.content }
Patrick@310
    53
Patrick@310
    54
copyright.content = simple.inlines
Patrick@310
    55
Patrick@310
    56
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ collection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
    57
Patrick@310
    58
collection = element collection { collection.content }
Patrick@310
    59
Patrick@310
    60
collection.content = simple.inlines
Patrick@310
    61
Patrick@310
    62
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
    63
Patrick@310
    64
# ~~~~~~ contributors
Patrick@310
    65
contributors = element contributors { contributors.content }
Patrick@310
    66
Patrick@310
    67
contributors.content =
Patrick@310
    68
   contributor+
Patrick@310
    69
Patrick@310
    70
# ~~~~~~ contributor
Patrick@310
    71
contributor = element contributor { contributor.content }
Patrick@310
    72
Patrick@310
    73
contributor.content =
Patrick@310
    74
   identifier.uri?,
Patrick@310
    75
   (((firstname, secondname?)?, lastname) | label),
Patrick@310
    76
   address?,
Patrick@310
    77
   link?,
Patrick@310
    78
   role+
Patrick@310
    79
Patrick@310
    80
# ~~~~~~ firstname, secondname, lastname, label
Patrick@310
    81
firstname = element firstname { firstname.content }
Patrick@310
    82
secondname = element secondname { secondname.content }
Patrick@310
    83
lastname = element lastname { lastname.content }
Patrick@310
    84
label = element label { label.content }
Patrick@310
    85
Patrick@310
    86
firstname.content = simple.inlines
Patrick@310
    87
secondname.content = simple.inlines
Patrick@310
    88
lastname.content = simple.inlines
Patrick@310
    89
label.content = simple.inlines
Patrick@310
    90
Patrick@310
    91
# ~~~~~~ address
Patrick@310
    92
address = element address { address.content }
Patrick@310
    93
Patrick@310
    94
address.content = simple.inlines
Patrick@310
    95
Patrick@310
    96
# ~~~~~~ role
Patrick@310
    97
role = element role { role.content }
Patrick@310
    98
Patrick@310
    99
role.content = "author" | "illustrator" | "publisher" | "packager"
Patrick@310
   100
Patrick@310
   101
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
   102
Patrick@310
   103
place = element place { place.content }
Patrick@310
   104
Patrick@310
   105
place.content = simple.inlines
Patrick@310
   106
Patrick@310
   107
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
   108
Patrick@310
   109
source = element source {
Patrick@310
   110
   (  (attribute type { "book" }, bibliography.entry.content)
Patrick@310
   111
    | (attribute type { "file" }, source.content.file)),
Patrick@310
   112
   source.content
Patrick@310
   113
}
Patrick@310
   114
Patrick@310
   115
source.content.file =
Patrick@310
   116
   identifier.uri
Patrick@310
   117
source.content =
Patrick@310
   118
   annotation*
Patrick@310
   119
Patrick@310
   120
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ keyword & subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
   121
Patrick@310
   122
# ~~~~~~ keywordset
Patrick@310
   123
keywordset = element keywordset { keywordset.content }
Patrick@310
   124
Patrick@310
   125
keywordset.content = keyword+
Patrick@310
   126
Patrick@310
   127
# ~~~~~~ keyword
Patrick@310
   128
keyword = element keyword { keyword.content }
Patrick@310
   129
Patrick@310
   130
keyword.content = simple.inlines
Patrick@310
   131
Patrick@310
   132
# ~~~~~~ subjectset
Patrick@310
   133
subjectset = element subjectset { subjectset.content }
Patrick@310
   134
Patrick@310
   135
subjectset.content = subject+
Patrick@310
   136
Patrick@310
   137
# ~~~~~~ subject
Patrick@310
   138
subject = element subject { subject.content }
Patrick@310
   139
Patrick@310
   140
subject.content = simple.inlines
Patrick@310
   141
Patrick@310
   142
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ index ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
   143
Patrick@310
   144
# ~~~~~~ index
Patrick@310
   145
index = element index { index.content }
Patrick@310
   146
head.index = element index { head.index.content }
Patrick@310
   147
Patrick@310
   148
index.content =
Patrick@310
   149
   (index.w, index.entry?)
Patrick@310
   150
 | (index.entry, (index.w | index.entry)?)
Patrick@310
   151
head.index.content =
Patrick@310
   152
   index.entry, index.entry?
Patrick@310
   153
Patrick@310
   154
# ~~~~~~ index.w
Patrick@310
   155
index.w = element w { simple.inlines }
Patrick@310
   156
Patrick@310
   157
# ~~~~~~ index.entry
Patrick@310
   158
index.entry = element entry { simple.inlines }
Patrick@310
   159
Patrick@310
   160
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
   161
Patrick@310
   162
abstract = element abstract { abstract.content }
Patrick@310
   163
Patrick@310
   164
abstract.content =
Patrick@310
   165
   p+
Patrick@310
   166
Patrick@310
   167
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
   168
Patrick@310
   169
cover = element cover { cover.content }
Patrick@310
   170
Patrick@310
   171
cover.content =
Patrick@310
   172
   cover.image
Patrick@310
   173
Patrick@310
   174
cover.image = element image { cover.image.attributes }
Patrick@310
   175
Patrick@310
   176
cover.image.attributes =
Patrick@310
   177
   media.id.attribute
Patrick@310
   178
Patrick@310
   179
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
   180
Patrick@310
   181
annotation = element annotation { annotation.content }
Patrick@310
   182
Patrick@310
   183
annotation.content = inlines
Patrick@310
   184
Patrick@310
   185
Patrick@310
   186
# =============================================================================
patrick@20
   187
#                                  TOP LEVEL
patrick@0
   188
# =============================================================================
patrick@0
   189
patrick@98
   190
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ top.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@90
   191
patrick@90
   192
top.head = element head { top.head.content }
patrick@90
   193
patrick@90
   194
top.head.content =
Patrick@217
   195
   (title, shorttitle?, subtitle*)?
Patrick@256
   196
 & identifier*
patrick@181
   197
 & copyright*
Patrick@155
   198
 & collection?
patrick@90
   199
 & contributors?
patrick@90
   200
 & date?
patrick@90
   201
 & place?
patrick@156
   202
 & (source, source?)?
patrick@90
   203
 & keywordset?
patrick@90
   204
 & subjectset?
patrick@90
   205
 & abstract?
Patrick@288
   206
 & head.index*
patrick@90
   207
 & cover?
patrick@90
   208
 & annotation*
patrick@90
   209
patrick@0
   210
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ document ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   211
patrick@0
   212
document = element document { document.attributes, document.content }
patrick@0
   213
patrick@0
   214
document.attributes =
patrick@0
   215
   document.id.attribute
patrick@142
   216
 & document.type.attribute?
patrick@66
   217
 & lang.attribute?
patrick@117
   218
document.id.attribute = attribute id { xsd:NMTOKEN }
patrick@142
   219
document.type.attribute = attribute type { xsd:NCName }
patrick@66
   220
lang.attribute = attribute xml:lang { xsd:language }
patrick@0
   221
patrick@0
   222
document.content =
patrick@20
   223
   top.head?,
patrick@56
   224
   (division | topic)+
patrick@0
   225
Patrick@310
   226
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ top.topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   227
patrick@18
   228
top.topic = element topic { top.topic.attributes, top.topic.content }
patrick@0
   229
patrick@20
   230
top.topic.attributes =
patrick@20
   231
   topic.id.attribute
patrick@20
   232
 & topic.type.attribute?
patrick@66
   233
 & lang.attribute?
patrick@117
   234
topic.id.attribute = attribute id { xsd:NMTOKEN }
patrick@20
   235
topic.type.attribute = attribute type { xsd:NCName }
patrick@20
   236
patrick@20
   237
top.topic.content =
patrick@20
   238
   top.head?,
Patrick@137
   239
   header?,
Patrick@190
   240
   ((section+, bibliography?) | bibliography),
Patrick@137
   241
   footer?
patrick@0
   242
patrick@40
   243
patrick@0
   244
# =============================================================================
patrick@20
   245
#                                 DIVISION LEVEL
patrick@0
   246
# =============================================================================
patrick@0
   247
Patrick@310
   248
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
   249
Patrick@310
   250
division.head = element head { division.head.content }
Patrick@310
   251
Patrick@310
   252
division.head.content =
Patrick@310
   253
   (title, shorttitle?, subtitle*)?
Patrick@310
   254
 & head.index*
Patrick@310
   255
 & abstract?
Patrick@310
   256
 & annotation*
Patrick@310
   257
patrick@70
   258
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   259
Patrick@232
   260
division = element division { division.attributes, division.content }
Patrick@232
   261
Patrick@232
   262
division.attributes =
Patrick@232
   263
   division.type.attribute?
Patrick@232
   264
division.type.attribute = attribute type { xsd:NCName }
patrick@0
   265
patrick@0
   266
division.content =
patrick@20
   267
   division.head?,
Patrick@217
   268
   front?,
patrick@56
   269
   (division | topic)+
patrick@0
   270
Patrick@310
   271
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ front ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@90
   272
Patrick@217
   273
front = element front { front.content }
Patrick@217
   274
Patrick@217
   275
front.content =
Patrick@217
   276
   section+
Patrick@217
   277
patrick@0
   278
patrick@0
   279
# =============================================================================
patrick@90
   280
#                                COMPONENT LEVEL
patrick@0
   281
# =============================================================================
patrick@0
   282
patrick@90
   283
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ component.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@90
   284
patrick@90
   285
component.head = element head { component.head.content }
patrick@90
   286
patrick@90
   287
component.head.content =
Patrick@217
   288
   (title, shorttitle?, subtitle*)?
patrick@90
   289
 & contributors?
patrick@143
   290
 & date?
patrick@143
   291
 & place?
patrick@143
   292
 & keywordset?
patrick@143
   293
 & subjectset?
Patrick@288
   294
 & head.index*
patrick@90
   295
 & abstract?
patrick@90
   296
 & annotation*
patrick@90
   297
patrick@0
   298
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   299
patrick@0
   300
topic = element topic { topic.attributes, topic.content }
patrick@0
   301
patrick@0
   302
topic.attributes =
Patrick@191
   303
   (topic.id.attribute | xmlid.attribute)?
patrick@0
   304
 & topic.type.attribute?
patrick@69
   305
 & lang.attribute?
Patrick@191
   306
xmlid.attribute = attribute xml:id { xsd:ID }
patrick@0
   307
patrick@0
   308
topic.content =
patrick@20
   309
   component.head?,
Patrick@137
   310
   header?,
Patrick@190
   311
   ((section+, bibliography?) | bibliography),
Patrick@137
   312
   footer?
patrick@0
   313
patrick@0
   314
patrick@0
   315
# =============================================================================
patrick@20
   316
#                                 SECTION LEVEL
patrick@0
   317
# =============================================================================
patrick@0
   318
Patrick@310
   319
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
   320
Patrick@310
   321
section.head = element head { section.head.content }
Patrick@310
   322
Patrick@310
   323
section.head.content =
Patrick@310
   324
   (title, shorttitle?, subtitle*)?
Patrick@310
   325
 & keywordset?
Patrick@310
   326
 & subjectset?
Patrick@310
   327
 & head.index*
Patrick@310
   328
 & abstract?
Patrick@310
   329
 & audio*
Patrick@310
   330
 & annotation*
Patrick@310
   331
Patrick@137
   332
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@137
   333
Patrick@137
   334
header = element header { header.content }
Patrick@137
   335
Patrick@137
   336
header.content =
Patrick@137
   337
   block+
Patrick@137
   338
patrick@20
   339
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   340
patrick@58
   341
section = element section { section.attributes, section.content }
patrick@58
   342
patrick@58
   343
section.attributes =
Patrick@279
   344
   xmlid.attribute?
Patrick@279
   345
 & section.type.attribute?
patrick@64
   346
 & lang.attribute?
patrick@166
   347
 & for.attribute?
patrick@58
   348
section.type.attribute = attribute type { xsd:NCName }
patrick@166
   349
for.attribute = attribute for { xsd:NCName }
patrick@0
   350
patrick@0
   351
section.content =
patrick@20
   352
   section.head?,
patrick@9
   353
   (section+ | block+)
patrick@0
   354
Patrick@189
   355
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bibliography ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@189
   356
Patrick@189
   357
bibliography = element bibliography { bibliography.content }
Patrick@189
   358
Patrick@189
   359
bibliography.content =
Patrick@189
   360
   bibliography.entry+
Patrick@189
   361
Patrick@137
   362
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@137
   363
Patrick@137
   364
footer = element footer { footer.content }
Patrick@137
   365
Patrick@137
   366
footer.content =
Patrick@137
   367
   block+
Patrick@137
   368
patrick@0
   369
patrick@0
   370
# =============================================================================
patrick@20
   371
#                                 BLOCK LEVEL
patrick@0
   372
# =============================================================================
patrick@0
   373
Patrick@310
   374
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@9
   375
patrick@90
   376
block.head = element head { block.head.content }
patrick@90
   377
patrick@90
   378
block.head.content =
Patrick@217
   379
   (title, shorttitle?, subtitle*)?
Patrick@288
   380
 & head.index*
patrick@90
   381
Patrick@310
   382
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
   383
Patrick@313
   384
block = (p | \list | blockquote | speech | table | table.cals | media)
Patrick@310
   385
patrick@42
   386
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   387
patrick@20
   388
p = element p { p.content }
patrick@0
   389
patrick@20
   390
p.content =
patrick@0
   391
   inlines
patrick@0
   392
patrick@17
   393
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@9
   394
patrick@9
   395
# ~~~~~~ list
patrick@75
   396
\list = element list {
patrick@20
   397
   block.head?,
patrick@71
   398
   (  (attribute type {"ordered"}?, item, item+)
patrick@9
   399
    | (attribute type {"glossary"}, glossary.item+) )
patrick@75
   400
}
patrick@9
   401
patrick@9
   402
# ~~~~~~ item
patrick@9
   403
item = element item { item.content }
patrick@9
   404
patrick@30
   405
item.content =
patrick@73
   406
   inlines
patrick@73
   407
 | block+
patrick@9
   408
patrick@9
   409
# ~~~~~~ glossary.item
patrick@9
   410
glossary.item = element item { glossary.item.content }
patrick@9
   411
patrick@9
   412
glossary.item.content =
patrick@9
   413
   label,
patrick@9
   414
   block+
patrick@9
   415
patrick@44
   416
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@44
   417
patrick@44
   418
# ~~~~~~ blockquote
Patrick@306
   419
blockquote = element blockquote { blockquote.attributes, blockquote.content }
patrick@44
   420
Patrick@306
   421
blockquote.attributes =
Patrick@306
   422
   blockquote.type.attribute?
Patrick@306
   423
blockquote.type.attribute = attribute type { xsd:NCName }
Patrick@310
   424
patrick@44
   425
blockquote.content =
patrick@44
   426
   block.head?,
patrick@44
   427
   (p | speech | \list)+,
patrick@44
   428
   attribution?
patrick@44
   429
patrick@44
   430
# ~~~~~~ attribution
patrick@72
   431
attribution = element attribution { attribution.content }
patrick@44
   432
Patrick@225
   433
attribution.content = mixed {
Patrick@225
   434
   sup* & number* & date* & name* & foreign* & acronym* & term* & literal*
Patrick@238
   435
 & highlight* & emphasis* & mentioned* & note* & warning* }
patrick@44
   436
Patrick@313
   437
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@313
   438
Patrick@313
   439
# ~~~~~~ speech
Patrick@313
   440
speech = element speech { speech.content }
Patrick@313
   441
Patrick@313
   442
speech.content =
Patrick@313
   443
   speaker?,
Patrick@313
   444
   stage?,
Patrick@313
   445
   (p | blockquote)+
Patrick@313
   446
Patrick@313
   447
# ~~~~~~ speaker
Patrick@313
   448
speaker = element speaker { speaker.content }
Patrick@313
   449
Patrick@313
   450
speaker.content = inlines
Patrick@313
   451
patrick@248
   452
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@17
   453
patrick@73
   454
# ~~~~~~ table
patrick@248
   455
table = element table { table.attributes, table.content }
patrick@248
   456
patrick@248
   457
table.attributes =
patrick@248
   458
   table.type.attribute?
patrick@248
   459
table.type.attribute = attribute type { xsd:NCName }
patrick@17
   460
patrick@17
   461
table.content =
patrick@20
   462
   block.head?,
patrick@248
   463
   thead?,
patrick@248
   464
   (tbody+ | tr+),
patrick@109
   465
   table.caption?
patrick@17
   466
patrick@248
   467
# ~~~~~~ thead, tbody
patrick@248
   468
thead = element thead { thead.content }
patrick@248
   469
tbody = element tbody { tbody.content }
patrick@17
   470
patrick@248
   471
thead.content =
patrick@248
   472
   tr+
patrick@248
   473
tbody.content =
patrick@248
   474
   tr+
patrick@17
   475
patrick@248
   476
# ~~~~~~ tr
patrick@248
   477
tr = element tr { tr.attributes, tr.content }
patrick@248
   478
patrick@248
   479
tr.attributes =
patrick@248
   480
   align.attribute?
patrick@248
   481
 & valign.attribute?
Tiphanie@309
   482
 & cell.type.attribute?
patrick@17
   483
align.attribute = attribute align { "left"  |  "right"  | "center" | "justify" }
patrick@22
   484
valign.attribute = attribute valign { "top" | "middle" | "bottom" }
Tiphanie@309
   485
cell.type.attribute = attribute type { xsd:NCName }
patrick@75
   486
patrick@248
   487
tr.content =
patrick@248
   488
   (td | th)+
patrick@17
   489
patrick@248
   490
# ~~~~~~ td, th
patrick@248
   491
td = element td { td.attributes, td.content }
patrick@248
   492
th = element th { td.attributes, td.content }
patrick@17
   493
patrick@248
   494
td.attributes =
patrick@146
   495
   align.attribute?
patrick@146
   496
 & valign.attribute?
patrick@248
   497
 & colspan.attribute?
patrick@248
   498
 & rowspan.attribute?
Tiphanie@309
   499
 & cell.type.attribute?
patrick@248
   500
colspan.attribute = attribute colspan { xsd:positiveInteger }
patrick@248
   501
rowspan.attribute = attribute rowspan { xsd:positiveInteger }
patrick@17
   502
patrick@248
   503
td.content =
patrick@17
   504
   inlines
patrick@37
   505
 | (p | media)+
patrick@17
   506
patrick@109
   507
# ~~~~~~ table.caption
patrick@109
   508
table.caption = element caption { caption.content }
patrick@17
   509
patrick@17
   510
caption.content =
patrick@20
   511
   inlines
Patrick@138
   512
 | (p | speech | \list | blockquote)+
patrick@17
   513
patrick@248
   514
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table.cals ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@248
   515
patrick@248
   516
# ~~~~~~ table.cals
patrick@248
   517
table.cals = element table { table.attributes, table.cals.content }
patrick@248
   518
patrick@248
   519
table.cals.content =
patrick@248
   520
   block.head?,
patrick@248
   521
   tgroup+,
patrick@248
   522
   table.caption?
patrick@248
   523
patrick@248
   524
# ~~~~~~ tgroup
patrick@248
   525
tgroup = element tgroup { tgroup.attributes, tgroup.content }
patrick@248
   526
patrick@248
   527
tgroup.attributes =
patrick@248
   528
   cols.attribute
patrick@248
   529
cols.attribute = attribute cols { xsd:positiveInteger }
patrick@248
   530
patrick@248
   531
tgroup.content =
patrick@248
   532
   thead.cals?,
patrick@248
   533
   tbody.cals
patrick@248
   534
patrick@248
   535
# ~~~~~~ thead, tbody
patrick@248
   536
thead.cals = element thead { thead.cals.content }
patrick@248
   537
tbody.cals = element tbody { tbody.cals.content }
patrick@248
   538
patrick@248
   539
thead.cals.content =
patrick@248
   540
   row+
patrick@248
   541
tbody.cals.content =
patrick@248
   542
   row+
patrick@248
   543
patrick@248
   544
# ~~~~~~ row
patrick@248
   545
row = element row { row.attributes, row.content }
patrick@248
   546
patrick@248
   547
row.attributes =
patrick@248
   548
   valign.attribute?
patrick@248
   549
patrick@248
   550
row.content =
patrick@248
   551
  table.cals.entry+
patrick@248
   552
patrick@248
   553
# ~~~~~~ table.cals.entry
patrick@248
   554
table.cals.entry = element entry {
patrick@248
   555
   table.cals.entry.attributes, table.cals.entry.content }
patrick@248
   556
patrick@248
   557
table.cals.entry.attributes =
patrick@248
   558
   align.attribute?
patrick@248
   559
 & valign.attribute?
patrick@248
   560
patrick@248
   561
table.cals.entry.content =
patrick@248
   562
   inlines
patrick@248
   563
 | (p | media)+
patrick@248
   564
patrick@35
   565
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   566
patrick@2
   567
# ~~~~~~ media
patrick@245
   568
media = element media { media.attributes, media.content }
patrick@245
   569
patrick@245
   570
media.attributes =
Patrick@279
   571
   xmlid.attribute?
Patrick@279
   572
 & media.type.attribute?
patrick@245
   573
media.type.attribute = attribute type { xsd:NCName }
patrick@0
   574
patrick@0
   575
media.content =
patrick@24
   576
   block.head?,
Patrick@288
   577
   (media.image | audio | video)+,
patrick@109
   578
   media.caption?,
patrick@36
   579
   link?
patrick@0
   580
patrick@2
   581
# ~~~~~~ image
Patrick@288
   582
image = element image { image.attributes }
Patrick@288
   583
media.image = element image { image.attributes, media.image.content }
patrick@0
   584
patrick@0
   585
image.attributes =
patrick@104
   586
   media.id.attribute
Patrick@312
   587
 & image.type.attribute?
Patrick@312
   588
 & alt.attribute?
patrick@17
   589
media.id.attribute = attribute id { xsd:NMTOKEN }
Patrick@312
   590
image.type.attribute = attribute type {
Patrick@312
   591
   "cover" | "thumbnail" | "icon" | "animation" }
Patrick@312
   592
alt.attribute = attribute alt { text }
patrick@0
   593
Patrick@288
   594
media.image.content =
patrick@111
   595
   copyright?,
Patrick@176
   596
   hotspot*
patrick@0
   597
patrick@45
   598
# ~~~~~~ audio
patrick@45
   599
audio = element audio { audio.attributes }
patrick@43
   600
patrick@45
   601
audio.attributes =
patrick@43
   602
   media.id.attribute
patrick@104
   603
 & audio.type?
patrick@113
   604
audio.type = attribute type { "music" | "voice" | "background" | "smil" }
patrick@43
   605
patrick@119
   606
# ~~~~~~ video
patrick@119
   607
video = element video { video.attributes }
patrick@119
   608
patrick@119
   609
video.attributes =
patrick@119
   610
   media.id.attribute
patrick@119
   611
patrick@122
   612
# ~~~~~~ hotspot
patrick@122
   613
hotspot = element hotspot { hotspot.attributes, hotspot.content }
patrick@122
   614
patrick@122
   615
hotspot.attributes =
patrick@122
   616
   x.attribute
patrick@122
   617
 & y.attribute
patrick@182
   618
 & w.attribute
Patrick@183
   619
 & h.attribute?
Patrick@236
   620
 & hotspot.display.attribute?
Patrick@237
   621
 & hotspot.type.attribute?
Patrick@191
   622
 & xmlid.attribute?
Patrick@173
   623
x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
Patrick@173
   624
y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
patrick@182
   625
w.attribute = attribute w { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
patrick@182
   626
h.attribute = attribute h { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
Patrick@236
   627
hotspot.display.attribute = attribute display { "normal" | "visible" | "pulse" }
Patrick@237
   628
hotspot.type.attribute = attribute type { xsd:NCName }
Patrick@310
   629
Patrick@191
   630
hotspot.content =
Patrick@288
   631
   ((link | p+ | image | audio | video), (spot, scenario?)?)
Patrick@191
   632
 | (spot, scenario?)
Patrick@310
   633
 | empty
Patrick@310
   634
Patrick@191
   635
# ~~~~~~ spot
Patrick@191
   636
spot = element spot { spot.attributes, spot.content }
Patrick@191
   637
Patrick@191
   638
spot.attributes =
Patrick@191
   639
   dx.attribute?
Patrick@191
   640
 & dy.attribute?
Patrick@191
   641
 & dw.attribute?
Patrick@191
   642
 & dh.attribute?
patrick@188
   643
dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
patrick@188
   644
dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
Patrick@191
   645
dw.attribute = attribute dw { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
Patrick@191
   646
dh.attribute = attribute dh { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
Patrick@191
   647
Patrick@191
   648
spot.content =
Patrick@191
   649
   ((p+ | image), audio?)
Patrick@191
   650
 | audio
Patrick@191
   651
 | video
Patrick@191
   652
patrick@109
   653
# ~~~~~~ media.caption
patrick@109
   654
media.caption = element caption { caption.attributes, caption.content }
patrick@109
   655
patrick@109
   656
caption.attributes =
patrick@109
   657
   x.attribute?
patrick@109
   658
 & y.attribute?
patrick@109
   659
Patrick@191
   660
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ scenario ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@191
   661
Patrick@191
   662
# ~~~~~~ scenario
Patrick@191
   663
scenario = element scenario { scenario.content }
Patrick@191
   664
Patrick@191
   665
scenario.content =
Patrick@191
   666
   init*,
Patrick@191
   667
   onclick*
Patrick@191
   668
Patrick@191
   669
# ~~~~~~ init
Patrick@191
   670
init = element init { init.attributes }
Patrick@191
   671
Patrick@191
   672
init.attributes =
Patrick@191
   673
   init.action.attribute
Patrick@191
   674
 & target.attribute?
Patrick@191
   675
init.action.attribute = attribute action { "hide" }
Patrick@191
   676
target.attribute = attribute target { "hotspot" | "spot" }
Patrick@191
   677
Patrick@191
   678
# ~~~~~~ onclick
Patrick@191
   679
onclick = element onclick { onclick.attributes }
Patrick@191
   680
Patrick@191
   681
onclick.attributes =
Patrick@191
   682
   onclick.action.attribute
Patrick@191
   683
 & target.attribute?
Patrick@191
   684
onclick.action.attribute = attribute action { "show" }
Patrick@191
   685
Patrick@189
   686
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bibliograpgy.entry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@189
   687
Patrick@189
   688
# ~~~~~~ bibliography.entry
Patrick@189
   689
bibliography.entry = element entry { bibliography.entry.content }
Patrick@189
   690
Patrick@189
   691
bibliography.entry.content =
Patrick@189
   692
   identifier.ean?
Patrick@189
   693
 & title
Patrick@189
   694
 & subtitle?
Patrick@189
   695
 & copyright?
Patrick@189
   696
 & collection?
Patrick@189
   697
 & contributors?
Patrick@189
   698
 & date?
Patrick@189
   699
 & place?
Patrick@189
   700
 & folio?
Patrick@189
   701
 & pages?
Patrick@189
   702
Patrick@189
   703
# ~~~~~~ folio
Patrick@189
   704
folio = element folio { folio.content }
Patrick@189
   705
Patrick@189
   706
folio.content = xsd:positiveInteger | xsd:token {pattern = "[DLXVI]+"}
Patrick@189
   707
Patrick@189
   708
# ~~~~~~ pages
Patrick@189
   709
pages = element pages { pages.content }
Patrick@189
   710
Patrick@189
   711
pages.content = xsd:positiveInteger
Patrick@189
   712
patrick@0
   713
patrick@0
   714
# =============================================================================
patrick@20
   715
#                                 INLINE LEVEL
patrick@0
   716
# =============================================================================
patrick@0
   717
patrick@0
   718
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   719
Patrick@288
   720
simple.inlines = mixed {
patrick@0
   721
   sup*
patrick@0
   722
 & sub*
patrick@42
   723
 & var*
patrick@13
   724
 & number*
patrick@42
   725
 & math*
patrick@0
   726
 & date*
patrick@0
   727
 & name*
Patrick@212
   728
 & acronym*
Patrick@212
   729
 & term*
Patrick@288
   730
 & warning*
Patrick@288
   731
}
Patrick@288
   732
Patrick@293
   733
inlines = mixed {
Patrick@293
   734
   sup*
Patrick@293
   735
 & sub*
Patrick@293
   736
 & var*
Patrick@293
   737
 & number*
Patrick@293
   738
 & math*
Patrick@293
   739
 & date*
Patrick@293
   740
 & name*
Patrick@293
   741
 & acronym*
Patrick@293
   742
 & term*
Patrick@293
   743
 & warning*
Patrick@293
   744
Patrick@212
   745
 & literal*
Patrick@288
   746
 & foreign*
Patrick@212
   747
 & highlight*
Patrick@238
   748
 & emphasis*
Patrick@212
   749
 & mentioned*
Patrick@288
   750
 & stage*
Patrick@212
   751
 & initial*
patrick@5
   752
 & quote*
patrick@93
   753
 & image*
Patrick@208
   754
 & audio*
patrick@105
   755
 & smil*
Patrick@288
   756
 & note*
Patrick@288
   757
 & link*
Patrick@288
   758
 & anchor*
Patrick@288
   759
 & index*
Patrick@293
   760
}
patrick@0
   761
patrick@42
   762
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup, var ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   763
patrick@252
   764
sup = element sup { mixed { var* & warning* } }
patrick@0
   765
patrick@252
   766
sub = element sub { mixed { var* & warning* } }
patrick@42
   767
Patrick@225
   768
var = element var { mixed { warning* } }
patrick@42
   769
patrick@90
   770
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@90
   771
patrick@90
   772
number = element number {
patrick@90
   773
   ( attribute type {"roman"}, number.attributes, number.roman.content )
patrick@90
   774
 | ( number.attributes, number.content)
patrick@90
   775
}
patrick@90
   776
patrick@90
   777
number.attributes =
patrick@90
   778
   number.value.attribute?
patrick@90
   779
number.value.attribute = attribute value { xsd:integer | xsd:decimal }
patrick@90
   780
Patrick@212
   781
number.content = mixed { sup* & warning* }
patrick@246
   782
number.roman.content = xsd:token {pattern = "[MCLXVI]+"}
patrick@90
   783
patrick@42
   784
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ math ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@42
   785
Patrick@274
   786
# ~~~~~~ math
Patrick@274
   787
math = element math { math.attributes, math.content }
patrick@42
   788
patrick@42
   789
math.attributes =
Patrick@280
   790
   xmlid.attribute?
Patrick@280
   791
 & math.display.attribute?
Patrick@274
   792
math.display.attribute = attribute display {
Patrick@272
   793
   "wide" | "numbered" | "box"  | "numbered-box" }
patrick@42
   794
Patrick@274
   795
math.content =
Patrick@274
   796
   mixed { sup* & sub* & var* & warning* }
Patrick@274
   797
 | latex
Patrick@274
   798
Patrick@274
   799
# ~~~~~~ latex
Patrick@274
   800
latex = element latex { latex.attributes, latex.content }
Patrick@274
   801
Patrick@274
   802
latex.attributes =
Patrick@274
   803
   plain.attritute?
Patrick@274
   804
plain.attritute = attribute plain { xsd:boolean }
Patrick@274
   805
Patrick@274
   806
latex.content = text
patrick@0
   807
patrick@36
   808
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   809
patrick@0
   810
date = element date { date.attributes, date.content }
patrick@0
   811
patrick@3
   812
date.attributes =
patrick@13
   813
   date.value.attribute
patrick@13
   814
 & date.of.attribute?
patrick@13
   815
date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear }
patrick@33
   816
date.of.attribute = attribute of { "birth" | "death" }
patrick@0
   817
Patrick@226
   818
date.content = mixed { sup* & number* & warning* }
patrick@0
   819
patrick@36
   820
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   821
patrick@0
   822
name = element name { name.attributes, name.content }
patrick@2
   823
patrick@2
   824
name.attributes =
patrick@2
   825
   name.of.attribute?
Patrick@226
   826
name.of.attribute = attribute of {
Patrick@226
   827
   "person" | "company" | "book" | "newspaper" | "party" | "movie"
Patrick@226
   828
 | "painting" }
patrick@0
   829
Patrick@212
   830
name.content = mixed { sup* & number* & acronym* & warning* }
Patrick@212
   831
Patrick@212
   832
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@212
   833
Patrick@212
   834
acronym = element acronym { acronym.content }
Patrick@212
   835
Patrick@212
   836
acronym.content = mixed { sup* & warning* }
Patrick@212
   837
Patrick@212
   838
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@212
   839
Patrick@212
   840
term = element term { term.content }
Patrick@212
   841
Patrick@212
   842
term.content = mixed { sup* & warning* }
Patrick@212
   843
Patrick@212
   844
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ literal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@212
   845
Patrick@212
   846
literal = element literal { literal.content }
Patrick@212
   847
patrick@253
   848
literal.content = inlines
Patrick@212
   849
Patrick@288
   850
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@212
   851
Patrick@288
   852
foreign = element foreign { foreign.attributes, foreign.content }
Patrick@212
   853
Patrick@288
   854
foreign.attributes =
Patrick@288
   855
   lang.attribute?
Patrick@288
   856
Patrick@288
   857
foreign.content = inlines
Patrick@212
   858
Patrick@212
   859
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@212
   860
Patrick@212
   861
highlight = element highlight { highlight.content }
Patrick@212
   862
Patrick@212
   863
highlight.content = inlines
Patrick@212
   864
Patrick@238
   865
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ emphasis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@238
   866
Patrick@238
   867
emphasis = element emphasis { emphasis.content }
Patrick@238
   868
Patrick@238
   869
emphasis.content = inlines
Patrick@238
   870
Patrick@212
   871
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@212
   872
Patrick@212
   873
mentioned = element mentioned { mentioned.content }
Patrick@212
   874
Patrick@212
   875
mentioned.content = inlines
Patrick@212
   876
Patrick@288
   877
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ stage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@288
   878
Patrick@288
   879
stage = element stage { stage.content }
Patrick@288
   880
Patrick@288
   881
stage.content = inlines
Patrick@288
   882
Patrick@212
   883
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ initial ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@212
   884
Patrick@212
   885
initial = element initial { initial.content }
Patrick@212
   886
Patrick@212
   887
initial.content =
Patrick@288
   888
   initial.c,
Patrick@288
   889
   initial.w?
Patrick@212
   890
Patrick@288
   891
initial.c = element c { text }
Patrick@288
   892
initial.w = element w { inlines }
patrick@91
   893
patrick@36
   894
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@5
   895
patrick@5
   896
quote = element quote { quote.content }
patrick@5
   897
patrick@131
   898
quote.content =
patrick@131
   899
   (phrase, attribution) | inlines
patrick@131
   900
patrick@131
   901
phrase = element phrase { phrase.content }
patrick@131
   902
patrick@131
   903
phrase.content = inlines
patrick@5
   904
patrick@105
   905
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ smil ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@105
   906
patrick@105
   907
smil = element smil { smil.attributes, smil.content }
patrick@105
   908
patrick@105
   909
smil.attributes =
Patrick@207
   910
   audio.attribute?
Patrick@207
   911
 & begin.attribute?
patrick@105
   912
 & end.attribute?
Patrick@207
   913
audio.attribute = attribute audio { xsd:anyURI }
patrick@105
   914
begin.attribute = attribute begin { xsd:decimal }
patrick@105
   915
end.attribute = attribute end { xsd:decimal }
patrick@105
   916
patrick@105
   917
smil.content = inlines
Patrick@205
   918
Patrick@288
   919
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@288
   920
Patrick@288
   921
note = element note { note.attributes, note.content }
Patrick@288
   922
Patrick@288
   923
note.attributes =
Patrick@288
   924
   note.label.attribute?
Patrick@288
   925
note.label.attribute = attribute label { text }
Patrick@288
   926
Patrick@288
   927
note.content =
Patrick@288
   928
   (note.w?, block+)
Patrick@288
   929
 | inlines
Patrick@288
   930
Patrick@288
   931
note.w = element w { inlines }
Patrick@288
   932
Patrick@288
   933
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@288
   934
Patrick@288
   935
link = element link { link.attributes, link.content }
Patrick@288
   936
Patrick@288
   937
link.attributes =
Patrick@288
   938
   (uri.attribute | idref.attribute)
Patrick@288
   939
uri.attribute = attribute uri { xsd:anyURI }
Patrick@288
   940
idref.attribute = attribute idref { xsd:IDREF }
Patrick@288
   941
Patrick@288
   942
link.content = simple.inlines
Patrick@288
   943
Patrick@288
   944
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ anchor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@288
   945
Patrick@288
   946
anchor = element anchor { anchor.attributes, anchor.content }
Patrick@288
   947
Patrick@288
   948
anchor.attributes =
Patrick@288
   949
   anchor.id.attribute
Patrick@288
   950
anchor.id.attribute = attribute xml:id { xsd:ID }
Patrick@288
   951
Patrick@288
   952
anchor.content = simple.inlines
Patrick@288
   953
Patrick@205
   954
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@205
   955
Patrick@285
   956
warning = element warning { warning.attributes, warning.content }
Patrick@285
   957
Patrick@285
   958
warning.attributes =
Patrick@285
   959
   warning.type.attribute?
Patrick@285
   960
warning.type.attribute = attribute type { xsd:NCName }
Patrick@205
   961
Patrick@231
   962
warning.content = inlines