metanorma-un 0.10.7 → 0.10.9

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.
@@ -49,7 +49,7 @@ module IsoDoc
49
49
  def footnotes(_div)
50
50
  if @meta.get[:item_footnote]
51
51
  fn = noko do |xml|
52
- xml.aside **{ id: "ftnitem" } do |d|
52
+ xml.aside id: "ftnitem" do |d|
53
53
  d.p @meta.get[:item_footnote]
54
54
  end
55
55
  end.join("\n")
@@ -74,15 +74,10 @@ module IsoDoc
74
74
  end
75
75
 
76
76
  def make_body2(body, docxml)
77
- body.div **{ class: "WordSection2" } do |div2|
77
+ body.div class: "WordSection2" do |div2|
78
78
  info docxml, div2
79
79
  boilerplate docxml, div2
80
- preface_block docxml, div2
81
- abstract docxml, div2
82
- foreword docxml, div2
83
- introduction docxml, div2
84
- preface docxml, div2
85
- acknowledgements docxml, div2
80
+ front docxml, div2
86
81
  div2.p { |p| p << "&#xa0;" } # placeholder
87
82
  end
88
83
  section_break(body)
@@ -109,27 +104,25 @@ module IsoDoc
109
104
  end_line(isoxml, out)
110
105
  end
111
106
 
112
- def introduction(isoxml, out)
113
- f = isoxml.at(ns("//introduction")) || return
114
- out.div **{ class: "Section3", id: f["id"] } do |div|
107
+ def introduction(clause, out)
108
+ out.div class: "Section3", id: clause["id"] do |div|
115
109
  page_break(out)
116
- div.p(**{ class: "IntroTitle" }) do |h1|
117
- f&.at(ns("./title"))&.children&.each { |n| parse(n, h1) }
110
+ div.p(class: "IntroTitle") do |h1|
111
+ clause&.at(ns("./title"))&.children&.each { |n| parse(n, h1) }
118
112
  end
119
- f.elements.each do |e|
113
+ clause.elements.each do |e|
120
114
  parse(e, div) unless e.name == "title"
121
115
  end
122
116
  end
123
117
  end
124
118
 
125
- def foreword(isoxml, out)
126
- f = isoxml.at(ns("//foreword")) || return
127
- out.div **attr_code(id: f["id"]) do |s|
119
+ def foreword(clause, out)
120
+ out.div **attr_code(id: clause["id"]) do |s|
128
121
  page_break(out)
129
- s.p(**{ class: "ForewordTitle" }) do |h1|
130
- f&.at(ns("./title"))&.children&.each { |n| parse(n, h1) }
122
+ s.p(class: "ForewordTitle") do |h1|
123
+ clause&.at(ns("./title"))&.children&.each { |n| parse(n, h1) }
131
124
  end
132
- f.elements.each { |e| parse(e, s) unless e.name == "title" }
125
+ clause.elements.each { |e| parse(e, s) unless e.name == "title" }
133
126
  end
134
127
  end
135
128
 
@@ -160,14 +153,13 @@ module IsoDoc
160
153
  abstractbox.parent.remove if abstractbox && !abstract
161
154
  end
162
155
 
163
- def abstract(isoxml, out)
164
- f = isoxml.at(ns("//abstract")) || return
165
- out.div **attr_code(id: f["id"]) do |s|
156
+ def abstract(clause, out)
157
+ out.div **attr_code(id: clause["id"]) do |s|
166
158
  page_break(out)
167
- s.p(**{ class: "AbstractTitle" }) do |h1|
168
- f&.at(ns("./title"))&.children&.each { |n| parse(n, h1) }
159
+ s.p(class: "AbstractTitle") do |h1|
160
+ clause&.at(ns("./title"))&.children&.each { |n| parse(n, h1) }
169
161
  end
170
- f.elements.each { |e| parse(e, s) unless e.name == "title" }
162
+ clause.elements.each { |e| parse(e, s) unless e.name == "title" }
171
163
  end
172
164
  end
173
165
 
@@ -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,6 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar ns="https://www.metanorma.org/ns/un" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <grammar ns='https://www.metanorma.org/ns/un' 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.
@@ -209,13 +210,7 @@
209
210
  </include>
210
211
  <define name="un-standard">
211
212
  <element name="un-standard">
212
- <attribute name="version"/>
213
- <attribute name="type">
214
- <choice>
215
- <value>semantic</value>
216
- <value>presentation</value>
217
- </choice>
218
- </attribute>
213
+ <ref name="Root-Attributes"/>
219
214
  <ref name="bibdata"/>
220
215
  <optional>
221
216
  <ref name="misccontainer"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.10.7".freeze
3
+ VERSION = "0.10.9".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-un
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.7
4
+ version: 0.10.9
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: iso-639