RelaxNG/publidoc.rnc
author Patrick PIERRE
lun., 02 mars 2015 13:24:14 +0100
changeset 363 1b39a8fc339f
parent 358 73f2c224e7d7
child 364 1479d96b7f5f
permissions -rw-r--r--
Ajout annotation
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@363
   384
 & annotation*
patrick@90
   385
Patrick@310
   386
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@310
   387
Patrick@313
   388
block = (p | \list | blockquote | speech | table | table.cals | media)
Patrick@310
   389
patrick@42
   390
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   391
patrick@20
   392
p = element p { p.content }
patrick@0
   393
patrick@20
   394
p.content =
patrick@0
   395
   inlines
patrick@0
   396
patrick@17
   397
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@9
   398
patrick@9
   399
# ~~~~~~ list
patrick@75
   400
\list = element list {
patrick@20
   401
   block.head?,
patrick@71
   402
   (  (attribute type {"ordered"}?, item, item+)
patrick@9
   403
    | (attribute type {"glossary"}, glossary.item+) )
patrick@75
   404
}
patrick@9
   405
patrick@9
   406
# ~~~~~~ item
patrick@9
   407
item = element item { item.content }
patrick@9
   408
patrick@30
   409
item.content =
patrick@73
   410
   inlines
patrick@73
   411
 | block+
patrick@9
   412
patrick@9
   413
# ~~~~~~ glossary.item
patrick@9
   414
glossary.item = element item { glossary.item.content }
patrick@9
   415
patrick@9
   416
glossary.item.content =
patrick@9
   417
   label,
patrick@9
   418
   block+
patrick@9
   419
patrick@44
   420
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ blockquote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@44
   421
patrick@44
   422
# ~~~~~~ blockquote
Patrick@306
   423
blockquote = element blockquote { blockquote.attributes, blockquote.content }
patrick@44
   424
Patrick@306
   425
blockquote.attributes =
Patrick@306
   426
   blockquote.type.attribute?
Patrick@306
   427
blockquote.type.attribute = attribute type { xsd:NCName }
Patrick@310
   428
patrick@44
   429
blockquote.content =
patrick@44
   430
   block.head?,
patrick@44
   431
   (p | speech | \list)+,
patrick@44
   432
   attribution?
patrick@44
   433
patrick@44
   434
# ~~~~~~ attribution
patrick@72
   435
attribution = element attribution { attribution.content }
patrick@44
   436
Patrick@225
   437
attribution.content = mixed {
Patrick@225
   438
   sup* & number* & date* & name* & foreign* & acronym* & term* & literal*
Patrick@238
   439
 & highlight* & emphasis* & mentioned* & note* & warning* }
patrick@44
   440
Patrick@313
   441
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@313
   442
Patrick@313
   443
# ~~~~~~ speech
Patrick@313
   444
speech = element speech { speech.content }
Patrick@313
   445
Patrick@313
   446
speech.content =
Patrick@313
   447
   speaker?,
Patrick@313
   448
   stage?,
Patrick@313
   449
   (p | blockquote)+
Patrick@313
   450
Patrick@313
   451
# ~~~~~~ speaker
Patrick@313
   452
speaker = element speaker { speaker.content }
Patrick@313
   453
Patrick@313
   454
speaker.content = inlines
Patrick@313
   455
patrick@248
   456
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@17
   457
patrick@73
   458
# ~~~~~~ table
patrick@248
   459
table = element table { table.attributes, table.content }
patrick@248
   460
patrick@248
   461
table.attributes =
patrick@248
   462
   table.type.attribute?
patrick@248
   463
table.type.attribute = attribute type { xsd:NCName }
patrick@17
   464
patrick@17
   465
table.content =
patrick@20
   466
   block.head?,
Patrick@358
   467
   ((thead?, tbody+) | tr+),
patrick@109
   468
   table.caption?
patrick@17
   469
patrick@248
   470
# ~~~~~~ thead, tbody
patrick@248
   471
thead = element thead { thead.content }
patrick@248
   472
tbody = element tbody { tbody.content }
patrick@17
   473
patrick@248
   474
thead.content =
patrick@248
   475
   tr+
patrick@248
   476
tbody.content =
patrick@248
   477
   tr+
patrick@17
   478
patrick@248
   479
# ~~~~~~ tr
patrick@248
   480
tr = element tr { tr.attributes, tr.content }
patrick@248
   481
patrick@248
   482
tr.attributes =
patrick@248
   483
   align.attribute?
patrick@248
   484
 & valign.attribute?
Tiphanie@309
   485
 & cell.type.attribute?
patrick@17
   486
align.attribute = attribute align { "left"  |  "right"  | "center" | "justify" }
patrick@22
   487
valign.attribute = attribute valign { "top" | "middle" | "bottom" }
Tiphanie@309
   488
cell.type.attribute = attribute type { xsd:NCName }
patrick@75
   489
patrick@248
   490
tr.content =
patrick@248
   491
   (td | th)+
patrick@17
   492
patrick@248
   493
# ~~~~~~ td, th
patrick@248
   494
td = element td { td.attributes, td.content }
patrick@248
   495
th = element th { td.attributes, td.content }
patrick@17
   496
patrick@248
   497
td.attributes =
patrick@146
   498
   align.attribute?
patrick@146
   499
 & valign.attribute?
patrick@248
   500
 & colspan.attribute?
patrick@248
   501
 & rowspan.attribute?
Tiphanie@309
   502
 & cell.type.attribute?
patrick@248
   503
colspan.attribute = attribute colspan { xsd:positiveInteger }
patrick@248
   504
rowspan.attribute = attribute rowspan { xsd:positiveInteger }
patrick@17
   505
patrick@248
   506
td.content =
patrick@17
   507
   inlines
patrick@37
   508
 | (p | media)+
patrick@17
   509
patrick@109
   510
# ~~~~~~ table.caption
patrick@109
   511
table.caption = element caption { caption.content }
patrick@17
   512
patrick@17
   513
caption.content =
patrick@20
   514
   inlines
Patrick@138
   515
 | (p | speech | \list | blockquote)+
patrick@17
   516
patrick@248
   517
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table.cals ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@248
   518
patrick@248
   519
# ~~~~~~ table.cals
patrick@248
   520
table.cals = element table { table.attributes, table.cals.content }
patrick@248
   521
patrick@248
   522
table.cals.content =
patrick@248
   523
   block.head?,
patrick@248
   524
   tgroup+,
patrick@248
   525
   table.caption?
patrick@248
   526
patrick@248
   527
# ~~~~~~ tgroup
patrick@248
   528
tgroup = element tgroup { tgroup.attributes, tgroup.content }
patrick@248
   529
patrick@248
   530
tgroup.attributes =
patrick@248
   531
   cols.attribute
patrick@248
   532
cols.attribute = attribute cols { xsd:positiveInteger }
patrick@248
   533
patrick@248
   534
tgroup.content =
patrick@248
   535
   thead.cals?,
patrick@248
   536
   tbody.cals
patrick@248
   537
patrick@248
   538
# ~~~~~~ thead, tbody
patrick@248
   539
thead.cals = element thead { thead.cals.content }
patrick@248
   540
tbody.cals = element tbody { tbody.cals.content }
patrick@248
   541
patrick@248
   542
thead.cals.content =
patrick@248
   543
   row+
patrick@248
   544
tbody.cals.content =
patrick@248
   545
   row+
patrick@248
   546
patrick@248
   547
# ~~~~~~ row
patrick@248
   548
row = element row { row.attributes, row.content }
patrick@248
   549
patrick@248
   550
row.attributes =
patrick@248
   551
   valign.attribute?
patrick@248
   552
patrick@248
   553
row.content =
patrick@248
   554
  table.cals.entry+
patrick@248
   555
patrick@248
   556
# ~~~~~~ table.cals.entry
patrick@248
   557
table.cals.entry = element entry {
patrick@248
   558
   table.cals.entry.attributes, table.cals.entry.content }
patrick@248
   559
patrick@248
   560
table.cals.entry.attributes =
patrick@248
   561
   align.attribute?
patrick@248
   562
 & valign.attribute?
patrick@248
   563
patrick@248
   564
table.cals.entry.content =
patrick@248
   565
   inlines
patrick@248
   566
 | (p | media)+
patrick@248
   567
patrick@35
   568
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   569
patrick@2
   570
# ~~~~~~ media
patrick@245
   571
media = element media { media.attributes, media.content }
patrick@245
   572
patrick@245
   573
media.attributes =
Patrick@279
   574
   xmlid.attribute?
Patrick@279
   575
 & media.type.attribute?
patrick@245
   576
media.type.attribute = attribute type { xsd:NCName }
patrick@0
   577
patrick@0
   578
media.content =
patrick@24
   579
   block.head?,
Patrick@288
   580
   (media.image | audio | video)+,
patrick@109
   581
   media.caption?,
patrick@36
   582
   link?
patrick@0
   583
patrick@2
   584
# ~~~~~~ image
Patrick@288
   585
image = element image { image.attributes }
Patrick@288
   586
media.image = element image { image.attributes, media.image.content }
patrick@0
   587
patrick@0
   588
image.attributes =
patrick@104
   589
   media.id.attribute
Patrick@312
   590
 & image.type.attribute?
Patrick@312
   591
 & alt.attribute?
patrick@17
   592
media.id.attribute = attribute id { xsd:NMTOKEN }
Patrick@312
   593
image.type.attribute = attribute type {
Patrick@312
   594
   "cover" | "thumbnail" | "icon" | "animation" }
Patrick@312
   595
alt.attribute = attribute alt { text }
patrick@0
   596
Patrick@288
   597
media.image.content =
patrick@111
   598
   copyright?,
Patrick@176
   599
   hotspot*
patrick@0
   600
patrick@45
   601
# ~~~~~~ audio
patrick@45
   602
audio = element audio { audio.attributes }
patrick@43
   603
patrick@45
   604
audio.attributes =
patrick@43
   605
   media.id.attribute
patrick@104
   606
 & audio.type?
patrick@113
   607
audio.type = attribute type { "music" | "voice" | "background" | "smil" }
patrick@43
   608
patrick@119
   609
# ~~~~~~ video
patrick@119
   610
video = element video { video.attributes }
patrick@119
   611
patrick@119
   612
video.attributes =
patrick@119
   613
   media.id.attribute
patrick@119
   614
patrick@122
   615
# ~~~~~~ hotspot
patrick@122
   616
hotspot = element hotspot { hotspot.attributes, hotspot.content }
patrick@122
   617
patrick@122
   618
hotspot.attributes =
patrick@122
   619
   x.attribute
patrick@122
   620
 & y.attribute
patrick@182
   621
 & w.attribute
Patrick@183
   622
 & h.attribute?
Patrick@236
   623
 & hotspot.display.attribute?
Patrick@237
   624
 & hotspot.type.attribute?
Patrick@191
   625
 & xmlid.attribute?
Patrick@173
   626
x.attribute = attribute x { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
Patrick@173
   627
y.attribute = attribute y { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
patrick@182
   628
w.attribute = attribute w { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
patrick@182
   629
h.attribute = attribute h { xsd:token {pattern = "\d{1,2}(\.\d{1,2})?%"} }
Patrick@236
   630
hotspot.display.attribute = attribute display { "normal" | "visible" | "pulse" }
Patrick@237
   631
hotspot.type.attribute = attribute type { xsd:NCName }
Patrick@310
   632
Patrick@191
   633
hotspot.content =
Patrick@288
   634
   ((link | p+ | image | audio | video), (spot, scenario?)?)
Patrick@191
   635
 | (spot, scenario?)
Patrick@310
   636
 | empty
Patrick@310
   637
Patrick@191
   638
# ~~~~~~ spot
Patrick@191
   639
spot = element spot { spot.attributes, spot.content }
Patrick@191
   640
Patrick@191
   641
spot.attributes =
Patrick@191
   642
   dx.attribute?
Patrick@191
   643
 & dy.attribute?
Patrick@191
   644
 & dw.attribute?
Patrick@191
   645
 & dh.attribute?
patrick@188
   646
dx.attribute = attribute dx { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
patrick@188
   647
dy.attribute = attribute dy { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
Patrick@191
   648
dw.attribute = attribute dw { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
Patrick@191
   649
dh.attribute = attribute dh { xsd:token {pattern = "-?\d{1,2}(\.\d{1,2})?%"} }
Patrick@191
   650
Patrick@191
   651
spot.content =
Patrick@191
   652
   ((p+ | image), audio?)
Patrick@191
   653
 | audio
Patrick@191
   654
 | video
Patrick@191
   655
patrick@109
   656
# ~~~~~~ media.caption
patrick@109
   657
media.caption = element caption { caption.attributes, caption.content }
patrick@109
   658
patrick@109
   659
caption.attributes =
patrick@109
   660
   x.attribute?
patrick@109
   661
 & y.attribute?
patrick@109
   662
Patrick@191
   663
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ scenario ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@191
   664
Patrick@191
   665
# ~~~~~~ scenario
Patrick@191
   666
scenario = element scenario { scenario.content }
Patrick@191
   667
Patrick@191
   668
scenario.content =
Patrick@191
   669
   init*,
Patrick@191
   670
   onclick*
Patrick@191
   671
Patrick@191
   672
# ~~~~~~ init
Patrick@191
   673
init = element init { init.attributes }
Patrick@191
   674
Patrick@191
   675
init.attributes =
Patrick@191
   676
   init.action.attribute
Patrick@191
   677
 & target.attribute?
Patrick@191
   678
init.action.attribute = attribute action { "hide" }
Patrick@191
   679
target.attribute = attribute target { "hotspot" | "spot" }
Patrick@191
   680
Patrick@191
   681
# ~~~~~~ onclick
Patrick@191
   682
onclick = element onclick { onclick.attributes }
Patrick@191
   683
Patrick@191
   684
onclick.attributes =
Patrick@191
   685
   onclick.action.attribute
Patrick@191
   686
 & target.attribute?
Patrick@191
   687
onclick.action.attribute = attribute action { "show" }
Patrick@191
   688
Patrick@189
   689
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bibliograpgy.entry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@189
   690
Patrick@189
   691
# ~~~~~~ bibliography.entry
Patrick@189
   692
bibliography.entry = element entry { bibliography.entry.content }
Patrick@189
   693
Patrick@189
   694
bibliography.entry.content =
Patrick@189
   695
   identifier.ean?
Patrick@189
   696
 & title
Patrick@189
   697
 & subtitle?
Patrick@189
   698
 & copyright?
Patrick@189
   699
 & collection?
Patrick@189
   700
 & contributors?
Patrick@189
   701
 & date?
Patrick@189
   702
 & place?
Patrick@189
   703
 & folio?
Patrick@189
   704
 & pages?
Patrick@189
   705
Patrick@189
   706
# ~~~~~~ folio
Patrick@189
   707
folio = element folio { folio.content }
Patrick@189
   708
Patrick@189
   709
folio.content = xsd:positiveInteger | xsd:token {pattern = "[DLXVI]+"}
Patrick@189
   710
Patrick@189
   711
# ~~~~~~ pages
Patrick@189
   712
pages = element pages { pages.content }
Patrick@189
   713
Patrick@189
   714
pages.content = xsd:positiveInteger
Patrick@189
   715
patrick@0
   716
patrick@0
   717
# =============================================================================
patrick@20
   718
#                                 INLINE LEVEL
patrick@0
   719
# =============================================================================
patrick@0
   720
patrick@0
   721
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   722
Patrick@288
   723
simple.inlines = mixed {
patrick@0
   724
   sup*
patrick@0
   725
 & sub*
patrick@42
   726
 & var*
patrick@13
   727
 & number*
Patrick@212
   728
 & acronym*
Patrick@288
   729
 & warning*
Patrick@288
   730
}
Patrick@288
   731
Patrick@293
   732
inlines = mixed {
Patrick@293
   733
   sup*
Patrick@293
   734
 & sub*
Patrick@293
   735
 & var*
Patrick@293
   736
 & number*
Patrick@293
   737
 & acronym*
Patrick@293
   738
 & warning*
Patrick@293
   739
Patrick@212
   740
 & highlight*
Patrick@238
   741
 & emphasis*
Patrick@212
   742
 & mentioned*
Patrick@350
   743
 & literal*
Patrick@350
   744
 & term*
Patrick@288
   745
 & stage*
Patrick@350
   746
 & name*
Patrick@350
   747
 & foreign*
Patrick@350
   748
 & date*
Patrick@350
   749
 & math*
Patrick@351
   750
 & quote*
Patrick@212
   751
 & initial*
Patrick@288
   752
 & note*
Patrick@288
   753
 & link*
Patrick@288
   754
 & anchor*
Patrick@288
   755
 & index*
Patrick@351
   756
 & image*
Patrick@351
   757
 & audio*
Patrick@351
   758
 & smil*
Patrick@293
   759
}
patrick@0
   760
patrick@42
   761
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup, var ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   762
patrick@252
   763
sup = element sup { mixed { var* & warning* } }
patrick@0
   764
patrick@252
   765
sub = element sub { mixed { var* & warning* } }
patrick@42
   766
Patrick@225
   767
var = element var { mixed { warning* } }
patrick@42
   768
patrick@90
   769
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@90
   770
patrick@90
   771
number = element number {
patrick@90
   772
   ( attribute type {"roman"}, number.attributes, number.roman.content )
patrick@90
   773
 | ( number.attributes, number.content)
patrick@90
   774
}
patrick@90
   775
patrick@90
   776
number.attributes =
patrick@90
   777
   number.value.attribute?
patrick@90
   778
number.value.attribute = attribute value { xsd:integer | xsd:decimal }
patrick@90
   779
Patrick@212
   780
number.content = mixed { sup* & warning* }
patrick@246
   781
number.roman.content = xsd:token {pattern = "[MCLXVI]+"}
patrick@90
   782
Patrick@350
   783
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@350
   784
Patrick@350
   785
acronym = element acronym { acronym.content }
Patrick@350
   786
Patrick@350
   787
acronym.content = mixed { sup* & warning* }
Patrick@350
   788
Patrick@350
   789
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@350
   790
Patrick@350
   791
highlight = element highlight { highlight.content }
Patrick@350
   792
Patrick@350
   793
highlight.content = inlines
Patrick@350
   794
Patrick@350
   795
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ emphasis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@350
   796
Patrick@350
   797
emphasis = element emphasis { emphasis.content }
Patrick@350
   798
Patrick@350
   799
emphasis.content = inlines
Patrick@350
   800
Patrick@350
   801
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@350
   802
Patrick@350
   803
mentioned = element mentioned { mentioned.content }
Patrick@350
   804
Patrick@350
   805
mentioned.content = inlines
Patrick@350
   806
Patrick@350
   807
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ literal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@350
   808
Patrick@350
   809
literal = element literal { literal.content }
Patrick@350
   810
Patrick@350
   811
literal.content = inlines
Patrick@350
   812
Patrick@350
   813
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@350
   814
Patrick@350
   815
term = element term { term.content }
Patrick@350
   816
Patrick@350
   817
term.content = mixed { sup* & warning* }
Patrick@350
   818
Patrick@350
   819
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ stage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@350
   820
Patrick@350
   821
stage = element stage { stage.content }
Patrick@350
   822
Patrick@350
   823
stage.content = inlines
Patrick@350
   824
Patrick@350
   825
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@350
   826
Patrick@350
   827
name = element name { name.attributes, name.content }
Patrick@350
   828
Patrick@350
   829
name.attributes =
Patrick@350
   830
   name.of.attribute?
Patrick@350
   831
name.of.attribute = attribute of {
Patrick@350
   832
   "person" | "company" | "book" | "newspaper" | "party" | "movie"
Patrick@350
   833
 | "painting" }
Patrick@350
   834
Patrick@350
   835
name.content = mixed { sup* & number* & acronym* & warning* }
Patrick@350
   836
Patrick@350
   837
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@350
   838
Patrick@350
   839
foreign = element foreign { foreign.attributes, foreign.content }
Patrick@350
   840
Patrick@350
   841
foreign.attributes =
Patrick@350
   842
   lang.attribute?
Patrick@350
   843
Patrick@350
   844
foreign.content = inlines
Patrick@350
   845
Patrick@350
   846
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@350
   847
Patrick@350
   848
date = element date { date.attributes, date.content }
Patrick@350
   849
Patrick@350
   850
date.attributes =
Patrick@350
   851
   date.value.attribute
Patrick@350
   852
 & date.of.attribute?
Patrick@350
   853
date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear }
Patrick@350
   854
date.of.attribute = attribute of { "birth" | "death" }
Patrick@350
   855
Patrick@350
   856
date.content = mixed { sup* & number* & warning* }
Patrick@350
   857
patrick@42
   858
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ math ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@42
   859
Patrick@274
   860
# ~~~~~~ math
Patrick@274
   861
math = element math { math.attributes, math.content }
patrick@42
   862
patrick@42
   863
math.attributes =
Patrick@280
   864
   xmlid.attribute?
Patrick@280
   865
 & math.display.attribute?
Patrick@274
   866
math.display.attribute = attribute display {
Patrick@272
   867
   "wide" | "numbered" | "box"  | "numbered-box" }
patrick@42
   868
Patrick@274
   869
math.content =
Patrick@274
   870
   mixed { sup* & sub* & var* & warning* }
Patrick@274
   871
 | latex
Patrick@274
   872
Patrick@274
   873
# ~~~~~~ latex
Patrick@274
   874
latex = element latex { latex.attributes, latex.content }
Patrick@274
   875
Patrick@274
   876
latex.attributes =
Patrick@274
   877
   plain.attritute?
Patrick@274
   878
plain.attritute = attribute plain { xsd:boolean }
Patrick@274
   879
Patrick@274
   880
latex.content = text
patrick@0
   881
patrick@36
   882
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@5
   883
patrick@5
   884
quote = element quote { quote.content }
patrick@5
   885
patrick@131
   886
quote.content =
patrick@131
   887
   (phrase, attribution) | inlines
patrick@131
   888
patrick@131
   889
phrase = element phrase { phrase.content }
patrick@131
   890
patrick@131
   891
phrase.content = inlines
patrick@5
   892
Patrick@351
   893
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ initial ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@105
   894
Patrick@351
   895
initial = element initial { initial.content }
patrick@105
   896
Patrick@351
   897
initial.content =
Patrick@351
   898
   initial.c,
Patrick@351
   899
   initial.w?
patrick@105
   900
Patrick@351
   901
initial.c = element c { text }
Patrick@351
   902
initial.w = element w { inlines }
Patrick@205
   903
Patrick@288
   904
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@288
   905
Patrick@288
   906
note = element note { note.attributes, note.content }
Patrick@288
   907
Patrick@288
   908
note.attributes =
Patrick@288
   909
   note.label.attribute?
Patrick@288
   910
note.label.attribute = attribute label { text }
Patrick@288
   911
Patrick@288
   912
note.content =
Patrick@288
   913
   (note.w?, block+)
Patrick@288
   914
 | inlines
Patrick@288
   915
Patrick@288
   916
note.w = element w { inlines }
Patrick@288
   917
Patrick@288
   918
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@288
   919
Patrick@288
   920
link = element link { link.attributes, link.content }
Patrick@288
   921
Patrick@288
   922
link.attributes =
Patrick@288
   923
   (uri.attribute | idref.attribute)
Patrick@288
   924
uri.attribute = attribute uri { xsd:anyURI }
Patrick@288
   925
idref.attribute = attribute idref { xsd:IDREF }
Patrick@288
   926
Patrick@288
   927
link.content = simple.inlines
Patrick@288
   928
Patrick@288
   929
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ anchor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@288
   930
Patrick@288
   931
anchor = element anchor { anchor.attributes, anchor.content }
Patrick@288
   932
Patrick@288
   933
anchor.attributes =
Patrick@288
   934
   anchor.id.attribute
Patrick@288
   935
anchor.id.attribute = attribute xml:id { xsd:ID }
Patrick@288
   936
Patrick@288
   937
anchor.content = simple.inlines
Patrick@288
   938
Patrick@351
   939
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ smil ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@351
   940
Patrick@351
   941
smil = element smil { smil.attributes, smil.content }
Patrick@351
   942
Patrick@351
   943
smil.attributes =
Patrick@351
   944
   audio.attribute?
Patrick@351
   945
 & begin.attribute?
Patrick@351
   946
 & end.attribute?
Patrick@351
   947
audio.attribute = attribute audio { xsd:anyURI }
Patrick@351
   948
begin.attribute = attribute begin { xsd:decimal }
Patrick@351
   949
end.attribute = attribute end { xsd:decimal }
Patrick@351
   950
Patrick@351
   951
smil.content = inlines
Patrick@351
   952
Patrick@205
   953
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ warning ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Patrick@205
   954
Patrick@285
   955
warning = element warning { warning.attributes, warning.content }
Patrick@285
   956
Patrick@285
   957
warning.attributes =
Patrick@285
   958
   warning.type.attribute?
Patrick@285
   959
warning.type.attribute = attribute type { xsd:NCName }
Patrick@205
   960
Patrick@231
   961
warning.content = inlines