metanorma-itu 2.6.8 → 2.7.0

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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/itu/html/_coverpage.css +7 -1
  3. data/lib/isodoc/itu/html/header.html +8 -8
  4. data/lib/isodoc/itu/html/html_itu_titlepage.html +2 -2
  5. data/lib/isodoc/itu/html/htmlstyle.css +7 -1
  6. data/lib/isodoc/itu/html/word_itu_intro.html +4 -2
  7. data/lib/isodoc/itu/html/word_itu_titlepage.html +1 -1
  8. data/lib/isodoc/itu/i18n-ar.yaml +1 -0
  9. data/lib/isodoc/itu/i18n-de.yaml +1 -0
  10. data/lib/isodoc/itu/i18n-en.yaml +1 -0
  11. data/lib/isodoc/itu/i18n-es.yaml +1 -0
  12. data/lib/isodoc/itu/i18n-fr.yaml +1 -0
  13. data/lib/isodoc/itu/i18n-ru.yaml +1 -0
  14. data/lib/isodoc/itu/i18n-zh-Hans.yaml +1 -0
  15. data/lib/isodoc/itu/itu.implementers-guide.xsl +12546 -12882
  16. data/lib/isodoc/itu/itu.in-force.xsl +12546 -12882
  17. data/lib/isodoc/itu/itu.recommendation-annex.xsl +12546 -12882
  18. data/lib/isodoc/itu/itu.recommendation-supplement.xsl +12546 -12882
  19. data/lib/isodoc/itu/itu.recommendation.xsl +12546 -12882
  20. data/lib/isodoc/itu/itu.resolution.xsl +12546 -12882
  21. data/lib/isodoc/itu/itu.service-publication.xsl +12546 -12882
  22. data/lib/isodoc/itu/itu.technical-paper.xsl +12546 -12882
  23. data/lib/isodoc/itu/itu.technical-report.xsl +12546 -12882
  24. data/lib/isodoc/itu/metadata.rb +2 -2
  25. data/lib/isodoc/itu/presentation_section.rb +24 -8
  26. data/lib/isodoc/itu/word_convert.rb +2 -1
  27. data/lib/metanorma/itu/boilerplate.adoc +3 -3
  28. data/lib/metanorma/itu/converter.rb +3 -6
  29. data/lib/metanorma/itu/front_id.rb +6 -0
  30. data/lib/metanorma/itu/isodoc.rng +51 -6
  31. data/lib/metanorma/itu/version.rb +1 -1
  32. data/metanorma-itu.gemspec +1 -2
  33. metadata +4 -18
@@ -120,7 +120,7 @@ module IsoDoc
120
120
  def docid(xml, _out)
121
121
  { docnumber: "ITU", recommendationnumber: "ITU-Recommendation",
122
122
  docnumber_lang: "ITU-lang", docnumber_td: "ITU-TemporaryDocument",
123
- docnumber_provisional: "ITU-provisional" }
123
+ docnumber_provisional: "ITU-provisional", docnumber_iso: "ISO" }
124
124
  .each do |k, v|
125
125
  dn = xml.at(ns("//bibdata/docidentifier[@type = '#{v}']")) and
126
126
  set(k, dn.text)
@@ -168,7 +168,7 @@ module IsoDoc
168
168
  set(:doctype_display, "Recommendation")
169
169
  else super
170
170
  end
171
- d = get[:doctype] and
171
+ d = get[:doctype_display] and
172
172
  set(:draft_new_doctype, @labels["draft_new"].sub("%", d))
173
173
  end
174
174
 
@@ -13,7 +13,6 @@ module IsoDoc
13
13
  "<p keep-with-next='true' class='supertitle'>" \
14
14
  "#{labelled_autonum(@i18n.get['section'].upcase, elem['id'],
15
15
  lbl)}</p>"
16
- # "<span element='fmt-element-name'>#{@i18n.get['section'].upcase}</span> #{autonum(elem['id'], lbl)}</p>"
17
16
  end
18
17
 
19
18
  def clause1_super?(elem)
@@ -43,7 +42,9 @@ module IsoDoc
43
42
  ins = elem.at(ns("./fmt-xref-label")) || elem.at(ns("./fmt-title"))
44
43
  p = (info ? @i18n.inform_annex : @i18n.norm_annex)
45
44
  .gsub("%", @i18n.doctype_dict[@meta.get[:doctype_original]] || "")
46
- ins.next = %(<p class="annex_obligation"><span class='fmt-obligation'>#{p}</span></p>)
45
+ ins.next = <<~XML
46
+ <p class="annex_obligation"><span class='fmt-obligation'>#{p}</span></p>
47
+ XML
47
48
  end
48
49
 
49
50
  def annex1_supertitle(elem)
@@ -86,16 +87,31 @@ module IsoDoc
86
87
 
87
88
  def middle_title_recommendation(isoxml, out)
88
89
  ret = ""
89
- type = @meta.get[:doctype]
90
+ id = @meta.get[:docnumber_iso] and ret += <<~XML
91
+ <p class='zzSTDTitle1'>#{@i18n.international_standard} #{id}</p>
92
+ XML
93
+ ret += middle_title_recommendation_first_line
94
+ ret += middle_title_recommendation_second_line(isoxml)
95
+ s = @meta.get[:docsubtitle] and ret += "<p class='zzSTDTitle3'>#{s}</p>"
96
+ out.previous = ret
97
+ end
98
+
99
+ def middle_title_recommendation_first_line
100
+ ret = ""
101
+ type = @meta.get[:doctype_display]
90
102
  @meta.get[:unpublished] && @meta.get[:draft_new_doctype] and
91
103
  type = @meta.get[:draft_new_doctype]
92
104
  id = @meta.get[:docnumber] and
93
- ret += "<<p class='zzSTDTitle1'>#{type} #{id}</p>"
94
- t = @meta.get[:doctitle] and
95
- ret += "<p class='zzSTDTitle2'>#{t}"
105
+ ret += "<p class='zzSTDTitle1'>#{type} #{id}</p>"
106
+ ret
107
+ end
108
+
109
+ def middle_title_recommendation_second_line(isoxml)
110
+ ret = ""
111
+ t = @meta.get[:doctitle] or return ret
112
+ ret += "<p class='zzSTDTitle2'>#{t}"
96
113
  ret += "#{title_footnotes(isoxml)}</p>"
97
- s = @meta.get[:docsubtitle] and ret += "<p class='zzSTDTitle3'>#{s}</p>"
98
- out.previous = ret
114
+ ret
99
115
  end
100
116
 
101
117
  def title_footnotes(isoxml)
@@ -102,7 +102,8 @@ module IsoDoc
102
102
  end
103
103
 
104
104
  def ol_attrs(node)
105
- { class: node["class"], id: node["id"], style: keep_style(node) }
105
+ { class: node["class"], id: node["id"], style: keep_style(node),
106
+ start: node["start"] }
106
107
  end
107
108
 
108
109
  def link_parse(node, out)
@@ -12,7 +12,7 @@ All rights reserved. No part of this publication may be reproduced, by any means
12
12
 
13
13
  ITU draws attention to the possibility that the practice or implementation of this Recommendation may involve the use of a claimed Intellectual Property Right. ITU takes no position concerning the evidence, validity or applicability of claimed Intellectual Property Rights, whether asserted by ITU members or others outside of the Recommendation development process.
14
14
 
15
- As of the date of approval of this Recommendation, ITU had {% if ip_notice_received %}{% else %}not{% endif %} received notice of intellectual property, protected by patents, which may be required to implement this Recommendation. However, implementers are cautioned that this may not represent the latest information and are therefore strongly urged to consult the TSB patent database at http://www.itu.int/ITU-T/ipr/[].
15
+ As of the date of approval of this Recommendation, ITU had {% if ip_notice_received != 'false' %}{% else %}not{% endif %} received notice of intellectual property, protected by patents, which may be required to implement this Recommendation. However, implementers are cautioned that this may not represent the latest information and are therefore strongly urged to consult the TSB patent database at http://www.itu.int/ITU-T/ipr/[].
16
16
  {% endif %}
17
17
 
18
18
  == legal-statement
@@ -45,9 +45,9 @@ and it is not to be used outside of ITU.
45
45
  {% else %}
46
46
  {% if unpublished and docnumber_provisional == nil %}
47
47
  [[draft-warning]]
48
- === CAUTION! PREPUBLISHED {{ doctype | upcase }}
48
+ === CAUTION! PREPUBLISHED {{ doctype_display | upcase }}
49
49
 
50
- This prepublication is an unedited version of a recently approved {{doctype}}.
50
+ This prepublication is an unedited version of a recently approved {{doctype_display}}.
51
51
  It will be replaced by the published version after editing. Therefore,
52
52
  there will be differences between this prepublication and the published
53
53
  version.
@@ -27,18 +27,15 @@ module Metanorma
27
27
  File.join(@libdir, "boilerplate.adoc")
28
28
  end
29
29
 
30
- def makexml(node)
31
- @draft = node.attributes.has_key?("draft")
32
- super
33
- end
34
-
35
30
  def init_misc(node)
36
31
  super
37
32
  @default_doctype = "recommendation"
38
33
  end
39
34
 
40
35
  def ol_attrs(node)
41
- attr_code(id_attr(node).merge(class: node.attr("class")))
36
+ ret = super
37
+ ret.delete(:type)
38
+ ret.merge(class: node.attr("class"))
42
39
  end
43
40
 
44
41
  def outputs(node, ret)
@@ -6,6 +6,7 @@ module Metanorma
6
6
  td_id(node, xml)
7
7
  itu_id(node, xml)
8
8
  recommendation_id(node, xml)
9
+ iso_id(node, xml)
9
10
  end
10
11
 
11
12
  def provisional_id(node, xml)
@@ -22,6 +23,11 @@ module Metanorma
22
23
  end
23
24
  end
24
25
 
26
+ def iso_id(node, xml)
27
+ a = node.attr("common-text-docnumber") and
28
+ xml.docidentifier a, type: "ISO"
29
+ end
30
+
25
31
  ITULANG = { "en" => "E", "fr" => "F", "ar" => "A", "es" => "S",
26
32
  "zh" => "C", "ru" => "R" }.freeze
27
33
 
@@ -1,6 +1,6 @@
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
- <!-- VERSION v2.0.7 -->
3
+ <!-- VERSION v2.0.8 -->
4
4
 
5
5
  <!--
6
6
  ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
@@ -72,6 +72,46 @@ but to `@anchor`, the user-supplied cross-reference</a:documentation>
72
72
  </oneOrMore>
73
73
  </element>
74
74
  </define>
75
+ <define name="review">
76
+ <a:documentation>Generalise BasicDoc element from just review comments, to general annotations;
77
+ the type attribute defaults to `review` for reviews</a:documentation>
78
+ <element name="annotation">
79
+ <ref name="RequiredId"/>
80
+ <ref name="ReviewAttributes"/>
81
+ <oneOrMore>
82
+ <ref name="paragraph">
83
+ <a:documentation>Reviewer comments content</a:documentation>
84
+ </ref>
85
+ </oneOrMore>
86
+ </element>
87
+ </define>
88
+ <define name="ruby_pronunciation">
89
+ <a:documentation>Ruby annotation giving pronunciation of text: change tag from BasicDoc for disambiguation</a:documentation>
90
+ <element name="ruby-pronunciation">
91
+ <attribute name="value">
92
+ <a:documentation>Ruby annotation value</a:documentation>
93
+ </attribute>
94
+ <ref name="LocalizedStringAttributes"/>
95
+ </element>
96
+ </define>
97
+ <define name="ruby_annotation">
98
+ <a:documentation>Ruby annotation giving information other than pronunciation of text: change tag from BasicDoc for disambiguation</a:documentation>
99
+ <element name="ruby-annotation">
100
+ <attribute name="value">
101
+ <a:documentation>Ruby annotation value</a:documentation>
102
+ </attribute>
103
+ <ref name="LocalizedStringAttributes"/>
104
+ </element>
105
+ </define>
106
+ <define name="annotation">
107
+ <a:documentation>Source code annotation, corresponding to a callout</a:documentation>
108
+ <element name="callout-annotation">
109
+ <ref name="RequiredId"/>
110
+ <oneOrMore>
111
+ <ref name="paragraph"/>
112
+ </oneOrMore>
113
+ </element>
114
+ </define>
75
115
  <define name="section-title">
76
116
  <a:documentation>Title(s) of a clause</a:documentation>
77
117
  <element name="title">
@@ -540,7 +580,7 @@ normative or informative references, some split references into sections organiz
540
580
  <ref name="OptionalId"/>
541
581
  <optional>
542
582
  <attribute name="style">
543
- <a:documentation>CSS style: only background-color supported</a:documentation>
583
+ <a:documentation>CSS style: only background-color, color, border supported</a:documentation>
544
584
  </attribute>
545
585
  </optional>
546
586
  </define>
@@ -620,7 +660,7 @@ This is done if the footnote reference is already presented in some other form,
620
660
  <ref name="RequiredId"/>
621
661
  <optional>
622
662
  <attribute name="style">
623
- <a:documentation>CSS style: only background-color supported</a:documentation>
663
+ <a:documentation>CSS style: only background-color, color, border supported</a:documentation>
624
664
  </attribute>
625
665
  </optional>
626
666
  </define>
@@ -700,6 +740,11 @@ titlecase, or lowercase</a:documentation>
700
740
  <a:documentation>Width of the table block in rendering</a:documentation>
701
741
  </attribute>
702
742
  </optional>
743
+ <optional>
744
+ <attribute name="style">
745
+ <a:documentation>CSS style: only background-color, color, border supported</a:documentation>
746
+ </attribute>
747
+ </optional>
703
748
  <ref name="BlockAttributes"/>
704
749
  </define>
705
750
  <define name="FigureAttributes" combine="interleave">
@@ -1417,7 +1462,7 @@ numbers</a:documentation>
1417
1462
  </optional>
1418
1463
  <ref name="DocumentBody"/>
1419
1464
  <optional>
1420
- <ref name="review-container">
1465
+ <ref name="annotation-container">
1421
1466
  <a:documentation>Annotations to the document</a:documentation>
1422
1467
  </ref>
1423
1468
  </optional>
@@ -1461,8 +1506,8 @@ numbers</a:documentation>
1461
1506
  </oneOrMore>
1462
1507
  </element>
1463
1508
  </define>
1464
- <define name="review-container">
1465
- <element name="review-container">
1509
+ <define name="annotation-container">
1510
+ <element name="annotation-container">
1466
1511
  <oneOrMore>
1467
1512
  <ref name="review"/>
1468
1513
  </oneOrMore>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Itu
3
- VERSION = "2.6.8".freeze
3
+ VERSION = "2.7.0".freeze
4
4
  end
5
5
  end
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.require_paths = ["lib"]
26
26
  spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
27
27
 
28
- spec.add_dependency "metanorma-standoc", "~> 3.0.0"
28
+ spec.add_dependency "metanorma-standoc", "~> 3.1.0"
29
29
  spec.add_dependency "pubid"
30
30
  spec.add_dependency "twitter_cldr", ">= 3.0.0"
31
31
  spec.add_dependency "tzinfo-data" # we need this for windows only
@@ -41,7 +41,6 @@ spec.add_development_dependency "rubocop-performance"
41
41
  spec.add_development_dependency "sassc-embedded", "~> 1"
42
42
  spec.add_development_dependency "simplecov", "~> 0.15"
43
43
  spec.add_development_dependency "timecop", "~> 0.9"
44
- spec.add_development_dependency "vcr", "~> 6.1.0"
45
44
  spec.add_development_dependency "webmock"
46
45
  spec.add_development_dependency "xml-c14n"
47
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-itu
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.8
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-06-09 00:00:00.000000000 Z
11
+ date: 2025-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.0
19
+ version: 3.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 3.0.0
26
+ version: 3.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pubid
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -220,20 +220,6 @@ dependencies:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0.9'
223
- - !ruby/object:Gem::Dependency
224
- name: vcr
225
- requirement: !ruby/object:Gem::Requirement
226
- requirements:
227
- - - "~>"
228
- - !ruby/object:Gem::Version
229
- version: 6.1.0
230
- type: :development
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- requirements:
234
- - - "~>"
235
- - !ruby/object:Gem::Version
236
- version: 6.1.0
237
223
  - !ruby/object:Gem::Dependency
238
224
  name: webmock
239
225
  requirement: !ruby/object:Gem::Requirement