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