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