metanorma-ieee 1.3.1 → 1.3.3
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_convert.rb +1 -1
- data/lib/isodoc/ieee/i18n.rb +1 -1
- data/lib/isodoc/ieee/ieee.amendment.xsl +139 -52
- data/lib/isodoc/ieee/ieee.rb +1 -1
- data/lib/isodoc/ieee/ieee.standard.xsl +139 -52
- 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/biblio-standoc.rng +13 -0
- data/lib/metanorma/ieee/biblio.rng +19 -12
- 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/processor.rb +7 -7
- data/lib/metanorma/ieee/relaton-ieee.rng +1 -0
- 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
@@ -72,6 +72,9 @@ standards defining organization, and that is rendered in a distinct manner</a:do
|
|
72
72
|
from other documents in the same doctype</a:documentation>
|
73
73
|
</ref>
|
74
74
|
</optional>
|
75
|
+
<ref name="flavor">
|
76
|
+
<a:documentation>Flavour of Metanorma used to process this document</a:documentation>
|
77
|
+
</ref>
|
75
78
|
<optional>
|
76
79
|
<ref name="editorialgroup">
|
77
80
|
<a:documentation>Groups associated with the production of the standards document, typically within
|
@@ -113,6 +116,16 @@ a standards definition organization</a:documentation>
|
|
113
116
|
<define name="DocumentSubtype">
|
114
117
|
<text/>
|
115
118
|
</define>
|
119
|
+
<define name="flavor">
|
120
|
+
<element name="flavor">
|
121
|
+
<ref name="MetanormaFlavor"/>
|
122
|
+
</element>
|
123
|
+
</define>
|
124
|
+
<define name="MetanormaFlavor">
|
125
|
+
<a:documentation>This is in fact an enum, as of this writing: standoc iso generic ietf ieee itu nist ogc csa cc iho ribose jis iec bsi bipm plateau.
|
126
|
+
However we prefer not to hardcode it, given ongoing extension.</a:documentation>
|
127
|
+
<text/>
|
128
|
+
</define>
|
116
129
|
<define name="editorialgroup">
|
117
130
|
<a:documentation>A group associated with the production of the standards document, typically within
|
118
131
|
a standards definition organization</a:documentation>
|
@@ -1382,18 +1382,7 @@ Applies whether the resource has already been created or not, and whether it is
|
|
1382
1382
|
<define name="bdate">
|
1383
1383
|
<a:documentation>Significant date in the lifecycle of the bibliographic item, including its production and its access</a:documentation>
|
1384
1384
|
<element name="date">
|
1385
|
-
<
|
1386
|
-
<a:documentation>The phase of the production of or access to a bibliographic item</a:documentation>
|
1387
|
-
<choice>
|
1388
|
-
<ref name="BibliographicDateType"/>
|
1389
|
-
<text/>
|
1390
|
-
</choice>
|
1391
|
-
</attribute>
|
1392
|
-
<optional>
|
1393
|
-
<attribute name="text">
|
1394
|
-
<a:documentation>An optional textual description of the date, especially when a Gregorian date is not applicable</a:documentation>
|
1395
|
-
</attribute>
|
1396
|
-
</optional>
|
1385
|
+
<ref name="bDateAttributes"/>
|
1397
1386
|
<optional>
|
1398
1387
|
<choice>
|
1399
1388
|
<group>
|
@@ -1416,6 +1405,20 @@ Applies whether the resource has already been created or not, and whether it is
|
|
1416
1405
|
</optional>
|
1417
1406
|
</element>
|
1418
1407
|
</define>
|
1408
|
+
<define name="bDateAttributes">
|
1409
|
+
<attribute name="type">
|
1410
|
+
<a:documentation>The phase of the production of or access to a bibliographic item</a:documentation>
|
1411
|
+
<choice>
|
1412
|
+
<ref name="BibliographicDateType"/>
|
1413
|
+
<text/>
|
1414
|
+
</choice>
|
1415
|
+
</attribute>
|
1416
|
+
<optional>
|
1417
|
+
<attribute name="text">
|
1418
|
+
<a:documentation>An optional textual description of the date, especially when a Gregorian date is not applicable</a:documentation>
|
1419
|
+
</attribute>
|
1420
|
+
</optional>
|
1421
|
+
</define>
|
1419
1422
|
<define name="docidentifier">
|
1420
1423
|
<a:documentation>An identifier of a bibliographic item in an international standard scheme</a:documentation>
|
1421
1424
|
<element name="docidentifier">
|
@@ -1884,6 +1887,10 @@ Detailed in https://www.relaton.org/model/relations/</a:documentation>
|
|
1884
1887
|
<value>hasAnnotation</value>
|
1885
1888
|
<value>draftOf</value>
|
1886
1889
|
<value>hasDraft</value>
|
1890
|
+
<value>preliminaryDraftOf</value>
|
1891
|
+
<value>hasPreliminaryDraft</value>
|
1892
|
+
<value>revisionDraftOf</value>
|
1893
|
+
<value>hasRevisionDraft</value>
|
1887
1894
|
<value>editionOf</value>
|
1888
1895
|
<value>hasEdition</value>
|
1889
1896
|
<value>updates</value>
|
@@ -2,7 +2,7 @@ require_relative "cleanup_ref"
|
|
2
2
|
require_relative "term_lookup_cleanup"
|
3
3
|
|
4
4
|
module Metanorma
|
5
|
-
module
|
5
|
+
module Ieee
|
6
6
|
class Converter < Standoc::Converter
|
7
7
|
def initial_boilerplate(xml, isodoc)
|
8
8
|
intro_boilerplate(xml, isodoc)
|
@@ -130,7 +130,7 @@ module Metanorma
|
|
130
130
|
def term_defs_boilerplate_cont(src, term, isodoc); end
|
131
131
|
|
132
132
|
def termlookup_cleanup(xmldoc)
|
133
|
-
Metanorma::
|
133
|
+
Metanorma::Ieee::TermLookupCleanup.new(xmldoc, @log).call
|
134
134
|
end
|
135
135
|
|
136
136
|
def boilerplate_isodoc(xmldoc)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Metanorma
|
2
|
-
module
|
2
|
+
module Ieee
|
3
3
|
class Converter < Standoc::Converter
|
4
4
|
BIBLIO =
|
5
5
|
"//bibliography/references[@normative = 'false'][not(@hidden)] | " \
|
@@ -20,7 +20,7 @@ module Metanorma
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def sort_biblio(bib)
|
23
|
-
@i = IsoDoc::
|
23
|
+
@i = IsoDoc::Ieee::PresentationXMLConvert
|
24
24
|
.new({ lang: @lang, script: @script, locale: @locale })
|
25
25
|
@i.i18n_init(@lang, @script, @locale)
|
26
26
|
sort_keys = bib.each_with_object({}) do |b, m|
|
@@ -7,7 +7,7 @@ require_relative "cleanup"
|
|
7
7
|
require_relative "validate"
|
8
8
|
|
9
9
|
module Metanorma
|
10
|
-
module
|
10
|
+
module Ieee
|
11
11
|
class Converter < Standoc::Converter
|
12
12
|
XML_ROOT_TAG = "ieee-standard".freeze
|
13
13
|
XML_NAMESPACE = "https://www.metanorma.org/ns/ieee".freeze
|
@@ -81,29 +81,29 @@ module Metanorma
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def presentation_xml_converter(node)
|
84
|
-
IsoDoc::
|
84
|
+
IsoDoc::Ieee::PresentationXMLConvert
|
85
85
|
.new(html_extract_attributes(node)
|
86
|
-
.merge(output_formats: ::Metanorma::
|
86
|
+
.merge(output_formats: ::Metanorma::Ieee::Processor.new.output_formats))
|
87
87
|
end
|
88
88
|
|
89
89
|
def html_converter(node)
|
90
|
-
IsoDoc::
|
90
|
+
IsoDoc::Ieee::HtmlConvert.new(html_extract_attributes(node))
|
91
91
|
end
|
92
92
|
|
93
93
|
def pdf_converter(node)
|
94
94
|
return nil if node.attr("no-pdf")
|
95
95
|
|
96
|
-
IsoDoc::
|
96
|
+
IsoDoc::Ieee::PdfConvert.new(pdf_extract_attributes(node))
|
97
97
|
end
|
98
98
|
|
99
99
|
def doc_converter(node)
|
100
|
-
IsoDoc::
|
100
|
+
IsoDoc::Ieee::WordConvert.new(doc_extract_attributes(node))
|
101
101
|
end
|
102
102
|
|
103
103
|
def ieee_xml_converter(node)
|
104
104
|
return nil if node.attr("no-pdf")
|
105
105
|
|
106
|
-
IsoDoc::Iso::
|
106
|
+
IsoDoc::Iso::IeeeXMLConvert.new(html_extract_attributes(node))
|
107
107
|
end
|
108
108
|
end
|
109
109
|
end
|
data/lib/metanorma/ieee/front.rb
CHANGED
@@ -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
|
@@ -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.3
|
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-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|