metanorma-iso 3.1.1 → 3.1.3
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/README.adoc +1 -1
- data/lib/isodoc/iso/i18n-de.yaml +64 -0
- data/lib/isodoc/iso/i18n-en.yaml +2 -0
- data/lib/isodoc/iso/i18n-fr.yaml +46 -11
- data/lib/isodoc/iso/i18n-ru.yaml +61 -0
- data/lib/isodoc/iso/iso.amendment.xsl +650 -393
- data/lib/isodoc/iso/iso.international-standard.xsl +650 -393
- data/lib/isodoc/iso/metadata.rb +44 -49
- data/lib/isodoc/iso/presentation_bibdata.rb +2 -29
- data/lib/isodoc/iso/presentation_section.rb +2 -2
- data/lib/metanorma/iso/basicdoc.rng +1 -1
- data/lib/metanorma/iso/biblio-standoc.rng +0 -49
- data/lib/metanorma/iso/biblio.rng +11 -1
- data/lib/metanorma/iso/cleanup.rb +20 -35
- data/lib/metanorma/iso/front_contributor.rb +60 -75
- data/lib/metanorma/iso/isodoc.rng +7 -60
- data/lib/metanorma/iso/relaton-iso.rng +0 -50
- data/lib/metanorma/iso/validate.rb +7 -4
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +1 -1
- metadata +3 -3
@@ -1,6 +1,6 @@
|
|
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" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
|
-
<!-- VERSION v2.1.
|
3
|
+
<!-- VERSION v2.1.1 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -42,36 +42,6 @@ All IdRefType instances point not to `@id` in Semantic XML, which is the Content
|
|
42
42
|
but to `@anchor`, the user-supplied cross-reference</a:documentation>
|
43
43
|
<text/>
|
44
44
|
</define>
|
45
|
-
<define name="index-primary">
|
46
|
-
<element name="primary">
|
47
|
-
<oneOrMore>
|
48
|
-
<choice>
|
49
|
-
<ref name="PureTextElement"/>
|
50
|
-
<ref name="stem"/>
|
51
|
-
</choice>
|
52
|
-
</oneOrMore>
|
53
|
-
</element>
|
54
|
-
</define>
|
55
|
-
<define name="index-secondary">
|
56
|
-
<element name="secondary">
|
57
|
-
<oneOrMore>
|
58
|
-
<choice>
|
59
|
-
<ref name="PureTextElement"/>
|
60
|
-
<ref name="stem"/>
|
61
|
-
</choice>
|
62
|
-
</oneOrMore>
|
63
|
-
</element>
|
64
|
-
</define>
|
65
|
-
<define name="index-tertiary">
|
66
|
-
<element name="tertiary">
|
67
|
-
<oneOrMore>
|
68
|
-
<choice>
|
69
|
-
<ref name="PureTextElement"/>
|
70
|
-
<ref name="stem"/>
|
71
|
-
</choice>
|
72
|
-
</oneOrMore>
|
73
|
-
</element>
|
74
|
-
</define>
|
75
45
|
<define name="review">
|
76
46
|
<a:documentation>Generalise BasicDoc element from just review comments, to general annotations;
|
77
47
|
the type attribute defaults to `review` for reviews</a:documentation>
|
@@ -592,28 +562,6 @@ normative or informative references, some split references into sections organiz
|
|
592
562
|
</oneOrMore>
|
593
563
|
</element>
|
594
564
|
</define>
|
595
|
-
<define name="sub">
|
596
|
-
<a:documentation>Subscript text. Corresponds to HTML `sub</a:documentation>
|
597
|
-
<element name="sub">
|
598
|
-
<zeroOrMore>
|
599
|
-
<choice>
|
600
|
-
<ref name="PureTextElement"/>
|
601
|
-
<ref name="stem"/>
|
602
|
-
</choice>
|
603
|
-
</zeroOrMore>
|
604
|
-
</element>
|
605
|
-
</define>
|
606
|
-
<define name="sup">
|
607
|
-
<a:documentation>Superscript text. Corresponds to HTML `sup`</a:documentation>
|
608
|
-
<element name="sup">
|
609
|
-
<zeroOrMore>
|
610
|
-
<choice>
|
611
|
-
<ref name="PureTextElement"/>
|
612
|
-
<ref name="stem"/>
|
613
|
-
</choice>
|
614
|
-
</zeroOrMore>
|
615
|
-
</element>
|
616
|
-
</define>
|
617
565
|
<define name="pagebreak">
|
618
566
|
<a:documentation>Page break. Only applicable in paged layouts (e.g. PDF, Word), and not flow layouts (e.g. HTML)</a:documentation>
|
619
567
|
<element name="pagebreak">
|
@@ -1094,7 +1042,6 @@ That concept may be defined as a term within the current document, or it may be
|
|
1094
1042
|
<zeroOrMore>
|
1095
1043
|
<choice>
|
1096
1044
|
<ref name="PureTextElement"/>
|
1097
|
-
<ref name="stem"/>
|
1098
1045
|
<ref name="index"/>
|
1099
1046
|
<ref name="index-xref"/>
|
1100
1047
|
</choice>
|
@@ -1107,7 +1054,6 @@ That concept may be defined as a term within the current document, or it may be
|
|
1107
1054
|
<zeroOrMore>
|
1108
1055
|
<choice>
|
1109
1056
|
<ref name="PureTextElement"/>
|
1110
|
-
<ref name="stem"/>
|
1111
1057
|
<ref name="index"/>
|
1112
1058
|
<ref name="index-xref"/>
|
1113
1059
|
</choice>
|
@@ -2025,10 +1971,7 @@ used in document amendments</a:documentation>
|
|
2025
1971
|
<element name="name">
|
2026
1972
|
<a:documentation>The symbolic form of the designation</a:documentation>
|
2027
1973
|
<oneOrMore>
|
2028
|
-
<
|
2029
|
-
<ref name="PureTextElement"/>
|
2030
|
-
<ref name="stem"/>
|
2031
|
-
</choice>
|
1974
|
+
<ref name="PureTextElement"/>
|
2032
1975
|
</oneOrMore>
|
2033
1976
|
</element>
|
2034
1977
|
</element>
|
@@ -2081,7 +2024,6 @@ used in document amendments</a:documentation>
|
|
2081
2024
|
<zeroOrMore>
|
2082
2025
|
<choice>
|
2083
2026
|
<ref name="PureTextElement"/>
|
2084
|
-
<ref name="stem"/>
|
2085
2027
|
<ref name="index"/>
|
2086
2028
|
<ref name="index-xref"/>
|
2087
2029
|
</choice>
|
@@ -2291,6 +2233,11 @@ used in document amendments</a:documentation>
|
|
2291
2233
|
<ref name="RequiredId"/>
|
2292
2234
|
<ref name="NumberingAttributes"/>
|
2293
2235
|
<ref name="BlockAttributes"/>
|
2236
|
+
<optional>
|
2237
|
+
<attribute name="type">
|
2238
|
+
<a:documentation>Semantic classification of note</a:documentation>
|
2239
|
+
</attribute>
|
2240
|
+
</optional>
|
2294
2241
|
<oneOrMore>
|
2295
2242
|
<choice>
|
2296
2243
|
<a:documentation>Content of the term note</a:documentation>
|
@@ -67,14 +67,6 @@
|
|
67
67
|
</group>
|
68
68
|
</element>
|
69
69
|
</define>
|
70
|
-
<define name="editorialgroup">
|
71
|
-
<element name="editorialgroup">
|
72
|
-
<ref name="ISOProjectGroup"/>
|
73
|
-
</element>
|
74
|
-
<optional>
|
75
|
-
<ref name="approvalgroup"/>
|
76
|
-
</optional>
|
77
|
-
</define>
|
78
70
|
</include>
|
79
71
|
<define name="BibDataExtensionType" combine="interleave">
|
80
72
|
<optional>
|
@@ -112,33 +104,6 @@ Used for legacy ISO documents</a:documentation>
|
|
112
104
|
<ref name="DocumentType"/>
|
113
105
|
</element>
|
114
106
|
</define>
|
115
|
-
<define name="ISOProjectGroup">
|
116
|
-
<zeroOrMore>
|
117
|
-
<ref name="agency"/>
|
118
|
-
</zeroOrMore>
|
119
|
-
<oneOrMore>
|
120
|
-
<ref name="technical-committee"/>
|
121
|
-
</oneOrMore>
|
122
|
-
<zeroOrMore>
|
123
|
-
<ref name="subcommittee"/>
|
124
|
-
</zeroOrMore>
|
125
|
-
<zeroOrMore>
|
126
|
-
<ref name="workgroup"/>
|
127
|
-
</zeroOrMore>
|
128
|
-
<optional>
|
129
|
-
<ref name="secretariat"/>
|
130
|
-
</optional>
|
131
|
-
</define>
|
132
|
-
<define name="approvalgroup">
|
133
|
-
<element name="approvalgroup">
|
134
|
-
<ref name="ISOProjectGroup"/>
|
135
|
-
</element>
|
136
|
-
</define>
|
137
|
-
<define name="agency">
|
138
|
-
<element name="agency">
|
139
|
-
<text/>
|
140
|
-
</element>
|
141
|
-
</define>
|
142
107
|
<define name="horizontal">
|
143
108
|
<element name="horizontal">
|
144
109
|
<data type="boolean"/>
|
@@ -179,21 +144,6 @@ Used for legacy ISO documents</a:documentation>
|
|
179
144
|
<data type="int"/>
|
180
145
|
</element>
|
181
146
|
</define>
|
182
|
-
<define name="subcommittee">
|
183
|
-
<element name="subcommittee">
|
184
|
-
<ref name="IsoWorkgroup"/>
|
185
|
-
</element>
|
186
|
-
</define>
|
187
|
-
<define name="workgroup">
|
188
|
-
<element name="workgroup">
|
189
|
-
<ref name="IsoWorkgroup"/>
|
190
|
-
</element>
|
191
|
-
</define>
|
192
|
-
<define name="secretariat">
|
193
|
-
<element name="secretariat">
|
194
|
-
<text/>
|
195
|
-
</element>
|
196
|
-
</define>
|
197
147
|
<define name="stagename">
|
198
148
|
<element name="stagename">
|
199
149
|
<optional>
|
@@ -12,13 +12,17 @@ require "iev"
|
|
12
12
|
module Metanorma
|
13
13
|
module Iso
|
14
14
|
class Converter < Standoc::Converter
|
15
|
+
COMMITTEE_XPATH = <<~XPATH.freeze
|
16
|
+
//contributor[role/description = 'committee']/organization/subdivision
|
17
|
+
XPATH
|
18
|
+
|
15
19
|
def isosubgroup_validate(root)
|
16
|
-
root.xpath("
|
20
|
+
root.xpath("#{COMMITTEE_XPATH}[@type = 'Technical committee']/@subtype").each do |t|
|
17
21
|
%w{TC PC JTC JPC}.include?(t.text) or
|
18
22
|
@log.add("Document Attributes", nil,
|
19
23
|
"invalid technical committee type #{t}")
|
20
24
|
end
|
21
|
-
root.xpath("
|
25
|
+
root.xpath("#{COMMITTEE_XPATH}[@type = 'Subcommittee']/@subtype").each do |t|
|
22
26
|
%w{SC JSC}.include?(t.text) or
|
23
27
|
@log.add("Document Attributes", nil,
|
24
28
|
"invalid subcommittee type #{t}")
|
@@ -60,12 +64,11 @@ module Metanorma
|
|
60
64
|
prec = t.at("./preceding-sibling::text()[last()]")
|
61
65
|
!prec.nil? && /\b(see|refer to)\p{Zs}*\Z/mi.match(prec) or next
|
62
66
|
unless target = bibitemids[t["bibitemid"]]
|
63
|
-
#unless target = root.at("//bibitem[@anchor = '#{t['bibitemid']}']")
|
67
|
+
# unless target = root.at("//bibitem[@anchor = '#{t['bibitemid']}']")
|
64
68
|
@log.add("Bibliography", t,
|
65
69
|
"'#{t} is not pointing to a real reference")
|
66
70
|
next
|
67
71
|
end
|
68
|
-
#target.at("./ancestor::references[@normative = 'true']") and
|
69
72
|
target[:norm] and
|
70
73
|
@log.add("Style", t,
|
71
74
|
"'see #{t}' is pointing to a normative reference")
|
data/metanorma-iso.gemspec
CHANGED
@@ -50,5 +50,5 @@ spec.add_development_dependency "rubocop-performance"
|
|
50
50
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
51
51
|
spec.add_development_dependency "timecop", "~> 0.9"
|
52
52
|
spec.add_development_dependency "webmock"
|
53
|
-
spec.add_development_dependency "
|
53
|
+
spec.add_development_dependency "canon"
|
54
54
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|
@@ -249,7 +249,7 @@ dependencies:
|
|
249
249
|
- !ruby/object:Gem::Version
|
250
250
|
version: '0'
|
251
251
|
- !ruby/object:Gem::Dependency
|
252
|
-
name:
|
252
|
+
name: canon
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|
254
254
|
requirements:
|
255
255
|
- - ">="
|