RelaxNG/publidoc.rnc
author Patrick PIERRE <patrick.pierre@prismallia.fr>
mar., 19 juil. 2011 13:25:35 +0200
changeset 36 d23cfb7be79e
parent 35 de4114d12ef1
child 37 83b7ec3c3132
permissions -rw-r--r--
<cover> + lien sur médias
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@20
    21
#                                  TOP LEVEL
patrick@0
    22
# =============================================================================
patrick@0
    23
patrick@0
    24
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ document ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
    25
patrick@0
    26
document = element document { document.attributes, document.content }
patrick@0
    27
patrick@0
    28
document.attributes =
patrick@0
    29
   document.id.attribute
patrick@0
    30
document.id.attribute = attribute xml:id { xsd:ID }
patrick@0
    31
patrick@0
    32
document.content =
patrick@20
    33
   top.head?,
patrick@0
    34
   (division+ | topic+)
patrick@0
    35
patrick@0
    36
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
    37
patrick@18
    38
top.topic = element topic { top.topic.attributes, top.topic.content }
patrick@0
    39
patrick@20
    40
top.topic.attributes =
patrick@20
    41
   topic.id.attribute
patrick@20
    42
 & topic.type.attribute?
patrick@20
    43
topic.id.attribute = attribute xml:id { xsd:ID }
patrick@20
    44
topic.type.attribute = attribute type { xsd:NCName }
patrick@20
    45
patrick@20
    46
top.topic.content =
patrick@20
    47
   top.head?,
patrick@20
    48
   section+
patrick@0
    49
patrick@0
    50
# =============================================================================
patrick@20
    51
#                                 HEAD LEVEL
patrick@0
    52
# =============================================================================
patrick@0
    53
patrick@20
    54
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
    55
patrick@20
    56
top.head = element head { top.head.content }
patrick@20
    57
division.head = element head { division.head.content }
patrick@20
    58
component.head = element head { component.head.content }
patrick@20
    59
section.head = element head { section.head.content }
patrick@20
    60
block.head = element head { block.head.content }
patrick@0
    61
patrick@20
    62
top.head.content =
patrick@18
    63
   (title, subtitle?)?
patrick@34
    64
 & identifier*
patrick@18
    65
 & language?
patrick@0
    66
 & author*
patrick@0
    67
 & publisher?
patrick@0
    68
 & date?
patrick@0
    69
 & place?
patrick@0
    70
 & source*
patrick@0
    71
 & subjectset?
patrick@0
    72
 & abstract?
patrick@35
    73
 & cover?
patrick@0
    74
 & annotation*
patrick@20
    75
division.head.content =
patrick@18
    76
   (title, subtitle?)?
patrick@18
    77
 & language?
patrick@18
    78
 & annotation*
patrick@20
    79
component.head.content =
patrick@18
    80
   (title, subtitle?)?
patrick@18
    81
 & language?
patrick@18
    82
 & author*
patrick@18
    83
 & annotation*
patrick@20
    84
section.head.content =
patrick@18
    85
   (title, subtitle?)?
patrick@18
    86
 & language?
patrick@18
    87
 & annotation*
patrick@20
    88
block.head.content =
patrick@20
    89
   (title, subtitle?)?
patrick@0
    90
patrick@0
    91
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
    92
patrick@0
    93
title = element title { title.content }
patrick@18
    94
subtitle = element subtitle { title.content }
patrick@2
    95
patrick@0
    96
title.content = inlines
patrick@0
    97
patrick@34
    98
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@34
    99
patrick@34
   100
identifier = element identifier { identifier.content, identifier.attributes }
patrick@34
   101
patrick@34
   102
identifier.attributes =
patrick@34
   103
   class.attribute
patrick@34
   104
class.attribute = attribute class { "uri" | "ean" }
patrick@34
   105
patrick@34
   106
identifier.content =  xsd:anyURI | xsd:NMTOKEN
patrick@34
   107
patrick@18
   108
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@18
   109
patrick@18
   110
language = element language { language.attributes }
patrick@18
   111
patrick@34
   112
language.attributes =
patrick@34
   113
   lang.attribute
patrick@18
   114
lang.attribute = attribute xml:lang { xsd:language }
patrick@0
   115
patrick@0
   116
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   117
patrick@5
   118
# ~~~~~~ author
patrick@0
   119
author = element author { author.content }
patrick@0
   120
patrick@33
   121
author.attributes =
patrick@33
   122
   role.attribute?
patrick@33
   123
role.attribute = attribute role { "author" | "illustrator" }
patrick@33
   124
patrick@0
   125
author.content =
patrick@0
   126
   firstname?,
patrick@33
   127
   lastname,
patrick@33
   128
   role*
patrick@33
   129
patrick@5
   130
# ~~~~~~ publisher
patrick@0
   131
publisher = element publisher { publisher.content }
patrick@0
   132
patrick@34
   133
publisher.content =
patrick@34
   134
   label,
patrick@36
   135
   link?
patrick@0
   136
patrick@5
   137
# ~~~~~~ firstname
patrick@5
   138
firstname = element firstname { firstname.content }
patrick@5
   139
patrick@5
   140
firstname.content = inlines
patrick@5
   141
patrick@5
   142
# ~~~~~~ lastname
patrick@5
   143
lastname = element lastname { lastname.content }
patrick@5
   144
patrick@5
   145
lastname.content = inlines
patrick@5
   146
patrick@34
   147
# ~~~~~~ label
patrick@34
   148
label = element label { label.content }
patrick@34
   149
patrick@34
   150
label.content = inlines
patrick@34
   151
patrick@34
   152
# ~~~~~~ role
patrick@34
   153
role = element role { role.attributes }
patrick@34
   154
patrick@34
   155
role.attributes =
patrick@34
   156
   role.of.attribute
patrick@34
   157
role.of.attribute = attribute of { "author" | "illustrator" }
patrick@34
   158
patrick@2
   159
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@2
   160
patrick@2
   161
place = element place { place.content }
patrick@2
   162
patrick@2
   163
place.content = inlines
patrick@2
   164
patrick@0
   165
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   166
patrick@2
   167
# ~~~~~~ source
patrick@0
   168
source = element source {
patrick@0
   169
   source.attributes,
patrick@0
   170
   (  (attribute type { "book" }, source.content.book)
patrick@0
   171
    | (attribute type { "file" })),
patrick@0
   172
   source.content
patrick@0
   173
}
patrick@0
   174
patrick@0
   175
source.attributes =
patrick@0
   176
   source.id.attribute
patrick@0
   177
source.id.attribute = attribute id { xsd:NMTOKEN }
patrick@0
   178
patrick@0
   179
source.content.book =
patrick@0
   180
   title,
patrick@0
   181
   pagenumber*
patrick@0
   182
source.content =
patrick@0
   183
   annotation*
patrick@0
   184
patrick@2
   185
# ~~~~~~ pagenumber
patrick@0
   186
pagenumber = element pagenumber { pagenumber.attributes }
patrick@2
   187
patrick@0
   188
pagenumber.attributes =
patrick@0
   189
   pagenumber.value.attribute
patrick@33
   190
pagenumber.value.attribute = attribute value { xsd:positiveInteger }
patrick@0
   191
patrick@0
   192
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   193
patrick@2
   194
# ~~~~~~ subjectset
patrick@0
   195
subjectset = element subjectset { subjectset.content }
patrick@0
   196
patrick@0
   197
subjectset.content = subject+
patrick@0
   198
patrick@2
   199
# ~~~~~~ subject
patrick@0
   200
subject = element subject { subject.attributes }
patrick@2
   201
patrick@0
   202
subject.attributes =
patrick@0
   203
   subject.id.attribute
patrick@0
   204
subject.id.attribute = attribute id { xsd:NMTOKEN }
patrick@0
   205
patrick@5
   206
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@2
   207
patrick@2
   208
abstract = element abstract { abstract.content }
patrick@2
   209
patrick@2
   210
abstract.content =
patrick@20
   211
   p+
patrick@2
   212
patrick@35
   213
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@35
   214
patrick@35
   215
cover = element cover { cover.content }
patrick@35
   216
patrick@35
   217
cover.content =
patrick@35
   218
   cover.image
patrick@35
   219
patrick@35
   220
cover.image = element image { cover.image.attributes }
patrick@35
   221
patrick@35
   222
cover.image.attributes =
patrick@35
   223
   cover.image.id.attribute
patrick@35
   224
cover.image.id.attribute = attribute id { xsd:NMTOKEN }
patrick@35
   225
patrick@0
   226
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   227
patrick@0
   228
annotation = element annotation { annotation.content }
patrick@0
   229
patrick@0
   230
annotation.content = inlines
patrick@0
   231
patrick@0
   232
patrick@0
   233
# =============================================================================
patrick@20
   234
#                                 DIVISION LEVEL
patrick@0
   235
# =============================================================================
patrick@0
   236
patrick@0
   237
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   238
patrick@0
   239
division = element division { division.content }
patrick@0
   240
patrick@0
   241
division.content =
patrick@20
   242
   division.head?,
patrick@0
   243
   (division+ | topic+)
patrick@0
   244
patrick@0
   245
patrick@0
   246
# =============================================================================
patrick@20
   247
#                               COMPONENT LEVEL
patrick@0
   248
# =============================================================================
patrick@0
   249
patrick@0
   250
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   251
patrick@0
   252
topic = element topic { topic.attributes, topic.content }
patrick@0
   253
patrick@0
   254
topic.attributes =
patrick@0
   255
   topic.id.attribute?
patrick@0
   256
 & topic.type.attribute?
patrick@0
   257
patrick@0
   258
topic.content =
patrick@20
   259
   component.head?,
patrick@0
   260
   section+
patrick@0
   261
patrick@0
   262
patrick@0
   263
# =============================================================================
patrick@20
   264
#                                 SECTION LEVEL
patrick@0
   265
# =============================================================================
patrick@0
   266
patrick@20
   267
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   268
patrick@0
   269
section = element section { section.content, section.attributes }
patrick@0
   270
patrick@0
   271
section.content =
patrick@20
   272
   section.head?,
patrick@9
   273
   (section+ | block+)
patrick@0
   274
patrick@0
   275
section.attributes =
patrick@0
   276
   status.attribute?
patrick@0
   277
status.attribute = attribute status { xsd:NCName }
patrick@0
   278
patrick@0
   279
patrick@0
   280
# =============================================================================
patrick@20
   281
#                                 BLOCK LEVEL
patrick@0
   282
# =============================================================================
patrick@0
   283
patrick@20
   284
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@9
   285
patrick@20
   286
block = (p | speech | \list | table | media)
patrick@9
   287
patrick@20
   288
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   289
patrick@20
   290
p = element p { p.content }
patrick@0
   291
patrick@20
   292
p.content =
patrick@0
   293
   inlines
patrick@0
   294
patrick@18
   295
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ speech ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@18
   296
patrick@18
   297
# ~~~~~~ speech
patrick@18
   298
speech = element speech { speech.content }
patrick@18
   299
patrick@18
   300
speech.content =
patrick@18
   301
   speaker?,
patrick@18
   302
   stage?,
patrick@20
   303
   p+
patrick@18
   304
patrick@18
   305
# ~~~~~~ speaker
patrick@18
   306
speaker = element speaker { speaker.content }
patrick@18
   307
patrick@18
   308
speaker.content = inlines
patrick@18
   309
patrick@18
   310
# ~~~~~~ stage
patrick@18
   311
stage = element stage { stage.content }
patrick@18
   312
patrick@18
   313
stage.content = inlines
patrick@18
   314
patrick@17
   315
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@9
   316
patrick@9
   317
# ~~~~~~ list
patrick@9
   318
\list = element list { \list.content }
patrick@9
   319
patrick@9
   320
\list.content =
patrick@20
   321
   block.head?,
patrick@13
   322
   (  (attribute type {"ordered"} ?, item, item+)
patrick@9
   323
    | (attribute type {"glossary"}, glossary.item+) )
patrick@9
   324
patrick@9
   325
# ~~~~~~ item
patrick@9
   326
item = element item { item.content }
patrick@9
   327
patrick@30
   328
item.content =
patrick@30
   329
   inlines
patrick@30
   330
 | block+
patrick@9
   331
patrick@9
   332
# ~~~~~~ glossary.item
patrick@9
   333
glossary.item = element item { glossary.item.content }
patrick@9
   334
patrick@9
   335
glossary.item.content =
patrick@9
   336
   label,
patrick@9
   337
   block+
patrick@9
   338
patrick@17
   339
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@17
   340
patrick@17
   341
table = element table { table.content }
patrick@17
   342
patrick@17
   343
table.content =
patrick@20
   344
   block.head?,
patrick@17
   345
   tgroup+,
patrick@17
   346
   caption?
patrick@17
   347
patrick@17
   348
# ~~~~~~ tgroup
patrick@17
   349
tgroup = element tgroup { tgroup.attributes, tgroup.content }
patrick@17
   350
patrick@17
   351
tgroup.content =
patrick@17
   352
   thead?,
patrick@17
   353
   tfoot?,
patrick@17
   354
   tbody
patrick@17
   355
patrick@17
   356
tgroup.attributes =
patrick@17
   357
   cols.attribute
patrick@17
   358
 & align.attribute?
patrick@17
   359
 & colsep.attribute?
patrick@17
   360
 & rowsep.attribute?
patrick@17
   361
cols.attribute = attribute cols { xsd:positiveInteger }
patrick@17
   362
align.attribute = attribute align { "left"  |  "right"  | "center" | "justify" }
patrick@17
   363
colsep.attribute = attribute colsep { "0" | "1" }
patrick@17
   364
rowsep.attribute = attribute rowsep { "0" | "1" }
patrick@17
   365
patrick@17
   366
# ~~~~~~ thead, tfoot, tbody
patrick@22
   367
thead = element thead { thead.attributes, thead.content }
patrick@22
   368
tfoot = element tfoot { tfoot.attributes, tfoot.content }
patrick@22
   369
tbody = element tbody { tbody.attributes, tbody.content }
patrick@17
   370
patrick@22
   371
thead.attributes =
patrick@22
   372
   valign.attribute?
patrick@22
   373
tfoot.attributes =
patrick@22
   374
   valign.attribute?
patrick@22
   375
tbody.attributes =
patrick@22
   376
   valign.attribute?
patrick@22
   377
valign.attribute = attribute valign { "top" | "middle" | "bottom" }
patrick@22
   378
   
patrick@17
   379
thead.content =
patrick@17
   380
   row+
patrick@17
   381
tfoot.content =
patrick@17
   382
   row+
patrick@17
   383
tbody.content =
patrick@17
   384
   row+
patrick@17
   385
patrick@17
   386
# ~~~~~~ row
patrick@17
   387
row = element row { row.attribute, row.content }
patrick@17
   388
patrick@17
   389
row.attribute =
patrick@17
   390
   valign.attribute?
patrick@17
   391
patrick@17
   392
row.content =
patrick@17
   393
  entry+
patrick@17
   394
patrick@17
   395
# ~~~~~~ entry
patrick@17
   396
entry = element entry { entry.content }
patrick@17
   397
patrick@17
   398
entry.content =
patrick@17
   399
   inlines
patrick@20
   400
 | p+
patrick@17
   401
patrick@17
   402
# ~~~~~~ caption
patrick@17
   403
caption = element caption { caption.content }
patrick@17
   404
patrick@17
   405
caption.content =
patrick@20
   406
   inlines
patrick@20
   407
 | p+
patrick@17
   408
patrick@35
   409
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   410
patrick@2
   411
# ~~~~~~ media
patrick@0
   412
media = element media { media.content }
patrick@0
   413
patrick@0
   414
media.content =
patrick@24
   415
   block.head?,
patrick@0
   416
   image+,
patrick@35
   417
   caption?,
patrick@36
   418
   link?
patrick@0
   419
patrick@2
   420
# ~~~~~~ image
patrick@0
   421
image = element image { image.attributes, image.content }
patrick@0
   422
patrick@0
   423
image.attributes =
patrick@0
   424
   media.id.attribute
patrick@17
   425
media.id.attribute = attribute id { xsd:NMTOKEN }
patrick@0
   426
patrick@0
   427
image.content =
patrick@0
   428
   copyright?
patrick@0
   429
patrick@2
   430
# ~~~~~~ copyright
patrick@0
   431
copyright = element copyright { copyright.content }
patrick@3
   432
patrick@0
   433
copyright.content = inlines
patrick@0
   434
patrick@0
   435
patrick@0
   436
# =============================================================================
patrick@20
   437
#                                 INLINE LEVEL
patrick@0
   438
# =============================================================================
patrick@0
   439
patrick@0
   440
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   441
patrick@0
   442
inlines = mixed {
patrick@0
   443
   sup*
patrick@0
   444
 & sub*
patrick@13
   445
 & number*
patrick@0
   446
 & date*
patrick@0
   447
 & name*
patrick@5
   448
 & note*
patrick@0
   449
 & foreign*
patrick@0
   450
 & highlight*
patrick@5
   451
 & mentioned*
patrick@5
   452
 & quote*
patrick@8
   453
 & acronym*
patrick@8
   454
 & term*
patrick@25
   455
 & link*
patrick@0
   456
}
patrick@0
   457
patrick@0
   458
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   459
patrick@0
   460
sup = element sup { inlines }
patrick@0
   461
patrick@0
   462
sub = element sub { inlines }
patrick@0
   463
patrick@13
   464
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   465
patrick@13
   466
number = element number {
patrick@13
   467
   ( attribute type {"roman"}, number.attributes, number.roman.content )
patrick@13
   468
 | ( number.attributes, number.content)
patrick@13
   469
}
patrick@13
   470
patrick@13
   471
number.attributes =
patrick@13
   472
   number.value.attribute?
patrick@13
   473
number.value.attribute = attribute value { xsd:integer | xsd:decimal }
patrick@13
   474
patrick@13
   475
number.content = mixed { sup* }
patrick@13
   476
number.roman.content = xsd:token {pattern = "[dlxvi]+"}
patrick@0
   477
patrick@36
   478
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   479
patrick@0
   480
date = element date { date.attributes, date.content }
patrick@0
   481
patrick@3
   482
date.attributes =
patrick@13
   483
   date.value.attribute
patrick@13
   484
 & date.of.attribute?
patrick@13
   485
date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear }
patrick@33
   486
date.of.attribute = attribute of { "birth" | "death" }
patrick@0
   487
patrick@13
   488
date.content = mixed { sup* }
patrick@0
   489
patrick@36
   490
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   491
patrick@0
   492
name = element name { name.attributes, name.content }
patrick@2
   493
patrick@2
   494
name.attributes =
patrick@2
   495
   name.of.attribute?
patrick@33
   496
name.of.attribute = attribute of
patrick@33
   497
   { "person" | "company" | "book" | "newspaper" | "party" }
patrick@0
   498
patrick@2
   499
name.content = inlines
patrick@2
   500
patrick@36
   501
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   502
patrick@5
   503
note = element note { note.attributes, note.content }
patrick@0
   504
patrick@5
   505
note.attributes =
patrick@5
   506
   note.label.attribute?
patrick@5
   507
note.label.attribute = attribute label { text }
patrick@0
   508
patrick@5
   509
note.content =
patrick@17
   510
   inlines
patrick@20
   511
 | p+
patrick@0
   512
patrick@36
   513
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   514
patrick@0
   515
foreign = element foreign { foreign.attributes, foreign.content }
patrick@0
   516
patrick@9
   517
foreign.attributes =
patrick@9
   518
   lang.attribute?
patrick@0
   519
patrick@0
   520
foreign.content = inlines
patrick@0
   521
patrick@36
   522
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   523
patrick@0
   524
highlight = element highlight { highlight.content }
patrick@0
   525
patrick@0
   526
highlight.content = inlines
patrick@0
   527
patrick@36
   528
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@5
   529
patrick@5
   530
mentioned = element mentioned { mentioned.content }
patrick@5
   531
patrick@5
   532
mentioned.content = inlines
patrick@5
   533
patrick@36
   534
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@5
   535
patrick@5
   536
quote = element quote { quote.content }
patrick@5
   537
patrick@5
   538
quote.content = inlines
patrick@5
   539
patrick@36
   540
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@8
   541
patrick@8
   542
acronym = element acronym { acronym.content }
patrick@8
   543
patrick@8
   544
acronym.content = inlines
patrick@8
   545
patrick@36
   546
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@8
   547
patrick@8
   548
term = element term { term.content }
patrick@8
   549
patrick@8
   550
term.content = inlines
patrick@8
   551
patrick@36
   552
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patrick@0
   553
patrick@0
   554
link = element link { link.attributes, link.content }
patrick@0
   555
patrick@9
   556
link.attributes =
patrick@36
   557
   uri.attribute
patrick@36
   558
 | idref.attribute
patrick@9
   559
uri.attribute = attribute uri { xsd:anyURI }
patrick@9
   560
idref.attribute = attribute idref { xsd:IDREF }
patrick@0
   561
patrick@0
   562
link.content = inlines