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