metanorma-iso 2.3.0 → 2.3.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: 100cc8d4acfdb9e4d94e485f58f09928173b43c096ce7c1fdce04633ee0082a7
4
- data.tar.gz: 9c8870908553dd7103dc094e5b0f9ceebb9f43f31d417d4c8d01e5d3884c3e6e
3
+ metadata.gz: d83fb927cb8bc71790dd2b644f00ef5e55605fc0a4c12865b406f3107c29e365
4
+ data.tar.gz: 19ee55451fd8f24e839fd23a0aea32d0927fb20ebccaa75b045f82113eac3b57
5
5
  SHA512:
6
- metadata.gz: 98580eb700d970913763622d7b5325c58a825a98bbe350b9cac0bdcb1f1d5891eac42d9e473deadbe289f90eb1f189c11684b53e1db48e79f94bc210d0c61171
7
- data.tar.gz: 5c52e15664a2b8edb7590f85c73bc7b13d248c70f039970a7426f654be3f0ba8165bcfbed6ab71d46be075c34db8b9213a2508ae8a48f633ccf32eed409f2c5f
6
+ metadata.gz: 86e861221a56a29ab07d1d47516fb39d13626f2c6cb844783c2030b38a5be4f3f04a4a1ca6d55855eb9f1fc2dc4f772b10f089bd96ae91b741b85f865d4bdba9
7
+ data.tar.gz: b987964c53cee70a3fa4fffa4487fa9e89e3e1bc4d3358928f661c72dd59f462d0148a1a45ef401fa4bad29b8141b55fe38c1f0589685c0699e4f1eedcec9fc9
@@ -187,6 +187,12 @@ module IsoDoc
187
187
  def ol_attrs(node)
188
188
  super.merge(start: node["start"]).compact
189
189
  end
190
+
191
+ def render_identifier(ident)
192
+ ret = super
193
+ ret[:sdo] = std_docid_semantic(ret[:sdo])
194
+ ret
195
+ end
190
196
  end
191
197
  end
192
198
  end
@@ -220,9 +220,9 @@ p.AnnexTableTitle, li.AnnexTableTitle, div.AnnexTableTitle {
220
220
  text-align: center;
221
221
  text-indent: 0cm;
222
222
  line-height: 12.0pt;
223
- page-break-before: always;
223
+ /*page-break-before:always;*/
224
224
  mso-pagination: widow-orphan;
225
- /*page-break-after:avoid;*/
225
+ page-break-after: avoid;
226
226
  /* mso-list:l4 level1 lfo15; */
227
227
  tab-stops: list 0cm left 20.15pt;
228
228
  font-size: {{normalfontsize}};
@@ -246,9 +246,9 @@ p.AnnexTableTitleCxSpFirst, li.AnnexTableTitleCxSpFirst, div.AnnexTableTitleCxSp
246
246
  text-align: center;
247
247
  text-indent: 0cm;
248
248
  line-height: 12.0pt;
249
- page-break-before: always;
249
+ /*page-break-before:always;*/
250
250
  mso-pagination: widow-orphan;
251
- /*page-break-after:avoid;*/
251
+ page-break-after: avoid;
252
252
  /* mso-list:l4 level1 lfo15; */
253
253
  tab-stops: list 0cm left 20.15pt;
254
254
  font-size: {{normalfontsize}};
@@ -272,9 +272,9 @@ p.AnnexTableTitleCxSpMiddle, li.AnnexTableTitleCxSpMiddle, div.AnnexTableTitleCx
272
272
  text-align: center;
273
273
  text-indent: 0cm;
274
274
  line-height: 12.0pt;
275
- page-break-before: always;
275
+ /*page-break-before:always;*/
276
276
  mso-pagination: widow-orphan;
277
- /*page-break-after:avoid;*/
277
+ page-break-after: avoid;
278
278
  /* mso-list:l4 level1 lfo15; */
279
279
  tab-stops: list 0cm left 20.15pt;
280
280
  font-size: {{normalfontsize}};
@@ -301,9 +301,9 @@ p.AnnexTableTitleCxSpLast, li.AnnexTableTitleCxSpLast, div.AnnexTableTitleCxSpLa
301
301
  text-align: center;
302
302
  text-indent: 0cm;
303
303
  line-height: 12.0pt;
304
- page-break-before: always;
304
+ /*page-break-before:always;*/
305
305
  mso-pagination: widow-orphan;
306
- /*page-break-after:avoid;*/
306
+ page-break-after: avoid;
307
307
  /* mso-list:l4 level1 lfo15; */
308
308
  tab-stops: list 0cm left 20.15pt;
309
309
  font-size: {{normalfontsize}};
@@ -209,9 +209,9 @@ p.AnnexTableTitle, li.AnnexTableTitle, div.AnnexTableTitle
209
209
  text-align:center;
210
210
  text-indent:0cm;
211
211
  line-height:12.0pt;
212
- page-break-before:always;
212
+ /*page-break-before:always;*/
213
213
  mso-pagination:widow-orphan;
214
- /*page-break-after:avoid;*/
214
+ page-break-after:avoid;
215
215
  /* mso-list:l4 level1 lfo15; */
216
216
  tab-stops:list 0cm left 20.15pt;
217
217
  font-size:$normalfontsize;
@@ -234,9 +234,9 @@ p.AnnexTableTitleCxSpFirst, li.AnnexTableTitleCxSpFirst, div.AnnexTableTitleCxSp
234
234
  text-align:center;
235
235
  text-indent:0cm;
236
236
  line-height:12.0pt;
237
- page-break-before:always;
237
+ /*page-break-before:always;*/
238
238
  mso-pagination:widow-orphan;
239
- /*page-break-after:avoid;*/
239
+ page-break-after:avoid;
240
240
  /* mso-list:l4 level1 lfo15; */
241
241
  tab-stops:list 0cm left 20.15pt;
242
242
  font-size:$normalfontsize;
@@ -259,9 +259,9 @@ p.AnnexTableTitleCxSpMiddle, li.AnnexTableTitleCxSpMiddle, div.AnnexTableTitleCx
259
259
  text-align:center;
260
260
  text-indent:0cm;
261
261
  line-height:12.0pt;
262
- page-break-before:always;
262
+ /*page-break-before:always;*/
263
263
  mso-pagination:widow-orphan;
264
- /*page-break-after:avoid;*/
264
+ page-break-after:avoid;
265
265
  /* mso-list:l4 level1 lfo15; */
266
266
  tab-stops:list 0cm left 20.15pt;
267
267
  font-size:$normalfontsize;
@@ -287,9 +287,9 @@ p.AnnexTableTitleCxSpLast, li.AnnexTableTitleCxSpLast, div.AnnexTableTitleCxSpLa
287
287
  text-align:center;
288
288
  text-indent:0cm;
289
289
  line-height:12.0pt;
290
- page-break-before:always;
290
+ /*page-break-before:always;*/
291
291
  mso-pagination:widow-orphan;
292
- /*page-break-after:avoid;*/
292
+ page-break-after:avoid;
293
293
  /* mso-list:l4 level1 lfo15; */
294
294
  tab-stops:list 0cm left 20.15pt;
295
295
  font-size:$normalfontsize;
@@ -217,9 +217,9 @@ p.AnnexTableTitle, li.AnnexTableTitle, div.AnnexTableTitle {
217
217
  text-align: center;
218
218
  text-indent: 0cm;
219
219
  line-height: 12.0pt;
220
- page-break-before: always;
220
+ /*page-break-before:always;*/
221
221
  mso-pagination: widow-orphan;
222
- /*page-break-after:avoid;*/
222
+ page-break-after: avoid;
223
223
  /* mso-list:l4 level1 lfo15; */
224
224
  tab-stops: list 0cm left 20.15pt;
225
225
  font-size: {{normalfontsize}};
@@ -243,9 +243,9 @@ p.AnnexTableTitleCxSpFirst, li.AnnexTableTitleCxSpFirst, div.AnnexTableTitleCxSp
243
243
  text-align: center;
244
244
  text-indent: 0cm;
245
245
  line-height: 12.0pt;
246
- page-break-before: always;
246
+ /*page-break-before:always;*/
247
247
  mso-pagination: widow-orphan;
248
- /*page-break-after:avoid;*/
248
+ page-break-after: avoid;
249
249
  /* mso-list:l4 level1 lfo15; */
250
250
  tab-stops: list 0cm left 20.15pt;
251
251
  font-size: {{normalfontsize}};
@@ -269,9 +269,9 @@ p.AnnexTableTitleCxSpMiddle, li.AnnexTableTitleCxSpMiddle, div.AnnexTableTitleCx
269
269
  text-align: center;
270
270
  text-indent: 0cm;
271
271
  line-height: 12.0pt;
272
- page-break-before: always;
272
+ /*page-break-before:always;*/
273
273
  mso-pagination: widow-orphan;
274
- /*page-break-after:avoid;*/
274
+ page-break-after: avoid;
275
275
  /* mso-list:l4 level1 lfo15; */
276
276
  tab-stops: list 0cm left 20.15pt;
277
277
  font-size: {{normalfontsize}};
@@ -298,9 +298,9 @@ p.AnnexTableTitleCxSpLast, li.AnnexTableTitleCxSpLast, div.AnnexTableTitleCxSpLa
298
298
  text-align: center;
299
299
  text-indent: 0cm;
300
300
  line-height: 12.0pt;
301
- page-break-before: always;
301
+ /*page-break-before:always;*/
302
302
  mso-pagination: widow-orphan;
303
- /*page-break-after:avoid;*/
303
+ page-break-after: avoid;
304
304
  /* mso-list:l4 level1 lfo15; */
305
305
  tab-stops: list 0cm left 20.15pt;
306
306
  font-size: {{normalfontsize}};
@@ -207,9 +207,9 @@ p.AnnexTableTitle, li.AnnexTableTitle, div.AnnexTableTitle
207
207
  text-align:center;
208
208
  text-indent:0cm;
209
209
  line-height:12.0pt;
210
- page-break-before:always;
210
+ /*page-break-before:always;*/
211
211
  mso-pagination:widow-orphan;
212
- /*page-break-after:avoid;*/
212
+ page-break-after:avoid;
213
213
  /* mso-list:l4 level1 lfo15; */
214
214
  tab-stops:list 0cm left 20.15pt;
215
215
  font-size:$normalfontsize;
@@ -232,9 +232,9 @@ p.AnnexTableTitleCxSpFirst, li.AnnexTableTitleCxSpFirst, div.AnnexTableTitleCxSp
232
232
  text-align:center;
233
233
  text-indent:0cm;
234
234
  line-height:12.0pt;
235
- page-break-before:always;
235
+ /*page-break-before:always;*/
236
236
  mso-pagination:widow-orphan;
237
- /*page-break-after:avoid;*/
237
+ page-break-after:avoid;
238
238
  /* mso-list:l4 level1 lfo15; */
239
239
  tab-stops:list 0cm left 20.15pt;
240
240
  font-size:$normalfontsize;
@@ -257,9 +257,9 @@ p.AnnexTableTitleCxSpMiddle, li.AnnexTableTitleCxSpMiddle, div.AnnexTableTitleCx
257
257
  text-align:center;
258
258
  text-indent:0cm;
259
259
  line-height:12.0pt;
260
- page-break-before:always;
260
+ /*page-break-before:always;*/
261
261
  mso-pagination:widow-orphan;
262
- /*page-break-after:avoid;*/
262
+ page-break-after:avoid;
263
263
  /* mso-list:l4 level1 lfo15; */
264
264
  tab-stops:list 0cm left 20.15pt;
265
265
  font-size:$normalfontsize;
@@ -285,9 +285,9 @@ p.AnnexTableTitleCxSpLast, li.AnnexTableTitleCxSpLast, div.AnnexTableTitleCxSpLa
285
285
  text-align:center;
286
286
  text-indent:0cm;
287
287
  line-height:12.0pt;
288
- page-break-before:always;
288
+ /*page-break-before:always;*/
289
289
  mso-pagination:widow-orphan;
290
- /*page-break-after:avoid;*/
290
+ page-break-after:avoid;
291
291
  /* mso-list:l4 level1 lfo15; */
292
292
  tab-stops:list 0cm left 20.15pt;
293
293
  font-size:$normalfontsize;
@@ -34,9 +34,20 @@ module IsoDoc
34
34
  end
35
35
 
36
36
  def std_docid_semantic(id)
37
- return nil if id.nil?
37
+ id.nil? and return nil
38
+ ret = Nokogiri::XML.fragment(id)
39
+ ret.traverse do |x|
40
+ x.text? or next
41
+ x.replace(std_docid_semantic1(x.text))
42
+ end
43
+ to_xml(ret)
44
+ end
38
45
 
46
+ def std_docid_semantic1(id)
39
47
  ids = id.split(/ /)
48
+ %w(ISO IEC ITU IETF NIST OGC IEEE BIPM BSI IANA UN W3C IEV)
49
+ .include?(ids[0].sub(/\/.*$/, "")) or
50
+ return id
40
51
  ids.map! do |i|
41
52
  if %w(GUIDE TR TS DIR).include?(i)
42
53
  "<span class='stddocNumber'>#{i}</span>"