metanorma-itu 1.3.2 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -2059,6 +2059,9 @@
2059
2059
  <title-continued lang="en">(continued)</title-continued>
2060
2060
  <title-continued lang="fr">(continué)</title-continued>
2061
2061
 
2062
+ </xsl:variable><xsl:variable name="bibdata">
2063
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
2064
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
2062
2065
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
2063
2066
  <xsl:param name="name"/>
2064
2067
  <xsl:param name="lang"/>
@@ -2092,6 +2095,7 @@
2092
2095
 
2093
2096
 
2094
2097
 
2098
+
2095
2099
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
2096
2100
  <xsl:attribute name="white-space">pre</xsl:attribute>
2097
2101
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -2204,6 +2208,7 @@
2204
2208
 
2205
2209
  </xsl:attribute-set><xsl:attribute-set name="table-name-style">
2206
2210
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2211
+
2207
2212
 
2208
2213
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2209
2214
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -2231,6 +2236,7 @@
2231
2236
  </xsl:attribute-set><xsl:attribute-set name="xref-style">
2232
2237
 
2233
2238
 
2239
+
2234
2240
  <xsl:attribute name="color">blue</xsl:attribute>
2235
2241
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
2236
2242
 
@@ -2247,6 +2253,7 @@
2247
2253
 
2248
2254
 
2249
2255
 
2256
+
2250
2257
 
2251
2258
 
2252
2259
 
@@ -2276,6 +2283,7 @@
2276
2283
 
2277
2284
 
2278
2285
 
2286
+
2279
2287
  </xsl:attribute-set><xsl:attribute-set name="note-p-style">
2280
2288
 
2281
2289
 
@@ -2296,11 +2304,13 @@
2296
2304
 
2297
2305
 
2298
2306
 
2307
+
2299
2308
 
2300
2309
  <xsl:attribute name="margin-top">4pt</xsl:attribute>
2301
2310
 
2302
2311
 
2303
2312
  </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
2313
+
2304
2314
 
2305
2315
 
2306
2316
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
@@ -2327,6 +2337,7 @@
2327
2337
 
2328
2338
 
2329
2339
 
2340
+
2330
2341
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
2331
2342
 
2332
2343
 
@@ -2335,6 +2346,7 @@
2335
2346
 
2336
2347
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
2337
2348
 
2349
+
2338
2350
 
2339
2351
 
2340
2352
 
@@ -2370,6 +2382,7 @@
2370
2382
 
2371
2383
 
2372
2384
 
2385
+
2373
2386
  </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
2374
2387
 
2375
2388
  <xsl:attribute name="font-size">10pt</xsl:attribute>
@@ -2381,6 +2394,7 @@
2381
2394
 
2382
2395
 
2383
2396
 
2397
+
2384
2398
  <xsl:attribute name="width">75%</xsl:attribute>
2385
2399
  <xsl:attribute name="content-height">100%</xsl:attribute>
2386
2400
  <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
@@ -2408,6 +2422,7 @@
2408
2422
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
2409
2423
 
2410
2424
 
2425
+
2411
2426
  </xsl:attribute-set><xsl:variable name="color-added-text">
2412
2427
  <xsl:text>rgb(0, 255, 0)</xsl:text>
2413
2428
  </xsl:variable><xsl:attribute-set name="add-style">
@@ -2549,6 +2564,7 @@
2549
2564
 
2550
2565
  <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
2551
2566
 
2567
+
2552
2568
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2553
2569
 
2554
2570
 
@@ -2570,6 +2586,8 @@
2570
2586
 
2571
2587
 
2572
2588
 
2589
+
2590
+
2573
2591
  <xsl:variable name="table_width">
2574
2592
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
2575
2593
  100%
@@ -2586,6 +2604,7 @@
2586
2604
 
2587
2605
 
2588
2606
 
2607
+
2589
2608
  <attribute name="margin-left">0mm</attribute>
2590
2609
  <attribute name="margin-right">0mm</attribute>
2591
2610
 
@@ -2732,11 +2751,22 @@
2732
2751
  </xsl:choose>
2733
2752
 
2734
2753
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
2754
+ <xsl:param name="continued"/>
2735
2755
  <xsl:if test="normalize-space() != ''">
2736
2756
  <fo:block xsl:use-attribute-sets="table-name-style">
2737
2757
 
2738
2758
 
2739
- <xsl:apply-templates/>
2759
+ <xsl:choose>
2760
+ <xsl:when test="$continued = 'true'">
2761
+ <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
2762
+
2763
+ </xsl:when>
2764
+ <xsl:otherwise>
2765
+ <xsl:apply-templates/>
2766
+ </xsl:otherwise>
2767
+ </xsl:choose>
2768
+
2769
+
2740
2770
  </fo:block>
2741
2771
  </xsl:if>
2742
2772
  </xsl:template><xsl:template name="calculate-columns-numbers">
@@ -2876,18 +2906,18 @@
2876
2906
  <xsl:apply-templates/>
2877
2907
  </fo:table-header>
2878
2908
  </xsl:template><xsl:template name="table-header-title">
2879
- <xsl:param name="cols-count"/>
2909
+ <xsl:param name="cols-count"/>
2880
2910
  <!-- row for title -->
2881
2911
  <fo:table-row>
2882
2912
  <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
2883
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
2913
+
2914
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
2915
+ <xsl:with-param name="continued">true</xsl:with-param>
2916
+ </xsl:apply-templates>
2884
2917
  <xsl:for-each select="ancestor::*[local-name()='table'][1]">
2885
2918
  <xsl:call-template name="fn_name_display"/>
2886
- </xsl:for-each>
2887
- <fo:block text-align="right" font-style="italic">
2888
- <xsl:text> </xsl:text>
2889
- <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
2890
- </fo:block>
2919
+ </xsl:for-each>
2920
+
2891
2921
  </fo:table-cell>
2892
2922
  </fo:table-row>
2893
2923
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -3116,6 +3146,7 @@
3116
3146
 
3117
3147
 
3118
3148
 
3149
+
3119
3150
  </xsl:if>
3120
3151
  <xsl:if test="$parent-name = 'tfoot'">
3121
3152
 
@@ -3145,6 +3176,7 @@
3145
3176
 
3146
3177
 
3147
3178
 
3179
+
3148
3180
  <xsl:if test="ancestor::*[local-name()='preface']">
3149
3181
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3150
3182
  </xsl:if>
@@ -3867,6 +3899,7 @@
3867
3899
 
3868
3900
 
3869
3901
 
3902
+
3870
3903
 
3871
3904
  </xsl:variable>
3872
3905
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -4248,11 +4281,15 @@
4248
4281
  </xsl:apply-templates>
4249
4282
  </xsl:template><xsl:template name="getLang">
4250
4283
  <xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
4284
+ <xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
4251
4285
  <xsl:variable name="language">
4252
4286
  <xsl:choose>
4253
4287
  <xsl:when test="$language_current != ''">
4254
4288
  <xsl:value-of select="$language_current"/>
4255
4289
  </xsl:when>
4290
+ <xsl:when test="$language_current_2 != ''">
4291
+ <xsl:value-of select="$language_current_2"/>
4292
+ </xsl:when>
4256
4293
  <xsl:otherwise>
4257
4294
  <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
4258
4295
  </xsl:otherwise>
@@ -4469,6 +4506,7 @@
4469
4506
 
4470
4507
 
4471
4508
  <fo:inline xsl:use-attribute-sets="note-name-style">
4509
+
4472
4510
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4473
4511
  </fo:inline>
4474
4512
  <xsl:apply-templates/>
@@ -4495,6 +4533,7 @@
4495
4533
  </xsl:template><xsl:template match="*[local-name() = 'termnote']">
4496
4534
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
4497
4535
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
4536
+
4498
4537
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4499
4538
  </fo:inline>
4500
4539
  <xsl:apply-templates/>
@@ -4576,7 +4615,10 @@
4576
4615
  <xsl:for-each select="*[local-name() = 'note']">
4577
4616
  <xsl:call-template name="note"/>
4578
4617
  </xsl:for-each>
4579
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4618
+
4619
+
4620
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4621
+
4580
4622
  </fo:block-container>
4581
4623
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
4582
4624
  <fo:block id="{@id}">
@@ -4695,15 +4737,15 @@
4695
4737
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
4696
4738
  <xsl:apply-templates mode="bookmarks"/>
4697
4739
  <xsl:text> </xsl:text>
4698
- </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
4740
+ </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
4699
4741
  <xsl:value-of select="."/>
4700
- </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
4742
+ </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
4701
4743
  <xsl:value-of select="."/>
4702
4744
  </xsl:template><xsl:template match="node()" mode="contents">
4703
4745
  <xsl:apply-templates mode="contents"/>
4704
4746
  </xsl:template><xsl:template match="node()" mode="bookmarks">
4705
4747
  <xsl:apply-templates mode="bookmarks"/>
4706
- </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
4748
+ </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
4707
4749
  <xsl:apply-templates select="."/>
4708
4750
  </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4709
4751
  <xsl:apply-templates mode="bookmarks"/>
@@ -4902,6 +4944,8 @@
4902
4944
  </fo:list-item-body>
4903
4945
  </fo:list-item>
4904
4946
  </fo:list-block>
4947
+ </xsl:template><xsl:template name="extractSection">
4948
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4905
4949
  </xsl:template><xsl:template name="extractTitle">
4906
4950
  <xsl:choose>
4907
4951
  <xsl:when test="*[local-name() = 'tab']">
@@ -4948,6 +4992,7 @@
4948
4992
 
4949
4993
 
4950
4994
 
4995
+
4951
4996
  10
4952
4997
 
4953
4998
 
@@ -5271,7 +5316,7 @@
5271
5316
  </fo:inline>
5272
5317
  </xsl:otherwise>
5273
5318
  </xsl:choose>
5274
- </xsl:template><xsl:template match="*[local-name() = 'termsource']">
5319
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
5275
5320
  <fo:block xsl:use-attribute-sets="termsource-style">
5276
5321
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
5277
5322
  <xsl:variable name="termsource_text">
@@ -5280,13 +5325,15 @@
5280
5325
 
5281
5326
  <xsl:choose>
5282
5327
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
5283
- <xsl:apply-templates/>
5328
+ <!-- <xsl:apply-templates /> -->
5329
+ <xsl:copy-of select="$termsource_text"/>
5284
5330
  </xsl:when>
5285
5331
  <xsl:otherwise>
5286
5332
 
5287
5333
  <xsl:text>[</xsl:text>
5288
5334
 
5289
- <xsl:apply-templates/>
5335
+ <!-- <xsl:apply-templates /> -->
5336
+ <xsl:copy-of select="$termsource_text"/>
5290
5337
 
5291
5338
  <xsl:text>]</xsl:text>
5292
5339
 
@@ -5297,8 +5344,15 @@
5297
5344
  <xsl:if test="normalize-space() != ''">
5298
5345
  <xsl:value-of select="."/>
5299
5346
  </xsl:if>
5300
- </xsl:template><xsl:template match="*[local-name() = 'origin']">
5347
+ </xsl:template><xsl:variable name="localized.source">
5348
+ <xsl:call-template name="getLocalizedString">
5349
+ <xsl:with-param name="key">source</xsl:with-param>
5350
+ </xsl:call-template>
5351
+ </xsl:variable><xsl:template match="*[local-name() = 'origin']">
5301
5352
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
5353
+ <xsl:if test="normalize-space(@citeas) = ''">
5354
+ <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
5355
+ </xsl:if>
5302
5356
 
5303
5357
  <fo:inline xsl:use-attribute-sets="origin-style">
5304
5358
  <xsl:apply-templates/>
@@ -5510,7 +5564,6 @@
5510
5564
 
5511
5565
 
5512
5566
 
5513
-
5514
5567
  <xsl:apply-templates/>
5515
5568
  </fo:block>
5516
5569
 
@@ -5557,7 +5610,7 @@
5557
5610
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
5558
5611
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
5559
5612
  <xsl:choose>
5560
- <xsl:when test="parent::*[local-name() = 'note']">
5613
+ <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
5561
5614
  <fo:block-container>
5562
5615
  <xsl:attribute name="margin-left">
5563
5616
  <xsl:choose>
@@ -5567,6 +5620,7 @@
5567
5620
  </xsl:attribute>
5568
5621
 
5569
5622
 
5623
+
5570
5624
  <fo:block-container margin-left="0mm">
5571
5625
  <fo:block>
5572
5626
  <xsl:apply-templates select="." mode="ul_ol"/>
@@ -5768,6 +5822,10 @@
5768
5822
 
5769
5823
 
5770
5824
 
5825
+
5826
+
5827
+
5828
+
5771
5829
  </xsl:template><xsl:template name="processBibitemDocId">
5772
5830
  <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
5773
5831
  <xsl:choose>
@@ -6152,6 +6210,7 @@
6152
6210
 
6153
6211
 
6154
6212
 
6213
+
6155
6214
  <xsl:value-of select="document('')//*/namespace::itu"/>
6156
6215
 
6157
6216
 
@@ -6219,13 +6278,18 @@
6219
6278
  </xsl:call-template>
6220
6279
  </xsl:if>
6221
6280
  </xsl:template><xsl:template name="getLocalizedString">
6222
- <xsl:param name="key"/>
6281
+ <xsl:param name="key"/>
6223
6282
 
6224
6283
  <xsl:variable name="curr_lang">
6225
6284
  <xsl:call-template name="getLang"/>
6226
6285
  </xsl:variable>
6227
6286
 
6287
+ <xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
6288
+
6228
6289
  <xsl:choose>
6290
+ <xsl:when test="$data_value != ''">
6291
+ <xsl:value-of select="$data_value"/>
6292
+ </xsl:when>
6229
6293
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
6230
6294
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
6231
6295
  </xsl:when>
@@ -2059,6 +2059,9 @@
2059
2059
  <title-continued lang="en">(continued)</title-continued>
2060
2060
  <title-continued lang="fr">(continué)</title-continued>
2061
2061
 
2062
+ </xsl:variable><xsl:variable name="bibdata">
2063
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
2064
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
2062
2065
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
2063
2066
  <xsl:param name="name"/>
2064
2067
  <xsl:param name="lang"/>
@@ -2092,6 +2095,7 @@
2092
2095
 
2093
2096
 
2094
2097
 
2098
+
2095
2099
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
2096
2100
  <xsl:attribute name="white-space">pre</xsl:attribute>
2097
2101
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -2204,6 +2208,7 @@
2204
2208
 
2205
2209
  </xsl:attribute-set><xsl:attribute-set name="table-name-style">
2206
2210
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2211
+
2207
2212
 
2208
2213
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2209
2214
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -2231,6 +2236,7 @@
2231
2236
  </xsl:attribute-set><xsl:attribute-set name="xref-style">
2232
2237
 
2233
2238
 
2239
+
2234
2240
  <xsl:attribute name="color">blue</xsl:attribute>
2235
2241
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
2236
2242
 
@@ -2247,6 +2253,7 @@
2247
2253
 
2248
2254
 
2249
2255
 
2256
+
2250
2257
 
2251
2258
 
2252
2259
 
@@ -2276,6 +2283,7 @@
2276
2283
 
2277
2284
 
2278
2285
 
2286
+
2279
2287
  </xsl:attribute-set><xsl:attribute-set name="note-p-style">
2280
2288
 
2281
2289
 
@@ -2296,11 +2304,13 @@
2296
2304
 
2297
2305
 
2298
2306
 
2307
+
2299
2308
 
2300
2309
  <xsl:attribute name="margin-top">4pt</xsl:attribute>
2301
2310
 
2302
2311
 
2303
2312
  </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
2313
+
2304
2314
 
2305
2315
 
2306
2316
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
@@ -2327,6 +2337,7 @@
2327
2337
 
2328
2338
 
2329
2339
 
2340
+
2330
2341
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
2331
2342
 
2332
2343
 
@@ -2335,6 +2346,7 @@
2335
2346
 
2336
2347
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
2337
2348
 
2349
+
2338
2350
 
2339
2351
 
2340
2352
 
@@ -2370,6 +2382,7 @@
2370
2382
 
2371
2383
 
2372
2384
 
2385
+
2373
2386
  </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
2374
2387
 
2375
2388
  <xsl:attribute name="font-size">10pt</xsl:attribute>
@@ -2381,6 +2394,7 @@
2381
2394
 
2382
2395
 
2383
2396
 
2397
+
2384
2398
  <xsl:attribute name="width">75%</xsl:attribute>
2385
2399
  <xsl:attribute name="content-height">100%</xsl:attribute>
2386
2400
  <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
@@ -2408,6 +2422,7 @@
2408
2422
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
2409
2423
 
2410
2424
 
2425
+
2411
2426
  </xsl:attribute-set><xsl:variable name="color-added-text">
2412
2427
  <xsl:text>rgb(0, 255, 0)</xsl:text>
2413
2428
  </xsl:variable><xsl:attribute-set name="add-style">
@@ -2549,6 +2564,7 @@
2549
2564
 
2550
2565
  <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
2551
2566
 
2567
+
2552
2568
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2553
2569
 
2554
2570
 
@@ -2570,6 +2586,8 @@
2570
2586
 
2571
2587
 
2572
2588
 
2589
+
2590
+
2573
2591
  <xsl:variable name="table_width">
2574
2592
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
2575
2593
  100%
@@ -2586,6 +2604,7 @@
2586
2604
 
2587
2605
 
2588
2606
 
2607
+
2589
2608
  <attribute name="margin-left">0mm</attribute>
2590
2609
  <attribute name="margin-right">0mm</attribute>
2591
2610
 
@@ -2732,11 +2751,22 @@
2732
2751
  </xsl:choose>
2733
2752
 
2734
2753
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
2754
+ <xsl:param name="continued"/>
2735
2755
  <xsl:if test="normalize-space() != ''">
2736
2756
  <fo:block xsl:use-attribute-sets="table-name-style">
2737
2757
 
2738
2758
 
2739
- <xsl:apply-templates/>
2759
+ <xsl:choose>
2760
+ <xsl:when test="$continued = 'true'">
2761
+ <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
2762
+
2763
+ </xsl:when>
2764
+ <xsl:otherwise>
2765
+ <xsl:apply-templates/>
2766
+ </xsl:otherwise>
2767
+ </xsl:choose>
2768
+
2769
+
2740
2770
  </fo:block>
2741
2771
  </xsl:if>
2742
2772
  </xsl:template><xsl:template name="calculate-columns-numbers">
@@ -2876,18 +2906,18 @@
2876
2906
  <xsl:apply-templates/>
2877
2907
  </fo:table-header>
2878
2908
  </xsl:template><xsl:template name="table-header-title">
2879
- <xsl:param name="cols-count"/>
2909
+ <xsl:param name="cols-count"/>
2880
2910
  <!-- row for title -->
2881
2911
  <fo:table-row>
2882
2912
  <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
2883
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
2913
+
2914
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
2915
+ <xsl:with-param name="continued">true</xsl:with-param>
2916
+ </xsl:apply-templates>
2884
2917
  <xsl:for-each select="ancestor::*[local-name()='table'][1]">
2885
2918
  <xsl:call-template name="fn_name_display"/>
2886
- </xsl:for-each>
2887
- <fo:block text-align="right" font-style="italic">
2888
- <xsl:text> </xsl:text>
2889
- <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
2890
- </fo:block>
2919
+ </xsl:for-each>
2920
+
2891
2921
  </fo:table-cell>
2892
2922
  </fo:table-row>
2893
2923
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -3116,6 +3146,7 @@
3116
3146
 
3117
3147
 
3118
3148
 
3149
+
3119
3150
  </xsl:if>
3120
3151
  <xsl:if test="$parent-name = 'tfoot'">
3121
3152
 
@@ -3145,6 +3176,7 @@
3145
3176
 
3146
3177
 
3147
3178
 
3179
+
3148
3180
  <xsl:if test="ancestor::*[local-name()='preface']">
3149
3181
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3150
3182
  </xsl:if>
@@ -3867,6 +3899,7 @@
3867
3899
 
3868
3900
 
3869
3901
 
3902
+
3870
3903
 
3871
3904
  </xsl:variable>
3872
3905
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -4248,11 +4281,15 @@
4248
4281
  </xsl:apply-templates>
4249
4282
  </xsl:template><xsl:template name="getLang">
4250
4283
  <xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
4284
+ <xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
4251
4285
  <xsl:variable name="language">
4252
4286
  <xsl:choose>
4253
4287
  <xsl:when test="$language_current != ''">
4254
4288
  <xsl:value-of select="$language_current"/>
4255
4289
  </xsl:when>
4290
+ <xsl:when test="$language_current_2 != ''">
4291
+ <xsl:value-of select="$language_current_2"/>
4292
+ </xsl:when>
4256
4293
  <xsl:otherwise>
4257
4294
  <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
4258
4295
  </xsl:otherwise>
@@ -4469,6 +4506,7 @@
4469
4506
 
4470
4507
 
4471
4508
  <fo:inline xsl:use-attribute-sets="note-name-style">
4509
+
4472
4510
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4473
4511
  </fo:inline>
4474
4512
  <xsl:apply-templates/>
@@ -4495,6 +4533,7 @@
4495
4533
  </xsl:template><xsl:template match="*[local-name() = 'termnote']">
4496
4534
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
4497
4535
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
4536
+
4498
4537
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4499
4538
  </fo:inline>
4500
4539
  <xsl:apply-templates/>
@@ -4576,7 +4615,10 @@
4576
4615
  <xsl:for-each select="*[local-name() = 'note']">
4577
4616
  <xsl:call-template name="note"/>
4578
4617
  </xsl:for-each>
4579
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4618
+
4619
+
4620
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4621
+
4580
4622
  </fo:block-container>
4581
4623
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
4582
4624
  <fo:block id="{@id}">
@@ -4695,15 +4737,15 @@
4695
4737
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
4696
4738
  <xsl:apply-templates mode="bookmarks"/>
4697
4739
  <xsl:text> </xsl:text>
4698
- </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
4740
+ </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
4699
4741
  <xsl:value-of select="."/>
4700
- </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
4742
+ </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
4701
4743
  <xsl:value-of select="."/>
4702
4744
  </xsl:template><xsl:template match="node()" mode="contents">
4703
4745
  <xsl:apply-templates mode="contents"/>
4704
4746
  </xsl:template><xsl:template match="node()" mode="bookmarks">
4705
4747
  <xsl:apply-templates mode="bookmarks"/>
4706
- </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
4748
+ </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
4707
4749
  <xsl:apply-templates select="."/>
4708
4750
  </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4709
4751
  <xsl:apply-templates mode="bookmarks"/>
@@ -4902,6 +4944,8 @@
4902
4944
  </fo:list-item-body>
4903
4945
  </fo:list-item>
4904
4946
  </fo:list-block>
4947
+ </xsl:template><xsl:template name="extractSection">
4948
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4905
4949
  </xsl:template><xsl:template name="extractTitle">
4906
4950
  <xsl:choose>
4907
4951
  <xsl:when test="*[local-name() = 'tab']">
@@ -4948,6 +4992,7 @@
4948
4992
 
4949
4993
 
4950
4994
 
4995
+
4951
4996
  10
4952
4997
 
4953
4998
 
@@ -5271,7 +5316,7 @@
5271
5316
  </fo:inline>
5272
5317
  </xsl:otherwise>
5273
5318
  </xsl:choose>
5274
- </xsl:template><xsl:template match="*[local-name() = 'termsource']">
5319
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
5275
5320
  <fo:block xsl:use-attribute-sets="termsource-style">
5276
5321
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
5277
5322
  <xsl:variable name="termsource_text">
@@ -5280,13 +5325,15 @@
5280
5325
 
5281
5326
  <xsl:choose>
5282
5327
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
5283
- <xsl:apply-templates/>
5328
+ <!-- <xsl:apply-templates /> -->
5329
+ <xsl:copy-of select="$termsource_text"/>
5284
5330
  </xsl:when>
5285
5331
  <xsl:otherwise>
5286
5332
 
5287
5333
  <xsl:text>[</xsl:text>
5288
5334
 
5289
- <xsl:apply-templates/>
5335
+ <!-- <xsl:apply-templates /> -->
5336
+ <xsl:copy-of select="$termsource_text"/>
5290
5337
 
5291
5338
  <xsl:text>]</xsl:text>
5292
5339
 
@@ -5297,8 +5344,15 @@
5297
5344
  <xsl:if test="normalize-space() != ''">
5298
5345
  <xsl:value-of select="."/>
5299
5346
  </xsl:if>
5300
- </xsl:template><xsl:template match="*[local-name() = 'origin']">
5347
+ </xsl:template><xsl:variable name="localized.source">
5348
+ <xsl:call-template name="getLocalizedString">
5349
+ <xsl:with-param name="key">source</xsl:with-param>
5350
+ </xsl:call-template>
5351
+ </xsl:variable><xsl:template match="*[local-name() = 'origin']">
5301
5352
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
5353
+ <xsl:if test="normalize-space(@citeas) = ''">
5354
+ <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
5355
+ </xsl:if>
5302
5356
 
5303
5357
  <fo:inline xsl:use-attribute-sets="origin-style">
5304
5358
  <xsl:apply-templates/>
@@ -5510,7 +5564,6 @@
5510
5564
 
5511
5565
 
5512
5566
 
5513
-
5514
5567
  <xsl:apply-templates/>
5515
5568
  </fo:block>
5516
5569
 
@@ -5557,7 +5610,7 @@
5557
5610
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
5558
5611
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
5559
5612
  <xsl:choose>
5560
- <xsl:when test="parent::*[local-name() = 'note']">
5613
+ <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
5561
5614
  <fo:block-container>
5562
5615
  <xsl:attribute name="margin-left">
5563
5616
  <xsl:choose>
@@ -5567,6 +5620,7 @@
5567
5620
  </xsl:attribute>
5568
5621
 
5569
5622
 
5623
+
5570
5624
  <fo:block-container margin-left="0mm">
5571
5625
  <fo:block>
5572
5626
  <xsl:apply-templates select="." mode="ul_ol"/>
@@ -5768,6 +5822,10 @@
5768
5822
 
5769
5823
 
5770
5824
 
5825
+
5826
+
5827
+
5828
+
5771
5829
  </xsl:template><xsl:template name="processBibitemDocId">
5772
5830
  <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
5773
5831
  <xsl:choose>
@@ -6152,6 +6210,7 @@
6152
6210
 
6153
6211
 
6154
6212
 
6213
+
6155
6214
  <xsl:value-of select="document('')//*/namespace::itu"/>
6156
6215
 
6157
6216
 
@@ -6219,13 +6278,18 @@
6219
6278
  </xsl:call-template>
6220
6279
  </xsl:if>
6221
6280
  </xsl:template><xsl:template name="getLocalizedString">
6222
- <xsl:param name="key"/>
6281
+ <xsl:param name="key"/>
6223
6282
 
6224
6283
  <xsl:variable name="curr_lang">
6225
6284
  <xsl:call-template name="getLang"/>
6226
6285
  </xsl:variable>
6227
6286
 
6287
+ <xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
6288
+
6228
6289
  <xsl:choose>
6290
+ <xsl:when test="$data_value != ''">
6291
+ <xsl:value-of select="$data_value"/>
6292
+ </xsl:when>
6229
6293
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
6230
6294
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
6231
6295
  </xsl:when>