metanorma-jis 0.5.3 → 0.5.4

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.
@@ -1,9 +1,5 @@
1
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
- VERSION v1.2.1
5
- default namespace isostandard = "https://www.metanorma.com/ns/iso"
6
- -->
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0">
7
3
  <include href="isodoc.rng">
8
4
  <define name="sections">
9
5
  <element name="sections">
@@ -33,30 +29,7 @@
33
29
  </element>
34
30
  </define>
35
31
  <define name="Clause-Section">
36
- <optional>
37
- <attribute name="id">
38
- <data type="ID"/>
39
- </attribute>
40
- </optional>
41
- <optional>
42
- <attribute name="language"/>
43
- </optional>
44
- <optional>
45
- <attribute name="script"/>
46
- </optional>
47
- <optional>
48
- <attribute name="inline-header">
49
- <data type="boolean"/>
50
- </attribute>
51
- </optional>
52
- <optional>
53
- <attribute name="obligation">
54
- <choice>
55
- <value>normative</value>
56
- <value>informative</value>
57
- </choice>
58
- </attribute>
59
- </optional>
32
+ <ref name="Section-Attributes"/>
60
33
  <optional>
61
34
  <attribute name="type"/>
62
35
  </optional>
@@ -77,18 +50,7 @@
77
50
  </define>
78
51
  <define name="term">
79
52
  <element name="term">
80
- <optional>
81
- <attribute name="id">
82
- <data type="ID"/>
83
- </attribute>
84
- </optional>
85
- <optional>
86
- <attribute name="language"/>
87
- </optional>
88
- <optional>
89
- <attribute name="script"/>
90
- </optional>
91
- <ref name="BlockAttributes"/>
53
+ <ref name="TermAttributes"/>
92
54
  <ref name="preferred"/>
93
55
  <zeroOrMore>
94
56
  <ref name="admitted"/>
@@ -116,30 +78,7 @@
116
78
  </define>
117
79
  <define name="annex">
118
80
  <element name="annex">
119
- <optional>
120
- <attribute name="id">
121
- <data type="ID"/>
122
- </attribute>
123
- </optional>
124
- <optional>
125
- <attribute name="language"/>
126
- </optional>
127
- <optional>
128
- <attribute name="script"/>
129
- </optional>
130
- <optional>
131
- <attribute name="inline-header">
132
- <data type="boolean"/>
133
- </attribute>
134
- </optional>
135
- <optional>
136
- <attribute name="obligation">
137
- <choice>
138
- <value>normative</value>
139
- <value>informative</value>
140
- </choice>
141
- </attribute>
142
- </optional>
81
+ <ref name="Annex-Section-Attributes"/>
143
82
  <optional>
144
83
  <ref name="section-title"/>
145
84
  </optional>
@@ -190,36 +129,7 @@
190
129
  </element>
191
130
  </define>
192
131
  <define name="Content-Section">
193
- <optional>
194
- <attribute name="id">
195
- <data type="ID"/>
196
- </attribute>
197
- </optional>
198
- <optional>
199
- <attribute name="language"/>
200
- </optional>
201
- <optional>
202
- <attribute name="script"/>
203
- </optional>
204
- <optional>
205
- <attribute name="inline-header">
206
- <data type="boolean"/>
207
- </attribute>
208
- </optional>
209
- <optional>
210
- <attribute name="obligation">
211
- <choice>
212
- <value>normative</value>
213
- <value>informative</value>
214
- </choice>
215
- </attribute>
216
- </optional>
217
- <optional>
218
- <attribute name="number"/>
219
- </optional>
220
- <optional>
221
- <attribute name="branch-number"/>
222
- </optional>
132
+ <ref name="Section-Attributes"/>
223
133
  <optional>
224
134
  <attribute name="type"/>
225
135
  </optional>
@@ -235,64 +145,11 @@
235
145
  </oneOrMore>
236
146
  </choice>
237
147
  </define>
238
- <!--
239
- We display the Normative References between scope and terms; but to keep the
240
- grammar simple, we keep the references together
241
- -->
242
- <define name="standard-document">
243
- <element name="metanorma">
244
- <ref name="Root-Attributes"/>
245
- <ref name="bibdata"/>
246
- <zeroOrMore>
247
- <ref name="termdocsource"/>
248
- </zeroOrMore>
249
- <optional>
250
- <ref name="misccontainer"/>
251
- </optional>
252
- <optional>
253
- <ref name="boilerplate"/>
254
- </optional>
255
- <ref name="preface"/>
256
- <oneOrMore>
257
- <ref name="sections"/>
258
- </oneOrMore>
259
- <zeroOrMore>
260
- <ref name="annex"/>
261
- </zeroOrMore>
262
- <ref name="bibliography"/>
263
- <zeroOrMore>
264
- <ref name="indexsect"/>
265
- </zeroOrMore>
266
- </element>
267
- </define>
268
148
  </include>
269
149
  <!-- end overrides -->
270
150
  <define name="clause-hanging-paragraph-with-footnote">
271
151
  <element name="clause">
272
- <optional>
273
- <attribute name="id">
274
- <data type="ID"/>
275
- </attribute>
276
- </optional>
277
- <optional>
278
- <attribute name="language"/>
279
- </optional>
280
- <optional>
281
- <attribute name="script"/>
282
- </optional>
283
- <optional>
284
- <attribute name="inline-header">
285
- <data type="boolean"/>
286
- </attribute>
287
- </optional>
288
- <optional>
289
- <attribute name="obligation">
290
- <choice>
291
- <value>normative</value>
292
- <value>informative</value>
293
- </choice>
294
- </attribute>
295
- </optional>
152
+ <ref name="Section-Attributes"/>
296
153
  <optional>
297
154
  <ref name="section-title"/>
298
155
  </optional>
@@ -1,9 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar ns='https://www.metanorma.org/ns/standoc' xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <!--
4
- VERSION v1.2.1
5
- default namespace = "https://www.metanorma.com/ns/jis"
6
- -->
7
3
  <include href="relaton-jis.rng"/>
8
4
  <include href="isostandard.rng">
9
5
  <define name="annex">
@@ -16,39 +12,6 @@
16
12
  <ref name="Annex-Section"/>
17
13
  </element>
18
14
  </define>
19
- <!--
20
- We display the Normative References between scope and terms; but to keep the
21
- grammar simple, we keep the references together
22
- -->
23
- <define name="standard-document">
24
- <element name="metanorma">
25
- <ref name="Root-Attributes"/>
26
- <ref name="bibdata"/>
27
- <zeroOrMore>
28
- <ref name="termdocsource"/>
29
- </zeroOrMore>
30
- <optional>
31
- <ref name="misccontainer"/>
32
- </optional>
33
- <optional>
34
- <ref name="boilerplate"/>
35
- </optional>
36
- <ref name="preface"/>
37
- <oneOrMore>
38
- <ref name="sections"/>
39
- </oneOrMore>
40
- <zeroOrMore>
41
- <ref name="annex"/>
42
- </zeroOrMore>
43
- <ref name="bibliography"/>
44
- <zeroOrMore>
45
- <ref name="indexsect"/>
46
- </zeroOrMore>
47
- <optional>
48
- <ref name="colophon"/>
49
- </optional>
50
- </element>
51
- </define>
52
15
  </include>
53
16
  <!-- end overrides -->
54
17
  <define name="floating-section-title">
@@ -1,21 +1,6 @@
1
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">
2
+ <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
3
  <include href="biblio-standoc.rng">
4
- <define name="BibDataExtensionType">
5
- <optional>
6
- <attribute name="schema-version"/>
7
- </optional>
8
- <ref name="doctype"/>
9
- <ref name="editorialgroup"/>
10
- <ref name="flavor"/>
11
- <zeroOrMore>
12
- <ref name="ics"/>
13
- </zeroOrMore>
14
- <ref name="structuredidentifier"/>
15
- <optional>
16
- <ref name="stagename"/>
17
- </optional>
18
- </define>
19
4
  <define name="DocumentType">
20
5
  <choice>
21
6
  <value>japanese-industrial-standard</value>
@@ -43,6 +28,13 @@
43
28
  </element>
44
29
  </define>
45
30
  </include>
31
+ <define name="BibDataExtensionType" combine="interleave">
32
+ <optional>
33
+ <ref name="stagename">
34
+ <a:documentation>Human-readable name of the stage of publication, corresponding to the numeric stage code given in `/bibdata/status/stage`</a:documentation>
35
+ </ref>
36
+ </optional>
37
+ </define>
46
38
  <define name="ISOProjectGroup">
47
39
  <zeroOrMore>
48
40
  <ref name="agency"/>
@@ -1,5 +1,11 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
+ <define name="requirement">
4
+ <element name="requirement">
5
+ <ref name="RequirementType"/>
6
+ </element>
7
+ </define>
8
+ <!-- ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437 -->
3
9
  <!--
4
10
  Presupposes isodoc.rnc, is included in it
5
11
  include "isodoc.rnc" { }
@@ -7,14 +13,9 @@
7
13
  This is the Metanorma default provisions model; it is overridden by other provisions models,
8
14
  such as Modspec
9
15
  -->
10
- <define name="requirement">
16
+ <define name="recommendation">
11
17
  <a:documentation>Specification of an attribute of a subject that is required.
12
18
  NOTE: A requirement can contain other requirements</a:documentation>
13
- <element name="requirement">
14
- <ref name="RequirementType"/>
15
- </element>
16
- </define>
17
- <define name="recommendation">
18
19
  <a:documentation>Specification of an attribute of a subject that is recommended</a:documentation>
19
20
  <element name="recommendation">
20
21
  <ref name="RequirementType"/>
@@ -15,10 +15,8 @@ module Metanorma
15
15
  "#{script} is not a recognised script")
16
16
  end
17
17
 
18
- def validate(doc)
19
- content_validate(doc)
20
- schema_validate(formattedstr_strip(doc.dup),
21
- File.join(File.dirname(__FILE__), "jis.rng"))
18
+ def schema_file
19
+ "jis.rng"
22
20
  end
23
21
 
24
22
  def image_name_validate(xmldoc); end
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Jis
3
- VERSION = "0.5.3".freeze
3
+ VERSION = "0.5.4".freeze
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-jis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-31 00:00:00.000000000 Z
11
+ date: 2025-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: japanese_calendar
@@ -304,6 +304,7 @@ files:
304
304
  - lib/isodoc/jis/jis.international-standard.xsl
305
305
  - lib/isodoc/jis/metadata.rb
306
306
  - lib/isodoc/jis/pdf_convert.rb
307
+ - lib/isodoc/jis/presentation_list.rb
307
308
  - lib/isodoc/jis/presentation_section.rb
308
309
  - lib/isodoc/jis/presentation_xml_convert.rb
309
310
  - lib/isodoc/jis/table.rb