metanorma-itu 1.0.0 → 1.0.1

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: a01b41f5c9f8d50fb914d13b31886549d419b83e8d034c0ca4e5d9e994761432
4
- data.tar.gz: e800c96be0ffd2c15c1843a2f40a43b794db520d7ce4f49eb00bab5ad83f3598
3
+ metadata.gz: 66a239389cf1af0edc1da2b0e4544f410ac653fddc89d067a144e77b57b2eef5
4
+ data.tar.gz: '0891530512830674abbf98a184c40f02316049e53098769910fb662597e7c5be'
5
5
  SHA512:
6
- metadata.gz: e3c84c117a175f638dc17acd752d9fa6009e0d211b7b2c36490c53f4d6325515ec901790266ad3f3222d20a0f47a9c2cf899b0d90fa9c395f3e5c31b546d3d91
7
- data.tar.gz: 8b72c08d2ff1bd1933c1bb0227d99768b202f2671d217b556e39de208f67d112f09c1ebba12d4f90699ecc3be02c04e384aae470687c235b24a1b8a711e66b33
6
+ metadata.gz: 61b16c2f290c2969a3c21f2bc1bc4f16e55bc50b847bd4a51c1562f34614f9865a591a4f41dc6759ed4300db2061b1484f2aa4d1b7281b853638ce22dc491919
7
+ data.tar.gz: c17a28663f612e773f092521e09df621d78fec768c4bbbb8bb8b62d4f5afdb5544a351297f406cba48428823502d74a54ce4291359c0cc7b53c49477a88dc532
data/README.adoc CHANGED
@@ -66,7 +66,6 @@ See https://www.metanorma.com/author/itu/[Write ITU-T documents with Metanorma].
66
66
 
67
67
  == Examples
68
68
 
69
- * link:spec/examples/rfc6350.adoc[] is an Metanorma Asciidoctor version of https://tools.ietf.org/html/rfc6350[RFC 6350].
70
- * link:spec/examples/rfc6350.html[] is an HTML file generated from the Asciidoctor.
71
- * link:spec/examples/rfc6350.doc[] is a Word document generated from the Asciidoctor.
69
+ * Example documents are avalable at the https://github.com/metanorma/mn-samples-itu[mn-samples-itu] repository.
70
+ * Document templates are available at the https://github.com/metanorma/mn-templates-itu[mn-templates-itu] repository.
72
71
 
@@ -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">
@@ -88,6 +88,31 @@ module Asciidoctor
88
88
  biblio_reorder1(r)
89
89
  end
90
90
  end
91
+
92
+ def boilerplate_cleanup(xmldoc)
93
+ super
94
+ initial_boilerplate(xmldoc)
95
+ end
96
+
97
+ def initial_boilerplate(x)
98
+ return if x.at("//boilerplate")
99
+ preface = x.at("//preface") || x.at("//sections") || x.at("//annex") ||
100
+ x.at("//references") || return
101
+ preface.previous = boilerplate(x)
102
+ end
103
+
104
+ def boilerplate(x_orig)
105
+ x = x_orig.dup
106
+ # TODO variable
107
+ x.root.add_namespace(nil, Metanorma::ITU::DOCUMENT_NAMESPACE)
108
+ x = Nokogiri::XML(x.to_xml)
109
+ conv = IsoDoc::ITU::HtmlConvert.new({})
110
+ conv.metadata_init("en", "Latn", {})
111
+ conv.info(x, nil)
112
+ file = @boilerplateauthority ? "#{@localdir}/#{@boilerplateauthority}" :
113
+ File.join(File.dirname(__FILE__), "itu_intro.xml")
114
+ conv.populate_template((File.read(file, encoding: "UTF-8")), nil)
115
+ end
91
116
  end
92
117
  end
93
118
  end
@@ -43,7 +43,9 @@ module Asciidoctor
43
43
  end
44
44
 
45
45
  def doctype(node)
46
- node.attr("doctype") || "recommendation"
46
+ ret = node.attr("doctype") || "recommendation"
47
+ ret = "recommendation" if ret == "article"
48
+ ret
47
49
  end
48
50
 
49
51
  def olist(node)
@@ -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>
@@ -147,13 +147,13 @@
147
147
  </oneOrMore>
148
148
  </element>
149
149
  </define>
150
- <define name="TextElement" combine="choice">
151
- <choice>
152
- <ref name="add"/>
153
- <ref name="del"/>
154
- </choice>
155
- </define>
156
150
  </include>
151
+ <define name="TextElement" combine="choice">
152
+ <choice>
153
+ <ref name="add"/>
154
+ <ref name="del"/>
155
+ </choice>
156
+ </define>
157
157
  <define name="add">
158
158
  <element name="add">
159
159
  <choice>
@@ -0,0 +1,48 @@
1
+ <boilerplate>
2
+ <legal-statement>
3
+ <clause>
4
+ <title>FOREWORD</title>
5
+ <p>The International Telecommunication Union (ITU) is the United Nations specialized agency in the field of telecommunications , information and communication technologies (ICTs). The ITU Telecommunication Standardization Sector (ITU-T) is a permanent organ of ITU. ITU-T is responsible for studying technical, operating and tariff questions and issuing Recommendations on them with a view to standardizing telecommunications on a worldwide basis.</p>
6
+ <p>The World Telecommunication Standardization Assembly (WTSA), which meets every four years, establishes the topics for study by the ITU T study groups which, in turn, produce Recommendations on these topics.</p>
7
+ <p>The approval of ITU-T Recommendations is covered by the procedure laid down in WTSA Resolution 1 .</p>
8
+ <p>In some areas of information technology which fall within ITU-T's purview, the necessary standards are prepared on a collaborative basis with ISO and IEC.</p>
9
+
10
+
11
+ <clause>
12
+ <title>NOTE</title>
13
+ <p>In this Recommendation, the expression "Administration" is used for conciseness to indicate both a telecommunication administration and a recognized operating agency .</p>
14
+ <p>Compliance with this Recommendation is voluntary. However, the Recommendation may contain certain mandatory provisions (to ensure, e.g., interoperability or applicability) and compliance with the Recommendation is achieved when all of these mandatory provisions are met. The words "shall" or some other obligatory language such as "must" and the negative equivalents are used to express requirements. The use of such words does not suggest that compliance with the Recommendation is required of any party .</p>
15
+ </clause>
16
+ </clause>
17
+
18
+ {% if unpublished %}
19
+ <clause id="draft-warning">
20
+ <title>CAUTION! PREPUBLISHED {{ doctype | upcase }}</title>
21
+ <p>This
22
+ prepublication is an unedited version of a recently approved {{doctype}}.
23
+ It will be replaced by the published version after editing. Therefore,
24
+ there will be differences between this prepublication and the published
25
+ version.</p>
26
+ </clause>
27
+ {% endif %}
28
+ </legal-statement>
29
+
30
+ <copyright-statement>
31
+ <clause>
32
+ <p>&copy; ITU {{ docyear }}</p>
33
+ <p>All rights reserved. No part of this publication may be reproduced, by any means whatsoever, without the prior written permission of ITU.</p>
34
+ </clause>
35
+ </copyright-statement>
36
+
37
+ <license-statement>
38
+ <clause>
39
+ <title>INTELLECTUAL PROPERTY RIGHTS</title>
40
+ <p>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.</p>
41
+ <p>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 <link target="http://www.itu.int/ITU-T/ipr/"/>.
42
+ </p>
43
+ </clause>
44
+ </license-statement>
45
+ </boilerplate>
46
+
47
+
48
+
@@ -176,6 +176,18 @@ module IsoDoc
176
176
  case node.name
177
177
  when "add" then add_parse(node, out)
178
178
  when "del" then del_parse(node, out)
179
+ when "copyright-statement"
180
+ out.div **{class: "copyright"} do |div|
181
+ node.children.each { |n| parse(n, div) }
182
+ end
183
+ when "license-statement"
184
+ out.div **{class: "license"} do |div|
185
+ node.children.each { |n| parse(n, out) }
186
+ end
187
+ when "legal-statement"
188
+ out.div **{class: "legal"} do |div|
189
+ node.children.each { |n| parse(n, out) }
190
+ end
179
191
  else
180
192
  super
181
193
  end
@@ -199,6 +211,22 @@ module IsoDoc
199
211
  end
200
212
  node.children.each { |n| parse(n, div) }
201
213
  end
214
+
215
+ def boilerplate(node, out)
216
+ boilerplate = node.at(ns("//boilerplate")) or return
217
+ out.div **{class: "authority"} do |s|
218
+ boilerplate.children.each do |n|
219
+ if n.name == "title"
220
+ s.h1 do |h|
221
+ n.children.each { |nn| parse(nn, h) }
222
+ end
223
+ else
224
+ parse(n, s)
225
+ end
226
+ end
227
+ end
228
+ end
229
+
202
230
  end
203
231
  end
204
232
  end
@@ -1,37 +1,5 @@
1
- <p>FOREWORD</p>
2
- <p>The International Telecommunication Union (ITU) is the United Nations specialized agency in the field of telecommunications , information and communication technologies (ICTs). The ITU Telecommunication Standardization Sector (ITU-T) is a permanent organ of ITU. ITU-T is responsible for studying technical, operating and tariff questions and issuing Recommendations on them with a view to standardizing telecommunications on a worldwide basis.</p>
3
- <p>The World Telecommunication Standardization Assembly (WTSA), which meets every four years, establishes the topics for study by the ITU T study groups which, in turn, produce Recommendations on these topics.</p>
4
- <p>The approval of ITU-T Recommendations is covered by the procedure laid down in WTSA Resolution 1 .</p>
5
- <p>In some areas of information technology which fall within ITU-T's purview, the necessary standards are prepared on a collaborative basis with ISO and IEC.</p>
6
-
7
-
8
-
9
- <p>NOTE</p>
10
- <p>In this Recommendation, the expression "Administration" is used for conciseness to indicate both a telecommunication administration and a recognized operating agency .</p>
11
- <p>Compliance with this Recommendation is voluntary. However, the Recommendation may contain certain mandatory provisions (to ensure, e.g., interoperability or applicability) and compliance with the Recommendation is achieved when all of these mandatory provisions are met. The words "shall" or some other obligatory language such as "must" and the negative equivalents are used to express requirements. The use of such words does not suggest that compliance with the Recommendation is required of any party .</p>
12
-
13
-
14
-
15
-
16
- <p>INTELLECTUAL PROPERTY RIGHTS</p>
17
- <p>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.</p>
18
- {% if unpublished %}
19
- <p>As of the date of approval of this Recommendation, ITU [had/had not] 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 <a href="http://www.itu.int/ITU-T/ipr/">http://www.itu.int/ITU-T/ipr/</a>.
20
- </p>
21
- {% else %}
22
- {% if ip_notice_received %}
23
- <p>As of the date of approval of this Recommendation, ITU had 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 <a href="http://www.itu.int/ITU-T/ipr/">http://www.itu.int/ITU-T/ipr/</a>.
24
- </p>
25
- {% else %}
26
- <p>As of the date of approval of this Recommendation, ITU had not 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 <a href="http://www.itu.int/ITU-T/ipr/">http://www.itu.int/ITU-T/ipr/</a>.
27
- </p>
28
- {% endif %}
29
- {% endif %}
30
-
31
-
32
-
33
- <p>&copy; ITU 2019</p>
34
- <p>All rights reserved. No part of this publication may be reproduced, by any means whatsoever, without the prior written permission of ITU.</p>
1
+ <div id="legal"/>
2
+ <div id="license"/>
35
3
 
36
4
 
37
5
 
@@ -30,9 +30,9 @@
30
30
  {% if edition %} <div> Revision {{ edition }}</div> {% endif %}
31
31
  <div> {{ draftinfo }}</div>
32
32
  </div>
33
- {% if annexid %}
34
- <div class="doc-identifier">{{annexid}}</div>
35
- {% endif %}
33
+ {% if annexid %}
34
+ <div class="doc-identifier">{{annexid}}</div>
35
+ {% endif %}
36
36
  <div class="publication-month">
37
37
  ({{ pubdate_monthyear }})
38
38
  </div>
@@ -72,8 +72,8 @@
72
72
  {% endif %}
73
73
  <div>
74
74
  <span class="doc-type">{% if stage == "Draft" %}Draft {% endif %}{{ doctype }}</span>
75
- <span class="ITU-sector">ITU-{{ bureau }}</span>
76
- <span class="doc-identifier">{{ docnumber }}</span>
75
+ <span class="ITU-sector">ITU-{{ bureau }}</span>
76
+ <span class="doc-identifier">{{ docnumber }}</span>
77
77
  </div>
78
78
 
79
79
  </div>
@@ -95,54 +95,31 @@
95
95
  <span class="coverpage-maturity" id="{{ stage }}">{{ stage }}</span>
96
96
 
97
97
  </div>
98
- -->
99
-
98
+ -->
100
99
 
101
- {% if unpublished %}
102
- <div class="coverpage-warning">
103
- <span class="title">Warning for Drafts</span>
100
+ <div class="coverpage-warning">
101
+ <div class="draft-warning"/>
102
+ </div>
104
103
 
105
- <p class="content">
106
- This
107
- prepublication is an unedited version of a recently approved Recommendation.
108
- It will be replaced by the published version after editing. Therefore,
109
- there will be differences between this prepublication and the published
110
- version.
111
- </p>
112
- </div>
113
- {% endif %}
114
-
115
- <div class="info-section">
116
- <div class="copyright">
117
-
118
- <p class="year">
119
- &copy; {{ docyear }} ITU.
120
- </p>
121
-
122
- <p class="message">
123
- All rights reserved. Unless otherwise specified, no part of this
124
- publication may be reproduced or utilized otherwise in any form or by any
125
- means, electronic or mechanical, including photocopying, or posting on the
126
- internet or an intranet, without prior written permission. Permission can
127
- be requested from the address below.
128
- </p>
129
-
130
- <div class="contact-info">
131
- <p class="name">International Telecommunication Union</p>
132
- <p class="address">
133
- Place des Nations
134
- 1211 Geneva 20 Switzerland
135
- <br />
136
- <a href="mailto:itumail@itu.int">itumail@itu.int</a><br />
137
- <a href="www.itu.int">www.itu.int</a>
138
- </p>
139
- </div>
104
+ <div class="info-section">
105
+ <div id="copyright"/>
106
+
107
+ <div class="contact-info">
108
+ <p class="name">International Telecommunication Union</p>
109
+ <p class="address">
110
+ Place des Nations
111
+ 1211 Geneva 20 Switzerland
112
+ <br />
113
+ <a href="mailto:itumail@itu.int">itumail@itu.int</a><br />
114
+ <a href="www.itu.int">www.itu.int</a>
115
+ </p>
116
+ </div>
140
117
 
141
118
 
142
- </div>
119
+ </div>
143
120
 
144
- <div class="rule"></div>
145
- </div>
121
+ <div class="rule"></div>
122
+ </div>
146
123
  </div>
147
124
 
148
125
 
@@ -1000,6 +1000,10 @@ span.doc-title {
1000
1000
  border-radius: 25px;
1001
1001
  }
1002
1002
 
1003
+ .coverpage-warning h1 {
1004
+ margin-top: 0em;
1005
+ }
1006
+
1003
1007
  .coverpage-warning .title {
1004
1008
  font-family: $bodyfont;
1005
1009
  font-weight: 300;
@@ -762,6 +762,25 @@ p.RecNo, li.RecNo, div.RecNo
762
762
  mso-fareast-language:EN-US;
763
763
  font-weight:bold;
764
764
  mso-bidi-font-weight:normal;}
765
+ p.boilerplateHdr {
766
+ text-align:center;
767
+ font-family:$bodyfont;
768
+ font-size:11.0pt;
769
+ }
770
+ p.boilerplate {
771
+ font-family:$bodyfont;
772
+ font-size:11.0pt;
773
+ text-align:justify;
774
+ margin-top:6.0pt;
775
+ margin-bottom:0.0pt;
776
+ }
777
+ p.draftwarningHdr {
778
+ text-align:center;
779
+ font-family:$bodyfont;
780
+ font-weight:bold;
781
+ font-size:16.0pt;
782
+ font-style:italic;
783
+ }
765
784
  span.addition {
766
785
  color: blue;
767
786
  }
@@ -125,162 +125,9 @@ style='mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></span></p>
125
125
  <p><br clear=all
126
126
  style='page-break-before:always'></p>
127
127
 
128
- <p class=MsoNormal align=center style='margin-top:24.0pt;text-align:center'><span
129
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
130
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>FOREWORD<o:p></o:p></span></span></p>
131
-
132
- <p class=MsoNormal><span style='mso-bookmark:_Hlk526346232'><span lang=EN-US
133
- style='font-size:11.0pt;mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>The
134
- International Telecommunication Union (ITU) is the United Nations specialized
135
- agency in the field of tele­com­mu­ni­ca­tions</span></span><span
136
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
137
- mso-ansi-language:EN-US'>, information and communication technologies (ICTs).</span></span><span
138
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
139
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'> The ITU Telecommunication
140
- Standardization Sector (ITU-T) is a permanent organ of ITU. ITU-T is
141
- responsible for studying technical, operating and tariff questions and issuing
142
- Recommendations on them with a view to standardizing telecommunications on a
143
- worldwide basis.<o:p></o:p></span></span></p>
144
-
145
- <p class=MsoNormal><span style='mso-bookmark:_Hlk526346232'><span lang=EN-US
146
- style='font-size:11.0pt;mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>The <a
147
- name=iitexte>World Telecommunication Standardization Assembly (WTSA), which
148
- meets every four years, establishes the topics for study by the ITU‑T study
149
- groups which, in turn, produce Recommendations on these topics.<o:p></o:p></a></span></span></p>
150
-
151
- <p class=MsoNormal><span style='mso-bookmark:_Hlk526346232'><span
152
- style='mso-bookmark:iitexte'><span lang=EN-US style='font-size:11.0pt;
153
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>The approval of ITU-T
154
- Recommendations is covered by the procedure laid down in WTSA Resolution&nbsp;1</span></span></span><span
155
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
156
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>.<o:p></o:p></span></span></p>
157
-
158
- <p class=MsoNormal><span style='mso-bookmark:_Hlk526346232'><span lang=EN-US
159
- style='font-size:11.0pt;mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>In
160
- some areas of information technology which fall within ITU-T's purview, the
161
- necessary standards are prepared on a collaborative basis with ISO and IEC.<o:p></o:p></span></span></p>
162
-
163
- <p class=MsoNormal align=center style='text-align:center'><span
164
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
165
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></span></p>
166
-
167
- <p class=MsoNormal align=center style='text-align:center'><span
168
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
169
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></span></p>
170
-
171
- <p class=MsoNormal align=center style='text-align:center'><span
172
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
173
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></span></p>
174
-
175
- <p class=MsoNormal align=center style='text-align:center'><span
176
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
177
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>NOTE<o:p></o:p></span></span></p>
178
-
179
- <p class=MsoNormal style='margin-top:9.0pt'><span style='mso-bookmark:_Hlk526346232'><span
180
- lang=EN-GB style='font-size:11.0pt;mso-bidi-font-size:10.0pt'>In <a
181
- name=iitextea>this Recommendation, the expression &quot;Administration&quot; is
182
- used for conciseness to indicate both a telecommunication administration and a
183
- recognized operating agency</a></span></span><span style='mso-bookmark:_Hlk526346232'><span
184
- style='mso-bookmark:iitextea'><span lang=EN-US style='font-size:11.0pt;
185
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>.<o:p></o:p></span></span></span></p>
186
-
187
- <p class=MsoNormal style='margin-top:9.0pt'><span style='mso-bookmark:_Hlk526346232'><span
188
- style='mso-bookmark:iitextea'><span lang=EN-US style='font-size:11.0pt;
189
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>Compliance with this
190
- Recommendation is voluntary. However, the Recommendation may contain certain
191
- mandatory provisions (to ensure, e.g., interoperability or applicability) and
192
- compliance with the Recommendation is achieved when all of these mandatory
193
- provisions are met. The words &quot;shall&quot; or some other obligatory
194
- language such as &quot;must&quot; and the negative equivalents are used to
195
- express requirements. The use of such words does not suggest that compliance
196
- with the Recommendation is required of any party</span></span></span><span
197
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
198
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>.<o:p></o:p></span></span></p>
199
-
200
- <p class=MsoNormal align=center style='text-align:center'><span
201
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
202
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></span></p>
203
-
204
- <p class=MsoNormal align=center style='text-align:center'><span
205
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
206
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></span></p>
207
-
208
- <p class=MsoNormal align=center style='text-align:center'><span
209
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
210
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></span></p>
211
-
212
- <p class=MsoNormal align=center style='text-align:center'><span
213
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
214
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></span></p>
215
-
216
- <p class=MsoNormal align=center style='text-align:center'><span
217
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
218
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>INTELLECTUAL PROPERTY RIGHTS</span></span><span
219
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
220
- mso-bidi-font-size:10.0pt;font-family:Symbol;mso-ansi-language:EN-US'><o:p></o:p></span></span></p>
221
-
222
- <p class=MsoNormal><span style='mso-bookmark:_Hlk526346232'><span lang=EN-US
223
- style='font-size:11.0pt;mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>ITU <a
224
- name=iitexteb>draws attention to the possibility that the practice or
225
- implementation of this Recommendation may involve the use of a claimed
226
- Intellectual Property Right. ITU takes no position concerning the evidence,
227
- validity or applicability of claimed Intellectual Property Rights, whether
228
- asserted by ITU members or others outside of the Recommendation development
229
- process.<o:p></o:p></a></span></span></p>
230
-
231
- {% if unpublished %}
232
- <p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;
233
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>As of the date of approval
234
- of this Recommendation, ITU [had/had not] received notice of intellectual property,
235
- protected by patents, which may be required to implement this Recommendation.
236
- However, implementers are cautioned that this may not represent the latest
237
- information and are therefore strongly urged to consult the TSB patent database at
238
- <a href="http://www.itu.int/ITU-T/ipr/">http://www.itu.int/ITU-T/ipr/</a>.</span></p>
239
- {% else %}
240
- {% if ip_notice_received %}
241
- <p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;
242
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>As of the date of approval
243
- of this Recommendation, ITU had received notice of intellectual property,
244
- protected by patents, which may be required to implement this Recommendation.
245
- However, implementers are cautioned that this may not represent the latest
246
- information and are therefore strongly urged to consult the TSB patent database at
247
- <a href="http://www.itu.int/ITU-T/ipr/">http://www.itu.int/ITU-T/ipr/</a>.</span></p>
248
- {% else %}
249
- <p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;
250
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>As of the date of approval
251
- of this Recommendation, ITU had not received notice of intellectual property,
252
- protected by patents, which may be required to implement this Recommendation.
253
- However, implementers are cautioned that this may not represent the latest
254
- information and are therefore strongly urged to consult the TSB patent database at
255
- <a href="http://www.itu.int/ITU-T/ipr/">http://www.itu.int/ITU-T/ipr/</a>.</span></p>
256
- {% endif %}
257
- {% endif %}
258
-
259
- <p class=MsoNormal align=center style='text-align:center'><span
260
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
261
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></span></p>
262
-
263
- <p class=MsoNormal align=center style='text-align:center'><span
264
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
265
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></span></p>
266
-
267
- <p class=MsoNormal align=center style='text-align:center'><span
268
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
269
- mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></span></span></p>
270
-
271
- <p class=MsoNormal align=center style='text-align:center'><span
272
- style='mso-bookmark:_Hlk526346232'><span lang=EN-US style='font-size:11.0pt;
273
- mso-bidi-font-size:10.0pt;font-family:Symbol;mso-ascii-font-family:"Times New Roman";
274
- mso-hansi-font-family:"Times New Roman";mso-ansi-language:EN-US;mso-char-type:
275
- symbol;mso-symbol-font-family:Symbol'><span style='mso-char-type:symbol;
276
- mso-symbol-font-family:Symbol'>ã</span></span></span><span style='mso-bookmark:
277
- _Hlk526346232'><span lang=EN-US style='font-size:11.0pt;mso-bidi-font-size:
278
- 10.0pt;mso-ansi-language:EN-US'>&nbsp;ITU&nbsp;<a name=iiannee></a>2019<o:p></o:p></span></span></p>
279
-
280
- <p class=MsoNormal><span style='mso-bookmark:_Hlk526346232'><span lang=EN-US
281
- style='font-size:11.0pt;mso-bidi-font-size:10.0pt;mso-ansi-language:EN-US'>All
282
- rights reserved. No part of this publication may be reproduced, by any means
283
- whatsoever, without the prior written permission of ITU.<o:p></o:p></span></span></p>
128
+ <div id="legal"/>
129
+ <div id="license"/>
130
+ <div id="copyright"/>
284
131
 
285
132
  <b style='mso-bidi-font-weight:normal'><span lang=EN-US style='font-size:12.0pt;
286
133
  mso-bidi-font-size:10.0pt;font-family:"Times New Roman",serif;mso-fareast-font-family:
@@ -221,21 +221,7 @@
221
221
  none;border-bottom:solid windowtext 2.25pt;border-right:solid windowtext 2.25pt;
222
222
  mso-border-top-alt:solid windowtext 2.25pt;mso-border-left-alt:solid windowtext 2.25pt;
223
223
  padding:0cm 5.4pt 0cm 5.4pt;height:4.0cm;mso-height-rule:exactly'>
224
- <p class="MsoNormal" align="center" style='text-align:center'><b
225
- style='mso-bidi-font-weight:normal'><i style='mso-bidi-font-style:normal'><span
226
- lang="EN-GB" style='font-size:16.0pt;mso-bidi-font-size:10.0pt'>CAUTION !<o:p></o:p></span></i></b></p>
227
- <p class="MsoNormal" align="center" style='margin-top:3.0pt;text-align:center'><span
228
- class="SpellE"><b style='mso-bidi-font-weight:normal'><i style='mso-bidi-font-style:
229
- normal'><span lang="EN-GB" style='font-size:16.0pt;mso-bidi-font-size:10.0pt'>PREPUBLISHED</span></i></b></span><b
230
- style='mso-bidi-font-weight:normal'><i style='mso-bidi-font-style:normal'><span
231
- lang="EN-GB" style='font-size:16.0pt;mso-bidi-font-size:10.0pt'><span
232
- style='mso-spacerun:yes'>  </span>{{ doctype | upcase }}<o:p></o:p></span></i></b></p>
233
- <p class="MsoNormal" style='tab-stops:right 17.0cm'><span lang="EN-GB">This
234
- prepublication is an unedited version of a recently approved {{doctype}}.
235
- It&#xA0;will be replaced by the published version after editing. Therefore,
236
- there will be differences between this prepublication and the published
237
- version.</span><span lang="EN-GB" style='font-size:9.0pt;mso-bidi-font-size:
238
- 10.0pt;font-family:"Arial",sans-serif;mso-bidi-font-family:"Times New Roman"'><o:p></o:p></span></p>
224
+ <div class="draft-warning"/>
239
225
  </td>
240
226
  </tr>
241
227
  {% else %}
@@ -15,12 +15,6 @@ module IsoDoc
15
15
  super
16
16
  end
17
17
 
18
- #def convert1(docxml, filename, dir)
19
- # FileUtils.cp html_doc_path('Logo_ITU.jpg'), "#{@localdir}/Logo_ITU.jpg"
20
- # @files_to_delete << "#{@localdir}/Logo_ITU.jpg"
21
- # super
22
- #end
23
-
24
18
  def default_fonts(options)
25
19
  {
26
20
  bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Open Sans",sans-serif'),
@@ -55,6 +49,7 @@ module IsoDoc
55
49
 
56
50
  def make_body3(body, docxml)
57
51
  body.div **{ class: "main-section" } do |div3|
52
+ boilerplate docxml, div3
58
53
  abstract docxml, div3
59
54
  preface docxml, div3
60
55
  middle docxml, div3
@@ -63,7 +58,26 @@ module IsoDoc
63
58
  end
64
59
  end
65
60
 
66
- include BaseConvert
61
+ def html_preface(docxml)
62
+ super
63
+ authority_cleanup(docxml)
64
+ docxml
65
+ end
66
+
67
+ def authority_cleanup(docxml)
68
+ dest = docxml.at("//div[@class = 'draft-warning']")
69
+ auth = docxml.at("//div[@id = 'draft-warning']")
70
+ auth&.xpath(".//h1 | .//h2")&.each { |h| h["class"] = "IntroTitle" }
71
+ dest and auth and dest.replace(auth.remove)
72
+ %w(copyright license legal).each do |t|
73
+ dest = docxml.at("//div[@id = '#{t}']")
74
+ auth = docxml.at("//div[@class = '#{t}']")
75
+ auth&.xpath(".//h1 | .//h2")&.each { |h| h["class"] = "IntroTitle" }
76
+ dest and auth and dest.replace(auth.remove)
77
+ end
78
+ end
79
+
80
+ include BaseConvert
67
81
  end
68
82
  end
69
83
  end
@@ -57,6 +57,7 @@ module IsoDoc
57
57
 
58
58
  def make_body3(body, docxml)
59
59
  body.div **{ class: "main-section" } do |div3|
60
+ boilerplate docxml, div3
60
61
  abstract docxml, div3
61
62
  preface docxml, div3
62
63
  middle docxml, div3
@@ -65,6 +66,25 @@ module IsoDoc
65
66
  end
66
67
  end
67
68
 
69
+ def html_preface(docxml)
70
+ super
71
+ authority_cleanup(docxml)
72
+ docxml
73
+ end
74
+
75
+ def authority_cleanup(docxml)
76
+ dest = docxml.at("//div[@class = 'draft-warning']")
77
+ auth = docxml.at("//div[@id = 'draft-warning']")
78
+ auth&.xpath(".//h1 | .//h2")&.each { |h| h["class"] = "IntroTitle" }
79
+ dest and auth and dest.replace(auth.remove)
80
+ %w(copyright license legal).each do |t|
81
+ dest = docxml.at("//div[@id = '#{t}']")
82
+ auth = docxml.at("//div[@class = '#{t}']")
83
+ auth&.xpath(".//h1 | .//h2")&.each { |h| h["class"] = "IntroTitle" }
84
+ dest and auth and dest.replace(auth.remove)
85
+ end
86
+ end
87
+
68
88
  include BaseConvert
69
89
  end
70
90
  end
@@ -26,6 +26,7 @@ module IsoDoc
26
26
  def make_body2(body, docxml)
27
27
  body.div **{ class: "WordSection2" } do |div2|
28
28
  info docxml, div2
29
+ boilerplate docxml, div2
29
30
  abstract docxml, div2
30
31
  keywords docxml, div2
31
32
  preface docxml, div2
@@ -70,7 +71,9 @@ module IsoDoc
70
71
  word_preface_cleanup(docxml)
71
72
  word_term_cleanup(docxml)
72
73
  word_history_cleanup(docxml)
74
+ authority_hdr_cleanup(docxml)
73
75
  super
76
+ authority_cleanup(docxml)
74
77
  docxml
75
78
  end
76
79
 
@@ -124,15 +127,6 @@ module IsoDoc
124
127
  end
125
128
  end
126
129
 
127
- #def convert1(docxml, filename, dir)
128
- #FileUtils.cp html_doc_path('itu-document-comb.png'),
129
- #File.join(@localdir, "itu-document-comb.png")
130
- #FileUtils.cp html_doc_path('logo.png'), File.join(@localdir, "logo.png")
131
- #@files_to_delete << File.join(@localdir, "itu-document-comb.png")
132
- #@files_to_delete << File.join(@localdir, "logo.png")
133
- #super
134
- #end
135
-
136
130
  def default_fonts(options)
137
131
  { bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' :
138
132
  '"Times New Roman",serif'),
@@ -161,16 +155,16 @@ module IsoDoc
161
155
  end
162
156
  end
163
157
 
164
- def toWord(result, filename, dir, header)
165
- result = populate_template(result, :word)
166
- result = from_xhtml(word_cleanup(to_xhtml(result)))
167
- Html2Doc.process(result, filename: filename, stylesheet: @wordstylesheet&.path,
168
- header_file: header&.path, dir: dir,
169
- asciimathdelims: [@openmathdelim, @closemathdelim],
170
- liststyles: { ul: @ulstyle, ol: @olstyle, steps: "l4" })
171
- header&.unlink
172
- @wordstylesheet&.unlink
173
- end
158
+ def toWord(result, filename, dir, header)
159
+ result = populate_template(result, :word)
160
+ result = from_xhtml(word_cleanup(to_xhtml(result)))
161
+ Html2Doc.process(result, filename: filename, stylesheet: @wordstylesheet&.path,
162
+ header_file: header&.path, dir: dir,
163
+ asciimathdelims: [@openmathdelim, @closemathdelim],
164
+ liststyles: { ul: @ulstyle, ol: @olstyle, steps: "l4" })
165
+ header&.unlink
166
+ @wordstylesheet&.unlink
167
+ end
174
168
 
175
169
  =begin
176
170
  def eref_parse(node, out)
@@ -189,15 +183,52 @@ module IsoDoc
189
183
  end
190
184
  =end
191
185
 
192
- def link_parse(node, out)
193
- out.a **attr_code(href: node["target"], title: node["alt"], class: "url") do |l|
194
- if node.text.empty?
195
- l << node["target"].sub(/^mailto:/, "")
196
- else
197
- node.children.each { |n| parse(n, l) }
186
+ def link_parse(node, out)
187
+ out.a **attr_code(href: node["target"], title: node["alt"], class: "url") do |l|
188
+ if node.text.empty?
189
+ l << node["target"].sub(/^mailto:/, "")
190
+ else
191
+ node.children.each { |n| parse(n, l) }
192
+ end
193
+ end
194
+ end
195
+
196
+ def authority_hdr_cleanup(docxml)
197
+ docxml&.xpath("//div[@id = 'draft-warning']").each do |d|
198
+ d.xpath(".//h1 | .//h2").each do |p|
199
+ p.name = "p"
200
+ p["class"] = "draftwarningHdr"
201
+ end
202
+ end
203
+ %w(copyright license legal).each do |t|
204
+ docxml&.xpath("//div[@class = '#{t}']").each do |d|
205
+ p = d&.at("./descendant::h1[2]") and
206
+ p.previous = "<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>"
207
+ d.xpath(".//h1 | .//h2").each do |p|
208
+ p.name = "p"
209
+ p["class"] = "boilerplateHdr"
210
+ end
211
+ end
212
+ end
213
+ end
214
+
215
+ def authority_cleanup(docxml)
216
+ dest = docxml.at("//div[@class = 'draft-warning']")
217
+ auth = docxml.at("//div[@id = 'draft-warning']")
218
+ dest and auth and dest.replace(auth.remove)
219
+ %w(copyright license legal).each do |t|
220
+ dest = docxml.at("//div[@id = '#{t}']")
221
+ auth = docxml.at("//div[@class = '#{t}']")
222
+ next unless auth && dest
223
+ t == "copyright" and p = auth&.at(".//p[@class = 'Normalaftertitle']") and
224
+ p["class"] = "boilerplateHdr"
225
+ auth&.xpath(".//p[not(@class) or @class = 'Normalaftertitle']")&.each do |p|
226
+ p["class"] = "boilerplate"
227
+ end
228
+ auth << "<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>" unless t == "copyright"
229
+ dest.replace(auth.remove)
198
230
  end
199
231
  end
200
- end
201
232
 
202
233
  include BaseConvert
203
234
  end
@@ -46,9 +46,8 @@ module IsoDoc
46
46
  end
47
47
 
48
48
  def initial_anchor_names(d)
49
- d.xpath("//xmlns:preface/child::*").each do |c|
50
- preface_names(c)
51
- end
49
+ d.xpath(ns("//boilerplate//clause")).each { |c| preface_names(c) }
50
+ d.xpath("//xmlns:preface/child::*").each { |c| preface_names(c) }
52
51
  @hierarchical_assets ?
53
52
  hierarchical_asset_names(d.xpath("//xmlns:preface/child::*"), "Preface") :
54
53
  sequential_asset_names(d.xpath("//xmlns:preface/child::*"))
@@ -83,7 +82,7 @@ module IsoDoc
83
82
  def sequential_figure_names(clause)
84
83
  c = IsoDoc::Function::XrefGen::Counter.new
85
84
  j = 0
86
- clause.xpath(ns(".//figure[not(@type = 'pseudocode')]")).each do |t|
85
+ clause.xpath(ns(".//figure | .//sourcecode[not(ancestor::example)]")).each do |t|
87
86
  if t.parent.name == "figure" then j += 1
88
87
  else
89
88
  j = 0
@@ -99,7 +98,7 @@ module IsoDoc
99
98
  def hierarchical_figure_names(clause, num)
100
99
  c = IsoDoc::Function::XrefGen::Counter.new
101
100
  j = 0
102
- clause.xpath(ns(".//figure[not(@type = 'pseudocode')]")).each do |t|
101
+ clause.xpath(ns(".//figure | .//sourcecode[not(ancestor::example)]")).each do |t|
103
102
  if t.parent.name == "figure" then j += 1
104
103
  else
105
104
  j = 0
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  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: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-29 00:00:00.000000000 Z
11
+ date: 2019-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -281,6 +281,7 @@ files:
281
281
  - lib/asciidoctor/itu/isodoc.rng
282
282
  - lib/asciidoctor/itu/isostandard.rng
283
283
  - lib/asciidoctor/itu/itu.rng
284
+ - lib/asciidoctor/itu/itu_intro.xml
284
285
  - lib/asciidoctor/itu/macros.rb
285
286
  - lib/asciidoctor/itu/reqt.rng
286
287
  - lib/asciidoctor/itu/validate.rb