relaton-ecma 1.7.pre2 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5826805692de35028ccf0275c7ca855e1f044f731488612f2f8c192536e8f180
4
- data.tar.gz: 119d00f6ecf72910d45206e571f523c23f06344f3a1b045cdf77459e43908f5b
3
+ metadata.gz: ca778af82623cb27d57531139ebeb9f13b0b6e61ea497101b467c46da1046a80
4
+ data.tar.gz: 5092e42f8e6cb1722a414c7c0e71773df689b469f360ed5834c1ead2555cae9d
5
5
  SHA512:
6
- metadata.gz: eb9ec25d82615885254ecc1193e24f39073274842c9a20a51bf7bbd8a3d4f43ef0cdbffb808b2b50b07cfee58fb56da3647eed31e85fb2677d71d857dad32219
7
- data.tar.gz: b00dfc46e476ff792cdcc58df641a5e617b0feb19b0a2a73faababb0348bba565b82e24a6503f03212ef5345588e8b585dbe57bf6baa1967444b82720bbd228b
6
+ metadata.gz: 65bbeb5771590e091e81f89701675de17703c6ef28bfa5e843104f87a1489173abb4788673016442acf883c512cafcce08c03fbc9ff0dcc3b74db44a9eeefdcb
7
+ data.tar.gz: e82f7b9b07e3bf815e74d72abcead5161e03c47344e7a6e03f1854c85e71a60b9f961a9d1233f4c9a5c8818f4876a7a131c16f0215bc542ebbdb980a3be107de
@@ -0,0 +1,36 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: rake
4
+
5
+ on:
6
+ push:
7
+ branches: [ master, main ]
8
+ tags: [ v* ]
9
+ pull_request:
10
+
11
+ jobs:
12
+ rake:
13
+ name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
14
+ runs-on: ${{ matrix.os }}
15
+ continue-on-error: ${{ matrix.experimental }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
21
+ experimental: [ false ]
22
+ steps:
23
+ - uses: actions/checkout@v2
24
+ with:
25
+ submodules: true
26
+
27
+ # https://github.com/ruby-debug/debase/issues/89#issuecomment-686827382
28
+ - if: matrix.os == 'macos-latest' && matrix.ruby == '2.5'
29
+ run: echo BUNDLE_BUILD__DEBASE="--with-cflags=\"-Wno-error=implicit-function-declaration\"" >> $GITHUB_ENV
30
+
31
+ - uses: ruby/setup-ruby@v1
32
+ with:
33
+ ruby-version: ${{ matrix.ruby }}
34
+ bundler-cache: true
35
+
36
+ - run: bundle exec rake
data/.rubocop.yml CHANGED
@@ -2,9 +2,11 @@
2
2
  # https://github.com/riboseinc/oss-guides
3
3
  # All project-specific additions and overrides should be specified in this file.
4
4
 
5
+ require: rubocop-rails
6
+
5
7
  inherit_from:
6
8
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
9
  AllCops:
8
- TargetRubyVersion: 2.4
10
+ TargetRubyVersion: 2.5
9
11
  Rails:
10
12
  Enabled: false
data/README.adoc CHANGED
@@ -8,7 +8,7 @@ image:https://codeclimate.com/github/relaton/relaton-ecma/badges/gpa.svg["Code C
8
8
  image:https://img.shields.io/github/issues-pr-raw/relaton/relaton-ecma.svg["Pull Requests", link="https://github.com/relaton/relaton-ecma/pulls"]
9
9
  image:https://img.shields.io/github/commits-since/relaton/relaton-ecma/latest.svg["Commits since latest",link="https://github.com/relaton/relaton-ecma/releases"]
10
10
 
11
- RelatonIetf is a Ruby gem that search and fetch standards from the https://www.ecma-international.org[European Computer Manufacturers Association].
11
+ RelatonEcma is a Ruby gem that search and fetch standards from the https://www.ecma-international.org[European Computer Manufacturers Association].
12
12
 
13
13
  == Installation
14
14
 
@@ -16,7 +16,7 @@ Add this line to your application's Gemfile:
16
16
 
17
17
  [source,ruby]
18
18
  ----
19
- gem 'relaton_ecma'
19
+ gem 'relaton-ecma'
20
20
  ----
21
21
 
22
22
  And then execute:
@@ -25,7 +25,7 @@ And then execute:
25
25
 
26
26
  Or install it yourself as:
27
27
 
28
- $ gem install relaton_ecma
28
+ $ gem install relaton-ecma
29
29
 
30
30
  == Usage
31
31
 
@@ -41,6 +41,18 @@ item = RelatonEcma::EcmaBibliography.get 'ECMA-6'
41
41
  => #<RelatonBib::BibliographicItem:0x007fe0c047e340
42
42
  ...
43
43
 
44
+ RelatonEcma::EcmaBibliography.get 'ECMA TR/18'
45
+ [relaton-ecma] ("ECMA TR/18") fetching...
46
+ [relaton-ecma] ("ECMA TR/18") found ECMA TR/18
47
+ => #<RelatonBib::BibliographicItem:0x007ff53d2011a8
48
+ ...
49
+
50
+ RelatonEcma::EcmaBibliography.get "ECMA MEM/2021"
51
+ [relaton-ecma] ("ECMA MEM/2021") fetching...
52
+ [relaton-ecma] ("ECMA MEM/2021") found ECMA MEM/2021
53
+ => #<RelatonBib::BibliographicItem:0x007ff53d240150
54
+ ...
55
+
44
56
  # Return nil if document doesn't exist.
45
57
  RelatonEcma::EcmaBibliography.get '1111'
46
58
  [relaton-ecma] ("1111") fetching...
@@ -86,6 +98,17 @@ item.to_xml bibdata: true
86
98
  </bibdata>"
87
99
  ----
88
100
 
101
+ === Typed links
102
+
103
+ Each ECMA document has `src` and `doi` link types.
104
+
105
+ [source,ruby]
106
+ ----
107
+ item.link
108
+ => [#<RelatonBib::TypedUri:0x00007fb16ecde728 @content=#<Addressable::URI:0x7e4 URI:https://www.ecma-international.org/publications-and-standards/standards/ecma-6/>, @type="src">,
109
+ #<RelatonBib::TypedUri:0x00007fb16ecde070 @content=#<Addressable::URI:0x7f8 URI:https://www.ecma-international.org/wp-content/uploads/ECMA-6_6th_edition_december_1991.pdf>, @type="doi">]
110
+ ----
111
+
89
112
  === Parse a file locally
90
113
 
91
114
  [source,ruby]
@@ -112,7 +135,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
112
135
 
113
136
  == Contributing
114
137
 
115
- Bug reports and pull requests are welcome on GitHub at https://github.com/relaton/relaton_ecma.
138
+ Bug reports and pull requests are welcome on GitHub at https://github.com/relaton/relaton-ecma.
116
139
 
117
140
 
118
141
  == License
@@ -1,9 +1,10 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <include href="biblio.rng"/>
4
- <start>
5
- <ref name="document"/>
6
- </start>
3
+ <include href="biblio.rng">
4
+ <start>
5
+ <ref name="document"/>
6
+ </start>
7
+ </include>
7
8
  <define name="document">
8
9
  <element name="document">
9
10
  <optional>
@@ -43,13 +44,16 @@
43
44
  </attribute>
44
45
  </optional>
45
46
  <optional>
46
- <ref name="section-title"/>
47
+ <attribute name="language"/>
47
48
  </optional>
48
49
  <optional>
49
- <ref name="BasicBlock"/>
50
+ <attribute name="script"/>
51
+ </optional>
52
+ <optional>
53
+ <ref name="section-title"/>
50
54
  </optional>
51
55
  <zeroOrMore>
52
- <ref name="note"/>
56
+ <ref name="BasicBlock"/>
53
57
  </zeroOrMore>
54
58
  </define>
55
59
  <define name="references">
@@ -92,6 +96,10 @@
92
96
  <ref name="example"/>
93
97
  <ref name="review"/>
94
98
  <ref name="pre"/>
99
+ <ref name="note"/>
100
+ <ref name="pagebreak"/>
101
+ <ref name="hr"/>
102
+ <ref name="bookmark"/>
95
103
  </choice>
96
104
  </define>
97
105
  <define name="paragraph">
@@ -165,9 +173,11 @@
165
173
  <data type="dateTime"/>
166
174
  </attribute>
167
175
  </optional>
168
- <attribute name="from">
169
- <data type="IDREF"/>
170
- </attribute>
176
+ <optional>
177
+ <attribute name="from">
178
+ <data type="IDREF"/>
179
+ </attribute>
180
+ </optional>
171
181
  <optional>
172
182
  <attribute name="to">
173
183
  <data type="IDREF"/>
@@ -188,6 +198,14 @@
188
198
  <data type="boolean"/>
189
199
  </attribute>
190
200
  </optional>
201
+ <optional>
202
+ <attribute name="subsequence"/>
203
+ </optional>
204
+ <optional>
205
+ <attribute name="inequality">
206
+ <data type="boolean"/>
207
+ </attribute>
208
+ </optional>
191
209
  <ref name="stem"/>
192
210
  <optional>
193
211
  <ref name="dl"/>
@@ -241,6 +259,9 @@
241
259
  <data type="boolean"/>
242
260
  </attribute>
243
261
  </optional>
262
+ <optional>
263
+ <attribute name="subsequence"/>
264
+ </optional>
244
265
  <optional>
245
266
  <attribute name="lang"/>
246
267
  </optional>
@@ -266,6 +287,9 @@
266
287
  <attribute name="id">
267
288
  <data type="ID"/>
268
289
  </attribute>
290
+ <optional>
291
+ <attribute name="alt"/>
292
+ </optional>
269
293
  <optional>
270
294
  <ref name="tname"/>
271
295
  </optional>
@@ -285,9 +309,15 @@
285
309
  <data type="boolean"/>
286
310
  </attribute>
287
311
  </optional>
312
+ <optional>
313
+ <attribute name="subsequence"/>
314
+ </optional>
288
315
  <optional>
289
316
  <attribute name="alt"/>
290
317
  </optional>
318
+ <optional>
319
+ <attribute name="summary"/>
320
+ </optional>
291
321
  <optional>
292
322
  <attribute name="uri">
293
323
  <data type="anyURI"/>
@@ -313,12 +343,16 @@
313
343
  </define>
314
344
  <define name="tname">
315
345
  <element name="name">
316
- <text/>
317
- </element>
318
- </define>
319
- <define name="tclass">
320
- <element name="name">
321
- <text/>
346
+ <oneOrMore>
347
+ <choice>
348
+ <ref name="PureTextElement"/>
349
+ <ref name="eref"/>
350
+ <ref name="stem"/>
351
+ <ref name="keyword"/>
352
+ <ref name="xref"/>
353
+ <ref name="hyperlink"/>
354
+ </choice>
355
+ </oneOrMore>
322
356
  </element>
323
357
  </define>
324
358
  <define name="thead">
@@ -370,6 +404,16 @@
370
404
  </choice>
371
405
  </attribute>
372
406
  </optional>
407
+ <optional>
408
+ <attribute name="valign">
409
+ <choice>
410
+ <value>top</value>
411
+ <value>middle</value>
412
+ <value>bottom</value>
413
+ <value>baseline</value>
414
+ </choice>
415
+ </attribute>
416
+ </optional>
373
417
  <choice>
374
418
  <zeroOrMore>
375
419
  <ref name="TextElement"/>
@@ -397,6 +441,16 @@
397
441
  </choice>
398
442
  </attribute>
399
443
  </optional>
444
+ <optional>
445
+ <attribute name="valign">
446
+ <choice>
447
+ <value>top</value>
448
+ <value>middle</value>
449
+ <value>bottom</value>
450
+ <value>baseline</value>
451
+ </choice>
452
+ </attribute>
453
+ </optional>
400
454
  <choice>
401
455
  <zeroOrMore>
402
456
  <ref name="TextElement"/>
@@ -417,6 +471,12 @@
417
471
  <data type="boolean"/>
418
472
  </attribute>
419
473
  </optional>
474
+ <optional>
475
+ <attribute name="subsequence"/>
476
+ </optional>
477
+ <optional>
478
+ <ref name="tname"/>
479
+ </optional>
420
480
  <oneOrMore>
421
481
  <choice>
422
482
  <ref name="formula"/>
@@ -481,17 +541,25 @@
481
541
  </attribute>
482
542
  </optional>
483
543
  <optional>
484
- <ref name="source"/>
544
+ <attribute name="subsequence"/>
485
545
  </optional>
486
546
  <optional>
487
- <ref name="tname"/>
547
+ <attribute name="class"/>
488
548
  </optional>
489
549
  <optional>
490
- <ref name="tclass"/>
550
+ <ref name="source"/>
551
+ </optional>
552
+ <optional>
553
+ <ref name="tname"/>
491
554
  </optional>
492
555
  <choice>
493
556
  <ref name="image"/>
557
+ <ref name="video"/>
558
+ <ref name="audio"/>
494
559
  <ref name="pre"/>
560
+ <oneOrMore>
561
+ <ref name="paragraph-with-footnote"/>
562
+ </oneOrMore>
495
563
  <zeroOrMore>
496
564
  <ref name="figure"/>
497
565
  </zeroOrMore>
@@ -529,6 +597,8 @@
529
597
  <ref name="pagebreak"/>
530
598
  <ref name="bookmark"/>
531
599
  <ref name="image"/>
600
+ <ref name="index"/>
601
+ <ref name="index-xref"/>
532
602
  </choice>
533
603
  </define>
534
604
  <define name="PureTextElement">
@@ -553,21 +623,38 @@
553
623
  <define name="em">
554
624
  <element name="em">
555
625
  <zeroOrMore>
556
- <ref name="PureTextElement"/>
626
+ <choice>
627
+ <ref name="PureTextElement"/>
628
+ <ref name="stem"/>
629
+ <ref name="eref"/>
630
+ <ref name="xref"/>
631
+ <ref name="hyperlink"/>
632
+ </choice>
557
633
  </zeroOrMore>
558
634
  </element>
559
635
  </define>
560
636
  <define name="strong">
561
637
  <element name="strong">
562
638
  <zeroOrMore>
563
- <ref name="PureTextElement"/>
639
+ <choice>
640
+ <ref name="PureTextElement"/>
641
+ <ref name="stem"/>
642
+ <ref name="eref"/>
643
+ <ref name="xref"/>
644
+ <ref name="hyperlink"/>
645
+ </choice>
564
646
  </zeroOrMore>
565
647
  </element>
566
648
  </define>
567
649
  <define name="tt">
568
650
  <element name="tt">
569
651
  <zeroOrMore>
570
- <ref name="PureTextElement"/>
652
+ <choice>
653
+ <ref name="PureTextElement"/>
654
+ <ref name="eref"/>
655
+ <ref name="xref"/>
656
+ <ref name="hyperlink"/>
657
+ </choice>
571
658
  </zeroOrMore>
572
659
  </element>
573
660
  </define>
@@ -653,6 +740,65 @@
653
740
  <empty/>
654
741
  </element>
655
742
  </define>
743
+ <define name="index">
744
+ <element name="index">
745
+ <optional>
746
+ <attribute name="to">
747
+ <data type="IDREF"/>
748
+ </attribute>
749
+ </optional>
750
+ <element name="primary">
751
+ <oneOrMore>
752
+ <ref name="PureTextElement"/>
753
+ </oneOrMore>
754
+ </element>
755
+ <optional>
756
+ <element name="secondary">
757
+ <oneOrMore>
758
+ <ref name="PureTextElement"/>
759
+ </oneOrMore>
760
+ </element>
761
+ </optional>
762
+ <optional>
763
+ <element name="tertiary">
764
+ <oneOrMore>
765
+ <ref name="PureTextElement"/>
766
+ </oneOrMore>
767
+ </element>
768
+ </optional>
769
+ </element>
770
+ </define>
771
+ <define name="index-xref">
772
+ <element name="index-xref">
773
+ <attribute name="also">
774
+ <data type="boolean"/>
775
+ </attribute>
776
+ <element name="primary">
777
+ <oneOrMore>
778
+ <ref name="PureTextElement"/>
779
+ </oneOrMore>
780
+ </element>
781
+ <optional>
782
+ <element name="secondary">
783
+ <oneOrMore>
784
+ <ref name="PureTextElement"/>
785
+ </oneOrMore>
786
+ </element>
787
+ </optional>
788
+ <optional>
789
+ <element name="tertiary">
790
+ <oneOrMore>
791
+ <ref name="PureTextElement"/>
792
+ </oneOrMore>
793
+ </element>
794
+ </optional>
795
+ <element name="target">
796
+ <oneOrMore>
797
+ <ref name="PureTextElement"/>
798
+ </oneOrMore>
799
+ </element>
800
+ </element>
801
+ </define>
656
802
  <!-- bare ID element, used for referencing arbitrary spans of text -->
657
803
  <define name="bookmark">
658
804
  <element name="bookmark">
@@ -689,7 +835,9 @@
689
835
  <attribute name="alt"/>
690
836
  </optional>
691
837
  <ref name="CitationType"/>
692
- <text/>
838
+ <oneOrMore>
839
+ <ref name="PureTextElement"/>
840
+ </oneOrMore>
693
841
  </define>
694
842
  <define name="hyperlink">
695
843
  <element name="link">
@@ -702,7 +850,9 @@
702
850
  <optional>
703
851
  <attribute name="alt"/>
704
852
  </optional>
705
- <text/>
853
+ <oneOrMore>
854
+ <ref name="PureTextElement"/>
855
+ </oneOrMore>
706
856
  </element>
707
857
  </define>
708
858
  <define name="xref">
@@ -716,7 +866,9 @@
716
866
  <optional>
717
867
  <attribute name="alt"/>
718
868
  </optional>
719
- <text/>
869
+ <oneOrMore>
870
+ <ref name="PureTextElement"/>
871
+ </oneOrMore>
720
872
  </element>
721
873
  </define>
722
874
  <define name="fn">
@@ -778,6 +930,9 @@
778
930
  <optional>
779
931
  <attribute name="alt"/>
780
932
  </optional>
933
+ <optional>
934
+ <attribute name="title"/>
935
+ </optional>
781
936
  <optional>
782
937
  <attribute name="longdesc">
783
938
  <data type="anyURI"/>
@@ -786,7 +941,7 @@
786
941
  </element>
787
942
  </define>
788
943
  <define name="video">
789
- <element name="image">
944
+ <element name="video">
790
945
  <attribute name="id">
791
946
  <data type="ID"/>
792
947
  </attribute>
@@ -816,6 +971,9 @@
816
971
  <optional>
817
972
  <attribute name="alt"/>
818
973
  </optional>
974
+ <optional>
975
+ <attribute name="title"/>
976
+ </optional>
819
977
  <optional>
820
978
  <attribute name="longdesc">
821
979
  <data type="anyURI"/>
@@ -827,7 +985,7 @@
827
985
  </element>
828
986
  </define>
829
987
  <define name="audio">
830
- <element name="image">
988
+ <element name="audio">
831
989
  <attribute name="id">
832
990
  <data type="ID"/>
833
991
  </attribute>
@@ -841,6 +999,9 @@
841
999
  <optional>
842
1000
  <attribute name="alt"/>
843
1001
  </optional>
1002
+ <optional>
1003
+ <attribute name="title"/>
1004
+ </optional>
844
1005
  <optional>
845
1006
  <attribute name="longdesc">
846
1007
  <data type="anyURI"/>
@@ -925,6 +1086,9 @@
925
1086
  <value>alphabet_upper</value>
926
1087
  </choice>
927
1088
  </attribute>
1089
+ <optional>
1090
+ <attribute name="start"/>
1091
+ </optional>
928
1092
  <oneOrMore>
929
1093
  <ref name="li"/>
930
1094
  </oneOrMore>
data/grammars/biblio.rng CHANGED
@@ -124,7 +124,7 @@
124
124
  <value>application/tei+xml</value>
125
125
  <value>text/x-asciidoc</value>
126
126
  <value>text/markdown</value>
127
- <value>application/x-isodoc+xml</value>
127
+ <value>application/x-metanorma+xml</value>
128
128
  <text/>
129
129
  </choice>
130
130
  </attribute>
@@ -401,9 +401,9 @@
401
401
  <choice>
402
402
  <!-- iso191606 TODO -->
403
403
  <group>
404
- <oneOrMore>
404
+ <zeroOrMore>
405
405
  <ref name="street"/>
406
- </oneOrMore>
406
+ </zeroOrMore>
407
407
  <ref name="city"/>
408
408
  <optional>
409
409
  <ref name="state"/>
@@ -452,6 +452,7 @@
452
452
  <attribute name="type">
453
453
  <choice>
454
454
  <value>isni</value>
455
+ <value>orcid</value>
455
456
  <value>uri</value>
456
457
  </choice>
457
458
  </attribute>
@@ -461,10 +462,7 @@
461
462
  <define name="org-identifier">
462
463
  <element name="identifier">
463
464
  <attribute name="type">
464
- <choice>
465
- <value>orcid</value>
466
- <value>uri</value>
467
- </choice>
465
+ <data type="string" datatypeLibrary=""/>
468
466
  </attribute>
469
467
  <text/>
470
468
  </element>
@@ -789,6 +787,7 @@
789
787
  <value>adapted</value>
790
788
  <value>vote-started</value>
791
789
  <value>vote-ended</value>
790
+ <value>announced</value>
792
791
  </choice>
793
792
  </define>
794
793
  <define name="bdate">
@@ -1106,7 +1105,7 @@
1106
1105
  <value>complementOf</value>
1107
1106
  <value>obsoletes</value>
1108
1107
  <value>obsoletedBy</value>
1109
- <value>cited</value>
1108
+ <value>cites</value>
1110
1109
  <value>isCitedIn</value>
1111
1110
  </choice>
1112
1111
  </define>