metanorma-ogc 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54d51e2b4b90d16bbdf9501ec56ec6cd9662ae28cb2ceb8033fef7c83db0cbf3
4
- data.tar.gz: 8256897c8b5d73c2a6b3463f4febb3830b5d5126dade22cde283a78c0e3f8192
3
+ metadata.gz: cf5663cc79d98ff38a32717c48b8b0ab1a0bddb9b37c19dad11cc1ffabe4c705
4
+ data.tar.gz: e89c3705f344428e79691d2803a144f9c1f4555f46fae166e60727482f3c77f4
5
5
  SHA512:
6
- metadata.gz: 6a83357c1d2fba623924e2839e168968bfb213cbec0cb6304a17a466295adfd9b7b69ecdab54c21b735549ff91d582f27471021fdb3679fc9b0210dfc7d853d1
7
- data.tar.gz: 12fbc914136ee27e66387c03c0afb7e861af434bc2455de29a1f3acd0e27437c7b9d945916b85bb7887a156aa58c75ad95fe743906154f20f4ef31be9ec92dbd
6
+ metadata.gz: fee53d546401cf6daa7ded839c091bb6938761dd6cddb643cf99e8e42f0bb966e2df6e16c7589e41ffe7ff92d3c554f272c372cac7b55b7b05cbff039297a748
7
+ data.tar.gz: 86a37701755ce86fa6bb69f82d27a608797eb902f9ed17dc853b00ebafd3149afe7becfbf88004114d00c1d63b64764d815ccc13706f4e9482f699cbb093a583
@@ -87,7 +87,7 @@
87
87
  </element>
88
88
  </define>
89
89
  <define name="reqinherit">
90
- <element name="subject">
90
+ <element name="inherit">
91
91
  <text/>
92
92
  </element>
93
93
  </define>
@@ -1,20 +1,18 @@
1
1
  module IsoDoc
2
2
  module Ogc
3
3
  module BaseConvert
4
- def iso_bibitem_entry(list, b, ordinal, biblio)
5
- return if implicit_reference(b)
4
+ def std_bibitem_entry(list, b, ordinal, biblio)
6
5
  list.p **attr_code(iso_bibitem_entry_attrs(b, biblio)) do |ref|
7
6
  prefix_bracketed_ref(ref, ordinal) if biblio
8
7
  standard_citation(ref, b)
9
8
  end
10
9
  end
11
10
 
12
- def noniso_bibitem(list, b, ordinal, bibliography)
11
+ def nonstd_bibitem(list, b, ordinal, bibliography)
13
12
  list.p **attr_code(iso_bibitem_entry_attrs(b, bibliography)) do |r|
13
+ id = bibitem_ref_code(b)
14
14
  if bibliography
15
- id = docid_l10n(b.at(ns("./docidentifier")).text.gsub(/[\[\]]/, ""))
16
- prefix = b&.at(ns("./docidentifier/@type"))&.text
17
- ref_entry_code(r, ordinal, prefix, id) unless prefix
15
+ ref_entry_code(r, ordinal, id)
18
16
  end
19
17
  reference_format(b, r)
20
18
  end
@@ -85,11 +83,14 @@ module IsoDoc
85
83
 
86
84
  # {author}: {document identifier}, {title}. {publisher}, {city} ({year})
87
85
  def standard_citation(out, b)
86
+ if ftitle = b.at(ns("./formattedref"))
87
+ ftitle&.children&.each { |n| parse(n, out) }
88
+ else
88
89
  pub, pub_abbrev = extract_publisher(b)
89
90
  c = extract_city(b)
90
91
  y = extract_year(b)
91
92
  out << "#{pub_abbrev}: " if pub_abbrev
92
- out << iso_bibitem_ref_code(b)
93
+ out << bibitem_ref_code(b)
93
94
  out << ", "
94
95
  out.i do |i|
95
96
  iso_title(b)&.children&.each { |n| parse(n, i) }
@@ -100,6 +101,7 @@ module IsoDoc
100
101
  c&.children&.each { |n| parse(n, out) }
101
102
  out << " " if (pub || c) && y
102
103
  out << "(#{y})." if y
104
+ end
103
105
  end
104
106
  end
105
107
  end
@@ -64,10 +64,6 @@ module IsoDoc
64
64
  end
65
65
  end
66
66
 
67
- def html_toc(docxml)
68
- docxml
69
- end
70
-
71
67
  def make_body3(body, docxml)
72
68
  body.div **{ class: "main-section" } do |div3|
73
69
  @prefacenum = 0
@@ -7,13 +7,12 @@ module IsoDoc
7
7
  module BaseConvert
8
8
  def recommend_table_attr(node)
9
9
  attr_code(id: node["id"], class: "recommend",
10
- cellspacing: 0, cellpadding: 0,
11
- style: "border-collapse:collapse" )
10
+ style: "border-collapse:collapse;border-spacing:0;" )
12
11
  end
13
12
 
14
13
  REQ_TBL_ATTR =
15
- { valign: "top", class: "example_label",
16
- style: "width:100.0pt;padding:0 0 0 1em;margin-left:0pt" }.freeze
14
+ { class: "example_label",
15
+ style: "width:100.0pt;padding:0 0 0 1em;margin-left:0pt;vertical-align:top;" }.freeze
17
16
 
18
17
  def recommendation_name(node, out, type)
19
18
  out.p **{ class: "AdmonitionTitle" } do |b|
@@ -36,7 +35,7 @@ module IsoDoc
36
35
  end
37
36
 
38
37
  def recommendation_body(node, tr)
39
- tr.td **{ valign: "top", class: "recommend" } do |td|
38
+ tr.td **{ style: "vertical-align:top;", class: "recommend" } do |td|
40
39
  recommend_title(node, td)
41
40
  node.children.each do |n|
42
41
  parse(n, td) unless %(label title).include?(n.name)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "0.1.4"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -27,8 +27,8 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency "asciidoctor", "~> 1.5.7"
28
28
  spec.add_dependency "htmlentities", "~> 4.3.4"
29
29
  spec.add_dependency "ruby-jing"
30
- spec.add_dependency "metanorma-standoc", "~> 1.2.0"
31
- spec.add_dependency "isodoc", "~> 0.10.0"
30
+ spec.add_dependency "metanorma-standoc", "~> 1.3.0"
31
+ spec.add_dependency "isodoc", "~> 1.0.0"
32
32
  spec.add_dependency "iso-639"
33
33
 
34
34
  spec.add_development_dependency "bundler", "~> 2.0.1"
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: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-04 00:00:00.000000000 Z
11
+ date: 2019-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -58,28 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.2.0
61
+ version: 1.3.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.2.0
68
+ version: 1.3.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: isodoc
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.10.0
75
+ version: 1.0.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.10.0
82
+ version: 1.0.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: iso-639
85
85
  requirement: !ruby/object:Gem::Requirement