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