metanorma-iho 1.1.4 → 1.1.5
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.
- checksums.yaml +4 -4
- data/lib/isodoc/iho/base_convert.rb +0 -9
- data/lib/isodoc/iho/iho.specification.xsl +212 -28
- data/lib/isodoc/iho/iho.standard.xsl +212 -28
- data/lib/isodoc/iho/presentation_xml_convert.rb +7 -26
- data/lib/isodoc/iho/xref.rb +0 -1
- data/lib/metanorma/iho/converter.rb +2 -13
- data/lib/metanorma/iho/iho.rng +0 -5
- data/lib/metanorma/iho/isodoc.rng +16 -1
- data/lib/metanorma/iho/relaton-iho.rng +3 -0
- data/lib/metanorma/iho/version.rb +1 -1
- metadata +2 -2
@@ -17,19 +17,6 @@ _bib)
|
|
17
17
|
|
18
18
|
def middle_title(docxml); end
|
19
19
|
|
20
|
-
def preface_rearrange(doc)
|
21
|
-
preface_move(doc.xpath(ns("//preface/abstract")),
|
22
|
-
%w(foreword executivesummary introduction clause acknowledgements), doc)
|
23
|
-
preface_move(doc.xpath(ns("//preface/foreword")),
|
24
|
-
%w(executivesummary introduction clause acknowledgements), doc)
|
25
|
-
preface_move(doc.xpath(ns("//preface/executivesummary")),
|
26
|
-
%w(introduction clause acknowledgements), doc)
|
27
|
-
preface_move(doc.xpath(ns("//preface/introduction")),
|
28
|
-
%w(clause acknowledgements), doc)
|
29
|
-
preface_move(doc.xpath(ns("//preface/acknowledgements")),
|
30
|
-
%w(), doc)
|
31
|
-
end
|
32
|
-
|
33
20
|
def bibdata(docxml)
|
34
21
|
super
|
35
22
|
dochistory(docxml)
|
@@ -86,18 +73,19 @@ _bib)
|
|
86
73
|
end
|
87
74
|
|
88
75
|
def dochistory_contributor(contrib)
|
89
|
-
ret = contrib.at("./organization/abbreviation") ||
|
90
|
-
contrib.at("./organization/subdivision") ||
|
91
|
-
contrib.at("./organization/name") ||
|
92
|
-
contrib.at("./person/name/abbreviation") ||
|
93
|
-
contrib.at("./person/name/completename")
|
76
|
+
ret = contrib.at(ns("./organization/abbreviation")) ||
|
77
|
+
contrib.at(ns("./organization/subdivision")) ||
|
78
|
+
contrib.at(ns("./organization/name")) ||
|
79
|
+
contrib.at(ns("./person/name/abbreviation")) ||
|
80
|
+
contrib.at(ns("./person/name/completename"))
|
94
81
|
ret and return ret.text
|
95
82
|
format_personalname(contrib)
|
96
83
|
end
|
97
84
|
|
98
85
|
def format_personalname(contrib)
|
99
86
|
Relaton::Render::General.new(template: { book: "{{ creatornames }}" })
|
100
|
-
.render("<bibitem type='book'>#{contrib.to_xml}</bibitem>"
|
87
|
+
.render("<bibitem type='book'>#{contrib.to_xml}</bibitem>",
|
88
|
+
embedded: true)
|
101
89
|
end
|
102
90
|
|
103
91
|
def dochistory_description(item)
|
@@ -154,13 +142,6 @@ _bib)
|
|
154
142
|
""
|
155
143
|
end
|
156
144
|
|
157
|
-
def clause(docxml)
|
158
|
-
super
|
159
|
-
docxml.xpath(ns("//executivesummary | //appendix")).each do |x|
|
160
|
-
clause1(x)
|
161
|
-
end
|
162
|
-
end
|
163
|
-
|
164
145
|
def ul_label_list(_elem)
|
165
146
|
%w(• — o)
|
166
147
|
end
|
data/lib/isodoc/iho/xref.rb
CHANGED
@@ -126,7 +126,6 @@ module IsoDoc
|
|
126
126
|
lbl = clause_number_semx(parentnum, clause, num)
|
127
127
|
@anchors[clause["id"]] =
|
128
128
|
{ label: lbl, level: level,
|
129
|
-
#xref: l10n("#{@labels['subclause']} #{num}"),
|
130
129
|
xref: labelled_autonum(@labels['subclause'], lbl),
|
131
130
|
type: "clause", elem: @labels["subclause"] }
|
132
131
|
i = Counter.new(0)
|
@@ -9,19 +9,8 @@ module Metanorma
|
|
9
9
|
|
10
10
|
register_for "iho"
|
11
11
|
|
12
|
-
def
|
13
|
-
|
14
|
-
return appendix_parse(attrs, xml, node)
|
15
|
-
super
|
16
|
-
end
|
17
|
-
|
18
|
-
def appendix_parse(attrs, xml, node)
|
19
|
-
attrs[:"inline-header"] = node.option? "inline-header"
|
20
|
-
set_obligation(attrs, node)
|
21
|
-
xml.appendix **attr_code(attrs) do |xml_section|
|
22
|
-
xml_section.title { |name| name << node.title }
|
23
|
-
xml_section << node.content
|
24
|
-
end
|
12
|
+
def support_appendix?(_node)
|
13
|
+
true
|
25
14
|
end
|
26
15
|
|
27
16
|
SERIESNAME = {
|
data/lib/metanorma/iho/iho.rng
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
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
|
-
<!-- VERSION v2.0.
|
3
|
+
<!-- VERSION v2.0.4 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -1328,6 +1328,7 @@ numbers</a:documentation>
|
|
1328
1328
|
<ref name="foreword"/>
|
1329
1329
|
<ref name="introduction"/>
|
1330
1330
|
<ref name="acknowledgements"/>
|
1331
|
+
<ref name="executivesummary"/>
|
1331
1332
|
</choice>
|
1332
1333
|
</oneOrMore>
|
1333
1334
|
</element>
|
@@ -1351,6 +1352,11 @@ numbers</a:documentation>
|
|
1351
1352
|
<ref name="Content-Section"/>
|
1352
1353
|
</element>
|
1353
1354
|
</define>
|
1355
|
+
<define name="executivesummary">
|
1356
|
+
<element name="executivesummary">
|
1357
|
+
<ref name="Content-Section"/>
|
1358
|
+
</element>
|
1359
|
+
</define>
|
1354
1360
|
<define name="indexsect">
|
1355
1361
|
<element name="indexsect">
|
1356
1362
|
<ref name="Content-Section"/>
|
@@ -1576,6 +1582,15 @@ used in document amendments</a:documentation>
|
|
1576
1582
|
<define name="annex">
|
1577
1583
|
<element name="annex">
|
1578
1584
|
<ref name="Annex-Section"/>
|
1585
|
+
<zeroOrMore>
|
1586
|
+
<ref name="annex-appendix"/>
|
1587
|
+
</zeroOrMore>
|
1588
|
+
</element>
|
1589
|
+
</define>
|
1590
|
+
<define name="annex-appendix">
|
1591
|
+
<a:documentation>Appendix, distinct subclause type for annexes (annex to annex, rather than subclause to annex)</a:documentation>
|
1592
|
+
<element name="appendix">
|
1593
|
+
<ref name="Clause-Section"/>
|
1579
1594
|
</element>
|
1580
1595
|
</define>
|
1581
1596
|
<define name="terms">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|