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