metanorma-cc 2.7.2 → 2.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -879,6 +879,7 @@
879
879
  <xsl:variable name="en_dash">–</xsl:variable>
880
880
  <xsl:variable name="em_dash">—</xsl:variable>
881
881
  <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
882
+ <xsl:variable name="nonbreak_space_em_dash"> —</xsl:variable>
882
883
  <xsl:variable name="cr">&#13;</xsl:variable>
883
884
  <xsl:variable name="lf">
884
885
  </xsl:variable>
@@ -1421,6 +1422,7 @@
1421
1422
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="update_xml_step1"/>
1422
1423
  <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]" mode="update_xml_step1"/>
1423
1424
  <xsl:template match="mn:section-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
1425
+ <xsl:template match="mn:floating-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
1424
1426
  <!-- <xsl:template match="mn:preferred[following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
1425
1427
  <xsl:template match="mn:preferred" mode="update_xml_step1"/>
1426
1428
  <!-- <xsl:template match="mn:admitted[following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
@@ -1435,10 +1437,10 @@
1435
1437
 
1436
1438
  <xsl:template match="mn:term[@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
1437
1439
 
1438
- <xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title]]" mode="update_xml_step1">
1440
+ <xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]]" mode="update_xml_step1">
1439
1441
  <xsl:copy>
1440
1442
  <xsl:apply-templates select="@*" mode="update_xml_step1"/>
1441
- <xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title]/@depth"/>
1443
+ <xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]/@depth"/>
1442
1444
  <xsl:apply-templates select="node()" mode="update_xml_step1"/>
1443
1445
  </xsl:copy>
1444
1446
  </xsl:template>
@@ -2228,10 +2230,16 @@
2228
2230
  <xsl:attribute-set name="license-statement-style">
2229
2231
  </xsl:attribute-set> <!-- license-statement-style -->
2230
2232
 
2233
+ <xsl:template name="refine_license-statement-style">
2234
+ </xsl:template>
2235
+
2231
2236
  <xsl:attribute-set name="license-statement-title-style">
2232
2237
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2233
2238
  </xsl:attribute-set> <!-- license-statement-title-style -->
2234
2239
 
2240
+ <xsl:template name="refine_license-statement-title-style">
2241
+ </xsl:template>
2242
+
2235
2243
  <xsl:attribute-set name="license-statement-p-style">
2236
2244
  </xsl:attribute-set> <!-- license-statement-p-style -->
2237
2245
 
@@ -2242,23 +2250,47 @@
2242
2250
  <xsl:attribute-set name="legal-statement-style">
2243
2251
  </xsl:attribute-set> <!-- legal-statement-style -->
2244
2252
 
2253
+ <xsl:template name="refine_legal-statement-style">
2254
+ </xsl:template>
2255
+
2245
2256
  <xsl:attribute-set name="legal-statement-title-style">
2246
2257
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2247
2258
  </xsl:attribute-set> <!-- legal-statement-title-style -->
2248
2259
 
2260
+ <xsl:template name="refine_legal-statement-title-style">
2261
+ </xsl:template>
2262
+
2249
2263
  <xsl:attribute-set name="legal-statement-p-style">
2250
2264
  </xsl:attribute-set> <!-- legal-statement-p-style -->
2251
2265
 
2266
+ <xsl:template name="refine_legal-statement-p-style">
2267
+ <xsl:if test="@align">
2268
+ <xsl:attribute name="text-align">
2269
+ <xsl:value-of select="@align"/>
2270
+ </xsl:attribute>
2271
+ </xsl:if>
2272
+ </xsl:template>
2273
+
2252
2274
  <xsl:attribute-set name="feedback-statement-style">
2253
2275
  </xsl:attribute-set> <!-- feedback-statement-style -->
2254
2276
 
2277
+ <xsl:template name="refine_feedback-statement-style">
2278
+ </xsl:template>
2279
+
2255
2280
  <xsl:attribute-set name="feedback-statement-title-style">
2256
2281
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2257
2282
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
2258
2283
 
2284
+ <xsl:template name="refine_feedback-statement-title-style">
2285
+
2286
+ </xsl:template>
2287
+
2259
2288
  <xsl:attribute-set name="feedback-statement-p-style">
2260
2289
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
2261
2290
 
2291
+ <xsl:template name="refine_feedback-statement-p-style">
2292
+ </xsl:template>
2293
+
2262
2294
  <!-- End boilerplate sections styles -->
2263
2295
 
2264
2296
  <!-- ================================= -->
@@ -2284,6 +2316,7 @@
2284
2316
 
2285
2317
  <xsl:template match="mn:license-statement">
2286
2318
  <fo:block xsl:use-attribute-sets="license-statement-style">
2319
+ <xsl:call-template name="refine_license-statement-style"/>
2287
2320
  <xsl:apply-templates/>
2288
2321
  </fo:block>
2289
2322
  </xsl:template> <!-- license-statement -->
@@ -2301,6 +2334,7 @@
2301
2334
  <xsl:template match="mn:legal-statement">
2302
2335
  <xsl:param name="isLegacy">false</xsl:param>
2303
2336
  <fo:block xsl:use-attribute-sets="legal-statement-style">
2337
+ <xsl:call-template name="refine_legal-statement-style"/>
2304
2338
  <xsl:apply-templates/>
2305
2339
  </fo:block>
2306
2340
  </xsl:template> <!-- legal-statement -->
@@ -2470,6 +2504,27 @@
2470
2504
  <xsl:attribute-set name="sourcecode-container-style">
2471
2505
  </xsl:attribute-set>
2472
2506
 
2507
+ <xsl:template name="refine_sourcecode-container-style">
2508
+ <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
2509
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2510
+ </xsl:if>
2511
+
2512
+ <xsl:if test="ancestor::mn:example">
2513
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2514
+ </xsl:if>
2515
+
2516
+ <xsl:copy-of select="@id"/>
2517
+
2518
+ <xsl:if test="parent::mn:note">
2519
+ <xsl:attribute name="margin-left">
2520
+ <xsl:choose>
2521
+ <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
2522
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2523
+ </xsl:choose>
2524
+ </xsl:attribute>
2525
+ </xsl:if>
2526
+ </xsl:template>
2527
+
2473
2528
  <xsl:attribute-set name="sourcecode-style">
2474
2529
  <xsl:attribute name="white-space">pre</xsl:attribute>
2475
2530
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -2482,6 +2537,12 @@
2482
2537
  <xsl:template name="refine_sourcecode-style">
2483
2538
  </xsl:template> <!-- refine_sourcecode-style -->
2484
2539
 
2540
+ <xsl:attribute-set name="sourcecode-number-style">
2541
+ </xsl:attribute-set>
2542
+
2543
+ <xsl:template name="refine_sourcecode-number-style">
2544
+ </xsl:template>
2545
+
2485
2546
  <xsl:attribute-set name="sourcecode-name-style">
2486
2547
  <xsl:attribute name="font-size">11pt</xsl:attribute>
2487
2548
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -2490,6 +2551,9 @@
2490
2551
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2491
2552
  </xsl:attribute-set> <!-- sourcecode-name-style -->
2492
2553
 
2554
+ <xsl:template name="refine_sourcecode-name-style">
2555
+ </xsl:template>
2556
+
2493
2557
  <xsl:template name="add-zero-spaces-equal">
2494
2558
  <xsl:param name="text" select="."/>
2495
2559
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
@@ -2577,24 +2641,8 @@
2577
2641
  <xsl:otherwise>
2578
2642
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
2579
2643
 
2580
- <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
2581
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2582
- </xsl:if>
2583
-
2584
- <xsl:if test="ancestor::mn:example">
2585
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2586
- </xsl:if>
2587
-
2588
- <xsl:copy-of select="@id"/>
2644
+ <xsl:call-template name="refine_sourcecode-container-style"/>
2589
2645
 
2590
- <xsl:if test="parent::mn:note">
2591
- <xsl:attribute name="margin-left">
2592
- <xsl:choose>
2593
- <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
2594
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2595
- </xsl:choose>
2596
- </xsl:attribute>
2597
- </xsl:if>
2598
2646
  <fo:block-container margin-left="0mm" role="SKIP">
2599
2647
 
2600
2648
  <fo:block xsl:use-attribute-sets="sourcecode-style">
@@ -2921,6 +2969,7 @@
2921
2969
  <xsl:template match="mn:sourcecode/mn:fmt-name">
2922
2970
  <xsl:if test="normalize-space() != ''">
2923
2971
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
2972
+ <xsl:call-template name="refine_sourcecode-name-style"/>
2924
2973
  <xsl:apply-templates/>
2925
2974
  </fo:block>
2926
2975
  </xsl:if>
@@ -2968,12 +3017,31 @@
2968
3017
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
2969
3018
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2970
3019
  <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
2971
- </xsl:attribute-set>
3020
+ </xsl:attribute-set> <!-- pre-style -->
3021
+
3022
+ <xsl:template name="refine_pre-style">
3023
+ </xsl:template>
2972
3024
 
2973
3025
  <xsl:attribute-set name="tt-style">
2974
3026
  <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
2975
3027
  </xsl:attribute-set>
2976
3028
 
3029
+ <xsl:template name="refine_tt-style">
3030
+ <xsl:variable name="_font-size">10 <!-- inherit -->
3031
+ </xsl:variable>
3032
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
3033
+ <xsl:if test="$font-size != ''">
3034
+ <xsl:attribute name="font-size">
3035
+ <xsl:choose>
3036
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
3037
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
3038
+ <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3039
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3040
+ </xsl:choose>
3041
+ </xsl:attribute>
3042
+ </xsl:if>
3043
+ </xsl:template>
3044
+
2977
3045
  <xsl:variable name="color-added-text">
2978
3046
  <xsl:text>rgb(0, 255, 0)</xsl:text>
2979
3047
  </xsl:variable>
@@ -2986,9 +3054,14 @@
2986
3054
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
2987
3055
  </xsl:attribute-set>
2988
3056
 
3057
+ <xsl:template name="refine_add-style">
3058
+ </xsl:template>
3059
+
2989
3060
  <xsl:variable name="add-style">
2990
- <add-style xsl:use-attribute-sets="add-style"/>
2991
- </xsl:variable>
3061
+ <add-style xsl:use-attribute-sets="add-style">
3062
+ <xsl:call-template name="refine_add-style"/>
3063
+ </add-style>
3064
+ </xsl:variable>
2992
3065
  <xsl:template name="append_add-style">
2993
3066
  <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
2994
3067
  </xsl:template>
@@ -3001,24 +3074,77 @@
3001
3074
  <xsl:attribute name="text-decoration">line-through</xsl:attribute>
3002
3075
  </xsl:attribute-set>
3003
3076
 
3077
+ <xsl:template name="refine_del-style">
3078
+ </xsl:template>
3079
+
3080
+ <xsl:attribute-set name="strong-style">
3081
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3082
+ </xsl:attribute-set>
3083
+
3084
+ <xsl:template name="refine_strong_style">
3085
+ <xsl:if test="ancestor::*['preferred']">
3086
+ <xsl:attribute name="role">SKIP</xsl:attribute>
3087
+ </xsl:if>
3088
+ </xsl:template> <!-- refine_strong_style -->
3089
+
3090
+ <xsl:attribute-set name="em-style">
3091
+ <xsl:attribute name="font-style">italic</xsl:attribute>
3092
+ </xsl:attribute-set>
3093
+
3094
+ <xsl:template name="refine_em_style">
3095
+ </xsl:template> <!-- refine_em_style -->
3096
+
3097
+ <xsl:attribute-set name="sup-style">
3098
+ <xsl:attribute name="font-size">80%</xsl:attribute>
3099
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
3100
+ </xsl:attribute-set>
3101
+
3102
+ <xsl:template name="refine_sup-style">
3103
+ </xsl:template>
3104
+
3105
+ <xsl:attribute-set name="sub-style">
3106
+ <xsl:attribute name="font-size">80%</xsl:attribute>
3107
+ <xsl:attribute name="vertical-align">sub</xsl:attribute>
3108
+ </xsl:attribute-set>
3109
+
3110
+ <xsl:template name="refine_sub-style">
3111
+ </xsl:template>
3112
+
3113
+ <xsl:attribute-set name="underline-style">
3114
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
3115
+ </xsl:attribute-set>
3116
+
3117
+ <xsl:template name="refine_underline-style">
3118
+ </xsl:template>
3119
+
3120
+ <xsl:attribute-set name="hi-style">
3121
+ <xsl:attribute name="background-color">yellow</xsl:attribute>
3122
+ </xsl:attribute-set>
3123
+
3124
+ <xsl:template name="refine_hi-style">
3125
+ </xsl:template>
3126
+
3127
+ <xsl:attribute-set name="strike-style">
3128
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
3129
+ </xsl:attribute-set>
3130
+
3131
+ <xsl:template name="refine_strike-style">
3132
+ </xsl:template>
3133
+
3004
3134
  <xsl:template match="mn:br">
3005
3135
  <xsl:value-of select="$linebreak"/>
3006
3136
  </xsl:template>
3007
3137
 
3008
- <xsl:template match="mn:em">
3009
- <fo:inline font-style="italic">
3010
- <xsl:call-template name="refine_italic_style"/>
3138
+ <xsl:template match="mn:em">
3139
+ <fo:inline xsl:use-attribute-sets="em-style">
3140
+ <xsl:call-template name="refine_em_style"/>
3011
3141
  <xsl:apply-templates/>
3012
3142
  </fo:inline>
3013
3143
  </xsl:template>
3014
3144
 
3015
- <xsl:template name="refine_italic_style">
3016
- </xsl:template>
3017
-
3018
3145
  <xsl:template match="mn:strong | *[local-name()='b']">
3019
3146
  <xsl:param name="split_keep-within-line"/>
3020
- <fo:inline font-weight="bold">
3021
-
3147
+ <fo:inline xsl:use-attribute-sets="strong-style">
3022
3148
  <xsl:call-template name="refine_strong_style"/>
3023
3149
 
3024
3150
  <xsl:apply-templates>
@@ -3027,44 +3153,27 @@
3027
3153
  </fo:inline>
3028
3154
  </xsl:template>
3029
3155
 
3030
- <xsl:template name="refine_strong_style">
3031
- <xsl:if test="ancestor::*['preferred']">
3032
- <xsl:attribute name="role">SKIP</xsl:attribute>
3033
- </xsl:if>
3034
- </xsl:template>
3035
-
3036
3156
  <xsl:template match="*[local-name()='padding']">
3037
3157
  <fo:inline padding-right="{@value}"> </fo:inline>
3038
3158
  </xsl:template>
3039
3159
 
3040
3160
  <xsl:template match="mn:sup">
3041
- <fo:inline font-size="80%" vertical-align="super">
3161
+ <fo:inline xsl:use-attribute-sets="sup-style">
3162
+ <xsl:call-template name="refine_sup-style"/>
3042
3163
  <xsl:apply-templates/>
3043
3164
  </fo:inline>
3044
3165
  </xsl:template>
3045
3166
 
3046
3167
  <xsl:template match="mn:sub">
3047
- <fo:inline font-size="80%" vertical-align="sub">
3168
+ <fo:inline xsl:use-attribute-sets="sub-style">
3169
+ <xsl:call-template name="refine_sub-style"/>
3048
3170
  <xsl:apply-templates/>
3049
3171
  </fo:inline>
3050
3172
  </xsl:template>
3051
3173
 
3052
3174
  <xsl:template match="mn:tt">
3053
3175
  <fo:inline xsl:use-attribute-sets="tt-style">
3054
-
3055
- <xsl:variable name="_font-size">10 <!-- inherit -->
3056
- </xsl:variable>
3057
- <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
3058
- <xsl:if test="$font-size != ''">
3059
- <xsl:attribute name="font-size">
3060
- <xsl:choose>
3061
- <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
3062
- <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
3063
- <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3064
- <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3065
- </xsl:choose>
3066
- </xsl:attribute>
3067
- </xsl:if>
3176
+ <xsl:call-template name="refine_tt-style"/>
3068
3177
  <xsl:apply-templates/>
3069
3178
  </fo:inline>
3070
3179
  </xsl:template> <!-- tt -->
@@ -3083,7 +3192,8 @@
3083
3192
  </xsl:template>
3084
3193
 
3085
3194
  <xsl:template match="mn:underline">
3086
- <fo:inline text-decoration="underline">
3195
+ <fo:inline xsl:use-attribute-sets="underline-style">
3196
+ <xsl:call-template name="refine_underline-style"/>
3087
3197
  <xsl:apply-templates/>
3088
3198
  </fo:inline>
3089
3199
  </xsl:template>
@@ -3241,6 +3351,7 @@
3241
3351
 
3242
3352
  <xsl:template match="mn:del">
3243
3353
  <fo:inline xsl:use-attribute-sets="del-style">
3354
+ <xsl:call-template name="refine_del-style"/>
3244
3355
  <xsl:apply-templates/>
3245
3356
  </fo:inline>
3246
3357
  </xsl:template>
@@ -3250,7 +3361,8 @@
3250
3361
 
3251
3362
  <!-- highlight text -->
3252
3363
  <xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
3253
- <fo:inline background-color="yellow">
3364
+ <fo:inline xsl:use-attribute-sets="hi-style">
3365
+ <xsl:call-template name="refine_hi-style"/>
3254
3366
  <xsl:apply-templates/>
3255
3367
  </fo:inline>
3256
3368
  </xsl:template>
@@ -3336,7 +3448,8 @@
3336
3448
  </xsl:template>
3337
3449
 
3338
3450
  <xsl:template match="mn:strike">
3339
- <fo:inline text-decoration="line-through">
3451
+ <fo:inline xsl:use-attribute-sets="strike-style">
3452
+ <xsl:call-template name="refine_strike-style"/>
3340
3453
  <xsl:apply-templates/>
3341
3454
  </fo:inline>
3342
3455
  </xsl:template>
@@ -3416,6 +3529,7 @@
3416
3529
 
3417
3530
  <xsl:template match="mn:pre" name="pre">
3418
3531
  <fo:block xsl:use-attribute-sets="pre-style">
3532
+ <xsl:call-template name="refine_pre-style"/>
3419
3533
  <xsl:copy-of select="@id"/>
3420
3534
  <xsl:choose>
3421
3535
 
@@ -3446,22 +3560,40 @@
3446
3560
  <xsl:attribute-set name="permission-style">
3447
3561
  </xsl:attribute-set>
3448
3562
 
3563
+ <xsl:template name="refine_permission-style">
3564
+ </xsl:template>
3565
+
3449
3566
  <xsl:attribute-set name="permission-name-style">
3450
3567
  </xsl:attribute-set>
3451
3568
 
3569
+ <xsl:template name="refine_permission-name-style">
3570
+ </xsl:template>
3571
+
3452
3572
  <xsl:attribute-set name="permission-label-style">
3453
3573
  </xsl:attribute-set>
3454
3574
 
3575
+ <xsl:template name="refine_permission-label-style">
3576
+ </xsl:template>
3577
+
3455
3578
  <xsl:attribute-set name="requirement-style">
3456
3579
  </xsl:attribute-set>
3457
3580
 
3581
+ <xsl:template name="refine_requirement-style">
3582
+ </xsl:template>
3583
+
3458
3584
  <xsl:attribute-set name="requirement-name-style">
3459
3585
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3460
3586
  </xsl:attribute-set>
3461
3587
 
3588
+ <xsl:template name="refine_requirement-name-style">
3589
+ </xsl:template>
3590
+
3462
3591
  <xsl:attribute-set name="requirement-label-style">
3463
3592
  </xsl:attribute-set>
3464
3593
 
3594
+ <xsl:template name="refine_requirement-label-style">
3595
+ </xsl:template>
3596
+
3465
3597
  <xsl:attribute-set name="subject-style">
3466
3598
  </xsl:attribute-set>
3467
3599
 
@@ -3489,18 +3621,28 @@
3489
3621
  <xsl:attribute-set name="recommendation-style">
3490
3622
  </xsl:attribute-set>
3491
3623
 
3624
+ <xsl:template name="refine_recommendation-style">
3625
+ </xsl:template>
3626
+
3492
3627
  <xsl:attribute-set name="recommendation-name-style">
3493
3628
  </xsl:attribute-set>
3494
3629
 
3630
+ <xsl:template name="refine_recommendation-name-style">
3631
+ </xsl:template>
3632
+
3495
3633
  <xsl:attribute-set name="recommendation-label-style">
3496
3634
  </xsl:attribute-set>
3497
3635
 
3636
+ <xsl:template name="refine_recommendation-label-style">
3637
+ </xsl:template>
3638
+
3498
3639
  <!-- ========== -->
3499
3640
  <!-- permission -->
3500
3641
  <!-- ========== -->
3501
3642
  <xsl:template match="mn:permission">
3502
3643
  <xsl:call-template name="setNamedDestination"/>
3503
3644
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
3645
+ <xsl:call-template name="refine_permission-style"/>
3504
3646
  <xsl:apply-templates select="mn:fmt-name"/>
3505
3647
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3506
3648
  </fo:block>
@@ -3509,6 +3651,7 @@
3509
3651
  <xsl:template match="mn:permission/mn:fmt-name">
3510
3652
  <xsl:if test="normalize-space() != ''">
3511
3653
  <fo:block xsl:use-attribute-sets="permission-name-style">
3654
+ <xsl:call-template name="refine_permission-name-style"/>
3512
3655
  <xsl:apply-templates/>
3513
3656
  </fo:block>
3514
3657
  </xsl:if>
@@ -3516,6 +3659,7 @@
3516
3659
 
3517
3660
  <xsl:template match="mn:permission/mn:label">
3518
3661
  <fo:block xsl:use-attribute-sets="permission-label-style">
3662
+ <xsl:call-template name="refine_permission-label-style"/>
3519
3663
  <xsl:apply-templates/>
3520
3664
  </fo:block>
3521
3665
  </xsl:template>
@@ -3528,6 +3672,7 @@
3528
3672
  <xsl:template match="mn:requirement">
3529
3673
  <xsl:call-template name="setNamedDestination"/>
3530
3674
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
3675
+ <xsl:call-template name="refine_requirement-style"/>
3531
3676
  <xsl:apply-templates select="mn:fmt-name"/>
3532
3677
  <xsl:apply-templates select="mn:label"/>
3533
3678
  <xsl:apply-templates select="@obligation"/>
@@ -3540,6 +3685,7 @@
3540
3685
  <xsl:if test="normalize-space() != ''">
3541
3686
 
3542
3687
  <fo:block xsl:use-attribute-sets="requirement-name-style">
3688
+ <xsl:call-template name="refine_requirement-name-style"/>
3543
3689
  <xsl:apply-templates/>
3544
3690
  </fo:block>
3545
3691
  </xsl:if>
@@ -3547,6 +3693,7 @@
3547
3693
 
3548
3694
  <xsl:template match="mn:requirement/mn:label">
3549
3695
  <fo:block xsl:use-attribute-sets="requirement-label-style">
3696
+ <xsl:call-template name="refine_requirement-label-style"/>
3550
3697
  <xsl:apply-templates/>
3551
3698
  </fo:block>
3552
3699
  </xsl:template>
@@ -3572,6 +3719,7 @@
3572
3719
  <xsl:template match="mn:recommendation">
3573
3720
  <xsl:call-template name="setNamedDestination"/>
3574
3721
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
3722
+ <xsl:call-template name="refine_recommendation-style"/>
3575
3723
  <xsl:apply-templates select="mn:fmt-name"/>
3576
3724
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3577
3725
  </fo:block>
@@ -3581,6 +3729,7 @@
3581
3729
  <xsl:if test="normalize-space() != ''">
3582
3730
 
3583
3731
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
3732
+ <xsl:call-template name="refine_recommendation-name-style"/>
3584
3733
  <xsl:apply-templates/>
3585
3734
  </fo:block>
3586
3735
  </xsl:if>
@@ -3588,6 +3737,7 @@
3588
3737
 
3589
3738
  <xsl:template match="mn:recommendation/mn:label">
3590
3739
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
3740
+ <xsl:call-template name="refine_recommendation-label-style"/>
3591
3741
  <xsl:apply-templates/>
3592
3742
  </fo:block>
3593
3743
  </xsl:template>
@@ -3768,36 +3918,72 @@
3768
3918
  <xsl:attribute-set name="term-style">
3769
3919
  </xsl:attribute-set> <!-- term-style -->
3770
3920
 
3921
+ <xsl:template name="refine_term-style">
3922
+ </xsl:template>
3923
+
3771
3924
  <xsl:attribute-set name="term-name-style">
3772
3925
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3773
3926
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3774
3927
  </xsl:attribute-set> <!-- term-name-style -->
3775
3928
 
3776
- <xsl:attribute-set name="preferred-block-style">
3929
+ <xsl:template name="refine_term-name-style">
3930
+ </xsl:template>
3931
+
3932
+ <xsl:attribute-set name="preferred-style">
3933
+ </xsl:attribute-set> <!-- preferred-style -->
3934
+
3935
+ <xsl:template name="refine_preferred-style">
3936
+ </xsl:template>
3937
+
3938
+ <xsl:attribute-set name="preferred-block-style">
3777
3939
  <xsl:attribute name="line-height">1.1</xsl:attribute>
3778
3940
  </xsl:attribute-set> <!-- preferred-block-style -->
3779
3941
 
3942
+ <xsl:template name="refine_preferred-block-style">
3943
+ </xsl:template>
3944
+
3780
3945
  <xsl:attribute-set name="preferred-term-style">
3781
3946
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3782
3947
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3783
3948
  </xsl:attribute-set> <!-- preferred-term-style -->
3784
3949
 
3950
+ <xsl:template name="refine_preferred-term-style">
3951
+ <xsl:if test="mn:strong">
3952
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
3953
+ </xsl:if>
3954
+ </xsl:template>
3955
+
3785
3956
  <xsl:attribute-set name="domain-style">
3786
3957
  </xsl:attribute-set> <!-- domain-style -->
3787
3958
 
3959
+ <xsl:template name="refine_domain-style">
3960
+ </xsl:template>
3961
+
3788
3962
  <xsl:attribute-set name="admitted-style">
3789
3963
  </xsl:attribute-set> <!-- admitted-style -->
3790
3964
 
3965
+ <xsl:template name="refine_admitted-style">
3966
+ </xsl:template>
3967
+
3791
3968
  <xsl:attribute-set name="deprecates-style">
3792
3969
  </xsl:attribute-set> <!-- deprecates-style -->
3793
3970
 
3971
+ <xsl:template name="refine_deprecates-style">
3972
+ </xsl:template>
3973
+
3794
3974
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
3795
3975
  </xsl:attribute-set>
3796
3976
 
3977
+ <xsl:template name="refine_related-block-style">
3978
+ </xsl:template>
3979
+
3797
3980
  <xsl:attribute-set name="definition-style">
3798
3981
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3799
3982
  </xsl:attribute-set> <!-- definition-style -->
3800
3983
 
3984
+ <xsl:template name="refine_definition-style">
3985
+ </xsl:template>
3986
+
3801
3987
  <xsl:attribute-set name="termsource-style">
3802
3988
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
3803
3989
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
@@ -3809,9 +3995,15 @@
3809
3995
  <xsl:attribute-set name="termsource-text-style">
3810
3996
  </xsl:attribute-set> <!-- termsource-text-style -->
3811
3997
 
3998
+ <xsl:template name="refine_termsource-text-style">
3999
+ </xsl:template>
4000
+
3812
4001
  <xsl:attribute-set name="origin-style">
3813
4002
  </xsl:attribute-set> <!-- origin-style -->
3814
4003
 
4004
+ <xsl:template name="refine_origin-style">
4005
+ </xsl:template>
4006
+
3815
4007
  <!-- ====== -->
3816
4008
  <!-- term -->
3817
4009
  <!-- ====== -->
@@ -3827,9 +4019,8 @@
3827
4019
  <xsl:template match="mn:term">
3828
4020
  <xsl:call-template name="setNamedDestination"/>
3829
4021
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
4022
+ <xsl:call-template name="refine_term-style"/>
3830
4023
 
3831
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
3832
- </xsl:if>
3833
4024
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3834
4025
  </fo:block>
3835
4026
  </xsl:template>
@@ -3905,6 +4096,7 @@
3905
4096
  <!-- text SOURCE: -->
3906
4097
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
3907
4098
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
4099
+ <xsl:call-template name="refine_termsource-text-style"/>
3908
4100
  <xsl:value-of select="."/>
3909
4101
  </fo:inline>
3910
4102
  </xsl:template>
@@ -3917,6 +4109,7 @@
3917
4109
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
3918
4110
  </xsl:if>
3919
4111
  <fo:inline xsl:use-attribute-sets="origin-style">
4112
+ <xsl:call-template name="refine_origin-style"/>
3920
4113
  <xsl:apply-templates/>
3921
4114
  </fo:inline>
3922
4115
  </fo:basic-link>
@@ -3971,9 +4164,12 @@
3971
4164
  </xsl:variable>
3972
4165
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
3973
4166
 
4167
+ <xsl:call-template name="refine_preferred-block-style"/>
4168
+
3974
4169
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
3975
4170
 
3976
4171
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
4172
+ <xsl:call-template name="refine_term-name-style"/>
3977
4173
 
3978
4174
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
3979
4175
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -3984,7 +4180,7 @@
3984
4180
  </xsl:if>
3985
4181
 
3986
4182
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
3987
- <xsl:call-template name="setStyle_preferred"/>
4183
+ <xsl:call-template name="refine_preferred-term-style"/>
3988
4184
 
3989
4185
  <xsl:apply-templates/>
3990
4186
  </fo:block>
@@ -4005,22 +4201,18 @@
4005
4201
 
4006
4202
  <xsl:template match="mn:fmt-admitted">
4007
4203
  <fo:block xsl:use-attribute-sets="admitted-style">
4204
+ <xsl:call-template name="refine_admitted-style"/>
4008
4205
  <xsl:apply-templates/>
4009
4206
  </fo:block>
4010
4207
  </xsl:template>
4011
4208
 
4012
4209
  <xsl:template match="mn:fmt-deprecates">
4013
4210
  <fo:block xsl:use-attribute-sets="deprecates-style">
4211
+ <xsl:call-template name="refine_deprecates-style"/>
4014
4212
  <xsl:apply-templates/>
4015
4213
  </fo:block>
4016
4214
  </xsl:template>
4017
4215
 
4018
- <xsl:template name="setStyle_preferred">
4019
- <xsl:if test="mn:strong">
4020
- <xsl:attribute name="font-weight">normal</xsl:attribute>
4021
- </xsl:if>
4022
- </xsl:template>
4023
-
4024
4216
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
4025
4217
  <!-- in metanorma xml preferred terms delimited by semicolons -->
4026
4218
  <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
@@ -4030,6 +4222,7 @@
4030
4222
 
4031
4223
  <xsl:template match="mn:fmt-related">
4032
4224
  <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
4225
+ <xsl:call-template name="refine_related-block-style"/>
4033
4226
  <xsl:apply-templates/>
4034
4227
  </fo:block>
4035
4228
  </xsl:template>
@@ -4044,6 +4237,7 @@
4044
4237
  <!-- ========== -->
4045
4238
  <xsl:template match="mn:fmt-definition">
4046
4239
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
4240
+ <xsl:call-template name="refine_definition-style"/>
4047
4241
  <xsl:apply-templates/>
4048
4242
  </fo:block>
4049
4243
  </xsl:template>
@@ -4092,6 +4286,9 @@
4092
4286
  <xsl:attribute name="margin-left">12.5mm</xsl:attribute>
4093
4287
  </xsl:attribute-set> <!-- example-body-style -->
4094
4288
 
4289
+ <xsl:template name="refine_example-body-style">
4290
+ </xsl:template>
4291
+
4095
4292
  <xsl:attribute-set name="example-name-style">
4096
4293
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4097
4294
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -4140,6 +4337,8 @@
4140
4337
  <xsl:when test="contains($element, 'block')">
4141
4338
  <fo:block xsl:use-attribute-sets="example-p-style">
4142
4339
 
4340
+ <xsl:call-template name="refine_example-p-style"/>
4341
+
4143
4342
  <xsl:apply-templates/>
4144
4343
  </fo:block>
4145
4344
  </xsl:when>
@@ -4191,6 +4390,7 @@
4191
4390
  </fo:block>
4192
4391
 
4193
4392
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4393
+ <xsl:call-template name="refine_example-body-style"/>
4194
4394
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4195
4395
  <xsl:variable name="example_body">
4196
4396
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
@@ -4253,6 +4453,7 @@
4253
4453
  <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
4254
4454
  <!-- display further elements in blocks -->
4255
4455
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4456
+ <xsl:call-template name="refine_example-body-style"/>
4256
4457
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4257
4458
  <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
4258
4459
  <xsl:with-param name="fo_element" select="'block'"/>
@@ -4376,6 +4577,12 @@
4376
4577
  <xsl:call-template name="setBordersTableArray"/>
4377
4578
  </xsl:template> <!-- refine_table-style -->
4378
4579
 
4580
+ <xsl:attribute-set name="table-number-style">
4581
+ </xsl:attribute-set>
4582
+
4583
+ <xsl:template name="refine_table-number-style">
4584
+ </xsl:template>
4585
+
4379
4586
  <xsl:attribute-set name="table-name-style">
4380
4587
  <xsl:attribute name="role">Caption</xsl:attribute>
4381
4588
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -4482,6 +4689,9 @@
4482
4689
  <!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
4483
4690
  </xsl:attribute-set> <!-- table-fn-number-style -->
4484
4691
 
4692
+ <xsl:template name="refine_table-fn-number-style">
4693
+ </xsl:template>
4694
+
4485
4695
  <xsl:attribute-set name="table-fmt-fn-label-style">
4486
4696
  <xsl:attribute name="font-size">80%</xsl:attribute>
4487
4697
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -4490,30 +4700,12 @@
4490
4700
  <xsl:template name="refine_table-fmt-fn-label-style">
4491
4701
  </xsl:template>
4492
4702
 
4493
- <xsl:attribute-set name="fn-container-body-style">
4494
- <xsl:attribute name="text-indent">0</xsl:attribute>
4495
- <xsl:attribute name="start-indent">0</xsl:attribute>
4496
- </xsl:attribute-set>
4497
-
4498
4703
  <xsl:attribute-set name="table-fn-body-style">
4499
4704
  </xsl:attribute-set>
4500
4705
 
4501
- <xsl:attribute-set name="figure-fn-number-style">
4502
- <xsl:attribute name="padding-right">5mm</xsl:attribute>
4503
- </xsl:attribute-set> <!-- figure-fn-number-style -->
4504
-
4505
- <xsl:attribute-set name="figure-fmt-fn-label-style">
4506
- <xsl:attribute name="font-size">80%</xsl:attribute>
4507
- <xsl:attribute name="vertical-align">super</xsl:attribute>
4508
- </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
4509
-
4510
- <xsl:template name="refine_figure-fmt-fn-label-style">
4706
+ <xsl:template name="refine_table-fn-body-style">
4511
4707
  </xsl:template>
4512
4708
 
4513
- <xsl:attribute-set name="figure-fn-body-style">
4514
- <xsl:attribute name="text-align">justify</xsl:attribute>
4515
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4516
- </xsl:attribute-set>
4517
4709
  <!-- ========================== -->
4518
4710
  <!-- END Table styles -->
4519
4711
  <!-- ========================== -->
@@ -4830,7 +5022,7 @@
4830
5022
 
4831
5023
  </fo:block>
4832
5024
 
4833
- <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
5025
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
4834
5026
  <xsl:if test="$continued = 'true'">
4835
5027
 
4836
5028
  <!-- to prevent the error 'THead element may contain only TR elements' -->
@@ -5791,6 +5983,7 @@
5791
5983
  </xsl:apply-templates>
5792
5984
 
5793
5985
  <fo:inline xsl:use-attribute-sets="table-fn-body-style">
5986
+ <xsl:call-template name="refine_table-fn-body-style"/>
5794
5987
  <!-- <xsl:copy-of select="./node()"/> -->
5795
5988
  <xsl:apply-templates/>
5796
5989
  </fo:inline>
@@ -5809,6 +6002,7 @@
5809
6002
  <xsl:param name="process">false</xsl:param>
5810
6003
  <xsl:if test="$process = 'true'">
5811
6004
  <fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
6005
+ <xsl:call-template name="refine_table-fn-number-style"/>
5812
6006
 
5813
6007
  <!-- tab is padding-right -->
5814
6008
  <xsl:apply-templates select=".//mn:tab">
@@ -6680,9 +6874,18 @@
6680
6874
  <xsl:attribute-set name="dl-block-style">
6681
6875
  </xsl:attribute-set>
6682
6876
 
6877
+ <xsl:template name="refine_dl-block-style">
6878
+ <xsl:if test="@key = 'true' and ancestor::mn:figure">
6879
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
6880
+ </xsl:if>
6881
+ </xsl:template>
6882
+
6683
6883
  <xsl:attribute-set name="dt-row-style">
6684
6884
  </xsl:attribute-set>
6685
6885
 
6886
+ <xsl:template name="refine_dt-row-style">
6887
+ </xsl:template>
6888
+
6686
6889
  <xsl:attribute-set name="dt-cell-style">
6687
6890
  </xsl:attribute-set>
6688
6891
 
@@ -6703,6 +6906,9 @@
6703
6906
  <xsl:attribute name="font-weight">bold</xsl:attribute>
6704
6907
  </xsl:attribute-set> <!-- dl-name-style -->
6705
6908
 
6909
+ <xsl:template name="refine_dl-name-style">
6910
+ </xsl:template>
6911
+
6706
6912
  <xsl:attribute-set name="dd-cell-style">
6707
6913
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
6708
6914
  </xsl:attribute-set>
@@ -6741,9 +6947,7 @@
6741
6947
  <!-- <dl><xsl:copy-of select="."/></dl> -->
6742
6948
  <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
6743
6949
 
6744
- <xsl:if test="@key = 'true' and ancestor::mn:figure">
6745
- <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
6746
- </xsl:if>
6950
+ <xsl:call-template name="refine_dl-block-style"/>
6747
6951
 
6748
6952
  <xsl:call-template name="setBlockSpanAll"/>
6749
6953
  <xsl:if test="not(ancestor::mn:quote)">
@@ -7039,6 +7243,8 @@
7039
7243
  <xsl:if test="$process = 'true'">
7040
7244
  <fo:block xsl:use-attribute-sets="dl-name-style">
7041
7245
 
7246
+ <xsl:call-template name="refine_dl-name-style"/>
7247
+
7042
7248
  <xsl:apply-templates/>
7043
7249
  </fo:block>
7044
7250
  </xsl:if>
@@ -7227,6 +7433,8 @@
7227
7433
  <xsl:param name="split_keep-within-line"/>
7228
7434
 
7229
7435
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
7436
+ <xsl:call-template name="refine_dt-row-style"/>
7437
+
7230
7438
  <xsl:call-template name="insert_dt_cell">
7231
7439
  <xsl:with-param name="key_iso" select="$key_iso"/>
7232
7440
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -7440,18 +7648,25 @@
7440
7648
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
7441
7649
  </xsl:attribute-set>
7442
7650
 
7651
+ <xsl:template name="refine_appendix-style">
7652
+ </xsl:template>
7653
+
7443
7654
  <xsl:attribute-set name="appendix-example-style">
7444
7655
  <xsl:attribute name="font-size">10pt</xsl:attribute>
7445
7656
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
7446
7657
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
7447
7658
  </xsl:attribute-set>
7448
7659
 
7660
+ <xsl:template name="refine_appendix-example-style">
7661
+ </xsl:template>
7662
+
7449
7663
  <!-- ======================== -->
7450
7664
  <!-- Appendix processing -->
7451
7665
  <!-- ======================== -->
7452
7666
  <xsl:template match="mn:appendix">
7453
7667
  <xsl:call-template name="setNamedDestination"/>
7454
7668
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
7669
+ <xsl:call-template name="refine_appendix-style"/>
7455
7670
  <xsl:apply-templates select="mn:fmt-title"/>
7456
7671
  </fo:block>
7457
7672
  <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
@@ -7470,13 +7685,23 @@
7470
7685
  <xsl:template match="mn:appendix//mn:example" priority="2">
7471
7686
  <xsl:call-template name="setNamedDestination"/>
7472
7687
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
7688
+ <xsl:call-template name="refine_appendix-example-style"/>
7473
7689
  <xsl:apply-templates select="mn:fmt-name"/>
7474
7690
  </fo:block>
7475
7691
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7476
7692
  </xsl:template>
7477
7693
 
7478
7694
  <xsl:attribute-set name="xref-style">
7479
- </xsl:attribute-set>
7695
+ </xsl:attribute-set> <!-- xref-style -->
7696
+
7697
+ <xsl:template name="refine_xref-style">
7698
+ <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[self::mn:table or self::mn:dl])">
7699
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7700
+ </xsl:if>
7701
+ <xsl:if test="parent::mn:add">
7702
+ <xsl:call-template name="append_add-style"/>
7703
+ </xsl:if>
7704
+ </xsl:template> <!-- refine_xref-style -->
7480
7705
 
7481
7706
  <xsl:template match="mn:fmt-xref">
7482
7707
  <xsl:call-template name="insert_basic_link">
@@ -7485,12 +7710,8 @@
7485
7710
  <xsl:call-template name="getAltText"/>
7486
7711
  </xsl:variable>
7487
7712
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
7488
- <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[self::mn:table or self::mn:dl])">
7489
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7490
- </xsl:if>
7491
- <xsl:if test="parent::mn:add">
7492
- <xsl:call-template name="append_add-style"/>
7493
- </xsl:if>
7713
+ <xsl:call-template name="refine_xref-style"/>
7714
+
7494
7715
  <xsl:apply-templates/>
7495
7716
  </fo:basic-link>
7496
7717
  </xsl:with-param>
@@ -7603,17 +7824,17 @@
7603
7824
  <xsl:attribute-set name="note-style">
7604
7825
  <xsl:attribute name="font-size">10pt</xsl:attribute>
7605
7826
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
7606
- </xsl:attribute-set>
7827
+ </xsl:attribute-set> <!-- note-style -->
7607
7828
 
7608
7829
  <xsl:template name="refine_note-style">
7609
- </xsl:template>
7830
+ </xsl:template> <!-- refine_note-style -->
7610
7831
 
7611
7832
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
7612
7833
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
7613
7834
 
7614
7835
  <xsl:attribute-set name="note-name-style">
7615
7836
  <xsl:attribute name="padding-right">6mm</xsl:attribute>
7616
- </xsl:attribute-set>
7837
+ </xsl:attribute-set> <!-- note-name-style -->
7617
7838
 
7618
7839
  <xsl:template name="refine_note-name-style">
7619
7840
  </xsl:template> <!-- refine_note-name-style -->
@@ -7627,18 +7848,21 @@
7627
7848
 
7628
7849
  <xsl:attribute-set name="note-p-style">
7629
7850
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
7630
- </xsl:attribute-set>
7851
+ </xsl:attribute-set> <!-- note-p-style -->
7852
+
7853
+ <xsl:template name="refine_note-p-style">
7854
+ </xsl:template>
7631
7855
 
7632
7856
  <xsl:attribute-set name="termnote-style">
7633
7857
  <xsl:attribute name="font-size">10pt</xsl:attribute>
7634
7858
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
7635
- </xsl:attribute-set>
7859
+ </xsl:attribute-set> <!-- termnote-style -->
7636
7860
 
7637
7861
  <xsl:template name="refine_termnote-style">
7638
7862
  </xsl:template> <!-- refine_termnote-style -->
7639
7863
 
7640
7864
  <xsl:attribute-set name="termnote-name-style">
7641
- </xsl:attribute-set>
7865
+ </xsl:attribute-set> <!-- termnote-name-style -->
7642
7866
 
7643
7867
  <xsl:template name="refine_termnote-name-style">
7644
7868
  </xsl:template>
@@ -7646,6 +7870,9 @@
7646
7870
  <xsl:attribute-set name="termnote-p-style">
7647
7871
  </xsl:attribute-set>
7648
7872
 
7873
+ <xsl:template name="refine_termnote-p-style">
7874
+ </xsl:template>
7875
+
7649
7876
  <!-- ====== -->
7650
7877
  <!-- note -->
7651
7878
  <!-- termnote -->
@@ -7706,11 +7933,13 @@
7706
7933
  <xsl:choose>
7707
7934
  <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
7708
7935
  <fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
7936
+ <xsl:call-template name="refine_note-p-style"/>
7709
7937
  <xsl:apply-templates/>
7710
7938
  </fo:inline>
7711
7939
  </xsl:when>
7712
7940
  <xsl:otherwise>
7713
7941
  <fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
7942
+ <xsl:call-template name="refine_note-p-style"/>
7714
7943
  <xsl:apply-templates/>
7715
7944
  </fo:block>
7716
7945
  </xsl:otherwise>
@@ -7802,11 +8031,13 @@
7802
8031
  <xsl:choose>
7803
8032
  <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
7804
8033
  <fo:inline xsl:use-attribute-sets="termnote-p-style">
8034
+ <xsl:call-template name="refine_termnote-p-style"/>
7805
8035
  <xsl:apply-templates/>
7806
8036
  </fo:inline>
7807
8037
  </xsl:when>
7808
8038
  <xsl:otherwise>
7809
8039
  <fo:block xsl:use-attribute-sets="termnote-p-style">
8040
+ <xsl:call-template name="refine_termnote-p-style"/>
7810
8041
  <xsl:apply-templates/>
7811
8042
  </fo:block>
7812
8043
  </xsl:otherwise>
@@ -7820,7 +8051,7 @@
7820
8051
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
7821
8052
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
7822
8053
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
7823
- </xsl:attribute-set>
8054
+ </xsl:attribute-set> <!-- quote-style -->
7824
8055
 
7825
8056
  <xsl:template name="refine_quote-style">
7826
8057
  </xsl:template>
@@ -7829,6 +8060,9 @@
7829
8060
  <xsl:attribute name="text-align">right</xsl:attribute>
7830
8061
  </xsl:attribute-set>
7831
8062
 
8063
+ <xsl:template name="refine_quote-source-style">
8064
+ </xsl:template>
8065
+
7832
8066
  <!-- ====== -->
7833
8067
  <!-- quote -->
7834
8068
  <!-- source -->
@@ -7857,6 +8091,7 @@
7857
8091
  </fo:block-container>
7858
8092
  <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
7859
8093
  <fo:block xsl:use-attribute-sets="quote-source-style">
8094
+ <xsl:call-template name="refine_quote-source-style"/>
7860
8095
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
7861
8096
  <xsl:apply-templates select="mn:author"/>
7862
8097
  <xsl:apply-templates select="mn:fmt-source"/>
@@ -7919,6 +8154,15 @@
7919
8154
  <xsl:attribute-set name="figure-style">
7920
8155
  </xsl:attribute-set>
7921
8156
 
8157
+ <xsl:template name="refine_figure-style">
8158
+ </xsl:template>
8159
+
8160
+ <xsl:attribute-set name="figure-number-style">
8161
+ </xsl:attribute-set>
8162
+
8163
+ <xsl:template name="refine_figure-number-style">
8164
+ </xsl:template>
8165
+
7922
8166
  <xsl:attribute-set name="figure-name-style">
7923
8167
  <xsl:attribute name="role">Caption</xsl:attribute>
7924
8168
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -7926,7 +8170,7 @@
7926
8170
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
7927
8171
  <xsl:attribute name="space-after">12pt</xsl:attribute>
7928
8172
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
7929
- </xsl:attribute-set>
8173
+ </xsl:attribute-set> <!-- figure-name-style -->
7930
8174
 
7931
8175
  <xsl:template name="refine_figure-name-style">
7932
8176
  </xsl:template> <!-- refine_figure-name-style -->
@@ -7934,7 +8178,7 @@
7934
8178
  <xsl:attribute-set name="image-style">
7935
8179
  <xsl:attribute name="role">SKIP</xsl:attribute>
7936
8180
  <xsl:attribute name="text-align">center</xsl:attribute>
7937
- </xsl:attribute-set>
8181
+ </xsl:attribute-set> <!-- image-style -->
7938
8182
 
7939
8183
  <xsl:template name="refine_image-style">
7940
8184
  </xsl:template>
@@ -7944,14 +8188,51 @@
7944
8188
  <xsl:attribute name="content-height">100%</xsl:attribute>
7945
8189
  <xsl:attribute name="scaling">uniform</xsl:attribute>
7946
8190
  <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
7947
- </xsl:attribute-set>
8191
+ </xsl:attribute-set> <!-- image-graphic-style -->
8192
+
8193
+ <xsl:template name="refine_image-graphic-style">
8194
+ </xsl:template>
7948
8195
 
7949
8196
  <xsl:attribute-set name="figure-source-style">
7950
8197
  </xsl:attribute-set>
7951
8198
 
8199
+ <xsl:template name="refine_figure-source-style">
8200
+ </xsl:template>
8201
+
7952
8202
  <xsl:attribute-set name="figure-pseudocode-p-style">
7953
8203
  </xsl:attribute-set>
7954
8204
 
8205
+ <xsl:template name="refine_figure-pseudocode-p-style">
8206
+ </xsl:template>
8207
+
8208
+ <xsl:attribute-set name="figure-fn-number-style">
8209
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
8210
+ </xsl:attribute-set> <!-- figure-fn-number-style -->
8211
+
8212
+ <xsl:template name="refine_figure-fn-number-style">
8213
+ </xsl:template>
8214
+
8215
+ <xsl:attribute-set name="figure-fmt-fn-label-style">
8216
+ <xsl:attribute name="font-size">80%</xsl:attribute>
8217
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
8218
+ </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
8219
+
8220
+ <xsl:template name="refine_figure-fmt-fn-label-style">
8221
+ </xsl:template>
8222
+
8223
+ <xsl:attribute-set name="figure-fn-body-style">
8224
+ <xsl:attribute name="text-align">justify</xsl:attribute>
8225
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
8226
+ </xsl:attribute-set>
8227
+
8228
+ <xsl:template name="refine_figure-fn-body-style">
8229
+ <xsl:variable name="key_iso">
8230
+ </xsl:variable>
8231
+ <xsl:if test="normalize-space($key_iso) = 'true'">
8232
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
8233
+ </xsl:if>
8234
+ </xsl:template>
8235
+
7955
8236
  <!-- ============================ -->
7956
8237
  <!-- figure's footnotes rendering -->
7957
8238
  <!-- ============================ -->
@@ -8064,9 +8345,8 @@
8064
8345
  </fo:table-cell>
8065
8346
  <fo:table-cell>
8066
8347
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
8067
- <xsl:if test="normalize-space($key_iso) = 'true'">
8068
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
8069
- </xsl:if>
8348
+ <xsl:call-template name="refine_figure-fn-body-style"/>
8349
+
8070
8350
  <!-- <xsl:copy-of select="./node()"/> -->
8071
8351
  <xsl:apply-templates/>
8072
8352
  </fo:block>
@@ -8084,6 +8364,7 @@
8084
8364
  <xsl:param name="process">false</xsl:param>
8085
8365
  <xsl:if test="$process = 'true'">
8086
8366
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
8367
+ <xsl:call-template name="refine_figure-fn-number-style"/>
8087
8368
  <xsl:attribute name="padding-right">0mm</xsl:attribute>
8088
8369
 
8089
8370
  <!-- tab is padding-right -->
@@ -8121,6 +8402,7 @@
8121
8402
  <xsl:attribute name="font-size">10pt</xsl:attribute>
8122
8403
  </xsl:if>
8123
8404
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
8405
+ <xsl:call-template name="refine_figure-fn-number-style"/>
8124
8406
  <!-- <xsl:value-of select="@reference"/> -->
8125
8407
  <xsl:apply-templates/>
8126
8408
  </fo:inline>
@@ -8166,6 +8448,8 @@
8166
8448
 
8167
8449
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
8168
8450
 
8451
+ <xsl:call-template name="refine_figure-style"/>
8452
+
8169
8453
  <xsl:for-each select="mn:fmt-name"> <!-- set context -->
8170
8454
  <xsl:call-template name="setIDforNamedDestination"/>
8171
8455
  </xsl:for-each>
@@ -8209,6 +8493,7 @@
8209
8493
 
8210
8494
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
8211
8495
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
8496
+ <xsl:call-template name="refine_figure-pseudocode-p-style"/>
8212
8497
  <xsl:apply-templates/>
8213
8498
  </fo:block>
8214
8499
  </xsl:template>
@@ -8338,6 +8623,8 @@
8338
8623
  </xsl:variable>
8339
8624
  <xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
8340
8625
 
8626
+ <xsl:call-template name="refine_image-graphic-style"/>
8627
+
8341
8628
  <xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
8342
8629
  <xsl:variable name="scale">
8343
8630
  <xsl:call-template name="getImageScale">
@@ -9037,6 +9324,9 @@
9037
9324
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
9038
9325
  </xsl:attribute-set> <!-- formula-style -->
9039
9326
 
9327
+ <xsl:template name="refine_formula-style">
9328
+ </xsl:template>
9329
+
9040
9330
  <xsl:attribute-set name="formula-stem-block-style">
9041
9331
  <xsl:attribute name="text-align">center</xsl:attribute>
9042
9332
  <xsl:attribute name="text-align">left</xsl:attribute>
@@ -9107,6 +9397,8 @@
9107
9397
  <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
9108
9398
  <fo:block xsl:use-attribute-sets="formula-style">
9109
9399
 
9400
+ <xsl:call-template name="refine_formula-style"/>
9401
+
9110
9402
  <fo:table table-layout="fixed" width="100%">
9111
9403
  <fo:table-column column-width="95%"/>
9112
9404
  <fo:table-column column-width="5%"/>
@@ -9530,6 +9822,9 @@
9530
9822
  <xsl:attribute name="font-weight">bold</xsl:attribute>
9531
9823
  </xsl:attribute-set> <!-- list-name-style -->
9532
9824
 
9825
+ <xsl:template name="refine_list-name-style">
9826
+ </xsl:template>
9827
+
9533
9828
  <xsl:attribute-set name="list-item-style">
9534
9829
  </xsl:attribute-set>
9535
9830
 
@@ -9826,6 +10121,7 @@
9826
10121
  <xsl:param name="process">false</xsl:param>
9827
10122
  <xsl:if test="$process = 'true'">
9828
10123
  <fo:block xsl:use-attribute-sets="list-name-style">
10124
+ <xsl:call-template name="refine_list-name-style"/>
9829
10125
  <xsl:apply-templates/>
9830
10126
  </fo:block>
9831
10127
  </xsl:if>
@@ -9886,24 +10182,45 @@
9886
10182
  <!-- END Lists processing -->
9887
10183
  <!-- ===================================== -->
9888
10184
 
10185
+ <xsl:attribute-set name="footnote-separator-leader-style">
10186
+ </xsl:attribute-set>
10187
+
10188
+ <xsl:template name="refine_footnote-separator-leader-style">
10189
+ </xsl:template>
10190
+
10191
+ <xsl:attribute-set name="fn-container-body-style">
10192
+ <xsl:attribute name="text-indent">0</xsl:attribute>
10193
+ <xsl:attribute name="start-indent">0</xsl:attribute>
10194
+ </xsl:attribute-set>
10195
+
10196
+ <xsl:template name="refine_fn-container-body-style">
10197
+ </xsl:template>
10198
+
9889
10199
  <xsl:attribute-set name="fn-reference-style">
9890
10200
  <xsl:attribute name="font-size">80%</xsl:attribute>
9891
10201
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
9892
-
9893
- </xsl:attribute-set>
10202
+ </xsl:attribute-set> <!-- fn-reference-style -->
9894
10203
 
9895
10204
  <xsl:template name="refine_fn-reference-style">
10205
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
10206
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
9896
10207
  </xsl:template> <!-- refine_fn-reference-style -->
9897
10208
 
9898
10209
  <xsl:attribute-set name="fn-style">
9899
10210
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
9900
10211
  </xsl:attribute-set>
9901
10212
 
10213
+ <xsl:template name="refine_fn-style">
10214
+ </xsl:template>
10215
+
9902
10216
  <xsl:attribute-set name="fn-num-style">
9903
10217
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
9904
10218
  <xsl:attribute name="font-size">65%</xsl:attribute>
9905
10219
  <xsl:attribute name="vertical-align">super</xsl:attribute>
9906
- </xsl:attribute-set>
10220
+ </xsl:attribute-set> <!-- fn-num-style -->
10221
+
10222
+ <xsl:template name="refine_fn-num-style">
10223
+ </xsl:template>
9907
10224
 
9908
10225
  <xsl:attribute-set name="fn-body-style">
9909
10226
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -9912,7 +10229,7 @@
9912
10229
  <xsl:attribute name="start-indent">0</xsl:attribute>
9913
10230
  <xsl:attribute name="font-size">10pt</xsl:attribute>
9914
10231
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
9915
- </xsl:attribute-set>
10232
+ </xsl:attribute-set> <!-- fn-body-style" -->
9916
10233
 
9917
10234
  <xsl:template name="refine_fn-body-style">
9918
10235
  </xsl:template> <!-- refine_fn-body-style -->
@@ -9976,10 +10293,12 @@
9976
10293
  <xsl:choose>
9977
10294
  <xsl:when test="ancestor::mn:bibitem">
9978
10295
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
10296
+ <xsl:call-template name="refine_bibitem-note-fn-style"/>
9979
10297
  </fn_styles>
9980
10298
  </xsl:when>
9981
10299
  <xsl:otherwise>
9982
10300
  <fn_styles xsl:use-attribute-sets="fn-num-style">
10301
+ <xsl:call-template name="refine_fn-num-style"/>
9983
10302
  </fn_styles>
9984
10303
  </xsl:otherwise>
9985
10304
  </xsl:choose>
@@ -9989,9 +10308,12 @@
9989
10308
  <xsl:copy-of select="."/>
9990
10309
  </xsl:for-each>
9991
10310
 
9992
- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
10311
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
10312
+ <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
9993
10313
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
9994
- </xsl:if>
10314
+ </xsl:if> -->
10315
+
10316
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
9995
10317
 
9996
10318
  <xsl:call-template name="insert_basic_link">
9997
10319
  <xsl:with-param name="element">
@@ -10014,10 +10336,12 @@
10014
10336
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
10015
10337
 
10016
10338
  <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
10339
+ <xsl:call-template name="refine_fn-style"/>
10017
10340
  <xsl:copy-of select="$footnote_inline"/>
10018
10341
  <fo:footnote-body role="Note">
10019
10342
 
10020
10343
  <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
10344
+ <xsl:call-template name="refine_fn-container-body-style"/>
10021
10345
 
10022
10346
  <xsl:variable name="fn_block">
10023
10347
  <xsl:call-template name="refine_fn-body-style"/>
@@ -10116,17 +10440,30 @@
10116
10440
  <xsl:attribute name="font-weight">bold</xsl:attribute>
10117
10441
  </xsl:attribute-set> <!-- admonition-style -->
10118
10442
 
10443
+ <xsl:template name="refine_admonition-style">
10444
+ </xsl:template>
10445
+
10119
10446
  <xsl:attribute-set name="admonition-container-style">
10120
10447
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
10121
10448
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
10122
10449
  </xsl:attribute-set> <!-- admonition-container-style -->
10123
10450
 
10451
+ <xsl:template name="refine_admonition-container-style">
10452
+ </xsl:template>
10453
+
10124
10454
  <xsl:attribute-set name="admonition-name-style">
10125
10455
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
10126
10456
  </xsl:attribute-set> <!-- admonition-name-style -->
10127
10457
 
10458
+ <xsl:template name="refine_admonition-name-style">
10459
+ </xsl:template>
10460
+
10128
10461
  <xsl:attribute-set name="admonition-p-style">
10129
10462
  </xsl:attribute-set> <!-- admonition-p-style -->
10463
+
10464
+ <xsl:template name="refine_admonition-p-style">
10465
+ </xsl:template>
10466
+
10130
10467
  <!-- end admonition -->
10131
10468
 
10132
10469
  <!-- ================ -->
@@ -10135,6 +10472,8 @@
10135
10472
  <xsl:template match="mn:admonition">
10136
10473
  <fo:block xsl:use-attribute-sets="admonition-style">
10137
10474
 
10475
+ <xsl:call-template name="refine_admonition-style"/>
10476
+
10138
10477
  <xsl:call-template name="setBlockSpanAll"/>
10139
10478
 
10140
10479
  <xsl:if test="@type = 'editorial'">
@@ -10202,6 +10541,7 @@
10202
10541
 
10203
10542
  <xsl:template match="mn:admonition/mn:p">
10204
10543
  <fo:block xsl:use-attribute-sets="admonition-p-style">
10544
+ <xsl:call-template name="refine_admonition-p-style"/>
10205
10545
 
10206
10546
  <xsl:apply-templates/>
10207
10547
  </fo:block>
@@ -10211,37 +10551,65 @@
10211
10551
  <!-- END Admonition -->
10212
10552
  <!-- ================ -->
10213
10553
 
10554
+ <xsl:attribute-set name="references-non-normative-title-style">
10555
+ </xsl:attribute-set>
10556
+
10557
+ <xsl:template name="refine_references-non-normative-title-style">
10558
+
10559
+ </xsl:template>
10560
+
10214
10561
  <!-- bibitem in Normative References (references/@normative="true") -->
10215
10562
  <xsl:attribute-set name="bibitem-normative-style">
10216
10563
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
10217
10564
  </xsl:attribute-set> <!-- bibitem-normative-style -->
10218
10565
 
10566
+ <xsl:template name="refine_bibitem-normative-style">
10567
+ </xsl:template>
10568
+
10219
10569
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
10220
10570
  <xsl:attribute-set name="bibitem-normative-list-style">
10221
10571
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
10222
10572
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
10223
10573
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
10224
10574
 
10575
+ <xsl:template name="refine_bibitem-normative-list-style">
10576
+ </xsl:template>
10577
+
10225
10578
  <xsl:attribute-set name="bibitem-non-normative-style">
10226
10579
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
10227
10580
 
10581
+ <xsl:template name="refine_bibitem-non-normative-style">
10582
+ </xsl:template>
10583
+
10228
10584
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
10229
10585
  <xsl:attribute-set name="bibitem-non-normative-list-style">
10230
10586
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
10231
10587
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
10232
10588
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
10233
10589
 
10590
+ <xsl:template name="refine_bibitem-non-normative-list-style">
10591
+ </xsl:template>
10592
+
10234
10593
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
10235
10594
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
10236
10595
  </xsl:attribute-set>
10237
10596
 
10597
+ <xsl:template name="refine_bibitem-non-normative-list-item-style">
10598
+ </xsl:template>
10599
+
10238
10600
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
10239
10601
  <xsl:attribute-set name="bibitem-normative-list-body-style">
10240
10602
  </xsl:attribute-set>
10241
10603
 
10604
+ <xsl:template name="refine_bibitem-normative-list-body-style">
10605
+ </xsl:template>
10606
+
10242
10607
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
10243
10608
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
10244
10609
 
10610
+ <xsl:template name="refine_bibitem-non-normative-list-body-style">
10611
+ </xsl:template>
10612
+
10245
10613
  <!-- footnote reference number for bibitem, in the text -->
10246
10614
  <xsl:attribute-set name="bibitem-note-fn-style">
10247
10615
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
@@ -10249,6 +10617,9 @@
10249
10617
  <xsl:attribute name="vertical-align">super</xsl:attribute>
10250
10618
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
10251
10619
 
10620
+ <xsl:template name="refine_bibitem-note-fn-style">
10621
+ </xsl:template>
10622
+
10252
10623
  <!-- footnote number on the page bottom -->
10253
10624
  <xsl:attribute-set name="bibitem-note-fn-number-style">
10254
10625
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
@@ -10266,6 +10637,9 @@
10266
10637
  <xsl:attribute-set name="references-non-normative-style">
10267
10638
  </xsl:attribute-set> <!-- references-non-normative-style -->
10268
10639
 
10640
+ <xsl:template name="refine_references-non-normative-style">
10641
+ </xsl:template>
10642
+
10269
10643
  <!-- ======================= -->
10270
10644
  <!-- Bibliography rendering -->
10271
10645
  <!-- ======================= -->
@@ -10307,6 +10681,7 @@
10307
10681
  <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
10308
10682
 
10309
10683
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
10684
+ <xsl:call-template name="refine_references-non-normative-style"/>
10310
10685
  <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
10311
10686
  </fo:block>
10312
10687
  </xsl:template> <!-- references -->
@@ -10320,21 +10695,25 @@
10320
10695
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
10321
10696
  <xsl:call-template name="setNamedDestination"/>
10322
10697
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
10698
+ <xsl:call-template name="refine_bibitem-normative-style"/>
10699
+
10323
10700
  <xsl:call-template name="processBibitem"/>
10324
10701
  </fo:block>
10325
10702
 
10326
10703
  </xsl:template> <!-- bibitem -->
10327
10704
 
10328
10705
  <!-- Bibliography (non-normative references) -->
10329
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
10706
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
10330
10707
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
10331
10708
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
10332
10709
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
10333
10710
  <xsl:call-template name="setNamedDestination"/>
10334
10711
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
10712
+ <xsl:call-template name="refine_bibitem-non-normative-list-style"/>
10713
+
10335
10714
  <fo:list-item>
10336
10715
  <fo:list-item-label end-indent="label-end()">
10337
- <fo:block role="SKIP">
10716
+ <fo:block role="SKIP" id="__internal_layout__bibitem_{@id}_{generate-id()}">
10338
10717
  <fo:inline role="SKIP">
10339
10718
  <xsl:apply-templates select="mn:biblio-tag">
10340
10719
  <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
@@ -10344,6 +10723,7 @@
10344
10723
  </fo:list-item-label>
10345
10724
  <fo:list-item-body start-indent="body-start()">
10346
10725
  <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
10726
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
10347
10727
  <xsl:call-template name="processBibitem">
10348
10728
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
10349
10729
  </xsl:call-template>
@@ -10354,12 +10734,17 @@
10354
10734
 
10355
10735
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
10356
10736
 
10737
+ <!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
10738
+ <xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
10739
+
10357
10740
  <xsl:template name="insertListItem_Bibitem">
10358
10741
  <xsl:choose>
10359
10742
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
10360
10743
  <xsl:otherwise>
10361
10744
  <xsl:call-template name="setNamedDestination"/>
10362
10745
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
10746
+ <xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
10747
+
10363
10748
  <fo:list-item-label end-indent="label-end()">
10364
10749
  <fo:block role="SKIP">
10365
10750
  <fo:inline role="SKIP">
@@ -10370,16 +10755,18 @@
10370
10755
  </fo:block>
10371
10756
  </fo:list-item-label>
10372
10757
  <fo:list-item-body start-indent="body-start()">
10373
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
10758
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
10759
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
10374
10760
  <xsl:call-template name="processBibitem">
10375
10761
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
10376
10762
  </xsl:call-template>
10377
10763
  </fo:block>
10764
+ <xsl:call-template name="processBibitemFollowingNotes"/>
10378
10765
  </fo:list-item-body>
10379
10766
  </fo:list-item>
10380
10767
  </xsl:otherwise>
10381
10768
  </xsl:choose>
10382
- <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
10769
+ <xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
10383
10770
  <xsl:with-param name="skip">false</xsl:with-param>
10384
10771
  </xsl:apply-templates>
10385
10772
  </xsl:template>
@@ -10395,25 +10782,16 @@
10395
10782
  <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
10396
10783
  </xsl:apply-templates>
10397
10784
  <xsl:apply-templates select="mn:formattedref"/>
10785
+ <xsl:call-template name="processBibitemFollowingNotes"/>
10398
10786
  <!-- end bibitem processing -->
10399
-
10400
- <xsl:call-template name="processBibliographyNote"/>
10401
10787
  </xsl:template> <!-- processBibitem (bibitem) -->
10402
10788
 
10403
- <xsl:template name="processBibliographyNote">
10404
- <xsl:if test="self::mn:note">
10405
- <xsl:variable name="note_node">
10406
- <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
10407
- <xsl:copy> <!-- skip @id -->
10408
- <xsl:copy-of select="node()"/>
10409
- </xsl:copy>
10410
- </xsl:element>
10411
- </xsl:variable>
10412
- <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
10413
- <xsl:call-template name="note"/>
10414
- </xsl:for-each> -->
10789
+ <xsl:template name="processBibitemFollowingNotes">
10790
+ <!-- current context is bibitem element -->
10791
+ <xsl:variable name="bibitem_id" select="@id"/>
10792
+ <xsl:for-each select="following-sibling::mn:note[preceding-sibling::mn:bibitem[1][@id = $bibitem_id] and preceding-sibling::*[1][self::mn:note or self::mn:bibitem]]">
10415
10793
  <xsl:call-template name="note"/>
10416
- </xsl:if>
10794
+ </xsl:for-each>
10417
10795
  </xsl:template>
10418
10796
 
10419
10797
  <xsl:template match="mn:title" mode="title">
@@ -10613,11 +10991,17 @@
10613
10991
  <!-- Index section styles -->
10614
10992
  <xsl:attribute-set name="indexsect-title-style">
10615
10993
  <xsl:attribute name="role">H1</xsl:attribute>
10616
- </xsl:attribute-set>
10994
+ </xsl:attribute-set> <!-- indexsect-title-style -->
10995
+
10996
+ <xsl:template name="refine_indexsect-title-style">
10997
+ </xsl:template>
10617
10998
 
10618
10999
  <xsl:attribute-set name="indexsect-clause-title-style">
10619
11000
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
10620
- </xsl:attribute-set>
11001
+ </xsl:attribute-set> <!-- indexsect-clause-title-style -->
11002
+
11003
+ <xsl:template name="refine_indexsect-clause-title-style">
11004
+ </xsl:template>
10621
11005
  <!-- End Index section styles -->
10622
11006
 
10623
11007
  <!-- =================== -->
@@ -10811,6 +11195,7 @@
10811
11195
 
10812
11196
  <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
10813
11197
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
11198
+ <xsl:call-template name="refine_indexsect-title-style"/>
10814
11199
  <!-- Index -->
10815
11200
  <xsl:apply-templates/>
10816
11201
  </fo:block>
@@ -10819,6 +11204,7 @@
10819
11204
  <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
10820
11205
  <!-- Letter A, B, C, ... -->
10821
11206
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
11207
+ <xsl:call-template name="refine_indexsect-clause-title-style"/>
10822
11208
  <xsl:apply-templates/>
10823
11209
  </fo:block>
10824
11210
  </xsl:template>
@@ -11023,9 +11409,15 @@
11023
11409
  <xsl:attribute name="leader-pattern">dots</xsl:attribute>
11024
11410
  </xsl:attribute-set> <!-- END: toc-leader-style -->
11025
11411
 
11412
+ <xsl:template name="refine_toc-leader-style">
11413
+ </xsl:template>
11414
+
11026
11415
  <xsl:attribute-set name="toc-pagenumber-style">
11027
11416
  </xsl:attribute-set>
11028
11417
 
11418
+ <xsl:template name="refine_toc-pagenumber-style">
11419
+ </xsl:template>
11420
+
11029
11421
  <!-- List of Figures, Tables -->
11030
11422
  <xsl:attribute-set name="toc-listof-title-style">
11031
11423
  <xsl:attribute name="role">TOCI</xsl:attribute>
@@ -11041,6 +11433,9 @@
11041
11433
  <xsl:attribute name="role">SKIP</xsl:attribute>
11042
11434
  </xsl:attribute-set>
11043
11435
 
11436
+ <xsl:template name="refine_toc-listof-item-block-style">
11437
+ </xsl:template>
11438
+
11044
11439
  <xsl:attribute-set name="toc-listof-item-style">
11045
11440
  <xsl:attribute name="role">TOCI</xsl:attribute>
11046
11441
  <xsl:attribute name="text-align-last">justify</xsl:attribute>
@@ -11049,6 +11444,9 @@
11049
11444
  <xsl:attribute name="role">SKIP</xsl:attribute>
11050
11445
  </xsl:attribute-set>
11051
11446
 
11447
+ <xsl:template name="refine_toc-listof-item-style">
11448
+ </xsl:template>
11449
+
11052
11450
  <xsl:template name="processPrefaceSectionsDefault_Contents">
11053
11451
  <xsl:variable name="nodes_preface_">
11054
11452
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -12161,23 +12559,55 @@
12161
12559
  <!-- Ruby text (CJK languages) rendering -->
12162
12560
  <!-- ===================================== -->
12163
12561
  <!-- ===================================== -->
12562
+
12563
+ <xsl:attribute-set name="ruby-style">
12564
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
12565
+ <xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
12566
+ </xsl:attribute-set>
12567
+
12568
+ <xsl:template name="refine_ruby-style">
12569
+ <xsl:if test="not(ancestor::mn:ruby)">
12570
+ <xsl:attribute name="alignment-baseline">central</xsl:attribute>
12571
+ </xsl:if>
12572
+ <xsl:variable name="rt_text" select="mn:rt"/>
12573
+ <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
12574
+ <!-- Example: width="2em" -->
12575
+ <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
12576
+ <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
12577
+ <xsl:variable name="text_width">
12578
+ <xsl:choose>
12579
+ <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
12580
+ <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
12581
+ </xsl:choose>
12582
+ </xsl:variable>
12583
+ <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
12584
+ </xsl:template> <!-- refine_ruby-style -->
12585
+
12586
+ <xsl:attribute-set name="rb-style">
12587
+ <xsl:attribute name="line-height">1em</xsl:attribute>
12588
+ <xsl:attribute name="text-align">center</xsl:attribute>
12589
+ </xsl:attribute-set>
12590
+
12591
+ <xsl:template name="refine_rb-style">
12592
+ </xsl:template>
12593
+
12594
+ <xsl:attribute-set name="rt-style">
12595
+ <xsl:attribute name="font-size">0.5em</xsl:attribute>
12596
+ <xsl:attribute name="text-align">center</xsl:attribute>
12597
+ <xsl:attribute name="line-height">1.2em</xsl:attribute>
12598
+ <xsl:attribute name="space-before">-1.4em</xsl:attribute>
12599
+ <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
12600
+ </xsl:attribute-set>
12601
+
12602
+ <xsl:template name="refine_rt-style">
12603
+ <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
12604
+ <xsl:attribute name="space-before">0em</xsl:attribute>
12605
+ </xsl:if>
12606
+ </xsl:template>
12607
+
12164
12608
  <xsl:template match="mn:ruby">
12165
- <fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
12166
- <xsl:if test="not(ancestor::mn:ruby)">
12167
- <xsl:attribute name="alignment-baseline">central</xsl:attribute>
12168
- </xsl:if>
12169
- <xsl:variable name="rt_text" select="mn:rt"/>
12170
- <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
12171
- <!-- Example: width="2em" -->
12172
- <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
12173
- <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
12174
- <xsl:variable name="text_width">
12175
- <xsl:choose>
12176
- <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
12177
- <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
12178
- </xsl:choose>
12179
- </xsl:variable>
12180
- <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
12609
+ <fo:inline-container xsl:use-attribute-sets="ruby-style">
12610
+ <xsl:call-template name="refine_ruby-style"/>
12181
12611
 
12182
12612
  <xsl:choose>
12183
12613
  <xsl:when test="ancestor::mn:ruby">
@@ -12195,17 +12625,14 @@
12195
12625
  </xsl:template>
12196
12626
 
12197
12627
  <xsl:template match="mn:rb">
12198
- <fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
12628
+ <fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
12199
12629
  </xsl:template>
12200
12630
 
12201
12631
  <xsl:template match="mn:rt">
12202
- <fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
12203
- <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
12204
- <xsl:attribute name="space-before">0em</xsl:attribute>
12205
- </xsl:if>
12632
+ <fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
12633
+ <xsl:call-template name="refine_rt-style"/>
12206
12634
  <xsl:apply-templates/>
12207
12635
  </fo:block>
12208
-
12209
12636
  </xsl:template>
12210
12637
 
12211
12638
  <!-- ===================================== -->
@@ -12214,6 +12641,18 @@
12214
12641
  <!-- ===================================== -->
12215
12642
  <!-- ===================================== -->
12216
12643
 
12644
+ <xsl:attribute-set name="annex-title-style">
12645
+ </xsl:attribute-set>
12646
+
12647
+ <xsl:template name="refine_annex-title-style">
12648
+ </xsl:template>
12649
+
12650
+ <xsl:attribute-set name="p-zzSTDTitle1-style">
12651
+ </xsl:attribute-set>
12652
+
12653
+ <xsl:template name="refine_p-zzSTDTitle1-style">
12654
+ </xsl:template>
12655
+
12217
12656
  <xsl:template name="processPrefaceSectionsDefault">
12218
12657
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
12219
12658
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -12552,10 +12991,17 @@
12552
12991
  </xsl:choose>
12553
12992
  </xsl:template>
12554
12993
 
12994
+ <xsl:attribute-set name="clause-style">
12995
+
12996
+ </xsl:attribute-set>
12997
+
12998
+ <xsl:template name="refine_clause-style">
12999
+ </xsl:template>
13000
+
12555
13001
  <!-- main sections -->
12556
13002
  <xsl:template match="/*/mn:sections/*" name="sections_node" priority="2">
12557
13003
  <xsl:call-template name="setNamedDestination"/>
12558
- <fo:block>
13004
+ <fo:block role="Sect">
12559
13005
  <xsl:call-template name="setId"/>
12560
13006
 
12561
13007
  <xsl:call-template name="sections_element_style"/>
@@ -12683,6 +13129,10 @@
12683
13129
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
12684
13130
  </xsl:template>
12685
13131
 
13132
+ <!-- for case when update_xml_step1 (common.updatexml.xsl) doesn't apply when $table_if = 'true' -->
13133
+ <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]"/>
13134
+ <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
13135
+
12686
13136
  <!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
12687
13137
  <xsl:template name="insert_basic_link">
12688
13138
  <xsl:param name="element"/>