metanorma-itu 2.1.1 → 2.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1687,7 +1687,7 @@
1687
1687
  </xsl:choose>
1688
1688
  </xsl:variable>
1689
1689
  <xsl:element name="{$element-name}">
1690
- <xsl:attribute name="font-family">Courier New</xsl:attribute>
1690
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1691
1691
  <xsl:attribute name="font-size">10pt</xsl:attribute>
1692
1692
  <xsl:if test="local-name(..) != 'dt' and not(ancestor::itu:dd) and not(ancestor::itu:title)">
1693
1693
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -1699,27 +1699,6 @@
1699
1699
  </xsl:element>
1700
1700
  </xsl:template>
1701
1701
 
1702
-
1703
-
1704
- <!-- Examples:
1705
- [b-ASM] b-ASM, http://www.eecs.umich.edu/gasm/ (accessed 20 March 2018).
1706
- [b-Börger & Stärk] b-Börger & Stärk, Börger, E., and Stärk, R. S. (2003), Abstract State Machines: A Method for High-Level System Design and Analysis, Springer-Verlag.
1707
- -->
1708
- <xsl:template match="itu:annex//itu:bibitem" priority="3">
1709
- <fo:block margin-top="6pt" margin-left="10mm" text-indent="-10mm">
1710
- <fo:inline id="{@id}" padding-right="5mm">[<xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>]</fo:inline>
1711
- <xsl:text> </xsl:text>
1712
- <xsl:apply-templates select="itu:docidentifier[not(@type = 'metanorma-ordinal')]" mode="content"/>
1713
- <xsl:if test="node()[local-name(.) != current()/itu:docidentifier]">, </xsl:if>
1714
- <xsl:apply-templates/>
1715
- </fo:block>
1716
- </xsl:template>
1717
-
1718
- <xsl:template match="itu:docidentifier" mode="content">
1719
- <xsl:apply-templates/>
1720
- </xsl:template>
1721
- <xsl:template match="itu:docidentifier"/>
1722
-
1723
1702
 
1724
1703
  <xsl:template match="itu:ul | itu:ol | itu:sections/itu:ul | itu:sections/itu:ol" mode="list" priority="2">
1725
1704
  <xsl:if test="preceding-sibling::*[1][local-name() = 'title'] and $doctype != 'service-publication'">
@@ -2071,14 +2050,41 @@
2071
2050
  </xsl:if>
2072
2051
  </xsl:template>
2073
2052
 
2074
- <xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:param name="add_math_as_text">true</xsl:param><xsl:param name="table_if">false</xsl:param><xsl:param name="table_widths"/><xsl:variable name="table_widths_from_if" select="xalan:nodeset($table_widths)"/><xsl:param name="table_if_debug">false</xsl:param><xsl:variable name="isGenerateTableIF_">
2053
+ <xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:param name="add_math_as_text">true</xsl:param><xsl:param name="table_if">false</xsl:param><xsl:param name="table_widths"/><xsl:variable name="table_widths_from_if" select="xalan:nodeset($table_widths)"/><xsl:variable name="table_widths_from_if_calculated_">
2054
+ <xsl:for-each select="$table_widths_from_if//table">
2055
+ <xsl:copy>
2056
+ <xsl:copy-of select="@*"/>
2057
+ <xsl:call-template name="calculate-column-widths-autolayout-algorithm"/>
2058
+ </xsl:copy>
2059
+ </xsl:for-each>
2060
+ </xsl:variable><xsl:variable name="table_widths_from_if_calculated" select="xalan:nodeset($table_widths_from_if_calculated_)"/><xsl:param name="table_if_debug">false</xsl:param><xsl:variable name="isGenerateTableIF_">
2075
2061
  false
2076
2062
  </xsl:variable><xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/><xsl:variable name="lang">
2077
2063
  <xsl:call-template name="getLang"/>
2078
- </xsl:variable><xsl:variable name="pageWidth_">
2079
- 210
2064
+ </xsl:variable><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'])))"/><xsl:variable name="papersize_width_">
2065
+ <xsl:choose>
2066
+ <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
2067
+ <xsl:when test="$papersize = 'a4'">210</xsl:when>
2068
+ </xsl:choose>
2069
+ </xsl:variable><xsl:variable name="papersize_width" select="normalize-space($papersize_width_)"/><xsl:variable name="papersize_height_">
2070
+ <xsl:choose>
2071
+ <xsl:when test="$papersize = 'letter'">279.4</xsl:when>
2072
+ <xsl:when test="$papersize = 'a4'">297</xsl:when>
2073
+ </xsl:choose>
2074
+ </xsl:variable><xsl:variable name="papersize_height" select="normalize-space($papersize_height_)"/><xsl:variable name="pageWidth_">
2075
+ <xsl:choose>
2076
+ <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
2077
+ <xsl:otherwise>
2078
+ 210
2079
+ </xsl:otherwise>
2080
+ </xsl:choose>
2080
2081
  </xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
2081
- 297
2082
+ <xsl:choose>
2083
+ <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
2084
+ <xsl:otherwise>
2085
+ 297
2086
+ </xsl:otherwise>
2087
+ </xsl:choose>
2082
2088
  </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="marginLeftRight1_">
2083
2089
  20
2084
2090
  </xsl:variable><xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/><xsl:variable name="marginLeftRight2_">
@@ -2190,7 +2196,8 @@
2190
2196
  <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
2191
2197
  </xsl:otherwise>
2192
2198
  </xsl:choose>
2193
- </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:attribute-set name="root-style">
2199
+ </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="font_noto_sans">Noto Sans, Noto Sans HK, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Sans TC</xsl:variable><xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable><xsl:variable name="font_noto_serif">Noto Serif, Noto Serif HK, Noto Serif JP, Noto Serif KR, Noto Serif SC, Noto Serif TC</xsl:variable><xsl:attribute-set name="root-style">
2200
+
2194
2201
 
2195
2202
 
2196
2203
 
@@ -2200,7 +2207,8 @@
2200
2207
 
2201
2208
 
2202
2209
 
2203
- <xsl:attribute name="font-family">Times New Roman, STIX Two Math</xsl:attribute>
2210
+ <xsl:attribute name="font-family">Times New Roman, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
2211
+ <xsl:attribute name="font-family-generic">Serif</xsl:attribute>
2204
2212
  <xsl:attribute name="font-size">12pt</xsl:attribute>
2205
2213
 
2206
2214
 
@@ -2221,17 +2229,60 @@
2221
2229
  </xsl:variable>
2222
2230
  <xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
2223
2231
 
2232
+ <xsl:variable name="font_family_generic" select="$root-style_/root-style/@font-family-generic"/>
2233
+
2224
2234
  <xsl:for-each select="$root-style_/root-style/@*">
2235
+
2225
2236
  <xsl:choose>
2226
- <xsl:when test="local-name() = 'font-family' and $additional_fonts != ''">
2237
+ <xsl:when test="local-name() = 'font-family-generic'"><!-- skip, it's using for determine 'sans' or 'serif' --></xsl:when>
2238
+ <xsl:when test="local-name() = 'font-family'">
2239
+
2240
+ <xsl:variable name="font_regional_prefix">
2241
+ <xsl:choose>
2242
+ <xsl:when test="$font_family_generic = 'Sans'">Noto Sans</xsl:when>
2243
+ <xsl:otherwise>Noto Serif</xsl:otherwise>
2244
+ </xsl:choose>
2245
+ </xsl:variable>
2246
+
2227
2247
  <xsl:attribute name="{local-name()}">
2228
- <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
2248
+
2249
+ <xsl:variable name="font_extended">
2250
+ <xsl:choose>
2251
+ <xsl:when test="$lang = 'zh'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
2252
+ <xsl:when test="$lang = 'hk'"><xsl:value-of select="$font_regional_prefix"/> HK</xsl:when>
2253
+ <xsl:when test="$lang = 'jp'"><xsl:value-of select="$font_regional_prefix"/> JP</xsl:when>
2254
+ <xsl:when test="$lang = 'kr'"><xsl:value-of select="$font_regional_prefix"/> KR</xsl:when>
2255
+ <xsl:when test="$lang = 'sc'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
2256
+ <xsl:when test="$lang = 'tc'"><xsl:value-of select="$font_regional_prefix"/> TC</xsl:when>
2257
+ </xsl:choose>
2258
+ </xsl:variable>
2259
+ <xsl:if test="normalize-space($font_extended) != ''">
2260
+ <xsl:value-of select="$font_regional_prefix"/><xsl:text>, </xsl:text>
2261
+ <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
2262
+ </xsl:if>
2263
+
2264
+ <xsl:value-of select="."/>
2265
+
2266
+ <xsl:if test="$additional_fonts != ''">
2267
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
2268
+ </xsl:if>
2229
2269
  </xsl:attribute>
2230
2270
  </xsl:when>
2231
2271
  <xsl:otherwise>
2232
2272
  <xsl:copy-of select="."/>
2233
2273
  </xsl:otherwise>
2234
2274
  </xsl:choose>
2275
+
2276
+ <!-- <xsl:choose>
2277
+ <xsl:when test="local-name() = 'font-family'">
2278
+ <xsl:attribute name="{local-name()}">
2279
+ <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
2280
+ </xsl:attribute>
2281
+ </xsl:when>
2282
+ <xsl:otherwise>
2283
+ <xsl:copy-of select="."/>
2284
+ </xsl:otherwise>
2285
+ </xsl:choose> -->
2235
2286
  </xsl:for-each>
2236
2287
  </xsl:template><xsl:attribute-set name="copyright-statement-style">
2237
2288
 
@@ -2307,7 +2358,8 @@
2307
2358
 
2308
2359
 
2309
2360
 
2310
- <xsl:attribute name="font-family">Courier New</xsl:attribute>
2361
+
2362
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
2311
2363
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
2312
2364
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2313
2365
 
@@ -2326,7 +2378,10 @@
2326
2378
 
2327
2379
  </xsl:attribute-set><xsl:attribute-set name="requirement-style">
2328
2380
 
2381
+
2329
2382
  </xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
2383
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2384
+
2330
2385
 
2331
2386
  </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
2332
2387
 
@@ -2352,6 +2407,7 @@
2352
2407
 
2353
2408
 
2354
2409
 
2410
+
2355
2411
 
2356
2412
  </xsl:attribute-set><xsl:attribute-set name="example-style">
2357
2413
 
@@ -2360,6 +2416,7 @@
2360
2416
 
2361
2417
 
2362
2418
 
2419
+
2363
2420
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2364
2421
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
2365
2422
 
@@ -2384,6 +2441,7 @@
2384
2441
 
2385
2442
 
2386
2443
 
2444
+
2387
2445
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2388
2446
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2389
2447
 
@@ -2422,10 +2480,12 @@
2422
2480
 
2423
2481
 
2424
2482
 
2483
+
2425
2484
 
2426
2485
 
2427
2486
  </xsl:attribute-set><xsl:variable name="table-border_">
2428
2487
 
2488
+
2429
2489
  </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
2430
2490
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2431
2491
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -2439,6 +2499,7 @@
2439
2499
 
2440
2500
 
2441
2501
 
2502
+
2442
2503
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2443
2504
  <xsl:attribute name="space-after">18pt</xsl:attribute>
2444
2505
 
@@ -2477,6 +2538,7 @@
2477
2538
 
2478
2539
 
2479
2540
 
2541
+
2480
2542
 
2481
2543
  </xsl:attribute-set><xsl:attribute-set name="table-name-style">
2482
2544
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -2488,6 +2550,7 @@
2488
2550
 
2489
2551
 
2490
2552
 
2553
+
2491
2554
 
2492
2555
 
2493
2556
 
@@ -2552,6 +2615,7 @@
2552
2615
 
2553
2616
 
2554
2617
 
2618
+
2555
2619
  <xsl:attribute name="display-align">before</xsl:attribute>
2556
2620
 
2557
2621
 
@@ -2572,7 +2636,7 @@
2572
2636
 
2573
2637
 
2574
2638
 
2575
-
2639
+
2576
2640
 
2577
2641
 
2578
2642
 
@@ -2587,6 +2651,7 @@
2587
2651
 
2588
2652
 
2589
2653
 
2654
+
2590
2655
  </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
2591
2656
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2592
2657
 
@@ -2595,6 +2660,8 @@
2595
2660
 
2596
2661
 
2597
2662
 
2663
+
2664
+
2598
2665
  <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
2599
2666
  <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
2600
2667
  <xsl:attribute name="text-indent">-5mm</xsl:attribute>
@@ -2611,6 +2678,7 @@
2611
2678
 
2612
2679
 
2613
2680
 
2681
+
2614
2682
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2615
2683
  <xsl:attribute name="padding-right">3mm</xsl:attribute>
2616
2684
  <xsl:attribute name="font-size">70%</xsl:attribute>
@@ -2651,6 +2719,27 @@
2651
2719
 
2652
2720
 
2653
2721
 
2722
+
2723
+ </xsl:attribute-set><xsl:attribute-set name="dl-name-style">
2724
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2725
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2726
+
2727
+
2728
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2729
+
2730
+
2731
+
2732
+
2733
+
2734
+
2735
+
2736
+
2737
+
2738
+
2739
+
2740
+
2741
+
2742
+
2654
2743
  </xsl:attribute-set><xsl:attribute-set name="dd-cell-style">
2655
2744
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
2656
2745
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
@@ -2686,6 +2775,7 @@
2686
2775
 
2687
2776
 
2688
2777
 
2778
+
2689
2779
 
2690
2780
 
2691
2781
 
@@ -2726,7 +2816,8 @@
2726
2816
 
2727
2817
 
2728
2818
 
2729
-
2819
+
2820
+
2730
2821
 
2731
2822
 
2732
2823
 
@@ -2741,6 +2832,7 @@
2741
2832
  </xsl:attribute-set><xsl:attribute-set name="termnote-style">
2742
2833
 
2743
2834
 
2835
+
2744
2836
 
2745
2837
 
2746
2838
 
@@ -2753,6 +2845,8 @@
2753
2845
 
2754
2846
 
2755
2847
 
2848
+ </xsl:attribute-set><xsl:attribute-set name="termnote-p-style">
2849
+
2756
2850
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
2757
2851
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
2758
2852
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
@@ -2795,6 +2889,7 @@
2795
2889
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
2796
2890
 
2797
2891
 
2892
+
2798
2893
 
2799
2894
 
2800
2895
 
@@ -2838,6 +2933,7 @@
2838
2933
 
2839
2934
 
2840
2935
 
2936
+
2841
2937
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2842
2938
 
2843
2939
 
@@ -2869,17 +2965,17 @@
2869
2965
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2870
2966
 
2871
2967
  </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
2968
+ <xsl:attribute name="width">100%</xsl:attribute>
2969
+ <xsl:attribute name="content-height">100%</xsl:attribute>
2970
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
2872
2971
 
2873
2972
 
2874
2973
 
2875
2974
 
2876
2975
 
2877
2976
  <xsl:attribute name="width">75%</xsl:attribute>
2878
- <xsl:attribute name="content-height">100%</xsl:attribute>
2879
2977
  <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
2880
- <xsl:attribute name="scaling">uniform</xsl:attribute>
2881
-
2882
-
2978
+
2883
2979
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
2884
2980
 
2885
2981
 
@@ -2960,6 +3056,25 @@
2960
3056
 
2961
3057
 
2962
3058
 
3059
+
3060
+ </xsl:attribute-set><xsl:attribute-set name="list-name-style">
3061
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
3062
+
3063
+
3064
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3065
+
3066
+
3067
+
3068
+
3069
+
3070
+
3071
+
3072
+
3073
+
3074
+
3075
+
3076
+
3077
+
2963
3078
  </xsl:attribute-set><xsl:attribute-set name="list-item-style">
2964
3079
 
2965
3080
 
@@ -3000,6 +3115,7 @@
3000
3115
 
3001
3116
 
3002
3117
 
3118
+
3003
3119
  <xsl:attribute name="font-size">60%</xsl:attribute>
3004
3120
  <xsl:attribute name="vertical-align">super</xsl:attribute>
3005
3121
 
@@ -3024,6 +3140,7 @@
3024
3140
 
3025
3141
 
3026
3142
 
3143
+
3027
3144
  <xsl:attribute name="font-size">11pt</xsl:attribute>
3028
3145
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3029
3146
  <xsl:attribute name="text-align">justify</xsl:attribute>
@@ -3048,6 +3165,7 @@
3048
3165
 
3049
3166
 
3050
3167
 
3168
+
3051
3169
  <xsl:attribute name="font-size">85%</xsl:attribute>
3052
3170
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
3053
3171
  <xsl:attribute name="baseline-shift">30%</xsl:attribute>
@@ -3075,7 +3193,11 @@
3075
3193
 
3076
3194
 
3077
3195
 
3196
+
3078
3197
  </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
3198
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
3199
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
3200
+
3079
3201
 
3080
3202
 
3081
3203
 
@@ -3113,6 +3235,7 @@
3113
3235
 
3114
3236
 
3115
3237
 
3238
+
3116
3239
  </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
3117
3240
 
3118
3241
 
@@ -3143,6 +3266,10 @@
3143
3266
 
3144
3267
 
3145
3268
 
3269
+ <!-- <xsl:if test="$namespace = 'ieee'">
3270
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3271
+ <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
3272
+ </xsl:if> -->
3146
3273
 
3147
3274
 
3148
3275
 
@@ -3173,6 +3300,7 @@
3173
3300
 
3174
3301
 
3175
3302
 
3303
+
3176
3304
  </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
3177
3305
 
3178
3306
 
@@ -3200,6 +3328,7 @@
3200
3328
 
3201
3329
 
3202
3330
 
3331
+
3203
3332
  <xsl:attribute name="font-size">8pt</xsl:attribute>
3204
3333
  <xsl:attribute name="baseline-shift">30%</xsl:attribute>
3205
3334
 
@@ -3221,6 +3350,7 @@
3221
3350
 
3222
3351
 
3223
3352
 
3353
+
3224
3354
  <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
3225
3355
  <xsl:attribute name="padding-right">3mm</xsl:attribute>
3226
3356
 
@@ -3242,6 +3372,7 @@
3242
3372
 
3243
3373
 
3244
3374
 
3375
+
3245
3376
  <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
3246
3377
 
3247
3378
 
@@ -3359,13 +3490,13 @@
3359
3490
 
3360
3491
  </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
3361
3492
  <xsl:variable name="nodes_preface_">
3362
- <xsl:for-each select="/*/*[local-name()='preface']/*">
3493
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
3363
3494
  <node id="{@id}"/>
3364
3495
  </xsl:for-each>
3365
3496
  </xsl:variable>
3366
3497
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
3367
3498
 
3368
- <xsl:for-each select="/*/*[local-name()='preface']/*">
3499
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
3369
3500
  <xsl:sort select="@displayorder" data-type="number"/>
3370
3501
 
3371
3502
  <!-- process Section's title -->
@@ -3431,7 +3562,7 @@
3431
3562
  </xsl:for-each>
3432
3563
  </figures>
3433
3564
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
3434
- <xsl:for-each select="/*/*[local-name()='preface']/*">
3565
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
3435
3566
  <xsl:sort select="@displayorder" data-type="number"/>
3436
3567
  <xsl:apply-templates select="."/>
3437
3568
  </xsl:for-each>
@@ -3689,6 +3820,8 @@
3689
3820
 
3690
3821
 
3691
3822
 
3823
+
3824
+
3692
3825
  <xsl:if test="$doctype = 'service-publication' and $lang != 'ar'">
3693
3826
  <xsl:attribute name="font-family">Calibri</xsl:attribute>
3694
3827
  </xsl:if>
@@ -3725,6 +3858,8 @@
3725
3858
 
3726
3859
 
3727
3860
 
3861
+
3862
+
3728
3863
  <xsl:if test="$doctype = 'service-publication'">
3729
3864
  <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3730
3865
  </xsl:if>
@@ -3878,23 +4013,29 @@
3878
4013
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
3879
4014
  <xsl:param name="continued"/>
3880
4015
  <xsl:if test="normalize-space() != ''">
3881
- <fo:block xsl:use-attribute-sets="table-name-style">
3882
-
3883
-
3884
-
3885
-
4016
+
4017
+
3886
4018
 
3887
- <xsl:choose>
3888
- <xsl:when test="$continued = 'true'">
4019
+ <fo:block xsl:use-attribute-sets="table-name-style">
4020
+
3889
4021
 
3890
- </xsl:when>
3891
- <xsl:otherwise>
3892
- <xsl:apply-templates/>
3893
- </xsl:otherwise>
3894
- </xsl:choose>
3895
-
4022
+
4023
+
4024
+
4025
+ <xsl:choose>
4026
+ <xsl:when test="$continued = 'true'">
4027
+
4028
+ </xsl:when>
4029
+ <xsl:otherwise>
4030
+ <xsl:apply-templates/>
4031
+ </xsl:otherwise>
4032
+ </xsl:choose>
4033
+
4034
+
4035
+ </fo:block>
4036
+
3896
4037
 
3897
- </fo:block>
4038
+
3898
4039
  </xsl:if>
3899
4040
  </xsl:template><xsl:template name="calculate-columns-numbers">
3900
4041
  <xsl:param name="table-row"/>
@@ -4057,8 +4198,9 @@
4057
4198
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
4058
4199
  </xsl:if>
4059
4200
  </xsl:template><xsl:template name="calculate-column-widths-autolayout-algorithm">
4060
- <xsl:param name="table"/>
4061
- <xsl:param name="if">false</xsl:param> <!-- via intermediate format -->
4201
+ <xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
4202
+
4203
+ <!-- via intermediate format -->
4062
4204
 
4063
4205
  <!-- The algorithm uses two passes through the table data and scales linearly with the size of the table -->
4064
4206
 
@@ -4069,9 +4211,8 @@
4069
4211
  <!-- get current table id -->
4070
4212
  <xsl:variable name="table_id" select="@id"/>
4071
4213
  <!-- find table by id in the file 'table_widths' -->
4072
- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
4073
- <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/>
4074
-
4214
+ <!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
4215
+ <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
4075
4216
 
4076
4217
  <!-- table='<xsl:copy-of select="$table"/>' -->
4077
4218
  <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
@@ -4079,24 +4220,13 @@
4079
4220
  <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
4080
4221
 
4081
4222
  <xsl:variable name="table_with_cell_widths_">
4082
- <xsl:choose>
4083
- <xsl:when test="$if = 'true' and normalize-space($table-if) != ''"> <!-- if we read column's width from IF and there is table in IF -->
4084
-
4085
- <!-- Example: <column>10</column>
4086
- <column>11</column>
4087
- -->
4088
- <xsl:apply-templates select="$table-if" mode="determine_cell_widths-if"/>
4089
- </xsl:when>
4090
- <xsl:otherwise>
4091
- <xsl:apply-templates select="xalan:nodeset($table)" mode="determine_cell_widths"/>
4092
- </xsl:otherwise>
4093
- </xsl:choose>
4223
+ <xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
4094
4224
  </xsl:variable>
4095
4225
  <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
4096
4226
 
4097
- <xsl:if test="$table_if_debug = 'true'">
4227
+ <!-- <xsl:if test="$table_if_debug = 'true'">
4098
4228
  <xsl:copy-of select="$table_with_cell_widths"/>
4099
- </xsl:if>
4229
+ </xsl:if> -->
4100
4230
 
4101
4231
 
4102
4232
  <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
@@ -4142,8 +4272,12 @@
4142
4272
 
4143
4273
  <xsl:variable name="page_width">
4144
4274
  <xsl:choose>
4145
- <xsl:when test="$if = 'true'"><xsl:value-of select="$table-if/@page-width"/></xsl:when>
4146
- <xsl:otherwise>75</xsl:otherwise>
4275
+ <xsl:when test="$parent_table_page-width != ''">
4276
+ <xsl:value-of select="$parent_table_page-width"/>
4277
+ </xsl:when>
4278
+ <xsl:otherwise>
4279
+ <xsl:value-of select="@page-width"/>
4280
+ </xsl:otherwise>
4147
4281
  </xsl:choose>
4148
4282
  </xsl:variable>
4149
4283
 
@@ -4151,9 +4285,6 @@
4151
4285
  <table_width>
4152
4286
  <xsl:copy-of select="$table_widths"/>
4153
4287
  </table_width>
4154
- <!-- <debug>$table_widths/@width_min=<xsl:value-of select="$table_widths/table/@width_min"/></debug>
4155
- <debug>$table_widths/@width_max=<xsl:value-of select="$table_widths/table/@width_max"/></debug>
4156
- -->
4157
4288
  <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
4158
4289
  </xsl:if>
4159
4290
 
@@ -4164,11 +4295,11 @@
4164
4295
  <xsl:when test="$table_widths/table/@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
4165
4296
  <!-- call old algorithm -->
4166
4297
  <case1/>
4167
- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
4298
+ <!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
4168
4299
  <xsl:call-template name="calculate-column-widths-proportional">
4169
4300
  <xsl:with-param name="cols-count" select="$cols-count"/>
4170
4301
  <xsl:with-param name="table" select="$table"/>
4171
- </xsl:call-template>
4302
+ </xsl:call-template> -->
4172
4303
  </xsl:when>
4173
4304
  <!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
4174
4305
  <xsl:when test="$table_widths/table/@width_max &lt;= $page_width">
@@ -4212,95 +4343,49 @@
4212
4343
  <xsl:otherwise><unknown_case/></xsl:otherwise>
4213
4344
  </xsl:choose>
4214
4345
 
4346
+ </xsl:template><xsl:template name="get-calculated-column-widths-autolayout-algorithm">
4215
4347
 
4216
- </xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths">
4217
- <xsl:copy>
4218
- <xsl:apply-templates select="@*|node()" mode="determine_cell_widths"/>
4219
- </xsl:copy>
4220
- </xsl:template><xsl:template match="td | th" mode="determine_cell_widths">
4221
- <xsl:copy>
4222
- <xsl:copy-of select="@*"/>
4348
+ <!-- if nested 'dl' or 'table' -->
4349
+ <xsl:variable name="parent_table_id" select="normalize-space(ancestor::*[local-name() = 'table' or local-name() = 'dl'][1]/@id)"/>
4350
+ <parent_table_id><xsl:value-of select="$parent_table_id"/></parent_table_id>
4223
4351
 
4224
- <!-- The maximum width is given by the widest line. -->
4225
- <xsl:variable name="widths_max">
4226
- <xsl:for-each select=".//*[local-name() = 'p']">
4227
- <xsl:call-template name="add_width"/>
4228
- </xsl:for-each>
4229
- <xsl:if test="not(*[local-name() = 'p'])">
4230
- <xsl:call-template name="add_width"/>
4231
- </xsl:if>
4232
- </xsl:variable>
4233
- <xsl:variable name="width_max">
4234
- <xsl:for-each select="xalan:nodeset($widths_max)//width">
4235
- <xsl:sort select="." data-type="number" order="descending"/>
4236
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
4237
- </xsl:for-each>
4238
- </xsl:variable>
4239
- <xsl:attribute name="width_max">
4240
- <xsl:value-of select="$width_max"/>
4241
- </xsl:attribute>
4352
+ <parent_element><xsl:value-of select="local-name(..)"/></parent_element>
4242
4353
 
4243
- <!-- The minimum width is given by the widest text element (word, image, etc.) -->
4244
- <!-- To do: image width -->
4245
- <xsl:variable name="td_text">
4246
- <xsl:apply-templates select="." mode="td_text"/>
4247
- </xsl:variable>
4248
- <xsl:variable name="words">
4249
- <xsl:variable name="string_with_added_zerospaces">
4250
- <xsl:call-template name="add-zero-spaces-java">
4251
- <xsl:with-param name="text" select="$td_text"/>
4252
- </xsl:call-template>
4354
+ <xsl:variable name="parent_table_page-width_">
4355
+ <xsl:if test="$parent_table_id != ''">
4356
+ <!-- determine column number in the parent table -->
4357
+ <xsl:variable name="parent_table_column_number">
4358
+ <xsl:choose>
4359
+ <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
4360
+ <xsl:otherwise> <!-- parent is table -->
4361
+ <xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
4362
+ </xsl:otherwise>
4363
+ </xsl:choose>
4253
4364
  </xsl:variable>
4254
- <xsl:call-template name="tokenize">
4255
- <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
4256
- </xsl:call-template>
4257
- </xsl:variable>
4258
-
4259
- <xsl:variable name="max_word_length">
4260
- <xsl:call-template name="max_length">
4261
- <xsl:with-param name="words" select="xalan:nodeset($words)"/>
4262
- </xsl:call-template>
4263
- </xsl:variable>
4264
- <xsl:variable name="width_min">
4265
- <xsl:value-of select="$max_word_length"/>
4266
- </xsl:variable>
4267
- <xsl:attribute name="width_min">
4268
- <xsl:value-of select="$width_min"/>
4269
- </xsl:attribute>
4270
- <!-- width_max="1" width_min="1.5"> --> <!-- see 'tokenize' template, multiply 1.5 for all latin capitals -->
4271
- <xsl:if test="$width_min &gt; $width_max">
4272
- <xsl:attribute name="width_max">
4273
- <xsl:value-of select="$width_min"/>
4274
- </xsl:attribute>
4365
+ <!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
4366
+ <xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
4275
4367
  </xsl:if>
4276
- <xsl:if test="$width_min = 0">
4277
- <xsl:attribute name="width_min">1</xsl:attribute>
4278
- </xsl:if>
4279
-
4280
- <xsl:apply-templates select="node()" mode="determine_cell_widths"/>
4281
-
4282
- </xsl:copy>
4283
- </xsl:template><xsl:template name="add_width">
4284
- <xsl:variable name="p_text"><xsl:apply-templates select="." mode="td_text"/></xsl:variable>
4285
- <xsl:variable name="p_text_len_" select="string-length(normalize-space($p_text))"/>
4286
-
4287
- <xsl:variable name="p_text_len">
4288
- <xsl:choose>
4289
- <xsl:when test="normalize-space(translate($p_text, concat($upper,'0123456789'), '')) = ''"> <!-- english word in CAPITAL letters -->
4290
- <xsl:value-of select="$p_text_len_ * 1.5"/>
4291
- </xsl:when>
4292
- <xsl:otherwise><xsl:value-of select="$p_text_len_"/></xsl:otherwise>
4293
- </xsl:choose>
4294
4368
  </xsl:variable>
4369
+ <xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
4295
4370
 
4296
- <xsl:variable name="math_addon_text">
4297
- <xsl:for-each select=".//*[local-name() = 'math']">
4298
- <xsl:apply-templates mode="td_text"/>
4299
- </xsl:for-each>
4300
- </xsl:variable>
4301
- <xsl:variable name="math_addon_length" select="string-length(normalize-space($math_addon_text)) * 0.2"/> <!-- plus 20% -->
4371
+ <!-- get current table id -->
4372
+ <xsl:variable name="table_id" select="@id"/>
4373
+
4374
+ <xsl:choose>
4375
+ <xsl:when test="$parent_table_id = '' or $parent_table_page-width = ''">
4376
+ <!-- find table by id in the file 'table_widths' and get all `<column>...</column> -->
4377
+ <xsl:copy-of select="$table_widths_from_if_calculated//table[@id = $table_id]/node()"/>
4378
+ </xsl:when>
4379
+ <xsl:otherwise>
4380
+ <!-- recalculate columns width based on parent table width -->
4381
+ <xsl:for-each select="$table_widths_from_if//table[@id = $table_id]">
4382
+ <xsl:call-template name="calculate-column-widths-autolayout-algorithm">
4383
+ <xsl:with-param name="parent_table_page-width" select="$parent_table_page-width"/> <!-- padding-left = 2mm = 50000-->
4384
+ </xsl:call-template>
4385
+ </xsl:for-each>
4386
+ </xsl:otherwise>
4387
+ </xsl:choose>
4302
4388
 
4303
- <width><xsl:value-of select="$p_text_len + $math_addon_length"/></width>
4304
4389
  </xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths-if">
4305
4390
  <xsl:copy>
4306
4391
  <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
@@ -4348,12 +4433,18 @@
4348
4433
  <fo:table-row>
4349
4434
  <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">
4350
4435
 
4351
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
4352
- <xsl:with-param name="continued">true</xsl:with-param>
4353
- </xsl:apply-templates>
4354
4436
 
4355
4437
 
4356
4438
 
4439
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
4440
+ <xsl:with-param name="continued">true</xsl:with-param>
4441
+ </xsl:apply-templates>
4442
+
4443
+
4444
+
4445
+
4446
+
4447
+
4357
4448
  </fo:table-cell>
4358
4449
  </fo:table-row>
4359
4450
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -4393,96 +4484,110 @@
4393
4484
  </xsl:choose>
4394
4485
  </xsl:variable>
4395
4486
 
4396
- <fo:table keep-with-previous="always">
4397
- <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
4398
- <xsl:variable name="name" select="local-name()"/>
4487
+
4488
+ <xsl:variable name="tableWithNotesAndFootnotes">
4489
+
4490
+ <fo:table keep-with-previous="always">
4491
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
4492
+ <xsl:variable name="name" select="local-name()"/>
4493
+ <xsl:choose>
4494
+ <xsl:when test="$name = 'border-top'">
4495
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
4496
+ </xsl:when>
4497
+ <xsl:when test="$name = 'border'">
4498
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
4499
+ <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
4500
+ </xsl:when>
4501
+ <xsl:otherwise>
4502
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
4503
+ </xsl:otherwise>
4504
+ </xsl:choose>
4505
+ </xsl:for-each>
4506
+
4507
+
4508
+ <xsl:if test="$doctype = 'service-publication'">
4509
+ <xsl:attribute name="border">none</xsl:attribute>
4510
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
4511
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
4512
+ </xsl:if>
4513
+
4514
+
4399
4515
  <xsl:choose>
4400
- <xsl:when test="$name = 'border-top'">
4401
- <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
4402
- </xsl:when>
4403
- <xsl:when test="$name = 'border'">
4404
- <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
4405
- <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
4516
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
4517
+ <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
4518
+ <fo:table-column column-width="{@width}"/>
4519
+ </xsl:for-each>
4406
4520
  </xsl:when>
4407
4521
  <xsl:otherwise>
4408
- <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
4522
+ <!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
4523
+ <xsl:call-template name="insertTableColumnWidth">
4524
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4525
+ </xsl:call-template>
4409
4526
  </xsl:otherwise>
4410
4527
  </xsl:choose>
4411
- </xsl:for-each>
4412
-
4413
-
4414
- <xsl:if test="$doctype = 'service-publication'">
4415
- <xsl:attribute name="border">none</xsl:attribute>
4416
- <xsl:attribute name="font-family">Arial</xsl:attribute>
4417
- <xsl:attribute name="font-size">8pt</xsl:attribute>
4418
- </xsl:if>
4419
-
4420
-
4421
- <xsl:choose>
4422
- <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
4423
- <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
4424
- <fo:table-column column-width="{@width}"/>
4425
- </xsl:for-each>
4426
- </xsl:when>
4427
- <xsl:otherwise>
4428
- <!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
4429
- <xsl:call-template name="insertTableColumnWidth">
4430
- <xsl:with-param name="colwidths" select="$colwidths"/>
4431
- </xsl:call-template>
4432
- </xsl:otherwise>
4433
- </xsl:choose>
4434
-
4435
- <fo:table-body>
4436
- <fo:table-row>
4437
- <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
4438
-
4439
-
4528
+
4529
+ <fo:table-body>
4530
+ <fo:table-row>
4531
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
4532
+
4533
+
4440
4534
 
4441
-
4442
- <xsl:if test="ancestor::*[local-name()='preface']">
4443
- <xsl:if test="$doctype != 'service-publication'">
4444
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
4535
+
4536
+ <xsl:if test="ancestor::*[local-name()='preface']">
4537
+ <xsl:if test="$doctype != 'service-publication'">
4538
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
4539
+ </xsl:if>
4540
+ </xsl:if>
4541
+ <xsl:if test="$doctype = 'service-publication'">
4542
+ <xsl:attribute name="border">none</xsl:attribute>
4445
4543
  </xsl:if>
4446
- </xsl:if>
4447
- <xsl:if test="$doctype = 'service-publication'">
4448
- <xsl:attribute name="border">none</xsl:attribute>
4449
- </xsl:if>
4450
-
4451
-
4452
- <!-- fn will be processed inside 'note' processing -->
4453
-
4454
-
4455
-
4456
-
4457
-
4458
- <xsl:if test="$doctype = 'service-publication'">
4459
- <fo:block margin-top="7pt" margin-bottom="2pt"><fo:inline>____________</fo:inline></fo:block>
4460
- </xsl:if>
4461
-
4462
-
4463
- <!-- for BSI (not PAS) display Notes before footnotes -->
4464
-
4465
-
4466
- <!-- except gb and bsi -->
4467
-
4468
- <xsl:apply-templates select="../*[local-name()='note']"/>
4469
4544
 
4470
-
4471
-
4472
- <!-- horizontal row separator -->
4473
-
4474
-
4475
- <!-- fn processing -->
4476
- <xsl:call-template name="table_fn_display"/>
4477
-
4478
- <!-- for PAS display Notes after footnotes -->
4479
-
4480
-
4481
- </fo:table-cell>
4482
- </fo:table-row>
4483
- </fo:table-body>
4484
-
4485
- </fo:table>
4545
+
4546
+ <!-- fn will be processed inside 'note' processing -->
4547
+
4548
+
4549
+
4550
+
4551
+
4552
+ <xsl:if test="$doctype = 'service-publication'">
4553
+ <fo:block margin-top="7pt" margin-bottom="2pt"><fo:inline>____________</fo:inline></fo:block>
4554
+ </xsl:if>
4555
+
4556
+
4557
+ <!-- for BSI (not PAS) display Notes before footnotes -->
4558
+
4559
+
4560
+ <!-- except gb and bsi -->
4561
+
4562
+ <xsl:apply-templates select="../*[local-name()='note']"/>
4563
+
4564
+
4565
+
4566
+ <!-- horizontal row separator -->
4567
+
4568
+
4569
+ <!-- fn processing -->
4570
+
4571
+ <xsl:call-template name="table_fn_display"/>
4572
+
4573
+
4574
+
4575
+ <!-- for PAS display Notes after footnotes -->
4576
+
4577
+
4578
+ </fo:table-cell>
4579
+ </fo:table-row>
4580
+ </fo:table-body>
4581
+
4582
+ </fo:table>
4583
+ </xsl:variable>
4584
+
4585
+ <xsl:if test="normalize-space($tableWithNotesAndFootnotes) != ''">
4586
+ <xsl:copy-of select="$tableWithNotesAndFootnotes"/>
4587
+ </xsl:if>
4588
+
4589
+
4590
+
4486
4591
  </xsl:if>
4487
4592
  </xsl:template><xsl:template match="*[local-name()='tbody']">
4488
4593
 
@@ -4571,6 +4676,9 @@
4571
4676
 
4572
4677
 
4573
4678
 
4679
+
4680
+
4681
+
4574
4682
 
4575
4683
  <xsl:if test="$doctype = 'service-publication'">
4576
4684
  <xsl:attribute name="border-bottom">1.1pt solid black</xsl:attribute>
@@ -4594,6 +4702,8 @@
4594
4702
 
4595
4703
 
4596
4704
 
4705
+
4706
+
4597
4707
  <xsl:call-template name="setTableRowAttributes"/>
4598
4708
  <xsl:apply-templates/>
4599
4709
  </fo:table-row>
@@ -4690,6 +4800,8 @@
4690
4800
 
4691
4801
 
4692
4802
 
4803
+
4804
+
4693
4805
  <xsl:if test="ancestor::*[local-name()='preface']">
4694
4806
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
4695
4807
  </xsl:if>
@@ -4769,7 +4881,11 @@
4769
4881
 
4770
4882
  <xsl:variable name="gen_id" select="generate-id(.)"/>
4771
4883
  <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
4772
- <xsl:variable name="reference" select="@reference"/>
4884
+ <xsl:variable name="reference_">
4885
+ <xsl:value-of select="@reference"/>
4886
+ <xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
4887
+ </xsl:variable>
4888
+ <xsl:variable name="reference" select="normalize-space($reference_)"/>
4773
4889
  <!-- fn sequence number in document -->
4774
4890
  <xsl:variable name="current_fn_number">
4775
4891
  <xsl:choose>
@@ -4789,6 +4905,7 @@
4789
4905
  <xsl:variable name="footnote_inline">
4790
4906
  <fo:inline xsl:use-attribute-sets="fn-num-style">
4791
4907
 
4908
+
4792
4909
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
4793
4910
  <xsl:value-of select="$current_fn_number_text"/>
4794
4911
  </fo:basic-link>
@@ -4810,12 +4927,16 @@
4810
4927
  <fo:block xsl:use-attribute-sets="fn-body-style">
4811
4928
 
4812
4929
 
4930
+
4813
4931
  <xsl:if test="$doctype = 'service-publication'">
4814
4932
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4815
4933
  </xsl:if>
4816
4934
 
4817
4935
  <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
4818
4936
 
4937
+
4938
+
4939
+
4819
4940
  <xsl:value-of select="$current_fn_number_text"/>
4820
4941
  </fo:inline>
4821
4942
  <xsl:apply-templates/>
@@ -4848,7 +4969,7 @@
4848
4969
  <xsl:copy-of select="node()"/>
4849
4970
  </fn>
4850
4971
  </xsl:for-each>
4851
- <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
4972
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='boilerplate']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
4852
4973
  <xsl:sort select="@displayorder" data-type="number"/>
4853
4974
  <xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
4854
4975
  <!-- copy unique fn -->
@@ -5140,11 +5261,19 @@
5140
5261
 
5141
5262
 
5142
5263
 
5264
+
5265
+ <xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
5266
+ <xsl:attribute name="margin-top">0</xsl:attribute>
5267
+ </xsl:if>
5268
+
5143
5269
  <fo:block>
5144
5270
 
5145
5271
 
5146
5272
 
5147
5273
 
5274
+ <xsl:apply-templates select="*[local-name() = 'name']">
5275
+ <xsl:with-param name="process">true</xsl:with-param>
5276
+ </xsl:apply-templates>
5148
5277
 
5149
5278
  <xsl:if test="$isGenerateTableIF = 'true'">
5150
5279
  <!-- to determine start of table -->
@@ -5167,6 +5296,7 @@
5167
5296
  </xsl:choose>
5168
5297
 
5169
5298
 
5299
+
5170
5300
  <xsl:choose>
5171
5301
  <xsl:when test="$isGenerateTableIF = 'true'">
5172
5302
  <!-- generate IF for table widths -->
@@ -5295,6 +5425,18 @@
5295
5425
  </xsl:if> <!-- END: a few components -->
5296
5426
  </fo:block-container>
5297
5427
  </fo:block-container>
5428
+
5429
+ <xsl:if test="$isGenerateTableIF = 'true'"> <!-- process nested 'dl' -->
5430
+ <xsl:apply-templates select="*[local-name() = 'dd']/*[local-name() = 'dl']"/>
5431
+ </xsl:if>
5432
+
5433
+ </xsl:template><xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
5434
+ <xsl:param name="process">false</xsl:param>
5435
+ <xsl:if test="$process = 'true'">
5436
+ <fo:block xsl:use-attribute-sets="dl-name-style">
5437
+ <xsl:apply-templates/>
5438
+ </fo:block>
5439
+ </xsl:if>
5298
5440
  </xsl:template><xsl:template name="setColumnWidth_dl">
5299
5441
  <xsl:param name="colwidths"/>
5300
5442
  <xsl:param name="maxlength_dt"/>
@@ -5303,6 +5445,11 @@
5303
5445
  <!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
5304
5446
 
5305
5447
  <xsl:choose>
5448
+ <xsl:when test="xalan:nodeset($colwidths)/autolayout">
5449
+ <xsl:call-template name="insertTableColumnWidth">
5450
+ <xsl:with-param name="colwidths" select="$colwidths"/>
5451
+ </xsl:call-template>
5452
+ </xsl:when>
5306
5453
  <xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
5307
5454
  <fo:table-column column-width="50%"/>
5308
5455
  <fo:table-column column-width="50%"/>
@@ -5565,12 +5712,24 @@
5565
5712
  </td>
5566
5713
  <td>
5567
5714
 
5568
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()"/>
5715
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
5716
+
5717
+ <!-- get paragraphs from nested 'dl' -->
5718
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
5719
+
5569
5720
 
5570
5721
  </td>
5571
5722
  </tr>
5572
5723
 
5573
- </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='em']">
5724
+ </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
5725
+ <xsl:for-each select="*[local-name() = 'dt']">
5726
+ <p>
5727
+ <xsl:copy-of select="node()"/>
5728
+ <xsl:text> </xsl:text>
5729
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'p']/node()"/>
5730
+ </p>
5731
+ </xsl:for-each>
5732
+ </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if_nested"/><xsl:template match="*[local-name()='em']">
5574
5733
  <fo:inline font-style="italic">
5575
5734
  <xsl:apply-templates/>
5576
5735
  </fo:inline>
@@ -5601,7 +5760,7 @@
5601
5760
 
5602
5761
 
5603
5762
 
5604
-
5763
+ <!-- 10 -->
5605
5764
 
5606
5765
 
5607
5766
 
@@ -6473,6 +6632,13 @@
6473
6632
  </xsl:variable>
6474
6633
  <fo:inline xsl:use-attribute-sets="link-style">
6475
6634
 
6635
+ <xsl:if test="starts-with(normalize-space(@target), 'mailto:')">
6636
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
6637
+ </xsl:if>
6638
+
6639
+
6640
+
6641
+
6476
6642
 
6477
6643
 
6478
6644
 
@@ -6690,6 +6856,7 @@
6690
6856
 
6691
6857
 
6692
6858
 
6859
+
6693
6860
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
6694
6861
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
6695
6862
  <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
@@ -6711,6 +6878,7 @@
6711
6878
  </xsl:when>
6712
6879
  <xsl:otherwise>
6713
6880
 
6881
+
6714
6882
 
6715
6883
  <xsl:text> – </xsl:text>
6716
6884
 
@@ -6730,6 +6898,7 @@
6730
6898
  </xsl:when>
6731
6899
  <xsl:otherwise>
6732
6900
 
6901
+
6733
6902
 
6734
6903
  <xsl:text> – </xsl:text>
6735
6904
 
@@ -6741,7 +6910,19 @@
6741
6910
  <xsl:value-of select="$suffix"/>
6742
6911
  </xsl:if>
6743
6912
  </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
6744
- <fo:inline><xsl:apply-templates/></fo:inline>
6913
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
6914
+ <xsl:choose>
6915
+ <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
6916
+ <fo:inline xsl:use-attribute-sets="termnote-p-style">
6917
+ <xsl:apply-templates/>
6918
+ </fo:inline>
6919
+ </xsl:when>
6920
+ <xsl:otherwise>
6921
+ <fo:block xsl:use-attribute-sets="termnote-p-style">
6922
+ <xsl:apply-templates/>
6923
+ </fo:block>
6924
+ </xsl:otherwise>
6925
+ </xsl:choose>
6745
6926
  </xsl:template><xsl:template match="*[local-name() = 'terms']">
6746
6927
  <!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
6747
6928
  <fo:block id="{@id}">
@@ -7496,6 +7677,9 @@
7496
7677
  <fo:block xsl:use-attribute-sets="figure-name-style">
7497
7678
 
7498
7679
 
7680
+
7681
+
7682
+
7499
7683
  <xsl:apply-templates/>
7500
7684
  </fo:block>
7501
7685
  </xsl:if>
@@ -7556,9 +7740,9 @@
7556
7740
  <xsl:apply-templates/>
7557
7741
  </xsl:otherwise>
7558
7742
  </xsl:choose>
7559
- </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'xref']" mode="contents">
7743
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'xref'] | *[local-name() = 'eref']" mode="contents">
7560
7744
  <xsl:value-of select="."/>
7561
- </xsl:template><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
7745
+ </xsl:template><xsl:template match="*[local-name() = 'review']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
7562
7746
  <xsl:text> </xsl:text>
7563
7747
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
7564
7748
  <xsl:copy>
@@ -7629,9 +7813,12 @@
7629
7813
 
7630
7814
 
7631
7815
 
7816
+ <!-- 9 -->
7632
7817
 
7633
7818
 
7634
-
7819
+ <!-- <xsl:if test="$namespace = 'ieee'">
7820
+ <xsl:if test="$doctype = 'standard' and $stage = 'published'">8</xsl:if>
7821
+ </xsl:if> -->
7635
7822
  10
7636
7823
 
7637
7824
 
@@ -7713,7 +7900,7 @@
7713
7900
  <xsl:for-each select="xalan:nodeset($text_step4)/node()">
7714
7901
  <xsl:choose>
7715
7902
  <xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
7716
- <xsl:call-template name="interspers">
7903
+ <xsl:call-template name="interspers-java">
7717
7904
  <xsl:with-param name="str" select="."/>
7718
7905
  </xsl:call-template>
7719
7906
  </xsl:when>
@@ -7763,6 +7950,10 @@
7763
7950
  <xsl:with-param name="char" select="$char"/>
7764
7951
  </xsl:call-template>
7765
7952
  </xsl:if>
7953
+ </xsl:template><xsl:template name="interspers-java">
7954
+ <xsl:param name="str"/>
7955
+ <xsl:param name="char" select="$zero_width_space"/>
7956
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($str),'([^ -.:=_—])',concat('$1', $char))"/> <!-- insert $char after each char excep space, - . : = _ etc. -->
7766
7957
  </xsl:template><xsl:template match="*" mode="syntax_highlight">
7767
7958
  <xsl:apply-templates mode="syntax_highlight"/>
7768
7959
  </xsl:template><xsl:variable name="syntax_highlight_styles_">
@@ -8072,10 +8263,14 @@
8072
8263
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
8073
8264
  <xsl:variable name="element">inline
8074
8265
 
8266
+
8075
8267
  </xsl:variable>
8076
8268
  <xsl:choose>
8077
8269
  <xsl:when test="contains($element, 'block')">
8078
8270
  <fo:block xsl:use-attribute-sets="example-p-style">
8271
+
8272
+
8273
+
8079
8274
  <xsl:apply-templates/>
8080
8275
  </fo:block>
8081
8276
  </xsl:when>
@@ -8183,6 +8378,7 @@
8183
8378
  </xsl:if>
8184
8379
  <fo:block xsl:use-attribute-sets="example-p-style">
8185
8380
 
8381
+
8186
8382
  <xsl:apply-templates/>
8187
8383
  </fo:block>
8188
8384
  </fo:block-container>
@@ -8339,6 +8535,8 @@
8339
8535
 
8340
8536
 
8341
8537
 
8538
+
8539
+
8342
8540
  <fo:basic-link fox:alt-text="{@citeas}">
8343
8541
  <xsl:if test="normalize-space(@citeas) = ''">
8344
8542
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
@@ -8393,6 +8591,7 @@
8393
8591
 
8394
8592
 
8395
8593
 
8594
+
8396
8595
  <xsl:choose>
8397
8596
  <xsl:when test="$depth = 5">7</xsl:when>
8398
8597
  <xsl:when test="$depth = 4">10</xsl:when>
@@ -8722,6 +8921,11 @@
8722
8921
  </xsl:otherwise>
8723
8922
  </xsl:choose>
8724
8923
  </xsl:template><xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
8924
+
8925
+ <xsl:apply-templates select="*[local-name() = 'name']">
8926
+ <xsl:with-param name="process">true</xsl:with-param>
8927
+ </xsl:apply-templates>
8928
+
8725
8929
  <fo:list-block xsl:use-attribute-sets="list-style">
8726
8930
 
8727
8931
 
@@ -8732,12 +8936,23 @@
8732
8936
 
8733
8937
 
8734
8938
 
8939
+ <xsl:if test="*[local-name() = 'name']">
8940
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
8941
+ </xsl:if>
8942
+
8735
8943
  <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
8736
8944
  </fo:list-block>
8737
8945
  <!-- <xsl:for-each select="./iho:note">
8738
8946
  <xsl:call-template name="note"/>
8739
8947
  </xsl:for-each> -->
8740
8948
  <xsl:apply-templates select="./*[local-name() = 'note']"/>
8949
+ </xsl:template><xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
8950
+ <xsl:param name="process">false</xsl:param>
8951
+ <xsl:if test="$process = 'true'">
8952
+ <fo:block xsl:use-attribute-sets="list-name-style">
8953
+ <xsl:apply-templates/>
8954
+ </fo:block>
8955
+ </xsl:if>
8741
8956
  </xsl:template><xsl:template match="*[local-name()='li']">
8742
8957
  <fo:list-item xsl:use-attribute-sets="list-item-style">
8743
8958
  <xsl:copy-of select="@id"/>
@@ -8749,6 +8964,8 @@
8749
8964
 
8750
8965
 
8751
8966
 
8967
+
8968
+
8752
8969
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8753
8970
  <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8754
8971
  <xsl:call-template name="append_add-style"/>
@@ -9006,7 +9223,7 @@
9006
9223
  </fo:block>
9007
9224
 
9008
9225
 
9009
- </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
9226
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
9010
9227
 
9011
9228
 
9012
9229
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
@@ -9017,7 +9234,7 @@
9017
9234
  </xsl:template><xsl:template name="processBibitem">
9018
9235
 
9019
9236
 
9020
-
9237
+
9021
9238
  <!-- Example: [ITU-T A.23] ITU-T A.23, Recommendation ITU-T A.23, Annex A (2014), Guide for ITU-T and ISO/IEC JTC 1 cooperation. -->
9022
9239
  <xsl:if test="$doctype = 'implementers-guide'">
9023
9240
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -9025,46 +9242,26 @@
9025
9242
  </xsl:if>
9026
9243
 
9027
9244
  <xsl:variable name="bibitem_label">
9028
- <xsl:choose>
9029
- <xsl:when test="itu:docidentifier[@type = 'metanorma']">
9030
- <xsl:value-of select="itu:docidentifier[@type = 'metanorma']"/>
9031
- </xsl:when>
9032
- <xsl:otherwise>
9033
- <fo:inline padding-right="5mm">
9034
- <xsl:text>[</xsl:text>
9035
- <xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>
9036
- <xsl:text>] </xsl:text>
9037
- </fo:inline>
9038
- </xsl:otherwise>
9039
- </xsl:choose>
9245
+ <xsl:value-of select="itu:docidentifier[@type = 'metanorma']"/>
9246
+ <xsl:if test="not(itu:docidentifier[@type = 'metanorma'])">
9247
+ <fo:inline padding-right="5mm">
9248
+ <xsl:text>[</xsl:text>
9249
+ <xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>
9250
+ <xsl:text>] </xsl:text>
9251
+ </fo:inline>
9252
+ </xsl:if>
9040
9253
  </xsl:variable>
9041
9254
 
9042
9255
  <xsl:variable name="bibitem_body">
9043
9256
  <xsl:text> </xsl:text>
9044
9257
  <xsl:choose>
9045
9258
  <xsl:when test="itu:docidentifier[@type = 'metanorma']">
9046
- <xsl:if test="itu:docidentifier[not(@type) or not(@type = 'metanorma' or @type = 'metanorma-ordinal')]">
9047
- <xsl:value-of select="itu:docidentifier[not(@type) or not(@type = 'metanorma' or @type = 'metanorma-ordinal')]"/>
9048
- <xsl:text>, </xsl:text>
9049
- </xsl:if>
9259
+ <xsl:value-of select="itu:docidentifier[not(@type) or not(@type = 'metanorma' or @type = 'metanorma-ordinal')]"/>
9050
9260
  </xsl:when>
9051
9261
  <xsl:otherwise>
9052
9262
  <xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>
9053
- <xsl:if test="itu:title">
9054
- <xsl:text>, </xsl:text>
9055
- </xsl:if>
9056
9263
  </xsl:otherwise>
9057
9264
  </xsl:choose>
9058
- <xsl:if test="itu:title">
9059
- <xsl:choose>
9060
- <xsl:when test="itu:title[@type = 'main' and @language = 'en']">
9061
- <xsl:apply-templates select="itu:title[@type = 'main' and @language = 'en']"/>
9062
- </xsl:when>
9063
- <xsl:otherwise>
9064
- <xsl:apply-templates select="itu:title"/>
9065
- </xsl:otherwise>
9066
- </xsl:choose>
9067
- </xsl:if>
9068
9265
  <xsl:if test="itu:formattedref and not(itu:docidentifier[@type = 'metanorma'])">, </xsl:if>
9069
9266
  <xsl:apply-templates select="itu:formattedref"/>
9070
9267
  </xsl:variable>
@@ -9081,7 +9278,7 @@
9081
9278
  </fo:table-row>
9082
9279
  </fo:table-body>
9083
9280
  </fo:table>
9084
- </xsl:when>
9281
+ </xsl:when> <!-- $doctype = 'implementers-guide' -->
9085
9282
  <xsl:otherwise>
9086
9283
  <xsl:copy-of select="$bibitem_label"/>
9087
9284
  <xsl:copy-of select="$bibitem_body"/>
@@ -9388,12 +9585,16 @@
9388
9585
  <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
9389
9586
 
9390
9587
 
9588
+
9589
+
9391
9590
 
9392
9591
 
9393
9592
 
9394
9593
  <fo:block-container xsl:use-attribute-sets="admonition-container-style">
9395
9594
 
9396
9595
 
9596
+
9597
+
9397
9598
  <fo:block xsl:use-attribute-sets="admonition-name-style">
9398
9599
  <xsl:call-template name="displayAdmonitionName"/>
9399
9600
  </fo:block>
@@ -9406,25 +9607,32 @@
9406
9607
  </fo:block-container>
9407
9608
 
9408
9609
  </xsl:template><xsl:template name="displayAdmonitionName">
9409
-
9610
+ <xsl:param name="sep"/> <!-- Example: ' - ' -->
9611
+ <!-- <xsl:choose>
9612
+ <xsl:when test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
9613
+ <xsl:choose>
9614
+ <xsl:when test="@type='important'"><xsl:apply-templates select="@type"/></xsl:when>
9615
+ <xsl:otherwise>
9616
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
9617
+ </xsl:otherwise>
9618
+ </xsl:choose>
9619
+ </xsl:when>
9620
+ <xsl:otherwise>
9410
9621
  <xsl:apply-templates select="*[local-name() = 'name']"/>
9411
9622
  <xsl:if test="not(*[local-name() = 'name'])">
9412
9623
  <xsl:apply-templates select="@type"/>
9413
9624
  </xsl:if>
9414
-
9415
- </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
9416
- <xsl:apply-templates/>
9417
- </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
9418
- <xsl:variable name="admonition_type_">
9419
- <xsl:call-template name="getLocalizedString">
9420
- <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
9421
- </xsl:call-template>
9625
+ </xsl:otherwise>
9626
+ </xsl:choose> -->
9627
+ <xsl:variable name="name">
9628
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
9422
9629
  </xsl:variable>
9423
- <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
9424
- <xsl:value-of select="$admonition_type"/>
9425
- <xsl:if test="$admonition_type = ''">
9426
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
9630
+ <xsl:copy-of select="$name"/>
9631
+ <xsl:if test="normalize-space($name) != ''">
9632
+ <xsl:value-of select="$sep"/>
9427
9633
  </xsl:if>
9634
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
9635
+ <xsl:apply-templates/>
9428
9636
  </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
9429
9637
 
9430
9638
  <fo:block xsl:use-attribute-sets="admonition-p-style">
@@ -9595,6 +9803,8 @@
9595
9803
  </xsl:when>
9596
9804
  <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
9597
9805
  </xsl:choose>
9806
+ </xsl:template><xsl:template match="*[local-name() = 'lang_none']">
9807
+ <fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
9598
9808
  </xsl:template><xsl:template name="printEdition">
9599
9809
  <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
9600
9810
  <xsl:text> </xsl:text>
@@ -9701,6 +9911,27 @@
9701
9911
  </xsl:when>
9702
9912
  <xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
9703
9913
  </xsl:choose>
9914
+ </xsl:template><xsl:template name="getMonthLocalizedByNum">
9915
+ <xsl:param name="num"/>
9916
+ <xsl:variable name="monthStr">
9917
+ <xsl:choose>
9918
+ <xsl:when test="$num = '01'">january</xsl:when>
9919
+ <xsl:when test="$num = '02'">february</xsl:when>
9920
+ <xsl:when test="$num = '03'">march</xsl:when>
9921
+ <xsl:when test="$num = '04'">april</xsl:when>
9922
+ <xsl:when test="$num = '05'">may</xsl:when>
9923
+ <xsl:when test="$num = '06'">june</xsl:when>
9924
+ <xsl:when test="$num = '07'">july</xsl:when>
9925
+ <xsl:when test="$num = '08'">august</xsl:when>
9926
+ <xsl:when test="$num = '09'">september</xsl:when>
9927
+ <xsl:when test="$num = '10'">october</xsl:when>
9928
+ <xsl:when test="$num = '11'">november</xsl:when>
9929
+ <xsl:when test="$num = '12'">december</xsl:when>
9930
+ </xsl:choose>
9931
+ </xsl:variable>
9932
+ <xsl:call-template name="getLocalizedString">
9933
+ <xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param>
9934
+ </xsl:call-template>
9704
9935
  </xsl:template><xsl:template name="insertKeywords">
9705
9936
  <xsl:param name="sorting" select="'true'"/>
9706
9937
  <xsl:param name="charAtEnd" select="'.'"/>
@@ -9772,7 +10003,7 @@
9772
10003
  <dc:description>
9773
10004
  <xsl:variable name="abstract">
9774
10005
 
9775
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
10006
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
9776
10007
 
9777
10008
  </xsl:variable>
9778
10009
  <xsl:value-of select="normalize-space($abstract)"/>
@@ -9893,6 +10124,7 @@
9893
10124
 
9894
10125
 
9895
10126
 
10127
+
9896
10128
  <xsl:value-of select="document('')//*/namespace::itu"/>
9897
10129
 
9898
10130