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