metanorma-itu 1.2.5 → 1.2.6

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: 7f1f27889137eea1b004bc4eee71e47ddbead47e0fbc4674f539189644763b66
4
- data.tar.gz: 88e33a92e6d6b0d0c3742a0a52df0129e0a45282af82ce97c92155a0394b50f0
3
+ metadata.gz: eb287ff921a50fb1e0bc7f1c6e6508d96ed8850e973d0dc1da25720fa0e3856f
4
+ data.tar.gz: 55782324626afcec59caf220ae8129d0b9bf3acc66197b95146b909cba834590
5
5
  SHA512:
6
- metadata.gz: 77ba3c458e943abb302d525427785149c4b782d4e76fab935366a0ce02f643c98f9332c8273bb29018d68b9817d569d2e036ee6040421c1325939e187d934e34
7
- data.tar.gz: 03f051e1d762172800e50bd22cfece8feb04717bfd77a918411b1c22217ebbe3c7522709f923efacc5b8c4ceb922a4378ecb4db7af98a583526db07368c844f4
6
+ metadata.gz: 1ffb8747c3b8c3574393a27a1186842a0528840c2d02dc77a1154296db777d98ffbe31072833f08aa8802c39b0e2731cdbd10459ec68ddb0ca4467a341f3303b
7
+ data.tar.gz: 5c9519836a9c530132183ff18870764ffa97a6f88c36691cf554d423b1bd23f65ff4bc506fb4dcbe9a90198104b87b7e9ba70e25aae4759ecee9a4510748efb2
@@ -0,0 +1,44 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: rake
4
+
5
+ on:
6
+ push:
7
+ branches: [ master ]
8
+ pull_request:
9
+
10
+ jobs:
11
+ rake:
12
+ name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
13
+ runs-on: ${{ matrix.os }}
14
+ continue-on-error: ${{ matrix.experimental }}
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ ruby: [ '2.6', '2.5', '2.4' ]
19
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
20
+ experimental: [ false ]
21
+ include:
22
+ - ruby: '2.7'
23
+ os: 'ubuntu-latest'
24
+ experimental: true
25
+ - ruby: '2.7'
26
+ os: 'windows-latest'
27
+ experimental: true
28
+ - ruby: '2.7'
29
+ os: 'macos-latest'
30
+ experimental: true
31
+ steps:
32
+ - uses: actions/checkout@master
33
+
34
+ - name: Use Ruby
35
+ uses: ruby/setup-ruby@v1
36
+ with:
37
+ ruby-version: ${{ matrix.ruby }}
38
+ bundler-cache: true
39
+
40
+ - name: Update gems
41
+ run: bundle install --jobs 4 --retry 3
42
+
43
+ - name: Run specs
44
+ run: bundle exec rake
@@ -178,12 +178,32 @@ module Asciidoctor
178
178
  end
179
179
  end
180
180
 
181
+ def metadata_techreport(node, xml)
182
+ a = node.attr("meeting") and xml.meeting a
183
+ a = node.attr("meeting-date") and metadata_meeting_date(a, xml)
184
+ a = node.attr("intended-type") and xml.intended_type a
185
+ a = node.attr("source") and xml.source a
186
+ end
187
+
188
+ def metadata_meeting_date(a, xml)
189
+ xml.meeting_date do |m|
190
+ d = a.split("/")
191
+ if d.size > 1
192
+ m.from d[0]
193
+ m.to d[1]
194
+ else
195
+ m.on d[0]
196
+ end
197
+ end
198
+ end
199
+
181
200
  def metadata_ext(node, xml)
182
201
  metadata_doctype(node, xml)
183
202
  metadata_committee(node, xml)
184
203
  metadata_ics(node, xml)
185
204
  metadata_recommendationstatus(node, xml)
186
205
  metadata_ip_notice(node, xml)
206
+ metadata_techreport(node, xml)
187
207
  structured_id(node, xml)
188
208
  end
189
209
  end
@@ -1164,49 +1164,7 @@
1164
1164
  </define>
1165
1165
  <define name="annex">
1166
1166
  <element name="annex">
1167
- <optional>
1168
- <attribute name="id">
1169
- <data type="ID"/>
1170
- </attribute>
1171
- </optional>
1172
- <optional>
1173
- <attribute name="language"/>
1174
- </optional>
1175
- <optional>
1176
- <attribute name="script"/>
1177
- </optional>
1178
- <optional>
1179
- <attribute name="inline-header">
1180
- <data type="boolean"/>
1181
- </attribute>
1182
- </optional>
1183
- <attribute name="obligation">
1184
- <choice>
1185
- <value>normative</value>
1186
- <value>informative</value>
1187
- </choice>
1188
- </attribute>
1189
- <optional>
1190
- <ref name="section-title"/>
1191
- </optional>
1192
- <group>
1193
- <group>
1194
- <zeroOrMore>
1195
- <ref name="BasicBlock"/>
1196
- </zeroOrMore>
1197
- <zeroOrMore>
1198
- <ref name="note"/>
1199
- </zeroOrMore>
1200
- </group>
1201
- <zeroOrMore>
1202
- <choice>
1203
- <ref name="annex-subsection"/>
1204
- <ref name="terms"/>
1205
- <ref name="definitions"/>
1206
- <ref name="references"/>
1207
- </choice>
1208
- </zeroOrMore>
1209
- </group>
1167
+ <ref name="Annex-Section"/>
1210
1168
  </element>
1211
1169
  </define>
1212
1170
  <define name="terms">
@@ -133,6 +133,7 @@ module IsoDoc
133
133
 
134
134
  def info(isoxml, out)
135
135
  @meta.ip_notice_received isoxml, out
136
+ @meta.techreport isoxml, out
136
137
  super
137
138
  end
138
139
 
@@ -104,6 +104,10 @@ b, strong {
104
104
  div.document-stage-band, div.document-type-band {
105
105
  background-color: #333333; }
106
106
 
107
+ a.FootnoteRef + a.FootnoteRef:before {
108
+ content: ", ";
109
+ vertical-align: super; }
110
+
107
111
  #standard-band {
108
112
  background-color: #0AC442; }
109
113
 
@@ -16,6 +16,21 @@
16
16
  <div class="coverpage">
17
17
  <div class="wrapper-top">
18
18
 
19
+ {% if doctype == "Technical Report" and unpublished %}
20
+ <table>
21
+ <tr><th>Question(s):</th><td colspan="2">{{ group }}</td><th colspan="2">Meeting, date:</th><td colspan="3">{{ meeting }}{% if meeting and meeting_date %}, {% endif %}{{ meeting_date }}</td></tr>
22
+ <tr><th>Study Group:</th><td>{{ subgroup }}</td><th>Working Party:</th><td>{{ workgroup }}</td><th colspan="3">Intended type of document (R-C-TD):</th><td>{{ intended_type }}</td></tr>
23
+ <tr><th>Source:</th><td colspan="7">{{ source }}</td></tr>
24
+ <tr><th>Title:</th><td colspan="7">{{ doctitle }}</td></tr>
25
+ {% for author in authors %}
26
+ <tr><th rowspan="3">Contact:</th><td>Name:</td><td colspan="3">{{ author }}</td><td>Tel:</td><td colspan="2">{{ phones[forloop.index0] }}</td></tr>
27
+ <tr><td>Organization:</td><td colspan="3">{{ affiliations[forloop.index0] }}</td><td>Fax:</td><td colspan="2">{{ faxes[forloop.index0] }}</td></tr>
28
+ <tr><td>Country:</td><td colspan="3">{{ addresses[forloop.index0] }}</td><td>E-mail:</td><td colspan="2">{{ emails[forloop.index0] }}</td></tr>
29
+ {% endfor %}
30
+ </table>
31
+
32
+ {% endif %}
33
+
19
34
  <div class="coverpage-doc-identity">
20
35
  <div class="doc-type">
21
36
  International Telecommunications Union
@@ -104,6 +104,10 @@ b, strong {
104
104
  div.document-stage-band, div.document-type-band {
105
105
  background-color: #333333; }
106
106
 
107
+ a.FootnoteRef + a.FootnoteRef:before {
108
+ content: ", ";
109
+ vertical-align: super; }
110
+
107
111
  #recommendation-band {
108
112
  background-color: #a3d88f; }
109
113
 
@@ -858,6 +862,10 @@ b, strong {
858
862
  div.document-stage-band, div.document-type-band {
859
863
  background-color: #333333; }
860
864
 
865
+ a.FootnoteRef + a.FootnoteRef:before {
866
+ content: ", ";
867
+ vertical-align: super; }
868
+
861
869
  #recommendation-band {
862
870
  background-color: #a3d88f; }
863
871
 
@@ -1,3 +1,120 @@
1
+ {% if doctype == "Technical Report" and unpublished %}
2
+
3
+ <table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="662"
4
+ style='border-collapse:collapse;mso-table-layout-alt:fixed;mso-padding-alt:
5
+ 0cm 2.85pt 0cm 2.85pt'>
6
+ <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;page-break-inside:avoid;
7
+ height:17.85pt'>
8
+ <td width="108" valign="top" style='width:80.85pt;border:none;border-top:solid windowtext 1.5pt;
9
+ padding:0cm 2.85pt 0cm 2.85pt;height:17.85pt'>
10
+ <p class="MsoNormal"><b><span lang="EN-US">Question(s):</span></b></p>
11
+ </td>
12
+ <td width="170" colspan="2" valign="top" style='width:127.55pt;border:none;
13
+ border-top:solid windowtext 1.5pt;padding:0cm 2.85pt 0cm 2.85pt;height:17.85pt'>
14
+ <p class="MsoNormal"><span lang="EN-US">{{ group }}</span></p>
15
+ </td>
16
+ <td width="113" colspan="2" valign="top" style='width:3.0cm;border:none;border-top:
17
+ solid windowtext 1.5pt;padding:0cm 2.85pt 0cm 2.85pt;height:17.85pt'>
18
+ <p class="MsoNormal"><b><span lang="EN-US">Meeting, date:<o:p></o:p></span></b></p>
19
+ </td>
20
+ <td width="270" colspan="2" valign="top" style='width:202.7pt;border:none;
21
+ border-top:solid windowtext 1.5pt;padding:0cm 2.85pt 0cm 2.85pt;height:17.85pt'>
22
+ <p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-US">{{ meeting }}{% if meeting and meeting_date %}, {% endif %}{{ meeting_date }}</span></p>
23
+ </td>
24
+ </tr>
25
+ <tr style='mso-yfti-irow:1;page-break-inside:avoid;height:17.85pt'>
26
+ <td width="108" valign="top" style='width:80.85pt;padding:0cm 2.85pt 0cm 2.85pt;
27
+ height:17.85pt'>
28
+ <p class="MsoNormal"><b><span lang="EN-US">Study Group:<o:p></o:p></span></b></p>
29
+ </td>
30
+ <td width="38" valign="top" style='width:1.0cm;padding:0cm 2.85pt 0cm 2.85pt;
31
+ height:17.85pt'>
32
+ <p class="MsoNormal"><span lang="EN-US">{{ subgroup }}</span></p>
33
+ </td>
34
+ <td width="132" valign="top" style='width:99.2pt;padding:0cm 2.85pt 0cm 2.85pt;
35
+ height:17.85pt'>
36
+ <p class="MsoNormal"><b><span lang="EN-US">Working Party:<o:p></o:p></span></b></p>
37
+ </td>
38
+ <td width="38" valign="top" style='width:1.0cm;padding:0cm 2.85pt 0cm 2.85pt;
39
+ height:17.85pt'>
40
+ <p class="MsoNormal"><span lang="EN-US">{{ workgroup }}</span></p>
41
+ </td>
42
+ <td width="312" colspan="2" valign="top" style='width:233.9pt;padding:0cm 2.85pt 0cm 2.85pt;
43
+ height:17.85pt'>
44
+ <p class="MsoNormal"><b><span lang="EN-US">Intended type of document</span></b><span
45
+ lang="EN-US"> (R-C-TD):</span></p>
46
+ </td>
47
+ <td width="34" valign="top" style='width:25.5pt;padding:0cm 2.85pt 0cm 2.85pt;
48
+ height:17.85pt'>
49
+ <p class="MsoNormal"><span lang="EN-US">{{ intended_type }}</span></p>
50
+ </td>
51
+ </tr>
52
+ <tr style='mso-yfti-irow:2;page-break-inside:avoid;height:17.85pt'>
53
+ <td width="108" valign="top" style='width:80.85pt;padding:0cm 2.85pt 0cm 2.85pt;
54
+ height:17.85pt'>
55
+ <p class="MsoNormal"><b><span lang="EN-US">Source:<o:p></o:p></span></b></p>
56
+ </td>
57
+ <td width="554" colspan="6" valign="top" style='width:415.3pt;padding:0cm 2.85pt 0cm 2.85pt;
58
+ height:17.85pt'>
59
+ <p class="MsoNormal"><span lang="EN-US">{{ source }}</span></p>
60
+ </td>
61
+ </tr>
62
+ <tr style='mso-yfti-irow:3;page-break-inside:avoid;height:17.85pt'>
63
+ <td width="108" valign="top" style='width:80.85pt;border:none;border-bottom:solid windowtext 1.5pt;
64
+ padding:0cm 2.85pt 0cm 2.85pt;height:17.85pt'>
65
+ <p class="MsoNormal"><b><span lang="EN-US">Title: <o:p></o:p></span></b></p>
66
+ </td>
67
+ <td width="554" colspan="6" valign="top" style='width:415.3pt;border:none;
68
+ border-bottom:solid windowtext 1.5pt;padding:0cm 2.85pt 0cm 2.85pt;
69
+ height:17.85pt'>
70
+ <p class="MsoNormal"><span lang="EN-US">{{ doctitle }}</span></p>
71
+ </td>
72
+ </tr>
73
+ {% for author in authors %}
74
+ <tr style='mso-yfti-irow:4;page-break-inside:avoid;height:10.2pt'>
75
+ <td width="108" valign="top" style='width:80.85pt;border:none;mso-border-top-alt:
76
+ solid windowtext 1.5pt;padding:0cm 2.85pt 0cm 2.85pt;height:10.2pt'>
77
+ <p class="MsoNormal"><a name="dcontact"><b><span lang="EN-US">Contact:<o:p></o:p></span></b></a></p>
78
+ </td>
79
+ <span style='mso-bookmark:dcontact'></span>
80
+ <td width="283" colspan="4" valign="top" style='width:212.6pt;border:none;
81
+ mso-border-top-alt:solid windowtext 1.5pt;padding:0cm 2.85pt 0cm 2.85pt;
82
+ height:10.2pt'>
83
+ <p class="MsoNormal" style="text-align:left;"><span style='mso-bookmark:dcontact'><span lang="EN-US">{{ author }}<br/>
84
+ {{ affiliations[forloop.index0] }}<br/>
85
+ {{ addresses[forloop.index0] }}</span></span></p>
86
+ </td>
87
+ <span style='mso-bookmark:dcontact'></span>
88
+ <td width="270" colspan="2" valign="top" style='width:202.7pt;border:none;
89
+ mso-border-top-alt:solid windowtext 1.5pt;padding:0cm 2.85pt 0cm 2.85pt;
90
+ height:10.2pt'>
91
+ <p class="MsoNormal" style="text-align:left;"><span style='mso-bookmark:dcontact'><span lang="EN-US">Tel: {{ phones[forloop.index0] }}<br/>
92
+ Fax: {{ faxes[forloop.index0] }}<br/>
93
+ E-mail: {{ emails[forloop.index0] }}</span></span></p>
94
+ </td>
95
+ <span style='mso-bookmark:dcontact'></span>
96
+ </tr>
97
+ {% endfor %}
98
+ <tr style='mso-yfti-irow:6;mso-yfti-lastrow:yes;page-break-inside:avoid;
99
+ height:10.2pt'>
100
+ <td width="662" colspan="7" valign="top" style='width:496.15pt;border:none;
101
+ border-top:solid windowtext 1.5pt;padding:0cm 2.85pt 0cm 2.85pt;height:10.2pt'>
102
+ <p class="MsoNormal" style='margin-top:0cm'><span lang="EN-US" style='font-size:
103
+ 9.0pt'>Please do not change the structure of this table, just insert the
104
+ necessary information.<o:p></o:p></span></p>
105
+ </td>
106
+ </tr>
107
+ </table>
108
+
109
+ <p class="MsoNormal"><span lang="EN-US">&lt;INSERT TEXT&gt;</span></p>
110
+
111
+ <p><br clear="all" style="page-break-before:always"/></p>
112
+
113
+ {% endif %}
114
+
115
+
116
+
117
+
1
118
  <table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="663"
2
119
  style='border-collapse:collapse;mso-table-layout-alt:fixed;mso-padding-alt:
3
120
  0cm 5.4pt 0cm 5.4pt'>
@@ -89,7 +206,7 @@
89
206
  <p class="MsoNormal" align="right" style='margin-top:12.0pt;text-align:right'><span
90
207
  style='mso-bookmark:_Hlk526346232'><a name="dnume"><b style='mso-bidi-font-weight:
91
208
  normal'><span lang="EN-US" style='font-size:30.0pt;mso-bidi-font-size:10.0pt;
92
- font-family:"Arial",sans-serif;mso-ansi-language:EN-US'>{{ docnumeric }}<o:p></o:p></span></b></a></span></p>
209
+ font-family:"Arial",sans-serif;mso-ansi-language:EN-US'>{% if doctype == "Recommendation" %}{{ docnumeric }}{% else %}{{ doctype }}{% endif %}<o:p></o:p></span></b></a></span></p>
93
210
  </td>
94
211
  <span style='mso-bookmark:_Hlk526346232'><span style='mso-bookmark:dnume'></span></span>
95
212
  </tr>
@@ -158,7 +275,7 @@
158
275
  <span
159
276
  style='mso-bookmark:_Hlk526346232'><a name="ddatee"><span lang="EN-US"
160
277
  style='font-size:14.0pt;mso-bidi-font-size:10.0pt;font-family:"Arial",sans-serif;
161
- mso-ansi-language:EN-US'>{% if pubdate_monthyear %}({{ pubdate_monthyear }}){% endif %}<span style='mso-spacerun:yes'>   </span><o:p></o:p></span></a></span></p>
278
+ mso-ansi-language:EN-US'>{% if pubdate_monthyear %}({{ pubdate_monthyear }}){% else %}{% if revdate %}({{ revdate }}){% endif %}{% endif %}<span style='mso-spacerun:yes'>   </span><o:p></o:p></span></a></span></p>
162
279
  </td>
163
280
  <span style='mso-bookmark:_Hlk526346232'><span style='mso-bookmark:ddatee'></span></span>
164
281
  </tr>
@@ -207,11 +324,11 @@
207
324
  style='mso-bookmark:_Hlk526346232'><a name="c1tite">
208
325
  <span lang="EN-GB"
209
326
  style='font-size:18.0pt;mso-bidi-font-size:10.0pt;font-family:"Arial",sans-serif;
210
- mso-bidi-font-family:"Times New Roman"'>{% if annexid or amendmentid or corrigendumid %}{{ doctitle }}
327
+ mso-bidi-font-family:"Times New Roman"'>{% if annexid or amendmentid or corrigendumid %}{% if doctype != "Recommendation" %}{{ docnumeric }}<br/>{% endif %}{{ doctitle }}
211
328
  {% if annexid %}<br/><b>{{ annexid }}{% if annextitle %}: {{ annextitle }}{% endif %}</b>{% endif %}
212
329
  {% if amendmentid %}<br/><b>{{ amendmentid }}{% if amendmenttitle %}: {{ amendmenttitle }}{% endif %}</b>{% endif %}
213
330
  {% if corrigendumid %}<br/><b>{{ corrigendumid }}{% if corrigendumtitle %}: {{ corrigendumtitle }}{% endif %}</b>{% endif %}
214
- {% else %}<b>{{ doctitle }}</b>{% endif %}</span>
331
+ {% else %}<b>{% if doctype != "Recommendation" %}{{ docnumeric }}<br/>{% endif %}{{ doctitle }}</b>{% endif %}</span>
215
332
  </a></span><span
216
333
  style='mso-bookmark:_Hlk526346232'><span style='mso-bookmark:c1tite'><b><span
217
334
  lang="EN-US" style='font-size:18.0pt;mso-bidi-font-size:10.0pt;font-family:
@@ -63,7 +63,9 @@ module IsoDoc
63
63
  end
64
64
 
65
65
  def authority_cleanup(docxml)
66
- authority_cleanup1(docxml, "draft-warning")
66
+ dest = docxml.at("//div[@id = 'draft-warning-destination']")
67
+ auth = docxml.at("//div[@id = 'draft-warning']")
68
+ dest and auth and dest.replace(auth.remove)
67
69
  super
68
70
  end
69
71
 
@@ -63,8 +63,8 @@
63
63
  <xsl:call-template name="getLang"/>
64
64
  </xsl:variable>
65
65
 
66
- <xsl:variable name="isAmendment" select="normalize-space(/itu:itu-standard/itu:local_bibdata/itu:ext/itu:structuredidentifier/itu:amendment)"/>
67
- <xsl:variable name="isCorrigendum" select="normalize-space(/itu:itu-standard/itu:local_bibdata/itu:ext/itu:structuredidentifier/itu:corrigendum)"/>
66
+ <xsl:variable name="isAmendment" select="normalize-space(/itu:itu-standard/itu:local_bibdata/itu:ext/itu:structuredidentifier/itu:amendment[@language = $lang])"/>
67
+ <xsl:variable name="isCorrigendum" select="normalize-space(/itu:itu-standard/itu:local_bibdata/itu:ext/itu:structuredidentifier/itu:corrigendum[@language = $lang])"/>
68
68
 
69
69
  <xsl:template match="/">
70
70
  <xsl:call-template name="namespaceCheck"/>
@@ -1572,6 +1572,7 @@
1572
1572
 
1573
1573
 
1574
1574
 
1575
+
1575
1576
  </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
1576
1577
 
1577
1578
 
@@ -2130,12 +2131,26 @@
2130
2131
 
2131
2132
 
2132
2133
 
2133
- <!-- except gb and bipm -->
2134
2134
 
2135
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2136
2135
 
2137
2136
 
2137
+ <!-- except gb -->
2138
+
2139
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2140
+
2138
2141
 
2142
+ <!-- show Note under table in preface (ex. abstract) sections -->
2143
+ <!-- empty, because notes show at page side in main sections -->
2144
+ <!-- <xsl:if test="$namespace = 'bipm'">
2145
+ <xsl:choose>
2146
+ <xsl:when test="ancestor::*[local-name()='preface']">
2147
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2148
+ </xsl:when>
2149
+ <xsl:otherwise>
2150
+ <fo:block/>
2151
+ </xsl:otherwise>
2152
+ </xsl:choose>
2153
+ </xsl:if> -->
2139
2154
 
2140
2155
 
2141
2156
  <!-- horizontal row separator -->
@@ -2202,7 +2217,11 @@
2202
2217
 
2203
2218
 
2204
2219
 
2205
- <!-- except gb and bipm -->
2220
+
2221
+
2222
+
2223
+
2224
+ <!-- except gb -->
2206
2225
 
2207
2226
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2208
2227
 
@@ -2287,6 +2306,9 @@
2287
2306
 
2288
2307
 
2289
2308
 
2309
+ <!-- <xsl:if test="$namespace = 'bipm'">
2310
+ <xsl:attribute name="height">8mm</xsl:attribute>
2311
+ </xsl:if> -->
2290
2312
 
2291
2313
  <xsl:apply-templates/>
2292
2314
  </fo:table-row>
@@ -3442,6 +3464,8 @@
3442
3464
 
3443
3465
 
3444
3466
 
3467
+
3468
+
3445
3469
  <fo:inline xsl:use-attribute-sets="note-name-style">
3446
3470
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3447
3471
  </fo:inline>
@@ -63,8 +63,8 @@
63
63
  <xsl:call-template name="getLang"/>
64
64
  </xsl:variable>
65
65
 
66
- <xsl:variable name="isAmendment" select="normalize-space(/itu:itu-standard/itu:local_bibdata/itu:ext/itu:structuredidentifier/itu:amendment)"/>
67
- <xsl:variable name="isCorrigendum" select="normalize-space(/itu:itu-standard/itu:local_bibdata/itu:ext/itu:structuredidentifier/itu:corrigendum)"/>
66
+ <xsl:variable name="isAmendment" select="normalize-space(/itu:itu-standard/itu:local_bibdata/itu:ext/itu:structuredidentifier/itu:amendment[@language = $lang])"/>
67
+ <xsl:variable name="isCorrigendum" select="normalize-space(/itu:itu-standard/itu:local_bibdata/itu:ext/itu:structuredidentifier/itu:corrigendum[@language = $lang])"/>
68
68
 
69
69
  <xsl:template match="/">
70
70
  <xsl:call-template name="namespaceCheck"/>
@@ -1572,6 +1572,7 @@
1572
1572
 
1573
1573
 
1574
1574
 
1575
+
1575
1576
  </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
1576
1577
 
1577
1578
 
@@ -2130,12 +2131,26 @@
2130
2131
 
2131
2132
 
2132
2133
 
2133
- <!-- except gb and bipm -->
2134
2134
 
2135
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2136
2135
 
2137
2136
 
2137
+ <!-- except gb -->
2138
+
2139
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2140
+
2138
2141
 
2142
+ <!-- show Note under table in preface (ex. abstract) sections -->
2143
+ <!-- empty, because notes show at page side in main sections -->
2144
+ <!-- <xsl:if test="$namespace = 'bipm'">
2145
+ <xsl:choose>
2146
+ <xsl:when test="ancestor::*[local-name()='preface']">
2147
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2148
+ </xsl:when>
2149
+ <xsl:otherwise>
2150
+ <fo:block/>
2151
+ </xsl:otherwise>
2152
+ </xsl:choose>
2153
+ </xsl:if> -->
2139
2154
 
2140
2155
 
2141
2156
  <!-- horizontal row separator -->
@@ -2202,7 +2217,11 @@
2202
2217
 
2203
2218
 
2204
2219
 
2205
- <!-- except gb and bipm -->
2220
+
2221
+
2222
+
2223
+
2224
+ <!-- except gb -->
2206
2225
 
2207
2226
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2208
2227
 
@@ -2287,6 +2306,9 @@
2287
2306
 
2288
2307
 
2289
2308
 
2309
+ <!-- <xsl:if test="$namespace = 'bipm'">
2310
+ <xsl:attribute name="height">8mm</xsl:attribute>
2311
+ </xsl:if> -->
2290
2312
 
2291
2313
  <xsl:apply-templates/>
2292
2314
  </fo:table-row>
@@ -3442,6 +3464,8 @@
3442
3464
 
3443
3465
 
3444
3466
 
3467
+
3468
+
3445
3469
  <fo:inline xsl:use-attribute-sets="note-name-style">
3446
3470
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3447
3471
  </fo:inline>
@@ -63,8 +63,8 @@
63
63
  <xsl:call-template name="getLang"/>
64
64
  </xsl:variable>
65
65
 
66
- <xsl:variable name="isAmendment" select="normalize-space(/itu:itu-standard/itu:local_bibdata/itu:ext/itu:structuredidentifier/itu:amendment)"/>
67
- <xsl:variable name="isCorrigendum" select="normalize-space(/itu:itu-standard/itu:local_bibdata/itu:ext/itu:structuredidentifier/itu:corrigendum)"/>
66
+ <xsl:variable name="isAmendment" select="normalize-space(/itu:itu-standard/itu:local_bibdata/itu:ext/itu:structuredidentifier/itu:amendment[@language = $lang])"/>
67
+ <xsl:variable name="isCorrigendum" select="normalize-space(/itu:itu-standard/itu:local_bibdata/itu:ext/itu:structuredidentifier/itu:corrigendum[@language = $lang])"/>
68
68
 
69
69
  <xsl:template match="/">
70
70
  <xsl:call-template name="namespaceCheck"/>
@@ -1572,6 +1572,7 @@
1572
1572
 
1573
1573
 
1574
1574
 
1575
+
1575
1576
  </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
1576
1577
 
1577
1578
 
@@ -2130,12 +2131,26 @@
2130
2131
 
2131
2132
 
2132
2133
 
2133
- <!-- except gb and bipm -->
2134
2134
 
2135
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2136
2135
 
2137
2136
 
2137
+ <!-- except gb -->
2138
+
2139
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2140
+
2138
2141
 
2142
+ <!-- show Note under table in preface (ex. abstract) sections -->
2143
+ <!-- empty, because notes show at page side in main sections -->
2144
+ <!-- <xsl:if test="$namespace = 'bipm'">
2145
+ <xsl:choose>
2146
+ <xsl:when test="ancestor::*[local-name()='preface']">
2147
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2148
+ </xsl:when>
2149
+ <xsl:otherwise>
2150
+ <fo:block/>
2151
+ </xsl:otherwise>
2152
+ </xsl:choose>
2153
+ </xsl:if> -->
2139
2154
 
2140
2155
 
2141
2156
  <!-- horizontal row separator -->
@@ -2202,7 +2217,11 @@
2202
2217
 
2203
2218
 
2204
2219
 
2205
- <!-- except gb and bipm -->
2220
+
2221
+
2222
+
2223
+
2224
+ <!-- except gb -->
2206
2225
 
2207
2226
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2208
2227
 
@@ -2287,6 +2306,9 @@
2287
2306
 
2288
2307
 
2289
2308
 
2309
+ <!-- <xsl:if test="$namespace = 'bipm'">
2310
+ <xsl:attribute name="height">8mm</xsl:attribute>
2311
+ </xsl:if> -->
2290
2312
 
2291
2313
  <xsl:apply-templates/>
2292
2314
  </fo:table-row>
@@ -3442,6 +3464,8 @@
3442
3464
 
3443
3465
 
3444
3466
 
3467
+
3468
+
3445
3469
  <fo:inline xsl:use-attribute-sets="note-name-style">
3446
3470
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3447
3471
  </fo:inline>
@@ -1,4 +1,5 @@
1
1
  require "isodoc"
2
+ require "twitter_cldr"
2
3
 
3
4
  module IsoDoc
4
5
  module ITU
@@ -45,12 +46,38 @@ module IsoDoc
45
46
  nil
46
47
  end
47
48
 
48
- def author(isoxml, _out)
49
- bureau = isoxml.at(ns("//bibdata/ext/editorialgroup/bureau"))
49
+ def author(xml, _out)
50
+ bureau = xml.at(ns("//bibdata/ext/editorialgroup/bureau"))
50
51
  set(:bureau, bureau.text) if bureau
51
- tc = isoxml.at(ns("//bibdata/ext/editorialgroup/committee"))
52
+ tc = xml.at(ns("//bibdata/ext/editorialgroup/committee"))
52
53
  set(:tc, tc.text) if tc
54
+ tc = xml.at(ns("//bibdata/ext/editorialgroup/group/name"))
55
+ set(:group, tc.text) if tc
56
+ tc = xml.at(ns("//bibdata/ext/editorialgroup/subgroup/name"))
57
+ set(:subgroup, tc.text) if tc
58
+ tc = xml.at(ns("//bibdata/ext/editorialgroup/workgroup/name"))
59
+ set(:workgroup, tc.text) if tc
53
60
  super
61
+ authors = xml.xpath(ns("//bibdata/contributor[role/@type = 'author' "\
62
+ "or xmlns:role/@type = 'editor']/person"))
63
+ person_attributes(authors) unless authors.empty?
64
+ end
65
+
66
+ def append(key, value)
67
+ @metadata[key] << value
68
+ end
69
+
70
+ def person_attributes(authors)
71
+ %i(affiliations addresses emails faxes phones).each { |i| set(i, []) }
72
+ authors.each do |a|
73
+ append(:affiliations,
74
+ a&.at(ns("./affiliation/organization/name"))&.text)
75
+ append(:addresses, a&.at(ns("./affiliation/organization/address/"\
76
+ "formattedAddress"))&.text)
77
+ append(:emails, a&.at(ns("./email"))&.text)
78
+ append(:faxes, a&.at(ns("./phone[@type = 'fax']"))&.text)
79
+ append(:phones, a&.at(ns("./phone[not(@type = 'fax')]"))&.text)
80
+ end
54
81
  end
55
82
 
56
83
  def docid(isoxml, _out)
@@ -63,7 +90,8 @@ module IsoDoc
63
90
  dn = isoxml.at(ns("//bibdata/ext/structuredidentifier/amendment")) and
64
91
  set(:amendmentid, @i18n.l10n("#{@labels["amendment"]} #{dn&.text}"))
65
92
  dn = isoxml.at(ns("//bibdata/ext/structuredidentifier/corrigendum")) and
66
- set(:corrigendumid, @i18n.l10n("#{@labels["corrigendum"]} #{dn&.text}"))
93
+ set(:corrigendumid,
94
+ @i18n.l10n("#{@labels["corrigendum"]} #{dn&.text}"))
67
95
  end
68
96
 
69
97
  def unpublished(status)
@@ -101,6 +129,27 @@ module IsoDoc
101
129
  "false"
102
130
  set(:ip_notice_received, received)
103
131
  end
132
+
133
+ def ddMMMYYYY(isodate)
134
+ m = /(?<yr>\d\d\d\d)-(?<mo>\d\d)-(?<dd>\d\d)/.match isodate
135
+ return isodate unless m && m[:yr] && m[:mo] && m[:dd]
136
+ mmm = DateTime.parse(isodate).localize(@lang.to_sym).#with_timezone("UCT").
137
+ to_additional_s("MMM")
138
+ @i18n.l10n("#{m[:dd]} #{mmm} #{m[:yr]}")
139
+ end
140
+
141
+ def techreport(isoxml, _out)
142
+ a = isoxml&.at(ns("//bibdata/ext/meeting"))&.text and set(:meeting, a)
143
+ a = isoxml&.at(ns("//bibdata/ext/intended-type"))&.text and
144
+ set(:intended_type, a)
145
+ a = isoxml&.at(ns("//bibdata/ext/source"))&.text and set(:source, a)
146
+ if o = isoxml&.at(ns("//bibdata/ext/meeting-date/on"))&.text
147
+ set(:meeting_date, ddMMMYYYY(o))
148
+ elsif f = isoxml&.at(ns("//bibdata/ext/meeting-date/from"))&.text
149
+ t = isoxml&.at(ns("//bibdata/ext/meeting-date/to"))&.text
150
+ set(:meeting_date, "#{ddMMMYYYY(f)}/#{ddMMMYYYY(t)}")
151
+ end
152
+ end
104
153
  end
105
154
  end
106
155
  end
@@ -50,10 +50,14 @@ module IsoDoc
50
50
 
51
51
  def bibdata_i18n(b)
52
52
  super
53
- dn = b.at(ns("./ext/structuredidentifier/amendment")) and
54
- dn.children = @i18n.l10n("#{@i18n.get["amendment"]} #{dn&.text}")
55
- dn = b.at(ns("./ext/structuredidentifier/corrigendum")) and
56
- dn.children = @i18n.l10n("#{@i18n.get["corrigendum"]} #{dn&.text}")
53
+ %w(amendment corrigendum).each do |w|
54
+ if dn = b.at(ns("./ext/structuredidentifier/#{w}"))
55
+ dn["language"] = ""
56
+ dn.next = dn.dup
57
+ dn.next["language"] = @lang
58
+ dn.next.children = @i18n.l10n("#{@i18n.get[w]} #{dn&.text}")
59
+ end
60
+ end
57
61
  end
58
62
 
59
63
  include Init
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "1.2.5"
3
+ VERSION = "1.2.6"
4
4
  end
5
5
  end
@@ -28,6 +28,8 @@ Gem::Specification.new do |spec|
28
28
  spec.add_dependency "ruby-jing"
29
29
  spec.add_dependency "metanorma-standoc", "~> 1.6.0"
30
30
  spec.add_dependency "isodoc", "~> 1.2.0"
31
+ spec.add_dependency "twitter_cldr"
32
+ spec.add_dependency "tzinfo-data" # we need this for windows only
31
33
 
32
34
  spec.add_development_dependency "byebug", "~> 9.1"
33
35
  spec.add_development_dependency "sassc", "2.4.0"
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.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-11 00:00:00.000000000 Z
11
+ date: 2020-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -66,6 +66,34 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.2.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: twitter_cldr
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: tzinfo-data
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: byebug
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -243,9 +271,7 @@ executables: []
243
271
  extensions: []
244
272
  extra_rdoc_files: []
245
273
  files:
246
- - ".github/workflows/macos.yml"
247
- - ".github/workflows/ubuntu.yml"
248
- - ".github/workflows/windows.yml"
274
+ - ".github/workflows/rake.yml"
249
275
  - ".gitignore"
250
276
  - ".hound.yml"
251
277
  - ".rubocop.yml"
@@ -1,38 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: macos
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- paths-ignore:
10
- - .github/workflows/ubuntu.yml
11
- - .github/workflows/windows.yml
12
-
13
- jobs:
14
- test-macos:
15
- name: Test on Ruby ${{ matrix.ruby }} macOS
16
- runs-on: macos-latest
17
- continue-on-error: ${{ matrix.experimental }}
18
- strategy:
19
- fail-fast: false
20
- matrix:
21
- ruby: [ '2.6', '2.5', '2.4' ]
22
- experimental: [false]
23
- include:
24
- - ruby: '2.7'
25
- experimental: true
26
- steps:
27
- - uses: actions/checkout@master
28
- - name: Use Ruby
29
- uses: actions/setup-ruby@v1
30
- with:
31
- ruby-version: ${{ matrix.ruby }}
32
- - name: Update gems
33
- run: |
34
- sudo gem install bundler --force
35
- bundle install --jobs 4 --retry 3
36
- - name: Run specs
37
- run: |
38
- bundle exec rake
@@ -1,56 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: ubuntu
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- tags:
9
- - '*'
10
- pull_request:
11
- paths-ignore:
12
- - .github/workflows/macos.yml
13
- - .github/workflows/windows.yml
14
-
15
- jobs:
16
- test-linux:
17
- name: Test on Ruby ${{ matrix.ruby }} Ubuntu
18
- runs-on: ubuntu-latest
19
- continue-on-error: ${{ matrix.experimental }}
20
- strategy:
21
- fail-fast: false
22
- matrix:
23
- ruby: [ '2.6', '2.5', '2.4' ]
24
- experimental: [false]
25
- include:
26
- - ruby: '2.7'
27
- experimental: true
28
- steps:
29
- - uses: actions/checkout@master
30
- - name: Use Ruby
31
- uses: actions/setup-ruby@v1
32
- with:
33
- ruby-version: ${{ matrix.ruby }}
34
- - name: Update gems
35
- run: |
36
- gem install bundler
37
- bundle install --jobs 4 --retry 3
38
- - name: Run specs
39
- run: |
40
- bundle exec rake
41
- - name: Trigger repositories
42
- if: matrix.ruby == '2.6'
43
- env:
44
- GH_USERNAME: metanorma-ci
45
- GH_ACCESS_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
46
- run: |
47
- curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/trigger-gh-actions.sh
48
- [[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
49
- CLIENT_PAYLOAD=$(cat <<EOF
50
- "{ "ref": "${GITHUB_REF}", "repo": "${GITHUB_REPOSITORY}" }"
51
- EOF
52
- )
53
- for repo in $REPOS
54
- do
55
- sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "$CLIENT_PAYLOAD"
56
- done
@@ -1,40 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: windows
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- paths-ignore:
10
- - .github/workflows/macos.yml
11
- - .github/workflows/ubuntu.yml
12
-
13
- jobs:
14
- test-windows:
15
- name: Test on Ruby ${{ matrix.ruby }} Windows
16
- runs-on: windows-latest
17
- continue-on-error: ${{ matrix.experimental }}
18
- strategy:
19
- fail-fast: false
20
- matrix:
21
- ruby: [ '2.6', '2.5', '2.4' ]
22
- experimental: [false]
23
- include:
24
- - ruby: '2.7'
25
- experimental: true
26
- steps:
27
- - uses: actions/checkout@master
28
- - name: Use Ruby
29
- uses: actions/setup-ruby@v1
30
- with:
31
- ruby-version: ${{ matrix.ruby }}
32
- - name: Update gems
33
- shell: pwsh
34
- run: |
35
- gem install bundler
36
- bundle config --local path vendor/bundle
37
- bundle install --jobs 4 --retry 3
38
- - name: Run specs
39
- run: |
40
- bundle exec rake