metanorma-iso 1.3.10 → 1.3.11

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: 6f4f74e50a543a5e6c5b97ac1430e59e99d333e38a0256cc320d098f4e34ace3
4
- data.tar.gz: 2089e633925a0175ad691d09db5073c5fcabaf79e0c3d96a55daf013361e2c88
3
+ metadata.gz: 37fdffb62095a8f1613fc65eb1671c5aa50afeade748005124b9f0b685f4fc06
4
+ data.tar.gz: e91693cd6da032e5315fa2d453571744bd72b2c1098297f27a9cb3dcad46bc65
5
5
  SHA512:
6
- metadata.gz: 7b0e1f752a14610332c9b1dce35e3b82caf8477997111c030623b1c3b4f98e98667f110821e6d534fa96e8bc7a66895c3038a2c705fe6921ec3367f35d970869
7
- data.tar.gz: 3842beb81b972f9e3078279ebababbda2c6b63d2818c7cf85329dafcc92be73046f29c87c9e938a8214a4f49f27dbd0970a4f49e9ad30e5969b177e8c15985ac
6
+ metadata.gz: 5f43da44b6f164ccb1424bfe54644954d1e32d0f93459739730ccff7098dd294c0cb1a65f748c4bf91ee99dca7b7c6cd473730ecd6926067711fafd200e00116
7
+ data.tar.gz: 74f892bf58f069752e9d9a62c89887dea1954877bf395fc6e0c02d96fa2b59085c29a6b7ac12da499d6fcdc54fa872b2ada173df7dba05be05024842f9413f10
@@ -73,3 +73,8 @@ The metanorma-cli gem is the command-line interface for the Metanorma tool suite
73
73
 
74
74
  See https://www.metanorma.com/author/iso/[The ISO flavor of Metanorma].
75
75
 
76
+ == Examples
77
+
78
+ * Example documents are avalable at the https://github.com/metanorma/mn-samples-iso[mn-samples-iso] repository.
79
+ * Document templates are available at the https://github.com/metanorma/mn-templates-iso[mn-templates-iso] repository.
80
+
@@ -284,6 +284,9 @@
284
284
  <attribute name="id">
285
285
  <data type="ID"/>
286
286
  </attribute>
287
+ <optional>
288
+ <attribute name="alt"/>
289
+ </optional>
287
290
  <optional>
288
291
  <ref name="tname"/>
289
292
  </optional>
@@ -278,10 +278,12 @@
278
278
  </define>
279
279
  <define name="organization">
280
280
  <element name="organization">
281
- <ref name="orgname"/>
282
- <optional>
281
+ <oneOrMore>
282
+ <ref name="orgname"/>
283
+ </oneOrMore>
284
+ <zeroOrMore>
283
285
  <ref name="subdivision"/>
284
- </optional>
286
+ </zeroOrMore>
285
287
  <optional>
286
288
  <ref name="abbreviation"/>
287
289
  </optional>
@@ -357,6 +359,9 @@
357
359
  </define>
358
360
  <define name="phone">
359
361
  <element name="phone">
362
+ <optional>
363
+ <attribute name="type"/>
364
+ </optional>
360
365
  <text/>
361
366
  </element>
362
367
  </define>
@@ -1024,6 +1029,8 @@
1024
1029
  <value>correctedBy</value>
1025
1030
  <value>revises</value>
1026
1031
  <value>revisedBy</value>
1032
+ <value>describes</value>
1033
+ <value>describedBy</value>
1027
1034
  </choice>
1028
1035
  </define>
1029
1036
  <define name="docrelation">
@@ -52,9 +52,10 @@ module Asciidoctor
52
52
  prefix = get_id_prefix(xmldoc)
53
53
  id = xmldoc.at("//bibdata/docidentifier[@type = 'iso']") or return
54
54
  id.content = id_prefix(prefix, id)
55
- id = xmldoc.at("//bibdata/ext/structuredidentifier/project-number") or
56
- return
57
- id.content = id_prefix(prefix, id)
55
+ id = xmldoc.at("//bibdata/ext/structuredidentifier/project-number") and
56
+ id.content = id_prefix(prefix, id)
57
+ id = xmldoc.at("//bibdata/docidentifier[@type = 'iso-with-lang']") and
58
+ id.content = id_prefix(prefix, id)
58
59
  end
59
60
 
60
61
  PUBLISHER = "./contributor[role/@type = 'publisher']/organization".freeze
@@ -23,6 +23,18 @@ module Asciidoctor
23
23
  dn = add_id_parts(node.attr("docnumber"), part, subpart)
24
24
  dn = id_stage_prefix(dn, node)
25
25
  xml.docidentifier dn, **attr_code(type: "iso")
26
+ xml.docidentifier id_langsuffix(dn, node), **attr_code(type: "iso-with-lang")
27
+ end
28
+
29
+ def id_langsuffix(dn, node)
30
+ lang = node.attr("language") || "en"
31
+ suffix = case lang
32
+ when "en" then "(E)"
33
+ when "fr" then "(F)"
34
+ else
35
+ "(X)"
36
+ end
37
+ "#{dn} #{suffix}"
26
38
  end
27
39
 
28
40
  def metadata_ext(node, xml)
@@ -6,7 +6,9 @@
6
6
  </start>
7
7
  <define name="organization">
8
8
  <element name="organization">
9
- <ref name="orgname"/>
9
+ <oneOrMore>
10
+ <ref name="orgname"/>
11
+ </oneOrMore>
10
12
  <optional>
11
13
  <ref name="abbreviation"/>
12
14
  </optional>
@@ -14,10 +14,10 @@ module IsoDoc
14
14
  {
15
15
  bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' :
16
16
  options[:alt] ? '"Lato",sans-serif' : '"Cambria",serif'),
17
- headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
18
- options[:alt] ? '"Lato",sans-serif' : '"Cambria",serif'),
19
- monospacefont: (options[:alt] ? '"Space Mono",monospace' :
20
- '"Courier New",monospace'),
17
+ headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
18
+ options[:alt] ? '"Lato",sans-serif' : '"Cambria",serif'),
19
+ monospacefont: (options[:alt] ? '"Space Mono",monospace' :
20
+ '"Courier New",monospace'),
21
21
  }
22
22
  end
23
23
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "1.3.10".freeze
3
+ VERSION = "1.3.11".freeze
4
4
  end
5
5
  end
@@ -100,12 +100,8 @@ RSpec.describe Asciidoctor::ISO do
100
100
  <title language="fr" format="text/plain" type="title-main">Titre Principal</title>
101
101
  <title language="fr" format="text/plain" type="title-part">Part du Titre</title>
102
102
  <docidentifier type="iso">ISO/PreNWIP3 1000-1</docidentifier>
103
+ <docidentifier type='iso-with-lang'>ISO/PreNWIP3 1000-1 (E)</docidentifier>
103
104
  <docnumber>1000</docnumber>
104
- <edition>2</edition>
105
- <version>
106
- <revision-date>2000-01-01</revision-date>
107
- <draft>0.3.4</draft>
108
- </version>
109
105
  <contributor>
110
106
  <role type="author"/>
111
107
  <organization>
@@ -120,6 +116,11 @@ RSpec.describe Asciidoctor::ISO do
120
116
  <abbreviation>ISO</abbreviation>
121
117
  </organization>
122
118
  </contributor>
119
+ <edition>2</edition>
120
+ <version>
121
+ <revision-date>2000-01-01</revision-date>
122
+ <draft>0.3.4</draft>
123
+ </version>
123
124
  <language>en</language>
124
125
  <script>Latn</script>
125
126
  <status>
@@ -187,6 +188,7 @@ RSpec.describe Asciidoctor::ISO do
187
188
  <iso-standard xmlns="http://riboseinc.com/isoxml">
188
189
  <bibdata type="standard">
189
190
  <docidentifier type="iso">ISO/IEC/IETF 1000-1-1:2001</docidentifier>
191
+ <docidentifier type='iso-with-lang'>ISO/IEC/IETF 1000-1-1:2001 (X)</docidentifier>
190
192
  <docidentifier type="iso-tc">2000</docidentifier>
191
193
  <docidentifier type="iso-tc">2003</docidentifier>
192
194
  <docnumber>1000</docnumber>
@@ -289,10 +291,12 @@ RSpec.describe Asciidoctor::ISO do
289
291
  :no-isobib:
290
292
  :docnumber: 1000
291
293
  :docstage: 50
294
+ :language: fr
292
295
  INPUT
293
296
  <iso-standard xmlns="http://riboseinc.com/isoxml">
294
297
  <bibdata type="standard">
295
298
  <docidentifier type="iso">ISO/FDIS 1000</docidentifier>
299
+ <docidentifier type='iso-with-lang'>ISO/FDIS 1000 (F)</docidentifier>
296
300
  <docnumber>1000</docnumber>
297
301
  <contributor>
298
302
  <role type="author"/>
@@ -309,7 +313,7 @@ RSpec.describe Asciidoctor::ISO do
309
313
  </organization>
310
314
  </contributor>
311
315
 
312
- <language>en</language>
316
+ <language>fr</language>
313
317
  <script>Latn</script>
314
318
  <status>
315
319
  <stage>50</stage>
@@ -355,6 +359,7 @@ OUTPUT
355
359
  <iso-standard xmlns="http://riboseinc.com/isoxml">
356
360
  <bibdata type="standard">
357
361
  <docidentifier type="iso">ISO 1000</docidentifier>
362
+ <docidentifier type='iso-with-lang'>ISO 1000 (E)</docidentifier>
358
363
  <docnumber>1000</docnumber>
359
364
  <contributor>
360
365
  <role type="author"/>
@@ -418,6 +423,7 @@ OUTPUT
418
423
  <iso-standard xmlns="http://riboseinc.com/isoxml">
419
424
  <bibdata type="standard">
420
425
  <docidentifier type="iso">ISO/PRF 1000</docidentifier>
426
+ <docidentifier type='iso-with-lang'>ISO/PRF 1000 (E)</docidentifier>
421
427
  <docnumber>1000</docnumber>
422
428
  <contributor>
423
429
  <role type="author"/>
@@ -130,14 +130,14 @@ RSpec.describe Asciidoctor::ISO do
130
130
  | Husked rice, parboiled | 1,0 | 1,0 | Not applicable | 1,0
131
131
  | Milled rice, parboiled | 1,0 | 1,0 | 1,0 | Not applicable
132
132
  | Chips | 0,1 | 0,1 | 0,1 | 0,1
133
- | HDK | 2,0 footnoteref:[defectsmass,The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.] | 2,0 | 2,0 footnoteref:[defectsmass] | 2,0
133
+ | HDK | 2,0 footnote:defectsmass[The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.] | 2,0 | 2,0 footnote:defectsmass[] | 2,0
134
134
  | Damaged kernels | 4,0 | 3,0 | 4,0 | 3,0
135
135
  | Immature and/or malformed kernels | 8,0 | 2,0 | 8,0 | 2,0
136
- | Chalky kernels | 5,0 footnoteref:[defectsmass] | 5,0 | Not applicable | Not applicable
137
- | Red kernels and red-streaked kernels | 12,0 | 12,0 | 12,0 footnoteref:[defectsmass] | 12,0
138
- | Partly gelatinized kernels | Not applicable | Not applicable | 11,0 footnoteref:[defectsmass] | 11,0
136
+ | Chalky kernels | 5,0 footnote:defectsmass[] | 5,0 | Not applicable | Not applicable
137
+ | Red kernels and red-streaked kernels | 12,0 | 12,0 | 12,0 footnote:defectsmass[] | 12,0
138
+ | Partly gelatinized kernels | Not applicable | Not applicable | 11,0 footnote:defectsmass[] | 11,0
139
139
  | Pecks | Not applicable | Not applicable | 4,0 | 2,0
140
- | Waxy rice | 1,0 footnoteref:[defectsmass] | 1,0 | 1,0 footnoteref:[defectsmass] | 1,0
140
+ | Waxy rice | 1,0 footnote:defectsmass[] | 1,0 | 1,0 footnote:defectsmass[] | 1,0
141
141
 
142
142
  5+a| Live insects shall not be present. Dead insects shall be included in extraneous matter.
143
143
  |===
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.10
4
+ version: 1.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-29 00:00:00.000000000 Z
11
+ date: 2019-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-jing