metanorma-ogc 2.8.2 → 2.8.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.
@@ -373,7 +373,9 @@
373
373
 
374
374
  <xsl:template match="mn:preface//mn:clause[@type = 'toc']" name="toc" priority="4">
375
375
  <fo:block break-after="page"/>
376
- <fo:block-container line-height="1.08" font-family="Lato">
376
+ <fo:block-container xsl:use-attribute-sets="toc-style">
377
+
378
+ <xsl:call-template name="refine_toc-style"/>
377
379
 
378
380
  <xsl:apply-templates select="mn:fmt-title"/>
379
381
 
@@ -535,7 +537,7 @@
535
537
  </xsl:template>
536
538
 
537
539
  <xsl:template match="mn:feedback-statement" priority="2">
538
- <fo:block margin-top="12pt" margin-bottom="12pt">
540
+ <fo:block xsl:use-attribute-sets="feedback-statement-style">
539
541
  <xsl:apply-templates select="mn:clause[1]"/>
540
542
  </fo:block>
541
543
  </xsl:template>
@@ -986,6 +988,7 @@
986
988
  <xsl:variable name="en_dash">–</xsl:variable>
987
989
  <xsl:variable name="em_dash">—</xsl:variable>
988
990
  <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
991
+ <xsl:variable name="nonbreak_space_em_dash"> —</xsl:variable>
989
992
  <xsl:variable name="cr">&#13;</xsl:variable>
990
993
  <xsl:variable name="lf">
991
994
  </xsl:variable>
@@ -1528,6 +1531,7 @@
1528
1531
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="update_xml_step1"/>
1529
1532
  <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]" mode="update_xml_step1"/>
1530
1533
  <xsl:template match="mn:section-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
1534
+ <xsl:template match="mn:floating-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
1531
1535
  <!-- <xsl:template match="mn:preferred[following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
1532
1536
  <xsl:template match="mn:preferred" mode="update_xml_step1"/>
1533
1537
  <!-- <xsl:template match="mn:admitted[following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
@@ -1542,10 +1546,10 @@
1542
1546
 
1543
1547
  <xsl:template match="mn:term[@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
1544
1548
 
1545
- <xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title]]" mode="update_xml_step1">
1549
+ <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">
1546
1550
  <xsl:copy>
1547
1551
  <xsl:apply-templates select="@*" mode="update_xml_step1"/>
1548
- <xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title]/@depth"/>
1552
+ <xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]/@depth"/>
1549
1553
  <xsl:apply-templates select="node()" mode="update_xml_step1"/>
1550
1554
  </xsl:copy>
1551
1555
  </xsl:template>
@@ -2344,6 +2348,9 @@
2344
2348
  <xsl:attribute-set name="license-statement-style">
2345
2349
  </xsl:attribute-set> <!-- license-statement-style -->
2346
2350
 
2351
+ <xsl:template name="refine_license-statement-style">
2352
+ </xsl:template>
2353
+
2347
2354
  <xsl:attribute-set name="license-statement-title-style">
2348
2355
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2349
2356
  <xsl:attribute name="font-family">Lato</xsl:attribute>
@@ -2352,6 +2359,9 @@
2352
2359
  <xsl:attribute name="margin-top">4pt</xsl:attribute>
2353
2360
  </xsl:attribute-set> <!-- license-statement-title-style -->
2354
2361
 
2362
+ <xsl:template name="refine_license-statement-title-style">
2363
+ </xsl:template>
2364
+
2355
2365
  <xsl:attribute-set name="license-statement-p-style">
2356
2366
  <xsl:attribute name="font-size">8pt</xsl:attribute>
2357
2367
  <xsl:attribute name="margin-top">14pt</xsl:attribute>
@@ -2365,6 +2375,9 @@
2365
2375
  <xsl:attribute-set name="legal-statement-style">
2366
2376
  </xsl:attribute-set> <!-- legal-statement-style -->
2367
2377
 
2378
+ <xsl:template name="refine_legal-statement-style">
2379
+ </xsl:template>
2380
+
2368
2381
  <xsl:attribute-set name="legal-statement-title-style">
2369
2382
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2370
2383
  <xsl:attribute name="font-family">Lato</xsl:attribute>
@@ -2372,20 +2385,43 @@
2372
2385
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2373
2386
  </xsl:attribute-set> <!-- legal-statement-title-style -->
2374
2387
 
2388
+ <xsl:template name="refine_legal-statement-title-style">
2389
+ </xsl:template>
2390
+
2375
2391
  <xsl:attribute-set name="legal-statement-p-style">
2376
2392
  <xsl:attribute name="text-align">left</xsl:attribute>
2377
2393
  </xsl:attribute-set> <!-- legal-statement-p-style -->
2378
2394
 
2395
+ <xsl:template name="refine_legal-statement-p-style">
2396
+ <xsl:if test="@align">
2397
+ <xsl:attribute name="text-align">
2398
+ <xsl:value-of select="@align"/>
2399
+ </xsl:attribute>
2400
+ </xsl:if>
2401
+ </xsl:template>
2402
+
2379
2403
  <xsl:attribute-set name="feedback-statement-style">
2404
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2405
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2380
2406
  </xsl:attribute-set> <!-- feedback-statement-style -->
2381
2407
 
2408
+ <xsl:template name="refine_feedback-statement-style">
2409
+ </xsl:template>
2410
+
2382
2411
  <xsl:attribute-set name="feedback-statement-title-style">
2383
2412
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2384
2413
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
2385
2414
 
2415
+ <xsl:template name="refine_feedback-statement-title-style">
2416
+
2417
+ </xsl:template>
2418
+
2386
2419
  <xsl:attribute-set name="feedback-statement-p-style">
2387
2420
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
2388
2421
 
2422
+ <xsl:template name="refine_feedback-statement-p-style">
2423
+ </xsl:template>
2424
+
2389
2425
  <!-- End boilerplate sections styles -->
2390
2426
 
2391
2427
  <!-- ================================= -->
@@ -2420,6 +2456,7 @@
2420
2456
 
2421
2457
  <xsl:template match="mn:license-statement">
2422
2458
  <fo:block xsl:use-attribute-sets="license-statement-style">
2459
+ <xsl:call-template name="refine_license-statement-style"/>
2423
2460
  <xsl:apply-templates/>
2424
2461
  </fo:block>
2425
2462
  </xsl:template> <!-- license-statement -->
@@ -2429,6 +2466,7 @@
2429
2466
  <xsl:call-template name="getLevel"/>
2430
2467
  </xsl:variable>
2431
2468
  <fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
2469
+ <xsl:call-template name="refine_license-statement-title-style"/>
2432
2470
  <xsl:apply-templates/>
2433
2471
  </fo:block>
2434
2472
 
@@ -2448,6 +2486,7 @@
2448
2486
  <xsl:template match="mn:legal-statement">
2449
2487
  <xsl:param name="isLegacy">false</xsl:param>
2450
2488
  <fo:block xsl:use-attribute-sets="legal-statement-style">
2489
+ <xsl:call-template name="refine_legal-statement-style"/>
2451
2490
  <xsl:apply-templates/>
2452
2491
  </fo:block>
2453
2492
  </xsl:template> <!-- legal-statement -->
@@ -2467,12 +2506,7 @@
2467
2506
  <xsl:param name="margin"/>
2468
2507
  <!-- csa -->
2469
2508
  <fo:block xsl:use-attribute-sets="legal-statement-p-style">
2470
-
2471
- <xsl:if test="@align">
2472
- <xsl:attribute name="text-align">
2473
- <xsl:value-of select="@align"/>
2474
- </xsl:attribute>
2475
- </xsl:if>
2509
+ <xsl:call-template name="refine_legal-statement-p-style"/>
2476
2510
 
2477
2511
  <xsl:apply-templates/>
2478
2512
  </fo:block>
@@ -2630,6 +2664,27 @@
2630
2664
  <xsl:attribute-set name="sourcecode-container-style">
2631
2665
  </xsl:attribute-set>
2632
2666
 
2667
+ <xsl:template name="refine_sourcecode-container-style">
2668
+ <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
2669
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2670
+ </xsl:if>
2671
+
2672
+ <xsl:if test="ancestor::mn:example">
2673
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2674
+ </xsl:if>
2675
+
2676
+ <xsl:copy-of select="@id"/>
2677
+
2678
+ <xsl:if test="parent::mn:note">
2679
+ <xsl:attribute name="margin-left">
2680
+ <xsl:choose>
2681
+ <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
2682
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2683
+ </xsl:choose>
2684
+ </xsl:attribute>
2685
+ </xsl:if>
2686
+ </xsl:template>
2687
+
2633
2688
  <xsl:attribute-set name="sourcecode-style">
2634
2689
  <xsl:attribute name="white-space">pre</xsl:attribute>
2635
2690
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -2643,6 +2698,12 @@
2643
2698
  <xsl:template name="refine_sourcecode-style">
2644
2699
  </xsl:template> <!-- refine_sourcecode-style -->
2645
2700
 
2701
+ <xsl:attribute-set name="sourcecode-number-style">
2702
+ </xsl:attribute-set>
2703
+
2704
+ <xsl:template name="refine_sourcecode-number-style">
2705
+ </xsl:template>
2706
+
2646
2707
  <xsl:attribute-set name="sourcecode-name-style">
2647
2708
  <xsl:attribute name="font-size">11pt</xsl:attribute>
2648
2709
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -2651,6 +2712,9 @@
2651
2712
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2652
2713
  </xsl:attribute-set> <!-- sourcecode-name-style -->
2653
2714
 
2715
+ <xsl:template name="refine_sourcecode-name-style">
2716
+ </xsl:template>
2717
+
2654
2718
  <xsl:template name="add-zero-spaces-equal">
2655
2719
  <xsl:param name="text" select="."/>
2656
2720
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
@@ -2742,24 +2806,8 @@
2742
2806
  <xsl:otherwise>
2743
2807
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
2744
2808
 
2745
- <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
2746
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2747
- </xsl:if>
2809
+ <xsl:call-template name="refine_sourcecode-container-style"/>
2748
2810
 
2749
- <xsl:if test="ancestor::mn:example">
2750
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2751
- </xsl:if>
2752
-
2753
- <xsl:copy-of select="@id"/>
2754
-
2755
- <xsl:if test="parent::mn:note">
2756
- <xsl:attribute name="margin-left">
2757
- <xsl:choose>
2758
- <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
2759
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2760
- </xsl:choose>
2761
- </xsl:attribute>
2762
- </xsl:if>
2763
2811
  <fo:block-container margin-left="0mm" role="SKIP">
2764
2812
 
2765
2813
  <fo:block xsl:use-attribute-sets="sourcecode-style">
@@ -3086,6 +3134,7 @@
3086
3134
  <xsl:template match="mn:sourcecode/mn:fmt-name">
3087
3135
  <xsl:if test="normalize-space() != ''">
3088
3136
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
3137
+ <xsl:call-template name="refine_sourcecode-name-style"/>
3089
3138
  <xsl:apply-templates/>
3090
3139
  </fo:block>
3091
3140
  </xsl:if>
@@ -3133,12 +3182,35 @@
3133
3182
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
3134
3183
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3135
3184
  <xsl:attribute name="line-height">113%</xsl:attribute>
3136
- </xsl:attribute-set>
3185
+ </xsl:attribute-set> <!-- pre-style -->
3186
+
3187
+ <xsl:template name="refine_pre-style">
3188
+ </xsl:template>
3137
3189
 
3138
3190
  <xsl:attribute-set name="tt-style">
3139
3191
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
3140
3192
  </xsl:attribute-set>
3141
3193
 
3194
+ <xsl:template name="refine_tt-style">
3195
+ <xsl:variable name="_font-size"> <!-- inherit -->
3196
+ <xsl:choose>
3197
+ <xsl:when test="ancestor::mn:table">8.5</xsl:when>
3198
+ <xsl:otherwise>9.5</xsl:otherwise>
3199
+ </xsl:choose>
3200
+ </xsl:variable>
3201
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
3202
+ <xsl:if test="$font-size != ''">
3203
+ <xsl:attribute name="font-size">
3204
+ <xsl:choose>
3205
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
3206
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
3207
+ <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3208
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3209
+ </xsl:choose>
3210
+ </xsl:attribute>
3211
+ </xsl:if>
3212
+ </xsl:template>
3213
+
3142
3214
  <xsl:variable name="color-added-text">
3143
3215
  <xsl:text>rgb(0, 255, 0)</xsl:text>
3144
3216
  </xsl:variable>
@@ -3151,9 +3223,14 @@
3151
3223
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
3152
3224
  </xsl:attribute-set>
3153
3225
 
3226
+ <xsl:template name="refine_add-style">
3227
+ </xsl:template>
3228
+
3154
3229
  <xsl:variable name="add-style">
3155
- <add-style xsl:use-attribute-sets="add-style"/>
3156
- </xsl:variable>
3230
+ <add-style xsl:use-attribute-sets="add-style">
3231
+ <xsl:call-template name="refine_add-style"/>
3232
+ </add-style>
3233
+ </xsl:variable>
3157
3234
  <xsl:template name="append_add-style">
3158
3235
  <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
3159
3236
  </xsl:template>
@@ -3166,24 +3243,77 @@
3166
3243
  <xsl:attribute name="text-decoration">line-through</xsl:attribute>
3167
3244
  </xsl:attribute-set>
3168
3245
 
3246
+ <xsl:template name="refine_del-style">
3247
+ </xsl:template>
3248
+
3249
+ <xsl:attribute-set name="strong-style">
3250
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3251
+ </xsl:attribute-set>
3252
+
3253
+ <xsl:template name="refine_strong_style">
3254
+ <xsl:if test="ancestor::*['preferred']">
3255
+ <xsl:attribute name="role">SKIP</xsl:attribute>
3256
+ </xsl:if>
3257
+ </xsl:template> <!-- refine_strong_style -->
3258
+
3259
+ <xsl:attribute-set name="em-style">
3260
+ <xsl:attribute name="font-style">italic</xsl:attribute>
3261
+ </xsl:attribute-set>
3262
+
3263
+ <xsl:template name="refine_em_style">
3264
+ </xsl:template> <!-- refine_em_style -->
3265
+
3266
+ <xsl:attribute-set name="sup-style">
3267
+ <xsl:attribute name="font-size">80%</xsl:attribute>
3268
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
3269
+ </xsl:attribute-set>
3270
+
3271
+ <xsl:template name="refine_sup-style">
3272
+ </xsl:template>
3273
+
3274
+ <xsl:attribute-set name="sub-style">
3275
+ <xsl:attribute name="font-size">80%</xsl:attribute>
3276
+ <xsl:attribute name="vertical-align">sub</xsl:attribute>
3277
+ </xsl:attribute-set>
3278
+
3279
+ <xsl:template name="refine_sub-style">
3280
+ </xsl:template>
3281
+
3282
+ <xsl:attribute-set name="underline-style">
3283
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
3284
+ </xsl:attribute-set>
3285
+
3286
+ <xsl:template name="refine_underline-style">
3287
+ </xsl:template>
3288
+
3289
+ <xsl:attribute-set name="hi-style">
3290
+ <xsl:attribute name="background-color">yellow</xsl:attribute>
3291
+ </xsl:attribute-set>
3292
+
3293
+ <xsl:template name="refine_hi-style">
3294
+ </xsl:template>
3295
+
3296
+ <xsl:attribute-set name="strike-style">
3297
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
3298
+ </xsl:attribute-set>
3299
+
3300
+ <xsl:template name="refine_strike-style">
3301
+ </xsl:template>
3302
+
3169
3303
  <xsl:template match="mn:br">
3170
3304
  <xsl:value-of select="$linebreak"/>
3171
3305
  </xsl:template>
3172
3306
 
3173
- <xsl:template match="mn:em">
3174
- <fo:inline font-style="italic">
3175
- <xsl:call-template name="refine_italic_style"/>
3307
+ <xsl:template match="mn:em">
3308
+ <fo:inline xsl:use-attribute-sets="em-style">
3309
+ <xsl:call-template name="refine_em_style"/>
3176
3310
  <xsl:apply-templates/>
3177
3311
  </fo:inline>
3178
3312
  </xsl:template>
3179
3313
 
3180
- <xsl:template name="refine_italic_style">
3181
- </xsl:template>
3182
-
3183
3314
  <xsl:template match="mn:strong | *[local-name()='b']">
3184
3315
  <xsl:param name="split_keep-within-line"/>
3185
- <fo:inline font-weight="bold">
3186
-
3316
+ <fo:inline xsl:use-attribute-sets="strong-style">
3187
3317
  <xsl:call-template name="refine_strong_style"/>
3188
3318
 
3189
3319
  <xsl:apply-templates>
@@ -3192,48 +3322,27 @@
3192
3322
  </fo:inline>
3193
3323
  </xsl:template>
3194
3324
 
3195
- <xsl:template name="refine_strong_style">
3196
- <xsl:if test="ancestor::*['preferred']">
3197
- <xsl:attribute name="role">SKIP</xsl:attribute>
3198
- </xsl:if>
3199
- </xsl:template>
3200
-
3201
3325
  <xsl:template match="*[local-name()='padding']">
3202
3326
  <fo:inline padding-right="{@value}"> </fo:inline>
3203
3327
  </xsl:template>
3204
3328
 
3205
3329
  <xsl:template match="mn:sup">
3206
- <fo:inline font-size="80%" vertical-align="super">
3330
+ <fo:inline xsl:use-attribute-sets="sup-style">
3331
+ <xsl:call-template name="refine_sup-style"/>
3207
3332
  <xsl:apply-templates/>
3208
3333
  </fo:inline>
3209
3334
  </xsl:template>
3210
3335
 
3211
3336
  <xsl:template match="mn:sub">
3212
- <fo:inline font-size="80%" vertical-align="sub">
3337
+ <fo:inline xsl:use-attribute-sets="sub-style">
3338
+ <xsl:call-template name="refine_sub-style"/>
3213
3339
  <xsl:apply-templates/>
3214
3340
  </fo:inline>
3215
3341
  </xsl:template>
3216
3342
 
3217
3343
  <xsl:template match="mn:tt">
3218
3344
  <fo:inline xsl:use-attribute-sets="tt-style">
3219
-
3220
- <xsl:variable name="_font-size"> <!-- inherit -->
3221
- <xsl:choose>
3222
- <xsl:when test="ancestor::mn:table">8.5</xsl:when>
3223
- <xsl:otherwise>9.5</xsl:otherwise>
3224
- </xsl:choose>
3225
- </xsl:variable>
3226
- <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
3227
- <xsl:if test="$font-size != ''">
3228
- <xsl:attribute name="font-size">
3229
- <xsl:choose>
3230
- <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
3231
- <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
3232
- <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3233
- <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3234
- </xsl:choose>
3235
- </xsl:attribute>
3236
- </xsl:if>
3345
+ <xsl:call-template name="refine_tt-style"/>
3237
3346
  <xsl:apply-templates/>
3238
3347
  </fo:inline>
3239
3348
  </xsl:template> <!-- tt -->
@@ -3252,7 +3361,8 @@
3252
3361
  </xsl:template>
3253
3362
 
3254
3363
  <xsl:template match="mn:underline">
3255
- <fo:inline text-decoration="underline">
3364
+ <fo:inline xsl:use-attribute-sets="underline-style">
3365
+ <xsl:call-template name="refine_underline-style"/>
3256
3366
  <xsl:apply-templates/>
3257
3367
  </fo:inline>
3258
3368
  </xsl:template>
@@ -3410,6 +3520,7 @@
3410
3520
 
3411
3521
  <xsl:template match="mn:del">
3412
3522
  <fo:inline xsl:use-attribute-sets="del-style">
3523
+ <xsl:call-template name="refine_del-style"/>
3413
3524
  <xsl:apply-templates/>
3414
3525
  </fo:inline>
3415
3526
  </xsl:template>
@@ -3419,7 +3530,8 @@
3419
3530
 
3420
3531
  <!-- highlight text -->
3421
3532
  <xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
3422
- <fo:inline background-color="yellow">
3533
+ <fo:inline xsl:use-attribute-sets="hi-style">
3534
+ <xsl:call-template name="refine_hi-style"/>
3423
3535
  <xsl:apply-templates/>
3424
3536
  </fo:inline>
3425
3537
  </xsl:template>
@@ -3505,7 +3617,8 @@
3505
3617
  </xsl:template>
3506
3618
 
3507
3619
  <xsl:template match="mn:strike">
3508
- <fo:inline text-decoration="line-through">
3620
+ <fo:inline xsl:use-attribute-sets="strike-style">
3621
+ <xsl:call-template name="refine_strike-style"/>
3509
3622
  <xsl:apply-templates/>
3510
3623
  </fo:inline>
3511
3624
  </xsl:template>
@@ -3585,6 +3698,7 @@
3585
3698
 
3586
3699
  <xsl:template match="mn:pre" name="pre">
3587
3700
  <fo:block xsl:use-attribute-sets="pre-style">
3701
+ <xsl:call-template name="refine_pre-style"/>
3588
3702
  <xsl:copy-of select="@id"/>
3589
3703
  <xsl:choose>
3590
3704
 
@@ -3616,6 +3730,9 @@
3616
3730
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
3617
3731
  </xsl:attribute-set>
3618
3732
 
3733
+ <xsl:template name="refine_permission-style">
3734
+ </xsl:template>
3735
+
3619
3736
  <xsl:attribute-set name="permission-name-style">
3620
3737
  <xsl:attribute name="font-size">11pt</xsl:attribute>
3621
3738
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -3627,14 +3744,23 @@
3627
3744
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3628
3745
  </xsl:attribute-set>
3629
3746
 
3747
+ <xsl:template name="refine_permission-name-style">
3748
+ </xsl:template>
3749
+
3630
3750
  <xsl:attribute-set name="permission-label-style">
3631
3751
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3632
3752
  </xsl:attribute-set>
3633
3753
 
3754
+ <xsl:template name="refine_permission-label-style">
3755
+ </xsl:template>
3756
+
3634
3757
  <xsl:attribute-set name="requirement-style">
3635
3758
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
3636
3759
  </xsl:attribute-set>
3637
3760
 
3761
+ <xsl:template name="refine_requirement-style">
3762
+ </xsl:template>
3763
+
3638
3764
  <xsl:attribute-set name="requirement-name-style">
3639
3765
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3640
3766
  <xsl:attribute name="font-size">11pt</xsl:attribute>
@@ -3646,10 +3772,19 @@
3646
3772
  <xsl:attribute name="background-color">rgb(165,165,165)</xsl:attribute>
3647
3773
  </xsl:attribute-set>
3648
3774
 
3775
+ <xsl:template name="refine_requirement-name-style">
3776
+ <xsl:if test="../@type = 'class'">
3777
+ <xsl:attribute name="background-color">white</xsl:attribute>
3778
+ </xsl:if>
3779
+ </xsl:template>
3780
+
3649
3781
  <xsl:attribute-set name="requirement-label-style">
3650
3782
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3651
3783
  </xsl:attribute-set>
3652
3784
 
3785
+ <xsl:template name="refine_requirement-label-style">
3786
+ </xsl:template>
3787
+
3653
3788
  <xsl:attribute-set name="subject-style">
3654
3789
  </xsl:attribute-set>
3655
3790
 
@@ -3678,6 +3813,9 @@
3678
3813
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
3679
3814
  </xsl:attribute-set>
3680
3815
 
3816
+ <xsl:template name="refine_recommendation-style">
3817
+ </xsl:template>
3818
+
3681
3819
  <xsl:attribute-set name="recommendation-name-style">
3682
3820
  <xsl:attribute name="font-size">11pt</xsl:attribute>
3683
3821
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -3689,16 +3827,23 @@
3689
3827
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3690
3828
  </xsl:attribute-set>
3691
3829
 
3830
+ <xsl:template name="refine_recommendation-name-style">
3831
+ </xsl:template>
3832
+
3692
3833
  <xsl:attribute-set name="recommendation-label-style">
3693
3834
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3694
3835
  </xsl:attribute-set>
3695
3836
 
3837
+ <xsl:template name="refine_recommendation-label-style">
3838
+ </xsl:template>
3839
+
3696
3840
  <!-- ========== -->
3697
3841
  <!-- permission -->
3698
3842
  <!-- ========== -->
3699
3843
  <xsl:template match="mn:permission">
3700
3844
  <xsl:call-template name="setNamedDestination"/>
3701
3845
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
3846
+ <xsl:call-template name="refine_permission-style"/>
3702
3847
  <xsl:apply-templates select="mn:fmt-name"/>
3703
3848
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3704
3849
  </fo:block>
@@ -3707,6 +3852,7 @@
3707
3852
  <xsl:template match="mn:permission/mn:fmt-name">
3708
3853
  <xsl:if test="normalize-space() != ''">
3709
3854
  <fo:block xsl:use-attribute-sets="permission-name-style">
3855
+ <xsl:call-template name="refine_permission-name-style"/>
3710
3856
  <xsl:apply-templates/>
3711
3857
  <xsl:text>:</xsl:text>
3712
3858
  </fo:block>
@@ -3715,6 +3861,7 @@
3715
3861
 
3716
3862
  <xsl:template match="mn:permission/mn:label">
3717
3863
  <fo:block xsl:use-attribute-sets="permission-label-style">
3864
+ <xsl:call-template name="refine_permission-label-style"/>
3718
3865
  <xsl:apply-templates/>
3719
3866
  </fo:block>
3720
3867
  </xsl:template>
@@ -3727,6 +3874,7 @@
3727
3874
  <xsl:template match="mn:requirement">
3728
3875
  <xsl:call-template name="setNamedDestination"/>
3729
3876
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
3877
+ <xsl:call-template name="refine_requirement-style"/>
3730
3878
  <xsl:apply-templates select="mn:fmt-name"/>
3731
3879
  <xsl:apply-templates select="mn:label"/>
3732
3880
  <xsl:apply-templates select="@obligation"/>
@@ -3739,9 +3887,7 @@
3739
3887
  <xsl:if test="normalize-space() != ''">
3740
3888
 
3741
3889
  <fo:block xsl:use-attribute-sets="requirement-name-style">
3742
- <xsl:if test="../@type = 'class'">
3743
- <xsl:attribute name="background-color">white</xsl:attribute>
3744
- </xsl:if>
3890
+ <xsl:call-template name="refine_requirement-name-style"/>
3745
3891
  <xsl:apply-templates/>
3746
3892
  <xsl:text>:</xsl:text>
3747
3893
  </fo:block>
@@ -3750,6 +3896,7 @@
3750
3896
 
3751
3897
  <xsl:template match="mn:requirement/mn:label">
3752
3898
  <fo:block xsl:use-attribute-sets="requirement-label-style">
3899
+ <xsl:call-template name="refine_requirement-label-style"/>
3753
3900
  <xsl:apply-templates/>
3754
3901
  </fo:block>
3755
3902
  </xsl:template>
@@ -3775,6 +3922,7 @@
3775
3922
  <xsl:template match="mn:recommendation">
3776
3923
  <xsl:call-template name="setNamedDestination"/>
3777
3924
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
3925
+ <xsl:call-template name="refine_recommendation-style"/>
3778
3926
  <xsl:apply-templates select="mn:fmt-name"/>
3779
3927
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3780
3928
  </fo:block>
@@ -3784,6 +3932,7 @@
3784
3932
  <xsl:if test="normalize-space() != ''">
3785
3933
 
3786
3934
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
3935
+ <xsl:call-template name="refine_recommendation-name-style"/>
3787
3936
  <xsl:apply-templates/>
3788
3937
  </fo:block>
3789
3938
  </xsl:if>
@@ -3791,6 +3940,7 @@
3791
3940
 
3792
3941
  <xsl:template match="mn:recommendation/mn:label">
3793
3942
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
3943
+ <xsl:call-template name="refine_recommendation-label-style"/>
3794
3944
  <xsl:apply-templates/>
3795
3945
  </fo:block>
3796
3946
  </xsl:template>
@@ -3983,37 +4133,73 @@
3983
4133
  <xsl:attribute-set name="term-style">
3984
4134
  </xsl:attribute-set> <!-- term-style -->
3985
4135
 
4136
+ <xsl:template name="refine_term-style">
4137
+ </xsl:template>
4138
+
3986
4139
  <xsl:attribute-set name="term-name-style">
3987
4140
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3988
4141
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3989
4142
  </xsl:attribute-set> <!-- term-name-style -->
3990
4143
 
3991
- <xsl:attribute-set name="preferred-block-style">
4144
+ <xsl:template name="refine_term-name-style">
4145
+ </xsl:template>
4146
+
4147
+ <xsl:attribute-set name="preferred-style">
4148
+ </xsl:attribute-set> <!-- preferred-style -->
4149
+
4150
+ <xsl:template name="refine_preferred-style">
4151
+ </xsl:template>
4152
+
4153
+ <xsl:attribute-set name="preferred-block-style">
3992
4154
  </xsl:attribute-set> <!-- preferred-block-style -->
3993
4155
 
4156
+ <xsl:template name="refine_preferred-block-style">
4157
+ </xsl:template>
4158
+
3994
4159
  <xsl:attribute-set name="preferred-term-style">
3995
4160
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3996
4161
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3997
4162
  <xsl:attribute name="line-height">1</xsl:attribute>
3998
4163
  </xsl:attribute-set> <!-- preferred-term-style -->
3999
4164
 
4165
+ <xsl:template name="refine_preferred-term-style">
4166
+ <xsl:if test="mn:strong">
4167
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
4168
+ </xsl:if>
4169
+ </xsl:template>
4170
+
4000
4171
  <xsl:attribute-set name="domain-style">
4001
4172
  </xsl:attribute-set> <!-- domain-style -->
4002
4173
 
4174
+ <xsl:template name="refine_domain-style">
4175
+ </xsl:template>
4176
+
4003
4177
  <xsl:attribute-set name="admitted-style">
4004
4178
  <xsl:attribute name="font-size">11pt</xsl:attribute>
4005
4179
  </xsl:attribute-set> <!-- admitted-style -->
4006
4180
 
4181
+ <xsl:template name="refine_admitted-style">
4182
+ </xsl:template>
4183
+
4007
4184
  <xsl:attribute-set name="deprecates-style">
4008
4185
  </xsl:attribute-set> <!-- deprecates-style -->
4009
4186
 
4187
+ <xsl:template name="refine_deprecates-style">
4188
+ </xsl:template>
4189
+
4010
4190
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
4011
4191
  </xsl:attribute-set>
4012
4192
 
4193
+ <xsl:template name="refine_related-block-style">
4194
+ </xsl:template>
4195
+
4013
4196
  <xsl:attribute-set name="definition-style">
4014
4197
  <xsl:attribute name="space-after">6pt</xsl:attribute>
4015
4198
  </xsl:attribute-set> <!-- definition-style -->
4016
4199
 
4200
+ <xsl:template name="refine_definition-style">
4201
+ </xsl:template>
4202
+
4017
4203
  <xsl:attribute-set name="termsource-style">
4018
4204
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4019
4205
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
@@ -4025,11 +4211,17 @@
4025
4211
  <xsl:attribute-set name="termsource-text-style">
4026
4212
  </xsl:attribute-set> <!-- termsource-text-style -->
4027
4213
 
4214
+ <xsl:template name="refine_termsource-text-style">
4215
+ </xsl:template>
4216
+
4028
4217
  <xsl:attribute-set name="origin-style">
4029
4218
  <xsl:attribute name="color">blue</xsl:attribute>
4030
4219
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
4031
4220
  </xsl:attribute-set> <!-- origin-style -->
4032
4221
 
4222
+ <xsl:template name="refine_origin-style">
4223
+ </xsl:template>
4224
+
4033
4225
  <!-- ====== -->
4034
4226
  <!-- term -->
4035
4227
  <!-- ====== -->
@@ -4045,9 +4237,8 @@
4045
4237
  <xsl:template match="mn:term">
4046
4238
  <xsl:call-template name="setNamedDestination"/>
4047
4239
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
4240
+ <xsl:call-template name="refine_term-style"/>
4048
4241
 
4049
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
4050
- </xsl:if>
4051
4242
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4052
4243
  </fo:block>
4053
4244
  </xsl:template>
@@ -4123,6 +4314,7 @@
4123
4314
  <!-- text SOURCE: -->
4124
4315
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
4125
4316
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
4317
+ <xsl:call-template name="refine_termsource-text-style"/>
4126
4318
  <xsl:value-of select="."/>
4127
4319
  </fo:inline>
4128
4320
  </xsl:template>
@@ -4135,6 +4327,7 @@
4135
4327
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
4136
4328
  </xsl:if>
4137
4329
  <fo:inline xsl:use-attribute-sets="origin-style">
4330
+ <xsl:call-template name="refine_origin-style"/>
4138
4331
  <xsl:apply-templates/>
4139
4332
  </fo:inline>
4140
4333
  </fo:basic-link>
@@ -4189,9 +4382,12 @@
4189
4382
  </xsl:variable>
4190
4383
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
4191
4384
 
4385
+ <xsl:call-template name="refine_preferred-block-style"/>
4386
+
4192
4387
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
4193
4388
 
4194
4389
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
4390
+ <xsl:call-template name="refine_term-name-style"/>
4195
4391
 
4196
4392
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
4197
4393
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -4202,7 +4398,7 @@
4202
4398
  </xsl:if>
4203
4399
 
4204
4400
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
4205
- <xsl:call-template name="setStyle_preferred"/>
4401
+ <xsl:call-template name="refine_preferred-term-style"/>
4206
4402
 
4207
4403
  <xsl:apply-templates/>
4208
4404
  </fo:block>
@@ -4223,22 +4419,18 @@
4223
4419
 
4224
4420
  <xsl:template match="mn:fmt-admitted">
4225
4421
  <fo:block xsl:use-attribute-sets="admitted-style">
4422
+ <xsl:call-template name="refine_admitted-style"/>
4226
4423
  <xsl:apply-templates/>
4227
4424
  </fo:block>
4228
4425
  </xsl:template>
4229
4426
 
4230
4427
  <xsl:template match="mn:fmt-deprecates">
4231
4428
  <fo:block xsl:use-attribute-sets="deprecates-style">
4429
+ <xsl:call-template name="refine_deprecates-style"/>
4232
4430
  <xsl:apply-templates/>
4233
4431
  </fo:block>
4234
4432
  </xsl:template>
4235
4433
 
4236
- <xsl:template name="setStyle_preferred">
4237
- <xsl:if test="mn:strong">
4238
- <xsl:attribute name="font-weight">normal</xsl:attribute>
4239
- </xsl:if>
4240
- </xsl:template>
4241
-
4242
4434
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
4243
4435
  <!-- in metanorma xml preferred terms delimited by semicolons -->
4244
4436
  <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
@@ -4248,6 +4440,7 @@
4248
4440
 
4249
4441
  <xsl:template match="mn:fmt-related">
4250
4442
  <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
4443
+ <xsl:call-template name="refine_related-block-style"/>
4251
4444
  <xsl:apply-templates/>
4252
4445
  </fo:block>
4253
4446
  </xsl:template>
@@ -4262,6 +4455,7 @@
4262
4455
  <!-- ========== -->
4263
4456
  <xsl:template match="mn:fmt-definition">
4264
4457
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
4458
+ <xsl:call-template name="refine_definition-style"/>
4265
4459
  <xsl:apply-templates/>
4266
4460
  </fo:block>
4267
4461
  </xsl:template>
@@ -4311,6 +4505,9 @@
4311
4505
  <xsl:attribute-set name="example-body-style">
4312
4506
  </xsl:attribute-set> <!-- example-body-style -->
4313
4507
 
4508
+ <xsl:template name="refine_example-body-style">
4509
+ </xsl:template>
4510
+
4314
4511
  <xsl:attribute-set name="example-name-style">
4315
4512
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4316
4513
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -4361,6 +4558,8 @@
4361
4558
  <xsl:when test="contains($element, 'block')">
4362
4559
  <fo:block xsl:use-attribute-sets="example-p-style">
4363
4560
 
4561
+ <xsl:call-template name="refine_example-p-style"/>
4562
+
4364
4563
  <xsl:apply-templates/>
4365
4564
  </fo:block>
4366
4565
  </xsl:when>
@@ -4412,6 +4611,7 @@
4412
4611
  </fo:block>
4413
4612
 
4414
4613
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4614
+ <xsl:call-template name="refine_example-body-style"/>
4415
4615
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4416
4616
  <xsl:variable name="example_body">
4417
4617
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
@@ -4474,6 +4674,7 @@
4474
4674
  <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
4475
4675
  <!-- display further elements in blocks -->
4476
4676
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4677
+ <xsl:call-template name="refine_example-body-style"/>
4477
4678
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4478
4679
  <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
4479
4680
  <xsl:with-param name="fo_element" select="'block'"/>
@@ -4592,6 +4793,12 @@
4592
4793
  <xsl:call-template name="setBordersTableArray"/>
4593
4794
  </xsl:template> <!-- refine_table-style -->
4594
4795
 
4796
+ <xsl:attribute-set name="table-number-style">
4797
+ </xsl:attribute-set>
4798
+
4799
+ <xsl:template name="refine_table-number-style">
4800
+ </xsl:template>
4801
+
4595
4802
  <xsl:attribute-set name="table-name-style">
4596
4803
  <xsl:attribute name="role">Caption</xsl:attribute>
4597
4804
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -4711,6 +4918,9 @@
4711
4918
  <!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
4712
4919
  </xsl:attribute-set> <!-- table-fn-number-style -->
4713
4920
 
4921
+ <xsl:template name="refine_table-fn-number-style">
4922
+ </xsl:template>
4923
+
4714
4924
  <xsl:attribute-set name="table-fmt-fn-label-style">
4715
4925
  <xsl:attribute name="font-size">80%</xsl:attribute>
4716
4926
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -4719,30 +4929,12 @@
4719
4929
  <xsl:template name="refine_table-fmt-fn-label-style">
4720
4930
  </xsl:template>
4721
4931
 
4722
- <xsl:attribute-set name="fn-container-body-style">
4723
- <xsl:attribute name="text-indent">0</xsl:attribute>
4724
- <xsl:attribute name="start-indent">0</xsl:attribute>
4725
- </xsl:attribute-set>
4726
-
4727
4932
  <xsl:attribute-set name="table-fn-body-style">
4728
4933
  </xsl:attribute-set>
4729
4934
 
4730
- <xsl:attribute-set name="figure-fn-number-style">
4731
- <xsl:attribute name="padding-right">5mm</xsl:attribute>
4732
- </xsl:attribute-set> <!-- figure-fn-number-style -->
4733
-
4734
- <xsl:attribute-set name="figure-fmt-fn-label-style">
4735
- <xsl:attribute name="font-size">80%</xsl:attribute>
4736
- <xsl:attribute name="vertical-align">super</xsl:attribute>
4737
- </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
4738
-
4739
- <xsl:template name="refine_figure-fmt-fn-label-style">
4935
+ <xsl:template name="refine_table-fn-body-style">
4740
4936
  </xsl:template>
4741
4937
 
4742
- <xsl:attribute-set name="figure-fn-body-style">
4743
- <xsl:attribute name="text-align">justify</xsl:attribute>
4744
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4745
- </xsl:attribute-set>
4746
4938
  <!-- ========================== -->
4747
4939
  <!-- END Table styles -->
4748
4940
  <!-- ========================== -->
@@ -5062,7 +5254,7 @@
5062
5254
 
5063
5255
  </fo:block>
5064
5256
 
5065
- <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
5257
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
5066
5258
  <xsl:if test="$continued = 'true'">
5067
5259
 
5068
5260
  <!-- to prevent the error 'THead element may contain only TR elements' -->
@@ -6023,6 +6215,7 @@
6023
6215
  </xsl:apply-templates>
6024
6216
 
6025
6217
  <fo:inline xsl:use-attribute-sets="table-fn-body-style">
6218
+ <xsl:call-template name="refine_table-fn-body-style"/>
6026
6219
  <!-- <xsl:copy-of select="./node()"/> -->
6027
6220
  <xsl:apply-templates/>
6028
6221
  </fo:inline>
@@ -6041,6 +6234,7 @@
6041
6234
  <xsl:param name="process">false</xsl:param>
6042
6235
  <xsl:if test="$process = 'true'">
6043
6236
  <fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
6237
+ <xsl:call-template name="refine_table-fn-number-style"/>
6044
6238
 
6045
6239
  <!-- tab is padding-right -->
6046
6240
  <xsl:apply-templates select=".//mn:tab">
@@ -6912,9 +7106,18 @@
6912
7106
  <xsl:attribute-set name="dl-block-style">
6913
7107
  </xsl:attribute-set>
6914
7108
 
7109
+ <xsl:template name="refine_dl-block-style">
7110
+ <xsl:if test="@key = 'true' and ancestor::mn:figure">
7111
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
7112
+ </xsl:if>
7113
+ </xsl:template>
7114
+
6915
7115
  <xsl:attribute-set name="dt-row-style">
6916
7116
  </xsl:attribute-set>
6917
7117
 
7118
+ <xsl:template name="refine_dt-row-style">
7119
+ </xsl:template>
7120
+
6918
7121
  <xsl:attribute-set name="dt-cell-style">
6919
7122
  </xsl:attribute-set>
6920
7123
 
@@ -6936,6 +7139,9 @@
6936
7139
  <xsl:attribute name="font-weight">normal</xsl:attribute>
6937
7140
  </xsl:attribute-set> <!-- dl-name-style -->
6938
7141
 
7142
+ <xsl:template name="refine_dl-name-style">
7143
+ </xsl:template>
7144
+
6939
7145
  <xsl:attribute-set name="dd-cell-style">
6940
7146
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
6941
7147
  </xsl:attribute-set>
@@ -6974,9 +7180,7 @@
6974
7180
  <!-- <dl><xsl:copy-of select="."/></dl> -->
6975
7181
  <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
6976
7182
 
6977
- <xsl:if test="@key = 'true' and ancestor::mn:figure">
6978
- <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
6979
- </xsl:if>
7183
+ <xsl:call-template name="refine_dl-block-style"/>
6980
7184
 
6981
7185
  <xsl:call-template name="setBlockSpanAll"/>
6982
7186
  <xsl:if test="not(ancestor::mn:quote)">
@@ -7272,6 +7476,8 @@
7272
7476
  <xsl:if test="$process = 'true'">
7273
7477
  <fo:block xsl:use-attribute-sets="dl-name-style">
7274
7478
 
7479
+ <xsl:call-template name="refine_dl-name-style"/>
7480
+
7275
7481
  <xsl:apply-templates/>
7276
7482
  </fo:block>
7277
7483
  </xsl:if>
@@ -7460,6 +7666,8 @@
7460
7666
  <xsl:param name="split_keep-within-line"/>
7461
7667
 
7462
7668
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
7669
+ <xsl:call-template name="refine_dt-row-style"/>
7670
+
7463
7671
  <xsl:call-template name="insert_dt_cell">
7464
7672
  <xsl:with-param name="key_iso" select="$key_iso"/>
7465
7673
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -7673,18 +7881,25 @@
7673
7881
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
7674
7882
  </xsl:attribute-set>
7675
7883
 
7884
+ <xsl:template name="refine_appendix-style">
7885
+ </xsl:template>
7886
+
7676
7887
  <xsl:attribute-set name="appendix-example-style">
7677
7888
  <xsl:attribute name="font-size">10pt</xsl:attribute>
7678
7889
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
7679
7890
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
7680
7891
  </xsl:attribute-set>
7681
7892
 
7893
+ <xsl:template name="refine_appendix-example-style">
7894
+ </xsl:template>
7895
+
7682
7896
  <!-- ======================== -->
7683
7897
  <!-- Appendix processing -->
7684
7898
  <!-- ======================== -->
7685
7899
  <xsl:template match="mn:appendix">
7686
7900
  <xsl:call-template name="setNamedDestination"/>
7687
7901
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
7902
+ <xsl:call-template name="refine_appendix-style"/>
7688
7903
  <xsl:apply-templates select="mn:fmt-title"/>
7689
7904
  </fo:block>
7690
7905
  <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
@@ -7703,6 +7918,7 @@
7703
7918
  <xsl:template match="mn:appendix//mn:example" priority="2">
7704
7919
  <xsl:call-template name="setNamedDestination"/>
7705
7920
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
7921
+ <xsl:call-template name="refine_appendix-example-style"/>
7706
7922
  <xsl:apply-templates select="mn:fmt-name"/>
7707
7923
  </fo:block>
7708
7924
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
@@ -7711,7 +7927,16 @@
7711
7927
  <xsl:attribute-set name="xref-style">
7712
7928
  <xsl:attribute name="color">blue</xsl:attribute>
7713
7929
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
7714
- </xsl:attribute-set>
7930
+ </xsl:attribute-set> <!-- xref-style -->
7931
+
7932
+ <xsl:template name="refine_xref-style">
7933
+ <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])">
7934
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7935
+ </xsl:if>
7936
+ <xsl:if test="parent::mn:add">
7937
+ <xsl:call-template name="append_add-style"/>
7938
+ </xsl:if>
7939
+ </xsl:template> <!-- refine_xref-style -->
7715
7940
 
7716
7941
  <xsl:template match="mn:fmt-xref">
7717
7942
  <xsl:call-template name="insert_basic_link">
@@ -7720,12 +7945,8 @@
7720
7945
  <xsl:call-template name="getAltText"/>
7721
7946
  </xsl:variable>
7722
7947
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
7723
- <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])">
7724
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7725
- </xsl:if>
7726
- <xsl:if test="parent::mn:add">
7727
- <xsl:call-template name="append_add-style"/>
7728
- </xsl:if>
7948
+ <xsl:call-template name="refine_xref-style"/>
7949
+
7729
7950
  <xsl:apply-templates/>
7730
7951
  </fo:basic-link>
7731
7952
  </xsl:with-param>
@@ -7840,20 +8061,20 @@
7840
8061
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
7841
8062
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
7842
8063
  <xsl:attribute name="line-height">115%</xsl:attribute>
7843
- </xsl:attribute-set>
8064
+ </xsl:attribute-set> <!-- note-style -->
7844
8065
 
7845
8066
  <xsl:template name="refine_note-style">
7846
8067
  <xsl:if test="ancestor::mn:ul or ancestor::mn:ol and not(ancestor::mn:note[1]/following-sibling::*)">
7847
8068
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
7848
8069
  </xsl:if>
7849
- </xsl:template>
8070
+ </xsl:template> <!-- refine_note-style -->
7850
8071
 
7851
8072
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
7852
8073
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
7853
8074
 
7854
8075
  <xsl:attribute-set name="note-name-style">
7855
8076
  <!-- <xsl:attribute name="padding-right">4mm</xsl:attribute> -->
7856
- </xsl:attribute-set>
8077
+ </xsl:attribute-set> <!-- note-name-style -->
7857
8078
 
7858
8079
  <xsl:template name="refine_note-name-style">
7859
8080
  </xsl:template> <!-- refine_note-name-style -->
@@ -7868,18 +8089,21 @@
7868
8089
  <xsl:attribute-set name="note-p-style">
7869
8090
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
7870
8091
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
7871
- </xsl:attribute-set>
8092
+ </xsl:attribute-set> <!-- note-p-style -->
8093
+
8094
+ <xsl:template name="refine_note-p-style">
8095
+ </xsl:template>
7872
8096
 
7873
8097
  <xsl:attribute-set name="termnote-style">
7874
8098
  <xsl:attribute name="font-size">10pt</xsl:attribute>
7875
8099
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
7876
- </xsl:attribute-set>
8100
+ </xsl:attribute-set> <!-- termnote-style -->
7877
8101
 
7878
8102
  <xsl:template name="refine_termnote-style">
7879
8103
  </xsl:template> <!-- refine_termnote-style -->
7880
8104
 
7881
8105
  <xsl:attribute-set name="termnote-name-style">
7882
- </xsl:attribute-set>
8106
+ </xsl:attribute-set> <!-- termnote-name-style -->
7883
8107
 
7884
8108
  <xsl:template name="refine_termnote-name-style">
7885
8109
  </xsl:template>
@@ -7888,6 +8112,9 @@
7888
8112
  <xsl:attribute name="space-before">4pt</xsl:attribute>
7889
8113
  </xsl:attribute-set>
7890
8114
 
8115
+ <xsl:template name="refine_termnote-p-style">
8116
+ </xsl:template>
8117
+
7891
8118
  <!-- ====== -->
7892
8119
  <!-- note -->
7893
8120
  <!-- termnote -->
@@ -7948,11 +8175,13 @@
7948
8175
  <xsl:choose>
7949
8176
  <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
7950
8177
  <fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
8178
+ <xsl:call-template name="refine_note-p-style"/>
7951
8179
  <xsl:apply-templates/>
7952
8180
  </fo:inline>
7953
8181
  </xsl:when>
7954
8182
  <xsl:otherwise>
7955
8183
  <fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
8184
+ <xsl:call-template name="refine_note-p-style"/>
7956
8185
  <xsl:apply-templates/>
7957
8186
  </fo:block>
7958
8187
  </xsl:otherwise>
@@ -8044,11 +8273,13 @@
8044
8273
  <xsl:choose>
8045
8274
  <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
8046
8275
  <fo:inline xsl:use-attribute-sets="termnote-p-style">
8276
+ <xsl:call-template name="refine_termnote-p-style"/>
8047
8277
  <xsl:apply-templates/>
8048
8278
  </fo:inline>
8049
8279
  </xsl:when>
8050
8280
  <xsl:otherwise>
8051
8281
  <fo:block xsl:use-attribute-sets="termnote-p-style">
8282
+ <xsl:call-template name="refine_termnote-p-style"/>
8052
8283
  <xsl:apply-templates/>
8053
8284
  </fo:block>
8054
8285
  </xsl:otherwise>
@@ -8063,7 +8294,7 @@
8063
8294
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
8064
8295
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
8065
8296
  <xsl:attribute name="margin-left">13mm</xsl:attribute>
8066
- </xsl:attribute-set>
8297
+ </xsl:attribute-set> <!-- quote-style -->
8067
8298
 
8068
8299
  <xsl:template name="refine_quote-style">
8069
8300
  </xsl:template>
@@ -8073,6 +8304,9 @@
8073
8304
  <xsl:attribute name="margin-right">25mm</xsl:attribute>
8074
8305
  </xsl:attribute-set>
8075
8306
 
8307
+ <xsl:template name="refine_quote-source-style">
8308
+ </xsl:template>
8309
+
8076
8310
  <!-- ====== -->
8077
8311
  <!-- quote -->
8078
8312
  <!-- source -->
@@ -8101,6 +8335,7 @@
8101
8335
  </fo:block-container>
8102
8336
  <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
8103
8337
  <fo:block xsl:use-attribute-sets="quote-source-style">
8338
+ <xsl:call-template name="refine_quote-source-style"/>
8104
8339
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
8105
8340
  <xsl:apply-templates select="mn:author"/>
8106
8341
  <xsl:apply-templates select="mn:fmt-source"/>
@@ -8163,6 +8398,15 @@
8163
8398
  <xsl:attribute-set name="figure-style">
8164
8399
  </xsl:attribute-set>
8165
8400
 
8401
+ <xsl:template name="refine_figure-style">
8402
+ </xsl:template>
8403
+
8404
+ <xsl:attribute-set name="figure-number-style">
8405
+ </xsl:attribute-set>
8406
+
8407
+ <xsl:template name="refine_figure-number-style">
8408
+ </xsl:template>
8409
+
8166
8410
  <xsl:attribute-set name="figure-name-style">
8167
8411
  <xsl:attribute name="role">Caption</xsl:attribute>
8168
8412
  <xsl:attribute name="font-size">11pt</xsl:attribute>
@@ -8173,7 +8417,7 @@
8173
8417
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
8174
8418
  <xsl:attribute name="space-after">6pt</xsl:attribute>
8175
8419
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
8176
- </xsl:attribute-set>
8420
+ </xsl:attribute-set> <!-- figure-name-style -->
8177
8421
 
8178
8422
  <xsl:template name="refine_figure-name-style">
8179
8423
  </xsl:template> <!-- refine_figure-name-style -->
@@ -8183,7 +8427,7 @@
8183
8427
  <xsl:attribute name="text-align">center</xsl:attribute>
8184
8428
  <xsl:attribute name="space-before">12pt</xsl:attribute>
8185
8429
  <xsl:attribute name="space-after">0pt</xsl:attribute>
8186
- </xsl:attribute-set>
8430
+ </xsl:attribute-set> <!-- image-style -->
8187
8431
 
8188
8432
  <xsl:template name="refine_image-style">
8189
8433
  </xsl:template>
@@ -8193,14 +8437,51 @@
8193
8437
  <xsl:attribute name="content-height">100%</xsl:attribute>
8194
8438
  <xsl:attribute name="scaling">uniform</xsl:attribute>
8195
8439
  <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
8196
- </xsl:attribute-set>
8440
+ </xsl:attribute-set> <!-- image-graphic-style -->
8441
+
8442
+ <xsl:template name="refine_image-graphic-style">
8443
+ </xsl:template>
8197
8444
 
8198
8445
  <xsl:attribute-set name="figure-source-style">
8199
8446
  </xsl:attribute-set>
8200
8447
 
8448
+ <xsl:template name="refine_figure-source-style">
8449
+ </xsl:template>
8450
+
8201
8451
  <xsl:attribute-set name="figure-pseudocode-p-style">
8202
8452
  </xsl:attribute-set>
8203
8453
 
8454
+ <xsl:template name="refine_figure-pseudocode-p-style">
8455
+ </xsl:template>
8456
+
8457
+ <xsl:attribute-set name="figure-fn-number-style">
8458
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
8459
+ </xsl:attribute-set> <!-- figure-fn-number-style -->
8460
+
8461
+ <xsl:template name="refine_figure-fn-number-style">
8462
+ </xsl:template>
8463
+
8464
+ <xsl:attribute-set name="figure-fmt-fn-label-style">
8465
+ <xsl:attribute name="font-size">80%</xsl:attribute>
8466
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
8467
+ </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
8468
+
8469
+ <xsl:template name="refine_figure-fmt-fn-label-style">
8470
+ </xsl:template>
8471
+
8472
+ <xsl:attribute-set name="figure-fn-body-style">
8473
+ <xsl:attribute name="text-align">justify</xsl:attribute>
8474
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
8475
+ </xsl:attribute-set>
8476
+
8477
+ <xsl:template name="refine_figure-fn-body-style">
8478
+ <xsl:variable name="key_iso">
8479
+ </xsl:variable>
8480
+ <xsl:if test="normalize-space($key_iso) = 'true'">
8481
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
8482
+ </xsl:if>
8483
+ </xsl:template>
8484
+
8204
8485
  <!-- ============================ -->
8205
8486
  <!-- figure's footnotes rendering -->
8206
8487
  <!-- ============================ -->
@@ -8313,9 +8594,8 @@
8313
8594
  </fo:table-cell>
8314
8595
  <fo:table-cell>
8315
8596
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
8316
- <xsl:if test="normalize-space($key_iso) = 'true'">
8317
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
8318
- </xsl:if>
8597
+ <xsl:call-template name="refine_figure-fn-body-style"/>
8598
+
8319
8599
  <!-- <xsl:copy-of select="./node()"/> -->
8320
8600
  <xsl:apply-templates/>
8321
8601
  </fo:block>
@@ -8333,6 +8613,7 @@
8333
8613
  <xsl:param name="process">false</xsl:param>
8334
8614
  <xsl:if test="$process = 'true'">
8335
8615
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
8616
+ <xsl:call-template name="refine_figure-fn-number-style"/>
8336
8617
  <xsl:attribute name="padding-right">0mm</xsl:attribute>
8337
8618
 
8338
8619
  <!-- tab is padding-right -->
@@ -8370,6 +8651,7 @@
8370
8651
  <xsl:attribute name="font-size">10pt</xsl:attribute>
8371
8652
  </xsl:if>
8372
8653
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
8654
+ <xsl:call-template name="refine_figure-fn-number-style"/>
8373
8655
  <!-- <xsl:value-of select="@reference"/> -->
8374
8656
  <xsl:apply-templates/>
8375
8657
  </fo:inline>
@@ -8415,6 +8697,8 @@
8415
8697
 
8416
8698
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
8417
8699
 
8700
+ <xsl:call-template name="refine_figure-style"/>
8701
+
8418
8702
  <xsl:for-each select="mn:fmt-name"> <!-- set context -->
8419
8703
  <xsl:call-template name="setIDforNamedDestination"/>
8420
8704
  </xsl:for-each>
@@ -8458,6 +8742,7 @@
8458
8742
 
8459
8743
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
8460
8744
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
8745
+ <xsl:call-template name="refine_figure-pseudocode-p-style"/>
8461
8746
  <xsl:apply-templates/>
8462
8747
  </fo:block>
8463
8748
  </xsl:template>
@@ -8587,6 +8872,8 @@
8587
8872
  </xsl:variable>
8588
8873
  <xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
8589
8874
 
8875
+ <xsl:call-template name="refine_image-graphic-style"/>
8876
+
8590
8877
  <xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
8591
8878
  <xsl:variable name="scale">
8592
8879
  <xsl:call-template name="getImageScale">
@@ -9286,6 +9573,9 @@
9286
9573
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
9287
9574
  </xsl:attribute-set> <!-- formula-style -->
9288
9575
 
9576
+ <xsl:template name="refine_formula-style">
9577
+ </xsl:template>
9578
+
9289
9579
  <xsl:attribute-set name="formula-stem-block-style">
9290
9580
  <xsl:attribute name="text-align">center</xsl:attribute>
9291
9581
  <xsl:attribute name="text-align">left</xsl:attribute>
@@ -9356,6 +9646,8 @@
9356
9646
  <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
9357
9647
  <fo:block xsl:use-attribute-sets="formula-style">
9358
9648
 
9649
+ <xsl:call-template name="refine_formula-style"/>
9650
+
9359
9651
  <fo:table table-layout="fixed" width="100%">
9360
9652
  <fo:table-column column-width="95%"/>
9361
9653
  <fo:table-column column-width="5%"/>
@@ -9778,6 +10070,9 @@
9778
10070
  <xsl:attribute name="font-weight">normal</xsl:attribute>
9779
10071
  </xsl:attribute-set> <!-- list-name-style -->
9780
10072
 
10073
+ <xsl:template name="refine_list-name-style">
10074
+ </xsl:template>
10075
+
9781
10076
  <xsl:attribute-set name="list-item-style">
9782
10077
  </xsl:attribute-set>
9783
10078
 
@@ -10075,6 +10370,7 @@
10075
10370
  <xsl:param name="process">false</xsl:param>
10076
10371
  <xsl:if test="$process = 'true'">
10077
10372
  <fo:block xsl:use-attribute-sets="list-name-style">
10373
+ <xsl:call-template name="refine_list-name-style"/>
10078
10374
  <xsl:apply-templates/>
10079
10375
  </fo:block>
10080
10376
  </xsl:if>
@@ -10135,27 +10431,48 @@
10135
10431
  <!-- END Lists processing -->
10136
10432
  <!-- ===================================== -->
10137
10433
 
10434
+ <xsl:attribute-set name="footnote-separator-leader-style">
10435
+ </xsl:attribute-set>
10436
+
10437
+ <xsl:template name="refine_footnote-separator-leader-style">
10438
+ </xsl:template>
10439
+
10440
+ <xsl:attribute-set name="fn-container-body-style">
10441
+ <xsl:attribute name="text-indent">0</xsl:attribute>
10442
+ <xsl:attribute name="start-indent">0</xsl:attribute>
10443
+ </xsl:attribute-set>
10444
+
10445
+ <xsl:template name="refine_fn-container-body-style">
10446
+ </xsl:template>
10447
+
10138
10448
  <xsl:attribute-set name="fn-reference-style">
10139
10449
  <xsl:attribute name="font-size">80%</xsl:attribute>
10140
10450
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
10141
10451
  <xsl:attribute name="vertical-align">super</xsl:attribute>
10142
10452
  <xsl:attribute name="color">blue</xsl:attribute>
10143
10453
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
10144
-
10145
- </xsl:attribute-set>
10454
+ </xsl:attribute-set> <!-- fn-reference-style -->
10146
10455
 
10147
10456
  <xsl:template name="refine_fn-reference-style">
10457
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
10458
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
10148
10459
  </xsl:template> <!-- refine_fn-reference-style -->
10149
10460
 
10150
10461
  <xsl:attribute-set name="fn-style">
10151
10462
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
10152
10463
  </xsl:attribute-set>
10153
10464
 
10465
+ <xsl:template name="refine_fn-style">
10466
+ </xsl:template>
10467
+
10154
10468
  <xsl:attribute-set name="fn-num-style">
10155
10469
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
10156
10470
  <xsl:attribute name="font-size">65%</xsl:attribute>
10157
10471
  <xsl:attribute name="vertical-align">super</xsl:attribute>
10158
- </xsl:attribute-set>
10472
+ </xsl:attribute-set> <!-- fn-num-style -->
10473
+
10474
+ <xsl:template name="refine_fn-num-style">
10475
+ </xsl:template>
10159
10476
 
10160
10477
  <xsl:attribute-set name="fn-body-style">
10161
10478
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -10166,7 +10483,7 @@
10166
10483
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
10167
10484
  <xsl:attribute name="color">black</xsl:attribute>
10168
10485
  <xsl:attribute name="text-align">justify</xsl:attribute>
10169
- </xsl:attribute-set>
10486
+ </xsl:attribute-set> <!-- fn-body-style" -->
10170
10487
 
10171
10488
  <xsl:template name="refine_fn-body-style">
10172
10489
  </xsl:template> <!-- refine_fn-body-style -->
@@ -10230,10 +10547,12 @@
10230
10547
  <xsl:choose>
10231
10548
  <xsl:when test="ancestor::mn:bibitem">
10232
10549
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
10550
+ <xsl:call-template name="refine_bibitem-note-fn-style"/>
10233
10551
  </fn_styles>
10234
10552
  </xsl:when>
10235
10553
  <xsl:otherwise>
10236
10554
  <fn_styles xsl:use-attribute-sets="fn-num-style">
10555
+ <xsl:call-template name="refine_fn-num-style"/>
10237
10556
  </fn_styles>
10238
10557
  </xsl:otherwise>
10239
10558
  </xsl:choose>
@@ -10243,9 +10562,12 @@
10243
10562
  <xsl:copy-of select="."/>
10244
10563
  </xsl:for-each>
10245
10564
 
10246
- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
10565
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
10566
+ <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
10247
10567
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
10248
- </xsl:if>
10568
+ </xsl:if> -->
10569
+
10570
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
10249
10571
 
10250
10572
  <xsl:call-template name="insert_basic_link">
10251
10573
  <xsl:with-param name="element">
@@ -10268,10 +10590,12 @@
10268
10590
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
10269
10591
 
10270
10592
  <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
10593
+ <xsl:call-template name="refine_fn-style"/>
10271
10594
  <xsl:copy-of select="$footnote_inline"/>
10272
10595
  <fo:footnote-body role="Note">
10273
10596
 
10274
10597
  <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
10598
+ <xsl:call-template name="refine_fn-container-body-style"/>
10275
10599
 
10276
10600
  <xsl:variable name="fn_block">
10277
10601
  <xsl:call-template name="refine_fn-body-style"/>
@@ -10373,6 +10697,9 @@
10373
10697
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
10374
10698
  </xsl:attribute-set> <!-- admonition-style -->
10375
10699
 
10700
+ <xsl:template name="refine_admonition-style">
10701
+ </xsl:template>
10702
+
10376
10703
  <xsl:attribute-set name="admonition-container-style">
10377
10704
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
10378
10705
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -10380,6 +10707,9 @@
10380
10707
  <xsl:attribute name="padding-top">3mm</xsl:attribute>
10381
10708
  </xsl:attribute-set> <!-- admonition-container-style -->
10382
10709
 
10710
+ <xsl:template name="refine_admonition-container-style">
10711
+ </xsl:template>
10712
+
10383
10713
  <xsl:attribute-set name="admonition-name-style">
10384
10714
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
10385
10715
  <xsl:attribute name="font-size">11pt</xsl:attribute>
@@ -10389,9 +10719,16 @@
10389
10719
  <xsl:attribute name="text-align">center</xsl:attribute>
10390
10720
  </xsl:attribute-set> <!-- admonition-name-style -->
10391
10721
 
10722
+ <xsl:template name="refine_admonition-name-style">
10723
+ </xsl:template>
10724
+
10392
10725
  <xsl:attribute-set name="admonition-p-style">
10393
10726
  <xsl:attribute name="font-style">italic</xsl:attribute>
10394
10727
  </xsl:attribute-set> <!-- admonition-p-style -->
10728
+
10729
+ <xsl:template name="refine_admonition-p-style">
10730
+ </xsl:template>
10731
+
10395
10732
  <!-- end admonition -->
10396
10733
 
10397
10734
  <!-- ================ -->
@@ -10401,6 +10738,8 @@
10401
10738
  <xsl:call-template name="setNamedDestination"/>
10402
10739
  <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
10403
10740
 
10741
+ <xsl:call-template name="refine_admonition-style"/>
10742
+
10404
10743
  <xsl:call-template name="setBlockSpanAll"/>
10405
10744
  <xsl:variable name="admonition_color" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = concat('color-admonition-', @type)]/mn:value)"/>
10406
10745
  <xsl:if test="$admonition_color != ''">
@@ -10408,10 +10747,14 @@
10408
10747
  <xsl:attribute name="color"><xsl:value-of select="$admonition_color"/></xsl:attribute>
10409
10748
  </xsl:if>
10410
10749
  <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
10750
+
10751
+ <xsl:call-template name="refine_admonition-container-style"/>
10411
10752
  <fo:block xsl:use-attribute-sets="admonition-name-style">
10753
+ <xsl:call-template name="refine_admonition-name-style"/>
10412
10754
  <xsl:call-template name="displayAdmonitionName"/>
10413
10755
  </fo:block>
10414
10756
  <fo:block xsl:use-attribute-sets="admonition-p-style">
10757
+ <xsl:call-template name="refine_admonition-p-style"/>
10415
10758
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
10416
10759
  </fo:block>
10417
10760
 
@@ -10465,6 +10808,7 @@
10465
10808
 
10466
10809
  <xsl:template match="mn:admonition/mn:p">
10467
10810
  <fo:block xsl:use-attribute-sets="admonition-p-style">
10811
+ <xsl:call-template name="refine_admonition-p-style"/>
10468
10812
 
10469
10813
  <xsl:apply-templates/>
10470
10814
  </fo:block>
@@ -10474,6 +10818,13 @@
10474
10818
  <!-- END Admonition -->
10475
10819
  <!-- ================ -->
10476
10820
 
10821
+ <xsl:attribute-set name="references-non-normative-title-style">
10822
+ </xsl:attribute-set>
10823
+
10824
+ <xsl:template name="refine_references-non-normative-title-style">
10825
+
10826
+ </xsl:template>
10827
+
10477
10828
  <!-- bibitem in Normative References (references/@normative="true") -->
10478
10829
  <xsl:attribute-set name="bibitem-normative-style">
10479
10830
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -10482,32 +10833,53 @@
10482
10833
  <xsl:attribute name="line-height">115%</xsl:attribute>
10483
10834
  </xsl:attribute-set> <!-- bibitem-normative-style -->
10484
10835
 
10836
+ <xsl:template name="refine_bibitem-normative-style">
10837
+ </xsl:template>
10838
+
10485
10839
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
10486
10840
  <xsl:attribute-set name="bibitem-normative-list-style">
10487
10841
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
10488
10842
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
10489
10843
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
10490
10844
 
10845
+ <xsl:template name="refine_bibitem-normative-list-style">
10846
+ </xsl:template>
10847
+
10491
10848
  <xsl:attribute-set name="bibitem-non-normative-style">
10492
10849
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
10493
10850
 
10851
+ <xsl:template name="refine_bibitem-non-normative-style">
10852
+ </xsl:template>
10853
+
10494
10854
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
10495
10855
  <xsl:attribute-set name="bibitem-non-normative-list-style">
10496
10856
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
10497
10857
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
10498
10858
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
10499
10859
 
10860
+ <xsl:template name="refine_bibitem-non-normative-list-style">
10861
+ </xsl:template>
10862
+
10500
10863
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
10501
10864
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
10502
10865
  </xsl:attribute-set>
10503
10866
 
10867
+ <xsl:template name="refine_bibitem-non-normative-list-item-style">
10868
+ </xsl:template>
10869
+
10504
10870
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
10505
10871
  <xsl:attribute-set name="bibitem-normative-list-body-style">
10506
10872
  </xsl:attribute-set>
10507
10873
 
10874
+ <xsl:template name="refine_bibitem-normative-list-body-style">
10875
+ </xsl:template>
10876
+
10508
10877
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
10509
10878
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
10510
10879
 
10880
+ <xsl:template name="refine_bibitem-non-normative-list-body-style">
10881
+ </xsl:template>
10882
+
10511
10883
  <!-- footnote reference number for bibitem, in the text -->
10512
10884
  <xsl:attribute-set name="bibitem-note-fn-style">
10513
10885
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
@@ -10515,6 +10887,9 @@
10515
10887
  <xsl:attribute name="vertical-align">super</xsl:attribute>
10516
10888
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
10517
10889
 
10890
+ <xsl:template name="refine_bibitem-note-fn-style">
10891
+ </xsl:template>
10892
+
10518
10893
  <!-- footnote number on the page bottom -->
10519
10894
  <xsl:attribute-set name="bibitem-note-fn-number-style">
10520
10895
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
@@ -10533,6 +10908,9 @@
10533
10908
  <xsl:attribute name="line-height">120%</xsl:attribute>
10534
10909
  </xsl:attribute-set> <!-- references-non-normative-style -->
10535
10910
 
10911
+ <xsl:template name="refine_references-non-normative-style">
10912
+ </xsl:template>
10913
+
10536
10914
  <!-- ======================= -->
10537
10915
  <!-- Bibliography rendering -->
10538
10916
  <!-- ======================= -->
@@ -10574,6 +10952,7 @@
10574
10952
  <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
10575
10953
 
10576
10954
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
10955
+ <xsl:call-template name="refine_references-non-normative-style"/>
10577
10956
  <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
10578
10957
  </fo:block>
10579
10958
  </xsl:template> <!-- references -->
@@ -10587,21 +10966,25 @@
10587
10966
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
10588
10967
  <xsl:call-template name="setNamedDestination"/>
10589
10968
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
10969
+ <xsl:call-template name="refine_bibitem-normative-style"/>
10970
+
10590
10971
  <xsl:call-template name="processBibitem"/>
10591
10972
  </fo:block>
10592
10973
 
10593
10974
  </xsl:template> <!-- bibitem -->
10594
10975
 
10595
10976
  <!-- Bibliography (non-normative references) -->
10596
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
10977
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
10597
10978
  <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
10598
10979
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
10599
10980
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
10600
10981
  <xsl:call-template name="setNamedDestination"/>
10601
10982
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
10983
+ <xsl:call-template name="refine_bibitem-non-normative-list-style"/>
10984
+
10602
10985
  <fo:list-item>
10603
10986
  <fo:list-item-label end-indent="label-end()">
10604
- <fo:block role="SKIP">
10987
+ <fo:block role="SKIP" id="__internal_layout__bibitem_{@id}_{generate-id()}">
10605
10988
  <fo:inline role="SKIP">
10606
10989
  <xsl:apply-templates select="mn:biblio-tag">
10607
10990
  <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
@@ -10611,6 +10994,7 @@
10611
10994
  </fo:list-item-label>
10612
10995
  <fo:list-item-body start-indent="body-start()">
10613
10996
  <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
10997
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
10614
10998
  <xsl:call-template name="processBibitem">
10615
10999
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
10616
11000
  </xsl:call-template>
@@ -10621,12 +11005,17 @@
10621
11005
 
10622
11006
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
10623
11007
 
11008
+ <!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
11009
+ <xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
11010
+
10624
11011
  <xsl:template name="insertListItem_Bibitem">
10625
11012
  <xsl:choose>
10626
11013
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
10627
11014
  <xsl:otherwise>
10628
11015
  <xsl:call-template name="setNamedDestination"/>
10629
11016
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
11017
+ <xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
11018
+
10630
11019
  <fo:list-item-label end-indent="label-end()">
10631
11020
  <fo:block role="SKIP">
10632
11021
  <fo:inline role="SKIP">
@@ -10637,16 +11026,18 @@
10637
11026
  </fo:block>
10638
11027
  </fo:list-item-label>
10639
11028
  <fo:list-item-body start-indent="body-start()">
10640
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
11029
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
11030
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
10641
11031
  <xsl:call-template name="processBibitem">
10642
11032
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
10643
11033
  </xsl:call-template>
10644
11034
  </fo:block>
11035
+ <xsl:call-template name="processBibitemFollowingNotes"/>
10645
11036
  </fo:list-item-body>
10646
11037
  </fo:list-item>
10647
11038
  </xsl:otherwise>
10648
11039
  </xsl:choose>
10649
- <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
11040
+ <xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
10650
11041
  <xsl:with-param name="skip">false</xsl:with-param>
10651
11042
  </xsl:apply-templates>
10652
11043
  </xsl:template>
@@ -10662,25 +11053,16 @@
10662
11053
  <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
10663
11054
  </xsl:apply-templates>
10664
11055
  <xsl:apply-templates select="mn:formattedref"/>
11056
+ <xsl:call-template name="processBibitemFollowingNotes"/>
10665
11057
  <!-- end bibitem processing -->
10666
-
10667
- <xsl:call-template name="processBibliographyNote"/>
10668
11058
  </xsl:template> <!-- processBibitem (bibitem) -->
10669
11059
 
10670
- <xsl:template name="processBibliographyNote">
10671
- <xsl:if test="self::mn:note">
10672
- <xsl:variable name="note_node">
10673
- <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
10674
- <xsl:copy> <!-- skip @id -->
10675
- <xsl:copy-of select="node()"/>
10676
- </xsl:copy>
10677
- </xsl:element>
10678
- </xsl:variable>
10679
- <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
10680
- <xsl:call-template name="note"/>
10681
- </xsl:for-each> -->
11060
+ <xsl:template name="processBibitemFollowingNotes">
11061
+ <!-- current context is bibitem element -->
11062
+ <xsl:variable name="bibitem_id" select="@id"/>
11063
+ <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]]">
10682
11064
  <xsl:call-template name="note"/>
10683
- </xsl:if>
11065
+ </xsl:for-each>
10684
11066
  </xsl:template>
10685
11067
 
10686
11068
  <xsl:template match="mn:title" mode="title">
@@ -10880,11 +11262,17 @@
10880
11262
  <!-- Index section styles -->
10881
11263
  <xsl:attribute-set name="indexsect-title-style">
10882
11264
  <xsl:attribute name="role">H1</xsl:attribute>
10883
- </xsl:attribute-set>
11265
+ </xsl:attribute-set> <!-- indexsect-title-style -->
11266
+
11267
+ <xsl:template name="refine_indexsect-title-style">
11268
+ </xsl:template>
10884
11269
 
10885
11270
  <xsl:attribute-set name="indexsect-clause-title-style">
10886
11271
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
10887
- </xsl:attribute-set>
11272
+ </xsl:attribute-set> <!-- indexsect-clause-title-style -->
11273
+
11274
+ <xsl:template name="refine_indexsect-clause-title-style">
11275
+ </xsl:template>
10888
11276
  <!-- End Index section styles -->
10889
11277
 
10890
11278
  <!-- =================== -->
@@ -11078,6 +11466,7 @@
11078
11466
 
11079
11467
  <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
11080
11468
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
11469
+ <xsl:call-template name="refine_indexsect-title-style"/>
11081
11470
  <!-- Index -->
11082
11471
  <xsl:apply-templates/>
11083
11472
  </fo:block>
@@ -11086,6 +11475,7 @@
11086
11475
  <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
11087
11476
  <!-- Letter A, B, C, ... -->
11088
11477
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
11478
+ <xsl:call-template name="refine_indexsect-clause-title-style"/>
11089
11479
  <xsl:apply-templates/>
11090
11480
  </fo:block>
11091
11481
  </xsl:template>
@@ -11247,6 +11637,8 @@
11247
11637
  <!-- =================== -->
11248
11638
 
11249
11639
  <xsl:attribute-set name="toc-style">
11640
+ <xsl:attribute name="line-height">1.08</xsl:attribute>
11641
+ <xsl:attribute name="font-family">Lato</xsl:attribute>
11250
11642
  </xsl:attribute-set>
11251
11643
 
11252
11644
  <xsl:template name="refine_toc-style">
@@ -11289,9 +11681,15 @@
11289
11681
  <xsl:attribute name="leader-pattern">dots</xsl:attribute>
11290
11682
  </xsl:attribute-set> <!-- END: toc-leader-style -->
11291
11683
 
11684
+ <xsl:template name="refine_toc-leader-style">
11685
+ </xsl:template>
11686
+
11292
11687
  <xsl:attribute-set name="toc-pagenumber-style">
11293
11688
  </xsl:attribute-set>
11294
11689
 
11690
+ <xsl:template name="refine_toc-pagenumber-style">
11691
+ </xsl:template>
11692
+
11295
11693
  <!-- List of Figures, Tables -->
11296
11694
  <xsl:attribute-set name="toc-listof-title-style">
11297
11695
  </xsl:attribute-set>
@@ -11302,6 +11700,9 @@
11302
11700
  <xsl:attribute-set name="toc-listof-item-block-style">
11303
11701
  </xsl:attribute-set>
11304
11702
 
11703
+ <xsl:template name="refine_toc-listof-item-block-style">
11704
+ </xsl:template>
11705
+
11305
11706
  <xsl:attribute-set name="toc-listof-item-style">
11306
11707
  <xsl:attribute name="role">TOCI</xsl:attribute>
11307
11708
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
@@ -11309,6 +11710,9 @@
11309
11710
  <xsl:attribute name="text-align-last">justify</xsl:attribute>
11310
11711
  </xsl:attribute-set>
11311
11712
 
11713
+ <xsl:template name="refine_toc-listof-item-style">
11714
+ </xsl:template>
11715
+
11312
11716
  <xsl:template name="processPrefaceSectionsDefault_Contents">
11313
11717
  <xsl:variable name="nodes_preface_">
11314
11718
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -12394,23 +12798,55 @@
12394
12798
  <!-- Ruby text (CJK languages) rendering -->
12395
12799
  <!-- ===================================== -->
12396
12800
  <!-- ===================================== -->
12801
+
12802
+ <xsl:attribute-set name="ruby-style">
12803
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
12804
+ <xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
12805
+ </xsl:attribute-set>
12806
+
12807
+ <xsl:template name="refine_ruby-style">
12808
+ <xsl:if test="not(ancestor::mn:ruby)">
12809
+ <xsl:attribute name="alignment-baseline">central</xsl:attribute>
12810
+ </xsl:if>
12811
+ <xsl:variable name="rt_text" select="mn:rt"/>
12812
+ <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
12813
+ <!-- Example: width="2em" -->
12814
+ <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
12815
+ <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
12816
+ <xsl:variable name="text_width">
12817
+ <xsl:choose>
12818
+ <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
12819
+ <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
12820
+ </xsl:choose>
12821
+ </xsl:variable>
12822
+ <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
12823
+ </xsl:template> <!-- refine_ruby-style -->
12824
+
12825
+ <xsl:attribute-set name="rb-style">
12826
+ <xsl:attribute name="line-height">1em</xsl:attribute>
12827
+ <xsl:attribute name="text-align">center</xsl:attribute>
12828
+ </xsl:attribute-set>
12829
+
12830
+ <xsl:template name="refine_rb-style">
12831
+ </xsl:template>
12832
+
12833
+ <xsl:attribute-set name="rt-style">
12834
+ <xsl:attribute name="font-size">0.5em</xsl:attribute>
12835
+ <xsl:attribute name="text-align">center</xsl:attribute>
12836
+ <xsl:attribute name="line-height">1.2em</xsl:attribute>
12837
+ <xsl:attribute name="space-before">-1.4em</xsl:attribute>
12838
+ <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
12839
+ </xsl:attribute-set>
12840
+
12841
+ <xsl:template name="refine_rt-style">
12842
+ <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
12843
+ <xsl:attribute name="space-before">0em</xsl:attribute>
12844
+ </xsl:if>
12845
+ </xsl:template>
12846
+
12397
12847
  <xsl:template match="mn:ruby">
12398
- <fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
12399
- <xsl:if test="not(ancestor::mn:ruby)">
12400
- <xsl:attribute name="alignment-baseline">central</xsl:attribute>
12401
- </xsl:if>
12402
- <xsl:variable name="rt_text" select="mn:rt"/>
12403
- <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
12404
- <!-- Example: width="2em" -->
12405
- <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
12406
- <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
12407
- <xsl:variable name="text_width">
12408
- <xsl:choose>
12409
- <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
12410
- <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
12411
- </xsl:choose>
12412
- </xsl:variable>
12413
- <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
12848
+ <fo:inline-container xsl:use-attribute-sets="ruby-style">
12849
+ <xsl:call-template name="refine_ruby-style"/>
12414
12850
 
12415
12851
  <xsl:choose>
12416
12852
  <xsl:when test="ancestor::mn:ruby">
@@ -12428,17 +12864,14 @@
12428
12864
  </xsl:template>
12429
12865
 
12430
12866
  <xsl:template match="mn:rb">
12431
- <fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
12867
+ <fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
12432
12868
  </xsl:template>
12433
12869
 
12434
12870
  <xsl:template match="mn:rt">
12435
- <fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
12436
- <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
12437
- <xsl:attribute name="space-before">0em</xsl:attribute>
12438
- </xsl:if>
12871
+ <fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
12872
+ <xsl:call-template name="refine_rt-style"/>
12439
12873
  <xsl:apply-templates/>
12440
12874
  </fo:block>
12441
-
12442
12875
  </xsl:template>
12443
12876
 
12444
12877
  <!-- ===================================== -->
@@ -12447,6 +12880,18 @@
12447
12880
  <!-- ===================================== -->
12448
12881
  <!-- ===================================== -->
12449
12882
 
12883
+ <xsl:attribute-set name="annex-title-style">
12884
+ </xsl:attribute-set>
12885
+
12886
+ <xsl:template name="refine_annex-title-style">
12887
+ </xsl:template>
12888
+
12889
+ <xsl:attribute-set name="p-zzSTDTitle1-style">
12890
+ </xsl:attribute-set>
12891
+
12892
+ <xsl:template name="refine_p-zzSTDTitle1-style">
12893
+ </xsl:template>
12894
+
12450
12895
  <xsl:template name="processPrefaceSectionsDefault">
12451
12896
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
12452
12897
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -12785,10 +13230,17 @@
12785
13230
  </xsl:choose>
12786
13231
  </xsl:template>
12787
13232
 
13233
+ <xsl:attribute-set name="clause-style">
13234
+
13235
+ </xsl:attribute-set>
13236
+
13237
+ <xsl:template name="refine_clause-style">
13238
+ </xsl:template>
13239
+
12788
13240
  <!-- main sections -->
12789
13241
  <xsl:template match="/*/mn:sections/*" name="sections_node" priority="2">
12790
13242
  <xsl:call-template name="setNamedDestination"/>
12791
- <fo:block>
13243
+ <fo:block role="Sect">
12792
13244
  <xsl:call-template name="setId"/>
12793
13245
 
12794
13246
  <xsl:call-template name="sections_element_style"/>
@@ -12916,6 +13368,10 @@
12916
13368
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
12917
13369
  </xsl:template>
12918
13370
 
13371
+ <!-- for case when update_xml_step1 (common.updatexml.xsl) doesn't apply when $table_if = 'true' -->
13372
+ <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]"/>
13373
+ <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
13374
+
12919
13375
  <!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
12920
13376
  <xsl:template name="insert_basic_link">
12921
13377
  <xsl:param name="element"/>