metanorma-vsd 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ try {
4
+ require.resolve("puppeteer");
5
+ } catch(e) {
6
+ console.error("puppeteer Node library is not installed; will not generate PDF");
7
+ process.exit(e.code);
8
+ }
9
+
10
+ const puppeteer = require('puppeteer');
11
+
12
+ const createPdf = async() => {
13
+ let browser;
14
+ try {
15
+ browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});
16
+ const page = await browser.newPage();
17
+ await page.goto(process.argv[2], {waitUntil: 'networkidle2'});
18
+ await page.pdf({
19
+ path: process.argv[3],
20
+ format: 'A4'
21
+ });
22
+ } catch (err) {
23
+ console.log(err.message);
24
+ } finally {
25
+ if (browser) {
26
+ browser.close();
27
+ }
28
+ process.exit();
29
+ }
30
+ };
31
+ createPdf();
@@ -0,0 +1,212 @@
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="vsd-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
+ <text/>
20
+ </element>
21
+ </define>
22
+ <define name="btitle">
23
+ <element name="title">
24
+ <ref name="FormattedString"/>
25
+ </element>
26
+ </define>
27
+ <define name="figure">
28
+ <element name="figure">
29
+ <attribute name="id">
30
+ <data type="ID"/>
31
+ </attribute>
32
+ <optional>
33
+ <ref name="source"/>
34
+ </optional>
35
+ <optional>
36
+ <ref name="tname"/>
37
+ </optional>
38
+ <choice>
39
+ <oneOrMore>
40
+ <ref name="figure"/>
41
+ </oneOrMore>
42
+ <group>
43
+ <choice>
44
+ <zeroOrMore>
45
+ <ref name="TextElement"/>
46
+ </zeroOrMore>
47
+ <ref name="pre"/>
48
+ </choice>
49
+ <zeroOrMore>
50
+ <ref name="note"/>
51
+ </zeroOrMore>
52
+ <optional>
53
+ <ref name="dl"/>
54
+ </optional>
55
+ </group>
56
+ </choice>
57
+ </element>
58
+ </define>
59
+ <define name="status">
60
+ <element name="status">
61
+ <choice>
62
+ <value>proposal</value>
63
+ <value>working-draft</value>
64
+ <value>committee-draft</value>
65
+ <value>draft-standard</value>
66
+ <value>final-draft</value>
67
+ <value>published</value>
68
+ <value>withdrawn</value>
69
+ <ref name="LocalizedString"/>
70
+ </choice>
71
+ </element>
72
+ </define>
73
+ <!-- TextElement |= keyword -->
74
+ <define name="TextElement">
75
+ <choice>
76
+ <text/>
77
+ <ref name="em"/>
78
+ <ref name="eref"/>
79
+ <ref name="strong"/>
80
+ <ref name="stem"/>
81
+ <ref name="sub"/>
82
+ <ref name="sup"/>
83
+ <ref name="tt"/>
84
+ <ref name="strike"/>
85
+ <ref name="smallcap"/>
86
+ <ref name="xref"/>
87
+ <ref name="br"/>
88
+ <ref name="hyperlink"/>
89
+ <ref name="hr"/>
90
+ <ref name="pagebreak"/>
91
+ <ref name="bookmark"/>
92
+ <ref name="keyword"/>
93
+ </choice>
94
+ </define>
95
+ <define name="BibItemType" combine="choice">
96
+ <choice>
97
+ <value>policy-and-procedures</value>
98
+ <value>best-practices</value>
99
+ <value>supporting-document</value>
100
+ <value>report</value>
101
+ <value>legal</value>
102
+ <value>directives</value>
103
+ <value>proposal</value>
104
+ <value>standard</value>
105
+ </choice>
106
+ </define>
107
+ <define name="editorialgroup">
108
+ <element name="editorialgroup">
109
+ <ref name="committee"/>
110
+ </element>
111
+ </define>
112
+ <define name="BibData">
113
+ <optional>
114
+ <attribute name="type">
115
+ <ref name="BibItemType"/>
116
+ </attribute>
117
+ </optional>
118
+ <oneOrMore>
119
+ <ref name="btitle"/>
120
+ </oneOrMore>
121
+ <optional>
122
+ <ref name="formattedref"/>
123
+ </optional>
124
+ <zeroOrMore>
125
+ <ref name="bsource"/>
126
+ </zeroOrMore>
127
+ <zeroOrMore>
128
+ <ref name="docidentifier"/>
129
+ </zeroOrMore>
130
+ <zeroOrMore>
131
+ <ref name="bdate"/>
132
+ </zeroOrMore>
133
+ <zeroOrMore>
134
+ <ref name="contributor"/>
135
+ </zeroOrMore>
136
+ <optional>
137
+ <ref name="edition"/>
138
+ </optional>
139
+ <zeroOrMore>
140
+ <ref name="biblionote"/>
141
+ </zeroOrMore>
142
+ <zeroOrMore>
143
+ <ref name="language"/>
144
+ </zeroOrMore>
145
+ <zeroOrMore>
146
+ <ref name="script"/>
147
+ </zeroOrMore>
148
+ <zeroOrMore>
149
+ <ref name="abstract"/>
150
+ </zeroOrMore>
151
+ <optional>
152
+ <ref name="status"/>
153
+ </optional>
154
+ <ref name="copyright"/>
155
+ <zeroOrMore>
156
+ <ref name="docrelation"/>
157
+ </zeroOrMore>
158
+ <ref name="editorialgroup"/>
159
+ <zeroOrMore>
160
+ <ref name="ics"/>
161
+ </zeroOrMore>
162
+ <optional>
163
+ <ref name="security"/>
164
+ </optional>
165
+ </define>
166
+ </include>
167
+ <define name="committee">
168
+ <element name="committee">
169
+ <attribute name="type">
170
+ <choice>
171
+ <value>technical</value>
172
+ <value>provisional</value>
173
+ </choice>
174
+ </attribute>
175
+ <text/>
176
+ </element>
177
+ </define>
178
+ <define name="pre">
179
+ <element name="pre">
180
+ <text/>
181
+ </element>
182
+ </define>
183
+ <define name="keyword">
184
+ <element name="keyword">
185
+ <text/>
186
+ </element>
187
+ </define>
188
+ <define name="security">
189
+ <element name="security">
190
+ <text/>
191
+ </element>
192
+ </define>
193
+ <define name="vsd-standard">
194
+ <element name="vsd-standard">
195
+ <ref name="bibdata"/>
196
+ <optional>
197
+ <ref name="version"/>
198
+ </optional>
199
+ <zeroOrMore>
200
+ <ref name="termdocsource"/>
201
+ </zeroOrMore>
202
+ <ref name="preface"/>
203
+ <oneOrMore>
204
+ <ref name="sections"/>
205
+ </oneOrMore>
206
+ <zeroOrMore>
207
+ <ref name="annex"/>
208
+ </zeroOrMore>
209
+ <ref name="bibliography"/>
210
+ </element>
211
+ </define>
212
+ </grammar>
@@ -0,0 +1,9 @@
1
+ require_relative "vsd/html_convert"
2
+ require_relative "vsd/word_convert"
3
+ require_relative "vsd/pdf_convert"
4
+
5
+ module IsoDoc
6
+ module Vsd
7
+ DOCUMENT_NAMESPACE = "https://open.ribose.com/standards/vsd"
8
+ end
9
+ end
@@ -0,0 +1,184 @@
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=left style='text-align:left;line-height:12.0pt;
69
+ mso-line-height-rule:exactly'><span lang=EN-GB>CS&nbsp;{{ docnumber }}:{{ docyear }}</span></p>
70
+
71
+ </div>
72
+
73
+ <div style='mso-element:header' id=h1>
74
+
75
+ <p class=MsoHeader style='margin-bottom:18.0pt'><span lang=EN-GB
76
+ style='font-size:10.0pt;mso-bidi-font-size:11.0pt;font-weight:normal'>©
77
+ Vita Green International Inc.&nbsp;{{ docyear }}&nbsp;– All rights reserved</span><span lang=EN-GB
78
+ style='font-weight:normal'><o:p></o:p></span></p>
79
+
80
+ </div>
81
+
82
+ <div style='mso-element:footer' id=ef1>
83
+
84
+ <p class=MsoFooter style='margin-top:12.0pt;line-height:12.0pt;mso-line-height-rule:
85
+ exactly'><!--[if supportFields]><b style='mso-bidi-font-weight:normal'><span
86
+ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
87
+ style='mso-element:field-begin'></span><span
88
+ style='mso-spacerun:yes'> </span>PAGE<span style='mso-spacerun:yes'>  
89
+ </span>\* MERGEFORMAT <span style='mso-element:field-separator'></span></span></b><![endif]--><b
90
+ style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt;
91
+ mso-bidi-font-size:11.0pt'><span style='mso-no-proof:yes'>2</span></span></b><!--[if supportFields]><b
92
+ style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt;
93
+ mso-bidi-font-size:11.0pt'><span style='mso-element:field-end'></span></span></b><![endif]--><span
94
+ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
95
+ style='mso-tab-count:1'>                                                                                                                                                                           </span>©
96
+ Vita Green International Inc.&nbsp;{{ docyear }}&nbsp;– All rights reserved<o:p></o:p></span></p>
97
+
98
+ </div>
99
+
100
+ <div style='mso-element:header' id=eh2>
101
+
102
+ <p class=MsoHeader align=left style='text-align:left;line-height:12.0pt;
103
+ mso-line-height-rule:exactly'><span lang=EN-GB>Vita Green International Inc.&nbsp;{{ docnumber }}:{{ docyear }}</span></p>
104
+
105
+ </div>
106
+
107
+ <div style='mso-element:header' id=h2>
108
+
109
+ <p class=MsoHeader align=right style='text-align:right;line-height:12.0pt;
110
+ mso-line-height-rule:exactly'><span lang=EN-GB>Vita Green International Inc.&nbsp;{{ docnumber }}:{{ docyear }}</span></p>
111
+
112
+ </div>
113
+
114
+ <div style='mso-element:footer' id=ef2>
115
+
116
+ <p class=MsoFooter style='line-height:12.0pt;mso-line-height-rule:exactly'><!--[if supportFields]><span
117
+ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
118
+ style='mso-element:field-begin'></span><span
119
+ style='mso-spacerun:yes'> </span>PAGE<span style='mso-spacerun:yes'>  
120
+ </span>\* MERGEFORMAT <span style='mso-element:field-separator'></span></span><![endif]--><span
121
+ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
122
+ style='mso-no-proof:yes'>ii</span></span><!--[if supportFields]><span
123
+ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
124
+ style='mso-element:field-end'></span></span><![endif]--><span lang=EN-GB
125
+ style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span style='mso-tab-count:
126
+ 1'>                                                                                                                                                                           </span>©
127
+ Vita Green International Inc.&nbsp;{{ docyear }}&nbsp;– All rights reserved<o:p></o:p></span></p>
128
+
129
+ </div>
130
+
131
+ <div style='mso-element:footer' id=f2>
132
+
133
+ <p class=MsoFooter style='line-height:12.0pt'><span lang=EN-GB
134
+ style='font-size:10.0pt;mso-bidi-font-size:11.0pt'>© Vita Green International Inc.&nbsp;{{ docyear }}&nbsp;– All
135
+ rights reserved<span style='mso-tab-count:1'>                                                                                                                                                                          </span></span><!--[if supportFields]><span
136
+ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
137
+ style='mso-element:field-begin'></span> PAGE<span style='mso-spacerun:yes'>  
138
+ </span>\* MERGEFORMAT <span style='mso-element:field-separator'></span></span><![endif]--><span
139
+ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
140
+ style='mso-no-proof:yes'>iii</span></span><!--[if supportFields]><span
141
+ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
142
+ style='mso-element:field-end'></span></span><![endif]--><span lang=EN-GB
143
+ style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><o:p></o:p></span></p>
144
+
145
+ </div>
146
+
147
+ <div style='mso-element:footer' id=ef3>
148
+
149
+ <p class=MsoFooter style='margin-top:12.0pt;line-height:12.0pt;mso-line-height-rule:
150
+ exactly'><!--[if supportFields]><b style='mso-bidi-font-weight:normal'><span
151
+ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
152
+ style='mso-element:field-begin'></span><span
153
+ style='mso-spacerun:yes'> </span>PAGE<span style='mso-spacerun:yes'>  
154
+ </span>\* MERGEFORMAT <span style='mso-element:field-separator'></span></span></b><![endif]--><b
155
+ style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt;
156
+ mso-bidi-font-size:11.0pt'><span style='mso-no-proof:yes'>2</span></span></b><!--[if supportFields]><b
157
+ style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt;
158
+ mso-bidi-font-size:11.0pt'><span style='mso-element:field-end'></span></span></b><![endif]--><span
159
+ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><span
160
+ style='mso-tab-count:1'>                                                                                                                                                                           </span>©
161
+ Vita Green International Inc.&nbsp;{{ docyear }}&nbsp;– All rights reserved<o:p></o:p></span></p>
162
+
163
+ </div>
164
+
165
+ <div style='mso-element:footer' id=f3>
166
+
167
+ <p class=MsoFooter style='line-height:12.0pt'><span lang=EN-GB
168
+ style='font-size:10.0pt;mso-bidi-font-size:11.0pt'>© Vita Green International Inc.&nbsp;{{ docyear }}&nbsp;– All
169
+ rights reserved<span style='mso-tab-count:1'>                                                                                                                                                                           </span></span><!--[if supportFields]><b
170
+ style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt;
171
+ mso-bidi-font-size:11.0pt'><span style='mso-element:field-begin'></span>
172
+ PAGE<span style='mso-spacerun:yes'>   </span>\* MERGEFORMAT <span
173
+ style='mso-element:field-separator'></span></span></b><![endif]--><b
174
+ style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt;
175
+ mso-bidi-font-size:11.0pt'><span style='mso-no-proof:yes'>3</span></span></b><!--[if supportFields]><b
176
+ style='mso-bidi-font-weight:normal'><span lang=EN-GB style='font-size:10.0pt;
177
+ mso-bidi-font-size:11.0pt'><span style='mso-element:field-end'></span></span></b><![endif]--><span
178
+ lang=EN-GB style='font-size:10.0pt;mso-bidi-font-size:11.0pt'><o:p></o:p></span></p>
179
+
180
+ </div>
181
+
182
+ </body>
183
+
184
+ </html>
@@ -0,0 +1,8 @@
1
+ <nav>
2
+ <h1 id="content">Contents</h1>
3
+ <div id="toc"></div>
4
+
5
+ </nav>
6
+
7
+
8
+ <div class="rule toc"></div>
@@ -0,0 +1,106 @@
1
+ <div class="document-stage-band" id='{{ status | downcase | replace: " ", "-" }}-band'>
2
+ <p class="document-stage">{{ status }}</p>
3
+ </div>
4
+
5
+ <div class="document-type-band" id='{{ doctype | downcase | replace: " ", "-" }}-band'>
6
+ <p class="document-type">Vita Green {{ doctype }}</p>
7
+ </div>
8
+
9
+
10
+
11
+ <div id='toggle'> <span>&#x2022;</span> </div>
12
+
13
+ <header>
14
+
15
+ <!--<div class="WordSection1">-->
16
+ <div class="coverpage">
17
+ <div class="wrapper-top">
18
+
19
+ <div class="coverpage-doc-identity">
20
+ <div class="doc-number">
21
+ <span class="docnumber">{{ docnumber }}</span>
22
+ <span class="docnumber-separator">:</span>
23
+ <span class="docyear">{{ docyear }} {{ draftinfo }}</span>
24
+ </div>
25
+
26
+ <div class="coverpage-title">
27
+ <span class="title-first">{{ doctitle }}</span>
28
+ <!--<span class="title-second">{{ docsubtitle }}</span>-->
29
+ </div>
30
+ </div>
31
+
32
+ <div class="coverpage-logo">
33
+ <span>Vita Green International Inc. {{ docyear }}</span>
34
+ </div>
35
+
36
+ <div class="coverpage-tc-name">
37
+ <span>{{ tc }}</span>
38
+ </div>
39
+ </div>
40
+
41
+ <div class="wrapper-top-bottom"></div>
42
+
43
+ <div class="WordSection11">
44
+ <div class="coverpage-stage-block" >
45
+ <span class="coverpage-stage" id="{{ doctype | replace: ' ', '-' | downcase }}">Vita Green {{ doctype }}</span>
46
+ </div>
47
+
48
+ <div class="coverpage-stage-block" >
49
+ <p><span class="coverpage-maturity" id="{{ status | replace: ' ', '-' | downcase }}">{{ status }}</span></p>
50
+ {% if security %}
51
+ <p><span class="coverpage-maturity">Classification: {{ security }}</span></p>
52
+ {% endif %}
53
+ </div>
54
+
55
+ {% if doctype == "Policy And Procedures" or doctype == "Proposal" %}
56
+ <div class="coverpage-stage-block" >{{ revdate }}</div>
57
+ {% endif %}
58
+
59
+ {% if status != "Published" and status != "Withdrawn" %}
60
+ <div class="coverpage-warning">
61
+ <span class="title">Warning for Drafts</span>
62
+
63
+ <p class="content">
64
+ This document is not a Vita Green Standard. It is distributed for review and
65
+ comment, and is subject to change without notice and may not be referred to as
66
+ a Standard. Recipients of this draft are invited to submit, with their
67
+ comments, notification of any relevant patent rights of which they are aware
68
+ and to provide supporting documentation.
69
+ </p>
70
+ </div>
71
+ {% endif %}
72
+
73
+ <div class="info-section">
74
+ <div class="copyright">
75
+ <p class="year">
76
+ &copy; {{ docyear }} Vita Green International Inc.
77
+ </p>
78
+
79
+ <p class="message">
80
+ All rights reserved. Unless otherwise specified, no part of this
81
+ publication may be reproduced or utilized otherwise in any form or by any
82
+ means, electronic or mechanical, including photocopying, or posting on the
83
+ internet or an intranet, without prior written permission. Permission can
84
+ be requested from the address below.
85
+ </p>
86
+
87
+ <div class="contact-info">
88
+ <p class="name">Vita Green International Inc.</p>
89
+ <p class="address">
90
+ 18 Dai Hei Street<br />
91
+ Tai Po Industrial Estate<br />
92
+ New Territories<br />
93
+ Hong Kong<br />
94
+ <br />
95
+ <a href="mailto:copyright@vitagreen.com">copyright@vitagreen.com</a><br />
96
+ <a href="www.vitagreen.com">www.vitagreen.com</a>
97
+ </p>
98
+ </div>
99
+ </div>
100
+
101
+ <div class="rule"></div>
102
+ </div>
103
+ </div>
104
+
105
+
106
+ </header>