metanorma-ieee 1.0.8 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ieee/html/html_ieee_intro.html +0 -1
- data/lib/isodoc/ieee/html/word_ieee_intro.html +0 -8
- data/lib/isodoc/ieee/html_convert.rb +2 -2
- data/lib/isodoc/ieee/ieee.amendment.xsl +309 -93
- data/lib/isodoc/ieee/ieee.standard.xsl +309 -93
- data/lib/isodoc/ieee/word_cleanup.rb +4 -1
- data/lib/isodoc/ieee/word_convert.rb +14 -5
- data/lib/metanorma/ieee/ieee.rng +3 -8
- data/lib/metanorma/ieee/isodoc.rng +41 -14
- data/lib/metanorma/ieee/version.rb +1 -1
- data/metanorma-ieee.gemspec +1 -1
- metadata +4 -4
@@ -38,6 +38,9 @@ module IsoDoc
|
|
38
38
|
|
39
39
|
def make_WordToC(docxml, level)
|
40
40
|
toc = ""
|
41
|
+
if source = docxml.at("//div[@class = 'TOC']")
|
42
|
+
toc = to_xml(source.children)
|
43
|
+
end
|
41
44
|
xpath = (1..level).each.map do |i|
|
42
45
|
"//h#{i}[not(ancestor::*[@class = 'WordSection2'])]"
|
43
46
|
end.join (" | ")
|
@@ -70,7 +73,7 @@ module IsoDoc
|
|
70
73
|
if hdr.at("./ancestor::div[@class = 'Annex']")
|
71
74
|
hdr.delete("class")
|
72
75
|
hdr["style"] = "mso-list:l13 level#{idx} lfo33;"
|
73
|
-
elsif hdr.at("./ancestor::div[@class = 'Section3']")
|
76
|
+
elsif hdr.at("./ancestor::div[@class = 'Section3' or @class = 'WordSectionContents']")
|
74
77
|
hdr.name = "p"
|
75
78
|
hdr["class"] = "IEEEStdsLevel#{idx}frontmatter"
|
76
79
|
else
|
@@ -47,12 +47,11 @@ module IsoDoc
|
|
47
47
|
ulstyle: "l11", olstyle: "l16" }
|
48
48
|
end
|
49
49
|
|
50
|
-
def abstract(
|
51
|
-
f = isoxml.at(ns("//preface/abstract")) || return
|
50
|
+
def abstract(clause, out)
|
52
51
|
page_break(out)
|
53
|
-
out.div **attr_code(id:
|
54
|
-
clause_name(
|
55
|
-
|
52
|
+
out.div **attr_code(id: clause["id"], class: "abstract") do |s|
|
53
|
+
clause_name(clause, clause.at(ns("./title")), s, { class: "AbstractTitle" })
|
54
|
+
clause.elements.each { |e| parse(e, s) unless e.name == "title" }
|
56
55
|
end
|
57
56
|
end
|
58
57
|
|
@@ -176,6 +175,16 @@ module IsoDoc
|
|
176
175
|
end
|
177
176
|
end
|
178
177
|
|
178
|
+
def table_of_contents(clause, out)
|
179
|
+
out.div class: "WordSectionContents" do |div|
|
180
|
+
clause_name(clause, clause.at(ns("./title")), div,
|
181
|
+
{ class: "IEEEStdsLevel1frontmatter" })
|
182
|
+
clause.elements.each do |e|
|
183
|
+
parse(e, div) unless e.name == "title"
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
179
188
|
include BaseConvert
|
180
189
|
include Init
|
181
190
|
end
|
data/lib/metanorma/ieee/ieee.rng
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar ns=
|
2
|
+
<grammar ns='https://www.metanorma.org/ns/ieee' xmlns="http://relaxng.org/ns/structure/1.0">
|
3
3
|
<!--
|
4
|
+
VERSION v1.2.1
|
4
5
|
Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
|
5
6
|
we cannot have a new default namespace: we will end up with a grammar with two different
|
6
7
|
namespaces, one for isostandard and one for csand additions. And we do not want that.
|
@@ -29,13 +30,7 @@
|
|
29
30
|
</include>
|
30
31
|
<define name="ieee-standard">
|
31
32
|
<element name="ieee-standard">
|
32
|
-
<
|
33
|
-
<attribute name="type">
|
34
|
-
<choice>
|
35
|
-
<value>semantic</value>
|
36
|
-
<value>presentation</value>
|
37
|
-
</choice>
|
38
|
-
</attribute>
|
33
|
+
<ref name="Root-Attributes"/>
|
39
34
|
<ref name="bibdata"/>
|
40
35
|
<zeroOrMore>
|
41
36
|
<ref name="termdocsource"/>
|
@@ -17,6 +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.1 -->
|
20
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">
|
21
22
|
<include href="reqt.rng"/>
|
22
23
|
<include href="basicdoc.rng">
|
@@ -382,6 +383,9 @@
|
|
382
383
|
<optional>
|
383
384
|
<ref name="dl"/>
|
384
385
|
</optional>
|
386
|
+
<optional>
|
387
|
+
<ref name="source"/>
|
388
|
+
</optional>
|
385
389
|
</element>
|
386
390
|
</define>
|
387
391
|
<define name="figure">
|
@@ -404,9 +408,6 @@
|
|
404
408
|
<attribute name="class"/>
|
405
409
|
</optional>
|
406
410
|
<ref name="BlockAttributes"/>
|
407
|
-
<optional>
|
408
|
-
<ref name="source"/>
|
409
|
-
</optional>
|
410
411
|
<optional>
|
411
412
|
<ref name="tname"/>
|
412
413
|
</optional>
|
@@ -431,6 +432,20 @@
|
|
431
432
|
<zeroOrMore>
|
432
433
|
<ref name="note"/>
|
433
434
|
</zeroOrMore>
|
435
|
+
<optional>
|
436
|
+
<ref name="source"/>
|
437
|
+
</optional>
|
438
|
+
</element>
|
439
|
+
</define>
|
440
|
+
<define name="source">
|
441
|
+
<element name="source">
|
442
|
+
<attribute name="status">
|
443
|
+
<ref name="SourceStatusType"/>
|
444
|
+
</attribute>
|
445
|
+
<ref name="origin"/>
|
446
|
+
<optional>
|
447
|
+
<ref name="modification"/>
|
448
|
+
</optional>
|
434
449
|
</element>
|
435
450
|
</define>
|
436
451
|
<define name="sourcecode">
|
@@ -1335,15 +1350,19 @@
|
|
1335
1350
|
</choice>
|
1336
1351
|
</element>
|
1337
1352
|
</define>
|
1353
|
+
<define name="Root-Attributes">
|
1354
|
+
<attribute name="version"/>
|
1355
|
+
<attribute name="schema-version"/>
|
1356
|
+
<attribute name="type">
|
1357
|
+
<choice>
|
1358
|
+
<value>semantic</value>
|
1359
|
+
<value>presentation</value>
|
1360
|
+
</choice>
|
1361
|
+
</attribute>
|
1362
|
+
</define>
|
1338
1363
|
<define name="standard-document">
|
1339
1364
|
<element name="standard-document">
|
1340
|
-
<
|
1341
|
-
<attribute name="type">
|
1342
|
-
<choice>
|
1343
|
-
<value>semantic</value>
|
1344
|
-
<value>presentation</value>
|
1345
|
-
</choice>
|
1346
|
-
</attribute>
|
1365
|
+
<ref name="Root-Attributes"/>
|
1347
1366
|
<ref name="bibdata"/>
|
1348
1367
|
<optional>
|
1349
1368
|
<ref name="misccontainer"/>
|
@@ -2099,10 +2118,7 @@
|
|
2099
2118
|
<define name="termsource">
|
2100
2119
|
<element name="termsource">
|
2101
2120
|
<attribute name="status">
|
2102
|
-
<
|
2103
|
-
<value>identical</value>
|
2104
|
-
<value>modified</value>
|
2105
|
-
</choice>
|
2121
|
+
<ref name="SourceStatusType"/>
|
2106
2122
|
</attribute>
|
2107
2123
|
<attribute name="type">
|
2108
2124
|
<choice>
|
@@ -2116,6 +2132,17 @@
|
|
2116
2132
|
</optional>
|
2117
2133
|
</element>
|
2118
2134
|
</define>
|
2135
|
+
<define name="SourceStatusType">
|
2136
|
+
<choice>
|
2137
|
+
<value>identical</value>
|
2138
|
+
<value>modified</value>
|
2139
|
+
<value>restyled</value>
|
2140
|
+
<value>context-added</value>
|
2141
|
+
<value>generalisation</value>
|
2142
|
+
<value>specialisation</value>
|
2143
|
+
<value>unspecified</value>
|
2144
|
+
</choice>
|
2145
|
+
</define>
|
2119
2146
|
<define name="origin">
|
2120
2147
|
<element name="origin">
|
2121
2148
|
<choice>
|
data/metanorma-ieee.gemspec
CHANGED
@@ -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.
|
28
|
+
spec.add_dependency "metanorma-standoc", "~> 2.4.2"
|
29
29
|
spec.add_dependency "mnconvert", "~> 1.20"
|
30
30
|
|
31
31
|
spec.add_development_dependency "debug"
|
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.
|
4
|
+
version: 1.0.10
|
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-
|
11
|
+
date: 2023-04-25 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.
|
19
|
+
version: 2.4.2
|
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.
|
26
|
+
version: 2.4.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mnconvert
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|