metanorma-rsd 1.0.6 → 1.0.7

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: 9934a2e81bcaa0b44cbb9fcefca5bc966bc951e3d9c5b91681e5ddd8bf4a660c
4
- data.tar.gz: 3114106ea0ada7fa5536197227b84fd23acefda5122e6a8ab07c03d9f3c75f53
3
+ metadata.gz: 98b99e88b32c3e2d17a6afc7b45fd10faaac409883603438a8a31cde40eb5054
4
+ data.tar.gz: 2186f48f7fcc6108ba1bb0fc0c7f259e254b43c3e41eb90605a9c54fdddcf97e
5
5
  SHA512:
6
- metadata.gz: 15e46c71c99be72bcc98be58ee5c84b593d35df3e9a178bc257fce8ebbc7221bf34d16eca3cdd017852d2cb120430ef22205a19b12b19d38e38bbd159f392c67
7
- data.tar.gz: fb47f1d2194099deef65c936669984f17c013ce21361c0a0fba5d782f2e6ec554473fb24336ecd0c5c55118e30af74486bd90be16751791ed1d88c5ba6bdf5a7
6
+ metadata.gz: d096176eea24e61432d283604596f3dc4d38d7dc761d7041c9af23605a8588c1ef2cb4618e0c66e46eb9aff160e3848144bf3e84fc23d241d43aa65fb14438ff
7
+ data.tar.gz: 9033dcc1afc7be2924018b9a23013d331ebecc2730d6fd4adece1a1425982885f693d846641b40a01ab4e11f46a817b15a145b3ccd51a159a57c4d8c8b07310f
@@ -414,6 +414,20 @@
414
414
  <ref name="BibliographicItem"/>
415
415
  </element>
416
416
  </define>
417
+ <define name="relaton_collection">
418
+ <element name="relaton-collection">
419
+ <optional>
420
+ <attribute name="type"/>
421
+ </optional>
422
+ <ref name="btitle"/>
423
+ <zeroOrMore>
424
+ <ref name="contributor"/>
425
+ </zeroOrMore>
426
+ <zeroOrMore>
427
+ <ref name="docrelation"/>
428
+ </zeroOrMore>
429
+ </element>
430
+ </define>
417
431
  <define name="BibItemType" combine="choice">
418
432
  <choice>
419
433
  <value>article</value>
@@ -531,7 +545,10 @@
531
545
  </define>
532
546
  <define name="fetched">
533
547
  <element name="fetched">
534
- <data type="dateTime"/>
548
+ <choice>
549
+ <data type="dateTime"/>
550
+ <data type="date"/>
551
+ </choice>
535
552
  </element>
536
553
  </define>
537
554
  <define name="validity">
@@ -549,17 +566,26 @@
549
566
  </define>
550
567
  <define name="validityBegins">
551
568
  <element name="validityBegins">
552
- <data type="dateTime"/>
569
+ <choice>
570
+ <data type="dateTime"/>
571
+ <data type="date"/>
572
+ </choice>
553
573
  </element>
554
574
  </define>
555
575
  <define name="validityEnds">
556
576
  <element name="validityEnds">
557
- <data type="dateTime"/>
577
+ <choice>
578
+ <data type="dateTime"/>
579
+ <data type="date"/>
580
+ </choice>
558
581
  </element>
559
582
  </define>
560
583
  <define name="validityRevision">
561
584
  <element name="revision">
562
- <data type="dateTime"/>
585
+ <choice>
586
+ <data type="dateTime"/>
587
+ <data type="date"/>
588
+ </choice>
563
589
  </element>
564
590
  </define>
565
591
  <define name="TypedTitleString">
@@ -744,6 +770,7 @@
744
770
  <element name="from">
745
771
  <choice>
746
772
  <data type="dateTime"/>
773
+ <data type="date"/>
747
774
  <data type="gYear"/>
748
775
  </choice>
749
776
  </element>
@@ -752,6 +779,7 @@
752
779
  <element name="to">
753
780
  <choice>
754
781
  <data type="dateTime"/>
782
+ <data type="date"/>
755
783
  <data type="gYear"/>
756
784
  </choice>
757
785
  </element>
@@ -207,6 +207,13 @@ table {
207
207
  }
208
208
  }
209
209
 
210
+ @media screen {
211
+ img {
212
+ width: 100%;
213
+ height: auto;
214
+ }
215
+ }
216
+
210
217
 
211
218
 
212
219
  #toc ul {
@@ -535,6 +535,8 @@ table.MsoISOTable
535
535
  mso-yfti-tbllook:480;
536
536
  mso-border-insideh:.75pt solid windowtext;
537
537
  mso-border-insidev:.75pt solid windowtext;
538
+ mso-table-anchor-vertical:paragraph;
539
+ mso-table-bspace:12.0pt;
538
540
  font-size:10.0pt;
539
541
  font-family:$bodyfont;}
540
542
  table.MsoISOTable tr
@@ -561,6 +563,8 @@ table.MsoTableGrid
561
563
  mso-para-margin:0cm;
562
564
  mso-para-margin-bottom:.0001pt;
563
565
  mso-pagination:widow-orphan;
566
+ mso-table-anchor-vertical:paragraph;
567
+ mso-table-bspace:12.0pt;
564
568
  font-size:10.0pt;
565
569
  font-family:$bodyfont;}
566
570
  td { page-break-inside:avoid; }
@@ -617,6 +621,15 @@ p.example, li.example, div.example, td.example, td.example p
617
621
  mso-pagination:none;
618
622
  font-size:10.0pt;
619
623
  font-family:$bodyfont;}
624
+
625
+ table.example {
626
+ margin-bottom:12pt;
627
+ }
628
+
629
+ td.example p.MsoListParagraph {
630
+ font-size: 10.0pt;
631
+ }
632
+
620
633
  span.note_label, span.example_label, td.example_label, td.note_label
621
634
  {
622
635
  font-size: 10.0pt;
@@ -82,9 +82,8 @@ p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
82
82
  mso-style-qformat:yes;
83
83
  margin-top:0cm;
84
84
  margin-right:0cm;
85
- margin-bottom:0cm;
85
+ margin-bottom:12.0pt;
86
86
  /* do not put in margin-left, it is specific to list level */
87
- margin-bottom:.0001pt;
88
87
  mso-add-space:auto;
89
88
  mso-pagination:widow-orphan;
90
89
  font-size:10.5pt;
@@ -98,9 +97,8 @@ p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphC
98
97
  mso-style-type:export-only;
99
98
  margin-top:0cm;
100
99
  margin-right:0cm;
101
- margin-bottom:0cm;
100
+ margin-bottom:12.0pt;
102
101
  /* do not put in margin-left, it is specific to list level */
103
- margin-bottom:.0001pt;
104
102
  mso-add-space:auto;
105
103
  mso-pagination:widow-orphan;
106
104
  font-size:10.5pt;
@@ -114,9 +112,8 @@ p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagrap
114
112
  mso-style-type:export-only;
115
113
  margin-top:0cm;
116
114
  margin-right:0cm;
117
- margin-bottom:0cm;
115
+ margin-bottom:12.0pt;
118
116
  /* do not put in margin-left, it is specific to list level */
119
- margin-bottom:.0001pt;
120
117
  mso-add-space:auto;
121
118
  mso-pagination:widow-orphan;
122
119
  font-size:10.5pt;
@@ -130,9 +127,8 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
130
127
  mso-style-type:export-only;
131
128
  margin-top:0cm;
132
129
  margin-right:0cm;
133
- margin-bottom:0cm;
134
- /* do not put in margin-left, it is specific to list level */
135
130
  margin-bottom:12.0pt;
131
+ /* do not put in margin-left, it is specific to list level */
136
132
  mso-add-space:auto;
137
133
  mso-pagination:widow-orphan;
138
134
  font-size:10.5pt;
@@ -280,19 +276,6 @@ a:visited, span.MsoHyperlinkFollowed
280
276
  color:purple;
281
277
  text-decoration:underline;
282
278
  text-underline:single;}
283
- p
284
- {mso-style-priority:99;
285
- mso-margin-top-alt:auto;
286
- margin-right:0cm;
287
- mso-margin-bottom-alt:auto;
288
- margin-left:0cm;
289
- mso-pagination:widow-orphan;
290
- font-size:10.0pt;
291
- font-family:$bodyfont;
292
- mso-fareast-font-family:"MS Mincho";
293
- mso-bidi-font-family:"Times New Roman";
294
- mso-ansi-language:EN-US;
295
- mso-fareast-language:EN-US;}
296
279
  p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
297
280
  {mso-style-noshow:yes;
298
281
  mso-style-unhide:no;
@@ -318,75 +301,6 @@ p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
318
301
  mso-fareast-font-family:"Times New Roman";
319
302
  mso-ansi-language:EN-US;
320
303
  mso-fareast-language:EN-US;}
321
- p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
322
- {mso-style-priority:34;
323
- mso-style-unhide:no;
324
- mso-style-qformat:yes;
325
- margin-top:0cm;
326
- margin-right:0cm;
327
- margin-bottom:12.0pt;
328
- margin-left:36.0pt;
329
- mso-add-space:auto;
330
- mso-pagination:widow-orphan;
331
- font-size:10.5pt;
332
- mso-bidi-font-size:11.0pt;
333
- font-family:"Arial",sans-serif;
334
- mso-fareast-font-family:"Times New Roman";
335
- mso-ansi-language:EN-US;
336
- mso-fareast-language:EN-US;}
337
- p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
338
- {mso-style-priority:34;
339
- mso-style-unhide:no;
340
- mso-style-qformat:yes;
341
- mso-style-type:export-only;
342
- margin-top:0cm;
343
- margin-right:0cm;
344
- margin-bottom:0cm;
345
- margin-left:36.0pt;
346
- margin-bottom:.0001pt;
347
- mso-add-space:auto;
348
- mso-pagination:widow-orphan;
349
- font-size:10.5pt;
350
- mso-bidi-font-size:11.0pt;
351
- font-family:"Arial",sans-serif;
352
- mso-fareast-font-family:"Times New Roman";
353
- mso-ansi-language:EN-US;
354
- mso-fareast-language:EN-US;}
355
- p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
356
- {mso-style-priority:34;
357
- mso-style-unhide:no;
358
- mso-style-qformat:yes;
359
- mso-style-type:export-only;
360
- margin-top:0cm;
361
- margin-right:0cm;
362
- margin-bottom:0cm;
363
- margin-left:36.0pt;
364
- margin-bottom:.0001pt;
365
- mso-add-space:auto;
366
- mso-pagination:widow-orphan;
367
- font-size:10.5pt;
368
- mso-bidi-font-size:11.0pt;
369
- font-family:"Arial",sans-serif;
370
- mso-fareast-font-family:"Times New Roman";
371
- mso-ansi-language:EN-US;
372
- mso-fareast-language:EN-US;}
373
- p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
374
- {mso-style-priority:34;
375
- mso-style-unhide:no;
376
- mso-style-qformat:yes;
377
- mso-style-type:export-only;
378
- margin-top:0cm;
379
- margin-right:0cm;
380
- margin-bottom:12.0pt;
381
- margin-left:36.0pt;
382
- mso-add-space:auto;
383
- mso-pagination:widow-orphan;
384
- font-size:10.5pt;
385
- mso-bidi-font-size:11.0pt;
386
- font-family:"Arial",sans-serif;
387
- mso-fareast-font-family:"Times New Roman";
388
- mso-ansi-language:EN-US;
389
- mso-fareast-language:EN-US;}
390
304
  span.blackgraphtxsidebar
391
305
  {mso-style-name:blackgraphtxsidebar;
392
306
  mso-style-unhide:no;
@@ -1172,6 +1086,8 @@ table.MsoNormalTable
1172
1086
  mso-para-margin:0cm;
1173
1087
  mso-para-margin-bottom:.0001pt;
1174
1088
  mso-pagination:widow-orphan;
1089
+ mso-table-anchor-vertical:paragraph;
1090
+ mso-table-bspace:12.0pt;
1175
1091
  font-size:10.0pt;
1176
1092
  font-family:$bodyfont;}
1177
1093
  br.section
@@ -71,16 +71,13 @@ module IsoDoc
71
71
  def annex_name(annex, name, div)
72
72
  div.h1 **{ class: "Annex" } do |t|
73
73
  t << "#{get_anchors[annex['id']][:label]} "
74
- t << "<b>#{name.text}</b>"
74
+ t.br
75
+ t.b do |b|
76
+ name&.children&.each { |c2| parse(c2, b) }
77
+ end
75
78
  end
76
79
  end
77
80
 
78
- def annex_name_lbl(clause, num)
79
- obl = l10n("(#{@inform_annex_lbl})")
80
- obl = l10n("(#{@norm_annex_lbl})") if clause["obligation"] == "normative"
81
- l10n("<b>#{@annex_lbl} #{num}</b> #{obl}")
82
- end
83
-
84
81
  def pre_parse(node, out)
85
82
  out.pre node.text # content.gsub(/</, "&lt;").gsub(/>/, "&gt;")
86
83
  end
@@ -133,66 +130,6 @@ module IsoDoc
133
130
  super
134
131
  end
135
132
 
136
- def annex_name(annex, name, div)
137
- div.h1 **{ class: "Annex" } do |t|
138
- t << "#{get_anchors[annex['id']][:label]} "
139
- t << "<b>#{name.text}</b>"
140
- end
141
- end
142
-
143
- def annex_name_lbl(clause, num)
144
- obl = l10n("(#{@inform_annex_lbl})")
145
- obl = l10n("(#{@norm_annex_lbl})") if clause["obligation"] == "normative"
146
- l10n("<b>#{@annex_lbl} #{num}</b> #{obl}")
147
- end
148
-
149
- def pre_parse(node, out)
150
- out.pre node.text # content.gsub(/</, "&lt;").gsub(/>/, "&gt;")
151
- end
152
-
153
- def term_defs_boilerplate(div, source, term, preface)
154
- if source.empty? && term.nil?
155
- div << @no_terms_boilerplate
156
- else
157
- div << term_defs_boilerplate_cont(source, term)
158
- end
159
- end
160
-
161
- def i18n_init(lang, script)
162
- super
163
- @annex_lbl = "Appendix"
164
- end
165
-
166
- def error_parse(node, out)
167
- # catch elements not defined in ISO
168
- case node.name
169
- when "pre"
170
- pre_parse(node, out)
171
- when "keyword"
172
- out.span node.text, **{ class: "keyword" }
173
- else
174
- super
175
- end
176
- end
177
-
178
- def fileloc(loc)
179
- File.join(File.dirname(__FILE__), loc)
180
- end
181
-
182
- def cleanup(docxml)
183
- super
184
- term_cleanup(docxml)
185
- end
186
-
187
- def term_cleanup(docxml)
188
- docxml.xpath("//p[@class = 'Terms']").each do |d|
189
- h2 = d.at("./preceding-sibling::*[@class = 'TermNum'][1]")
190
- h2.add_child("&nbsp;")
191
- h2.add_child(d.remove)
192
- end
193
- docxml
194
- end
195
-
196
133
  end
197
134
  end
198
135
  end
@@ -69,14 +69,11 @@ module IsoDoc
69
69
  def annex_name(annex, name, div)
70
70
  div.h1 **{ class: "Annex" } do |t|
71
71
  t << "#{get_anchors[annex['id']][:label]} "
72
- t << "<b>#{name.text}</b>"
72
+ t.br
73
+ t.b do |b|
74
+ name&.children&.each { |c2| parse(c2, b) }
75
+ end
73
76
  end
74
- end
75
-
76
- def annex_name_lbl(clause, num)
77
- obl = l10n("(#{@inform_annex_lbl})")
78
- obl = l10n("(#{@norm_annex_lbl})") if clause["obligation"] == "normative"
79
- l10n("<b>#{@annex_lbl} #{num}</b> #{obl}")
80
77
  end
81
78
 
82
79
  def pre_parse(node, out)
@@ -130,67 +127,6 @@ module IsoDoc
130
127
  @meta.security isoxml, out
131
128
  super
132
129
  end
133
-
134
- def annex_name(annex, name, div)
135
- div.h1 **{ class: "Annex" } do |t|
136
- t << "#{get_anchors[annex['id']][:label]} "
137
- t << "<b>#{name.text}</b>"
138
- end
139
- end
140
-
141
- def annex_name_lbl(clause, num)
142
- obl = l10n("(#{@inform_annex_lbl})")
143
- obl = l10n("(#{@norm_annex_lbl})") if clause["obligation"] == "normative"
144
- l10n("<b>#{@annex_lbl} #{num}</b> #{obl}")
145
- end
146
-
147
- def pre_parse(node, out)
148
- out.pre node.text # content.gsub(/</, "&lt;").gsub(/>/, "&gt;")
149
- end
150
-
151
- def term_defs_boilerplate(div, source, term, preface)
152
- if source.empty? && term.nil?
153
- div << @no_terms_boilerplate
154
- else
155
- div << term_defs_boilerplate_cont(source, term)
156
- end
157
- end
158
-
159
- def i18n_init(lang, script)
160
- super
161
- @annex_lbl = "Appendix"
162
- end
163
-
164
- def error_parse(node, out)
165
- # catch elements not defined in ISO
166
- case node.name
167
- when "pre"
168
- pre_parse(node, out)
169
- when "keyword"
170
- out.span node.text, **{ class: "keyword" }
171
- else
172
- super
173
- end
174
- end
175
-
176
- def fileloc(loc)
177
- File.join(File.dirname(__FILE__), loc)
178
- end
179
-
180
- def cleanup(docxml)
181
- super
182
- term_cleanup(docxml)
183
- end
184
-
185
- def term_cleanup(docxml)
186
- docxml.xpath("//p[@class = 'Terms']").each do |d|
187
- h2 = d.at("./preceding-sibling::*[@class = 'TermNum'][1]")
188
- h2.add_child("&nbsp;")
189
- h2.add_child(d.remove)
190
- end
191
- docxml
192
- end
193
-
194
130
  end
195
131
  end
196
132
  end
@@ -94,16 +94,13 @@ module IsoDoc
94
94
  def annex_name(annex, name, div)
95
95
  div.h1 **{ class: "Annex" } do |t|
96
96
  t << "#{get_anchors[annex['id']][:label]} "
97
- t << "<b>#{name.text}</b>"
97
+ t.br
98
+ t.b do |b|
99
+ name&.children&.each { |c2| parse(c2, b) }
100
+ end
98
101
  end
99
102
  end
100
103
 
101
- def annex_name_lbl(clause, num)
102
- obl = l10n("(#{@inform_annex_lbl})")
103
- obl = l10n("(#{@norm_annex_lbl})") if clause["obligation"] == "normative"
104
- l10n("<b>#{@annex_lbl} #{num}</b> #{obl}")
105
- end
106
-
107
104
  def pre_parse(node, out)
108
105
  out.pre node.text # content.gsub(/</, "&lt;").gsub(/>/, "&gt;")
109
106
  end
@@ -22,8 +22,8 @@ module Metanorma
22
22
  "Metanorma::Rsd #{Metanorma::Rsd::VERSION}"
23
23
  end
24
24
 
25
- def input_to_isodoc(file)
26
- Metanorma::Input::Asciidoc.new.process(file, @asciidoctor_backend)
25
+ def input_to_isodoc(file, filename)
26
+ Metanorma::Input::Asciidoc.new.process(file, filename, @asciidoctor_backend)
27
27
  end
28
28
 
29
29
  def output(isodoc_node, outname, format, options={})
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Rsd
3
- VERSION = "1.0.6"
3
+ VERSION = "1.0.7"
4
4
  end
5
5
  end
@@ -43,5 +43,5 @@ Gem::Specification.new do |spec|
43
43
  spec.add_development_dependency "rubocop", "~> 0.50"
44
44
  spec.add_development_dependency "simplecov", "~> 0.15"
45
45
  spec.add_development_dependency "timecop", "~> 0.9"
46
- spec.add_development_dependency "metanorma", "~> 0.2.6"
46
+ spec.add_development_dependency "metanorma", "~> 0.3.0"
47
47
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-rsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-08 00:00:00.000000000 Z
11
+ date: 2018-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -226,14 +226,14 @@ dependencies:
226
226
  requirements:
227
227
  - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: 0.2.6
229
+ version: 0.3.0
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
- version: 0.2.6
236
+ version: 0.3.0
237
237
  description: |
238
238
  metanorma-rsd lets you write RSD in AsciiDoc syntax.
239
239