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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/lib/html2doc/ieee/lists.rb +1 -1
  3. data/lib/html2doc/ieee/notes.rb +1 -1
  4. data/lib/html2doc/ieee.rb +1 -1
  5. data/lib/html2doc/ieee_wp/lists.rb +1 -1
  6. data/lib/html2doc/ieee_wp.rb +1 -1
  7. data/lib/isodoc/ieee/base_convert.rb +1 -1
  8. data/lib/isodoc/ieee/html_convert.rb +1 -1
  9. data/lib/isodoc/ieee/i18n.rb +1 -1
  10. data/lib/isodoc/ieee/ieee.amendment.xsl +139 -52
  11. data/lib/isodoc/ieee/ieee.rb +1 -1
  12. data/lib/isodoc/ieee/ieee.standard.xsl +139 -52
  13. data/lib/isodoc/ieee/ieee_xml_convert.rb +2 -2
  14. data/lib/isodoc/ieee/init.rb +2 -2
  15. data/lib/isodoc/ieee/metadata.rb +1 -1
  16. data/lib/isodoc/ieee/pdf_convert.rb +1 -1
  17. data/lib/isodoc/ieee/presentation_bibdata.rb +1 -1
  18. data/lib/isodoc/ieee/presentation_ref.rb +7 -8
  19. data/lib/isodoc/ieee/presentation_terms.rb +1 -1
  20. data/lib/isodoc/ieee/presentation_xml_convert.rb +1 -1
  21. data/lib/isodoc/ieee/word_authority.rb +1 -1
  22. data/lib/isodoc/ieee/word_cleanup.rb +2 -2
  23. data/lib/isodoc/ieee/word_cleanup_blocks.rb +1 -1
  24. data/lib/isodoc/ieee/word_convert.rb +2 -2
  25. data/lib/isodoc/ieee/word_wp_cleanup.rb +2 -2
  26. data/lib/isodoc/ieee/word_wp_convert.rb +1 -1
  27. data/lib/isodoc/ieee/xref.rb +1 -1
  28. data/lib/isodoc/ieee.rb +1 -1
  29. data/lib/metanorma/ieee/biblio-standoc.rng +13 -0
  30. data/lib/metanorma/ieee/biblio.rng +19 -12
  31. data/lib/metanorma/ieee/cleanup.rb +2 -2
  32. data/lib/metanorma/ieee/cleanup_ref.rb +2 -2
  33. data/lib/metanorma/ieee/converter.rb +7 -7
  34. data/lib/metanorma/ieee/front.rb +1 -1
  35. data/lib/metanorma/ieee/processor.rb +7 -7
  36. data/lib/metanorma/ieee/relaton-ieee.rng +1 -0
  37. data/lib/metanorma/ieee/term_lookup_cleanup.rb +1 -1
  38. data/lib/metanorma/ieee/validate.rb +4 -4
  39. data/lib/metanorma/ieee/validate_section.rb +1 -1
  40. data/lib/metanorma/ieee/validate_style.rb +1 -1
  41. data/lib/metanorma/ieee/version.rb +2 -2
  42. data/lib/metanorma/ieee.rb +1 -1
  43. data/lib/metanorma-ieee.rb +1 -1
  44. data/lib/relaton/render/general.rb +2 -2
  45. data/lib/relaton/render/parse.rb +1 -1
  46. data/metanorma-ieee.gemspec +1 -1
  47. 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
- <attribute name="type">
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 IEEE
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::IEEE::TermLookupCleanup.new(xmldoc, @log).call
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 IEEE
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::IEEE::PresentationXMLConvert
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 IEEE
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::IEEE::PresentationXMLConvert
84
+ IsoDoc::Ieee::PresentationXMLConvert
85
85
  .new(html_extract_attributes(node)
86
- .merge(output_formats: ::Metanorma::IEEE::Processor.new.output_formats))
86
+ .merge(output_formats: ::Metanorma::Ieee::Processor.new.output_formats))
87
87
  end
88
88
 
89
89
  def html_converter(node)
90
- IsoDoc::IEEE::HtmlConvert.new(html_extract_attributes(node))
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::IEEE::PdfConvert.new(pdf_extract_attributes(node))
96
+ IsoDoc::Ieee::PdfConvert.new(pdf_extract_attributes(node))
97
97
  end
98
98
 
99
99
  def doc_converter(node)
100
- IsoDoc::IEEE::WordConvert.new(doc_extract_attributes(node))
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::IEEEXMLConvert.new(html_extract_attributes(node))
106
+ IsoDoc::Iso::IeeeXMLConvert.new(html_extract_attributes(node))
107
107
  end
108
108
  end
109
109
  end
@@ -2,7 +2,7 @@ require "isoics"
2
2
  require "pubid-ieee"
3
3
 
4
4
  module Metanorma
5
- module IEEE
5
+ module Ieee
6
6
  class Converter < Standoc::Converter
7
7
  def metadata_committee(node, xml)
8
8
  metadata_committee_prep(node) or return
@@ -1,7 +1,7 @@
1
1
  require "metanorma/processor"
2
2
 
3
3
  module Metanorma
4
- module IEEE
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::IEEE #{Metanorma::IEEE::VERSION}"
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::IEEE::HtmlConvert.new(options).convert(inname, isodoc_node,
40
+ IsoDoc::Ieee::HtmlConvert.new(options).convert(inname, isodoc_node,
41
41
  nil, outname)
42
42
  when :doc
43
- IsoDoc::IEEE::WordConvert.new(options).convert(inname, isodoc_node,
43
+ IsoDoc::Ieee::WordConvert.new(options).convert(inname, isodoc_node,
44
44
  nil, outname)
45
45
  when :pdf
46
- IsoDoc::IEEE::PdfConvert.new(options).convert(inname, isodoc_node,
46
+ IsoDoc::Ieee::PdfConvert.new(options).convert(inname, isodoc_node,
47
47
  nil, outname)
48
48
  when :presentation
49
- IsoDoc::IEEE::PresentationXMLConvert.new(options).convert(
49
+ IsoDoc::Ieee::PresentationXMLConvert.new(options).convert(
50
50
  inname, isodoc_node, nil, outname
51
51
  )
52
52
  when :ieee
53
- IsoDoc::IEEE::IEEEXMLConvert.new(options)
53
+ IsoDoc::Ieee::IeeeXMLConvert.new(options)
54
54
  .convert(inname, isodoc_node, nil, outname)
55
55
  else
56
56
  super
@@ -54,6 +54,7 @@
54
54
  <optional>
55
55
  <ref name="docsubtype"/>
56
56
  </optional>
57
+ <ref name="flavor"/>
57
58
  <optional>
58
59
  <ref name="trialuse"/>
59
60
  </optional>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
- module IEEE
2
+ module Ieee
3
3
  class TermLookupCleanup < Metanorma::Standoc::TermLookupCleanup
4
4
  def remove_missing_ref_term(node, _target, type)
5
5
  type == "symbol" and return super
@@ -2,7 +2,7 @@ require_relative "validate_section"
2
2
  require_relative "validate_style"
3
3
 
4
4
  module Metanorma
5
- module IEEE
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::IEEE::HtmlConvert.new(language: @lang, script: @script)
131
- xrefs = IsoDoc::IEEE::Xref
132
- .new(@lang, @script, klass, IsoDoc::IEEE::I18n.new(@lang, @script),
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)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
- module IEEE
2
+ module Ieee
3
3
  class Converter < Standoc::Converter
4
4
  def section_validate(doc)
5
5
  unless %w(amendment technical-corrigendum).include? @doctype
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
- module IEEE
2
+ module Ieee
3
3
  class Converter < Standoc::Converter
4
4
  ASSETS_TO_STYLE =
5
5
  "//termsource | //formula | //termnote | " \
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
- module IEEE
3
- VERSION = "1.3.1".freeze
2
+ module Ieee
3
+ VERSION = "1.3.3".freeze
4
4
  end
5
5
  end
@@ -3,7 +3,7 @@ require "metanorma/ieee/processor"
3
3
  require "metanorma/ieee/converter"
4
4
 
5
5
  module Metanorma
6
- module IEEE
6
+ module Ieee
7
7
  ORGANIZATION_NAME_SHORT = "IEEE"
8
8
  ORGANIZATION_NAME_LONG = "Institute of Electrical and Electronics Engineers"
9
9
  end
@@ -6,5 +6,5 @@ require "html2doc/ieee_wp"
6
6
  require "metanorma"
7
7
 
8
8
  if defined? Metanorma::Registry
9
- Metanorma::Registry.instance.register(Metanorma::IEEE::Processor)
9
+ Metanorma::Registry.instance.register(Metanorma::Ieee::Processor)
10
10
  end
@@ -3,7 +3,7 @@ require_relative "parse"
3
3
 
4
4
  module Relaton
5
5
  module Render
6
- module IEEE
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::IEEE::Parse
14
+ @parseklass = Relaton::Render::Ieee::Parse
15
15
  end
16
16
  end
17
17
  end
@@ -1,6 +1,6 @@
1
1
  module Relaton
2
2
  module Render
3
- module IEEE
3
+ module Ieee
4
4
  class Parse < ::Relaton::Render::Parse
5
5
  def simple_or_host_xml2hash(doc, host)
6
6
  ret = super
@@ -4,7 +4,7 @@ require "metanorma/ieee/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "metanorma-ieee"
7
- spec.version = Metanorma::IEEE::VERSION
7
+ spec.version = Metanorma::Ieee::VERSION
8
8
  spec.authors = ["Ribose Inc."]
9
9
  spec.email = ["open.source@ribose.com"]
10
10
 
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.1
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-09-30 00:00:00.000000000 Z
11
+ date: 2024-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc