metanorma-ieee 1.0.15 → 1.1.1

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.
@@ -11,34 +11,21 @@ module IsoDoc
11
11
  @hierarchical_assets = options[:hierarchicalassets]
12
12
  end
13
13
 
14
- def initial_anchor_names(doc)
15
- if @parse_settings.empty? || @parse_settings[:clauses]
16
- doc.xpath(ns("//preface/*")).each do |c|
17
- c.element? and preface_names(c)
18
- end
19
- end
20
- if @parse_settings.empty?
21
- if @hierarchical_assets
22
- hierarchical_asset_names(doc.xpath("//xmlns:preface/child::*"),
23
- "Preface")
24
- else
25
- sequential_asset_names(doc.xpath(ns("//preface/*")))
26
- end
27
- end
28
- if @parse_settings.empty? || @parse_settings[:clauses]
29
- n = Counter.new
30
- n = section_names(doc.at(ns("//clause[@type = 'overview']")), n, 1)
31
- n = section_names(doc.at(ns(@klass.norm_ref_xpath)), n, 1)
32
- n = section_names(doc.at(ns("//sections/terms | " \
33
- "//sections/clause[descendant::terms]")), n, 1)
34
- n = section_names(doc.at(ns("//sections/definitions")), n, 1)
35
- clause_names(doc, n)
36
- end
14
+ def clause_order_main(docxml)
15
+ [
16
+ { path: "//clause[@type = 'overview']" },
17
+ { path: @klass.norm_ref_xpath },
18
+ { path: "//sections/terms | " \
19
+ "//sections/clause[descendant::terms]" },
20
+ { path: "//sections/definitions | " \
21
+ "//sections/clause[descendant::definitions][not(descendant::terms)]" },
22
+ { path: @klass.middle_clause(docxml), multi: true },
23
+ ]
37
24
  end
38
25
 
39
26
  def middle_sections
40
27
  " #{@klass.norm_ref_xpath} | " \
41
- "//sections/terms | //preface/clause | " \
28
+ "//sections/terms | " \
42
29
  "//sections/definitions | //clause[parent::sections]"
43
30
  end
44
31
 
@@ -47,10 +34,13 @@ module IsoDoc
47
34
  "#{@klass.norm_ref_xpath} | //sections/terms | " \
48
35
  "//sections/definitions | //clause[parent::sections]"
49
36
  if @hierarchical_assets
37
+ hierarchical_asset_names(doc.xpath("//xmlns:preface/child::*"),
38
+ "Preface")
50
39
  doc.xpath(ns(middle_sections)).each do |c|
51
40
  hierarchical_asset_names(c, @anchors[c["id"]][:label])
52
41
  end
53
42
  else
43
+ sequential_asset_names(doc.xpath(ns("//preface/*")))
54
44
  sequential_asset_names(doc.xpath(ns(middle_sections)))
55
45
  end
56
46
  end
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.2.2 -->
20
+ <!-- VERSION v1.2.4 -->
21
21
  <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">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -192,9 +192,11 @@
192
192
  </attribute>
193
193
  </optional>
194
194
  <attribute name="citeas"/>
195
- <attribute name="type">
196
- <ref name="ReferenceFormat"/>
197
- </attribute>
195
+ <optional>
196
+ <attribute name="type">
197
+ <ref name="ReferenceFormat"/>
198
+ </attribute>
199
+ </optional>
198
200
  <optional>
199
201
  <attribute name="alt"/>
200
202
  </optional>
@@ -836,6 +838,26 @@
836
838
  <ref name="paragraph"/>
837
839
  </element>
838
840
  </define>
841
+ <define name="stem">
842
+ <element name="stem">
843
+ <attribute name="type">
844
+ <choice>
845
+ <value>MathML</value>
846
+ <value>AsciiMath</value>
847
+ <value>LatexMath</value>
848
+ </choice>
849
+ </attribute>
850
+ <attribute name="block">
851
+ <data type="boolean"/>
852
+ </attribute>
853
+ <oneOrMore>
854
+ <choice>
855
+ <text/>
856
+ <ref name="AnyElement"/>
857
+ </choice>
858
+ </oneOrMore>
859
+ </element>
860
+ </define>
839
861
  <define name="em">
840
862
  <element name="em">
841
863
  <zeroOrMore>
@@ -2046,6 +2068,9 @@
2046
2068
  </define>
2047
2069
  <define name="termdefinition">
2048
2070
  <element name="definition">
2071
+ <optional>
2072
+ <attribute name="type"/>
2073
+ </optional>
2049
2074
  <choice>
2050
2075
  <ref name="verbaldefinition"/>
2051
2076
  <ref name="nonverbalrep"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IEEE
3
- VERSION = "1.0.15".freeze
3
+ VERSION = "1.1.1".freeze
4
4
  end
5
5
  end
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.require_paths = ["lib"]
26
26
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
27
27
 
28
- spec.add_dependency "metanorma-standoc", "~> 2.4.2"
28
+ spec.add_dependency "metanorma-standoc", "~> 2.5.4"
29
29
  spec.add_dependency "mnconvert", "~> 1.20"
30
30
  #spec.add_dependency "pubid-ieee", "~> 0.1.1"
31
31
  #spec.add_dependency "pubid-iso", "~> 0.5.3"
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.0.15
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-24 00:00:00.000000000 Z
11
+ date: 2023-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.4.2
19
+ version: 2.5.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.4.2
26
+ version: 2.5.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mnconvert
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -249,6 +249,7 @@ files:
249
249
  - lib/isodoc/ieee/init.rb
250
250
  - lib/isodoc/ieee/metadata.rb
251
251
  - lib/isodoc/ieee/pdf_convert.rb
252
+ - lib/isodoc/ieee/presentation_bibdata.rb
252
253
  - lib/isodoc/ieee/presentation_ref.rb
253
254
  - lib/isodoc/ieee/presentation_terms.rb
254
255
  - lib/isodoc/ieee/presentation_xml_convert.rb