metanorma-ogc 0.0.6 → 0.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a77fd983398d390d95aa82f46e12ce33a86501f4238bedcdebe2dc149d1f0962
4
- data.tar.gz: 4f0b5aad19b3e6d8f5434d41328aa0d71a1df1a3b12dcd30a42232452be28c34
3
+ metadata.gz: eea51c0d090677e7d33baba438144ba8124e0013784531aad6157444eb64fe78
4
+ data.tar.gz: 7fda2b26713c8075c24307ec3db64547de91920540c88b64d029fbf40e59fb56
5
5
  SHA512:
6
- metadata.gz: 3c872166528dc90fefee0cf0e8af8f7bb5d9ffea093da95811eb6651655dc1e41e3a5e82f6a31d5f27bf6180f8b6466d96e0ad6a8c70658b6fb7ddfb9210efae
7
- data.tar.gz: 7eb9b45dc65701d0db400832eafca7b06e9cfecbd25f82c463a89f396ceb2e232795c3319ee1fc889c8ecf03e18483665e06f843d776b2911ae21fd0511dde91
6
+ metadata.gz: 9c2e579039e84e10a4f3d91ee1da183e220c1d4d337b6a3bdfb7032d2f706603fba5618b94f854ca6fbb076de01b014496f7f8e3500cbc7b9307542753b35867
7
+ data.tar.gz: 9e4d01426f51cbe26229d864578c1a2e24c6cdd3a04b3f6346abb6a5e90895d7698701f7cc4716b044d2b0ba96a55c0a65b8a552e77f6626eb88652da4d595cf
data/.travis.yml CHANGED
@@ -8,9 +8,9 @@ rvm:
8
8
  - ruby-head
9
9
  before_install:
10
10
  - gem install bundler -v 2.0.1
11
- - npm install -g puppeteer
12
- - npm install
13
- - unset _JAVA_OPTIONS
11
+ - travis_retry sudo apt-get update
12
+ - sudo bash -c "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
16
+
data/README.adoc CHANGED
@@ -1,8 +1,9 @@
1
1
  = metanorma-ogc: Metanorma processor for the Open Geospatial Consortium document class
2
2
 
3
3
  image:https://img.shields.io/gem/v/metanorma-ogc.svg["Gem Version", link="https://rubygems.org/gems/metanorma-ogc"]
4
- image:https://img.shields.io/travis/riboseinc/metanorma-ogc/master.svg["Build Status", link="https://travis-ci.com/riboseinc/metanorma-ogc"]
5
- image:https://codeclimate.com/github/riboseinc/metanorma-ogc/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/riboseinc/metanorma-ogc"]
4
+ image:https://img.shields.io/travis/metanorma/metanorma-ogc/master.svg["Build Status", link="https://travis-ci.com/metanorma/metanorma-ogc"]
5
+ image:https://ci.appveyor.com/api/projects/status/odgc3ltblokvd6e7?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/ribose/metanorma-ogc"]
6
+ image:https://codeclimate.com/github/metanorma/metanorma-ogc/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-ogc"]
6
7
 
7
8
  WARNING: This gem is still under development.
8
9
 
@@ -30,7 +31,7 @@ as end deliverable OGC documents.
30
31
 
31
32
  == Structure
32
33
 
33
- This gem inherits from the https://github.com/riboseinc/metanorma-standoc
34
+ This gem inherits from the https://github.com/metanorma/metanorma-standoc
34
35
  gem, and aligns closely to it.
35
36
 
36
37
 
@@ -38,13 +39,13 @@ gem, and aligns closely to it.
38
39
 
39
40
  Please see https://www.metanorma.com for instructions to get started.
40
41
 
41
- If you are using a Mac, the https://github.com/riboseinc/metanorma-macos-setup
42
+ If you are using a Mac, the https://github.com/metanorma/metanorma-macos-setup
42
43
  repository has instructions on setting up your machine to run Metanorma
43
44
  scripts such as this one. You need only run the following in a Terminal console:
44
45
 
45
46
  [source,console]
46
47
  ----
47
- $ bash <(curl -s https://raw.githubusercontent.com/riboseinc/metanorma-macos-setup/master/metanorma-setup)
48
+ $ bash <(curl -s https://raw.githubusercontent.com/metanorma/metanorma-macos-setup/master/metanorma-setup)
48
49
  $ gem install metanorma-cli
49
50
  $ gem install metanorma-ogc
50
51
  ----
@@ -79,241 +80,9 @@ if you do not get expected results, try bracketing terms your in AsciiMathML
79
80
  expressions.
80
81
  ////
81
82
 
83
+ == Documentation
82
84
 
83
- == Approach
84
-
85
- === Document model
86
-
87
- The OGC document model is detailed here:
88
-
89
- * https://github.com/riboseinc/metanorma-model-ogc[OGC document model]
90
-
91
- It is an instance of the
92
- https://github.com/riboseinc/metanorma-model-standoc[StandardDocument model].
93
-
94
-
95
- === Document input
96
-
97
- Document input to Metanorma is for the compilation of content into the
98
- Metanorma XML document.
99
-
100
- The Metanorma-OGC processor supports AsciiDoc input.
101
-
102
- AsciiDoc is selected has been selected as the authoring tool to generate the document
103
- model representation of OGC standards.
104
-
105
- Similar to Markdown, AsciiDoc is a lightweight markup format, but
106
- combines the rigor and expressivity of DocBook.
107
- A number of editors (through plugins) support preview of AsciiDoc files,
108
- so textual content can be previewed without running the Metanorma toolchain.
109
-
110
- The Metanorma processor automates numbering of headings, figures,
111
- tables etc, automatically generates references and citations,
112
- and the resulting output presentations.
113
-
114
- NOTE: The Asciidoctor gem is used for AsciiDoc input parsing.
115
-
116
-
117
- == Document attributes
118
-
119
- === Common attributes
120
-
121
- Metadata of the document is provided through AsciiDoc document attributes.
122
-
123
- https://github.com/riboseinc/metanorma-standoc[Metanorma-Standoc]
124
- documents all common Metanorma document attributes.
125
- Where these preexisting metanorma attributes correspond to attributes already used
126
- by OGC in their Asciidoctor template, they are treated as synonyms of the Metanorma
127
- attributes. The attributes relevant to OGC documents include:
128
-
129
- `:edition:`:: The document version; e.g. `2.0`.
130
-
131
- `:revdate:`:: The date the document was last updated.
132
-
133
- `:copyright-year:` (OGC: `:copyrightYear`):: The year which will be claimed as when the copyright for
134
- the document was issued.
135
-
136
- `:title:`:: The main component of the English title of the document
137
- (mandatory). (The first line of the AsciiDoc document, which contains the title
138
- introduced with `=`, is ignored)
139
-
140
- `:doctype:`:: The document type (mandatory). The permitted types are:
141
- +
142
- --
143
- * Standards
144
- `standard`::: Implementation Standard
145
- `standard-with-suite`::: Implementation Standard with Compliance Suite
146
- `abstract-specification`::: Abstract Specification
147
- `community-standard`::: Community Standard
148
- `profile`::: Profile / Application Profile
149
- `best-practice`::: Best Practices Document
150
-
151
- * Other
152
- `engineering-report`::: Engineering Report
153
- `discussion-paper`::: Discussion Paper
154
- `reference-model`::: OGC Reference Model
155
- `user-guide`::: User Guide
156
- `policy`::: OGC Policy Document
157
- `guide`::: Guide
158
- `amendment`::: Technical Amendment
159
- `technical-corrigendum`::: Corrigendum (errata) Changes to OGC Standards
160
- `administrative`::: Internal administrative documents
161
- --
162
-
163
- `:status:`:: Document status/stage. The permitted types are:
164
- +
165
- `rfc`::: OGC RFC (proposal)
166
- `candidate`::: Candidate Standard
167
- `published`::: Published
168
- `deprecated`::: Deprecated
169
- `retired`::: Retired
170
-
171
- `:committee:`:: The name of the relevant committee producing the document (mandatory). The legal values are:
172
- `technical`, `planning`, `strategic-member-advisory`
173
- `:subcommittee:`:: The name of the relevant subcommittee producing the document
174
- `:workgroup:` (OGC: `:workingGroup:`):: The name of the relevant working group producing the document (mandatory)
175
-
176
- `:language:`:: The language of the document (e.g. `en`) (mandatory)
177
-
178
- `:published-date:` (OGC: `:publicationDate:`):: The publication date for the document.
179
- `:issued-date:` (OGC: `:approvalDate:`):: The approval date for the document.
180
- `:created-date:`:: The creation date for the document.
181
- `:received-date:` (OGC: `:submissionDate:`):: The date at which the document was submitted to the standards body.
182
-
183
- `:uri:`:: The URI to which this standard is published.
184
- `:xml-uri:`:: The URI for the Metanorma XML as which this standard is published.
185
- `:pdf-uri:`:: The URI for the PDF as which this standard is published.
186
- `:doc-uri:`:: The URI for the DOC as which this standard is published.
187
- `:docnumber:` (OGC: `docReference`):: The internal identifier referring to this document.
188
-
189
- `:draft:`:: If present, review notes are included in the
190
- Metanorma XML output; otherwise they are suppressed.
191
-
192
-
193
- === OGC-specific attributes
194
-
195
- The following document attributes are specific to this document class:
196
-
197
- `:external-id:`:: The external identifier referring to this document.
198
- `:referenceURLID:`:: The identifier embedded into a document type-specific
199
- external URL.
200
- `:previous-uri:`:: URI of previous version of the document.
201
- `:subcommittee-type:`:: The type of the relevant subcommittee producing the document
202
- `:subcommittee-number:`:: The number of the relevant subcommittee producing the document
203
- `:workgroup-type:`:: The type of the relevant workgroup producing the document
204
- `:workgroup-number:`:: The number of the relevant workgroup producing the document
205
-
206
- `:keywords:`:: Comma-delimited list of the keywords associated with the document.
207
- `:submitting-organizations:`:: Semicolon-delimited list of the submitting organisations
208
- for this document. (The organisation names themselves may contain commas; e.g.
209
- `University of Calgary, Canada; National Central University, Taiwan`.
210
-
211
- `:fullname{_i}:`:: The full name of a person who is a contributor to the document.
212
- A second person is indicated by using a numeric suffix: `:fullname:`, `:fullname_2:`, `fullname_3:`, &c.
213
-
214
- `:surname{_i}:`:: The surname of a person who is a contributor to the document.
215
- `:givenname{_i}:`:: The given name(s) of a person who is a contributor to the document.
216
- `:role{_i}:`:: The role of a a person who is a contributor to the document. By default,
217
- they are coded as an `editor`; they can also be represented as an `author`.
218
-
219
- OGC `:editor:`:: corresponds to `:fullname:` with `role` = "editor"
220
-
221
- == Asciidoctor features specific to OGC
222
-
223
- The https://github.com/riboseinc/metanorma-standoc[metanorma-standoc]
224
- gem documents the customisations of Asciidoctor markup common to all metanorma gems.
225
- The following markup is specific to this gem:
226
-
227
- === Section names
228
-
229
- The Normative References section may be named just "References", reflecting OGC practice.
230
-
231
- === Preliminary elements
232
-
233
- The following clauses are preliminary elements, and are moved into the frontispiece
234
- of the document (in Metanorma, the document preface):
235
-
236
- * Abstract
237
- * Keywords
238
- * Preface
239
- * Submitting Organizations
240
- * Submitters
241
-
242
- The abstract is recognised as the first clause with an `abstract` style attribute:
243
-
244
- [source,asciidoc]
245
- ----
246
- [abstract]
247
- == Abstract
248
-
249
- xxx
250
- ----
251
-
252
- The preface is recognised as the text between the Asciidoctor document attributes and
253
- the first Asciidoctor section title; it must not be given a section title of its own.
254
-
255
- [source,asciidoc]
256
- ----
257
- :received-date: 2019-01-01
258
-
259
- .Preface
260
-
261
- preface text
262
-
263
- === Submitters
264
- ----
265
-
266
- Keywords and Submitting Organizations consist of lists. They are treated as document metadata,
267
- and are entered as a document attribute.
268
- The prefatory text introducing them is added automatically.
269
-
270
- Submitters are treated as a table, contained in a section with the title `Submitters`:
271
-
272
- [source,asciidoc]
273
- ----
274
- === Submitters
275
-
276
- |===
277
- |Name |Representing |OGC member
278
-
279
- |Steve Liang | University of Calgary, Canada / SensorUp Inc. | Yes
280
- |===
281
- ----
282
-
283
- === Examples
284
-
285
- Unlike the normal case in Metanorma, examples can have captions:
286
-
287
- [source,asciidoc]
288
- ----
289
- [example]
290
- .Example caption
291
- ====
292
- Text
293
- ====
294
- ----
295
-
296
- === Recommendations, requirements, and permissions
297
-
298
- Distinct recommendations, requirements and permissions are recognised in Metanorma
299
- Asciidoctor as tables whose first cell contains the text _Recommendation_, _Requirement_, _Permission_,
300
- optionally followed by a number (which is ignored in parsing; the elements are renumberd
301
- automatically in rendering.) These are currently constituted of two elements: an internal
302
- label, which is parsed as the first paragraph of the second table cell, and the body of
303
- the recommendation etc., which is parsed as the remainder of the second table cell.
304
-
305
- [source,asciidoc]
306
- ----
307
- [[recommendation1]]
308
- |===
309
- |Recommendation |/ogc/recommendation/wfs/2 +
310
-
311
- If the API definition document uses the OpenAPI Specification 3.0,
312
- the document SHOULD conform to the
313
- <<rc_oas30,OpenAPI Specification 3.0 requirements class>>.
314
- |===
315
- ----
316
-
85
+ See https://www.metanorma.com/author/ogc/[Write Open Geospatial Consortium documents with Metanorma]
317
86
 
318
87
  == Examples
319
88
 
data/README.adoc.old ADDED
@@ -0,0 +1,187 @@
1
+ = metanorma-ogc: Asciidoctor processor for Open Geospatial Consortium documents
2
+
3
+ image:https://img.shields.io/gem/v/metanorma-ogc.svg["Gem Version", link="https://rubygems.org/gems/metanorma-ogc"]
4
+ image:https://img.shields.io/travis/riboseinc/metanorma-ogc/master.svg["Build Status", link="https://travis-ci.com/riboseinc/metanorma-ogc"]
5
+ image:https://codeclimate.com/github/riboseinc/metanorma-ogc/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/riboseinc/metanorma-ogc"]
6
+
7
+ WARNING: This gem is still under development.
8
+
9
+ == Functionality
10
+
11
+ This gem processes documents following a template for generating OGC documents.
12
+ For http://asciidoctor.org/[Asciidoctor] input, the Metanorma toolchain uses the Asciidoctor gem as its parser.
13
+
14
+ The gem currently inherits from the https://github.com/riboseinc/metanorma-standoc
15
+ gem, and aligns closely to it. Refer to the ISO gem documentation
16
+ for guidance, including https://github.com/riboseinc/metanorma-iso/wiki/Guidance-for-authoring
17
+
18
+ The following outputs are generated.
19
+
20
+ * an XML representation of the document, intended as a document model for OGC documents.
21
+ * The XML representation is processed in turn to generate the following outputs
22
+ as end deliverable OGC documents.
23
+ ** HTML
24
+ ** http://asciimath.org[AsciiMathML] is to be used for mathematical formatting.
25
+ The gem uses the https://github.com/asciidoctor/asciimath[Ruby AsciiMath parser],
26
+ which is syntactically stricter than the common MathJax processor;
27
+ if you do not get expected results, try bracketing terms your in AsciiMathML
28
+ expressions.
29
+
30
+ == Usage
31
+
32
+ The preferred way to invoke this gem is via the `metanorma` script:
33
+
34
+ [source,console]
35
+ ----
36
+ $ metanorma --type ogc a.adoc # output HTML
37
+ $ metanorma --type ogc --extensions html a.adoc # output just HTML
38
+ $ metanorma --type ogc --extensions xml a.adoc # output RSD XML
39
+ ----
40
+
41
+ The gem translates the document into Metanorma XML format, and then
42
+ validates its output against the Metanorma XML document model; errors are
43
+ reported to console against the XML, and are intended for users to
44
+ check that they have provided all necessary components of the
45
+ document.
46
+
47
+ The gem then converts the XML into HTML.
48
+
49
+ The gem can also be invoked directly within asciidoctor, though this is deprecated:
50
+
51
+ [source,console]
52
+ ----
53
+ $ asciidoctor -b ogc -r 'metanorma-ogc' a.adoc
54
+ ----
55
+
56
+ === Installation
57
+
58
+ If you are using a Mac, the https://github.com/riboseinc/metanorma-macos-setup
59
+ repository has instructions on setting up your machine to run Metanorma
60
+ scripts such as this one. You need only run the following in a Terminal console:
61
+
62
+ [source,console]
63
+ ----
64
+ $ bash <(curl -s https://raw.githubusercontent.com/riboseinc/metanorma-macos-setup/master/metanorma-setup)
65
+ $ gem install metanorma-ogc
66
+ $ gem install metanorma-cli
67
+ ----
68
+
69
+ == Approach
70
+
71
+ === Document model
72
+
73
+ The OGC Document model used by this gem is an instance of the
74
+ https://github.com/riboseinc/isodoc-models[StandardDocument model].
75
+
76
+ The Metanorma XML format intends to introduce rigor into the OGC
77
+ standards authoring process, and is prescribed in a separate document.
78
+
79
+ === Asciidoctor
80
+
81
+ Asciidoctor has been selected as the authoring tool to generate the document
82
+ model representation of OGC standards. It is a document formatting tool like
83
+ Markdown and DocBook, which combines the relative ease of use of the former
84
+ (using relatively lightweight markup), and the rigor and expressively of the
85
+ latter (it has a well-defined syntax, and was in fact initially developed as a
86
+ DocBook document authoring tool). Asciidoctor has built-in capability to output
87
+ Text, DocBook and HTML; so it can be used to preview the file as it is being
88
+ autA
89
+
90
+ Generating documents via a document model substantially automated formatting
91
+ associated with the document, including automating numbering of headings, figures,
92
+ tables etc, and automatically generating references and citations.
93
+ hored.
94
+
95
+ == Document Attributes
96
+
97
+ === Common attributes
98
+
99
+ The gem relies on Asciidoctor document attributes to provide necessary
100
+ metadata about the document. The https://github.com/riboseinc/metanorma-standoc[metanorma-standoc]
101
+ gem documents the Asciidoctor document attributes common to all metanorma gems.
102
+ Where these preexisting metanorma attributes correspond to attributes already used
103
+ by OGC in their Asciidoctor template, they are treated as synonyms of the Metanorma
104
+ attributes. These include:
105
+
106
+ `:edition:`:: The document version; e.g. `2.0`.
107
+
108
+ `:revdate:`:: The date the document was last updated
109
+
110
+ `:copyright-year:`:: The year which will be claimed as when the copyright for
111
+ the document was issued
112
+
113
+ `:title:`:: The main component of the English title of the document
114
+ (mandatory). (The first line of the AsciiDoc document, which contains the title
115
+ introduced with `=`, is ignored)
116
+
117
+ `:doctype:`:: The document type (mandatory). The permitted types are:
118
+ +
119
+ --
120
+ * Standards
121
+ implementation-standard::: Implementation Standard (with or without Compliance Suite)
122
+ abstract-specification::: Abstract Specification (with or without Compliance Suite)
123
+ community-standard::: Community Standard (with or without Compliance Suite)
124
+ profile::: Profile (with or without Compliance Suite)
125
+ best-practices::: Best Practices Document
126
+ * Other
127
+ engineering-report::: Engineering Report
128
+ discussion-paper::: Discussion Paper
129
+ white-paper::: White Paper
130
+ user-guide::: User Guide
131
+ policy-directive::: Technical Committee Policy Directive
132
+ informative::: Informative
133
+ --
134
+
135
+ `:status:``:: The document status. The permitted types are:
136
+
137
+ * SWG Work
138
+ * OAB Review
139
+ * OGC-NA Review
140
+ * Public Review
141
+ * Prepare for Approval
142
+ * TC Approval to Vote
143
+ * TC Vote
144
+ * PC Vote
145
+ * Published
146
+
147
+ `:committee:` (OGC: `:workingGroup:`):: The name of the relevant committee (mandatory)
148
+
149
+ `:language:` :: The language of the document (only `en` for now) (mandatory)
150
+
151
+ `:published-date` (OGC: `:publicationDate:`):: The publication date for the document.
152
+ `:issued-date` (OGC: `:approvalDate:`):: The approval date for the document.
153
+ `:created-date`:: The creation date for the document.
154
+ `:submitted-date` (OGC: `:submissionDate:`):: The date at which the document was submitted to the standards body.
155
+
156
+ `:uri:`:: The URI to which this standard is published.
157
+ `:docnumber:` (OGC: `docReference`):: The internal identifier referring to this document.
158
+
159
+ The attribute `:draft:`, if present, includes review notes in the XML output;
160
+ these are otherwise suppressed.
161
+
162
+ == Asciidoctor features specific to OGC
163
+
164
+ The https://github.com/riboseinc/metanorma-standoc[metanorma-standoc]
165
+ gem documents the customisations of Asciidoctor markup common to all metanorma gems.
166
+ The following markup is specific to this gem:
167
+
168
+ `:external-id:`:: The external identifier referring to this document.
169
+ `:referenceURLID:`:: The identifier embedded into a document type-specific
170
+ external URL.
171
+
172
+ `:fullname{_i}`:: The full name of a person who is a contributor to the document.
173
+ A second person is indicated by using a numeric suffix: `:fullname`, `:fullname_2`, `fullname_3`, &c.
174
+
175
+ `:surname{_i}`:: The surname of a person who is a contributor to the document.
176
+ `:givenname{_i}`:: The given name(s) of a person who is a contributor to the document.
177
+ `:role{_i}`:: The role of a a person who is a contributor to the document. By default,
178
+ they are coded as an `editor`; they can also be represented as an `author`.
179
+
180
+ OGC `:editor:`:: corresponds to `:fullname:` with `role` = "editor"
181
+
182
+ == Examples
183
+
184
+ * link:spec/examples/rfc6350.adoc[] is an Metanorma Asciidoctor version of https://tools.ietf.org/html/rfc6350[RFC 6350].
185
+ * link:spec/examples/rfc6350.html[] is an HTML file generated from the Asciidoctor.
186
+ * link:spec/examples/rfc6350.doc[] is a Word document generated from the Asciidoctor.
187
+
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
- <optional>
159
+ <zeroOrMore>
160
160
  <ref name="uri"/>
161
- </optional>
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
- <optional>
249
+ <zeroOrMore>
250
250
  <ref name="uri"/>
251
- </optional>
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>graphic work</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
- <choice>
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
- <choice>
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>
@@ -29,7 +29,7 @@ module Asciidoctor
29
29
  result << "</ogc-standard>"
30
30
  result = textcleanup(result)
31
31
  ret1 = cleanup(Nokogiri::XML(result))
32
- validate(ret1)
32
+ validate(ret1) unless @novalid
33
33
  ret1.root.add_namespace(nil, Metanorma::Ogc::DOCUMENT_NAMESPACE)
34
34
  ret1
35
35
  end
@@ -18,6 +18,7 @@
18
18
  of this.
19
19
  -->
20
20
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
21
+ <include href="reqt.rng"/>
21
22
  <include href="biblio.rng">
22
23
  <define name="status">
23
24
  <element name="status">
@@ -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>
@@ -143,17 +143,12 @@
143
143
 
144
144
  <div class="info-section">
145
145
  <div class="copyright">
146
+ <p><b>Copyright notice</b></p>
146
147
  <p class="year">
147
- &copy; {{ docyear }} Open Geospatial Consortium
148
+ Copyright &copy; {{ docyear }} Open Geospatial Consortium
148
149
  </p>
149
150
 
150
151
  <p class="message">
151
- All rights reserved. Unless otherwise specified, no part of this
152
- publication may be reproduced or utilized otherwise in any form or by any
153
- means, electronic or mechanical, including photocopying, or posting on the
154
- internet or an intranet, without prior written permission. Permission can
155
- be requested from the address below.
156
-
157
152
  To obtain additional rights of use, visit <a href="http://www.opengeospatial.org/legal/">http://www.opengeospatial.org/legal/</a>.
158
153
  </p>
159
154
 
@@ -1,7 +1,7 @@
1
1
  <script>
2
2
  //TOC generation
3
3
  $('#toc').toc({
4
- 'selectors': 'h1,h2:not(.TermNum)', //elements to use as headings
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': 'h1,h2:not(.TermNum)', //elements to use as headings
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
@@ -37,22 +37,11 @@ module IsoDoc
37
37
  @meta = Metadata.new(lang, script, labels)
38
38
  end
39
39
 
40
- def html_head
40
+ def googlefonts
41
41
  <<~HEAD.freeze
42
- <title>{{ doctitle }}</title>
43
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
44
-
45
- <!--TOC script import-->
46
- <script type="text/javascript" src="https://cdn.rawgit.com/jgallen23/toc/0.3.2/dist/toc.min.js"></script>
47
-
48
- <!--Google fonts-->
49
42
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700" rel="stylesheet" />
50
43
  <link href="https://fonts.googleapis.com/css?family=Teko:300,400,500" rel="stylesheet">
51
44
  <link href="https://fonts.googleapis.com/css?family=Overpass:300,300i,600,900" rel="stylesheet">
52
- <!--Font awesome import for the link icon-->
53
- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/solid.css" integrity="sha384-rdyFrfAIC05c5ph7BKz3l5NG5yEottvO/DQ0dCrwD8gzeQDjYBHNr1ucUpQuljos" crossorigin="anonymous">
54
- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/fontawesome.css" integrity="sha384-u5J7JghGz0qUrmEsWzBQkfvc8nK3fUT7DCaQzNQ+q4oEXhGSx+P2OqjWsfIRB8QT" crossorigin="anonymous">
55
- <style class="anchorjs"></style>
56
45
  HEAD
57
46
  end
58
47
 
@@ -35,22 +35,11 @@ module IsoDoc
35
35
  @meta = Metadata.new(lang, script, labels)
36
36
  end
37
37
 
38
- def html_head()
38
+ def googlefonts()
39
39
  <<~HEAD.freeze
40
- <title>{{ doctitle }}</title>
41
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
42
-
43
- <!--TOC script import-->
44
- <script type="text/javascript" src="https://cdn.rawgit.com/jgallen23/toc/0.3.2/dist/toc.min.js"></script>
45
-
46
- <!--Google fonts-->
47
40
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700" rel="stylesheet" />
48
41
  <link href="https://fonts.googleapis.com/css?family=Overpass:300,300i,600,900" rel="stylesheet" />
49
42
  <link href="https://fonts.googleapis.com/css?family=Teko:300,400,500" rel="stylesheet">
50
- <!--Font awesome import for the link icon-->
51
- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/solid.css" integrity="sha384-rdyFrfAIC05c5ph7BKz3l5NG5yEottvO/DQ0dCrwD8gzeQDjYBHNr1ucUpQuljos" crossorigin="anonymous">
52
- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/fontawesome.css" integrity="sha384-u5J7JghGz0qUrmEsWzBQkfvc8nK3fUT7DCaQzNQ+q4oEXhGSx+P2OqjWsfIRB8QT" crossorigin="anonymous">
53
- <style class="anchorjs"></style>
54
43
  HEAD
55
44
  end
56
45
 
@@ -58,9 +58,9 @@ module IsoDoc
58
58
  end
59
59
  =end
60
60
 
61
- def insert_toc(intro, docxml)
61
+ def insert_toc(intro, docxml, level)
62
62
  toc = ""
63
- toc += make_WordToC(docxml)
63
+ toc += make_WordToC(docxml, level)
64
64
  if docxml.at("//p[@class = 'TableTitle']")
65
65
  toc += %{<p class="TOCTitle">List of Tables</p>}
66
66
  toc += make_TableWordToC(docxml)
@@ -132,18 +132,6 @@ module IsoDoc
132
132
  %{\\1#{WORD_TOC_RECOMMENDATION_PREFACE1}}) + WORD_TOC_SUFFIX1
133
133
  end
134
134
 
135
- def make_WordToC(docxml)
136
- toc = ""
137
- docxml.xpath("//h1[not(ancestor::*[@class = 'WordSection2'])] |"\
138
- "//h1[contains(., 'Executive Summary')] |"\
139
- "//h2[not(ancestor::*[@class = 'WordSection2'])] |"\
140
- "//h3[not(ancestor::*[@class = 'WordSection2'])]").each do |h|
141
- toc += word_toc_entry(h.name[1].to_i, header_strip(h))
142
- end
143
- toc.sub(/(<p class="MsoToc1">)/,
144
- %{\\1#{WORD_TOC_PREFACE1}}) + WORD_TOC_SUFFIX1
145
- end
146
-
147
135
  def annex_name(annex, name, div)
148
136
  div.h1 **{ class: "Annex" } do |t|
149
137
  t << "#{get_anchors[annex['id']][:label]} "
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  Metanorma for the Open Geospatial Consortium.
14
14
  DESCRIPTION
15
15
 
16
- spec.homepage = "https://github.com/riboseinc/metanorma-ogc"
16
+ spec.homepage = "https://github.com/metanorma/metanorma-ogc"
17
17
  spec.license = "BSD-2-Clause"
18
18
 
19
19
  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-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
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-02-25 00:00:00.000000000 Z
11
+ date: 2019-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -279,7 +279,9 @@ files:
279
279
  - Gemfile
280
280
  - LICENSE
281
281
  - README.adoc
282
+ - README.adoc.old
282
283
  - Rakefile
284
+ - appveyor.yml
283
285
  - bin/console
284
286
  - bin/rspec
285
287
  - bin/setup
@@ -290,6 +292,7 @@ files:
290
292
  - lib/asciidoctor/ogc/isodoc.rng
291
293
  - lib/asciidoctor/ogc/isostandard.rng
292
294
  - lib/asciidoctor/ogc/ogc.rng
295
+ - lib/asciidoctor/ogc/reqt.rng
293
296
  - lib/isodoc/ogc.rb
294
297
  - lib/isodoc/ogc/html/header.html
295
298
  - lib/isodoc/ogc/html/html_ogc_intro.html
@@ -311,7 +314,7 @@ files:
311
314
  - lib/metanorma/ogc/processor.rb
312
315
  - lib/metanorma/ogc/version.rb
313
316
  - metanorma-ogc.gemspec
314
- homepage: https://github.com/riboseinc/metanorma-ogc
317
+ homepage: https://github.com/metanorma/metanorma-ogc
315
318
  licenses:
316
319
  - BSD-2-Clause
317
320
  metadata: {}