metanorma-iho 0.7.8 → 0.7.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,10 +14,24 @@ module IsoDoc
14
14
  "[#{ordinal}]<tab/>"
15
15
  end
16
16
 
17
- def biblio_ref_entry_code(ordinal, _idents, _ids, _standard, _datefn, _bib)
17
+ def biblio_ref_entry_code(ordinal, _idents, _ids, _standard, _datefn,
18
+ _bib)
18
19
  "[#{ordinal}]<tab/>"
19
20
  end
20
21
 
22
+ def preface_rearrange(doc)
23
+ preface_move(doc.at(ns("//preface/abstract")),
24
+ %w(foreword executivesummary introduction clause acknowledgements), doc)
25
+ preface_move(doc.at(ns("//preface/foreword")),
26
+ %w(executivesummary introduction clause acknowledgements), doc)
27
+ preface_move(doc.at(ns("//preface/executivesummary")),
28
+ %w(introduction clause acknowledgements), doc)
29
+ preface_move(doc.at(ns("//preface/introduction")),
30
+ %w(clause acknowledgements), doc)
31
+ preface_move(doc.at(ns("//preface/acknowledgements")),
32
+ %w(), doc)
33
+ end
34
+
21
35
  include Init
22
36
  end
23
37
  end
@@ -12,32 +12,32 @@ module IsoDoc
12
12
  end
13
13
 
14
14
  def make_body1(body, _docxml)
15
- body.div **{ class: "WordSection1" } do |div1|
16
- div1.p **{style: "font-size:0pt;" } do
17
- |p| p << "&nbsp;"
15
+ body.div class: "WordSection1" do |div1|
16
+ div1.p style: "font-size:0pt;" do |p|
17
+ p << "&nbsp;"
18
18
  end # placeholder
19
19
  end
20
20
  section_break(body)
21
21
  end
22
22
 
23
- def make_body2(body, docxml)
24
- body.div **{ class: "WordSection2" } do |div2|
25
- boilerplate docxml, div2
26
- preface_block docxml, div2
27
- abstract docxml, div2
28
- foreword docxml, div2
29
- introduction docxml, div2
30
- preface docxml, div2
31
- acknowledgements docxml, div2
32
- div2.p { |p| p << "&nbsp;" } # placeholder
33
- end
34
- section_break(body)
35
- end
23
+ # def make_body2(body, docxml)
24
+ # body.div **{ class: "WordSection2" } do |div2|
25
+ # boilerplate docxml, div2
26
+ # preface_block docxml, div2
27
+ # abstract docxml, div2
28
+ # foreword docxml, div2
29
+ # introduction docxml, div2
30
+ # preface docxml, div2
31
+ # acknowledgements docxml, div2
32
+ # div2.p { |p| p << "&nbsp;" } # placeholder
33
+ # end
34
+ # section_break(body)
35
+ # end
36
36
 
37
37
  def authority_cleanup(docxml)
38
38
  super
39
39
  docxml.xpath("//div[@class = 'boilerplate-feedback']/p").each do |p|
40
- p["style"] = 'font-size:8pt;font-family:Arial;text-align:right'
40
+ p["style"] = "font-size:8pt;font-family:Arial;text-align:right"
41
41
  end
42
42
  end
43
43
 
@@ -1,6 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar ns="https://www.metanorma.org/ns/iho" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <grammar ns='https://www.metanorma.org/ns/iho' xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
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.
@@ -63,13 +64,7 @@
63
64
  </define>
64
65
  <define name="iho-standard">
65
66
  <element name="iho-standard">
66
- <attribute name="version"/>
67
- <attribute name="type">
68
- <choice>
69
- <value>semantic</value>
70
- <value>presentation</value>
71
- </choice>
72
- </attribute>
67
+ <ref name="Root-Attributes"/>
73
68
  <ref name="bibdata"/>
74
69
  <zeroOrMore>
75
70
  <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.2 -->
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">
@@ -210,6 +211,9 @@
210
211
  <data type="boolean"/>
211
212
  </attribute>
212
213
  </optional>
214
+ <optional>
215
+ <attribute name="style"/>
216
+ </optional>
213
217
  <ref name="CitationType"/>
214
218
  <oneOrMore>
215
219
  <ref name="PureTextElement"/>
@@ -1349,15 +1353,19 @@
1349
1353
  </choice>
1350
1354
  </element>
1351
1355
  </define>
1356
+ <define name="Root-Attributes">
1357
+ <attribute name="version"/>
1358
+ <attribute name="schema-version"/>
1359
+ <attribute name="type">
1360
+ <choice>
1361
+ <value>semantic</value>
1362
+ <value>presentation</value>
1363
+ </choice>
1364
+ </attribute>
1365
+ </define>
1352
1366
  <define name="standard-document">
1353
1367
  <element name="standard-document">
1354
- <attribute name="version"/>
1355
- <attribute name="type">
1356
- <choice>
1357
- <value>semantic</value>
1358
- <value>presentation</value>
1359
- </choice>
1360
- </attribute>
1368
+ <ref name="Root-Attributes"/>
1361
1369
  <ref name="bibdata"/>
1362
1370
  <optional>
1363
1371
  <ref name="misccontainer"/>
@@ -2131,6 +2139,7 @@
2131
2139
  <choice>
2132
2140
  <value>identical</value>
2133
2141
  <value>modified</value>
2142
+ <value>adapted</value>
2134
2143
  <value>restyled</value>
2135
2144
  <value>context-added</value>
2136
2145
  <value>generalisation</value>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IHO
3
- VERSION = "0.7.8".freeze
3
+ VERSION = "0.7.10".freeze
4
4
  end
5
5
  end
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: 0.7.8
4
+ version: 0.7.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-04-10 00:00:00.000000000 Z
11
+ date: 2023-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic