metanorma-iec 0.1.1 → 0.1.2

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: a0fa6687e3e29e5536c7a58e61de634c61e3d74a4cc452be1368456e4f59c090
4
- data.tar.gz: 10a74908e1e2ef8217ddb6208f48f83ca12228e965804a8e675b074aab96efb9
3
+ metadata.gz: 48263a7614294561a2577b0e4ba1cc0b7e059ca9828d17c74c463a6c844fe0cd
4
+ data.tar.gz: 7e07b0cd665b25c1f53d69df8f8468e0ea94aa295450611e997165c6b8a01c8d
5
5
  SHA512:
6
- metadata.gz: 12b0d50e87fc114cdb2094da1b111e1439719a5b318ae4846f197a60c33d20dd31076f1af212daf323170f4beb0c25d2d2a16fb782fc630fe3bb0e1dd96ef4de
7
- data.tar.gz: 7fe0fa49671b375ac8e53938f52f4b38b3544ab539fd7aef977f422af2ce7a25b898c950c2dd1db48ae4f9032e1a56b5a3248e0965eb68f84ec97dee433732fa
6
+ metadata.gz: 11d8b762d159293e32cdc2d71d539eaa728c5e89788a8ed628e03f56af35f79dfe91d6a2327b7879934e76a4e602b21692171fae2b943f71e081656392313cb0
7
+ data.tar.gz: b206a77da3013cfbf41f5e886575cb4a9cb13013b69f015d4e68c6253047643dff7d2640fb61c1d2da5dcc21d501fc8839ad5238add7badfb2990eec675f98ab
data/README.adoc CHANGED
@@ -77,11 +77,8 @@ Please refer to the Metanorma-ISO documentation for general documentation.
77
77
 
78
78
  See https://www.metanorma.com/author/iso/[Write ISO documents with Metanorma]
79
79
 
80
- ////
81
80
  == Examples
82
81
 
83
- * link:spec/examples/rfc6350.adoc[] is an Metanorma AsciiDoc version of https://tools.ietf.org/html/rfc6350[RFC 6350].
84
- * link:spec/examples/rfc6350.html[] is an HTML file generated from the Asciidoctor.
85
- * link:spec/examples/rfc6350.doc[] is a Word document generated from the Asciidoctor.
86
- ////
82
+ * Example documents are avalable at the https://github.com/metanorma/mn-samples-iec[mn-samples-iec] repository.
83
+ * Document templates are available at the https://github.com/metanorma/mn-templates-iec[mn-templates-iec] repository.
87
84
 
@@ -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">
@@ -39,6 +39,14 @@ module Asciidoctor
39
39
  end
40
40
  end
41
41
 
42
+ def iso_id(node, xml)
43
+ return unless node.attr("docnumber")
44
+ part, subpart = node&.attr("partnumber")&.split(/-/)
45
+ dn = add_id_parts(node.attr("docnumber"), part, subpart)
46
+ dn = id_stage_prefix(dn, node)
47
+ xml.docidentifier dn, **attr_code(type: "iso")
48
+ end
49
+
42
50
  def make_preface(x, s)
43
51
  s.previous = boilerplate(x)
44
52
  super
@@ -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>
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
6
6
 
@@ -130,14 +130,14 @@ RSpec.describe Asciidoctor::Iec 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
  |===
@@ -264,7 +264,8 @@ RSpec.describe IsoDoc do
264
264
  <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
265
265
  </p>
266
266
  <div class="Section3"><a name="P" id="P"></a>
267
- <p class="Sourcecode"><a name="A" id="A"></a>puts "Hello, world."</p>
267
+ <p class="Sourcecode" style='page-break-after:avoid;'><a name="A" id="A"></a>puts "Hello, world."</p>
268
+ <p class='SourceTitle' style='text-align:center;'>Figure A.1</p>
268
269
  <p class="TableTitle" style="text-align:center;">Table A.1</p>
269
270
  <div align='center' class='table_container'>
270
271
  <table class='MsoISOTable' style='mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
@@ -272,7 +273,8 @@ RSpec.describe IsoDoc do
272
273
  <tbody>
273
274
  <tr>
274
275
  <td style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;" class="TABLE-cell">
275
- <p class="CODE-TableCell"><a name="B" id="B"></a>puts "Hello, world."</p>
276
+ <p class="CODE-TableCell" style='page-break-after:avoid;'><a name="B" id="B"></a>puts "Hello, world."</p>
277
+ <p class='SourceTitle' style='text-align:center;'>Figure A.2</p>
276
278
  </td>
277
279
  </tr>
278
280
  </tbody>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
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-28 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