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