relaton-bib 2.0.0.pre.alpha.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/.rubocop.yml +1 -1
- data/CLAUDE.md +96 -0
- data/Gemfile +1 -0
- data/README.adoc +14 -2
- data/grammars/basicdoc.rng +75 -45
- data/grammars/biblio-standoc.rng +37 -56
- data/grammars/biblio.rng +68 -36
- data/grammars/versions.json +25 -25
- data/lib/relaton/bib/converter/asciibib/to_asciibib.rb +663 -0
- data/lib/relaton/bib/converter/asciibib.rb +13 -0
- data/lib/relaton/bib/converter/bibtex/from_bibtex.rb +245 -0
- data/lib/relaton/bib/converter/bibtex/to_bibtex.rb +341 -0
- data/lib/relaton/bib/converter/bibtex.rb +23 -0
- data/lib/relaton/bib/converter/bibxml/from_rfcxml.rb +383 -0
- data/lib/relaton/bib/converter/bibxml/from_rfcxml_referencegroup.rb +71 -0
- data/lib/relaton/bib/{renderer/rfc.rb → converter/bibxml/to_rfcxml.rb} +100 -92
- data/lib/relaton/bib/converter/bibxml/to_rfcxml_referencegroup.rb +52 -0
- data/lib/relaton/bib/converter/bibxml.rb +51 -0
- data/lib/relaton/bib/hash_parser_v1.rb +121 -78
- data/lib/relaton/bib/item_data.rb +83 -22
- data/lib/relaton/bib/model/abstract.rb +16 -0
- data/lib/relaton/bib/model/date.rb +6 -4
- data/lib/relaton/bib/model/depiction.rb +2 -0
- data/lib/relaton/bib/model/ext.rb +0 -3
- data/lib/relaton/bib/model/formattedref.rb +43 -0
- data/lib/relaton/bib/model/ics.rb +9 -0
- data/lib/relaton/bib/model/item.rb +12 -4
- data/lib/relaton/bib/model/item_base.rb +17 -9
- data/lib/relaton/bib/model/keyword.rb +3 -3
- data/lib/relaton/bib/model/logo.rb +2 -0
- data/lib/relaton/bib/model/organization_type.rb +1 -1
- data/lib/relaton/bib/model/relation.rb +2 -2
- data/lib/relaton/bib/model/series.rb +5 -3
- data/lib/relaton/bib/model/subdivision.rb +2 -0
- data/lib/relaton/bib/model/title.rb +38 -0
- data/lib/relaton/bib/model/type/string_date.rb +48 -0
- data/lib/relaton/bib/model/validity.rb +3 -3
- data/lib/relaton/bib/namespace_helper.rb +21 -0
- data/lib/relaton/bib/version.rb +1 -1
- data/lib/relaton/bib.rb +5 -82
- data/relaton-bib.gemspec +5 -2
- metadata +63 -29
- data/lib/relaton/bib/model/editorial_group.rb +0 -14
- data/lib/relaton/bib/model/technical_committee.rb +0 -14
- data/lib/relaton/bib/model/workgroup.rb +0 -20
- data/lib/relaton/bib/parser/rfc_address.rb +0 -60
- data/lib/relaton/bib/parser/rfc_contacts.rb +0 -35
- data/lib/relaton/bib/parser/rfc_docidentifier.rb +0 -70
- data/lib/relaton/bib/parser/rfc_organization.rb +0 -31
- data/lib/relaton/bib/parser/rfc_person.rb +0 -42
- data/lib/relaton/bib/parser/rfc_reference.rb +0 -143
- data/lib/relaton/bib/parser/rfc_referencegroup.rb +0 -45
- data/lib/relaton/bib/parser/rfc_shared.rb +0 -23
- data/lib/relaton/bib/renderer/bibtex_builder.rb +0 -348
- data/lib/relaton/bibtex_parser.rb +0 -243
- data/lib/relaton/bibxml_parser.rb +0 -419
- data/lib/relaton/deep_dup.rb +0 -30
- data/lib/relaton/hit.rb +0 -52
- data/lib/relaton/hit_collection.rb +0 -105
- data/lib/relaton/workers_pool.rb +0 -43
- data/lib/relaton/xml_parser.rb +0 -716
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f0dda50ff6033e0640ffeb6e18596373c644c9704206159f4447a5ccc7f8ec4b
|
|
4
|
+
data.tar.gz: 2d0d134b521224759c9636fbb3aff0f283ec6028a22e8bc0e554aa3795dcdc1a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cfaa4b06692c17d90018c4e54f5efaa91be82f49be3008730a46814433bf2f2dcd7ff3541b2369bf898401b620bbd19adad1752232e3b5a6eeb1ec3ab2914a38
|
|
7
|
+
data.tar.gz: ff217c62b41988af9300bf4dfafd1c469d76254dd2c9402199b0d88418c23c8d7e020ca069b4074cb1d0909fdb57abdd8a0391eb855b9d8d1528548050313caf
|
data/.gitignore
CHANGED
|
@@ -11,5 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
# rspec failure tracking
|
|
13
13
|
.rspec_status
|
|
14
|
-
.rubocop-https---raw-githubusercontent-com-riboseinc-oss-guides-master-ci-rubocop-yml
|
|
15
14
|
Gemfile.lock
|
|
15
|
+
.claude/
|
|
16
|
+
.rubocop-remote-87c7cdd254a8d09d005ee06efac7acc0.yml
|
|
17
|
+
rubocop-87c7cdd254a8d09d005ee06efac7acc0.yml
|
data/.rubocop.yml
CHANGED
data/CLAUDE.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
RelatonBib is a Ruby gem that implements the [BibliographicItem model](https://github.com/metanorma/relaton-models#bibliography-uml-models) for bibliographic reference management. It's part of the Relaton ecosystem and serves as the base library for other Relaton gems.
|
|
8
|
+
|
|
9
|
+
## Common Commands
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Install dependencies
|
|
13
|
+
bundle install
|
|
14
|
+
|
|
15
|
+
# Run all tests
|
|
16
|
+
bundle exec rake spec
|
|
17
|
+
|
|
18
|
+
# Run a single test file
|
|
19
|
+
bundle exec rspec spec/relaton_bib/bibliographic_item_spec.rb
|
|
20
|
+
|
|
21
|
+
# Run a specific test by line number
|
|
22
|
+
bundle exec rspec spec/relaton_bib/bibliographic_item_spec.rb:42
|
|
23
|
+
|
|
24
|
+
# Run linting
|
|
25
|
+
bundle exec rubocop
|
|
26
|
+
|
|
27
|
+
# Auto-fix linting issues
|
|
28
|
+
bundle exec rubocop -a
|
|
29
|
+
|
|
30
|
+
# Interactive console
|
|
31
|
+
bin/console
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Architecture
|
|
35
|
+
|
|
36
|
+
### Serialization Layer (lutaml-model)
|
|
37
|
+
|
|
38
|
+
The codebase uses [lutaml-model](https://github.com/lutaml/lutaml-model) for serialization. Each model class in `lib/relaton/bib/model/` inherits from `Lutaml::Model::Serializable` and declares attributes with XML/YAML/JSON mappings.
|
|
39
|
+
|
|
40
|
+
### Core Classes
|
|
41
|
+
|
|
42
|
+
**`Relaton::Bib::Item`** ([lib/relaton/bib/model/item.rb](lib/relaton/bib/model/item.rb)) - The main serialization class defining all bibliographic attributes and their XML mappings. Uses `ItemData` as its underlying model.
|
|
43
|
+
|
|
44
|
+
**`Relaton::Bib::ItemData`** ([lib/relaton/bib/item_data.rb](lib/relaton/bib/item_data.rb)) - The data container class that holds bibliographic data and provides conversion methods (`to_xml`, `to_yaml`, `to_bibtex`, `to_rfcxml`). This separation allows the same data to be serialized differently (bibitem vs bibdata).
|
|
45
|
+
|
|
46
|
+
**`Relaton::Bib::Bibitem`** and **`Relaton::Bib::Bibdata`** - Variants of `Item` with different XML root elements and attributes (bibitem excludes `ext`, bibdata excludes `id`).
|
|
47
|
+
|
|
48
|
+
### Component Models
|
|
49
|
+
|
|
50
|
+
Each bibliographic attribute has its own class in `lib/relaton/bib/model/`:
|
|
51
|
+
|
|
52
|
+
- `Title`, `LocalizedString`, `LocalizedMarkedUpString` - text with language/script
|
|
53
|
+
- `Contributor`, `Person`, `Organization` - contributors and affiliations
|
|
54
|
+
- `Docidentifier` - document IDs (DOI, ISBN, etc.)
|
|
55
|
+
- `Date` - publication dates with custom `StringDate` type
|
|
56
|
+
- `Relation` - related documents (circular reference with Item)
|
|
57
|
+
- `Ext` - extension data (doctype, ICS codes, structured identifiers)
|
|
58
|
+
|
|
59
|
+
### Parsing
|
|
60
|
+
|
|
61
|
+
- **`HashParserV1`** ([lib/relaton/bib/hash_parser_v1.rb](lib/relaton/bib/hash_parser_v1.rb)) - Converts legacy Hash/YAML format to `ItemData`
|
|
62
|
+
- **`Converter::BibXml`** ([lib/relaton/bib/converter/bibxml.rb](lib/relaton/bib/converter/bibxml.rb)) - Parses RFC BibXML format via `Relaton::Bib::Converter::BibXml.to_item`
|
|
63
|
+
- **lutaml-model native** - `Item.from_xml`, `Item.from_yaml`, `Item.from_json` handle current format
|
|
64
|
+
|
|
65
|
+
### Rendering
|
|
66
|
+
|
|
67
|
+
- **`Renderer::BibtexBuilder`** - Converts `ItemData` to BibTeX format
|
|
68
|
+
- **`Converter::BibXml`** - Converts `ItemData` to RFC XML format via `Relaton::Bib::Converter::BibXml.to_xml`
|
|
69
|
+
- **lutaml-model native** - `to_xml`, `to_yaml`, `to_json` via the serialization classes
|
|
70
|
+
|
|
71
|
+
### Usage Pattern
|
|
72
|
+
|
|
73
|
+
```ruby
|
|
74
|
+
# Parse from YAML
|
|
75
|
+
item = Relaton::Bib::Item.from_yaml(yaml_string)
|
|
76
|
+
|
|
77
|
+
# Parse from XML
|
|
78
|
+
item = Relaton::Bib::Bibitem.from_xml(xml_string)
|
|
79
|
+
item = Relaton::Bib::Bibdata.from_xml(xml_string)
|
|
80
|
+
|
|
81
|
+
# Parse from RFC XML
|
|
82
|
+
item = Relaton::Bib::Converter::BibXml.to_item(xml_string)
|
|
83
|
+
|
|
84
|
+
# Convert to different formats (returns string)
|
|
85
|
+
item.to_xml # as <bibitem>
|
|
86
|
+
item.to_xml(bibdata: true) # as <bibdata>
|
|
87
|
+
item.to_yaml
|
|
88
|
+
item.to_bibtex
|
|
89
|
+
item.to_rfcxml
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Code Style
|
|
93
|
+
|
|
94
|
+
- Follows Ribose OSS Ruby style guide (inherited via `.rubocop.yml`)
|
|
95
|
+
- Target Ruby version: 3.1+
|
|
96
|
+
- Uses YARD documentation comments
|
data/Gemfile
CHANGED
data/README.adoc
CHANGED
|
@@ -180,7 +180,7 @@ Relaton::Bib::Item.from_yaml yaml
|
|
|
180
180
|
xml = File.read 'spec/fixtures/rfc.xml'
|
|
181
181
|
=> "<reference anchor=\"RFC1\" target=\"10.17487/RFC0001\">\n <front>\n <title>Title RFC1</title>\n <seriesInf..."
|
|
182
182
|
|
|
183
|
-
Relaton::Bib::
|
|
183
|
+
Relaton::Bib::Converter::BibXml.to_item xml
|
|
184
184
|
=> #<Relaton::Bib::ItemData:0x000000011dc9fc98 ...
|
|
185
185
|
----
|
|
186
186
|
|
|
@@ -202,7 +202,7 @@ item = Relaton::Bib::Bibdata.from_xml xml
|
|
|
202
202
|
|
|
203
203
|
[source,ruby]
|
|
204
204
|
----
|
|
205
|
-
Relaton::Bib::BibtexParser.from_bibtex File.read('spec/
|
|
205
|
+
Relaton::Bib::BibtexParser.from_bibtex File.read('spec/fixtures/techreport.bib')
|
|
206
206
|
=> {"ISOTC211"=>
|
|
207
207
|
#<Relaton::Bib::Item:0x007fedee0a2ab0
|
|
208
208
|
...
|
|
@@ -221,6 +221,18 @@ formattedref: ISO 123:1994
|
|
|
221
221
|
...
|
|
222
222
|
----
|
|
223
223
|
|
|
224
|
+
=== Export bibliographic item to Hash
|
|
225
|
+
|
|
226
|
+
[source,ruby]
|
|
227
|
+
----
|
|
228
|
+
item.to_h
|
|
229
|
+
=> {"id"=>"ISO1231994",
|
|
230
|
+
"type"=>"standard",
|
|
231
|
+
"schema_version"=>"...",
|
|
232
|
+
"title"=>[...],
|
|
233
|
+
...}
|
|
234
|
+
----
|
|
235
|
+
|
|
224
236
|
=== Export bibliographic item to BibTeX
|
|
225
237
|
|
|
226
238
|
[source,ruby]
|
data/grammars/basicdoc.rng
CHANGED
|
@@ -187,6 +187,15 @@ Applicable to modify and delete</a:documentation>
|
|
|
187
187
|
<a:documentation>Optional caption of this block</a:documentation>
|
|
188
188
|
</attribute>
|
|
189
189
|
</optional>
|
|
190
|
+
<optional>
|
|
191
|
+
<attribute name="position">
|
|
192
|
+
<a:documentation>For an "add" change, whether the change is added before or after the location</a:documentation>
|
|
193
|
+
<choice>
|
|
194
|
+
<value>before</value>
|
|
195
|
+
<value>after</value>
|
|
196
|
+
</choice>
|
|
197
|
+
</attribute>
|
|
198
|
+
</optional>
|
|
190
199
|
<optional>
|
|
191
200
|
<element name="location">
|
|
192
201
|
<a:documentation>The location(s) in the original document which have undergone the change described in this block</a:documentation>
|
|
@@ -198,21 +207,25 @@ Applicable to modify and delete</a:documentation>
|
|
|
198
207
|
</zeroOrMore>
|
|
199
208
|
</element>
|
|
200
209
|
</optional>
|
|
201
|
-
<
|
|
210
|
+
<zeroOrMore>
|
|
202
211
|
<element name="description">
|
|
203
|
-
<a:documentation>Description of the change described in this block</a:documentation>
|
|
204
|
-
<
|
|
212
|
+
<a:documentation>Description(s) of the change described in this block</a:documentation>
|
|
213
|
+
<oneOrMore>
|
|
205
214
|
<ref name="BasicBlock"/>
|
|
206
|
-
</
|
|
215
|
+
</oneOrMore>
|
|
207
216
|
</element>
|
|
208
|
-
</
|
|
217
|
+
</zeroOrMore>
|
|
209
218
|
<optional>
|
|
210
219
|
<element name="newcontent">
|
|
211
|
-
<a:documentation>New content to be added to the document; applicable to add and modify
|
|
220
|
+
<a:documentation>New content to be added to the document; applicable to add and modify.
|
|
221
|
+
Can be blocks and/or sections</a:documentation>
|
|
212
222
|
<ref name="OptionalId"/>
|
|
213
223
|
<zeroOrMore>
|
|
214
224
|
<ref name="BasicBlock"/>
|
|
215
225
|
</zeroOrMore>
|
|
226
|
+
<zeroOrMore>
|
|
227
|
+
<ref name="section"/>
|
|
228
|
+
</zeroOrMore>
|
|
216
229
|
</element>
|
|
217
230
|
</optional>
|
|
218
231
|
<zeroOrMore>
|
|
@@ -267,6 +280,10 @@ in a document (e.g. sourcecode annotations)</a:documentation>
|
|
|
267
280
|
<value>justified</value>
|
|
268
281
|
</choice>
|
|
269
282
|
</define>
|
|
283
|
+
<define name="IdRefType">
|
|
284
|
+
<a:documentation>Type of cross-references to elements. In BasicDoc, these always point to id { xsd:ID } </a:documentation>
|
|
285
|
+
<data type="IDREF"/>
|
|
286
|
+
</define>
|
|
270
287
|
<define name="RequiredId">
|
|
271
288
|
<a:documentation>Mandatory anchor of element, to be used for cross-references within the document</a:documentation>
|
|
272
289
|
<attribute name="id">
|
|
@@ -382,33 +399,7 @@ in a document (e.g. sourcecode annotations)</a:documentation>
|
|
|
382
399
|
<a:documentation>Block intended to capture reviewer comments about some text in the document</a:documentation>
|
|
383
400
|
<element name="review">
|
|
384
401
|
<ref name="RequiredId"/>
|
|
385
|
-
<
|
|
386
|
-
<a:documentation>The party who has offered the comment</a:documentation>
|
|
387
|
-
</attribute>
|
|
388
|
-
<optional>
|
|
389
|
-
<attribute name="type">
|
|
390
|
-
<a:documentation>The type of reviewer comment</a:documentation>
|
|
391
|
-
</attribute>
|
|
392
|
-
</optional>
|
|
393
|
-
<optional>
|
|
394
|
-
<attribute name="date">
|
|
395
|
-
<a:documentation>The date when the comment was made</a:documentation>
|
|
396
|
-
<data type="dateTime"/>
|
|
397
|
-
</attribute>
|
|
398
|
-
</optional>
|
|
399
|
-
<optional>
|
|
400
|
-
<attribute name="from">
|
|
401
|
-
<a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
|
|
402
|
-
If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
|
|
403
|
-
<data type="IDREF"/>
|
|
404
|
-
</attribute>
|
|
405
|
-
</optional>
|
|
406
|
-
<optional>
|
|
407
|
-
<attribute name="to">
|
|
408
|
-
<a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
|
|
409
|
-
<data type="IDREF"/>
|
|
410
|
-
</attribute>
|
|
411
|
-
</optional>
|
|
402
|
+
<ref name="ReviewAttributes"/>
|
|
412
403
|
<oneOrMore>
|
|
413
404
|
<ref name="paragraph">
|
|
414
405
|
<a:documentation>Reviewer comments content</a:documentation>
|
|
@@ -416,6 +407,35 @@ If not provided, the comment applies in the vicinity of the place it has been in
|
|
|
416
407
|
</oneOrMore>
|
|
417
408
|
</element>
|
|
418
409
|
</define>
|
|
410
|
+
<define name="ReviewAttributes">
|
|
411
|
+
<attribute name="reviewer">
|
|
412
|
+
<a:documentation>The party who has offered the comment</a:documentation>
|
|
413
|
+
</attribute>
|
|
414
|
+
<optional>
|
|
415
|
+
<attribute name="type">
|
|
416
|
+
<a:documentation>The type of reviewer comment</a:documentation>
|
|
417
|
+
</attribute>
|
|
418
|
+
</optional>
|
|
419
|
+
<optional>
|
|
420
|
+
<attribute name="date">
|
|
421
|
+
<a:documentation>The date when the comment was made</a:documentation>
|
|
422
|
+
<data type="dateTime"/>
|
|
423
|
+
</attribute>
|
|
424
|
+
</optional>
|
|
425
|
+
<optional>
|
|
426
|
+
<attribute name="from">
|
|
427
|
+
<a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
|
|
428
|
+
If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
|
|
429
|
+
<ref name="IdRefType"/>
|
|
430
|
+
</attribute>
|
|
431
|
+
</optional>
|
|
432
|
+
<optional>
|
|
433
|
+
<attribute name="to">
|
|
434
|
+
<a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
|
|
435
|
+
<ref name="IdRefType"/>
|
|
436
|
+
</attribute>
|
|
437
|
+
</optional>
|
|
438
|
+
</define>
|
|
419
439
|
<define name="NumberingAttributes">
|
|
420
440
|
<optional>
|
|
421
441
|
<attribute name="unnumbered">
|
|
@@ -857,6 +877,7 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
|
857
877
|
<define name="tr">
|
|
858
878
|
<a:documentation>Sequence of cells to be displayed as a row in a table</a:documentation>
|
|
859
879
|
<element name="tr">
|
|
880
|
+
<ref name="TrAttributes"/>
|
|
860
881
|
<oneOrMore>
|
|
861
882
|
<choice>
|
|
862
883
|
<ref name="td">
|
|
@@ -869,6 +890,9 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
|
869
890
|
</oneOrMore>
|
|
870
891
|
</element>
|
|
871
892
|
</define>
|
|
893
|
+
<define name="TrAttributes">
|
|
894
|
+
<empty/>
|
|
895
|
+
</define>
|
|
872
896
|
<define name="tr-no-id">
|
|
873
897
|
<a:documentation>Sequence of cells to be displayed as a row in a table: optional ID attributes recursively (for use in Relaton, metadata)</a:documentation>
|
|
874
898
|
<element name="tr">
|
|
@@ -1280,13 +1304,13 @@ Restricted recursively to contain only other such inline elements with no identi
|
|
|
1280
1304
|
<ref name="pure_strike"/>
|
|
1281
1305
|
<ref name="pure_smallcap"/>
|
|
1282
1306
|
<ref name="br"/>
|
|
1307
|
+
<ref name="stem"/>
|
|
1283
1308
|
</choice>
|
|
1284
1309
|
</define>
|
|
1285
1310
|
<define name="NestedTextElement">
|
|
1286
1311
|
<a:documentation>Contents of TextElement tags: leaves out tags that should occur only at top level of block: bookmark image hr pagebreak</a:documentation>
|
|
1287
1312
|
<choice>
|
|
1288
1313
|
<ref name="PureTextElement"/>
|
|
1289
|
-
<ref name="stem"/>
|
|
1290
1314
|
<ref name="eref"/>
|
|
1291
1315
|
<ref name="xref"/>
|
|
1292
1316
|
<ref name="hyperlink"/>
|
|
@@ -1497,7 +1521,7 @@ Restricted recursively to contain only other such inline elements with no identi
|
|
|
1497
1521
|
<attribute name="to">
|
|
1498
1522
|
<a:documentation>A reference to an anchor element (typically a bookmark),
|
|
1499
1523
|
to indicate that the index range covers a range of locations between the current index element and the `to` anchor</a:documentation>
|
|
1500
|
-
<
|
|
1524
|
+
<ref name="IdRefType"/>
|
|
1501
1525
|
</attribute>
|
|
1502
1526
|
</optional>
|
|
1503
1527
|
<ref name="index-primary">
|
|
@@ -1655,7 +1679,7 @@ which can be bookmarks as well as block or section references</a:documentation>
|
|
|
1655
1679
|
<define name="XrefAttributes">
|
|
1656
1680
|
<attribute name="target">
|
|
1657
1681
|
<a:documentation>The identifier of a section, block or inlined element being referenced</a:documentation>
|
|
1658
|
-
<
|
|
1682
|
+
<ref name="IdRefType"/>
|
|
1659
1683
|
</attribute>
|
|
1660
1684
|
<optional>
|
|
1661
1685
|
<attribute name="type">
|
|
@@ -1694,23 +1718,29 @@ which can be bookmarks as well as block or section references</a:documentation>
|
|
|
1694
1718
|
<a:documentation>Inline reference to a paragraph or paragraphs, appearing as a footnote.
|
|
1695
1719
|
The target of a footnote is the location it is embedded in within the text</a:documentation>
|
|
1696
1720
|
<element name="fn">
|
|
1697
|
-
<
|
|
1698
|
-
|
|
1699
|
-
</attribute>
|
|
1700
|
-
<oneOrMore>
|
|
1701
|
-
<ref name="paragraph">
|
|
1702
|
-
<a:documentation>The content of the footnote</a:documentation>
|
|
1703
|
-
</ref>
|
|
1704
|
-
</oneOrMore>
|
|
1721
|
+
<ref name="FnAttributes"/>
|
|
1722
|
+
<ref name="FnBody"/>
|
|
1705
1723
|
</element>
|
|
1706
1724
|
</define>
|
|
1725
|
+
<define name="FnBody">
|
|
1726
|
+
<oneOrMore>
|
|
1727
|
+
<ref name="paragraph">
|
|
1728
|
+
<a:documentation>The content of the footnote</a:documentation>
|
|
1729
|
+
</ref>
|
|
1730
|
+
</oneOrMore>
|
|
1731
|
+
</define>
|
|
1732
|
+
<define name="FnAttributes">
|
|
1733
|
+
<attribute name="reference">
|
|
1734
|
+
<a:documentation>The number of the footnote, used to identify it visually</a:documentation>
|
|
1735
|
+
</attribute>
|
|
1736
|
+
</define>
|
|
1707
1737
|
<define name="callout">
|
|
1708
1738
|
<a:documentation>Inline reference to a paragraph or paragraphs, appearing as annotation of source code</a:documentation>
|
|
1709
1739
|
<element name="callout">
|
|
1710
1740
|
<attribute name="target">
|
|
1711
1741
|
<a:documentation>The target of the callout is understood to be the location of the callout within the source code;
|
|
1712
1742
|
the extent of the target is not expressed overtly</a:documentation>
|
|
1713
|
-
<
|
|
1743
|
+
<ref name="IdRefType"/>
|
|
1714
1744
|
</attribute>
|
|
1715
1745
|
<text>
|
|
1716
1746
|
<a:documentation>The label of the callout, used to identify its target within the source code</a:documentation>
|
data/grammars/biblio-standoc.rng
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
|
|
3
|
-
<!--
|
|
4
|
-
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
|
|
5
|
-
of relaton
|
|
6
|
-
|
|
7
|
-
Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
|
|
8
|
-
(SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
|
|
9
|
-
-->
|
|
10
3
|
<include href="biblio.rng">
|
|
4
|
+
<!-- ALERT: we cannot have comments on root element, as they intervene with https://github.com/metanorma/metanorma/issues/437 fix -->
|
|
5
|
+
<!--
|
|
6
|
+
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
|
|
7
|
+
of relaton
|
|
8
|
+
|
|
9
|
+
Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
|
|
10
|
+
(SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
|
|
11
|
+
-->
|
|
11
12
|
<define name="BibData">
|
|
12
13
|
<a:documentation>The bibliographic description of a standardisation document</a:documentation>
|
|
13
14
|
<ref name="StandardBibliographicItem"/>
|
|
@@ -75,12 +76,6 @@ from other documents in the same doctype</a:documentation>
|
|
|
75
76
|
<ref name="flavor">
|
|
76
77
|
<a:documentation>Flavour of Metanorma used to process this document</a:documentation>
|
|
77
78
|
</ref>
|
|
78
|
-
<optional>
|
|
79
|
-
<ref name="editorialgroup">
|
|
80
|
-
<a:documentation>Groups associated with the production of the standards document, typically within
|
|
81
|
-
a standards definition organization</a:documentation>
|
|
82
|
-
</ref>
|
|
83
|
-
</optional>
|
|
84
79
|
<zeroOrMore>
|
|
85
80
|
<ref name="ics">
|
|
86
81
|
<a:documentation>Classification of the document contents taken from the International Classification of Standards</a:documentation>
|
|
@@ -91,6 +86,9 @@ a standards definition organization</a:documentation>
|
|
|
91
86
|
<a:documentation>Representation of the identifier for the standardisation document, giving its individual semantic components</a:documentation>
|
|
92
87
|
</ref>
|
|
93
88
|
</zeroOrMore>
|
|
89
|
+
<ref name="DocumentImages">
|
|
90
|
+
<a:documentation>Coverpage and other images to be rendered with document</a:documentation>
|
|
91
|
+
</ref>
|
|
94
92
|
</define>
|
|
95
93
|
<define name="doctype">
|
|
96
94
|
<a:documentation>Classification of the standardisation document</a:documentation>
|
|
@@ -126,49 +124,6 @@ a standards definition organization</a:documentation>
|
|
|
126
124
|
However we prefer not to hardcode it, given ongoing extension.</a:documentation>
|
|
127
125
|
<text/>
|
|
128
126
|
</define>
|
|
129
|
-
<define name="editorialgroup">
|
|
130
|
-
<a:documentation>A group associated with the production of the standards document, typically within
|
|
131
|
-
a standards definition organization</a:documentation>
|
|
132
|
-
<element name="editorialgroup">
|
|
133
|
-
<oneOrMore>
|
|
134
|
-
<ref name="technical-committee">
|
|
135
|
-
<a:documentation>A technical committee associated with the production of the standards document</a:documentation>
|
|
136
|
-
</ref>
|
|
137
|
-
</oneOrMore>
|
|
138
|
-
</element>
|
|
139
|
-
</define>
|
|
140
|
-
<define name="technical-committee">
|
|
141
|
-
<a:documentation>Technical committee associated with the production of a standards document</a:documentation>
|
|
142
|
-
<element name="technical-committee">
|
|
143
|
-
<ref name="IsoWorkgroup"/>
|
|
144
|
-
</element>
|
|
145
|
-
</define>
|
|
146
|
-
<define name="IsoWorkgroup">
|
|
147
|
-
<optional>
|
|
148
|
-
<attribute name="number">
|
|
149
|
-
<a:documentation>Numeric identifier of the technical committee</a:documentation>
|
|
150
|
-
</attribute>
|
|
151
|
-
</optional>
|
|
152
|
-
<optional>
|
|
153
|
-
<attribute name="type">
|
|
154
|
-
<a:documentation>Type of the technical committee, used in identifying the technical committee</a:documentation>
|
|
155
|
-
</attribute>
|
|
156
|
-
</optional>
|
|
157
|
-
<optional>
|
|
158
|
-
<attribute name="identifier">
|
|
159
|
-
<a:documentation>Non-numeric, complete identifier of the technical committee</a:documentation>
|
|
160
|
-
</attribute>
|
|
161
|
-
</optional>
|
|
162
|
-
<optional>
|
|
163
|
-
<attribute name="prefix">
|
|
164
|
-
<a:documentation>Disambiguating prefix added to number to form the identifier of the technical committee,
|
|
165
|
-
typically indicating its type</a:documentation>
|
|
166
|
-
</attribute>
|
|
167
|
-
</optional>
|
|
168
|
-
<text>
|
|
169
|
-
<a:documentation>Name of the technical committee</a:documentation>
|
|
170
|
-
</text>
|
|
171
|
-
</define>
|
|
172
127
|
<define name="ics">
|
|
173
128
|
<a:documentation>Classification taken from the International Classification of Standards.
|
|
174
129
|
ICS is defined by ISO here -- https://www.iso.org/publication/PUB100033.html</a:documentation>
|
|
@@ -268,6 +223,32 @@ and not those document components</a:documentation>
|
|
|
268
223
|
</optional>
|
|
269
224
|
</element>
|
|
270
225
|
</define>
|
|
226
|
+
<define name="DocumentImages">
|
|
227
|
+
<zeroOrMore>
|
|
228
|
+
<element name="coverpage-image">
|
|
229
|
+
<a:documentation>Images to be displayed on the coverpage of the document</a:documentation>
|
|
230
|
+
<ref name="image-no-id"/>
|
|
231
|
+
</element>
|
|
232
|
+
</zeroOrMore>
|
|
233
|
+
<zeroOrMore>
|
|
234
|
+
<element name="innercoverpage-image">
|
|
235
|
+
<a:documentation>Images to be displayed on the inner coverpage of the document</a:documentation>
|
|
236
|
+
<ref name="image-no-id"/>
|
|
237
|
+
</element>
|
|
238
|
+
</zeroOrMore>
|
|
239
|
+
<zeroOrMore>
|
|
240
|
+
<element name="tocside-image">
|
|
241
|
+
<a:documentation>Images to be displayed on the Table of Contents page of the document</a:documentation>
|
|
242
|
+
<ref name="image-no-id"/>
|
|
243
|
+
</element>
|
|
244
|
+
</zeroOrMore>
|
|
245
|
+
<zeroOrMore>
|
|
246
|
+
<element name="backpage-image">
|
|
247
|
+
<a:documentation>Images to be displayed on the backpage of the document</a:documentation>
|
|
248
|
+
<ref name="image-no-id"/>
|
|
249
|
+
</element>
|
|
250
|
+
</zeroOrMore>
|
|
251
|
+
</define>
|
|
271
252
|
<define name="StandardBibliographicItem">
|
|
272
253
|
<ref name="BibliographicItem"/>
|
|
273
254
|
<zeroOrMore>
|