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