relaton-iec 1.7.7 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +1 -11
  3. data/.rubocop.yml +3 -1
  4. data/README.adoc +36 -0
  5. data/grammars/basicdoc.rng +191 -27
  6. data/grammars/biblio.rng +7 -8
  7. data/grammars/iec.rng +144 -1
  8. data/grammars/isodoc.rng +1156 -112
  9. data/grammars/isostandard.rng +69 -115
  10. data/grammars/reqt.rng +65 -7
  11. data/lib/relaton_iec/basic_block/alignment.rb +30 -0
  12. data/lib/relaton_iec/basic_block/basic_block.rb +15 -0
  13. data/lib/relaton_iec/basic_block/citation_type.rb +32 -0
  14. data/lib/relaton_iec/basic_block/dl.rb +60 -0
  15. data/lib/relaton_iec/basic_block/eref.rb +10 -0
  16. data/lib/relaton_iec/basic_block/eref_type.rb +39 -0
  17. data/lib/relaton_iec/basic_block/formula.rb +34 -0
  18. data/lib/relaton_iec/basic_block/image.rb +41 -0
  19. data/lib/relaton_iec/basic_block/index.rb +27 -0
  20. data/lib/relaton_iec/basic_block/index_xref.rb +31 -0
  21. data/lib/relaton_iec/basic_block/note.rb +21 -0
  22. data/lib/relaton_iec/basic_block/paragraph.rb +27 -0
  23. data/lib/relaton_iec/basic_block/paragraph_with_footnote.rb +29 -0
  24. data/lib/relaton_iec/basic_block/reference_format.rb +38 -0
  25. data/lib/relaton_iec/basic_block/stem.rb +30 -0
  26. data/lib/relaton_iec/basic_block/table.rb +115 -0
  27. data/lib/relaton_iec/basic_block/text_element.rb +27 -0
  28. data/lib/relaton_iec/hit_collection.rb +1 -1
  29. data/lib/relaton_iec/iec_bibliographic_item.rb +93 -1
  30. data/lib/relaton_iec/processor.rb +1 -2
  31. data/lib/relaton_iec/tc_sc_officers_note.rb +24 -0
  32. data/lib/relaton_iec/version.rb +1 -1
  33. data/lib/relaton_iec/xml_parser.rb +20 -0
  34. data/relaton_iec.gemspec +2 -4
  35. metadata +23 -5
data/grammars/iec.rng CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar xmlns="http://relaxng.org/ns/structure/1.0">
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
3
  <!-- default namespace = "https://www.metanorma.com/ns/iec" -->
4
4
  <include href="isostandard.rng">
5
5
  <start>
@@ -13,10 +13,142 @@
13
13
  <value>publicly-available-specification</value>
14
14
  <value>international-workshop-agreement</value>
15
15
  <value>guide</value>
16
+ <value>industry-technical-agreement</value>
16
17
  </choice>
17
18
  </define>
19
+ <define name="BibDataExtensionType">
20
+ <ref name="doctype"/>
21
+ <optional>
22
+ <ref name="docsubtype"/>
23
+ </optional>
24
+ <optional>
25
+ <ref name="horizontal"/>
26
+ </optional>
27
+ <optional>
28
+ <ref name="function"/>
29
+ </optional>
30
+ <ref name="editorialgroup"/>
31
+ <zeroOrMore>
32
+ <ref name="ics"/>
33
+ </zeroOrMore>
34
+ <ref name="structuredidentifier"/>
35
+ <optional>
36
+ <ref name="stagename"/>
37
+ </optional>
38
+ <optional>
39
+ <ref name="updates_document_type"/>
40
+ </optional>
41
+ <optional>
42
+ <ref name="accessibility-color-inside"/>
43
+ </optional>
44
+ <optional>
45
+ <ref name="price-code"/>
46
+ </optional>
47
+ <optional>
48
+ <ref name="cen-processing"/>
49
+ </optional>
50
+ <optional>
51
+ <ref name="secretary"/>
52
+ </optional>
53
+ <optional>
54
+ <ref name="interest-to-committees"/>
55
+ </optional>
56
+ <optional>
57
+ <ref name="tc-sc-officers-note"/>
58
+ </optional>
59
+ </define>
60
+ <define name="term">
61
+ <element name="term">
62
+ <optional>
63
+ <attribute name="id">
64
+ <data type="ID"/>
65
+ </attribute>
66
+ </optional>
67
+ <optional>
68
+ <attribute name="language"/>
69
+ </optional>
70
+ <optional>
71
+ <attribute name="script"/>
72
+ </optional>
73
+ <optional>
74
+ <attribute name="tag"/>
75
+ </optional>
76
+ <optional>
77
+ <attribute name="multilingual-rendering">
78
+ <ref name="MultilingualRenderingType"/>
79
+ </attribute>
80
+ </optional>
81
+ <oneOrMore>
82
+ <ref name="preferred"/>
83
+ </oneOrMore>
84
+ <zeroOrMore>
85
+ <ref name="admitted"/>
86
+ </zeroOrMore>
87
+ <zeroOrMore>
88
+ <ref name="deprecates"/>
89
+ </zeroOrMore>
90
+ <optional>
91
+ <ref name="termdomain"/>
92
+ </optional>
93
+ <ref name="termdefinition"/>
94
+ <zeroOrMore>
95
+ <ref name="termnote"/>
96
+ </zeroOrMore>
97
+ <zeroOrMore>
98
+ <ref name="termexample"/>
99
+ </zeroOrMore>
100
+ <zeroOrMore>
101
+ <ref name="termsource"/>
102
+ </zeroOrMore>
103
+ <zeroOrMore>
104
+ <ref name="term"/>
105
+ </zeroOrMore>
106
+ </element>
107
+ </define>
18
108
  </include>
19
109
  <!-- end overrides -->
110
+ <define name="function">
111
+ <element name="function">
112
+ <choice>
113
+ <value>emc</value>
114
+ <value>safety</value>
115
+ <value>environment</value>
116
+ <value>quality-assurance</value>
117
+ </choice>
118
+ </element>
119
+ </define>
120
+ <define name="accessibility-color-inside">
121
+ <element name="accessibility-color-inside">
122
+ <data type="boolean"/>
123
+ </element>
124
+ </define>
125
+ <define name="price-code">
126
+ <element name="price-code">
127
+ <text/>
128
+ </element>
129
+ </define>
130
+ <define name="cen-processing">
131
+ <element name="cen-processing">
132
+ <data type="boolean"/>
133
+ </element>
134
+ </define>
135
+ <define name="secretary">
136
+ <element name="secretary">
137
+ <text/>
138
+ </element>
139
+ </define>
140
+ <define name="interest-to-committees">
141
+ <element name="interest-to-committees">
142
+ <text/>
143
+ </element>
144
+ </define>
145
+ <define name="tc-sc-officers-note">
146
+ <element name="tc-sc-officers-note">
147
+ <zeroOrMore>
148
+ <ref name="BasicBlock"/>
149
+ </zeroOrMore>
150
+ </element>
151
+ </define>
20
152
  <!--
21
153
  We display the Normative References between scope and terms; but to keep the
22
154
  grammar simple, we keep the references together
@@ -34,6 +166,9 @@
34
166
  <zeroOrMore>
35
167
  <ref name="termdocsource"/>
36
168
  </zeroOrMore>
169
+ <optional>
170
+ <ref name="misccontainer"/>
171
+ </optional>
37
172
  <optional>
38
173
  <ref name="boilerplate"/>
39
174
  </optional>
@@ -45,6 +180,14 @@
45
180
  <ref name="annex"/>
46
181
  </zeroOrMore>
47
182
  <ref name="bibliography"/>
183
+ <zeroOrMore>
184
+ <ref name="indexsect"/>
185
+ </zeroOrMore>
186
+ </element>
187
+ </define>
188
+ <define name="updates_document_type">
189
+ <element name="updates-document-type">
190
+ <ref name="DocumentType"/>
48
191
  </element>
49
192
  </define>
50
193
  </grammar>