metanorma-ogc 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/asciidoctor/ogc/boilerplate.xml +3 -3
  3. data/lib/asciidoctor/ogc/front.rb +7 -19
  4. data/lib/isodoc/ogc/biblio.rb +33 -4
  5. data/lib/isodoc/ogc/html/header_wp.html +210 -0
  6. data/lib/isodoc/ogc/html/logo.png +0 -0
  7. data/lib/isodoc/ogc/html/ogc.css +6 -3
  8. data/lib/isodoc/ogc/html/ogc.scss +4 -2
  9. data/lib/isodoc/ogc/html/ogc_wp.css +758 -0
  10. data/lib/isodoc/ogc/html/ogc_wp.scss +724 -0
  11. data/lib/isodoc/ogc/html/word_ogc_intro_wp.html +14 -0
  12. data/lib/isodoc/ogc/html/word_ogc_titlepage_wp.html +175 -0
  13. data/lib/isodoc/ogc/html/wordstyle.css +8 -8
  14. data/lib/isodoc/ogc/html/wordstyle.scss +8 -8
  15. data/lib/isodoc/ogc/html/wordstyle_wp.css +1181 -0
  16. data/lib/isodoc/ogc/html/wordstyle_wp.scss +1093 -0
  17. data/lib/isodoc/ogc/init.rb +9 -0
  18. data/lib/isodoc/ogc/metadata.rb +30 -27
  19. data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +235 -47
  20. data/lib/isodoc/ogc/ogc.best-practice.xsl +235 -47
  21. data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +235 -47
  22. data/lib/isodoc/ogc/ogc.community-practice.xsl +235 -47
  23. data/lib/isodoc/ogc/ogc.community-standard.xsl +235 -47
  24. data/lib/isodoc/ogc/ogc.discussion-paper.xsl +235 -47
  25. data/lib/isodoc/ogc/ogc.engineering-report.xsl +235 -47
  26. data/lib/isodoc/ogc/ogc.other.xsl +235 -47
  27. data/lib/isodoc/ogc/ogc.policy.xsl +235 -47
  28. data/lib/isodoc/ogc/ogc.reference-model.xsl +235 -47
  29. data/lib/isodoc/ogc/ogc.release-notes.xsl +235 -47
  30. data/lib/isodoc/ogc/ogc.standard.xsl +235 -47
  31. data/lib/isodoc/ogc/ogc.test-suite.xsl +235 -47
  32. data/lib/isodoc/ogc/ogc.user-guide.xsl +235 -47
  33. data/lib/isodoc/ogc/ogc.white-paper.xsl +233 -32
  34. data/lib/isodoc/ogc/word_convert.rb +20 -3
  35. data/lib/isodoc/ogc/xref.rb +20 -13
  36. data/lib/metanorma/ogc/version.rb +1 -1
  37. metadata +10 -2
@@ -37,6 +37,20 @@ module IsoDoc
37
37
  }
38
38
  end
39
39
 
40
+ def convert1(docxml, filename, dir)
41
+ if docxml&.at(ns('//bibdata/ext/doctype'))&.text == "white-paper"
42
+ @wordstylesheet_name = html_doc_path("wordstyle_wp.scss")
43
+ @standardstylesheet_name = html_doc_path("ogc_wp.scss")
44
+ @wordcoverpage = html_doc_path("word_ogc_titlepage_wp.html")
45
+ @wordintropage = html_doc_path("word_ogc_intro_wp.html")
46
+ @header = html_doc_path("header_wp.html")
47
+ @doctype = "white-paper"
48
+ options[:bodyfont] = '"Arial",sans-serif'
49
+ options[:headerfont] = '"Lato",sans-serif'
50
+ end
51
+ super
52
+ end
53
+
40
54
  def make_body(xml, docxml)
41
55
  body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72" }
42
56
  xml.body **body_attr do |body|
@@ -157,9 +171,12 @@ module IsoDoc
157
171
  # center only the Copyright notice
158
172
  def word_copyright_cleanup(docxml)
159
173
  x = "//div[@class = 'boilerplate-copyright']/div[1]/p[not(@class)]"
160
- docxml.xpath(x).each do |p|
161
- p["align"] = "center"
162
- end
174
+ docxml.xpath(x).each { |p| p["align"] = "center" }
175
+ return unless @doctype == "white-paper"
176
+ docxml.xpath("//div[@class = 'boilerplate-copyright']//p[not(@class)]").
177
+ each { |p| p["class"] = "license" }
178
+ docxml.xpath("//div[@class = 'boilerplate-legal']//p[not(@class)]").
179
+ each { |p| p["class"] = "license" }
163
180
  end
164
181
 
165
182
  def word_term_cleanup(docxml)
@@ -17,7 +17,8 @@ module IsoDoc
17
17
  clause.xpath(ns(".//#{klass}#{FIRST_LVL_REQ}")).each do |t|
18
18
  next if t["id"].nil? || t["id"].empty?
19
19
  id = c.increment(t).print
20
- @anchors[t["id"]] = anchor_struct(id, t, label, klass, t["unnumbered"])
20
+ @anchors[t["id"]] = anchor_struct(id, t, label, klass,
21
+ t["unnumbered"])
21
22
  l = t.at(ns("./label"))&.text and @reqtlabels[l] = t["id"]
22
23
  sequential_permission_children(t, id)
23
24
  end
@@ -38,9 +39,8 @@ module IsoDoc
38
39
  def sequential_permission_children(t, id)
39
40
  req_class_paths.each do |k, v|
40
41
  %w(permission requirement recommendation).each do |r|
41
- sequential_permission_names1(t, id, "#{r}[#{v}]", @labels["#{r}#{k}"])
42
- sequential_permission_names1(t, id, "#{r}[#{v}]", @labels["#{r}#{k}"])
43
- sequential_permission_names1(t, id, "#{r}[#{v}]", @labels["#{r}#{k}"])
42
+ sequential_permission_names1(t, id, "#{r}[#{v}]",
43
+ @labels["#{r}#{k}"])
44
44
  end
45
45
  end
46
46
  req_class_paths2.each do |k, v|
@@ -53,7 +53,8 @@ module IsoDoc
53
53
  block.xpath(ns("./#{klass}")).each do |t|
54
54
  next if t["id"].nil? || t["id"].empty?
55
55
  id = "#{lbl}#{hierfigsep}#{c.increment(t).print}"
56
- @anchors[t["id"]] = anchor_struct(id, t, label, klass, t["unnumbered"])
56
+ @anchors[t["id"]] = anchor_struct(id, t, label, klass,
57
+ t["unnumbered"])
57
58
  sequential_permission_children(t, id)
58
59
  end
59
60
  end
@@ -64,9 +65,8 @@ module IsoDoc
64
65
  sequential_formula_names(clause)
65
66
  req_class_paths.each do |k, v|
66
67
  %w(permission requirement recommendation).each do |r|
67
- sequential_permission_names(clause, "#{r}[#{v}]", @labels["#{r}#{k}"])
68
- sequential_permission_names(clause, "#{r}[#{v}]", @labels["#{r}#{k}"])
69
- sequential_permission_names(clause, "#{r}[#{v}]", @labels["#{r}#{k}"])
68
+ sequential_permission_names(clause, "#{r}[#{v}]",
69
+ @labels["#{r}#{k}"])
70
70
  end
71
71
  end
72
72
  req_class_paths2.each do |k, v|
@@ -80,9 +80,8 @@ module IsoDoc
80
80
  hierarchical_formula_names(clause, num)
81
81
  req_class_paths.each do |k, v|
82
82
  %w(permission requirement recommendation).each do |r|
83
- hierarchical_permission_names(clause, num, "#{r}[#{v}]", @labels["#{r}#{k}"])
84
- hierarchical_permission_names(clause, num, "#{r}[#{v}]", @labels["#{r}#{k}"])
85
- hierarchical_permission_names(clause, num, "#{r}[#{v}]", @labels["#{r}#{k}"])
83
+ hierarchical_permission_names(clause, num, "#{r}[#{v}]",
84
+ @labels["#{r}#{k}"])
86
85
  end
87
86
  end
88
87
  req_class_paths2.each do |k, v|
@@ -95,7 +94,8 @@ module IsoDoc
95
94
  clause.xpath(ns(".//#{klass}#{FIRST_LVL_REQ}")).each do |t|
96
95
  next if t["id"].nil? || t["id"].empty?
97
96
  lbl = "#{num}#{hiersep}#{c.increment(t).print}"
98
- @anchors[t["id"]] = anchor_struct(lbl, t, label, klass, t["unnumbered"])
97
+ @anchors[t["id"]] = anchor_struct(lbl, t, label, klass,
98
+ t["unnumbered"])
99
99
  l = t.at(ns("./label"))&.text and @reqtlabels[l] = t["id"]
100
100
  sequential_permission_children(t, lbl)
101
101
  end
@@ -107,7 +107,8 @@ module IsoDoc
107
107
  preface_names_numbered(d.at(ns("//preface/clause[@type = 'keywords']")))
108
108
  preface_names_numbered(d.at(ns("//foreword")))
109
109
  preface_names_numbered(d.at(ns("//introduction")))
110
- preface_names_numbered(d.at(ns("//preface/clause[@type = 'submitting_orgs']")))
110
+ preface_names_numbered(d.at(ns("//preface/clause"\
111
+ "[@type = 'submitting_orgs']")))
111
112
  preface_names_numbered(d.at(ns("//submitters")))
112
113
  d.xpath(ns("//preface/clause[not(@type = 'keywords' or "\
113
114
  "@type = 'submitting_orgs')]")).each do |c|
@@ -151,6 +152,12 @@ module IsoDoc
151
152
  section_names1(c, "#{pref}.#{i + 1}", 2)
152
153
  end
153
154
  end
155
+
156
+ def reference_names(ref)
157
+ super
158
+ return unless @klass.ogc_draft_ref?(ref)
159
+ @anchors[ref["id"]] = { xref: @anchors[ref["id"]][:xref] + " (draft)" }
160
+ end
154
161
  end
155
162
  end
156
163
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "1.2.0"
3
+ VERSION = "1.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.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: 2020-07-29 00:00:00.000000000 Z
11
+ date: 2020-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc
@@ -232,17 +232,25 @@ files:
232
232
  - lib/isodoc/ogc/html/_coverpage.css
233
233
  - lib/isodoc/ogc/html/_coverpage.scss
234
234
  - lib/isodoc/ogc/html/header.html
235
+ - lib/isodoc/ogc/html/header_wp.html
235
236
  - lib/isodoc/ogc/html/html_ogc_intro.html
236
237
  - lib/isodoc/ogc/html/html_ogc_titlepage.html
237
238
  - lib/isodoc/ogc/html/htmlstyle.css
238
239
  - lib/isodoc/ogc/html/htmlstyle.scss
240
+ - lib/isodoc/ogc/html/logo.png
239
241
  - lib/isodoc/ogc/html/ogc.css
240
242
  - lib/isodoc/ogc/html/ogc.scss
243
+ - lib/isodoc/ogc/html/ogc_wp.css
244
+ - lib/isodoc/ogc/html/ogc_wp.scss
241
245
  - lib/isodoc/ogc/html/scripts.html
242
246
  - lib/isodoc/ogc/html/word_ogc_intro.html
247
+ - lib/isodoc/ogc/html/word_ogc_intro_wp.html
243
248
  - lib/isodoc/ogc/html/word_ogc_titlepage.html
249
+ - lib/isodoc/ogc/html/word_ogc_titlepage_wp.html
244
250
  - lib/isodoc/ogc/html/wordstyle.css
245
251
  - lib/isodoc/ogc/html/wordstyle.scss
252
+ - lib/isodoc/ogc/html/wordstyle_wp.css
253
+ - lib/isodoc/ogc/html/wordstyle_wp.scss
246
254
  - lib/isodoc/ogc/html_convert.rb
247
255
  - lib/isodoc/ogc/i18n-en.yaml
248
256
  - lib/isodoc/ogc/i18n.rb