metanorma-un 0.11.1 → 0.11.3

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: 4bb7f5e0507e6121b00bb9c0a77de939bef65ffd3d0430abefb46a9755989f1e
4
- data.tar.gz: 1fbf3cc1f9e13c7b349f6dc5964f005247f17a6df0cf016e6af1d35c29929df2
3
+ metadata.gz: 893911187f440c2a22dc5e6ac6399be48569729d68df0f06771bc9f0082c7ce6
4
+ data.tar.gz: 0acdfe2cab3e3d993c216cb05f99c19c54b7c520a2a154d51b0c55dd2f525ce5
5
5
  SHA512:
6
- metadata.gz: 466ee743e3a9cfac771aa8f25419b9032e12f0de5a7141da4ed5f138b769ec1840f6fb0110c8dc5b80b3acbcc9ad489b4f00a4d363b4d4742e5b71f691511b43
7
- data.tar.gz: 5a1175c0a0049a6e3c24bd3044297bd11506f9ebe3fb60b06e8a76e36449081cde0ea33219a30ec5a1a6373b4080e99db3b2492e137e63f4716ec244561626e7
6
+ metadata.gz: 70580505445dcedb730c190da09ef95033ace92233a2428bdeadcdbe76d4bd9fd57565907fa4b10a9dce9d7573ba85bc67bb9e47bc1dc83bd0b5868bd797e58a
7
+ data.tar.gz: 41626b7890c63328f847e397a849dfce7491af3e4922ac104d76e23eae2bfd575a6496dce8dc664bb1d8746911610831e406180a202b59e72eeb1abe5c6943b0
@@ -34,8 +34,7 @@ module IsoDoc
34
34
  end
35
35
 
36
36
  def is_plenary?(docxml)
37
- doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
38
- return true if %w(plenary agenda budgetary).include?(doctype)
37
+ return true if %w(plenary agenda budgetary).include?(@doctype)
39
38
  return true if docxml&.at(ns("//bibdata/ext/session/*"))
40
39
 
41
40
  false
@@ -14,11 +14,11 @@ module IsoDoc
14
14
  end
15
15
 
16
16
  def pdf_stylesheet(docxml)
17
- case doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
17
+ case @doctype
18
18
  when "plenary", "agenda", "budgetary"
19
19
  "un.plenary.xsl"
20
20
  else
21
- docxml&.at(ns("//bibdata/ext/session/*")) ?
21
+ docxml.at(ns("//bibdata/ext/session/*")) ?
22
22
  "un.plenary-attachment.xsl" : "un.recommendation.xsl"
23
23
  end
24
24
  end
@@ -346,6 +346,8 @@
346
346
  <ref name="keyword"/>
347
347
  <ref name="xref"/>
348
348
  <ref name="hyperlink"/>
349
+ <ref name="index"/>
350
+ <ref name="index-xref"/>
349
351
  </choice>
350
352
  </oneOrMore>
351
353
  </element>
@@ -623,6 +625,8 @@
623
625
  <ref name="eref"/>
624
626
  <ref name="xref"/>
625
627
  <ref name="hyperlink"/>
628
+ <ref name="index"/>
629
+ <ref name="index-xref"/>
626
630
  </choice>
627
631
  </zeroOrMore>
628
632
  </element>
@@ -636,6 +640,8 @@
636
640
  <ref name="eref"/>
637
641
  <ref name="xref"/>
638
642
  <ref name="hyperlink"/>
643
+ <ref name="index"/>
644
+ <ref name="index-xref"/>
639
645
  </choice>
640
646
  </zeroOrMore>
641
647
  </element>
@@ -648,6 +654,8 @@
648
654
  <ref name="eref"/>
649
655
  <ref name="xref"/>
650
656
  <ref name="hyperlink"/>
657
+ <ref name="index"/>
658
+ <ref name="index-xref"/>
651
659
  </choice>
652
660
  </zeroOrMore>
653
661
  </element>
@@ -655,7 +663,11 @@
655
663
  <define name="keyword">
656
664
  <element name="keyword">
657
665
  <zeroOrMore>
658
- <ref name="PureTextElement"/>
666
+ <choice>
667
+ <ref name="PureTextElement"/>
668
+ <ref name="index"/>
669
+ <ref name="index-xref"/>
670
+ </choice>
659
671
  </zeroOrMore>
660
672
  </element>
661
673
  </define>
@@ -676,7 +688,11 @@
676
688
  <define name="strike">
677
689
  <element name="strike">
678
690
  <zeroOrMore>
679
- <ref name="PureTextElement"/>
691
+ <choice>
692
+ <ref name="PureTextElement"/>
693
+ <ref name="index"/>
694
+ <ref name="index-xref"/>
695
+ </choice>
680
696
  </zeroOrMore>
681
697
  </element>
682
698
  </define>
@@ -1283,7 +1283,7 @@
1283
1283
  <value>mergedInto</value>
1284
1284
  <value>splits</value>
1285
1285
  <value>splitInto</value>
1286
- <value>instance</value>
1286
+ <value>instanceOf</value>
1287
1287
  <value>hasInstance</value>
1288
1288
  <value>exemplarOf</value>
1289
1289
  <value>hasExemplar</value>
@@ -159,7 +159,9 @@ module Metanorma
159
159
  end
160
160
 
161
161
  def presentation_xml_converter(node)
162
- IsoDoc::UN::PresentationXMLConvert.new(html_extract_attributes(node))
162
+ IsoDoc::UN::PresentationXMLConvert
163
+ .new(html_extract_attributes(node)
164
+ .merge(output_formats: ::Metanorma::UN::Processor.new.output_formats))
163
165
  end
164
166
 
165
167
  def html_converter(node)
@@ -192,8 +194,7 @@ module Metanorma
192
194
  end
193
195
 
194
196
  def para_to_clause(xmldoc)
195
- doctype = xmldoc&.at("//bibdata/ext/doctype")&.text
196
- %w(plenary agenda budgetary).include?(doctype) or
197
+ %w(plenary agenda budgetary).include?(@doctype) or
197
198
  para_to_clause1(xmldoc)
198
199
  end
199
200
 
@@ -17,7 +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.4 -->
20
+ <!-- VERSION v1.2.6 -->
21
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">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -485,6 +485,8 @@
485
485
  <choice>
486
486
  <text/>
487
487
  <ref name="callout"/>
488
+ <ref name="xref"/>
489
+ <ref name="eref"/>
488
490
  </choice>
489
491
  </oneOrMore>
490
492
  <zeroOrMore>
@@ -865,6 +867,7 @@
865
867
  <ref name="PureTextElement"/>
866
868
  <ref name="stem"/>
867
869
  <ref name="index"/>
870
+ <ref name="index-xref"/>
868
871
  <ref name="eref"/>
869
872
  <ref name="erefstack"/>
870
873
  <ref name="xref"/>
@@ -880,6 +883,7 @@
880
883
  <ref name="PureTextElement"/>
881
884
  <ref name="stem"/>
882
885
  <ref name="index"/>
886
+ <ref name="index-xref"/>
883
887
  <ref name="eref"/>
884
888
  <ref name="erefstack"/>
885
889
  <ref name="xref"/>
@@ -894,6 +898,7 @@
894
898
  <choice>
895
899
  <ref name="PureTextElement"/>
896
900
  <ref name="index"/>
901
+ <ref name="index-xref"/>
897
902
  <ref name="eref"/>
898
903
  <ref name="erefstack"/>
899
904
  <ref name="xref"/>
@@ -908,6 +913,7 @@
908
913
  <choice>
909
914
  <ref name="PureTextElement"/>
910
915
  <ref name="index"/>
916
+ <ref name="index-xref"/>
911
917
  </choice>
912
918
  </zeroOrMore>
913
919
  </element>
@@ -918,6 +924,7 @@
918
924
  <choice>
919
925
  <ref name="PureTextElement"/>
920
926
  <ref name="index"/>
927
+ <ref name="index-xref"/>
921
928
  </choice>
922
929
  </zeroOrMore>
923
930
  </element>
@@ -928,6 +935,7 @@
928
935
  <choice>
929
936
  <ref name="PureTextElement"/>
930
937
  <ref name="index"/>
938
+ <ref name="index-xref"/>
931
939
  </choice>
932
940
  </zeroOrMore>
933
941
  </element>
@@ -938,6 +946,7 @@
938
946
  <choice>
939
947
  <ref name="PureTextElement"/>
940
948
  <ref name="index"/>
949
+ <ref name="index-xref"/>
941
950
  </choice>
942
951
  </zeroOrMore>
943
952
  </element>
@@ -1004,6 +1013,14 @@
1004
1013
  </oneOrMore>
1005
1014
  </element>
1006
1015
  </define>
1016
+ <define name="BasicBlock" combine="choice">
1017
+ <ref name="columnbreak"/>
1018
+ </define>
1019
+ <define name="columnbreak">
1020
+ <element name="columnbreak">
1021
+ <empty/>
1022
+ </element>
1023
+ </define>
1007
1024
  <define name="MultilingualRenderingType">
1008
1025
  <choice>
1009
1026
  <value>common</value>
@@ -1047,6 +1064,8 @@
1047
1064
  <ref name="keyword"/>
1048
1065
  <ref name="xref"/>
1049
1066
  <ref name="hyperlink"/>
1067
+ <ref name="index"/>
1068
+ <ref name="index-xref"/>
1050
1069
  </choice>
1051
1070
  </element>
1052
1071
  </define>
@@ -1060,6 +1079,8 @@
1060
1079
  <ref name="keyword"/>
1061
1080
  <ref name="xref"/>
1062
1081
  <ref name="hyperlink"/>
1082
+ <ref name="index"/>
1083
+ <ref name="index-xref"/>
1063
1084
  </choice>
1064
1085
  </element>
1065
1086
  </define>
@@ -1126,6 +1147,8 @@
1126
1147
  <choice>
1127
1148
  <ref name="PureTextElement"/>
1128
1149
  <ref name="stem"/>
1150
+ <ref name="index"/>
1151
+ <ref name="index-xref"/>
1129
1152
  </choice>
1130
1153
  </zeroOrMore>
1131
1154
  </element>
@@ -1136,6 +1159,8 @@
1136
1159
  <choice>
1137
1160
  <ref name="PureTextElement"/>
1138
1161
  <ref name="stem"/>
1162
+ <ref name="index"/>
1163
+ <ref name="index-xref"/>
1139
1164
  </choice>
1140
1165
  </zeroOrMore>
1141
1166
  </element>
@@ -35,6 +35,7 @@ module Metanorma
35
35
  end
36
36
 
37
37
  def output(isodoc_node, inname, outname, format, options={})
38
+ options_preprocess(options)
38
39
  case format
39
40
  when :html
40
41
  IsoDoc::UN::HtmlConvert.new(options).convert(inname, isodoc_node, nil, outname)
@@ -27,8 +27,6 @@
27
27
  <ref name="xref"/>
28
28
  <ref name="br"/>
29
29
  <ref name="hyperlink"/>
30
- <ref name="hr"/>
31
- <ref name="pagebreak"/>
32
30
  <ref name="bookmark"/>
33
31
  </choice>
34
32
  </define>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.11.1".freeze
3
+ VERSION = "0.11.3".freeze
4
4
  end
5
5
  end
data/metanorma-un.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_dependency "roman-numerals"
32
32
  spec.add_dependency "twitter_cldr"
33
33
 
34
- spec.add_dependency "metanorma-standoc", "~> 2.5.4"
34
+ spec.add_dependency "metanorma-standoc", "~> 2.6.0"
35
35
 
36
36
  spec.add_development_dependency "debug"
37
37
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
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.11.1
4
+ version: 0.11.3
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-08-28 00:00:00.000000000 Z
11
+ date: 2023-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 2.5.4
61
+ version: 2.6.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: 2.5.4
68
+ version: 2.6.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: debug
71
71
  requirement: !ruby/object:Gem::Requirement