metanorma-mpfd 0.1.8 → 0.1.10
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.
- checksums.yaml +4 -4
- data/.travis.yml +2 -3
- data/README.adoc +12 -232
- data/appveyor.yml +30 -0
- data/lib/asciidoctor/mpfd/biblio.rng +57 -50
- data/lib/asciidoctor/mpfd/converter.rb +1 -1
- data/lib/asciidoctor/mpfd/isodoc.rng +1 -0
- data/lib/asciidoctor/mpfd/reqt.rng +157 -0
- data/lib/isodoc/mpfd/html/scripts.html +1 -1
- data/lib/isodoc/mpfd/html/scripts.pdf.html +1 -1
- data/lib/isodoc/mpfd/html_convert.rb +1 -12
- data/lib/isodoc/mpfd/pdf_convert.rb +1 -12
- data/lib/metanorma/mpfd/version.rb +1 -1
- data/metanorma-mpfd.gemspec +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 34216d2f677712dc14f895ff6a1d9325acc711857ade0e960ac9d3006e1de6d5
|
|
4
|
+
data.tar.gz: f66d94f169cf2366d0ab241044f1adffe13d2eebd614f6fcdd07f86aafc31f3c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 04a1ffbfa0b10105b2c20d0e482e347e8dde97a3d576ba358756da3eb8e7cf53cddaa4feec9ce38a29a029d85ba56989e0c57b79f4259c26eb4954c964209bf3
|
|
7
|
+
data.tar.gz: 4a0ce72be75bf4fe5a60c98aae7a56386235988786e3694b4f2982c82644cf83c7ff7d18a88f81ee3f7d8dfce611504b41d120a5406ca7aaae93dc62b8cca3c7
|
data/.travis.yml
CHANGED
|
@@ -8,9 +8,8 @@ rvm:
|
|
|
8
8
|
- ruby-head
|
|
9
9
|
before_install:
|
|
10
10
|
- gem install bundler -v 2.0.1
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
- unset _JAVA_OPTIONS
|
|
11
|
+
- travis_retry sudo apt-get update
|
|
12
|
+
- curl -L https://raw.githubusercontent.com/metanorma/metanorma-linux-setup/master/ubuntu-install-puppeteer.sh | bash
|
|
14
13
|
matrix:
|
|
15
14
|
allow_failures:
|
|
16
15
|
- rvm: ruby-head
|
data/README.adoc
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
= Metanorma-MPFD: Metanorma processor for MPFA documents
|
|
2
2
|
|
|
3
3
|
image:https://img.shields.io/gem/v/metanorma-mpfd.svg["Gem Version", link="https://rubygems.org/gems/metanorma-mpfd"]
|
|
4
|
-
image:https://img.shields.io/travis/
|
|
5
|
-
image:https://
|
|
4
|
+
image:https://img.shields.io/travis/metanorma/metanorma-mpfd/master.svg["Build Status", link="https://travis-ci.com/metanorma/metanorma-mpfd"]
|
|
5
|
+
image:https://ci.appveyor.com/api/projects/status/ee3t67dyxlb5y4db?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/ribose/metanorma-mpfd"]
|
|
6
|
+
image:https://codeclimate.com/github/metanorma/metanorma-mpfd/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-mpfd"]
|
|
6
7
|
|
|
7
8
|
WARNING: This gem is still under development. Moreover, unlike other Metanorma gems,
|
|
8
9
|
there is no formal MPFD specification, and this work is still currently exploratory.
|
|
@@ -13,9 +14,9 @@ This gem processes http://asciidoctor.org/[Asciidoctor] documents following
|
|
|
13
14
|
a template for generating documents for the http://www.mpfa.org.hk[Mandatory Provident Fund Schemes Authority of Hong Kong]
|
|
14
15
|
(MPFA). (MPFD stands for Mandatory Provident Fund Schemes Authority Documents.)
|
|
15
16
|
|
|
16
|
-
The gem currently inherits from the https://github.com/
|
|
17
|
+
The gem currently inherits from the https://github.com/metanorma/metanorma-standoc
|
|
17
18
|
gem, and aligns closely to it. Refer to the ISO gem documentation
|
|
18
|
-
for guidance, including https://github.com/
|
|
19
|
+
for guidance, including https://github.com/metanorma/metanorma-iso/wiki/Guidance-for-authoring
|
|
19
20
|
|
|
20
21
|
The following outputs are generated.
|
|
21
22
|
|
|
@@ -53,17 +54,17 @@ document.
|
|
|
53
54
|
|
|
54
55
|
The gem then converts the XML into HTML and DOC.
|
|
55
56
|
|
|
56
|
-
Sample documents are available at http://github.com/
|
|
57
|
+
Sample documents are available at http://github.com/metanorma/mpfd-documents/
|
|
57
58
|
|
|
58
59
|
=== Installation
|
|
59
60
|
|
|
60
|
-
If you are using a Mac, the https://github.com/
|
|
61
|
+
If you are using a Mac, the https://github.com/metanorma/metanorma-macos-setup
|
|
61
62
|
repository has instructions on setting up your machine to run Metanorma
|
|
62
63
|
scripts such as this one. You need only run the following in a Terminal console:
|
|
63
64
|
|
|
64
65
|
[source,console]
|
|
65
66
|
----
|
|
66
|
-
$ bash <(curl -s https://raw.githubusercontent.com/
|
|
67
|
+
$ bash <(curl -s https://raw.githubusercontent.com/metanorma/metanorma-macos-setup/master/metanorma-setup)
|
|
67
68
|
$ gem install metanorma-mpfd
|
|
68
69
|
$ gem install metanorma-cli
|
|
69
70
|
----
|
|
@@ -71,239 +72,18 @@ $ gem install metanorma-cli
|
|
|
71
72
|
The metanorma-cli gem is the command-line interface for the Metanorma tool suite
|
|
72
73
|
(incorporating the `metanorma` executable seen above).
|
|
73
74
|
|
|
74
|
-
==
|
|
75
|
+
== Documentation
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
See https://www.metanorma.com/author/mpfd/[The MPFD flavor of Metanorma]
|
|
77
78
|
|
|
78
|
-
The MPFD model is an instance of the
|
|
79
|
-
https://github.com/riboseinc/isodoc-models[StandardDocument model].
|
|
80
79
|
|
|
81
|
-
The Metanorma XML format intends to introduce rigor into the MPFD
|
|
82
|
-
standards authoring process, and is prescribed in a separate document.
|
|
83
|
-
|
|
84
|
-
=== Asciidoctor
|
|
85
|
-
|
|
86
|
-
Asciidoctor has been selected as the authoring tool to generate the document
|
|
87
|
-
model representation of MPFD documents. It is a document formatting tool like
|
|
88
|
-
Markdown and DocBook, which combines the relative ease of use of the former
|
|
89
|
-
(using relatively lightweight markup), and the rigor and expressively of the
|
|
90
|
-
latter (it has a well-defined syntax, and was in fact initially developed as a
|
|
91
|
-
DocBook document authoring tool). Asciidoctor has built-in capability to output
|
|
92
|
-
Text, DocBook and HTML; so it can be used to preview the file as it is being
|
|
93
|
-
authored.
|
|
94
|
-
|
|
95
|
-
Generating documents via a document model substantially automated formatting
|
|
96
|
-
associated with the document, including automating numbering of headings, figures,
|
|
97
|
-
tables etc, and automatically generating references and citations.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
[[model_additions]]
|
|
101
|
-
== Asciidoctor features specific to MPFD
|
|
102
|
-
|
|
103
|
-
The https://github.com/riboseinc/metanorma-standoc[metanorma-standoc]
|
|
104
|
-
gem documents the customisations of Asciidoctor markup common to all metanorma gems.
|
|
105
|
-
The following markup is specific to this gem.
|
|
106
|
-
|
|
107
|
-
All the following modifications to the basic Metanorma model are provisional, as a full analysis of the
|
|
108
|
-
formatting requirements of MPFD has not yet been conducted.
|
|
109
|
-
|
|
110
|
-
=== Glossary
|
|
111
|
-
|
|
112
|
-
Sections with the title `glossary` are treated as equivalent to `Terms and Definitions`
|
|
113
|
-
in other Metanorma docuemnts.
|
|
114
|
-
|
|
115
|
-
[source,asciidoctor]
|
|
116
|
-
--
|
|
117
|
-
== Glossary
|
|
118
|
-
=== Term
|
|
119
|
-
|
|
120
|
-
Definition
|
|
121
|
-
|
|
122
|
-
=== Term 2
|
|
123
|
-
|
|
124
|
-
Definition 2
|
|
125
|
-
--
|
|
126
|
-
|
|
127
|
-
Also unlike other Metanorma documents, the glossary is considererd part of the document
|
|
128
|
-
preface, along with the foreword and introduction, and is moved to the preface regardless
|
|
129
|
-
of where it appears in the source Asciidoctor document.
|
|
130
|
-
|
|
131
|
-
Any clause that has the `preface` style attribute is also moved to the document preface,
|
|
132
|
-
regardless of where it appears in the source Asciidoctor document.
|
|
133
|
-
|
|
134
|
-
[source,asciidoctor]
|
|
135
|
-
--
|
|
136
|
-
[preface]
|
|
137
|
-
== Initial Discussion
|
|
138
|
-
This section will be moved to the document preface, after the foreword, introduction,
|
|
139
|
-
and glossary.
|
|
140
|
-
--
|
|
141
|
-
|
|
142
|
-
=== Guidance clauses
|
|
143
|
-
|
|
144
|
-
Compliance documents in the MPFA (e.g. https://github.com/riboseinc/mpfd-documents/blob/master/compliance/mpfd-compliance.adoc)
|
|
145
|
-
present compliance standards, following by an "Explanatory Notes and Guidance" clause. That clause is nested within the
|
|
146
|
-
standards clause, and has a special identifier: the standards clause identifier, followed by E.
|
|
147
|
-
|
|
148
|
-
In MPFD Asciidoctor, the "Explanatory Notes and Guidance" clause is tagged with a `.guidance` role attribute,
|
|
149
|
-
and should be entered as a sibling clause to the standard clause it elaborates on:
|
|
150
|
-
|
|
151
|
-
[source,asciidoctor]
|
|
152
|
-
--
|
|
153
|
-
== Compliance Programme to Address Statutory Obligations
|
|
154
|
-
|
|
155
|
-
An approved trustee should have in place a compliance programme to help it meet its statutory obligations.
|
|
156
|
-
|
|
157
|
-
[.guidance]
|
|
158
|
-
== Explanatory Notes and Guidance
|
|
159
|
-
|
|
160
|
-
An approved trustee must comply with obligations under the Legislation, including the general trustee duties as well as specific requirements relating to the operation of MPF schemes.
|
|
161
|
-
--
|
|
162
|
-
|
|
163
|
-
This will be rendered as follows:
|
|
164
|
-
|
|
165
|
-
____
|
|
166
|
-
*1. Compliance Programme to Address Statutory Obligations*
|
|
167
|
-
|
|
168
|
-
An approved trustee should have in place a compliance programme to help it meet its statutory obligations.
|
|
169
|
-
|
|
170
|
-
_1E. Explanatory Notes and Guidance_
|
|
171
|
-
|
|
172
|
-
An approved trustee must comply with obligations under the Legislation, including the general trustee duties as well as specific requirements relating to the operation of MPF schemes.
|
|
173
|
-
____
|
|
174
|
-
|
|
175
|
-
=== Container clauses
|
|
176
|
-
|
|
177
|
-
MPFD docuemnts follow a hierarchically numbered clause structure. However, there are some floating titles
|
|
178
|
-
in MPFD which group clauses together, but are not numbered themselves. These are tagged in MPFD Asciidoctor
|
|
179
|
-
with a `.container` role attribute. When the gem numbers clauses, these containers are ignored.
|
|
180
|
-
|
|
181
|
-
[source,asciidoctor]
|
|
182
|
-
--
|
|
183
|
-
== MPFD Structure
|
|
184
|
-
|
|
185
|
-
[.container]
|
|
186
|
-
=== Benefits
|
|
187
|
-
|
|
188
|
-
==== Autonumbering
|
|
189
|
-
|
|
190
|
-
==== Automaated cross-references
|
|
191
|
-
|
|
192
|
-
[.container]
|
|
193
|
-
=== Challenges
|
|
194
|
-
|
|
195
|
-
==== No WYSIWYG
|
|
196
|
-
|
|
197
|
-
==== Command Line Interface
|
|
198
|
-
--
|
|
199
|
-
|
|
200
|
-
Without the `.container` tags, the foregoing example would be rendered in HTML as:
|
|
201
|
-
|
|
202
|
-
[source,html]
|
|
203
|
-
--
|
|
204
|
-
<h1>1. MPFD Structure</h1>
|
|
205
|
-
|
|
206
|
-
<h2>1.1. Benefits</h2>
|
|
207
|
-
|
|
208
|
-
<h3>1.1.1. Autonumbering</h3>
|
|
209
|
-
|
|
210
|
-
<h3>1.1.2. Automated cross-references</h3>
|
|
211
|
-
|
|
212
|
-
<h2>1.2. Challenges</h2>
|
|
213
|
-
|
|
214
|
-
<h3>1.2.1. No WYSIWYG</h3>
|
|
215
|
-
|
|
216
|
-
<h3>1.2.2. Command Line Interface</h3>
|
|
217
|
-
--
|
|
218
|
-
|
|
219
|
-
With the `.container` tags, the nesting of clauses is the same, but the container titles
|
|
220
|
-
are at the same level as their parent sections, and are ignored in numbering:
|
|
221
|
-
|
|
222
|
-
[source,html]
|
|
223
|
-
--
|
|
224
|
-
<h1>1. MPFD Structure</h1>
|
|
225
|
-
|
|
226
|
-
<h1>Benefits</h1>
|
|
227
|
-
|
|
228
|
-
<h3>1.1. Autonumbering</h3>
|
|
229
|
-
|
|
230
|
-
<h3>1.2. Automated cross-references</h3>
|
|
231
|
-
|
|
232
|
-
<h1>Challenges</h1>
|
|
233
|
-
|
|
234
|
-
<h3>1.3. No WYSIWYG</h3>
|
|
235
|
-
|
|
236
|
-
<h3>1.4. Command Line Interface</h3>
|
|
237
|
-
--
|
|
238
|
-
|
|
239
|
-
=== Paragraph numbering
|
|
240
|
-
|
|
241
|
-
Currently paragraph numbering at the terminal node level is implemented by giving the paragraph a blank section title,
|
|
242
|
-
at the appropriate nesting level, which makes it a separate subclause. with an inline clause number.
|
|
243
|
-
|
|
244
|
-
[source,asciidoctor]
|
|
245
|
-
--
|
|
246
|
-
[[clause1]]
|
|
247
|
-
== Relationship between MPF trustees and promoters
|
|
248
|
-
|
|
249
|
-
[[clause1-1]]
|
|
250
|
-
=== {blank}
|
|
251
|
-
|
|
252
|
-
The Authority imposes a number of conditions when approving applications to become an approved MPF trustee.
|
|
253
|
-
--
|
|
254
|
-
|
|
255
|
-
This is rendered as
|
|
256
|
-
|
|
257
|
-
[source,html]
|
|
258
|
-
--
|
|
259
|
-
<div id="clause1">
|
|
260
|
-
<h1>1.  Relationship between MPF trustees and promoters</h1>
|
|
261
|
-
<div id="clause1-1"><h2>1.1. </h2>
|
|
262
|
-
|
|
263
|
-
<p id="_">The Authority imposes a number of conditions when approving applications to become an approved MPF trustee.</p>
|
|
264
|
-
</div>
|
|
265
|
-
</div>
|
|
266
|
-
--
|
|
267
|
-
|
|
268
|
-
== Document Attributes
|
|
269
|
-
|
|
270
|
-
=== Common attributes
|
|
271
|
-
|
|
272
|
-
The gem relies on Asciidoctor document attributes to provide necessary
|
|
273
|
-
metadata about the document. The https://github.com/riboseinc/metanorma-standoc[metanorma-standoc]
|
|
274
|
-
gem documents the Asciidoctor document attributes common to all metanorma gems. These include:
|
|
275
|
-
|
|
276
|
-
`:edition:`:: The document edition
|
|
277
|
-
|
|
278
|
-
`:revdate:`:: The date the document was last updated
|
|
279
|
-
|
|
280
|
-
`:copyright-year:`:: The year which will be claimed as when the copyright for
|
|
281
|
-
the document was issued
|
|
282
|
-
|
|
283
|
-
`:title:`:: The main component of the English title of the document
|
|
284
|
-
(mandatory). (The first line of the AsciiDoc document, which contains the title
|
|
285
|
-
introduced with `=`, is ignored)
|
|
286
|
-
|
|
287
|
-
`:doctype:`:: The document type (see RSD deliverables: The different types of
|
|
288
|
-
MPFD publications) (mandatory).
|
|
289
|
-
|
|
290
|
-
`:status:`:: The document status; e.g. `published`, `draft`.
|
|
291
|
-
|
|
292
|
-
`:committee:`:: The name of the relevant authoring committee
|
|
293
|
-
`:committee-type:`:: The type of the relevant authoring committee
|
|
294
|
-
|
|
295
|
-
`:language:` :: The language of the document (only `en` for now) (mandatory)
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
The attribute `:draft:`, if present, includes review notes in the XML output;
|
|
299
|
-
these are otherwise suppressed.
|
|
300
80
|
|
|
301
81
|
== Data Models
|
|
302
82
|
|
|
303
83
|
The MPFD Document format is an instance of the
|
|
304
|
-
https://github.com/
|
|
84
|
+
https://github.com/metanorma/metanorma-model-standoc[StandardDocument model]. Details of
|
|
305
85
|
this general model can be found on its page.
|
|
306
86
|
|
|
307
87
|
== Examples
|
|
308
88
|
|
|
309
|
-
Sample documents are available at http://github.com/
|
|
89
|
+
Sample documents are available at http://github.com/metanorma/mpfd-documents/
|
data/appveyor.yml
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
version: '{build}'
|
|
2
|
+
|
|
3
|
+
environment:
|
|
4
|
+
matrix:
|
|
5
|
+
- RUBY_VERSION: 25
|
|
6
|
+
- RUBY_VERSION: 24
|
|
7
|
+
- RUBY_VERSION: 23
|
|
8
|
+
- RUBY_VERSION: _trunk
|
|
9
|
+
|
|
10
|
+
matrix:
|
|
11
|
+
allow_failures:
|
|
12
|
+
- RUBY_VERSION: _trunk
|
|
13
|
+
|
|
14
|
+
install:
|
|
15
|
+
- ps: . { iwr -useb https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/appveyor.ps1 } | iex
|
|
16
|
+
- refreshenv
|
|
17
|
+
|
|
18
|
+
build_script:
|
|
19
|
+
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
|
|
20
|
+
- bundle update
|
|
21
|
+
- bundle install
|
|
22
|
+
|
|
23
|
+
before_test:
|
|
24
|
+
- ruby -v
|
|
25
|
+
- gem -v
|
|
26
|
+
- bundle -v
|
|
27
|
+
|
|
28
|
+
test_script:
|
|
29
|
+
- bundle exec rake
|
|
30
|
+
|
|
@@ -156,9 +156,9 @@
|
|
|
156
156
|
<zeroOrMore>
|
|
157
157
|
<ref name="contact"/>
|
|
158
158
|
</zeroOrMore>
|
|
159
|
-
<
|
|
159
|
+
<zeroOrMore>
|
|
160
160
|
<ref name="uri"/>
|
|
161
|
-
</
|
|
161
|
+
</zeroOrMore>
|
|
162
162
|
</element>
|
|
163
163
|
</define>
|
|
164
164
|
<define name="fullname">
|
|
@@ -246,9 +246,9 @@
|
|
|
246
246
|
<optional>
|
|
247
247
|
<ref name="abbreviation"/>
|
|
248
248
|
</optional>
|
|
249
|
-
<
|
|
249
|
+
<zeroOrMore>
|
|
250
250
|
<ref name="uri"/>
|
|
251
|
-
</
|
|
251
|
+
</zeroOrMore>
|
|
252
252
|
<zeroOrMore>
|
|
253
253
|
<ref name="org-identifier"/>
|
|
254
254
|
</zeroOrMore>
|
|
@@ -469,12 +469,13 @@
|
|
|
469
469
|
<value>film</value>
|
|
470
470
|
<value>video</value>
|
|
471
471
|
<value>broadcast</value>
|
|
472
|
-
<value>
|
|
472
|
+
<value>graphic_work</value>
|
|
473
473
|
<value>music</value>
|
|
474
474
|
<value>patent</value>
|
|
475
475
|
<value>inbook</value>
|
|
476
476
|
<value>incollection</value>
|
|
477
477
|
<value>inproceedings</value>
|
|
478
|
+
<value>journal</value>
|
|
478
479
|
</choice>
|
|
479
480
|
</define>
|
|
480
481
|
<define name="BibliographicItem">
|
|
@@ -739,39 +740,44 @@
|
|
|
739
740
|
<element name="series">
|
|
740
741
|
<optional>
|
|
741
742
|
<attribute name="type">
|
|
742
|
-
<
|
|
743
|
-
<value>main</value>
|
|
744
|
-
<value>alt</value>
|
|
745
|
-
</choice>
|
|
743
|
+
<ref name="SeriesType"/>
|
|
746
744
|
</attribute>
|
|
747
745
|
</optional>
|
|
748
746
|
<choice>
|
|
749
|
-
<ref name="btitle"/>
|
|
750
747
|
<ref name="formattedref"/>
|
|
748
|
+
<group>
|
|
749
|
+
<ref name="btitle"/>
|
|
750
|
+
<optional>
|
|
751
|
+
<ref name="bplace"/>
|
|
752
|
+
</optional>
|
|
753
|
+
<optional>
|
|
754
|
+
<ref name="seriesorganization"/>
|
|
755
|
+
</optional>
|
|
756
|
+
<optional>
|
|
757
|
+
<ref name="abbreviation"/>
|
|
758
|
+
</optional>
|
|
759
|
+
<optional>
|
|
760
|
+
<ref name="seriesfrom"/>
|
|
761
|
+
</optional>
|
|
762
|
+
<optional>
|
|
763
|
+
<ref name="seriesto"/>
|
|
764
|
+
</optional>
|
|
765
|
+
<optional>
|
|
766
|
+
<ref name="seriesnumber"/>
|
|
767
|
+
</optional>
|
|
768
|
+
<optional>
|
|
769
|
+
<ref name="seriespartnumber"/>
|
|
770
|
+
</optional>
|
|
771
|
+
</group>
|
|
751
772
|
</choice>
|
|
752
|
-
<optional>
|
|
753
|
-
<ref name="bplace"/>
|
|
754
|
-
</optional>
|
|
755
|
-
<optional>
|
|
756
|
-
<ref name="seriesorganization"/>
|
|
757
|
-
</optional>
|
|
758
|
-
<optional>
|
|
759
|
-
<ref name="abbreviation"/>
|
|
760
|
-
</optional>
|
|
761
|
-
<optional>
|
|
762
|
-
<ref name="seriesfrom"/>
|
|
763
|
-
</optional>
|
|
764
|
-
<optional>
|
|
765
|
-
<ref name="seriesto"/>
|
|
766
|
-
</optional>
|
|
767
|
-
<optional>
|
|
768
|
-
<ref name="seriesnumber"/>
|
|
769
|
-
</optional>
|
|
770
|
-
<optional>
|
|
771
|
-
<ref name="seriespartnumber"/>
|
|
772
|
-
</optional>
|
|
773
773
|
</element>
|
|
774
774
|
</define>
|
|
775
|
+
<define name="SeriesType">
|
|
776
|
+
<choice>
|
|
777
|
+
<value>main</value>
|
|
778
|
+
<value>alt</value>
|
|
779
|
+
</choice>
|
|
780
|
+
</define>
|
|
775
781
|
<define name="seriesorganization">
|
|
776
782
|
<element name="organization">
|
|
777
783
|
<text/>
|
|
@@ -831,25 +837,29 @@
|
|
|
831
837
|
<ref name="ContributorInfo"/>
|
|
832
838
|
</element>
|
|
833
839
|
</define>
|
|
840
|
+
<define name="DocRelationType">
|
|
841
|
+
<choice>
|
|
842
|
+
<value>obsoletes</value>
|
|
843
|
+
<value>updates</value>
|
|
844
|
+
<value>updatedBy</value>
|
|
845
|
+
<value>complements</value>
|
|
846
|
+
<value>derivedFrom</value>
|
|
847
|
+
<value>translatedFrom</value>
|
|
848
|
+
<value>adoptedFrom</value>
|
|
849
|
+
<value>equivalent</value>
|
|
850
|
+
<value>identical</value>
|
|
851
|
+
<value>nonequivalent</value>
|
|
852
|
+
<value>includedIn</value>
|
|
853
|
+
<value>includes</value>
|
|
854
|
+
<value>instance</value>
|
|
855
|
+
<value>partOf</value>
|
|
856
|
+
<value>hasDraft</value>
|
|
857
|
+
</choice>
|
|
858
|
+
</define>
|
|
834
859
|
<define name="docrelation">
|
|
835
860
|
<element name="relation">
|
|
836
861
|
<attribute name="type">
|
|
837
|
-
<
|
|
838
|
-
<value>obsoletes</value>
|
|
839
|
-
<value>updates</value>
|
|
840
|
-
<value>updatedBy</value>
|
|
841
|
-
<value>complements</value>
|
|
842
|
-
<value>derivedFrom</value>
|
|
843
|
-
<value>translatedFrom</value>
|
|
844
|
-
<value>adoptedFrom</value>
|
|
845
|
-
<value>equivalent</value>
|
|
846
|
-
<value>identical</value>
|
|
847
|
-
<value>nonequivalent</value>
|
|
848
|
-
<value>includedIn</value>
|
|
849
|
-
<value>includes</value>
|
|
850
|
-
<value>instance</value>
|
|
851
|
-
<value>partOf</value>
|
|
852
|
-
</choice>
|
|
862
|
+
<ref name="DocRelationType"/>
|
|
853
863
|
</attribute>
|
|
854
864
|
<element name="bibitem">
|
|
855
865
|
<ref name="BibliographicItem"/>
|
|
@@ -861,9 +871,6 @@
|
|
|
861
871
|
</define>
|
|
862
872
|
<define name="version">
|
|
863
873
|
<element name="version">
|
|
864
|
-
<optional>
|
|
865
|
-
<ref name="vedition"/>
|
|
866
|
-
</optional>
|
|
867
874
|
<optional>
|
|
868
875
|
<ref name="revision-date"/>
|
|
869
876
|
</optional>
|
|
@@ -0,0 +1,157 @@
|
|
|
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
|
+
Presupposes isodoc.rnc, is included in it
|
|
5
|
+
include "isodoc.rnc" { }
|
|
6
|
+
-->
|
|
7
|
+
<define name="requirement">
|
|
8
|
+
<element name="requirement">
|
|
9
|
+
<ref name="RequirementType"/>
|
|
10
|
+
</element>
|
|
11
|
+
</define>
|
|
12
|
+
<define name="recommendation">
|
|
13
|
+
<element name="recommendation">
|
|
14
|
+
<ref name="RequirementType"/>
|
|
15
|
+
</element>
|
|
16
|
+
</define>
|
|
17
|
+
<define name="permission">
|
|
18
|
+
<element name="permission">
|
|
19
|
+
<ref name="RequirementType"/>
|
|
20
|
+
</element>
|
|
21
|
+
</define>
|
|
22
|
+
<define name="RequirementType">
|
|
23
|
+
<optional>
|
|
24
|
+
<attribute name="obligation">
|
|
25
|
+
<ref name="ObligationType"/>
|
|
26
|
+
</attribute>
|
|
27
|
+
</optional>
|
|
28
|
+
<attribute name="id">
|
|
29
|
+
<data type="ID"/>
|
|
30
|
+
</attribute>
|
|
31
|
+
<optional>
|
|
32
|
+
<attribute name="filename"/>
|
|
33
|
+
</optional>
|
|
34
|
+
<optional>
|
|
35
|
+
<ref name="reqtitle"/>
|
|
36
|
+
</optional>
|
|
37
|
+
<optional>
|
|
38
|
+
<ref name="label"/>
|
|
39
|
+
</optional>
|
|
40
|
+
<optional>
|
|
41
|
+
<ref name="subject"/>
|
|
42
|
+
</optional>
|
|
43
|
+
<optional>
|
|
44
|
+
<ref name="reqinherit"/>
|
|
45
|
+
</optional>
|
|
46
|
+
<zeroOrMore>
|
|
47
|
+
<ref name="classification"/>
|
|
48
|
+
</zeroOrMore>
|
|
49
|
+
<zeroOrMore>
|
|
50
|
+
<choice>
|
|
51
|
+
<ref name="measurementtarget"/>
|
|
52
|
+
<ref name="specification"/>
|
|
53
|
+
<ref name="verification"/>
|
|
54
|
+
<ref name="import"/>
|
|
55
|
+
<ref name="description"/>
|
|
56
|
+
</choice>
|
|
57
|
+
</zeroOrMore>
|
|
58
|
+
<optional>
|
|
59
|
+
<ref name="reqt_references"/>
|
|
60
|
+
</optional>
|
|
61
|
+
<zeroOrMore>
|
|
62
|
+
<choice>
|
|
63
|
+
<ref name="requirement"/>
|
|
64
|
+
<ref name="recommendation"/>
|
|
65
|
+
<ref name="permission"/>
|
|
66
|
+
</choice>
|
|
67
|
+
</zeroOrMore>
|
|
68
|
+
</define>
|
|
69
|
+
<define name="reqtitle">
|
|
70
|
+
<element name="title">
|
|
71
|
+
<ref name="FormattedString"/>
|
|
72
|
+
</element>
|
|
73
|
+
</define>
|
|
74
|
+
<define name="label">
|
|
75
|
+
<element name="label">
|
|
76
|
+
<text/>
|
|
77
|
+
</element>
|
|
78
|
+
</define>
|
|
79
|
+
<define name="subject">
|
|
80
|
+
<element name="subject">
|
|
81
|
+
<text/>
|
|
82
|
+
</element>
|
|
83
|
+
</define>
|
|
84
|
+
<define name="reqinherit">
|
|
85
|
+
<element name="subject">
|
|
86
|
+
<text/>
|
|
87
|
+
</element>
|
|
88
|
+
</define>
|
|
89
|
+
<define name="measurementtarget">
|
|
90
|
+
<element name="measurement-target">
|
|
91
|
+
<ref name="RequirementSubpart"/>
|
|
92
|
+
</element>
|
|
93
|
+
</define>
|
|
94
|
+
<define name="specification">
|
|
95
|
+
<element name="specification">
|
|
96
|
+
<ref name="RequirementSubpart"/>
|
|
97
|
+
</element>
|
|
98
|
+
</define>
|
|
99
|
+
<define name="verification">
|
|
100
|
+
<element name="verification">
|
|
101
|
+
<ref name="RequirementSubpart"/>
|
|
102
|
+
</element>
|
|
103
|
+
</define>
|
|
104
|
+
<define name="import">
|
|
105
|
+
<element name="import">
|
|
106
|
+
<ref name="RequirementSubpart"/>
|
|
107
|
+
</element>
|
|
108
|
+
</define>
|
|
109
|
+
<define name="description">
|
|
110
|
+
<element name="description">
|
|
111
|
+
<ref name="RequirementSubpart"/>
|
|
112
|
+
</element>
|
|
113
|
+
</define>
|
|
114
|
+
<define name="reqt_references">
|
|
115
|
+
<element name="references">
|
|
116
|
+
<oneOrMore>
|
|
117
|
+
<ref name="bibitem"/>
|
|
118
|
+
</oneOrMore>
|
|
119
|
+
</element>
|
|
120
|
+
</define>
|
|
121
|
+
<define name="RequirementSubpart">
|
|
122
|
+
<optional>
|
|
123
|
+
<attribute name="type"/>
|
|
124
|
+
</optional>
|
|
125
|
+
<optional>
|
|
126
|
+
<attribute name="exclude">
|
|
127
|
+
<data type="boolean"/>
|
|
128
|
+
</attribute>
|
|
129
|
+
</optional>
|
|
130
|
+
<oneOrMore>
|
|
131
|
+
<ref name="BasicBlock"/>
|
|
132
|
+
</oneOrMore>
|
|
133
|
+
</define>
|
|
134
|
+
<define name="ObligationType">
|
|
135
|
+
<choice>
|
|
136
|
+
<value>requirement</value>
|
|
137
|
+
<value>recommendation</value>
|
|
138
|
+
<value>permission</value>
|
|
139
|
+
</choice>
|
|
140
|
+
</define>
|
|
141
|
+
<define name="classification">
|
|
142
|
+
<element name="classification">
|
|
143
|
+
<ref name="classification_tag"/>
|
|
144
|
+
<ref name="classification_value"/>
|
|
145
|
+
</element>
|
|
146
|
+
</define>
|
|
147
|
+
<define name="classification_tag">
|
|
148
|
+
<element name="tag">
|
|
149
|
+
<text/>
|
|
150
|
+
</element>
|
|
151
|
+
</define>
|
|
152
|
+
<define name="classification_value">
|
|
153
|
+
<element name="value">
|
|
154
|
+
<text/>
|
|
155
|
+
</element>
|
|
156
|
+
</define>
|
|
157
|
+
</grammar>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
//TOC generation
|
|
3
3
|
$('#toc').toc({
|
|
4
|
-
'selectors':
|
|
4
|
+
'selectors': toclevel(), //elements to use as headings
|
|
5
5
|
'container': 'main', //element to find all selectors in
|
|
6
6
|
'smoothScrolling': true, //enable or disable smooth scrolling on click
|
|
7
7
|
'prefix': 'toc', //prefix for anchor tags and class names
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
//TOC generation
|
|
3
3
|
$('#toc').toc({
|
|
4
|
-
'selectors':
|
|
4
|
+
'selectors': toclevel(), //elements to use as headings
|
|
5
5
|
'container': 'main', //element to find all selectors in
|
|
6
6
|
'smoothScrolling': true, //enable or disable smooth scrolling on click
|
|
7
7
|
'prefix': 'toc', //prefix for anchor tags and class names
|
|
@@ -43,22 +43,11 @@ module IsoDoc
|
|
|
43
43
|
@meta = Metadata.new(lang, script, labels)
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
def
|
|
46
|
+
def googlefonts
|
|
47
47
|
<<~HEAD.freeze
|
|
48
|
-
<title>{{ doctitle }}</title>
|
|
49
|
-
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
|
50
|
-
|
|
51
|
-
<!--TOC script import-->
|
|
52
|
-
<script type="text/javascript" src="https://cdn.rawgit.com/jgallen23/toc/0.3.2/dist/toc.min.js"></script>
|
|
53
|
-
|
|
54
|
-
<!--Google fonts-->
|
|
55
48
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700" rel="stylesheet">
|
|
56
49
|
<link href="https://fonts.googleapis.com/css?family=Overpass:300,300i,600,900" rel="stylesheet">
|
|
57
50
|
<link href="https://fonts.googleapis.com/css?family=Titillium+Web:400,400i,700,700i" rel="stylesheet">
|
|
58
|
-
<!--Font awesome import for the link icon-->
|
|
59
|
-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/solid.css" integrity="sha384-v2Tw72dyUXeU3y4aM2Y0tBJQkGfplr39mxZqlTBDUZAb9BGoC40+rdFCG0m10lXk" crossorigin="anonymous">
|
|
60
|
-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/fontawesome.css" integrity="sha384-q3jl8XQu1OpdLgGFvNRnPdj5VIlCvgsDQTQB6owSOHWlAurxul7f+JpUOVdAiJ5P" crossorigin="anonymous">
|
|
61
|
-
<style class="anchorjs"></style>
|
|
62
51
|
HEAD
|
|
63
52
|
end
|
|
64
53
|
|
|
@@ -41,22 +41,11 @@ module IsoDoc
|
|
|
41
41
|
@meta = Metadata.new(lang, script, labels)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
-
def
|
|
44
|
+
def googlefonts()
|
|
45
45
|
<<~HEAD.freeze
|
|
46
|
-
<title>{{ doctitle }}</title>
|
|
47
|
-
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
|
48
|
-
|
|
49
|
-
<!--TOC script import-->
|
|
50
|
-
<script type="text/javascript" src="https://cdn.rawgit.com/jgallen23/toc/0.3.2/dist/toc.min.js"></script>
|
|
51
|
-
|
|
52
|
-
<!--Google fonts-->
|
|
53
46
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700" rel="stylesheet">
|
|
54
47
|
<link href="https://fonts.googleapis.com/css?family=Overpass:300,300i,600,900" rel="stylesheet">
|
|
55
48
|
<link href="https://fonts.googleapis.com/css?family=Titillium+Web:400,400i,700,700i" rel="stylesheet">
|
|
56
|
-
<!--Font awesome import for the link icon-->
|
|
57
|
-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/solid.css" integrity="sha384-v2Tw72dyUXeU3y4aM2Y0tBJQkGfplr39mxZqlTBDUZAb9BGoC40+rdFCG0m10lXk" crossorigin="anonymous">
|
|
58
|
-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/fontawesome.css" integrity="sha384-q3jl8XQu1OpdLgGFvNRnPdj5VIlCvgsDQTQB6owSOHWlAurxul7f+JpUOVdAiJ5P" crossorigin="anonymous">
|
|
59
|
-
<style class="anchorjs"></style>
|
|
60
49
|
HEAD
|
|
61
50
|
end
|
|
62
51
|
|
data/metanorma-mpfd.gemspec
CHANGED
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
|
15
15
|
This gem is in active development.
|
|
16
16
|
DESCRIPTION
|
|
17
17
|
|
|
18
|
-
spec.homepage = "https://github.com/
|
|
18
|
+
spec.homepage = "https://github.com/metanorma/metanorma-mpfd"
|
|
19
19
|
spec.license = "BSD-2-Clause"
|
|
20
20
|
|
|
21
21
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-mpfd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-04-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: asciidoctor
|
|
@@ -267,6 +267,7 @@ files:
|
|
|
267
267
|
- LICENSE
|
|
268
268
|
- README.adoc
|
|
269
269
|
- Rakefile
|
|
270
|
+
- appveyor.yml
|
|
270
271
|
- bin/console
|
|
271
272
|
- bin/manifest
|
|
272
273
|
- bin/rspec
|
|
@@ -277,6 +278,7 @@ files:
|
|
|
277
278
|
- lib/asciidoctor/mpfd/isodoc.rng
|
|
278
279
|
- lib/asciidoctor/mpfd/isostandard.rng
|
|
279
280
|
- lib/asciidoctor/mpfd/mpfd.rng
|
|
281
|
+
- lib/asciidoctor/mpfd/reqt.rng
|
|
280
282
|
- lib/asciidoctor/mpfd/section.rb
|
|
281
283
|
- lib/isodoc/mpfd/html/header.html
|
|
282
284
|
- lib/isodoc/mpfd/html/html_rsd_intro.html
|
|
@@ -303,7 +305,7 @@ files:
|
|
|
303
305
|
- lib/metanorma/mpfd/processor.rb
|
|
304
306
|
- lib/metanorma/mpfd/version.rb
|
|
305
307
|
- metanorma-mpfd.gemspec
|
|
306
|
-
homepage: https://github.com/
|
|
308
|
+
homepage: https://github.com/metanorma/metanorma-mpfd
|
|
307
309
|
licenses:
|
|
308
310
|
- BSD-2-Clause
|
|
309
311
|
metadata: {}
|