summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-bib.rnc
blob: effee37dec881893355b194a075fb4bf60e1ff81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# /=====================================================================\ 
# |  LaTeXML-bib.rnc                                                    |
# | RelaxNG model for LaTeXML generated documents                       |
# |=====================================================================|
# | Part of LaTeXML:                                                    |
# |  Public domain software, produced as part of work done by the       |
# |  United States Government & not subject to copyright in the US.     |
# |=====================================================================|
# | Bruce Miller <bruce.miller@nist.gov>                        #_#     |
# | http://dlmf.nist.gov/LaTeXML/                              (o o)    |
# \=========================================================ooo==U==ooo=/

default namespace = "http://dlmf.nist.gov/LaTeXML"

# Would be nice to use somebody elses already-developed DTD...

# Some notes:
# There're two classes of things here:
# bibentry : which would be the translation of a .bib file
# bibitem  : which would be the formatted items in a latex bibliography environment.
#	   This latter has typically lost much information during formatting.

biblist =
## A list of bibliographic \elementref{bibentry} or \elementref{bibitem}.
element biblist { biblist_attributes &  biblist_model }

## Attributes for \elementref{biblist}.
biblist_attributes = Common.attributes

## Content model for \elementref{biblist}.
biblist_model = bibentry* & bibitem*

# ======================================================================
# bibitem is the formatted, presentation, form, typically information has been lost;
# it basically contains a biblabel and several bibblock's
# ======================================================================

bibitem =
## A formatted bibliographic item, typically as written explicit
## in a LaTeX article. This has generally lost most of the semantics
## present in the BibTeX data.
element bibitem { bibitem_attributes &  bibitem_model }

## Attributes for \elementref{bibitem}.
bibitem_attributes = 
  Common.attributes & 
  ID.attributes & 
  ## The unique key for this object; this key is referenced by the
  ## \attr{bibrefs} attribute of \elementref{bibref}.
  attribute key { text }?

## Content model for \elementref{bibitem}.
bibitem_model = bibtag*, bibblock*

#----------------------------------------------------------------------

bibtag =
## Various formatted tags for bibliographic items.
## Typically @role refnum is shown in the displayed bibliography,
## as the beginning of the item.  Other roles 
## (eg. number, authors, fullauthors, year, title) record formatted
## info to be used for filling in citations (\elementref{bibref}).
element bibtag { bibtag_attributes &  bibtag_model }

## Attributes for \elementref{bibtag}.
bibtag_attributes = 
  attribute role { ("number"|"authors"|"fullauthors"|"key"|"year"|"bibtype"|"title"|text) }? &
  ## A delimiter for formatting the refnum in the bibliography
  attribute open { text }? &
  ## A delimiter for formatting the refnum in the bibliography
  attribute close { text }?

## Content model for \elementref{bibtag}.
bibtag_model = Inline.model

#----------------------------------------------------------------------

bibblock =
## A block of data appearing within a \elementref{bibitem}.
element bibblock { bibblock_attributes &  bibblock_model }

## Attributes for \elementref{bibblock}.
bibblock_attributes = empty

## Content model for \elementref{bibblock}.
bibblock_model = Flow.model

# bibblock's model was this:
#  Inline.model }

# ======================================================================
# bibentry is the (more) semantic form, typically extracted from bibtex.
# ======================================================================

bibentry =
## Semantic representation of a bibliography entry, 
## typically resulting from parsing BibTeX
element bibentry { bibentry_attributes & bibentry_model }

bibentry.type =  "article" | "book" | "booklet" | "conference" | "inbook"
  	         | "incollection" | "inproceedings" | "manual" | "mastersthesis"
		 | "misc" | "phdthesis" | "proceedings" | "techreport" | "unpublished"
		 | "report" | "thesis" | "website" | "software" | "periodical"
		 | "collection" | "collection.article" | "proceedings.article"
		 | text

## Attributes for \elementref{bibentry}.
bibentry_attributes = 
  Common.attributes & 
  ID.attributes & 

  ## The unique key for this object; this key is referenced by the
  ## \attr{bibrefs} attribute of \elementref{bibref}.
  attribute key { text } & 

  ## The type of the referenced object. The values are a superset of
  ## those types recognized by BibTeX, but is also open-ended for extensibility.
  attribute type { bibentry.type }

## Content model for \elementref{bibentry}.
bibentry_model = Bibentry.class

#======================================================================

# Name related information
bib-name =
## Name of some participant in creating a bibliographic entry.
element bib-name { bib-name_attributes & bib-name_model }

## Attributes for \elementref{bib-name}.
bib-name_attributes = 
  Common.attributes & 
  ## The role that this participant played in creating the entry.
  attribute role { ("author" | "editor" | "translator" | text) }?

## Content model for \elementref{bib-name}.
bib-name_model = Bibname.model

## The content model of the bibliographic name fields (\elementref{bib-name})
Bibname.model =  surname &  givenname? & lineage?

#----------------------------------------------------------------------

surname =
## Surname of a participant (\elementref{bib-name}).
element surname { surname_attributes & surname_model }

## Attributes for \elementref{surname}.
surname_attributes = empty

## Content model for \elementref{surname}.
surname_model = Inline.model

#----------------------------------------------------------------------

givenname =
## Given name of a participant (\elementref{bib-name}).
element givenname { givenname_attributes & givenname_model }

## Attributes for \elementref{givenname}.
givenname_attributes = empty

## Content model for \elementref{givenname}.
givenname_model = Inline.model

#----------------------------------------------------------------------

lineage =
## Lineage of a participant (\elementref{bib-name}), eg. Jr. or similar.
element lineage { lineage_attributes &  lineage_model }

## Attributes for \elementref{lineage}.
lineage_attributes = empty

## Content model for \elementref{lineage}.
lineage_model = Inline.model

#======================================================================

# Title related information
bib-title =
## Title of a bibliographic entry.
element bib-title { bib-title_attributes &  bib-title_model }

## Attributes for \elementref{bib-title}.
bib-title_attributes = Common.attributes

## Content model for \elementref{bib-title}.
bib-title_model = Inline.model
#----------------------------------------------------------------------

bib-subtitle =
## Subtitle of a bibliographic entry.
element bib-subtitle { bib-subtitle_attributes &  bib-subtitle_model }

## Attributes for \elementref{bib-subtitle}.
bib-subtitle_attributes = Common.attributes

## Content model for \elementref{bib-subtitle}.
bib-subtitle_model = Inline.model

#----------------------------------------------------------------------

bib-key =
## Unique key of a bibliographic entry.
element bib-key { bib-key_attributes &  bib-key_model }

## Attributes for \elementref{bib-key}.
bib-key_attributes = Common.attributes

## Content model for \elementref{bib-key}.
bib-key_model = Inline.model

#----------------------------------------------------------------------

bib-type =
## Type of a bibliographic entry.
element bib-type { bib-type_attributes &  bib-type_model }

## Attributes for \elementref{bib-type}.
bib-type_attributes = Common.attributes

## Content model for \elementref{bib-type}.
bib-type_model = Inline.model

#----------------------------------------------------------------------

bib-date =
## Date of a bibliographic entry.
element bib-date { bib-date_attributes &  bib-date_model }

## Attributes for \elementref{bib-date}.
bib-date_attributes = 
  Common.attributes & 
  ## characterizes what happened on the given date
  attribute role { ("publication" | "copyright" | text) }?

## Content model for \elementref{bib-date}.
bib-date_model = Inline.model

#----------------------------------------------------------------------

bib-publisher =
## Publisher of a bibliographic entry.
element bib-publisher { bib-publisher_attributes &  bib-publisher_model }

## Attributes for \elementref{bib-publisher}.
bib-publisher_attributes = Common.attributes

## Content model for \elementref{bib-publisher}.
bib-publisher_model = Inline.model

#----------------------------------------------------------------------

bib-organization =
## Organization responsible for a bibliographic entry.
element bib-organization { bib-organization_attributes &  bib-organization_model }

## Attributes for \elementref{bib-organization}.
bib-organization_attributes = Common.attributes

## Content model for \elementref{bib-organization}.
bib-organization_model = Inline.model

#----------------------------------------------------------------------

bib-place =
## Location of publisher or event
element bib-place { bib-place_attributes &  bib-place_model }

## Attributes for \elementref{bib-place}.
bib-place_attributes = Common.attributes

## Content model for \elementref{bib-place}.
bib-place_model = Inline.model

# ---------------------------------------------------------------------
bib-related =
## A Related bibliographic object, such as the book or journal
## that the current item is related to.
element bib-related { bib-related_attributes &  bib-related_model }

## Attributes for \elementref{bib-related}.
bib-related_attributes = 
  Common.attributes & 
  ## The type of this related entry.
  attribute type { bibentry.type }? &
  ## How this object relates to the containing object.
  ## Particularly important is \attrval{host} which indicates that
  ## the outer object is a part of this object.
  attribute role { ("host" | "event" | "original" | text) }? &
  ## If the bibrefs attribute is given, it is the key of another object in the bibliography,
  ## and this element should be empty; otherwise the object should be described by
  ## the content of the element.
  attribute bibrefs { text }?

## Content model for \elementref{bib-related}.
bib-related_model = Bibentry.class

# ---------------------------------------------------------------------

bib-part =
## Describes how the current object is related to a related (\elementref{bib-related})
## object, in particular page, part, volume numbers and similar.
element bib-part { bib-part_attributes &  bib-part_model }
 
## Attributes for \elementref{bib-part}.
bib-part_attributes = 
  Common.attributes & 
  ## indicates how the value partitions the containing object.
  attribute role { ("pages" | "part" | "volume" | "issue" | "number"
  	             | "chapter" | "section" | "paragraph" | text) }?

## Content model for \elementref{bib-part}.
bib-part_model = Inline.model

# ---------------------------------------------------------------------
# 

bib-edition =
## Edition of a bibliographic entry.
element bib-edition { bib-edition_attributes &  bib-edition_model }

## Attributes for \elementref{bib-edition}.
bib-edition_attributes = Common.attributes

## Content model for \elementref{bib-edition}.
bib-edition_model = Inline.model

#----------------------------------------------------------------------

bib-status =
## Status of a bibliographic entry.
element bib-status { bib-status_attributes &  bib-status_model }

## Attributes for \elementref{bib-status}.
bib-status_attributes = Common.attributes

## Content model for \elementref{bib-status}.
bib-status_model = Inline.model

#----------------------------------------------------------------------

bib-identifier =
## Some form of document identfier. The content is descriptive.
element bib-identifier { bib-identifier_attributes &  bib-identifier_model }

## Attributes for \elementref{bib-identifier}.
bib-identifier_attributes = 
  Common.attributes & 
  ## indicates what sort of identifier it is; it is open-ended for extensibility.
  attribute scheme { "doi" | "issn" | "isbn" | "mr" | text }? &
  ## the identifier.
  attribute id { text}? &
  ## a url to the document, if available
  attribute href { text}?

## Content model for \elementref{bib-identifier}.
bib-identifier_model = Inline.model

#----------------------------------------------------------------------

bib-review =
## Review of a bibliographic entry. The content is descriptive.
element bib-review { bib-review_attributes &  bib-review_model }

## Attributes for \elementref{bib-review}.
bib-review_attributes = 
  Common.attributes & 
  ## indicates what sort of identifier it is; it is open-ended for extensibility.
  attribute scheme { "doi" | "issn" | "isbn" | "mr" | text }? &
  ## the identifier.
  attribute id { text}? &
  ## a url to the review, if available
  attribute href { text}?

## Content model for \elementref{bib-review}.
bib-review_model = Inline.model

#----------------------------------------------------------------------

bib-links =
## Links to other things like preprints, source code, etc.
element bib-links { bib-links_attributes &  bib-links_model }

## Attributes for \elementref{bib-links}.
bib-links_attributes = Common.attributes

## Content model for \elementref{bib-links}.
bib-links_model = Inline.model

#----------------------------------------------------------------------

bib-language =
## Language of a bibliographic entry.
element bib-language { bib-language_attributes &  bib-language_model }

## Attributes for \elementref{bib-language}.
bib-language_attributes = Common.attributes

## Content model for \elementref{bib-language}.
bib-language_model = Inline.model

#----------------------------------------------------------------------

bib-url =
## A URL for a bibliographic entry. The content is descriptive
element bib-url { bib-url_attributes &  bib-url_model }

## Attributes for \elementref{bib-url}.
bib-url_attributes = 
  Common.attributes & 
  attribute href { text }?

## Content model for \elementref{bib-url}.
bib-url_model = Inline.model

#----------------------------------------------------------------------

bib-extract =
## An extract from the referenced object.
element bib-extract { bib-extract_attributes &  bib-extract_model }

## Attributes for \elementref{bib-extract}.
bib-extract_attributes = 
  Common.attributes & 
  ## Classify what kind of extract
  attribute role { ("keywords" | "abstract" | "contents" | text) }?

## Content model for \elementref{bib-extract}.
bib-extract_model = Inline.model

#----------------------------------------------------------------------

bib-note =
## Notes about a bibliographic entry.
element bib-note { bib-note_attributes &  bib-note_model }

## Attributes for \elementref{bib-note}.
bib-note_attributes = 
  Common.attributes & 
  ## Classify the kind of note
  attribute role { ("annotation" | "publication" | text) }?

## Content model for \elementref{bib-note}.
bib-note_model = Inline.model

#----------------------------------------------------------------------

bib-data =
## Random data, not necessarily even text.
## (future questions: should model be text or ANY? maybe should have encoding attribute?).
element bib-data { bib-data_attributes &  bib-data_model }

## Attributes for \elementref{bib-data}.
bib-data_attributes = 
  Common.attributes & 
  ## Classify the relationship of the data to the entry.
  attribute role { text }? &
  ## Classify the type of the data.
  attribute type { text }?

## Content model for \elementref{bib-data}.
bib-data_model = Inline.model

#======================================================================

Bibentry.class =
  bib-name*
  & bib-title*
  & bib-subtitle*
  & bib-key*
  & bib-type*
  & bib-date*
  & bib-publisher* 
  & bib-organization*
  & bib-place*
  & bib-part*
  & bib-related*
  & bib-edition*
  & bib-status*
  & bib-language*
  & bib-url*
  & bib-note*
  & bib-extract*
  & bib-identifier*
  & bib-review*
  & bib-links*
  & bib-data*

#======================================================================