relaton-3gpp 2.0.0.pre.alpha.1 → 2.0.0.pre.alpha.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 830c9ce4026ab42300e748d1bd41e3ac6463270e2e117a10bece2311893da2bf
4
- data.tar.gz: 18e1109fef82978adbda01cb4ef3e6fa46410cba1d3cca85fe53c538838e439c
3
+ metadata.gz: 8115c4928f5c80d2a7ff35ddb0678d54ef08fcb0ffd2f567d6b2050d1d032300
4
+ data.tar.gz: 911500efaec29a5b822c46ff7a3fb586806c06c4bfe2a6b750288063004de17c
5
5
  SHA512:
6
- metadata.gz: d905a7c7d24648f1610fa69a347a23be8ee9e16e2327622f8bbe470c3d4c345d262e7fb455777756cf072ebccb43960c5ee302b609fde1fdb2910a4b16d33c30
7
- data.tar.gz: a56c0bfb15f44c4c3ceecdd50b8fe96bdef61b53f04a6a60826ef7b4b4ecac08ee316e596fadc739bbdfbec9bc5bcfc16aebc25e499ebd225cb88051f2c18c47
6
+ metadata.gz: 5464d1af9db712a9d777fe6bf322c1b086989273dbfead28e4cfc2479d482a6aa16a1bbb6ea966ed49d662c155c4587c9a71ed743f366b9164c3a6b727088c0d
7
+ data.tar.gz: b4947a9a2bd6b0c2f116fb37e7ec4d9cecbc073548c345cd739afed6cb1ac4efc18351c15bd6d27f622d665e63b6d33427d863ed4d061dfea5541b3e819375ce
data/.gitignore CHANGED
@@ -14,3 +14,4 @@ Gemfile.lock
14
14
  .vscode/
15
15
  .rspec_status
16
16
  status_smg_3GPP*
17
+ .claude/settings.local.json
data/.rubocop.yml CHANGED
@@ -7,6 +7,6 @@ require: rubocop-rails
7
7
  inherit_from:
8
8
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
9
9
  AllCops:
10
- TargetRubyVersion: 3.1
10
+ TargetRubyVersion: 3.2
11
11
  Rails:
12
12
  Enabled: false
@@ -198,14 +198,14 @@ Applicable to modify and delete</a:documentation>
198
198
  </zeroOrMore>
199
199
  </element>
200
200
  </optional>
201
- <optional>
201
+ <zeroOrMore>
202
202
  <element name="description">
203
- <a:documentation>Description of the change described in this block</a:documentation>
204
- <zeroOrMore>
203
+ <a:documentation>Description(s) of the change described in this block</a:documentation>
204
+ <oneOrMore>
205
205
  <ref name="BasicBlock"/>
206
- </zeroOrMore>
206
+ </oneOrMore>
207
207
  </element>
208
- </optional>
208
+ </zeroOrMore>
209
209
  <optional>
210
210
  <element name="newcontent">
211
211
  <a:documentation>New content to be added to the document; applicable to add and modify</a:documentation>
@@ -267,6 +267,10 @@ in a document (e.g. sourcecode annotations)</a:documentation>
267
267
  <value>justified</value>
268
268
  </choice>
269
269
  </define>
270
+ <define name="IdRefType">
271
+ <a:documentation>Type of cross-references to elements. In BasicDoc, these always point to id { xsd:ID } </a:documentation>
272
+ <data type="IDREF"/>
273
+ </define>
270
274
  <define name="RequiredId">
271
275
  <a:documentation>Mandatory anchor of element, to be used for cross-references within the document</a:documentation>
272
276
  <attribute name="id">
@@ -382,33 +386,7 @@ in a document (e.g. sourcecode annotations)</a:documentation>
382
386
  <a:documentation>Block intended to capture reviewer comments about some text in the document</a:documentation>
383
387
  <element name="review">
384
388
  <ref name="RequiredId"/>
385
- <attribute name="reviewer">
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>
389
+ <ref name="ReviewAttributes"/>
412
390
  <oneOrMore>
413
391
  <ref name="paragraph">
414
392
  <a:documentation>Reviewer comments content</a:documentation>
@@ -416,6 +394,35 @@ If not provided, the comment applies in the vicinity of the place it has been in
416
394
  </oneOrMore>
417
395
  </element>
418
396
  </define>
397
+ <define name="ReviewAttributes">
398
+ <attribute name="reviewer">
399
+ <a:documentation>The party who has offered the comment</a:documentation>
400
+ </attribute>
401
+ <optional>
402
+ <attribute name="type">
403
+ <a:documentation>The type of reviewer comment</a:documentation>
404
+ </attribute>
405
+ </optional>
406
+ <optional>
407
+ <attribute name="date">
408
+ <a:documentation>The date when the comment was made</a:documentation>
409
+ <data type="dateTime"/>
410
+ </attribute>
411
+ </optional>
412
+ <optional>
413
+ <attribute name="from">
414
+ <a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
415
+ If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
416
+ <ref name="IdRefType"/>
417
+ </attribute>
418
+ </optional>
419
+ <optional>
420
+ <attribute name="to">
421
+ <a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
422
+ <ref name="IdRefType"/>
423
+ </attribute>
424
+ </optional>
425
+ </define>
419
426
  <define name="NumberingAttributes">
420
427
  <optional>
421
428
  <attribute name="unnumbered">
@@ -599,17 +606,9 @@ It is included for convenience, in case processing the citation to extract the a
599
606
  <a:documentation>The caption of the block</a:documentation>
600
607
  </ref>
601
608
  </optional>
602
- <oneOrMore>
603
- <choice>
604
- <text>
605
- <a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
606
- (The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
607
- </text>
608
- <ref name="callout">
609
- <a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
610
- </ref>
611
- </choice>
612
- </oneOrMore>
609
+ <ref name="sourcecodebody">
610
+ <a:documentation>The sourcecode content</a:documentation>
611
+ </ref>
613
612
  <zeroOrMore>
614
613
  <ref name="annotation">
615
614
  <a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
@@ -628,17 +627,9 @@ and is intended to be referenced by a callout within the source code</a:document
628
627
  <a:documentation>The caption of the block</a:documentation>
629
628
  </ref>
630
629
  </optional>
631
- <oneOrMore>
632
- <choice>
633
- <text>
634
- <a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
635
- (The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
636
- </text>
637
- <ref name="callout">
638
- <a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
639
- </ref>
640
- </choice>
641
- </oneOrMore>
630
+ <ref name="sourcecodebody">
631
+ <a:documentation>The sourcecode content</a:documentation>
632
+ </ref>
642
633
  <zeroOrMore>
643
634
  <ref name="annotation">
644
635
  <a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
@@ -651,6 +642,20 @@ and is intended to be referenced by a callout within the source code</a:document
651
642
  </ref>
652
643
  </zeroOrMore>
653
644
  </define>
645
+ <define name="sourcecodebody">
646
+ <a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
647
+ (The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
648
+ <element name="body">
649
+ <oneOrMore>
650
+ <choice>
651
+ <text/>
652
+ <ref name="callout">
653
+ <a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
654
+ </ref>
655
+ </choice>
656
+ </oneOrMore>
657
+ </element>
658
+ </define>
654
659
  <define name="pre">
655
660
  <a:documentation>Pre-formatted block. Wrapper for text to be rendered with fixed-width typeface, and preserving spaces including line breaks.
656
661
  They are intended for a restricted number of functions, most typically ASCII Art (which is still in prominent use in some
@@ -859,6 +864,7 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
859
864
  <define name="tr">
860
865
  <a:documentation>Sequence of cells to be displayed as a row in a table</a:documentation>
861
866
  <element name="tr">
867
+ <ref name="TrAttributes"/>
862
868
  <oneOrMore>
863
869
  <choice>
864
870
  <ref name="td">
@@ -871,6 +877,9 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
871
877
  </oneOrMore>
872
878
  </element>
873
879
  </define>
880
+ <define name="TrAttributes">
881
+ <empty/>
882
+ </define>
874
883
  <define name="tr-no-id">
875
884
  <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>
876
885
  <element name="tr">
@@ -1282,13 +1291,13 @@ Restricted recursively to contain only other such inline elements with no identi
1282
1291
  <ref name="pure_strike"/>
1283
1292
  <ref name="pure_smallcap"/>
1284
1293
  <ref name="br"/>
1294
+ <ref name="stem"/>
1285
1295
  </choice>
1286
1296
  </define>
1287
1297
  <define name="NestedTextElement">
1288
1298
  <a:documentation>Contents of TextElement tags: leaves out tags that should occur only at top level of block: bookmark image hr pagebreak</a:documentation>
1289
1299
  <choice>
1290
1300
  <ref name="PureTextElement"/>
1291
- <ref name="stem"/>
1292
1301
  <ref name="eref"/>
1293
1302
  <ref name="xref"/>
1294
1303
  <ref name="hyperlink"/>
@@ -1499,7 +1508,7 @@ Restricted recursively to contain only other such inline elements with no identi
1499
1508
  <attribute name="to">
1500
1509
  <a:documentation>A reference to an anchor element (typically a bookmark),
1501
1510
  to indicate that the index range covers a range of locations between the current index element and the `to` anchor</a:documentation>
1502
- <data type="IDREF"/>
1511
+ <ref name="IdRefType"/>
1503
1512
  </attribute>
1504
1513
  </optional>
1505
1514
  <ref name="index-primary">
@@ -1657,7 +1666,7 @@ which can be bookmarks as well as block or section references</a:documentation>
1657
1666
  <define name="XrefAttributes">
1658
1667
  <attribute name="target">
1659
1668
  <a:documentation>The identifier of a section, block or inlined element being referenced</a:documentation>
1660
- <data type="IDREF"/>
1669
+ <ref name="IdRefType"/>
1661
1670
  </attribute>
1662
1671
  <optional>
1663
1672
  <attribute name="type">
@@ -1672,40 +1681,53 @@ which can be bookmarks as well as block or section references</a:documentation>
1672
1681
  </optional>
1673
1682
  </define>
1674
1683
  <define name="XrefBody">
1675
- <oneOrMore>
1676
- <ref name="PureTextElement">
1677
- <a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `&lt;xx&gt;my link text&lt;/xx&gt;`)</a:documentation>
1678
- </ref>
1679
- </oneOrMore>
1684
+ <a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `&lt;xx&gt;my link text&lt;/xx&gt;`)</a:documentation>
1685
+ <optional>
1686
+ <element name="display-text">
1687
+ <oneOrMore>
1688
+ <ref name="PureTextElement"/>
1689
+ </oneOrMore>
1690
+ </element>
1691
+ </optional>
1680
1692
  </define>
1681
1693
  <define name="ErefBody">
1682
- <oneOrMore>
1683
- <ref name="PureTextElement">
1684
- <a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `&lt;xx&gt;my link text&lt;/xx&gt;`)</a:documentation>
1685
- </ref>
1686
- </oneOrMore>
1694
+ <optional>
1695
+ <element name="display-text">
1696
+ <oneOrMore>
1697
+ <ref name="PureTextElement">
1698
+ <a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `&lt;xx&gt;my link text&lt;/xx&gt;`)</a:documentation>
1699
+ </ref>
1700
+ </oneOrMore>
1701
+ </element>
1702
+ </optional>
1687
1703
  </define>
1688
1704
  <define name="fn">
1689
1705
  <a:documentation>Inline reference to a paragraph or paragraphs, appearing as a footnote.
1690
1706
  The target of a footnote is the location it is embedded in within the text</a:documentation>
1691
1707
  <element name="fn">
1692
- <attribute name="reference">
1693
- <a:documentation>The number of the footnote, used to identify it visually</a:documentation>
1694
- </attribute>
1695
- <oneOrMore>
1696
- <ref name="paragraph">
1697
- <a:documentation>The content of the footnote</a:documentation>
1698
- </ref>
1699
- </oneOrMore>
1708
+ <ref name="FnAttributes"/>
1709
+ <ref name="FnBody"/>
1700
1710
  </element>
1701
1711
  </define>
1712
+ <define name="FnBody">
1713
+ <oneOrMore>
1714
+ <ref name="paragraph">
1715
+ <a:documentation>The content of the footnote</a:documentation>
1716
+ </ref>
1717
+ </oneOrMore>
1718
+ </define>
1719
+ <define name="FnAttributes">
1720
+ <attribute name="reference">
1721
+ <a:documentation>The number of the footnote, used to identify it visually</a:documentation>
1722
+ </attribute>
1723
+ </define>
1702
1724
  <define name="callout">
1703
1725
  <a:documentation>Inline reference to a paragraph or paragraphs, appearing as annotation of source code</a:documentation>
1704
1726
  <element name="callout">
1705
1727
  <attribute name="target">
1706
1728
  <a:documentation>The target of the callout is understood to be the location of the callout within the source code;
1707
1729
  the extent of the target is not expressed overtly</a:documentation>
1708
- <data type="IDREF"/>
1730
+ <ref name="IdRefType"/>
1709
1731
  </attribute>
1710
1732
  <text>
1711
1733
  <a:documentation>The label of the callout, used to identify its target within the source code</a:documentation>
@@ -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>
data/grammars/biblio.rng CHANGED
@@ -1,23 +1,25 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!--
3
- instantiations of this grammar may replace leaf strings
4
- with more elaborated types; e.g. title (text) replaced with
5
- title-main, title-intro, title-part; type replaced with
6
- enum.
7
-
8
- some renaming at leaf nodes is permissible
9
-
10
- obligations can change both from optional to mandatory,
11
- and from mandatory to optional; optional elements may
12
- be omitted; freely positioned alternatives may be replaced
13
- with strict ordering
14
-
15
- DO NOT introduce a namespace here. We do not want a distinct namespace
16
- for these elements, and a distinct namespace for any grammar inheriting
17
- these elements; we just want one namespace for any child grammars
18
- of this.
19
- -->
20
2
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
+ <!--
4
+ ALERT: we cannot have comments on root element, as they intervene with https://github.com/metanorma/metanorma/issues/437 fix
5
+
6
+ Instantiations of this grammar may replace leaf strings
7
+ with more elaborated types; e.g. title (text) replaced with
8
+ title-main, title-intro, title-part; type replaced with
9
+ enum.
10
+
11
+ Some renaming at leaf nodes is permissible
12
+
13
+ Obligations can change both from optional to mandatory,
14
+ and from mandatory to optional; optional elements may
15
+ be omitted; freely positioned alternatives may be replaced
16
+ with strict ordering
17
+
18
+ DO NOT introduce a namespace here. We do not want a distinct namespace
19
+ for these elements, and a distinct namespace for any grammar inheriting
20
+ these elements; we just want one namespace for any child grammars
21
+ of this.
22
+ -->
21
23
  <!--
22
24
  https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/
23
25
  iso8601date = xsd:string { pattern = "([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?" }
@@ -240,6 +242,8 @@ Detailed in https://www.relaton.org/model/creator/</a:documentation>
240
242
  </choice>
241
243
  </define>
242
244
  <define name="roledescription">
245
+ <a:documentation>A more detailed description of the role of the contributor
246
+ Some descriptions are reserved words; in particular, the editorial committee of a standard has the role description "committee"</a:documentation>
243
247
  <element name="description">
244
248
  <ref name="LocalizedMarkedUpString"/>
245
249
  </element>
@@ -441,7 +445,10 @@ real names (if the person is named with a pseudonym or user name); previous lega
441
445
  </oneOrMore>
442
446
  <zeroOrMore>
443
447
  <ref name="subdivision">
444
- <a:documentation>The subdivision of the organization directly involved with the production of the bibliographic item</a:documentation>
448
+ <a:documentation>The subdivision of the organization directly involved with the production of the bibliographic item.
449
+ Multiple subdivisions can be specified for an organization, with no implication of hierarchical
450
+ relation between them
451
+ Editorial and advisory groups are represented as consecutive subdivisions of the SDO</a:documentation>
445
452
  </ref>
446
453
  </zeroOrMore>
447
454
  <optional>
@@ -459,11 +466,11 @@ real names (if the person is named with a pseudonym or user name); previous lega
459
466
  <a:documentation>Contact information for the organization, including address, phone number, and email</a:documentation>
460
467
  </ref>
461
468
  </optional>
462
- <optional>
469
+ <zeroOrMore>
463
470
  <ref name="logo">
464
471
  <a:documentation>A logo for the organization</a:documentation>
465
472
  </ref>
466
- </optional>
473
+ </zeroOrMore>
467
474
  </define>
468
475
  <define name="orgname">
469
476
  <element name="name">
@@ -483,6 +490,11 @@ real names (if the person is named with a pseudonym or user name); previous lega
483
490
  <a:documentation>The type of subdivision</a:documentation>
484
491
  </attribute>
485
492
  </optional>
493
+ <optional>
494
+ <attribute name="subtype">
495
+ <a:documentation>The subtype of subdivision; e.g. different types of technical committee</a:documentation>
496
+ </attribute>
497
+ </optional>
486
498
  <ref name="OrganizationType">
487
499
  <a:documentation>The subdivision, modelled recursively as an organization</a:documentation>
488
500
  </ref>
@@ -490,6 +502,11 @@ real names (if the person is named with a pseudonym or user name); previous lega
490
502
  </define>
491
503
  <define name="logo">
492
504
  <element name="logo">
505
+ <optional>
506
+ <attribute name="type">
507
+ <a:documentation>The type of logo</a:documentation>
508
+ </attribute>
509
+ </optional>
493
510
  <ref name="image-no-id"/>
494
511
  </element>
495
512
  </define>
@@ -501,6 +518,11 @@ real names (if the person is named with a pseudonym or user name); previous lega
501
518
  <a:documentation>Description of what is being depicted</a:documentation>
502
519
  </attribute>
503
520
  </optional>
521
+ <optional>
522
+ <attribute name="type">
523
+ <a:documentation>Description of what kind of depiction this</a:documentation>
524
+ </attribute>
525
+ </optional>
504
526
  <zeroOrMore>
505
527
  <ref name="image-no-id">
506
528
  <a:documentation>A visual depiction of the bibliographic item</a:documentation>
@@ -678,7 +700,7 @@ Examples include GRID, LEI, CrossRef, and Ringgold</a:documentation>
678
700
  <define name="CitationType">
679
701
  <attribute name="bibitemid">
680
702
  <a:documentation>Bibliographic item that the citation applies to, referenced as the anchor of a bibliographic description</a:documentation>
681
- <data type="IDREF"/>
703
+ <ref name="IdRefType"/>
682
704
  </attribute>
683
705
  <choice>
684
706
  <zeroOrMore>
@@ -857,7 +879,7 @@ depending on whether the items exist as independent documents, or are parts of a
857
879
  </zeroOrMore>
858
880
  </element>
859
881
  </define>
860
- <define name="BibItemType" combine="choice">
882
+ <define name="BibItemType">
861
883
  <a:documentation>Type of bibliographic item.
862
884
  The value list complies with the types provided in ISO 690:2021.
863
885
  NOTE: These values represent a strict superset to BibTeX
@@ -1224,9 +1246,9 @@ Refer to `BibliographicItem` for definitions</a:documentation>
1224
1246
  <optional>
1225
1247
  <ref name="validity"/>
1226
1248
  </optional>
1227
- <optional>
1249
+ <zeroOrMore>
1228
1250
  <ref name="depiction"/>
1229
- </optional>
1251
+ </zeroOrMore>
1230
1252
  </define>
1231
1253
  <define name="btitle">
1232
1254
  <a:documentation>A title of a bibliographic item, associated with a type of title</a:documentation>
@@ -1241,6 +1263,11 @@ Refer to `BibliographicItem` for definitions</a:documentation>
1241
1263
  </define>
1242
1264
  <define name="formattedref">
1243
1265
  <element name="formattedref">
1266
+ <optional>
1267
+ <attribute name="format">
1268
+ <a:documentation>format of formatted reference; Metanorma assumes references are formatted as Metanorma XML</a:documentation>
1269
+ </attribute>
1270
+ </optional>
1244
1271
  <oneOrMore>
1245
1272
  <ref name="TextElement"/>
1246
1273
  </oneOrMore>
@@ -1279,17 +1306,17 @@ for which this claim of validity is made, if applicable</a:documentation>
1279
1306
  </define>
1280
1307
  <define name="validityBegins">
1281
1308
  <element name="validityBegins">
1282
- <ref name="ISO8601Date"/>
1309
+ <ref name="ISO8601DateTime"/>
1283
1310
  </element>
1284
1311
  </define>
1285
1312
  <define name="validityEnds">
1286
1313
  <element name="validityEnds">
1287
- <ref name="ISO8601Date"/>
1314
+ <ref name="ISO8601DateTime"/>
1288
1315
  </element>
1289
1316
  </define>
1290
1317
  <define name="validityRevision">
1291
1318
  <element name="revision">
1292
- <ref name="ISO8601Date"/>
1319
+ <ref name="ISO8601DateTime"/>
1293
1320
  </element>
1294
1321
  </define>
1295
1322
  <define name="TypedTitleString">
@@ -1812,6 +1839,11 @@ May be used to differentiate rendering of notes in bibliographies</a:documentati
1812
1839
  <a:documentation>Abstract of bibliographic item</a:documentation>
1813
1840
  <element name="abstract">
1814
1841
  <ref name="LocalizedStringAttributes"/>
1842
+ <optional>
1843
+ <attribute name="format">
1844
+ <a:documentation>What format the formatted abstract is in. In Metanorma, assumed to be Metanorma XML</a:documentation>
1845
+ </attribute>
1846
+ </optional>
1815
1847
  <choice>
1816
1848
  <oneOrMore>
1817
1849
  <ref name="BasicBlockNoId">
@@ -21,9 +21,6 @@
21
21
  <optional>
22
22
  <ref name="docsubtype"/>
23
23
  </optional>
24
- <optional>
25
- <ref name="editorialgroup"/>
26
- </optional>
27
24
  <zeroOrMore>
28
25
  <ref name="ics"/>
29
26
  </zeroOrMore>
@@ -6,12 +6,11 @@ module Relaton
6
6
  module Bibliography
7
7
  # SOURCE = "http://xml2rfc.tools.ietf.org/public/rfc/bibxml-3gpp-new/"
8
8
  SOURCE = "https://raw.githubusercontent.com/relaton/relaton-data-3gpp/refs/heads/data-v2/"
9
- INDEX_FILE = "index-v1.yaml"
10
9
 
11
10
  # @param text [String]
12
11
  # @return [RelatonBib::BibliographicItem]
13
12
  def search(text) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
14
- index = Relaton::Index.find_or_create "3GPP", url: "#{SOURCE}index-v1.zip", file: INDEX_FILE
13
+ index = Relaton::Index.find_or_create "3GPP", url: "#{SOURCE}#{INDEXFILE}.zip", file: "#{INDEXFILE}.yaml"
15
14
  row = index.search(text.sub(/^3GPP\s/, "")).min_by { |r| r[:id] }
16
15
  return unless row
17
16
 
@@ -9,7 +9,7 @@ module Relaton
9
9
  CURRENT = "current.yaml".freeze
10
10
 
11
11
  def index
12
- @index ||= Relaton::Index.find_or_create "3gpp", file: Bibliography::INDEX_FILE
12
+ @index ||= Relaton::Index.find_or_create "3gpp", file: "#{INDEXFILE}.yaml"
13
13
  end
14
14
 
15
15
  #
@@ -214,11 +214,15 @@ module Relaton
214
214
  end
215
215
 
216
216
  def to_xml(bib)
217
- Bibdata.to_xml(bib)
217
+ bib.to_xml(bibdata: true)
218
218
  end
219
219
 
220
220
  def to_yaml(bib)
221
- Item.to_yaml(bib)
221
+ bib.to_yaml
222
+ end
223
+
224
+ def to_bibxml(bib)
225
+ bib.to_rfcxml
222
226
  end
223
227
  end
224
228
  end
@@ -3,12 +3,10 @@ require_relative "release"
3
3
 
4
4
  module Relaton
5
5
  module ThreeGpp
6
- class Ext < Lutaml::Model::Serializable
6
+ class Ext < Bib::Ext
7
7
  attribute :schema_version, method: :get_schema_version
8
8
  attribute :doctype, Doctype
9
9
  attribute :subdoctype, :string, values: %w[spec release]
10
- attribute :editorialgroup, Relaton::Bib::EditorialGroup
11
- attribute :ics, Relaton::Bib::ICS, collection: true
12
10
  attribute :radiotechnology, :string, values: %w[2G 3G LTE 5G]
13
11
  attribute :common_ims_spec, :boolean
14
12
  attribute :internal, :boolean
@@ -19,11 +17,6 @@ module Relaton
19
17
  end
20
18
 
21
19
  xml do
22
- map_attribute "schema-version", to: :schema_version
23
- map_element "doctype", to: :doctype
24
- map_element "subdoctype", to: :subdoctype
25
- map_element "editorialgroup", to: :editorialgroup
26
- map_element "ics", to: :ics
27
20
  map_element "radiotechnology", to: :radiotechnology
28
21
  map_element "common-ims-spec", to: :common_ims_spec
29
22
  map_element "internal", to: :internal
@@ -3,7 +3,7 @@ require_relative "ext"
3
3
 
4
4
  module Relaton
5
5
  module ThreeGpp
6
- class Item < Relaton::Bib::Item
6
+ class Item < Bib::Item
7
7
  model ItemData
8
8
 
9
9
  attribute :ext, Ext
@@ -1,6 +1,6 @@
1
1
  module Relaton
2
2
  module ThreeGpp
3
- class ItemData < Relaton::Bib::ItemData
3
+ class ItemData < Bib::ItemData
4
4
  def to_xml(bibdata: false, **opts)
5
5
  add_notes opts[:note] do
6
6
  bibdata ? Bibdata.to_xml(self) : Bibitem.to_xml(self)
@@ -32,7 +32,6 @@ module Relaton
32
32
  #
33
33
  def parse # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
34
34
  ItemData.new(
35
- id: parse_id,
36
35
  type: "standard",
37
36
  language: ["en"],
38
37
  script: ["Latn"],
@@ -53,10 +52,6 @@ module Relaton
53
52
  )
54
53
  end
55
54
 
56
- def parse_id
57
- number.gsub(/[\s:\/]/, "-").squeeze("-").upcase
58
- end
59
-
60
55
  #
61
56
  # Parse title
62
57
  #
@@ -191,10 +186,37 @@ module Relaton
191
186
  abbrev = Bib::LocalizedString.new content: "3GPP"
192
187
  org = Bib::Organization.new(name: [name], abbreviation: abbrev, address: [address])
193
188
  contribs = [Bib::Contributor.new(organization: org, role: contributor_role)]
194
- return contribs unless @row["Last Name"] && @row["Last Name"] != "Vacant"
189
+ if @row["Last Name"] && @row["Last Name"] != "Vacant"
190
+ role = Bib::Contributor::Role.new type: "author"
191
+ contribs << Bib::Contributor.new(person: person, role: [role])
192
+ end
193
+ contribs + editorial_group_contributors
194
+ end
195
195
 
196
- role = Bib::Contributor::Role.new type: "author"
197
- contribs << Bib::Contributor.new(person: person, role: [role])
196
+ def editorial_group_contributors # rubocop:disable Metrics/MethodLength
197
+ contribs = []
198
+ prime = @row["Responsible Primary"]
199
+ contribs << editorial_group_contributor(prime, "prime") unless prime.nil? || prime.empty?
200
+ @row["Responsible Secondary"].strip.split(", ").each do |wg|
201
+ contribs << editorial_group_contributor(wg, "other")
202
+ end
203
+ contribs
204
+ end
205
+
206
+ def editorial_group_contributor(wg_name, wg_type)
207
+ Bib::Contributor.new(
208
+ role: [Bib::Contributor::Role.new(
209
+ type: "author",
210
+ description: [Bib::LocalizedMarkedUpString.new(content: "committee")],
211
+ )],
212
+ organization: Bib::Organization.new(
213
+ subdivision: [Bib::Subdivision.new(
214
+ type: "technical-committee",
215
+ subtype: wg_type,
216
+ name: [Bib::TypedLocalizedString.new(content: wg_name)],
217
+ )],
218
+ ),
219
+ )
198
220
  end
199
221
 
200
222
  def address
@@ -230,7 +252,6 @@ module Relaton
230
252
  def parse_ext
231
253
  Ext.new(
232
254
  doctype: parse_doctype,
233
- editorialgroup: parse_editorialgroup,
234
255
  radiotechnology: parse_radiotechnology,
235
256
  release: parse_release,
236
257
  )
@@ -242,26 +263,6 @@ module Relaton
242
263
  Doctype.new(content: doctype_abbr) # 3GPP grammar alloves only TS and TR content
243
264
  end
244
265
 
245
- #
246
- # Parse editorialgroup
247
- #
248
- # @return [RelatonBib::EditorialGroup] editorialgroups
249
- #
250
- def parse_editorialgroup # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
251
- eg = []
252
- prime = @row["Responsible Primary"]
253
- eg << create_workgroup(prime, "prime") unless prime.nil? || prime.empty?
254
-
255
- @row["Responsible Secondary"].strip.split(", ").each do |wg|
256
- eg << create_workgroup(wg, "other")
257
- end
258
- Bib::EditorialGroup.new technical_committee: eg
259
- end
260
-
261
- def create_workgroup(name, type)
262
- Bib::WorkGroup.new(content: name, type: type)
263
- end
264
-
265
266
  #
266
267
  # Parse radio technology
267
268
  #
@@ -1,3 +1,5 @@
1
+ require "relaton/core/processor"
2
+
1
3
  module Relaton
2
4
  module ThreeGpp
3
5
  class Processor < Relaton::Core::Processor
@@ -16,6 +18,7 @@ module Relaton
16
18
  # @param opts [Hash]
17
19
  # @return [RelatonBib::BibliographicItem]
18
20
  def get(code, date, opts)
21
+ require_relative "../3gpp"
19
22
  Bibliography.get(code, date, opts)
20
23
  end
21
24
 
@@ -28,24 +31,28 @@ module Relaton
28
31
  # @option opts [String] :format
29
32
  #
30
33
  def fetch_data(source, opts)
34
+ require_relative "data_fetcher"
31
35
  DataFetcher.fetch(source, **opts)
32
36
  end
33
37
 
34
38
  # @param xml [String]
35
39
  # @return [RelatonBib::BibliographicItem]
36
40
  def from_xml(xml)
41
+ require_relative "../3gpp"
37
42
  Item.from_xml xml
38
43
  end
39
44
 
40
45
  # @param yaml [String]
41
46
  # @return [Relaton::ThreeGpp::Item]
42
47
  def from_yaml(yaml)
48
+ require_relative "../3gpp"
43
49
  Item.from_yaml(yaml)
44
50
  end
45
51
 
46
52
  # Returns hash of XML grammar
47
53
  # @return [String]
48
54
  def grammar_hash
55
+ require_relative "../3gpp"
49
56
  @grammar_hash ||= ThreeGpp.grammar_hash
50
57
  end
51
58
 
@@ -53,7 +60,8 @@ module Relaton
53
60
  # Remove index file
54
61
  #
55
62
  def remove_index_file
56
- Relaton::Index.find_or_create("3GPP", url: true, file: Bibliography::INDEX_FILE).remove_file
63
+ require_relative "../3gpp"
64
+ Relaton::Index.find_or_create("3GPP", url: true, file: "#{INDEXFILE}.yaml").remove_file
57
65
  end
58
66
  end
59
67
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Relaton
4
4
  module ThreeGpp
5
- VERSION = "2.0.0-alpha.1"
5
+ VERSION = "2.0.0-alpha.2"
6
6
  end
7
7
  end
data/lib/relaton/3gpp.rb CHANGED
@@ -11,6 +11,8 @@ require_relative "3gpp/bibliography"
11
11
 
12
12
  module Relaton
13
13
  module ThreeGpp
14
+ INDEXFILE = "index-v1".freeze
15
+
14
16
  # Returns hash of XML reammar
15
17
  # @return [String]
16
18
  def self.grammar_hash
data/relaton_3gpp.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
12
12
  spec.description = "Relaton::3gpp: Ruby XMLDOC impementation."
13
13
  spec.homepage = "https://github.com/relaton/relaton-3gpp"
14
14
  spec.license = "BSD-2-Clause"
15
- spec.required_ruby_version = ">= 3.1.0"
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.2.0")
16
16
 
17
17
  # spec.metadata["allowed_push_host"] = "TODO: Set to 'https://mygemserver.com'"
18
18
 
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
38
38
 
39
39
  spec.add_dependency "csv"
40
40
  spec.add_dependency "net-ftp", "~> 0.1.0"
41
- spec.add_dependency "relaton-bib", "~> 2.0.0-alpha.2"
42
- spec.add_dependency "relaton-core", "~> 0.0.6"
41
+ spec.add_dependency "relaton-bib", "~> 2.0.0-alpha.4"
42
+ spec.add_dependency "relaton-core", "~> 0.0.8"
43
43
  spec.add_dependency "relaton-index", "~> 0.2.0"
44
44
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-3gpp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.alpha.1
4
+ version: 2.0.0.pre.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-07-20 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: csv
@@ -44,28 +43,28 @@ dependencies:
44
43
  requirements:
45
44
  - - "~>"
46
45
  - !ruby/object:Gem::Version
47
- version: 2.0.0.pre.alpha.2
46
+ version: 2.0.0.pre.alpha.4
48
47
  type: :runtime
49
48
  prerelease: false
50
49
  version_requirements: !ruby/object:Gem::Requirement
51
50
  requirements:
52
51
  - - "~>"
53
52
  - !ruby/object:Gem::Version
54
- version: 2.0.0.pre.alpha.2
53
+ version: 2.0.0.pre.alpha.4
55
54
  - !ruby/object:Gem::Dependency
56
55
  name: relaton-core
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - "~>"
60
59
  - !ruby/object:Gem::Version
61
- version: 0.0.6
60
+ version: 0.0.8
62
61
  type: :runtime
63
62
  prerelease: false
64
63
  version_requirements: !ruby/object:Gem::Requirement
65
64
  requirements:
66
65
  - - "~>"
67
66
  - !ruby/object:Gem::Version
68
- version: 0.0.6
67
+ version: 0.0.8
69
68
  - !ruby/object:Gem::Dependency
70
69
  name: relaton-index
71
70
  requirement: !ruby/object:Gem::Requirement
@@ -124,7 +123,6 @@ licenses:
124
123
  - BSD-2-Clause
125
124
  metadata:
126
125
  homepage_uri: https://github.com/relaton/relaton-3gpp
127
- post_install_message:
128
126
  rdoc_options: []
129
127
  require_paths:
130
128
  - lib
@@ -132,15 +130,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
132
130
  requirements:
133
131
  - - ">="
134
132
  - !ruby/object:Gem::Version
135
- version: 3.1.0
133
+ version: 3.2.0
136
134
  required_rubygems_version: !ruby/object:Gem::Requirement
137
135
  requirements:
138
136
  - - ">="
139
137
  - !ruby/object:Gem::Version
140
138
  version: '0'
141
139
  requirements: []
142
- rubygems_version: 3.5.11
143
- signing_key:
140
+ rubygems_version: 3.6.9
144
141
  specification_version: 4
145
142
  summary: 'Relaton::3gpp: Ruby XMLDOC impementation.'
146
143
  test_files: []