metanorma-itu 2.2.3 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1298,21 +1298,42 @@
1298
1298
  <!-- PREFACE (Summary, History, ...) -->
1299
1299
  <!-- ============================= -->
1300
1300
 
1301
+ <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="3">
1302
+ <xsl:choose>
1303
+ <xsl:when test="preceding-sibling::*">
1304
+ <!-- page-break before 2nd and next elements only -->
1305
+ <fo:block break-after="page"/>
1306
+ </xsl:when>
1307
+ <xsl:otherwise>
1308
+ <fo:block font-size="12pt">
1309
+ <xsl:value-of select="$linebreak"/>
1310
+ <xsl:value-of select="$linebreak"/>
1311
+ </fo:block>
1312
+ </xsl:otherwise>
1313
+ </xsl:choose>
1314
+ <fo:block>
1315
+ <xsl:call-template name="setId"/>
1316
+ <xsl:apply-templates/>
1317
+ </fo:block>
1318
+ </xsl:template>
1319
+
1301
1320
  <!-- Summary -->
1302
1321
  <xsl:template match="itu:itu-standard/itu:preface/itu:abstract[@id = '_summary']" priority="3">
1303
1322
  <fo:block font-size="12pt">
1304
1323
  <xsl:value-of select="$linebreak"/>
1305
1324
  <xsl:value-of select="$linebreak"/>
1306
1325
  </fo:block>
1307
- <fo:block font-weight="bold" margin-top="18pt" margin-bottom="18pt">
1308
- <xsl:variable name="title-summary">
1309
- <xsl:call-template name="getTitle">
1310
- <xsl:with-param name="name" select="'title-summary'"/>
1311
- </xsl:call-template>
1312
- </xsl:variable>
1313
- <xsl:value-of select="$title-summary"/>
1326
+ <fo:block id="{@id}">
1327
+ <fo:block font-weight="bold" keep-with-next="always" margin-top="18pt" margin-bottom="18pt" role="H2">
1328
+ <xsl:variable name="title-summary">
1329
+ <xsl:call-template name="getTitle">
1330
+ <xsl:with-param name="name" select="'title-summary'"/>
1331
+ </xsl:call-template>
1332
+ </xsl:variable>
1333
+ <xsl:value-of select="$title-summary"/>
1334
+ </fo:block>
1335
+ <xsl:apply-templates/>
1314
1336
  </fo:block>
1315
- <xsl:apply-templates/>
1316
1337
  </xsl:template>
1317
1338
  <xsl:template match="itu:itu-standard/itu:preface/itu:abstract[@id = '_summary']/itu:title" priority="4"/>
1318
1339
 
@@ -2113,14 +2134,14 @@
2113
2134
  BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
2114
2135
 
2115
2136
  <!--
2116
- <misc-container>
2137
+ <metanorma-extension>
2117
2138
  <presentation-metadata>
2118
2139
  <papersize>letter</papersize>
2119
2140
  </presentation-metadata>
2120
- </misc-container>
2141
+ </metanorma-extension>
2121
2142
  -->
2122
2143
 
2123
- <xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
2144
+ <xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
2124
2145
  <xsl:variable name="papersize_width_">
2125
2146
  <xsl:choose>
2126
2147
  <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
@@ -2235,7 +2256,7 @@
2235
2256
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
2236
2257
 
2237
2258
  <xsl:variable name="title-list-tables">
2238
- <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
2259
+ <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
2239
2260
  <xsl:value-of select="$toc_table_title"/>
2240
2261
  <xsl:if test="normalize-space($toc_table_title) = ''">
2241
2262
  <xsl:call-template name="getTitle">
@@ -2245,7 +2266,7 @@
2245
2266
  </xsl:variable>
2246
2267
 
2247
2268
  <xsl:variable name="title-list-figures">
2248
- <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
2269
+ <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
2249
2270
  <xsl:value-of select="$toc_figure_title"/>
2250
2271
  <xsl:if test="normalize-space($toc_figure_title) = ''">
2251
2272
  <xsl:call-template name="getTitle">
@@ -2255,7 +2276,7 @@
2255
2276
  </xsl:variable>
2256
2277
 
2257
2278
  <xsl:variable name="title-list-recommendations">
2258
- <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
2279
+ <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
2259
2280
  <xsl:value-of select="$toc_requirement_title"/>
2260
2281
  <xsl:if test="normalize-space($toc_requirement_title) = ''">
2261
2282
  <xsl:call-template name="getTitle">
@@ -2327,7 +2348,7 @@
2327
2348
  <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
2328
2349
 
2329
2350
  <xsl:variable name="additional_fonts_">
2330
- <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
2351
+ <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
2331
2352
  <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
2332
2353
  </xsl:for-each>
2333
2354
  </xsl:variable>
@@ -3049,17 +3070,28 @@
3049
3070
  <!-- admonition -->
3050
3071
  <xsl:attribute-set name="admonition-style">
3051
3072
 
3073
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
3074
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
3075
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
3076
+
3052
3077
  </xsl:attribute-set> <!-- admonition-style -->
3053
3078
 
3054
3079
  <xsl:attribute-set name="admonition-container-style">
3055
3080
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
3056
3081
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
3057
3082
 
3083
+ <xsl:attribute name="padding">2mm</xsl:attribute>
3084
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
3085
+
3058
3086
  </xsl:attribute-set> <!-- admonition-container-style -->
3059
3087
 
3060
3088
  <xsl:attribute-set name="admonition-name-style">
3061
3089
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3062
3090
 
3091
+ <xsl:attribute name="text-align">center</xsl:attribute>
3092
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3093
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3094
+
3063
3095
  </xsl:attribute-set> <!-- admonition-name-style -->
3064
3096
 
3065
3097
  <xsl:attribute-set name="admonition-p-style">
@@ -3381,10 +3413,10 @@
3381
3413
 
3382
3414
  <xsl:template name="processTablesFigures_Contents">
3383
3415
  <xsl:param name="always"/>
3384
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3416
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3385
3417
  <xsl:call-template name="processTables_Contents"/>
3386
3418
  </xsl:if>
3387
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3419
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3388
3420
  <xsl:call-template name="processFigures_Contents"/>
3389
3421
  </xsl:if>
3390
3422
  </xsl:template>
@@ -3730,6 +3762,8 @@
3730
3762
 
3731
3763
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
3732
3764
 
3765
+ <xsl:call-template name="setBordersTableArray"/>
3766
+
3733
3767
  <xsl:if test="$doctype = 'service-publication'">
3734
3768
  <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3735
3769
  </xsl:if>
@@ -3878,6 +3912,10 @@
3878
3912
 
3879
3913
  </xsl:template>
3880
3914
 
3915
+ <xsl:template name="setBordersTableArray">
3916
+
3917
+ </xsl:template>
3918
+
3881
3919
  <xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
3882
3920
  <xsl:param name="continued"/>
3883
3921
  <xsl:if test="normalize-space() != ''">
@@ -4367,6 +4405,8 @@
4367
4405
  <xsl:attribute name="border">none</xsl:attribute>
4368
4406
  </xsl:if>
4369
4407
 
4408
+ <xsl:call-template name="setBordersTableArray"/>
4409
+
4370
4410
  <!-- fn will be processed inside 'note' processing -->
4371
4411
 
4372
4412
  <xsl:if test="$doctype = 'service-publication'">
@@ -4492,6 +4532,8 @@
4492
4532
  <xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
4493
4533
  <fo:table-row xsl:use-attribute-sets="table-header-row-style">
4494
4534
 
4535
+ <xsl:call-template name="setBordersTableArray"/>
4536
+
4495
4537
  <xsl:if test="$doctype = 'service-publication'">
4496
4538
  <xsl:attribute name="border-bottom">1.1pt solid black</xsl:attribute>
4497
4539
  </xsl:if>
@@ -4519,6 +4561,8 @@
4519
4561
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4520
4562
  </xsl:if>
4521
4563
 
4564
+ <xsl:call-template name="setBordersTableArray"/>
4565
+
4522
4566
  <xsl:call-template name="setTableRowAttributes"/>
4523
4567
  <xsl:apply-templates/>
4524
4568
  </fo:table-row>
@@ -4542,6 +4586,8 @@
4542
4586
  <xsl:with-param name="default">center</xsl:with-param>
4543
4587
  </xsl:call-template>
4544
4588
 
4589
+ <xsl:call-template name="setBordersTableArray"/>
4590
+
4545
4591
  <xsl:if test="ancestor::*[local-name()='preface']">
4546
4592
  <xsl:if test="$doctype != 'service-publication'">
4547
4593
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
@@ -4605,6 +4651,8 @@
4605
4651
 
4606
4652
  <!-- bsi -->
4607
4653
 
4654
+ <xsl:call-template name="setBordersTableArray"/>
4655
+
4608
4656
  <xsl:if test="ancestor::*[local-name()='preface']">
4609
4657
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
4610
4658
  </xsl:if>
@@ -8277,7 +8325,7 @@
8277
8325
  <!-- sourcecode -->
8278
8326
  <!-- =============== -->
8279
8327
 
8280
- <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'source-highlighter-css']"/>
8328
+ <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
8281
8329
  <xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
8282
8330
  <xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
8283
8331
 
@@ -10368,8 +10416,8 @@
10368
10416
 
10369
10417
  <xsl:variable name="toc_level">
10370
10418
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
10371
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
10372
- <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
10419
+ <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
10420
+ <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
10373
10421
  <xsl:choose>
10374
10422
  <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
10375
10423
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
@@ -11361,6 +11409,7 @@
11361
11409
  <xsl:choose>
11362
11410
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
11363
11411
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
11412
+ <xsl:when test="$align = 'justified'">justify</xsl:when>
11364
11413
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
11365
11414
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
11366
11415
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
@@ -7,7 +7,7 @@ module IsoDoc
7
7
  module BaseConvert
8
8
  def nonstd_bibitem(list, bibitem, _ordinal, biblio)
9
9
  list.tr **attr_code(iso_bibitem_entry_attrs(bibitem, biblio)) do |ref|
10
- ref.td **{ style: "vertical-align:top" } do |td|
10
+ ref.td style: "vertical-align:top" do |td|
11
11
  tag = bibitem.at(ns("./biblio-tag"))
12
12
  tag&.children&.each { |n| parse(n, td) }
13
13
  end
@@ -20,7 +20,7 @@ module IsoDoc
20
20
  end
21
21
 
22
22
  def biblio_list(clause, div, biblio)
23
- div.table **{ class: "biblio", border: "0" } do |t|
23
+ div.table class: "biblio", border: "0" do |t|
24
24
  i = 0
25
25
  t.tbody do |tbody|
26
26
  clause.elements.each do |b|
@@ -64,14 +64,12 @@ module IsoDoc
64
64
  ret
65
65
  end
66
66
 
67
- IGNORE_IDS = "@type = 'DOI' or @type = 'ISSN' or @type = 'ISBN' or "\
68
- "@type = 'rfc-anchor' or @type = 'metanorma-ordinal'".freeze
69
-
70
67
  def multi_bibitem_ref_code(bibitem)
71
- id = bibitem.xpath(ns("./docidentifier[not(@type = 'metanorma' or "\
72
- "#{IGNORE_IDS})]"))
68
+ id = bibitem.xpath(ns("./docidentifier[not(@type = 'metanorma' or " \
69
+ "#{IsoDoc::Function::References::SKIP_DOCID} or " \
70
+ "@type = 'metanorma-ordinal')]"))
73
71
  id.empty? and
74
- id = bibitem.xpath(ns("./docidentifier[not(@type = 'metanorma' or "\
72
+ id = bibitem.xpath(ns("./docidentifier[not(@type = 'metanorma' or " \
75
73
  "@type = 'metanorma-ordinal')]"))
76
74
  return [] if id.empty?
77
75
 
@@ -91,7 +89,7 @@ module IsoDoc
91
89
  def doctype_title(id)
92
90
  type = id.parent&.at(ns("./ext/doctype"))&.text || "recommendation"
93
91
  if type == "recommendation" &&
94
- /^(?<prefix>ITU-[A-Z] [A-Z])[ .-]Sup[a-z]*\. ?(?<num>\d+)$/ =~ id.text
92
+ /^(?<prefix>ITU-[A-Z][  ][A-Z])[  .-]Sup[a-z]*\.[  ]?(?<num>\d+)$/ =~ id.text
95
93
  "#{prefix}-series Recommendations – Supplement #{num}"
96
94
  else
97
95
  d = docid_prefix(id["type"], id.text.sub(/^\[/, "").sub(/\]$/, ""))
@@ -1316,7 +1316,7 @@
1316
1316
  <value>commentaryOf</value>
1317
1317
  <value>hasCommentary</value>
1318
1318
  <value>related</value>
1319
- <value>complements</value>
1319
+ <value>hasComplement</value>
1320
1320
  <value>complementOf</value>
1321
1321
  <value>obsoletes</value>
1322
1322
  <value>obsoletedBy</value>
@@ -46,7 +46,7 @@ module Metanorma
46
46
  ins = xml.at("//sections").elements.first
47
47
  xml.at("//sections/clause[@type = 'scope']") or
48
48
  ins.previous =
49
- "<clause type='scope' #{add_id}><title>#{@i18n.scope}</title><p>"\
49
+ "<clause type='scope' #{add_id}><title>#{@i18n.scope}</title><p>" \
50
50
  "#{@i18n.clause_empty}</p></clause>"
51
51
  xml&.at("//sentinel")&.remove
52
52
  end
@@ -57,7 +57,7 @@ module Metanorma
57
57
  "<bibliography><sentinel/></bibliography>"
58
58
  ins = xml.at("//bibliography").elements.first
59
59
  xml.at("//bibliography/references[@normative = 'true']") or
60
- ins.previous = "<references #{add_id} normative='true'>"\
60
+ ins.previous = "<references #{add_id} normative='true'>" \
61
61
  "<title>#{@i18n.normref}</title></references>"
62
62
  xml&.at("//sentinel")&.remove
63
63
  end
@@ -72,7 +72,7 @@ module Metanorma
72
72
  ins = xml.at("//sections/terms") ||
73
73
  xml.at("//sections/clause[descendant::terms]")
74
74
  unless xml.at("//sections//definitions")
75
- ins.next = "<definitions #{add_id}>"\
75
+ ins.next = "<definitions #{add_id}>" \
76
76
  "<title>#{@i18n.symbolsabbrev}</title></definitions>"
77
77
  end
78
78
  end
@@ -81,8 +81,8 @@ module Metanorma
81
81
  ins = xml.at("//sections//definitions") ||
82
82
  xml.at("//sections/clause[descendant::definitions]")
83
83
  unless xml.at("//sections/clause[@type = 'conventions']")
84
- ins.next = "<clause #{add_id} type='conventions'>"\
85
- "<title>#{@i18n.conventions}</title><p>"\
84
+ ins.next = "<clause #{add_id} type='conventions'>" \
85
+ "<title>#{@i18n.conventions}</title><p>" \
86
86
  "#{@i18n.clause_empty}</p></clause>"
87
87
  end
88
88
  end
@@ -149,14 +149,14 @@ module Metanorma
149
149
  def section_names_terms_cleanup(xml)
150
150
  super
151
151
  replace_title(
152
- xml, "//terms[@type = 'internal'] | "\
153
- "//clause[./terms[@type = 'internal']]"\
152
+ xml, "//terms[@type = 'internal'] | " \
153
+ "//clause[./terms[@type = 'internal']]" \
154
154
  "[not(./terms[@type = 'external'])]",
155
155
  @i18n&.internal_termsdef
156
156
  )
157
157
  replace_title(
158
- xml, "//terms[@type = 'external'] | "\
159
- "//clause[./terms[@type = 'external']]"\
158
+ xml, "//terms[@type = 'external'] | " \
159
+ "//clause[./terms[@type = 'external']]" \
160
160
  "[not(./terms[@type = 'internal'])]",
161
161
  @i18n&.external_termsdef
162
162
  )
@@ -172,17 +172,16 @@ module Metanorma
172
172
 
173
173
  def pub_class(bib)
174
174
  return 1 if bib.at("#{PUBLISHER}[abbreviation = 'ITU']")
175
- return 1 if bib.at("#{PUBLISHER}[name = 'International "\
175
+ return 1 if bib.at("#{PUBLISHER}[name = 'International " \
176
176
  "Telecommunication Union']")
177
177
  return 2 if bib.at("#{PUBLISHER}[abbreviation = 'ISO']")
178
- return 2 if bib.at("#{PUBLISHER}[name = 'International Organization "\
178
+ return 2 if bib.at("#{PUBLISHER}[name = 'International Organization " \
179
179
  "for Standardization']")
180
180
  return 3 if bib.at("#{PUBLISHER}[abbreviation = 'IEC']")
181
- return 3 if bib.at("#{PUBLISHER}[name = 'International "\
181
+ return 3 if bib.at("#{PUBLISHER}[name = 'International " \
182
182
  "Electrotechnical Commission']")
183
- return 4 if bib.at("./docidentifier[@type][not(@type = 'DOI' or "\
184
- "@type = 'metanorma' or @type = 'ISSN' or @type = "\
185
- "'ISBN')]")
183
+ return 4 if bib.at("./docidentifier[@type][not(#{skip_docid} or " \
184
+ "@type = 'metanorma')]")
186
185
 
187
186
  5
188
187
  end
@@ -199,8 +198,8 @@ module Metanorma
199
198
  # then title
200
199
  def sort_biblio_key(bib)
201
200
  pubclass = pub_class(bib)
202
- id = bib&.at("./docidentifier[not(@type = 'DOI' or @type = "\
203
- "'metanorma' or @type = 'ISSN' or @type = 'ISBN')]")
201
+ id = bib&.at("./docidentifier[not(#{skip_docid} or @type = " \
202
+ "'metanorma')]")
204
203
  metaid = bib&.at("./docidentifier[@type = 'metanorma']")&.text
205
204
  abbrid = metaid unless /^\[\d+\]$/.match?(metaid)
206
205
  type = id["type"] if id
@@ -571,6 +571,11 @@
571
571
  <ref name="MultilingualRenderingType"/>
572
572
  </attribute>
573
573
  </optional>
574
+ <optional>
575
+ <attribute name="linenums">
576
+ <data type="boolean"/>
577
+ </attribute>
578
+ </optional>
574
579
  <optional>
575
580
  <ref name="tname"/>
576
581
  </optional>
@@ -1575,7 +1580,7 @@
1575
1580
  </element>
1576
1581
  </define>
1577
1582
  <define name="misccontainer">
1578
- <element name="misc-container">
1583
+ <element name="metanorma-extension">
1579
1584
  <oneOrMore>
1580
1585
  <ref name="AnyElement"/>
1581
1586
  </oneOrMore>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "2.2.3".freeze
3
+ VERSION = "2.2.4".freeze
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: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-30 00:00:00.000000000 Z
11
+ date: 2023-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities