metanorma-gb 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 855b2e263e1e3ce0fd6b01c5a957258d946d32ca4c8c82e1063273623238c91d
4
- data.tar.gz: 4b89c14b7a504a6152865aadf223fea4652d93ff3da642b8a61e84586d206ef5
3
+ metadata.gz: 4b188cd8949516d5a329e9359dffc4d2d4435093d0828eee08fccb1b4f2fd56f
4
+ data.tar.gz: dd5f07e29f3929c69cc2eb14f7302caafee0b949f7a847a781f185bcd1aabafa
5
5
  SHA512:
6
- metadata.gz: 42276795f4c0f2899699b7a2eab5ca2d5d1357d4808c485ce35d04538becc1c6d2fb7d2b53e91a9a8a470726f069c4c690287345cfbdfa5dd657dfa31f71f8b6
7
- data.tar.gz: 567eb01aa9b26dce3ad5ad3b431429e5a2ee069f628825aab3f5a38e7f2ac904df66beaca28ef8ff6623369b688b24c8eecef362daa5ed46f5162d33bd4024ea
6
+ metadata.gz: f6e44b4c312a86af41d5a1a4ab4f5da0ee1e5d6ea68ee5b45d73b2d4911d085d2b2b5cf05c02ae6b15019554b97fb6eaf96e5c002a5e152b4ef5aee56237b6a9
7
+ data.tar.gz: f954252119693d800bcf4eca0f475f4bed5ef6b514da40972f591dae5d594f6f21b8e3216d7caa590b1c0a290aaa573a10f0d92919a4af35af6d251c6c110f14
data/README.adoc CHANGED
@@ -1,8 +1,9 @@
1
1
  = metanorma-gb: Authoring Chinese standards (GuoBiao, sector...) in AsciiDoc
2
2
 
3
3
  image:https://img.shields.io/gem/v/metanorma-gb.svg["Gem Version", link="https://rubygems.org/gems/metanorma-gb"]
4
- image:https://img.shields.io/travis/riboseinc/metanorma-gb/master.svg["Build Status", link="https://travis-ci.org/riboseinc/metanorma-gb"]
5
- image:https://codeclimate.com/github/riboseinc/metanorma-gb/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/riboseinc/metanorma-gb"]
4
+ image:https://img.shields.io/travis/metanorma/metanorma-gb/master.svg["Build Status", link="https://travis-ci.org/metanorma/metanorma-gb"]
5
+ image:https://ci.appveyor.com/api/projects/status/7i4umln73wqv88vh?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/ribose/metanorma-gb"]
6
+ image:https://codeclimate.com/github/metanorma/metanorma-gb/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-gb"]
6
7
 
7
8
  == Functionality
8
9
 
@@ -10,17 +11,17 @@ This gem generates
10
11
  https://en.wikipedia.org/wiki/Guobiao_standards[Guobiao standards]
11
12
  (Chinese national standards), using AsciiDoc.
12
13
 
13
- This gem implements the https://github.com/riboseinc/gbdoc[GbDoc] data model,
14
+ This gem implements the https://github.com/metanorma/metanorma-model-gb[GbDoc] data model,
14
15
  which inherits from
15
- https://github.com/riboseinc/isodoc-models[IsoDoc and StandardDocument].
16
+ https://github.com/metanorma/metanorma-model-standoc[StandardDocument document model].
16
17
 
17
18
  The code of this gem inherits from
18
- https://github.com/riboseinc/metanorma-iso[metanorma-iso], a gem used to
19
+ https://github.com/metanorma/metanorma-iso[metanorma-iso], a gem used to
19
20
  generate ISO standards using Asciidoc.
20
21
 
21
22
  The two standards formats are closely aligned. Refer to the ISO gem
22
23
  for guidance, including
23
- https://github.com/riboseinc/metanorma-iso/wiki/Guidance-for-authoring[IsoDoc: Guidance for authoring]
24
+ https://github.com/metanorma/metanorma-iso/wiki/Guidance-for-authoring[IsoDoc: Guidance for authoring]
24
25
 
25
26
  The gem can also be used to generate Chinese local or sector standards, which
26
27
  have the same format; the gem formats the title page to have the correct
@@ -75,286 +76,18 @@ $ asciidoctor -b gb -r 'metanorma-gb' a.adoc
75
76
 
76
77
  === Installation
77
78
 
78
- If you are using a Mac, the https://github.com/riboseinc/metanorma-macos-setup
79
+ If you are using a Mac, the https://github.com/metanorma/metanorma-macos-setup
79
80
  repository has instructions on setting up your machine to run Metanorma
80
81
  scripts such as this one. You need only run the following in a Terminal console:
81
82
 
82
83
  [source,console]
83
84
  ----
84
- $ bash <(curl -s https://raw.githubusercontent.com/riboseinc/metanorma-macos-setup/master/metanorma-setup)
85
+ $ bash <(curl -s https://raw.githubusercontent.com/metanorma/metanorma-macos-setup/master/metanorma-setup)
85
86
  $ gem install metanorma-gb
86
87
  ----
87
88
 
88
89
 
89
- == Differences from `metanorma-iso`
90
+ == Documentation
90
91
 
91
- === Document Attributes
92
+ See https://www.metanorma.com/author/gb/[Author Chinese Guobiao standards using Metanorma].
92
93
 
93
- In the following, "GB standard" should be read to refer to any Chinese
94
- national, sector or local standard. Asterisked document attributes are
95
- mandatory.
96
-
97
- `:title-intro-zh:`, `:title-main-zh:`*, `:title-part-zh:`::
98
- These are the title introduction, main title, and part title in Chinese.
99
- The intro and part titles are optional.
100
- (They replace their French counterparts in
101
- https://github.com/riboseinc/metanorma-iso[metanorma-iso].)
102
- This and the other `:title-*` document attributes are used instead
103
- of the metanorma-standoc `:title:` attribute and the default Asciidoctor title
104
- (the first line of the document header, prefixed with `=`).
105
-
106
- `:title-intro-en:`, `:title-main-en:`*, `:title-part-en:`::
107
- These are the title introduction, main title, and part title in English.
108
- The intro and part titles are optional.
109
- (They form the document subtitle, instead of the document title as in
110
- https://github.com/riboseinc/metanorma-iso[metanorma-iso].)
111
-
112
- `:technical-committee-type:`::
113
- The type of the technical committee (`technical` or `provisional`).
114
-
115
- `:iso-standard:`::
116
- (optional) A corresponding ISO standard that the GB standard relates to. Format
117
- is full document code, then optionally comma followed by document title;
118
- e.g. `ISO/IEC 27001:2013, Information security management systems`
119
-
120
- `:equivalence:`::
121
- (optional, only valid if there is a corresponding `:iso-standard:`)
122
- The relation of the GB standard to the corresponding ISO standard
123
- (`equivalent`, `identical`, `nonequivalent`). Defaults to `equivalent`.
124
-
125
- `:obsoletes:`::
126
- (optional)
127
- A corresponding GB standard that this GB standard obsoletes. Format is full
128
- document code, then optionally comma followed by document title;
129
- e.g. `GB/T 22080-2008`
130
-
131
- `:obsoletes-parts:`::
132
- A list of bibliographic localities in the corresponding GB standard that this
133
- GB standard obsoletes. These are formatted the same way as the localities in
134
- citations; e.g. `clause 7-9, clause 11`
135
-
136
- `:scope:`::
137
- The scope of the GB standard (`national`, `sector`, `professional`, `local`,
138
- `enterprise`, `social-group`). Defaults to `national`.
139
-
140
- `:mandate:`::
141
- The mandate of the GB standard (`mandatory`, `recommended`, `guidelines`).
142
- Defaults to `mandatory`.
143
-
144
- `:topic:`::
145
- The topic of the GB standard (`basic`, `health-and-safety`, `environment-protection`, `engineering-and-construction`, `product`, `method`, `management-techniques`, `other`). Defaults to `basic`.
146
-
147
- `:prefix:`::
148
- The prefix classifying the GB standard.
149
- (Refer to
150
- https://github.com/riboseinc/gbdoc/blob/master/models/gb-standard-national-prefix.adoc[GB National Standard Prefixes],
151
- https://github.com/riboseinc/gbdoc/blob/master/models/gb-standard-sector-prefix.adoc[GB Sector Standard Prefixes],
152
- https://github.com/riboseinc/gbdoc/blob/master/models/gb-standard-local-prefix.adoc[GB Local Standard Prefixes],
153
- https://github.com/riboseinc/metanorma-gb/issues/54[GB Social and Enterprise Standard Prefixes].)
154
- Any `/Z` or `/T` suffix (indicating "recommended" and "guidelines" mandate) is
155
- ignored unless the `:mandate:` attribute is not given. Any `Q/` or `T/` prefix for social and enterprise
156
- standards is ignored unless the `:scope:` attribute is not given.
157
-
158
- `:library-ics:`::
159
- The ICS (International Categorization for Standards) number for the GB standard. There may be more than one ICS for a document; if so, they should be comma-delimited. (Unlike the case for ISO, the ICS identifier is output to the front page of the GB standard.)
160
-
161
- `:library-ccs:`::
162
- The CCS (Chinese Categorization Scheme) code for the GB standard. See https://github.com/riboseinc/cn-ccs-codes
163
-
164
- `:plan-number:`::
165
- The Plan Number (计划单号) for the GB standard.
166
-
167
- `:issuer:`::
168
- The issuer of the standard. This is the authority which authors, manages, and issues the standard. For social standards, this is the social group; for enterprise standards, this is the company. The issuer appears on the standard frontispiece. By default, the issuer is inferred from the prefix of the standard; this attribute overrides the value inferred from the prefix. It is required for social and entperprise standards.
169
-
170
- `:publisher:`::
171
- The publisher of the standard, which distributes the standard. This is distinct from the issuer, the authority which authors, manages, and issues the standard.
172
-
173
- `:proposer:`::
174
- The party which proposed the standard.
175
-
176
- `:authority:`::
177
- The authority which sponsored the standard.
178
-
179
- `:author:`::
180
- The individuals who drafted the standard.
181
-
182
- `:author-committee:`::
183
- The committees which drafted the standard. (Also `:author-committee_2:`, `:author-committee_3:`...)
184
-
185
- `:title-font:`::
186
- The font to use for the standard class and issuer on the (Word) cover page; described in GB/T 1.1 as
187
- "custom font". If not provided, the font is inferred from the scope of the standard, aligning
188
- with existing practice: SimSun for national scope, SimHei for all other scopes.
189
-
190
- `:keep-boilerplate:`::
191
-
192
- If absent (default), any paragraphs supplied at the start of the Terms and Definitions
193
- section are deleted, and replaced with standard boilerplate. If present, any such
194
- paragraphs in the text are retained.
195
-
196
- `:standard-logo-img:`::
197
- User-supplied graphic to overwrite the logo for the standard on the title page.
198
-
199
- `:standard-class-img:`::
200
- User-supplied graphic to overwrite the name of the standard class on the title page.
201
-
202
- `:standard-issuer-img:`::
203
- User-supplied graphic to overwrite the name of the standard issuer on the title page.
204
-
205
- === Language macros
206
-
207
- In Terms and Definitions, preferred terms, alternate terms and deprecated terms
208
- are expected to be given in both Chinese and English. By default, the gem does
209
- this by detecting space-delimited runs of Han or Latin script text:
210
-
211
- [source,asciidoc]
212
- --
213
- alt:[rough rice 糙米]
214
- --
215
-
216
- [source,xml]
217
- --
218
- <admitted language="zh">糙米</admitted> <admitted language="en">rough rice</admitted>
219
- --
220
-
221
- However if there is script mixing in a term -- if the Chinese term contains
222
- a Latin script acronym or a mathematical expression, for example -- the
223
- Chinese term will not be detected correctly. To address this, the formatting macros
224
- `+[zh]#...#+` and `+[en]#...#+` are used. If they are present, then the content
225
- of those macros is treated as the Chinese and English equivalents of the
226
- parent node instead:
227
-
228
- [source,asciidoc]
229
- --
230
- === [en]#XYZ paddy# [zh]#水稻XY#]
231
- alt:[[en]#rough rice# [zh]#糙米#]
232
- --
233
-
234
- [source,xml]
235
- --
236
- <preferred language="en">XYZ paddy</preferred> <preferred language="zh">水稻XYZ</preferred>
237
- <admitted language="zh">糙米</admitted> <admitted language="en">rough rice</admitted>
238
- --
239
-
240
- Unfortunately no further markup is permitted within the `+[zh]#...#+` and
241
- `+[en]#...#+` macros by Asciidoctor, and Asciidoctor does not correctly nest
242
- inline macros within other inline macros (so `+alt:[en:[_xyz_] zh:[xyz]+`
243
- would not give correct behaviour either.)
244
-
245
- Localisation strings can be used anywhere else in the document where the
246
- grammar permits localised strings (notably in bibliographic data). For example,
247
- a bibliographic title can be given in two languages as follows. (Note that formatting appears outside the language macros.)
248
-
249
- [source,asciidoc]
250
- --
251
- [[[ISO7301,ISO 7301:2011]]], _[zh]#大米 - 规格# [en]#Rice -- Specification#_
252
- --
253
-
254
- [source,xml]
255
- --
256
- <bibitem id="ISO7301" type="standard">
257
- <title language="zh">大米 - 规格</title> <title language="en">Rice&#x2011;Specification</title>
258
- <docidentifier>ISO 7301</docidentifier>
259
- <date type="published">
260
- <from>2011</from>
261
- </date>
262
- <contributor>
263
- <role type="publisher"/>
264
- <organization>
265
- <name>International Organization for Standardization</name>
266
- <abbreviation>ISO</abbreviation>
267
- </organization>
268
- </contributor>
269
- </bibitem>
270
- --
271
-
272
- The gem also supports `+[zh-Hant]#...#+` and `+[zh-Hans]#...#+` to
273
- differentiate traditional and simplified script in ISOXML; `zh-Hant` is
274
- provisionally supported through changing font in the output.
275
-
276
- == Caveats
277
-
278
- === Microsoft Word
279
-
280
- The Word output is meticulously aligned to the GB/T 1.1 specification, which is highly
281
- prescriptive on the positioning of elements on the page. This means that the Word output
282
- uses http://www.addbalance.com/word/frames_textboxes.htm[frames] and
283
- https://en.wikipedia.org/wiki/Vector_Markup_Language[VML] extensively, as the best mechanism
284
- Word HTNL has to ensure precise positioning of elements. However, the use of frames
285
- makes Word documents more cumbersome to edit; it is envisaged that the bulk of document
286
- editing should be happening in Asciidoctor, with Word treated as a write-only output format.
287
-
288
- The use of VML and frames is mostly confined to the cover page, which is the most heavily
289
- prescribed by GB/T 1.1. However, Word as of 2016 suppresses space before a paragraph
290
- after a page break (though not a section break--which means that the Foreword, Introduction,
291
- Document Title, Annex and Bibliography titles would all either lose their mandated initial
292
- space in Word, or else would all have to be treated as separate sections. For that reason,
293
- those headings are instead treated by this gem as frames (in-line with their following text),
294
- which preserve their initial spacing.
295
-
296
- === GB/T 1.1 Compliance
297
-
298
- GB/T 1.1-2009 prescribes the format of GB standards meticulously, and is based on ISO/IEC DIR 2-2004
299
- (though it is not equivalent, and ISO/EIC DIR 2 is less prescriptive about layout).
300
- GB issued a template program for generating compliant Word documents
301
- in 2010; this program no longer executes on Windows. (This gem has extracted its stylesheet for
302
- use in formatting output, but the stylesheet itself had to be modified in places to comply with
303
- GB/T 1.1.)
304
-
305
- Compliance of GB standards with GB/T 1.1 has been patchy. This has been exacerbated by the fact that
306
- ISO/IEC DIR 2 was substantially revised in 2011 and again in 2016. Although GB/T 1.1 has not been
307
- updated to align with ISO/IEC DIR 2-2016, published GB standards increasingly are formatted according
308
- to ISO in most areas where ISO and GB now conflict.
309
-
310
- This gem attempts to align with current best practice of GB standards, and does so in consultation with
311
- GB. GB/T 19018-2017 has been used as the exemplar standard.
312
-
313
- The following area the areas where the gem's Word output aligns with or deviates from GB/T 1.1-2009.
314
-
315
- * https://github.com/riboseinc/metanorma-gb/issues/58[Measurements (GB/T 1.1 Annex I.)] The gem
316
- scrupulously aligns with the measurements prescribed in GB/T, to a greater extent than the 2010
317
- template tool. As already noted, it makes extensive use of frames to ensure correct vertical positioning
318
- of headers, and of elements on the cover page.
319
-
320
- * https://github.com/riboseinc/metanorma-gb/issues/56[Fonts (GB/T 1.1 Annex J.)] The gem aligns
321
- with the fonts and font sizes prescribed in GB/T. (The only exception is the standard name, for which a
322
- point size of 72 is quite unrealistic: 26pt is used instead, in compliance with the preexisting Word
323
- template.) For Simplified Chinese script, the gem uses by default SimSun as its "serif" font, and SimHei
324
- has its "sans-serif" font; this reflects practice in the
325
- Word templates used for GB. For Latin script, it uses Cambria as its serif font, and Calibri as its
326
- sans-serif font; this is to minimise disruption moving between scripts. (Note that the stylesheets
327
- make minimal use of boldface and italics, as these are not well-matched with Chinese typography;
328
- the sans-serif font occupies the niche that boldface occupies in ISO Latin-script documents.)
329
- +
330
- GB/T 1.1 prescribes a "custom font" for the standard class and standard issuer on the cover page.
331
- By default, this is the serif font for standards with national scope, and the sans-serif font for
332
- all other scopes. All font selections can be overriden in the document attributes (`:bodyfont:`,
333
- `:headerfont:`, `:titlefont:`.)`
334
-
335
- * https://github.com/riboseinc/metanorma-gb/issues/57[Layout (GB/T 1.1 Clause 9.)]. The gem complies
336
- with GB/T 1.1, with the following exceptions where it follows ISO/IEC DIR 2-2016 practice instead:
337
-
338
- ** 9.3: There are no separate tables of figures, tables of tables, or tables of annexes. Table of Contents
339
- indentation in the 2010 stylesheet did not comply with GB/T 1.1.
340
-
341
- ** 9.5.2: Normal references and Bibliography references are indented like normal paragraphs, instead of
342
- having a hanging indent ("on overflow they should be indented to the top level"); in fact, GB/T 1.1
343
- does not follow this in its own references list.
344
-
345
- ** 9.5.3: Terms and Definitions is aligned with ISO/IEC DIR 2: there is provision for alternate and
346
- deprecated terms, and term sources are notated in brackets whether they are modified or direct citations
347
- from the source document, instead of being treated as a note in the latter case.
348
- (https://github.com/riboseinc/metanorma-gb/issues/67) Clauses numbers are separated from the term
349
- source reference by a dash. References to terms defined elsewhere in the Terms and Definitions clause
350
- are accompanied with clause references.
351
-
352
- ** 9.9.3: Figure footnotes are not longer treated as footnotes, but are instead merged into the figure
353
- key, as is done in ISO/IEC DIR 2. Footnote indentation and note indentation in the 2010 stylesheet
354
- did not comply with GB/T 1.1.
355
-
356
- ** 9.9.4: Example labels do not appear on a separate line. Examples like notes have a hanging indent,
357
- so that their content is left-aligned.
358
-
359
- ** 9.9.5: Formulas are centered in the page, but are not connected with the formula number with a
360
- dotted tab.
@@ -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/>
@@ -849,6 +855,7 @@
849
855
  <value>includes</value>
850
856
  <value>instance</value>
851
857
  <value>partOf</value>
858
+ <value>hasDraft</value>
852
859
  </choice>
853
860
  </attribute>
854
861
  <element name="bibitem">
@@ -861,9 +868,6 @@
861
868
  </define>
862
869
  <define name="version">
863
870
  <element name="version">
864
- <optional>
865
- <ref name="vedition"/>
866
- </optional>
867
871
  <optional>
868
872
  <ref name="revision-date"/>
869
873
  </optional>
@@ -28,7 +28,7 @@ module Asciidoctor
28
28
  result << "</gb-standard>"
29
29
  result = textcleanup(result)
30
30
  ret1 = cleanup(Nokogiri::XML(result))
31
- validate(ret1)
31
+ validate(ret1) unless @novalid
32
32
  ret1.root.add_namespace(nil, GB_NAMESPACE)
33
33
  ret1
34
34
  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>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Gb
3
- VERSION = "1.1.3"
3
+ VERSION = "1.1.4"
4
4
  end
5
5
  end
data/metanorma-gb.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  Formerly known as asciidoctor-gb.
19
19
  DESCRIPTION
20
20
 
21
- spec.homepage = "https://github.com/riboseinc/metanorma-gb"
21
+ spec.homepage = "https://github.com/metanorma/metanorma-gb"
22
22
  spec.license = "BSD-2-Clause"
23
23
 
24
24
  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-gb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
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-03-06 00:00:00.000000000 Z
11
+ date: 2019-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso
@@ -254,6 +254,7 @@ files:
254
254
  - lib/asciidoctor/gb/gbstandard.rng
255
255
  - lib/asciidoctor/gb/isodoc.rng
256
256
  - lib/asciidoctor/gb/isostandard.rng
257
+ - lib/asciidoctor/gb/reqt.rng
257
258
  - lib/asciidoctor/gb/section_input.rb
258
259
  - lib/asciidoctor/gb/validate.rb
259
260
  - lib/isodoc/gb/gbcleanup.rb
@@ -305,7 +306,7 @@ files:
305
306
  - lib/metanorma/gb/processor.rb
306
307
  - lib/metanorma/gb/version.rb
307
308
  - metanorma-gb.gemspec
308
- homepage: https://github.com/riboseinc/metanorma-gb
309
+ homepage: https://github.com/metanorma/metanorma-gb
309
310
  licenses:
310
311
  - BSD-2-Clause
311
312
  metadata: {}