metanorma-csd 1.0.8 → 1.0.9

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: f636a1b9e0dd059719304718108e989bc5b2674bf424489ab1d8c708c5a42fab
4
- data.tar.gz: 144e027a106e43e82aaccbb32b6823dff56ed9b1d3cb309044c60bc9113f87b3
3
+ metadata.gz: d5e2ae80d5f1cd65a6c560f4013a58d9e1c9ed313bee90959f5e21f2ff50cc77
4
+ data.tar.gz: a6f3c25db46069cdbd4a7c6cb40cbe360342b4fc7a6874bcb64a7dfd2ebb71c5
5
5
  SHA512:
6
- metadata.gz: 282fa313ca0659704839dcd19ea60e7f376e5d5094816e320db9c7f85b5778de7c08256cabf1c4645a4a1f959d9f3eaa59d1e543707791b8966ec573b9bc9dfa
7
- data.tar.gz: 05f8626d4f0c79caad7fa6de6dc122226c8b9f26c08aad38f0edd711b87b9602a2e1da215aedbfd829183f7ec5cfa094bc4f0da52dec66ef3352dc90c8c9d7cf
6
+ metadata.gz: 651d59900bb63911dfdcf102bb216550d2245cc045c89cbe2a3a02a74c32ffa176b6325d7e40744be6ecb67ca8140528f72618bea4efda5133edff4dd9bd487f
7
+ data.tar.gz: 291473b15acc2c6aab1b9146f0f8dfeababf7ec4310c64cc5cc6d8026637f1adc8e9724e68b206a5a15d00fe6b9560e1240ffd428ec1ceeeaf64e0d2fca52c99
@@ -69,23 +69,24 @@ module Asciidoctor
69
69
 
70
70
  def metadata_id(node, xml)
71
71
  id = node.attr("docnumber") || "???"
72
- # prefix = "CC"
73
- doctype(node)
74
- # unless typesuffix.empty?
75
- # prefix += "/#{typesuffix}"
76
- # end
77
- #
78
- # status = DOCSTATUS[node.attr("status")] || ""
79
- # unless status.empty?
80
- # prefix += "/#{status}"
81
- # end
82
- #
83
- # id = "#{prefix} #{id}"
84
- #
85
- # year = node.attr("copyright-year")
86
- # if year
87
- # id += ":#{year}"
88
- # end
72
+ prefix = "CC"
73
+ type = doctype(node)
74
+ typesuffix = ::Metanorma::Csd::DOCSUFFIX[node.attr("doctype")] || ""
75
+ unless typesuffix.empty?
76
+ prefix += "/#{typesuffix}"
77
+ end
78
+
79
+ status = ::Metanorma::Csd::DOCSTATUS[node.attr("status")] || ""
80
+ unless status.empty?
81
+ prefix += "/#{status}"
82
+ end
83
+
84
+ id = "#{prefix} #{id}"
85
+
86
+ year = node.attr("copyright-year")
87
+ if year
88
+ id += ":#{year}"
89
+ end
89
90
 
90
91
  xml.docidentifier { |i| i << id }
91
92
  end
@@ -1,5 +1,5 @@
1
1
  <p class="MsoNormal" align="right" style='text-align:right'><b style='mso-bidi-font-weight:
2
- normal'><span lang="EN-GB" style='font-size:14.0pt;mso-no-proof:yes'>{{ docnumber }}:{{ docyear }} {{ draftinfo }}</span></b><b
2
+ normal'><span lang="EN-GB" style='font-size:14.0pt;mso-no-proof:yes'>{{ docnumber }} {{ draftinfo }}</span></b><b
3
3
  style='mso-bidi-font-weight:normal'><span lang="EN-GB" style='font-size:14.0pt'><o:p></o:p></span></b></p>
4
4
 
5
5
  <p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB"
@@ -34,8 +34,10 @@ module IsoDoc
34
34
 
35
35
  if docnumber.nil?
36
36
  set(:docnumber, prefix)
37
+ else
38
+ set(:docnumber, docnumber.text)
37
39
  end
38
-
40
+ =begin
39
41
  dn = docnumber&.text
40
42
 
41
43
  doctype = isoxml&.at(ns("//bibdata"))&.attr("type")
@@ -60,8 +62,8 @@ module IsoDoc
60
62
  if year
61
63
  docid += ":#{year}"
62
64
  end
63
-
64
65
  set(:docnumber, docid)
66
+ =end
65
67
  end
66
68
 
67
69
  def status_print(status)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Csd
3
- VERSION = "1.0.8"
3
+ VERSION = "1.0.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-29 00:00:00.000000000 Z
11
+ date: 2018-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc