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