metanorma-ieee 1.3.0 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/html2doc/ieee/lists.rb +1 -1
- data/lib/html2doc/ieee/notes.rb +1 -1
- data/lib/html2doc/ieee.rb +1 -1
- data/lib/html2doc/ieee_wp/lists.rb +1 -1
- data/lib/html2doc/ieee_wp.rb +1 -1
- data/lib/isodoc/ieee/base_convert.rb +1 -1
- data/lib/isodoc/ieee/html/htmlstyle.css +4 -1
- data/lib/isodoc/ieee/html_convert.rb +1 -1
- data/lib/isodoc/ieee/i18n.rb +1 -1
- data/lib/isodoc/ieee/ieee.amendment.xsl +250 -35
- data/lib/isodoc/ieee/ieee.rb +1 -1
- data/lib/isodoc/ieee/ieee.standard.xsl +250 -35
- data/lib/isodoc/ieee/ieee_xml_convert.rb +2 -2
- data/lib/isodoc/ieee/init.rb +2 -2
- data/lib/isodoc/ieee/metadata.rb +1 -1
- data/lib/isodoc/ieee/pdf_convert.rb +1 -1
- data/lib/isodoc/ieee/presentation_bibdata.rb +1 -1
- data/lib/isodoc/ieee/presentation_ref.rb +7 -8
- data/lib/isodoc/ieee/presentation_terms.rb +1 -1
- data/lib/isodoc/ieee/presentation_xml_convert.rb +1 -1
- data/lib/isodoc/ieee/word_authority.rb +1 -1
- data/lib/isodoc/ieee/word_cleanup.rb +2 -2
- data/lib/isodoc/ieee/word_cleanup_blocks.rb +1 -1
- data/lib/isodoc/ieee/word_convert.rb +2 -2
- data/lib/isodoc/ieee/word_wp_cleanup.rb +2 -2
- data/lib/isodoc/ieee/word_wp_convert.rb +1 -1
- data/lib/isodoc/ieee/xref.rb +1 -1
- data/lib/isodoc/ieee.rb +1 -1
- data/lib/metanorma/ieee/basicdoc.rng +861 -481
- data/lib/metanorma/ieee/biblio-standoc.rng +100 -20
- data/lib/metanorma/ieee/biblio.rng +897 -333
- data/lib/metanorma/ieee/cleanup.rb +2 -2
- data/lib/metanorma/ieee/cleanup_ref.rb +2 -2
- data/lib/metanorma/ieee/converter.rb +7 -7
- data/lib/metanorma/ieee/front.rb +1 -1
- data/lib/metanorma/ieee/isodoc.rng +1031 -915
- data/lib/metanorma/ieee/processor.rb +7 -7
- data/lib/metanorma/ieee/relaton-ieee.rng +1 -0
- data/lib/metanorma/ieee/reqt.rng +94 -75
- data/lib/metanorma/ieee/term_lookup_cleanup.rb +1 -1
- data/lib/metanorma/ieee/validate.rb +4 -4
- data/lib/metanorma/ieee/validate_section.rb +1 -1
- data/lib/metanorma/ieee/validate_style.rb +1 -1
- data/lib/metanorma/ieee/version.rb +2 -2
- data/lib/metanorma/ieee.rb +1 -1
- data/lib/metanorma-ieee.rb +1 -1
- data/lib/relaton/render/general.rb +2 -2
- data/lib/relaton/render/parse.rb +1 -1
- data/metanorma-ieee.gemspec +1 -1
- metadata +2 -2
@@ -1,7 +1,7 @@
|
|
1
1
|
require "metanorma/processor"
|
2
2
|
|
3
3
|
module Metanorma
|
4
|
-
module
|
4
|
+
module Ieee
|
5
5
|
class Processor < Metanorma::Processor
|
6
6
|
def initialize
|
7
7
|
@short = :ieee
|
@@ -30,27 +30,27 @@ module Metanorma
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def version
|
33
|
-
"Metanorma::
|
33
|
+
"Metanorma::Ieee #{Metanorma::Ieee::VERSION}"
|
34
34
|
end
|
35
35
|
|
36
36
|
def output(isodoc_node, inname, outname, format, options = {})
|
37
37
|
options_preprocess(options)
|
38
38
|
case format
|
39
39
|
when :html
|
40
|
-
IsoDoc::
|
40
|
+
IsoDoc::Ieee::HtmlConvert.new(options).convert(inname, isodoc_node,
|
41
41
|
nil, outname)
|
42
42
|
when :doc
|
43
|
-
IsoDoc::
|
43
|
+
IsoDoc::Ieee::WordConvert.new(options).convert(inname, isodoc_node,
|
44
44
|
nil, outname)
|
45
45
|
when :pdf
|
46
|
-
IsoDoc::
|
46
|
+
IsoDoc::Ieee::PdfConvert.new(options).convert(inname, isodoc_node,
|
47
47
|
nil, outname)
|
48
48
|
when :presentation
|
49
|
-
IsoDoc::
|
49
|
+
IsoDoc::Ieee::PresentationXMLConvert.new(options).convert(
|
50
50
|
inname, isodoc_node, nil, outname
|
51
51
|
)
|
52
52
|
when :ieee
|
53
|
-
IsoDoc::
|
53
|
+
IsoDoc::Ieee::IeeeXMLConvert.new(options)
|
54
54
|
.convert(inname, isodoc_node, nil, outname)
|
55
55
|
else
|
56
56
|
super
|
data/lib/metanorma/ieee/reqt.rng
CHANGED
@@ -1,20 +1,27 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
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
3
|
<!--
|
4
4
|
Presupposes isodoc.rnc, is included in it
|
5
5
|
include "isodoc.rnc" { }
|
6
|
+
|
7
|
+
This is the Metanorma default provisions model; it is overridden by other provisions models,
|
8
|
+
such as Modspec
|
6
9
|
-->
|
7
10
|
<define name="requirement">
|
11
|
+
<a:documentation>Specification of an attribute of a subject that is required.
|
12
|
+
NOTE: A requirement can contain other requirements</a:documentation>
|
8
13
|
<element name="requirement">
|
9
14
|
<ref name="RequirementType"/>
|
10
15
|
</element>
|
11
16
|
</define>
|
12
17
|
<define name="recommendation">
|
18
|
+
<a:documentation>Specification of an attribute of a subject that is recommended</a:documentation>
|
13
19
|
<element name="recommendation">
|
14
20
|
<ref name="RequirementType"/>
|
15
21
|
</element>
|
16
22
|
</define>
|
17
23
|
<define name="permission">
|
24
|
+
<a:documentation>Specification of an attribute of a subject that is permitted</a:documentation>
|
18
25
|
<element name="permission">
|
19
26
|
<ref name="RequirementType"/>
|
20
27
|
</element>
|
@@ -22,83 +29,101 @@
|
|
22
29
|
<define name="RequirementType">
|
23
30
|
<optional>
|
24
31
|
<attribute name="obligation">
|
25
|
-
<
|
26
|
-
|
27
|
-
|
28
|
-
<optional>
|
29
|
-
<attribute name="unnumbered">
|
30
|
-
<data type="boolean"/>
|
31
|
-
</attribute>
|
32
|
-
</optional>
|
33
|
-
<optional>
|
34
|
-
<attribute name="number"/>
|
35
|
-
</optional>
|
36
|
-
<optional>
|
37
|
-
<attribute name="subsequence"/>
|
38
|
-
</optional>
|
39
|
-
<optional>
|
40
|
-
<attribute name="keep-with-next">
|
41
|
-
<data type="boolean"/>
|
42
|
-
</attribute>
|
43
|
-
</optional>
|
44
|
-
<optional>
|
45
|
-
<attribute name="keep-lines-together">
|
46
|
-
<data type="boolean"/>
|
32
|
+
<a:documentation>An attribute that may be used to override the obligation represented in
|
33
|
+
the tag name of the top level containers</a:documentation>
|
34
|
+
<ref name="ReqtObligationType"/>
|
47
35
|
</attribute>
|
48
36
|
</optional>
|
49
37
|
<attribute name="id">
|
50
38
|
<data type="ID"/>
|
51
39
|
</attribute>
|
40
|
+
<ref name="NumberingAttributes"/>
|
41
|
+
<ref name="BlockAttributes"/>
|
52
42
|
<optional>
|
53
|
-
<attribute name="filename"
|
54
|
-
|
55
|
-
|
56
|
-
<attribute name="model"/>
|
57
|
-
</optional>
|
58
|
-
<optional>
|
59
|
-
<attribute name="type"/>
|
43
|
+
<attribute name="filename">
|
44
|
+
<a:documentation>File name of the requirement model when exported</a:documentation>
|
45
|
+
</attribute>
|
60
46
|
</optional>
|
61
47
|
<optional>
|
62
|
-
<attribute name="
|
48
|
+
<attribute name="model">
|
49
|
+
<a:documentation>Model of requirements realised by this requirement, e.g. "ogc" for Modspec</a:documentation>
|
50
|
+
</attribute>
|
63
51
|
</optional>
|
64
52
|
<optional>
|
65
|
-
<attribute name="
|
66
|
-
<
|
53
|
+
<attribute name="type">
|
54
|
+
<a:documentation>Type of requirement; does not override labelling, unlike `class`</a:documentation>
|
67
55
|
</attribute>
|
68
56
|
</optional>
|
69
57
|
<optional>
|
70
|
-
<attribute name="class"
|
58
|
+
<attribute name="class">
|
59
|
+
<a:documentation>Class of provision, used to sequence and label that class separately.
|
60
|
+
By default, provisions are sequenced and labelled as requirements, recommendations, or
|
61
|
+
permissions, by obligation; the class overrides that</a:documentation>
|
62
|
+
</attribute>
|
71
63
|
</optional>
|
72
64
|
<optional>
|
73
|
-
<ref name="reqtitle"
|
65
|
+
<ref name="reqtitle">
|
66
|
+
<a:documentation>Human-readable title of the requirement</a:documentation>
|
67
|
+
</ref>
|
74
68
|
</optional>
|
75
69
|
<optional>
|
76
|
-
<ref name="
|
70
|
+
<ref name="reqtlabel">
|
71
|
+
<a:documentation>Formal identifier with which the requirement is referenced</a:documentation>
|
72
|
+
</ref>
|
77
73
|
</optional>
|
78
74
|
<zeroOrMore>
|
79
|
-
<ref name="subject"
|
75
|
+
<ref name="subject">
|
76
|
+
<a:documentation>The party subject to the obligation stated in the requirement</a:documentation>
|
77
|
+
</ref>
|
80
78
|
</zeroOrMore>
|
81
79
|
<zeroOrMore>
|
82
|
-
<ref name="reqinherit"
|
80
|
+
<ref name="reqinherit">
|
81
|
+
<a:documentation>Reference to the identifier of another requirement, of which this requirement
|
82
|
+
is a subclass, and from which it inherits attributes</a:documentation>
|
83
|
+
</ref>
|
83
84
|
</zeroOrMore>
|
84
85
|
<zeroOrMore>
|
85
|
-
<ref name="classification"
|
86
|
+
<ref name="classification">
|
87
|
+
<a:documentation>Key/Value pairs of metadata used to describe the requirement.
|
88
|
+
A key can be associated with multiple values</a:documentation>
|
89
|
+
</ref>
|
86
90
|
</zeroOrMore>
|
87
91
|
<zeroOrMore>
|
88
92
|
<choice>
|
89
|
-
<ref name="measurementtarget"
|
90
|
-
|
91
|
-
|
92
|
-
<ref name="
|
93
|
-
|
94
|
-
|
93
|
+
<ref name="measurementtarget">
|
94
|
+
<a:documentation>Quantitative statement of metrics that the requirement realises</a:documentation>
|
95
|
+
</ref>
|
96
|
+
<ref name="specification">
|
97
|
+
<a:documentation>Formal specification of the requirement. Expected to be machine-readable</a:documentation>
|
98
|
+
</ref>
|
99
|
+
<ref name="verification">
|
100
|
+
<a:documentation>Processes or code used to verify that the requirement is being complied
|
101
|
+
with. Can be a test (including test code), or a compliance statement</a:documentation>
|
102
|
+
</ref>
|
103
|
+
<ref name="import">
|
104
|
+
<a:documentation>A reference to source code or a statement of prerequisites which is defined elsewhere</a:documentation>
|
105
|
+
</ref>
|
106
|
+
<ref name="description">
|
107
|
+
<a:documentation>Descriptive statement of the content of the requirement. Is expected to
|
108
|
+
be human-readable, and to contain formatting markup following Metanorma
|
109
|
+
conventions. Is expected to be discursive, and be resumed after
|
110
|
+
interruption by other sub-containers</a:documentation>
|
111
|
+
</ref>
|
112
|
+
<ref name="component">
|
113
|
+
<a:documentation>Provisions nested within this provision, which cannot be referenced autonomously and have
|
114
|
+
subclasses specific to the parent provision. Not expressed with provision metadata</a:documentation>
|
115
|
+
</ref>
|
95
116
|
</choice>
|
96
117
|
</zeroOrMore>
|
97
118
|
<optional>
|
98
|
-
<ref name="reqt_references"
|
119
|
+
<ref name="reqt_references">
|
120
|
+
<a:documentation>A list of references for the requirement, following the Relaton model</a:documentation>
|
121
|
+
</ref>
|
99
122
|
</optional>
|
100
123
|
<zeroOrMore>
|
101
124
|
<choice>
|
125
|
+
<a:documentation>Provisions nested within this provision, which are self-standing and do not have
|
126
|
+
subclasses specific to the parent provision</a:documentation>
|
102
127
|
<ref name="requirement"/>
|
103
128
|
<ref name="recommendation"/>
|
104
129
|
<ref name="permission"/>
|
@@ -107,10 +132,10 @@
|
|
107
132
|
</define>
|
108
133
|
<define name="reqtitle">
|
109
134
|
<element name="title">
|
110
|
-
<ref name="
|
135
|
+
<ref name="LocalizedMarkedUpString"/>
|
111
136
|
</element>
|
112
137
|
</define>
|
113
|
-
<define name="
|
138
|
+
<define name="reqtlabel">
|
114
139
|
<element name="identifier">
|
115
140
|
<oneOrMore>
|
116
141
|
<ref name="TextElement"/>
|
@@ -158,7 +183,9 @@
|
|
158
183
|
</define>
|
159
184
|
<define name="component">
|
160
185
|
<element name="component">
|
161
|
-
<attribute name="class"
|
186
|
+
<attribute name="class">
|
187
|
+
<a:documentation>Class of component</a:documentation>
|
188
|
+
</attribute>
|
162
189
|
<ref name="RequirementSubpart"/>
|
163
190
|
</element>
|
164
191
|
</define>
|
@@ -170,44 +197,36 @@
|
|
170
197
|
</element>
|
171
198
|
</define>
|
172
199
|
<define name="RequirementSubpart">
|
173
|
-
<
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
200
|
+
<a:documentation>A subcontainer can be either machine-readable or human-readable, or a
|
201
|
+
mixture of the two.
|
202
|
+
A machine-readable component can be included as source code with
|
203
|
+
nomination of the language</a:documentation>
|
204
|
+
<optional>
|
205
|
+
<attribute name="type">
|
206
|
+
<a:documentation>Type of sub-container.
|
207
|
+
For example a `verification[@type = "unit-test"]` contains a unit test of a single
|
208
|
+
feature, and is to be treated differently from
|
209
|
+
`verification[@type = "comprehensive"]`, which represents a comprehensive test suite</a:documentation>
|
179
210
|
</attribute>
|
180
211
|
</optional>
|
181
212
|
<optional>
|
182
|
-
<attribute name="
|
183
|
-
<
|
184
|
-
|
185
|
-
</optional>
|
186
|
-
<optional>
|
187
|
-
<attribute name="keep-lines-together">
|
213
|
+
<attribute name="exclude">
|
214
|
+
<a:documentation>Indicates that the current sub-container is only intended to be
|
215
|
+
machine-readable, and is not to be rendered as document output</a:documentation>
|
188
216
|
<data type="boolean"/>
|
189
217
|
</attribute>
|
190
218
|
</optional>
|
191
|
-
<
|
192
|
-
<attribute name="tag"/>
|
193
|
-
</optional>
|
194
|
-
<optional>
|
195
|
-
<attribute name="multilingual-rendering">
|
196
|
-
<ref name="MultilingualRenderingType"/>
|
197
|
-
</attribute>
|
198
|
-
</optional>
|
219
|
+
<ref name="BlockAttributes"/>
|
199
220
|
<oneOrMore>
|
200
221
|
<choice>
|
222
|
+
<a:documentation>Content of subpart: blocks, rather than provisions</a:documentation>
|
201
223
|
<ref name="BasicBlock"/>
|
202
224
|
<ref name="component"/>
|
203
225
|
</choice>
|
204
226
|
</oneOrMore>
|
205
227
|
</define>
|
206
|
-
<define name="
|
207
|
-
<
|
208
|
-
|
209
|
-
<value>recommendation</value>
|
210
|
-
<value>permission</value>
|
211
|
-
</choice>
|
228
|
+
<define name="ReqtObligationType">
|
229
|
+
<a:documentation>Values are "requirement", "recommendation", "permission"; multiple values can be comma-delimited</a:documentation>
|
230
|
+
<text/>
|
212
231
|
</define>
|
213
232
|
</grammar>
|
@@ -2,7 +2,7 @@ require_relative "validate_section"
|
|
2
2
|
require_relative "validate_style"
|
3
3
|
|
4
4
|
module Metanorma
|
5
|
-
module
|
5
|
+
module Ieee
|
6
6
|
class Converter < Standoc::Converter
|
7
7
|
def validate(doc)
|
8
8
|
content_validate(doc)
|
@@ -127,9 +127,9 @@ module Metanorma
|
|
127
127
|
end
|
128
128
|
|
129
129
|
def xrefs(xmldoc)
|
130
|
-
klass = IsoDoc::
|
131
|
-
xrefs = IsoDoc::
|
132
|
-
.new(@lang, @script, klass, IsoDoc::
|
130
|
+
klass = IsoDoc::Ieee::HtmlConvert.new(language: @lang, script: @script)
|
131
|
+
xrefs = IsoDoc::Ieee::Xref
|
132
|
+
.new(@lang, @script, klass, IsoDoc::Ieee::I18n.new(@lang, @script),
|
133
133
|
{ hierarchicalassets: @hierarchical_assets })
|
134
134
|
# don't process refs without relaton-render init
|
135
135
|
xrefs.parse_inclusions(clauses: true, assets: true)
|
data/lib/metanorma/ieee.rb
CHANGED
data/lib/metanorma-ieee.rb
CHANGED
@@ -3,7 +3,7 @@ require_relative "parse"
|
|
3
3
|
|
4
4
|
module Relaton
|
5
5
|
module Render
|
6
|
-
module
|
6
|
+
module Ieee
|
7
7
|
class General < ::Relaton::Render::IsoDoc::General
|
8
8
|
def config_loc
|
9
9
|
YAML.load_file(File.join(File.dirname(__FILE__), "config.yml"))
|
@@ -11,7 +11,7 @@ module Relaton
|
|
11
11
|
|
12
12
|
def klass_initialize(_options)
|
13
13
|
super
|
14
|
-
@parseklass = Relaton::Render::
|
14
|
+
@parseklass = Relaton::Render::Ieee::Parse
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
data/lib/relaton/render/parse.rb
CHANGED
data/metanorma-ieee.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ieee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|