asciidoctor-iso 0.9.3 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,375 @@
1
+ = Quickstart Guide for AsciiISO
2
+
3
+ This is a guide on how to get started using AsciiISO to create ISO standards documents compliant with http://www.iec.ch/members_experts/refdocs/iec/isoiecdir-2%7Bed7.0%7Den.pdf[ISO/IEC DIR 2 "Principles and rules for the structure and drafting of ISO and IEC documents"], in Microsoft Word and HTML formats.
4
+
5
+ AsciiISO is the purposed-design syntax for creating ISO documents based on the AsciiDoc syntax.
6
+
7
+ AsciiISO is currently used as input to the Asciidoctor-ISO renderer, which produces the corresponding https://github.com/riboseinc/isodoc-models[ISOXML schema] (in `.xml`), which in turn uses the https://github.com/riboseinc/isodoc[isodoc] gem to convert ISOXML into the final output formats, HTML (`.html`) and Word Document (`.doc`).
8
+
9
+
10
+ == Even quicker summary
11
+
12
+ In order to start a new ISO document, or migrate your document from Word:
13
+
14
+ . Install <<installation>>
15
+ . Clone the https://github.com/riboseinc/isodoc-rice/[AsciiISO Rice]
16
+
17
+ To migrate:
18
+
19
+ . Use our https://github.com/riboseinc/reverse_asciidoctor[reverse_asciidoctor] gem to help you convert a Word document into AsciiISO. That said, the conversion will not be 100% clean and you will have to manually fix some syntax (especially if your Word document contains an index, stray anchors, and equations).
20
+ . Move the content back to the cloned isodoc-rice.
21
+
22
+
23
+ [[installation]]
24
+ == Installation instructions
25
+
26
+ The Asciidoctor-ISO tool is a https://en.wikipedia.org/wiki/RubyGems[Ruby gem], and works on the command line. The https://en.wikipedia.org/wiki/Ruby_programming_language[Ruby programming language] can be installed on Windows (e.g. https://rubyinstaller.org), but is typically run on a Unix command line—including Linux and MacOS. The following instructions are for the Unix console.
27
+
28
+ Asciidoctor-ISO in turn builds on the https://asciidoctor.org[Asciidoctor gem], which interprets the Asciidoctor markup language in Ruby. Installing the Asciidoctor-ISO gem will install the Asciidoctor gem, if it is not already installed.
29
+
30
+ Ruby comes with Linux and MacOS. Asciidoctor-ISO uses Ruby 2.4.0, and you may need to update your Ruby instance to use that version. Refer to https://www.ruby-lang.org/en/documentation/installation/
31
+
32
+ You can install the Asciidoctor-ISO gem, and all its dependencies, through the Ruby gem installer:
33
+
34
+ [source,console]
35
+ --
36
+ gem install asciidoctor-iso
37
+ --
38
+
39
+ If you want the latest version of the gem (which is still heavily under development), you can install it from Github:
40
+
41
+ [source,console]
42
+ --
43
+ git clone https://github.com/riboseinc/asciidoctor-iso.git
44
+ cd asciidoctor-iso
45
+ gem build *.gemspec
46
+ gem install *.gem
47
+ --
48
+
49
+ == How to set up a new project
50
+
51
+ At its simplest, all you need is a text document in Asciidoctor format, which you compile using the Asciidoctor-ISO gem. To keep document dependencies in order, you should keep your document in a distinct folder:
52
+
53
+ [source,console]
54
+ --
55
+ mkdir new_standard
56
+ cd new_standard
57
+ vi new_standard.adoc
58
+ --
59
+
60
+ To compile the document, execute the `asciidoctor` script, flagging it to use the ISO variant:
61
+
62
+ [source,console]
63
+ --
64
+ asciidoctor --trace -b iso -r 'asciidoctor-iso' new_standard.adoc
65
+ --
66
+
67
+ NOTE: This command syntax will be changed soon.
68
+
69
+ This will generate two files from the `new_standard.adoc` document (provided it is well-formed!): `new_standard.html` is a standalone HTML document, and `new_standard.doc` is a Word document (currently in the pre-2007 `.doc` format, but Microsoft Word will open it fine). Both these files are generated via an intermediate XML file, `new_standard.xml`, which represents the structure of the document following the rules of ISO/IEC DIR 2, as captured in the https://github.com/riboseinc/isodoc-models[ISOXML schema].
70
+
71
+ Even if there are no errors in the Asciidoctor syntax, the document may still raise warnings to the console as it is being validated. The validation comes from ISO/IEC DIR 2, and consists of two parts: warnings about document content (e.g. requiring space before a percentage sign; requiring that the scope not contain text that looks like a recommendation); and warnings about document structure. The latter are generated by running the generated XML against the ISOXML schema, and report the line numbers of the XML document where issues are observed.
72
+
73
+ === Template
74
+
75
+ To author Asciidoctor documents, you need to be familiar with the Asciidoctor syntax, as well as the Asciidoctor-ISO extensions to the syntax and conventions. The https://asciidoctor.org/docs/user-manual/[Asciidoctor User Manual] documents Asciidoctor itself; the https://github.com/riboseinc/asciidoctor-iso/wiki/Guidance-for-authoring[Guidance for Authoring in Asciidoctor-ISO] and the https://github.com/riboseinc/asciidoctor-iso/blob/master/README.adoc[Asciidoctor-ISO Readme] are the complete documentation for the ISO-specific extensions. But the simplest way to get started is to take a ready-made Asciidoctor-ISO document, and edit it, observing how it approaches various formatting tasks.
76
+
77
+ The https://www.iso.org/publication/PUB100407.html["Rice document"] is the ISO's model document of an international standard. An Asciidoctor-ISO version of the document is available at https://github.com/riboseinc/isodoc-rice/ . We suggest downloading the site, and editing it.
78
+
79
+ The `iso-rice-en.adoc` document consists of a document header, and it references the separate `body/body-en.adoc` document for the document proper (`include::body/body-en.adoc[]`). You can just continue on with the document text after the document header—so long as you remember to leave a blank line between the two.
80
+
81
+ == AsciiDoc syntax supported
82
+
83
+ The Rice document illustrates almost the full range of formatting available via Asciidoctor; Annex E (which is not in the original) illustrates features not demonstrated in the original document.
84
+
85
+ Syntax includes the following; the links are to the Asciidoctor User Manual. All examples are taken from the Asciidoctor-ISO Rice document.
86
+
87
+ === https://asciidoctor.org/docs/user-manual/#doc-header[Document header]
88
+
89
+ Attributes of the document, which typically appear in the coverpage (if at all), rather than in the document proper. The permitted attributes for Asciidoctor-ISO, and their expected values, are documented in the https://github.com/riboseinc/asciidoctor-iso#document-attributes[Asciidoctor-ISO Readme]. Note that the author line expected in Asciidoctor is not used; the title line is likewise ignored, in favour of attributes describing the three-part bilingual title.
90
+
91
+ [source,asciidoctor]
92
+ --
93
+ = Rice model
94
+ :docnumber: 17301
95
+ :tc-docnumber: 17301
96
+ :ref-docnumber: ISO 17301-1:2016(E)
97
+ ...
98
+ --
99
+
100
+ === Inline formatting
101
+
102
+ * https://asciidoctor.org/docs/user-manual/#text-formatting[Formatting marks]: bold, italic, monospace, subscript, superscript
103
+
104
+ [source,asciidoctor]
105
+ --
106
+ This document specifies minimum requirements and test methods for rice (_Oryza sativa L._).
107
+ --
108
+
109
+ * https://asciidoctor.org/docs/user-manual/#anchordef[Anchors] (for internal cross-references): these can be defined for any section or subsection, and any block (e.g. images, lists, examples, formulas, and so forth). The numbering of all blocks and clauses is automated, and does not need to be provided in the text.
110
+ * https://asciidoctor.org/docs/user-manual/#internal-cross-references[Internal Cross-references] reference anchors within the document. By default, the text for these is also automated, to follow ISO/IEC DIR 2, including naming the container of a block where required (e.g. `B.6, Formula (B.1)` for a formula in an annex). However, cross-references can supply their own text as an override, following a comma (e.g. `<``<AnnexB,the following annex>``>`).
111
+
112
+ [source,asciidoctor]
113
+ --
114
+ The International Organization for Standardization (ISO) draws attention to the fact that it is claimed that compliance with this document may involve the use of a patent concerning sample dividers given in <<AnnexA>> and shown in <<figureA-1>>.
115
+
116
+ ...
117
+ [[figureA-1]]
118
+ .Split-it-right sample divider
119
+ image::images/rice_image1.png[]
120
+ --
121
+
122
+ * https://asciidoctor.org/docs/user-manual/#url[URLs]
123
+
124
+ [source,asciidoctor]
125
+ --
126
+ http://www.iso.org/obp[OBP]
127
+ --
128
+
129
+ * https://asciidoctor.org/docs/user-manual/#activating-stem-support[STEM support] (mathematical expressions), as both inline and block formatting. (ISO Formulae are expressed as stem blocks.) Asciidoctor natively uses http://asciimath.org[AsciiMath] for its mathematical expressions; the `:stem:` document attribute must be present for AsciiMath to be recognised. The gem will ensure that any AsciiMath is rendered in the HTML output, and converted to Microsoft Office's OOXML (via MathML) in the Word output. Asciidoctor also supports LaTeX, but the gem does not cater for converting LaTeX to a Word-compatible output.
130
+
131
+ [source,asciidoctor]
132
+ --
133
+ [[formulaA-1,A.1]]
134
+ [stem]
135
+ ++++
136
+ w = (m_D) / (m_s)
137
+ ++++
138
+
139
+ where
140
+
141
+ stem:[w]:: is the mass fraction of grains with a particular defect in the test sample;
142
+ --
143
+
144
+ * https://asciidoctor.org/docs/user-manual/#user-footnotes[Footnotes]. Note that footnotes are treated as inline formatting, so they cannot straightforwardly span more than a single paragraph in Asciidoctor. Footnotes within figures and tables are rendered within their blocks, as required by ISO/IEC DIR 2.
145
+
146
+ [source,asciidoctor]
147
+ --
148
+ containing a mass fraction of 4,1 % iodine and 6,3 % potassium iodide in deionized water such as Lugols.footnote:[Lugols is an example of a suitable product available commercially. This information is given for the convenience of users of this document and does not constitute an endorsement by ISO of this product.]
149
+ --
150
+
151
+ === Blocks
152
+
153
+ Blocks are groupings of paragraphs and text into larger units, commonly https://asciidoctor.org/docs/user-manual/#delimited-blocks[delimited], and optionally including a https://asciidoctor.org/docs/user-manual/#title[title] and https://asciidoctor.org/docs/user-manual/#metadata-2[metadata].
154
+
155
+ * https://asciidoctor.org/docs/user-manual/#unordered-lists[Unordered lists]
156
+
157
+ [source,asciidoctor]
158
+ --
159
+ The main changes compared to the previous edition are:
160
+
161
+ * updated normative references;
162
+ * deletion of 4.3.
163
+ --
164
+
165
+ * https://asciidoctor.org/docs/user-manual/#ordered-lists[Ordered lists]. Note that ISO/IEC presupposes that the first level of an ordered list is indexed with a lowercase letter. The gem automatically creates labels for the nested levels of ordered lists, and ignores any https://asciidoctor.org/docs/user-manual/#numbering-styles[numbering styles] indicated by the user.
166
+
167
+ [source,asciidoctor]
168
+ --
169
+ . the sampling method used;
170
+ . the test method used;
171
+ . the test result(s) obtained or, if the repeatability has been checked, the final quoted result obtained;
172
+ --
173
+
174
+ * https://asciidoctor.org/docs/user-manual/#labeled-list[Definition lists]. These are used for all keys of figures and formulae, and as the content of Symbols and Abbreviations clauses and subclauses:
175
+
176
+ [source,asciidoctor]
177
+ --
178
+ stem:[w]:: is the mass fraction of grains with a particular defect in the test sample;
179
+ stem:[m_D]:: is the mass, in grams, of grains with that defect;
180
+ stem:[m_S]:: is the mass, in grams, of the test sample.
181
+ --
182
+
183
+ Note that the key to a figure must be preceded by the paragraph `*Key*`, and the key to a formula must be preceded by the paragraph `where`.
184
+
185
+ * https://asciidoctor.org/docs/user-manual/#tables[Tables]. Asciidoctor supports a rich range of table formatting (which the Asciidoctor-ISO gem extends further).
186
+
187
+ [source,asciidoctor]
188
+ --
189
+ [[tableD-1]]
190
+ [cols="<,^,^,^,^",headerrows=2]
191
+ .Repeatability and reproducibility of husked rice yield
192
+ |===
193
+ .2+| Description 4+| Rice sample
194
+ | Arborio | Drago footnote:[Parboiled rice.] | Balilla | Thaibonnet
195
+
196
+ | Number of laboratories retained after eliminating outliers | 13 | 11 | 13 | 13
197
+ | Mean value, g/100 g | 81,2 | 82,0 | 81,8 | 77,7
198
+ |===
199
+ --
200
+
201
+ * https://asciidoctor.org/docs/user-manual/#images[Images], which are mapped to ISO figures, with accompanying titles:
202
+
203
+ [source,asciidoctor]
204
+ --
205
+ [[figureC-1]]
206
+ .Typical gelatinization curve
207
+ image::images/rice_image2.png[]
208
+ footnote:[The time stem:[t_90] was estimated to be 18,2 min for this example.]
209
+ --
210
+
211
+ * https://asciidoctor.org/docs/user-manual/#admonition[Admonitions], which express Notes, Warnings, Cautions, etc.
212
+
213
+ [source,asciidoctor]
214
+ --
215
+ CAUTION: Only use paddy or parboiled rice for the determination of husked rice yield.
216
+ --
217
+
218
+ * https://asciidoctor.org/docs/user-manual/#prose-excerpts-quotes-and-verses[Block quotes]
219
+
220
+ [source,asciidoctor]
221
+ --
222
+ [quote, ISO, "ISO7301,clause 1"]
223
+ _____
224
+ This International Standard gives the minimum specifications for rice (_Oryza sativa_ L.) which is subject to international trade. It is applicable to the following types: husked rice and milled rice, parboiled or not, intended for direct human consumption. It is neither applicable to other products derived from rice, nor to waxy rice (glutinous rice).
225
+ _____
226
+ --
227
+
228
+
229
+ * https://asciidoctor.org/docs/user-manual/#example[Examples]
230
+ * https://asciidoctor.org/docs/user-manual/#listing-blocks[Listing blocks] (source code), including https://asciidoctor.org/docs/user-manual/#callouts[source code callouts]
231
+
232
+ [source,asciidoctor]
233
+ ----
234
+ .Sample Code
235
+ ====
236
+
237
+ [source,ruby]
238
+ --
239
+ puts "Hello, world."
240
+ %w{a b c}.each do |x| <1>
241
+ puts x
242
+ end
243
+ --
244
+ <1> This is an annotation
245
+ ====
246
+ ----
247
+
248
+ * https://asciidoctor.org/docs/user-manual/#comments[Comments] (which are *not* rendered in the output)
249
+
250
+ [source,ruby]
251
+ --
252
+ // all terms and defs references are dated
253
+ --
254
+
255
+ === Sections
256
+
257
+ * The Asciidoctor https://asciidoctor.org/docs/user-manual/#doc-preamble[Document preamble] is treated as the document Foreword: it is the text appearing between the document header and the first section header. (Note that the foreword is here given a https://asciidoctor.org/docs/user-manual/#title[block title], but that will be provided automatically anyway.)
258
+
259
+ [source,asciidoctor]
260
+ --
261
+ [[foreword]]
262
+ .Foreword
263
+ ISO (the International Organization for Standardization)
264
+ --
265
+
266
+ * The Asciidoctor https://asciidoctor.org/docs/user-manual/#sections[Sections] correspond to ISO clauses, starting with the Introduction (if present). Each section and subsection is delimited with a header; the number of equal signs before the header indicate the level of nesting of the section, starting with two equal signs. No numbering should be given for any header: numbering is done automatically by the gem.
267
+
268
+ [source,asciidoctor]
269
+ --
270
+ == Sampling
271
+ Sampling shall be carried out in accordance with <<ISO24333,clause 5>>
272
+
273
+ == Test methods
274
+
275
+ === Moisture content
276
+
277
+ Determine the mass fraction of moisture in accordance with the method specified in <<ISO712>>.
278
+ ...
279
+
280
+ --
281
+
282
+
283
+ == Asciidoctor-ISO specific syntax
284
+
285
+ Full details of Asciidoctor-ISO–specific markup and conventions is given in the https://github.com/riboseinc/asciidoctor-iso/blob/master/README.adoc[Asciidoctor-ISO Readme] and the https://github.com/riboseinc/asciidoctor-iso/wiki/Guidance-for-authoring[Guidance for authoring].
286
+
287
+ https://asciidoctor.org/docs/user-manual/#section-styles[Section styles] are used to indicate specific types of section: `[bibliography]` for Normative References and Bibliography, `[appendix]` for Annexes, and `[%appendix]` for Appendixes (annexes of annexes). These styles must be provided for the sections to be processed correctly: bibliographic references will not be recognised as such, for example, without the `[bibliography]` style applied:
288
+
289
+ [source,asciidoctor]
290
+ --
291
+ [bibliography]
292
+ == Bibliography
293
+
294
+ * [[[ISO3696,ISO 3696]]], _Water for analytical laboratory use -- Specification and test methods_
295
+ --
296
+
297
+ The sections that have a fixed position according to ISO/IEC DIR 2 (Introduction, Scope, Normative References, Terms and Definitions, Symbols and Abbreviations, Bibliography) need to be titled as such, as first-level headings.
298
+
299
+ === Terms and Definitions
300
+
301
+ Terms and Definitions sections follow a strict grammar in their Asciidoctor-ISO markup, as ISO/IEC DIR 2 prescribes their structure so strictly. The following illustrates the complete structure of a term entry; the Rice document splits up these features among several terms.
302
+
303
+ [source,asciidoctor]
304
+ --
305
+ [[paddy]]
306
+ === paddy
307
+ alt:[paddy rice]
308
+ alt:[rough rice]
309
+ deprecated:[cargo rice]
310
+ domain:[rice]
311
+
312
+ rice retaining its husk after threshing
313
+
314
+ [example]
315
+ Foreign seeds, husks, bran, sand, dust.
316
+
317
+ NOTE: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.
318
+
319
+ [.source]
320
+ <<ISO7301,section 3.2>>, The term "cargo rice" is shown as deprecated,
321
+ and Note 1 to entry is not included here
322
+ --
323
+
324
+ Term banks such as the http://www.electropedia.org[IEV] must be treated like any other document, with terms treated as clauses; e.g. `<<IEV,clause 103-01-01>>`. The IEV by ISO convention will be left out of the output rendering of ISO standards.
325
+
326
+ === References (Normative, Informative)
327
+
328
+ All bibliographic entries must be given as unordered lists. Normative references are expected to include only ISO and related standards; informative references may include any source.
329
+
330
+ For ISO and related standards, the reference is given as a bibliographic anchor (in triple brackets), consisting of an internal identifier followed by the ISO identifier. The internal identifier can be used in cross-references (citations). The date may be added to the ISO identifier, as required by ISO/IEC DIR 2; standards under preparation have their date given as `--`, and should be accompanied by a footnote detailing the status of the standard.
331
+
332
+ [source,asciidoctor]
333
+ --
334
+ Grade 3 quality as specified in <<ISO3696>>.
335
+
336
+ ...
337
+
338
+ * [[[ISO3696,ISO 3696]]], _Water for analytical laboratory use -- Specification and test methods_
339
+ * [[[ISO7301,ISO 7301:2011]]], _Rice -- Specification_
340
+ * [[[ISO16634,ISO 16634:--]]] footnote:[Under preparation. (Stage at the time of publication ISO/DIS 16634)], _Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs -- Determination of the total nitrogen content by combustion according to the Dumas principle and calculation of the crude protein content_
341
+ --
342
+
343
+ Non-ISO references under normative references are still cited by document identifier. Under informative references, non-ISO documents are both displayed and cited with reference numbers in brackets. In Asciidoctor-ISO, the cross-reference is a normal anchor identifier; the bracket numbering for informative references is automatic.
344
+
345
+ [source,asciidoctor]
346
+ --
347
+ For details concerning the use of the Dumas method, see References <<ref10>> and <<ref16>>.
348
+
349
+ ...
350
+
351
+ * [[[ref10,10]]] [smallcap]#Standard No I.C.C 167#. _Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method_ (see http://www.icc.or.at)
352
+
353
+ * [[[ref16,16]]] [smallcap]#Tkachuk R.# Nitrogen-to-protein conversion factors for cereals and oilseed meals. _Cereal Chem._ 1969, *46* (4) pp 419-423
354
+ --
355
+
356
+ In cross-references, bibliographic localities (e.g. page numbers, clause numbers) can be added directly after the comma, as part of the cross-reference text. Bibliographic localities are expressed as a sequence of lowercase locality type, then an equal sign, then by the locality number or range:
357
+
358
+ [source,asciidoctor]
359
+ --
360
+ <<ISO7301,clause=3.1>>
361
+
362
+ NOTE: This table is based on <<ISO7301,table=1>>.
363
+
364
+ Sampling shall be carried out in accordance with <<ISO24333,clause=5>>
365
+ --
366
+
367
+ ISO clause references in particular will suppress the word "Clause" before a subclause reference, following ISO/IEC DIR 2: `<``<ISO24333,clause=5>``>` will be rendered as _ISO 24333, Clause 5_, but `<``<ISO7301,clause=3.1>``>` will be rendered as _ISO 7301, 3.1_.
368
+
369
+
370
+ === Annexes
371
+
372
+ For ISO standards, annexes are treated as normative by default; if they are informative, they must additionally be tagged with an obligation of "informative" (so `[appendix, obligation=informative]`).
373
+
374
+ The numbering of annexes and appendices is automatic: do not insert "Annex A" or "Appendix 1" as part of the title.
375
+
@@ -7,6 +7,7 @@ require "open-uri"
7
7
  require "pp"
8
8
  require "sass"
9
9
  require "isodoc"
10
+ require "relaton"
10
11
 
11
12
  module Asciidoctor
12
13
  module ISO
@@ -71,9 +72,21 @@ module Asciidoctor
71
72
  @filename = node.attr("docfile") ?
72
73
  node.attr("docfile").gsub(/\.adoc$/, "").gsub(%r{^.*/}, "") : ""
73
74
  @no_isobib_cache = node.attr("no-isobib-cache")
74
- @bibdb = open_cache_biblio(node, true)
75
- @local_bibdb = node.attr("local-cache") ?
76
- open_cache_biblio(node, false) : nil
75
+ @no_isobib = node.attr("no-isobib")
76
+ @bibdb = nil
77
+ init_bib_caches(node)
78
+ end
79
+
80
+ def init_bib_caches(node)
81
+ unless (@no_isobib_cache || @no_isobib)
82
+ globalname = bibliocache_name(true)
83
+ localname = bibliocache_name(false) if node.attr("local-cache")
84
+ if node.attr("flush-caches")
85
+ system("rm -f #{globalname}") unless globalname.nil?
86
+ system("rm -f #{localname}") unless localname.nil?
87
+ end
88
+ end
89
+ @bibdb = Relaton::Db.new(globalname, localname) unless @no_isobib
77
90
  end
78
91
 
79
92
  def default_fonts(node)
@@ -106,8 +119,7 @@ module Asciidoctor
106
119
  result << noko { |ixml| front node, ixml }
107
120
  result << noko { |ixml| middle node, ixml }
108
121
  result << "</iso-standard>"
109
- save_cache_biblio(@bibdb, true)
110
- save_cache_biblio(@local_bibdb, false)
122
+ @bibdb.save() if @bibdb
111
123
  textcleanup(result.flatten * "\n")
112
124
  end
113
125
 
@@ -37,7 +37,7 @@
37
37
  <define name="edition">
38
38
  <a:documentation>ISO-15924: Latn</a:documentation>
39
39
  <element name="edition">
40
- <data type="int"/>
40
+ <text/>
41
41
  </element>
42
42
  </define>
43
43
  <define name="LocalizedString">
@@ -102,9 +102,12 @@
102
102
  <attribute name="type">
103
103
  <choice>
104
104
  <value>author</value>
105
- <value>edition</value>
105
+ <value>performer</value>
106
106
  <value>publisher</value>
107
- <text/>
107
+ <value>editor</value>
108
+ <value>adapter</value>
109
+ <value>translator</value>
110
+ <value>distributor</value>
108
111
  </choice>
109
112
  </attribute>
110
113
  </optional>
@@ -145,18 +148,26 @@
145
148
  </define>
146
149
  <define name="fullname">
147
150
  <element name="name">
151
+ <choice>
152
+ <group>
153
+ <zeroOrMore>
154
+ <ref name="prefix"/>
155
+ </zeroOrMore>
156
+ <zeroOrMore>
157
+ <ref name="forename"/>
158
+ </zeroOrMore>
159
+ <zeroOrMore>
160
+ <ref name="initial"/>
161
+ </zeroOrMore>
162
+ <ref name="surname"/>
163
+ <zeroOrMore>
164
+ <ref name="addition"/>
165
+ </zeroOrMore>
166
+ </group>
167
+ <ref name="completeName"/>
168
+ </choice>
148
169
  <zeroOrMore>
149
- <ref name="prefix"/>
150
- </zeroOrMore>
151
- <zeroOrMore>
152
- <ref name="forename"/>
153
- </zeroOrMore>
154
- <zeroOrMore>
155
- <ref name="initial"/>
156
- </zeroOrMore>
157
- <ref name="surname"/>
158
- <zeroOrMore>
159
- <ref name="addition"/>
170
+ <ref name="biblionote"/>
160
171
  </zeroOrMore>
161
172
  </element>
162
173
  </define>
@@ -185,6 +196,11 @@
185
196
  <ref name="LocalizedString"/>
186
197
  </element>
187
198
  </define>
199
+ <define name="completeName">
200
+ <element name="completename">
201
+ <ref name="LocalizedString"/>
202
+ </element>
203
+ </define>
188
204
  <define name="affiliation">
189
205
  <element name="affiliation">
190
206
  <optional>
@@ -209,6 +225,9 @@
209
225
  <define name="organization">
210
226
  <element name="organization">
211
227
  <ref name="orgname"/>
228
+ <optional>
229
+ <ref name="subdivision"/>
230
+ </optional>
212
231
  <optional>
213
232
  <ref name="abbreviation"/>
214
233
  </optional>
@@ -228,6 +247,11 @@
228
247
  <ref name="LocalizedString"/>
229
248
  </element>
230
249
  </define>
250
+ <define name="subdivision">
251
+ <element name="subdivision">
252
+ <ref name="LocalizedString"/>
253
+ </element>
254
+ </define>
231
255
  <define name="abbreviation">
232
256
  <element name="abbreviation">
233
257
  <ref name="LocalizedString"/>
@@ -346,19 +370,21 @@
346
370
  </define>
347
371
  <define name="locality">
348
372
  <element name="locality">
349
- <!-- attribute type { ( "section" | "clause" | "part" | "paragraph" | "chapter" | "page" | "whole" | "table" | "annex" | "figure" | "note" | "example" | ("locality:", text) ) }, -->
350
- <attribute name="type">
351
- <ref name="LocalityType"/>
352
- </attribute>
353
- <ref name="referenceFrom"/>
354
- <optional>
355
- <ref name="referenceTo"/>
356
- </optional>
373
+ <ref name="BibItemLocality"/>
357
374
  </element>
358
375
  </define>
376
+ <define name="BibItemLocality">
377
+ <attribute name="type">
378
+ <ref name="LocalityType"/>
379
+ </attribute>
380
+ <ref name="referenceFrom"/>
381
+ <optional>
382
+ <ref name="referenceTo"/>
383
+ </optional>
384
+ </define>
359
385
  <define name="LocalityType">
360
386
  <data type="string">
361
- <param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|example|locality:[a-zA-Z0-9_]+</param>
387
+ <param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|example|volume|issue|locality:[a-zA-Z0-9_]+</param>
362
388
  </data>
363
389
  </define>
364
390
  <define name="referenceFrom">
@@ -398,6 +424,18 @@
398
424
  <value>techreport</value>
399
425
  <value>standard</value>
400
426
  <value>unpublished</value>
427
+ <value>map</value>
428
+ <value>electronic resource</value>
429
+ <value>audiovisual</value>
430
+ <value>film</value>
431
+ <value>video</value>
432
+ <value>broadcast</value>
433
+ <value>graphic work</value>
434
+ <value>music</value>
435
+ <value>patent</value>
436
+ <value>inbook</value>
437
+ <value>incollection</value>
438
+ <value>inproceedings</value>
401
439
  </choice>
402
440
  </define>
403
441
  <define name="BibliographicItem">
@@ -442,20 +480,41 @@
442
480
  <optional>
443
481
  <ref name="status"/>
444
482
  </optional>
445
- <zeroOrMore>
483
+ <optional>
446
484
  <ref name="copyright"/>
447
- </zeroOrMore>
485
+ </optional>
448
486
  <zeroOrMore>
449
487
  <ref name="docrelation"/>
450
488
  </zeroOrMore>
489
+ <zeroOrMore>
490
+ <ref name="series"/>
491
+ </zeroOrMore>
492
+ <optional>
493
+ <ref name="medium"/>
494
+ </optional>
495
+ <zeroOrMore>
496
+ <ref name="bplace"/>
497
+ </zeroOrMore>
498
+ <zeroOrMore>
499
+ <ref name="extent"/>
500
+ </zeroOrMore>
501
+ <zeroOrMore>
502
+ <ref name="accesslocation"/>
503
+ </zeroOrMore>
504
+ <optional>
505
+ <ref name="bclassification"/>
506
+ </optional>
507
+ <optional>
508
+ <ref name="validity"/>
509
+ </optional>
451
510
  </define>
452
511
  <define name="btitle">
453
512
  <element name="title">
454
- <ref name="FormattedString"/>
513
+ <ref name="TypedTitleString"/>
455
514
  </element>
456
515
  </define>
457
516
  <define name="bsource">
458
- <element name="source">
517
+ <element name="uri">
459
518
  <ref name="TypedUri"/>
460
519
  </element>
461
520
  </define>
@@ -464,17 +523,68 @@
464
523
  <ref name="FormattedString"/>
465
524
  </element>
466
525
  </define>
467
- <define name="link">
468
- <element name="link">
469
- <ref name="TypedUri"/>
526
+ <define name="validity">
527
+ <element name="validity">
528
+ <optional>
529
+ <ref name="validityBegins"/>
530
+ </optional>
531
+ <optional>
532
+ <ref name="validityEnds"/>
533
+ </optional>
534
+ <optional>
535
+ <ref name="validityRevision"/>
536
+ </optional>
537
+ </element>
538
+ </define>
539
+ <define name="validityBegins">
540
+ <element name="validityBegins">
541
+ <data type="dateTime"/>
542
+ </element>
543
+ </define>
544
+ <define name="validityEnds">
545
+ <element name="validityEnds">
546
+ <data type="dateTime"/>
470
547
  </element>
471
548
  </define>
549
+ <define name="validityRevision">
550
+ <element name="revision">
551
+ <data type="dateTime"/>
552
+ </element>
553
+ </define>
554
+ <define name="TypedTitleString">
555
+ <optional>
556
+ <attribute name="type">
557
+ <ref name="TitleType"/>
558
+ </attribute>
559
+ </optional>
560
+ <ref name="FormattedString"/>
561
+ </define>
562
+ <define name="TitleType">
563
+ <choice>
564
+ <value>alternative</value>
565
+ <value>original</value>
566
+ <value>unofficial</value>
567
+ <value>subtitle</value>
568
+ <value>main</value>
569
+ </choice>
570
+ </define>
472
571
  <define name="TypedUri">
473
572
  <optional>
474
573
  <attribute name="type"/>
475
574
  </optional>
476
575
  <data type="anyURI"/>
477
576
  </define>
577
+ <define name="DateType">
578
+ <optional>
579
+ <attribute name="text"/>
580
+ </optional>
581
+ <optional>
582
+ <choice>
583
+ <data type="gYear"/>
584
+ <data type="date"/>
585
+ </choice>
586
+ </optional>
587
+ </define>
478
588
  <define name="bdate">
479
589
  <element name="date">
480
590
  <attribute name="type">
@@ -487,9 +597,10 @@
487
597
  <value>confirmed</value>
488
598
  <value>updated</value>
489
599
  <value>issued</value>
600
+ <value>transmitted</value>
601
+ <value>copied</value>
490
602
  </choice>
491
603
  </attribute>
492
- <!-- ( ( bfrom, bto? ) | date_on ) -->
493
604
  <choice>
494
605
  <group>
495
606
  <element name="from">
@@ -516,35 +627,126 @@
516
627
  </choice>
517
628
  </element>
518
629
  </define>
519
- <define name="bfrom">
520
- <element name="from">
630
+ <define name="docidentifier">
631
+ <element name="docidentifier">
632
+ <optional>
633
+ <attribute name="type"/>
634
+ </optional>
635
+ <text/>
636
+ </element>
637
+ </define>
638
+ <define name="bclassification">
639
+ <element name="classification">
640
+ <optional>
641
+ <attribute name="type"/>
642
+ </optional>
643
+ <text/>
644
+ </element>
645
+ </define>
646
+ <define name="bplace">
647
+ <element name="place">
648
+ <text/>
649
+ </element>
650
+ </define>
651
+ <define name="medium">
652
+ <element name="medium">
653
+ <optional>
654
+ <ref name="form"/>
655
+ </optional>
656
+ <optional>
657
+ <ref name="size"/>
658
+ </optional>
659
+ <optional>
660
+ <ref name="scale"/>
661
+ </optional>
662
+ </element>
663
+ </define>
664
+ <define name="form">
665
+ <element name="form">
666
+ <text/>
667
+ </element>
668
+ </define>
669
+ <define name="size">
670
+ <element name="size">
671
+ <text/>
672
+ </element>
673
+ </define>
674
+ <define name="scale">
675
+ <element name="scale">
676
+ <text/>
677
+ </element>
678
+ </define>
679
+ <define name="accesslocation">
680
+ <element name="accesslocation">
681
+ <text/>
682
+ </element>
683
+ </define>
684
+ <define name="extent">
685
+ <element name="extent">
686
+ <ref name="BibItemLocality"/>
687
+ </element>
688
+ </define>
689
+ <define name="series">
690
+ <element name="series">
691
+ <optional>
692
+ <attribute name="type">
693
+ <choice>
694
+ <value>main</value>
695
+ <value>alt</value>
696
+ </choice>
697
+ </attribute>
698
+ </optional>
521
699
  <choice>
522
- <data type="gYear"/>
523
- <data type="date"/>
700
+ <ref name="btitle"/>
701
+ <ref name="formattedref"/>
524
702
  </choice>
703
+ <ref name="bplace"/>
704
+ <ref name="seriesorganization"/>
705
+ <optional>
706
+ <ref name="abbreviation"/>
707
+ </optional>
708
+ <optional>
709
+ <ref name="seriesfrom"/>
710
+ </optional>
711
+ <optional>
712
+ <ref name="seriesto"/>
713
+ </optional>
714
+ <optional>
715
+ <ref name="seriesnumber"/>
716
+ </optional>
717
+ <optional>
718
+ <ref name="seriespartnumber"/>
719
+ </optional>
525
720
  </element>
526
721
  </define>
527
- <define name="bto">
528
- <element name="to">
722
+ <define name="seriesorganization">
723
+ <element name="organization">
724
+ <text/>
725
+ </element>
726
+ </define>
727
+ <define name="seriesfrom">
728
+ <element name="from">
529
729
  <choice>
730
+ <data type="dateTime"/>
530
731
  <data type="gYear"/>
531
- <data type="date"/>
532
732
  </choice>
533
733
  </element>
534
734
  </define>
535
- <define name="date_on">
536
- <element name="on">
735
+ <define name="seriesto">
736
+ <element name="to">
537
737
  <choice>
738
+ <data type="dateTime"/>
538
739
  <data type="gYear"/>
539
- <data type="date"/>
540
740
  </choice>
541
741
  </element>
542
742
  </define>
543
- <define name="docidentifier">
544
- <element name="docidentifier">
545
- <optional>
546
- <attribute name="type"/>
547
- </optional>
743
+ <define name="seriesnumber">
744
+ <element name="number">
745
+ <text/>
746
+ </element>
747
+ </define>
748
+ <define name="seriespartnumber">
749
+ <element name="partnumber">
548
750
  <text/>
549
751
  </element>
550
752
  </define>
@@ -586,17 +788,20 @@
586
788
  <element name="relation">
587
789
  <attribute name="type">
588
790
  <choice>
589
- <value>parent</value>
590
- <value>child</value>
591
791
  <value>obsoletes</value>
592
792
  <value>updates</value>
593
793
  <value>updatedBy</value>
594
794
  <value>complements</value>
595
795
  <value>derivedFrom</value>
796
+ <value>translatedFrom</value>
596
797
  <value>adoptedFrom</value>
597
798
  <value>equivalent</value>
598
799
  <value>identical</value>
599
800
  <value>nonequivalent</value>
801
+ <value>includedIn</value>
802
+ <value>includes</value>
803
+ <value>instance</value>
804
+ <value>partOf</value>
600
805
  </choice>
601
806
  </attribute>
602
807
  <element name="bibitem">