metanorma-unece 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/.hound.yml +3 -0
  4. data/.rubocop.ribose.yml +66 -0
  5. data/.rubocop.tb.yml +650 -0
  6. data/.rubocop.yml +15 -0
  7. data/.travis.yml +21 -0
  8. data/CODE_OF_CONDUCT.md +74 -0
  9. data/Gemfile +4 -0
  10. data/LICENSE +25 -0
  11. data/README.adoc +202 -0
  12. data/Rakefile +6 -0
  13. data/bin/console +14 -0
  14. data/bin/rspec +17 -0
  15. data/bin/setup +8 -0
  16. data/lib/asciidoctor/unece.rb +7 -0
  17. data/lib/asciidoctor/unece/biblio.rng +880 -0
  18. data/lib/asciidoctor/unece/converter.rb +240 -0
  19. data/lib/asciidoctor/unece/isodoc.rng +1066 -0
  20. data/lib/asciidoctor/unece/isostandard.rng +1054 -0
  21. data/lib/asciidoctor/unece/unece.rng +247 -0
  22. data/lib/isodoc/unece.rb +9 -0
  23. data/lib/isodoc/unece/html/header.html +164 -0
  24. data/lib/isodoc/unece/html/html_unece_intro.html +27 -0
  25. data/lib/isodoc/unece/html/html_unece_titlepage.html +112 -0
  26. data/lib/isodoc/unece/html/htmlstyle.scss +1119 -0
  27. data/lib/isodoc/unece/html/logo.jpg +0 -0
  28. data/lib/isodoc/unece/html/scripts.html +82 -0
  29. data/lib/isodoc/unece/html/unece.scss +660 -0
  30. data/lib/isodoc/unece/html/word_unece_intro.html +24 -0
  31. data/lib/isodoc/unece/html/word_unece_plenary_titlepage.html +129 -0
  32. data/lib/isodoc/unece/html/word_unece_titlepage.html +17 -0
  33. data/lib/isodoc/unece/html/wordstyle.scss +1088 -0
  34. data/lib/isodoc/unece/html_convert.rb +392 -0
  35. data/lib/isodoc/unece/metadata.rb +93 -0
  36. data/lib/isodoc/unece/word_convert.rb +405 -0
  37. data/lib/metanorma-unece.rb +8 -0
  38. data/lib/metanorma/unece.rb +11 -0
  39. data/lib/metanorma/unece/UN_emblem_blue.svg +193 -0
  40. data/lib/metanorma/unece/processor.rb +40 -0
  41. data/lib/metanorma/unece/version.rb +5 -0
  42. data/metanorma-unece.gemspec +47 -0
  43. metadata +353 -0
@@ -0,0 +1,247 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
+ <!--
4
+ Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
5
+ we cannot have a new default namespace: we will end up with a grammar with two different
6
+ namespaces, one for isostandard and one for csand additions. And we do not want that.
7
+ -->
8
+ <include href="isostandard.rng">
9
+ <start>
10
+ <ref name="unece-standard"/>
11
+ </start>
12
+ <define name="language">
13
+ <element name="language">
14
+ <value>en</value>
15
+ </element>
16
+ </define>
17
+ <define name="docidentifier">
18
+ <element name="docidentifier">
19
+ <optional>
20
+ <attribute name="type"/>
21
+ </optional>
22
+ <text/>
23
+ </element>
24
+ </define>
25
+ <define name="btitle">
26
+ <element name="title">
27
+ <ref name="FormattedString"/>
28
+ </element>
29
+ </define>
30
+ <define name="figure">
31
+ <element name="figure">
32
+ <attribute name="id">
33
+ <data type="ID"/>
34
+ </attribute>
35
+ <optional>
36
+ <ref name="tname"/>
37
+ </optional>
38
+ <choice>
39
+ <ref name="image"/>
40
+ <oneOrMore>
41
+ <ref name="subfigure"/>
42
+ </oneOrMore>
43
+ </choice>
44
+ <zeroOrMore>
45
+ <ref name="fn"/>
46
+ </zeroOrMore>
47
+ <optional>
48
+ <ref name="dl"/>
49
+ </optional>
50
+ <zeroOrMore>
51
+ <ref name="note"/>
52
+ </zeroOrMore>
53
+ </element>
54
+ </define>
55
+ <define name="subfigure">
56
+ <element name="figure">
57
+ <attribute name="id">
58
+ <data type="ID"/>
59
+ </attribute>
60
+ <optional>
61
+ <ref name="tname"/>
62
+ </optional>
63
+ <ref name="image"/>
64
+ </element>
65
+ </define>
66
+ <define name="status">
67
+ <element name="status">
68
+ <choice>
69
+ <value>proposal</value>
70
+ <value>working-draft</value>
71
+ <value>committee-draft</value>
72
+ <value>draft-standard</value>
73
+ <value>final-draft</value>
74
+ <value>published</value>
75
+ <value>withdrawn</value>
76
+ <ref name="LocalizedString"/>
77
+ </choice>
78
+ </element>
79
+ </define>
80
+ <define name="TextElement">
81
+ <choice>
82
+ <text/>
83
+ <ref name="em"/>
84
+ <ref name="eref"/>
85
+ <ref name="strong"/>
86
+ <ref name="stem"/>
87
+ <ref name="sub"/>
88
+ <ref name="sup"/>
89
+ <ref name="tt"/>
90
+ <ref name="strike"/>
91
+ <ref name="smallcap"/>
92
+ <ref name="xref"/>
93
+ <ref name="br"/>
94
+ <ref name="hyperlink"/>
95
+ <ref name="hr"/>
96
+ <ref name="pagebreak"/>
97
+ <ref name="bookmark"/>
98
+ </choice>
99
+ </define>
100
+ <define name="admonition">
101
+ <element name="admonition">
102
+ <attribute name="id">
103
+ <data type="ID"/>
104
+ </attribute>
105
+ <attribute name="type">
106
+ <choice>
107
+ <value>danger</value>
108
+ <value>caution</value>
109
+ <value>warning</value>
110
+ <value>important</value>
111
+ <value>safety precautions</value>
112
+ </choice>
113
+ </attribute>
114
+ <optional>
115
+ <ref name="tname"/>
116
+ </optional>
117
+ <oneOrMore>
118
+ <choice>
119
+ <ref name="paragraph-with-footnote"/>
120
+ <ref name="table"/>
121
+ <ref name="formula"/>
122
+ <ref name="ol"/>
123
+ <ref name="ul"/>
124
+ <ref name="dl"/>
125
+ <ref name="figure"/>
126
+ <ref name="quote"/>
127
+ <ref name="sourcecode"/>
128
+ <ref name="example"/>
129
+ <ref name="review"/>
130
+ </choice>
131
+ </oneOrMore>
132
+ <zeroOrMore>
133
+ <ref name="note"/>
134
+ </zeroOrMore>
135
+ </element>
136
+ </define>
137
+ <define name="BibItemType" combine="choice">
138
+ <choice>
139
+ <value>recommendation</value>
140
+ <value>plenary</value>
141
+ </choice>
142
+ </define>
143
+ <define name="editorialgroup">
144
+ <element name="editorialgroup">
145
+ <oneOrMore>
146
+ <ref name="committee"/>
147
+ </oneOrMore>
148
+ </element>
149
+ </define>
150
+ <define name="sections">
151
+ <element name="sections">
152
+ <oneOrMore>
153
+ <ref name="clause"/>
154
+ </oneOrMore>
155
+ </element>
156
+ </define>
157
+ <define name="BibData">
158
+ <optional>
159
+ <attribute name="type">
160
+ <ref name="BibItemType"/>
161
+ </attribute>
162
+ </optional>
163
+ <oneOrMore>
164
+ <ref name="btitle"/>
165
+ </oneOrMore>
166
+ <optional>
167
+ <ref name="formattedref"/>
168
+ </optional>
169
+ <zeroOrMore>
170
+ <ref name="bsource"/>
171
+ </zeroOrMore>
172
+ <zeroOrMore>
173
+ <ref name="docidentifier"/>
174
+ </zeroOrMore>
175
+ <zeroOrMore>
176
+ <ref name="bdate"/>
177
+ </zeroOrMore>
178
+ <zeroOrMore>
179
+ <ref name="contributor"/>
180
+ </zeroOrMore>
181
+ <optional>
182
+ <ref name="edition"/>
183
+ </optional>
184
+ <zeroOrMore>
185
+ <ref name="biblionote"/>
186
+ </zeroOrMore>
187
+ <zeroOrMore>
188
+ <ref name="language"/>
189
+ </zeroOrMore>
190
+ <zeroOrMore>
191
+ <ref name="script"/>
192
+ </zeroOrMore>
193
+ <zeroOrMore>
194
+ <ref name="abstract"/>
195
+ </zeroOrMore>
196
+ <optional>
197
+ <ref name="status"/>
198
+ </optional>
199
+ <ref name="copyright"/>
200
+ <zeroOrMore>
201
+ <ref name="docrelation"/>
202
+ </zeroOrMore>
203
+ <ref name="editorialgroup"/>
204
+ <zeroOrMore>
205
+ <ref name="ics"/>
206
+ </zeroOrMore>
207
+ </define>
208
+ <define name="preface">
209
+ <element name="preface">
210
+ <optional>
211
+ <ref name="abstract"/>
212
+ </optional>
213
+ <optional>
214
+ <ref name="foreword"/>
215
+ </optional>
216
+ <optional>
217
+ <ref name="introduction"/>
218
+ </optional>
219
+ </element>
220
+ </define>
221
+ </include>
222
+ <define name="abstract">
223
+ <element name="abstract">
224
+ <ref name="Basic-Section"/>
225
+ </element>
226
+ </define>
227
+ <define name="committee">
228
+ <element name="committee">
229
+ <text/>
230
+ </element>
231
+ </define>
232
+ <define name="unece-standard">
233
+ <element name="unece-standard">
234
+ <ref name="bibdata"/>
235
+ <optional>
236
+ <ref name="version"/>
237
+ </optional>
238
+ <ref name="preface"/>
239
+ <oneOrMore>
240
+ <ref name="sections"/>
241
+ </oneOrMore>
242
+ <zeroOrMore>
243
+ <ref name="annex"/>
244
+ </zeroOrMore>
245
+ </element>
246
+ </define>
247
+ </grammar>
@@ -0,0 +1,9 @@
1
+ require "isodoc/unece/metadata"
2
+ require "isodoc/unece/html_convert"
3
+ require "isodoc/unece/word_convert"
4
+
5
+ module IsoDoc
6
+ module Unece
7
+
8
+ end
9
+ end
@@ -0,0 +1,164 @@
1
+ <html xmlns:v="urn:schemas-microsoft-com:vml"
2
+ xmlns:o="urn:schemas-microsoft-com:office:office"
3
+ xmlns:w="urn:schemas-microsoft-com:office:word"
4
+ xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
5
+ xmlns:mv="http://macVmlSchemaUri" xmlns="http://www.w3.org/TR/REC-html40">
6
+
7
+ <head>
8
+ <meta name=Title content="">
9
+ <meta name=Keywords content="">
10
+ <meta http-equiv=Content-Type content="text/html; charset=utf-8">
11
+ <meta name=ProgId content=Word.Document>
12
+ <meta name=Generator content="Microsoft Word 15">
13
+ <meta name=Originator content="Microsoft Word 15">
14
+ <link id=Main-File rel=Main-File href="../{{ filename }}.html">
15
+ <!--[if gte mso 9]><xml>
16
+ <o:shapedefaults v:ext="edit" spidmax="2049"/>
17
+ </xml><![endif]-->
18
+ </head>
19
+
20
+ <body lang=EN link=blue vlink="#954F72">
21
+
22
+ <div style='mso-element:footnote-separator' id=fs>
23
+
24
+ <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
25
+ normal'><span lang=EN-GB><span style='mso-special-character:footnote-separator'><![if !supportFootnotes]>
26
+
27
+ <hr align=left size=1 width="33%">
28
+
29
+ <![endif]></span></span></p>
30
+
31
+ </div>
32
+
33
+ <div style='mso-element:footnote-continuation-separator' id=fcs>
34
+
35
+ <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
36
+ normal'><span lang=EN-GB><span style='mso-special-character:footnote-continuation-separator'><![if !supportFootnotes]>
37
+
38
+ <hr align=left size=1>
39
+
40
+ <![endif]></span></span></p>
41
+
42
+ </div>
43
+
44
+ <div style='mso-element:endnote-separator' id=es>
45
+
46
+ <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
47
+ normal'><span lang=EN-GB><span style='mso-special-character:footnote-separator'><![if !supportFootnotes]>
48
+
49
+ <hr align=left size=1 width="33%">
50
+
51
+ <![endif]></span></span></p>
52
+
53
+ </div>
54
+
55
+ <div style='mso-element:endnote-continuation-separator' id=ecs>
56
+
57
+ <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;line-height:
58
+ normal'><span lang=EN-GB><span style='mso-special-character:footnote-continuation-separator'><![if !supportFootnotes]>
59
+
60
+ <hr align=left size=1>
61
+
62
+ <![endif]></span></span></p>
63
+
64
+ </div>
65
+
66
+ <div style='mso-element:header' id=eh1>
67
+
68
+ <p class=MsoHeader align=center style='text-align:center;line-height:12.0pt;
69
+ mso-line-height-rule:exactly'></p>
70
+
71
+ </div>
72
+
73
+ <div style='mso-element:header' id=h1>
74
+
75
+ <p class=MsoHeader align=center style='text-align:center;line-height:12.0pt;
76
+ mso-line-height-rule:exactly'></span></p>
77
+ </div>
78
+
79
+ <div style='mso-element:footer' id=ef1>
80
+
81
+ <p class=MsoFooter style='margin-top:12.0pt;line-height:12.0pt;mso-line-height-rule:
82
+ exactly'></p>
83
+
84
+ </div>
85
+
86
+ <div style='mso-element:header' id=eh2>
87
+
88
+ <p class=MsoHeader align=center style='text-align:center;line-height:12.0pt;
89
+ mso-line-height-rule:exactly'><span lang=EN-GB><b>{{ formatted_docnumber }}</b></span></p>
90
+
91
+ <div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;
92
+ mso-border-bottom-alt:solid windowtext .5pt;padding:0cm 0cm 1.0pt 0cm'>
93
+
94
+ <p class=MsoHeader align=center style='margin-bottom:12.0pt;text-align:center;
95
+ line-height:12.0pt;mso-line-height-rule:exactly;border:none;mso-border-bottom-alt:
96
+ solid windowtext .5pt;padding:0cm;mso-padding-alt:0cm 0cm 1.0pt 0cm'><span
97
+ lang=EN-US><o:p>&nbsp;</o:p></span></p>
98
+
99
+ </div>
100
+ </div>
101
+
102
+ <div style='mso-element:header' id=h2>
103
+
104
+ <p class=MsoHeader align=center style='text-align:center;line-height:12.0pt;
105
+ mso-line-height-rule:exactly'><span lang=EN-GB><b>{{ formatted_docnumber }}</b></span></p>
106
+
107
+ <div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;
108
+ mso-border-bottom-alt:solid windowtext .5pt;padding:0cm 0cm 1.0pt 0cm'>
109
+
110
+ <p class=MsoHeader align=center style='margin-bottom:12.0pt;text-align:center;
111
+ line-height:12.0pt;mso-line-height-rule:exactly;border:none;mso-border-bottom-alt:
112
+ solid windowtext .5pt;padding:0cm;mso-padding-alt:0cm 0cm 1.0pt 0cm'><span
113
+ lang=EN-US><o:p>&nbsp;</o:p></span></p>
114
+
115
+ </div>
116
+ </div>
117
+
118
+ <div style='mso-element:footer' id=ef2>
119
+
120
+ <p class=MsoFooter style='line-height:12.0pt;mso-line-height-rule:exactly'></p>
121
+ </div>
122
+
123
+ <div style='mso-element:footer' id=f2>
124
+
125
+ <p class=MsoFooter style='line-height:12.0pt'></p>
126
+
127
+ </div>
128
+
129
+ <div style='mso-element:footer' id=ef3>
130
+
131
+ <p class=MsoFooter align="center" style='text-align:center;margin-top:12.0pt;line-height:12.0pt;mso-line-height-rule:
132
+ exactly'><!--[if supportFields]><b><span
133
+ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
134
+ style='mso-element:field-begin'></span><span
135
+ style='mso-spacerun:yes'> </span>PAGE<span style='mso-spacerun:yes'>  
136
+ </span>\* MERGEFORMAT <span style='mso-element:field-separator'></span></span></b><![endif]--><b>
137
+ <span lang=EN-GB style='font-size:10.0pt;
138
+ mso-bidi-font-size:11.0pt'><span style='mso-no-proof:yes'>2</span></span></b><!--[if supportFields]><b>
139
+ <span lang=EN-GB style='font-size:10.0pt;
140
+ mso-bidi-font-size:11.0pt'><span style='mso-element:field-end'></span></span></b><![endif]--><span
141
+ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
142
+ style='mso-tab-count:0'>                                                                                                                                                                           </span></span></p>
143
+
144
+ </div>
145
+
146
+ <div style='mso-element:footer' id=f3>
147
+
148
+ <p class=MsoFooter align="center" style='text-align:center;line-height:12.0pt'><span lang=EN-GB
149
+ style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span style='mso-tab-count:0'>                                                                                                                                                                           </span></span><!--[if supportFields]><b>
150
+ <span lang=EN-GB style='font-size:10.0pt;
151
+ mso-bidi-font-size:11.0pt'><span style='mso-element:field-begin'></span>
152
+ PAGE<span style='mso-spacerun:yes'>   </span>\* MERGEFORMAT <span
153
+ style='mso-element:field-separator'></span></span></b><![endif]--><b>
154
+ <span lang=EN-GB style='font-size:10.0pt;
155
+ mso-bidi-font-size:11.0pt'><span style='mso-no-proof:yes'>3</span></span></b><!--[if supportFields]><b>
156
+ <span lang=EN-GB style='font-size:10.0pt;
157
+ mso-bidi-font-size:11.0pt'><span style='mso-element:field-end'></span></span></b><![endif]--><span
158
+ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><o:p></o:p></span></p>
159
+
160
+ </div>
161
+
162
+ </body>
163
+
164
+ </html>
@@ -0,0 +1,27 @@
1
+ <div>
2
+ <p><b>Note</b>
3
+ <p>The designations employed and the presentation of the material in this publication do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations concerning the legal status of any country, territory, city or area, or of its authorities, or concerning the delimitation of its frontiers or boundaries.</p>
4
+
5
+ {% if tc == "United Nations Centre for Trade Facilitation and Electronic Business (UN/CEFACT)" %}
6
+ <p align="center"><b>The United Nations Centre for Trade Facilitation and Electronic Business (UN/CEFACT)</b></p>
7
+ <p align="center"><b>Simple, Transparent and Effective Processes for Global Commerce</b></p>
8
+ <p>UN/CEFACT’s mission is to improve the ability of business, trade and administrative organizations, from developed, developing and transitional economies, to exchange products and relevant services effectively. Its principal focus is on facilitating national and international transactions, through the simplification and harmonization of processes, procedures and information flows, and so contribute to the growth of global commerce.</p>
9
+ <p>Participation in UN/CEFACT is open to experts from United Nations Member States, Intergovernmental Organizations and Non-Governmental Organizations recognised by the United Nations Economic and Social Council (ECOSOC). Through this participation of government and business representatives from around the world, UN/CEFACT has developed a range of trade facilitation and e-business standards, recommendations and tools that are approved within a broad intergovernmental process and implemented globally.</p>
10
+ <p align="center"<b>www.unece.org/cefact</b></p>
11
+ {% endif %}
12
+
13
+ <p align="center" style="border:solid;">ECE/TRADE/437</p>
14
+ <p align="center">Copyright © United Nations {{ docyear }}<br/>
15
+ All rights reserved worldwide<br/>
16
+ United Nations publication issued by the Economic Commission for Europe</p>
17
+
18
+ </div>
19
+
20
+ <nav>
21
+ <h1 id="content">Contents</h1>
22
+ <div id="toc"></div>
23
+
24
+ </nav>
25
+
26
+
27
+ <div class="rule toc"></div>