metanorma-itu 2.7.6 → 2.8.0

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.
@@ -375,18 +375,10 @@
375
375
  <xsl:attribute name="initial-page-number">1</xsl:attribute>
376
376
  </xsl:if>
377
377
 
378
- <xsl:choose>
379
- <xsl:when test="$doctype = 'service-publication'">
380
- <xsl:call-template name="insertHeaderFooterSP">
381
- <xsl:with-param name="footer-text" select="$footer-text"/>
382
- </xsl:call-template>
383
- </xsl:when>
384
- <xsl:otherwise>
385
- <xsl:call-template name="insertHeaderFooter">
386
- <xsl:with-param name="footer-text" select="$footer-text"/>
387
- </xsl:call-template>
388
- </xsl:otherwise>
389
- </xsl:choose>
378
+ <xsl:call-template name="insertHeaderFooter">
379
+ <xsl:with-param name="doctype" select="$doctype"/>
380
+ <xsl:with-param name="footer-text" select="$footer-text"/>
381
+ </xsl:call-template>
390
382
 
391
383
  <fo:flow flow-name="xsl-region-body">
392
384
 
@@ -498,18 +490,10 @@
498
490
 
499
491
  <xsl:call-template name="insertFootnoteSeparatorCommon"/>
500
492
 
501
- <xsl:choose>
502
- <xsl:when test="$doctype = 'service-publication'">
503
- <xsl:call-template name="insertHeaderFooterSP">
504
- <xsl:with-param name="footer-text" select="$footer-text"/>
505
- </xsl:call-template>
506
- </xsl:when>
507
- <xsl:otherwise>
508
- <xsl:call-template name="insertHeaderFooter">
509
- <xsl:with-param name="footer-text" select="$footer-text"/>
510
- </xsl:call-template>
511
- </xsl:otherwise>
512
- </xsl:choose>
493
+ <xsl:call-template name="insertHeaderFooter">
494
+ <xsl:with-param name="doctype" select="$doctype"/>
495
+ <xsl:with-param name="footer-text" select="$footer-text"/>
496
+ </xsl:call-template>
513
497
 
514
498
  <fo:flow flow-name="xsl-region-body">
515
499
 
@@ -705,6 +689,10 @@
705
689
  <!-- ============================================= -->
706
690
 
707
691
  <xsl:choose>
692
+ <xsl:when test="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'coverpage-image']/mn:value/mn:image and normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:full-coverpage-replacement) = 'true'">
693
+ <xsl:call-template name="insertCoverPageFullImage"/>
694
+ </xsl:when>
695
+
708
696
  <xsl:when test="$layoutVersion = '2023'">
709
697
  <!-- cover page, version 2023 -->
710
698
  <fo:page-sequence force-page-count="no-force" master-reference="cover-page_2023" writing-mode="lr-tb" font-family="Arial" font-size="12pt">
@@ -715,7 +703,7 @@
715
703
  <xsl:when test="$cover_header_hide = 'false'">
716
704
  <fo:block-container margin-left="13mm">
717
705
  <xsl:call-template name="setWritingMode"/>
718
- <fo:block-container margin-left="0mm">
706
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
719
707
 
720
708
  <fo:table width="185.5mm" table-layout="fixed" margin-top="11.5mm">
721
709
  <fo:table-column column-width="proportional-column-width(1)"/>
@@ -1256,7 +1244,7 @@
1256
1244
  </fo:block>
1257
1245
  </fo:block>
1258
1246
  <fo:block-container margin-left="10mm">
1259
- <fo:block-container margin-left="0mm">
1247
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
1260
1248
 
1261
1249
  <fo:block font-size="20pt" font-weight="bold" space-before="30mm">
1262
1250
  <xsl:value-of select="$i18n_tsb"/>
@@ -2167,38 +2155,15 @@
2167
2155
  <xsl:otherwise>fo:block</xsl:otherwise>
2168
2156
  </xsl:choose>
2169
2157
  </xsl:variable>
2170
- <xsl:element name="{$element-name}">
2171
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
2172
-
2173
- <xsl:call-template name="setKeepAttributes"/>
2174
2158
 
2175
- <xsl:if test="@class='supertitle'">
2176
- <xsl:attribute name="space-before">36pt</xsl:attribute>
2177
- <xsl:attribute name="margin-bottom">24pt</xsl:attribute>
2178
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
2179
- <xsl:attribute name="font-size">14pt</xsl:attribute>
2159
+ <xsl:variable name="p_styles">
2160
+ <styles xsl:use-attribute-sets="p-style">
2161
+ <xsl:call-template name="refine_p-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template>
2162
+ </styles>
2163
+ </xsl:variable>
2180
2164
 
2181
- </xsl:if>
2182
- <xsl:attribute name="text-align">
2183
- <xsl:choose>
2184
- <xsl:when test="@class='supertitle'">center</xsl:when>
2185
- <!-- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when> -->
2186
- <xsl:when test="@align"><xsl:call-template name="setAlignment"/></xsl:when>
2187
- <xsl:when test="ancestor::*[1][self::mn:td]/@align">
2188
- <!-- <xsl:value-of select="ancestor::*[1][local-name() = 'td']/@align"/> -->
2189
- <xsl:call-template name="setAlignment">
2190
- <xsl:with-param name="align" select="ancestor::*[1][self::mn:td]/@align"/>
2191
- </xsl:call-template>
2192
- </xsl:when>
2193
- <xsl:when test="ancestor::*[1][self::mn:th]/@align">
2194
- <!-- <xsl:value-of select="ancestor::*[1][local-name() = 'th']/@align"/> -->
2195
- <xsl:call-template name="setAlignment">
2196
- <xsl:with-param name="align" select="ancestor::*[1][self::mn:th]/@align"/>
2197
- </xsl:call-template>
2198
- </xsl:when>
2199
- <xsl:otherwise>justify</xsl:otherwise>
2200
- </xsl:choose>
2201
- </xsl:attribute>
2165
+ <xsl:element name="{$element-name}">
2166
+ <xsl:copy-of select="xalan:nodeset($p_styles)/styles/@*"/>
2202
2167
 
2203
2168
  <xsl:if test="not(preceding-sibling::*) and parent::mn:li and $doctype = 'service-publication'">
2204
2169
  <fo:inline padding-right="9mm">
@@ -2246,7 +2211,8 @@
2246
2211
  <!-- ====== -->
2247
2212
  <xsl:template match="mn:annex/mn:fmt-title">
2248
2213
  <xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
2249
- <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt" role="H1">
2214
+ <fo:block xsl:use-attribute-sets="annex-title-style">
2215
+ <xsl:call-template name="refine_annex-title-style"/>
2250
2216
  <fo:block>
2251
2217
  <xsl:apply-templates/>
2252
2218
  <xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
@@ -2274,36 +2240,13 @@
2274
2240
 
2275
2241
  <!-- Bibliography -->
2276
2242
  <xsl:template match="mn:references[not(@normative='true')]/mn:fmt-title">
2277
- <xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
2278
- <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt" role="H1">
2279
- <xsl:if test="$doctype = 'implementers-guide'">
2280
- <xsl:attribute name="text-align">left</xsl:attribute>
2281
- <xsl:attribute name="font-size">12pt</xsl:attribute>
2282
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2283
- </xsl:if>
2243
+ <fo:block xsl:use-attribute-sets="references-non-normative-title-style">
2284
2244
  <xsl:apply-templates/>
2285
2245
  </fo:block>
2286
2246
  </xsl:template>
2287
2247
 
2288
2248
  <xsl:template match="mn:fmt-title" name="title">
2289
2249
 
2290
- <xsl:variable name="level">
2291
- <xsl:call-template name="getLevel"/>
2292
- </xsl:variable>
2293
-
2294
- <xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
2295
-
2296
- <xsl:variable name="font-size">
2297
- <xsl:choose>
2298
- <xsl:when test="$level = 1 and $doctype = 'resolution'">14pt</xsl:when>
2299
- <xsl:when test="$doctype = 'service-publication'">11pt</xsl:when>
2300
- <xsl:when test="$level &gt;= 2 and $doctype = 'resolution' and ../@inline-header = 'true'">11pt</xsl:when>
2301
- <xsl:when test="$level = 2">12pt</xsl:when>
2302
- <xsl:when test="$level &gt;= 3">12pt</xsl:when>
2303
- <xsl:otherwise>12pt</xsl:otherwise>
2304
- </xsl:choose>
2305
- </xsl:variable>
2306
-
2307
2250
  <xsl:variable name="element-name">
2308
2251
  <xsl:choose>
2309
2252
  <xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
@@ -2311,49 +2254,13 @@
2311
2254
  </xsl:choose>
2312
2255
  </xsl:variable>
2313
2256
 
2314
- <xsl:variable name="space-before">
2315
- <xsl:choose>
2316
- <xsl:when test="$level = 1 and $doctype = 'service-publication'">12pt</xsl:when>
2317
- <xsl:when test="$level = '' or $level = 1">18pt</xsl:when>
2318
- <xsl:when test="$level = 2">12pt</xsl:when>
2319
- <xsl:otherwise>6pt</xsl:otherwise>
2320
- </xsl:choose>
2321
- </xsl:variable>
2322
-
2323
- <xsl:variable name="space-after">
2324
- <xsl:choose>
2325
- <xsl:when test="$level = 1 and $doctype = 'resolution'">24pt</xsl:when>
2326
- <xsl:when test="$level = 1 and $doctype = 'service-publication'">12pt</xsl:when>
2327
- <xsl:when test="$level = 2">6pt</xsl:when>
2328
- <xsl:otherwise>6pt</xsl:otherwise>
2329
- </xsl:choose>
2330
- </xsl:variable>
2331
-
2332
- <xsl:variable name="text-align">
2333
- <xsl:choose>
2334
- <xsl:when test="$level = 1 and $doctype = 'resolution'">center</xsl:when>
2335
- <xsl:when test="$lang = 'ar'">start</xsl:when>
2336
- <xsl:otherwise>left</xsl:otherwise>
2337
- </xsl:choose>
2257
+ <xsl:variable name="title_styles">
2258
+ <styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template></styles>
2338
2259
  </xsl:variable>
2339
2260
 
2340
2261
  <xsl:element name="{$element-name}">
2341
- <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
2342
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2343
- <xsl:attribute name="text-align"><xsl:value-of select="$text-align"/></xsl:attribute>
2344
- <xsl:attribute name="space-before"><xsl:value-of select="$space-before"/></xsl:attribute>
2345
- <xsl:attribute name="space-after"><xsl:value-of select="$space-after"/></xsl:attribute>
2346
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
2347
- <xsl:if test="$element-name = 'fo:inline'">
2348
- <xsl:attribute name="padding-right">
2349
- <xsl:choose>
2350
- <xsl:when test="$level = 2">9mm</xsl:when>
2351
- <xsl:when test="$level = 3">6.5mm</xsl:when>
2352
- <xsl:otherwise>4mm</xsl:otherwise>
2353
- </xsl:choose>
2354
- </xsl:attribute>
2355
- </xsl:if>
2356
- <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
2262
+ <xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
2263
+
2357
2264
  <xsl:apply-templates/>
2358
2265
  <xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
2359
2266
  </xsl:element>
@@ -2387,27 +2294,16 @@
2387
2294
  </xsl:template>
2388
2295
 
2389
2296
  <xsl:template match="mn:fmt-preferred" priority="2">
2390
- <!-- DEBUG need -->
2391
- <xsl:variable name="level">
2392
- <xsl:call-template name="getLevel"/>
2393
- </xsl:variable>
2394
- <xsl:variable name="levelTerm">
2395
- <xsl:call-template name="getLevelTermName"/>
2396
- </xsl:variable>
2397
- <fo:block space-before="6pt" text-align="justify" role="H{$levelTerm}">
2398
- <fo:inline padding-right="5mm" font-weight="bold">
2399
- <!-- level=<xsl:value-of select="$level"/> -->
2400
- <xsl:attribute name="padding-right">
2401
- <xsl:choose>
2402
- <xsl:when test="$level = 4">2mm</xsl:when>
2403
- <xsl:when test="$level = 3">4mm</xsl:when>
2404
- <xsl:otherwise>5mm</xsl:otherwise>
2405
- </xsl:choose>
2406
- </xsl:attribute>
2297
+ <fo:block xsl:use-attribute-sets="term-preferred-block-style">
2298
+ <xsl:call-template name="refine_term-preferred-block-style"/>
2299
+
2300
+ <fo:inline xsl:use-attribute-sets="term-number-style">
2301
+ <xsl:call-template name="refine_term-number-style"/>
2302
+
2407
2303
  <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
2408
2304
  </fo:inline>
2409
- <fo:inline font-weight="bold">
2410
- <xsl:call-template name="refine_preferred-term-style"/>
2305
+ <fo:inline xsl:use-attribute-sets="term-preferred-style">
2306
+ <xsl:call-template name="refine_term-preferred-style"/>
2411
2307
  <xsl:apply-templates/>
2412
2308
  </fo:inline>
2413
2309
  <xsl:if test="../mn:fmt-termsource">
@@ -2624,7 +2520,7 @@
2624
2520
  </xsl:if>
2625
2521
  </xsl:if>
2626
2522
 
2627
- <fo:block-container margin-left="0mm" margin-right="0mm">
2523
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
2628
2524
  <fo:block>
2629
2525
 
2630
2526
  <xsl:apply-templates select="node()[not(self::mn:note)]"/>
@@ -2827,91 +2723,109 @@
2827
2723
  </xsl:template> -->
2828
2724
 
2829
2725
  <xsl:template name="insertHeaderFooter">
2726
+ <xsl:param name="doctype"/>
2830
2727
  <xsl:param name="footer-text"/>
2831
- <fo:static-content flow-name="footer-even" font-family="Times New Roman" font-size="11pt" role="artifact">
2832
- <fo:block-container height="19mm" display-align="after">
2833
- <fo:table table-layout="fixed" width="100%" display-align="after">
2834
- <fo:table-column column-width="10%"/>
2835
- <fo:table-column column-width="90%"/>
2836
- <fo:table-body>
2837
- <fo:table-row>
2838
- <fo:table-cell text-align="start" padding-bottom="8mm">
2839
- <fo:block><fo:page-number/></fo:block>
2840
- </fo:table-cell>
2841
- <fo:table-cell font-weight="bold" text-align="start" padding-bottom="8mm">
2842
- <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2843
- </fo:table-cell>
2844
- </fo:table-row>
2845
- </fo:table-body>
2846
- </fo:table>
2847
- </fo:block-container>
2848
- </fo:static-content>
2849
- <fo:static-content flow-name="footer-odd" font-family="Times New Roman" font-size="11pt" role="artifact">
2850
- <fo:block-container height="19mm" display-align="after">
2851
- <fo:table table-layout="fixed" width="100%" display-align="after">
2852
- <fo:table-column column-width="90%"/>
2853
- <fo:table-column column-width="10%"/>
2854
- <fo:table-body>
2855
- <fo:table-row>
2856
- <fo:table-cell font-weight="bold" text-align="end" padding-bottom="8mm">
2857
- <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2858
- </fo:table-cell>
2859
- <fo:table-cell text-align="end" padding-bottom="8mm" padding-right="2mm">
2860
- <fo:block><fo:page-number/></fo:block>
2861
- </fo:table-cell>
2862
- </fo:table-row>
2863
- </fo:table-body>
2864
- </fo:table>
2865
- </fo:block-container>
2866
- </fo:static-content>
2728
+
2729
+ <xsl:call-template name="insertHeader"/>
2730
+
2731
+ <xsl:call-template name="insertFooter">
2732
+ <xsl:with-param name="doctype" select="$doctype"/>
2733
+ <xsl:with-param name="footer-text" select="$footer-text"/>
2734
+ </xsl:call-template>
2867
2735
  </xsl:template>
2868
2736
 
2869
- <xsl:template name="insertHeaderFooterSP">
2737
+ <xsl:template name="insertHeader">
2738
+ </xsl:template>
2739
+
2740
+ <xsl:template name="insertFooter">
2741
+ <xsl:param name="doctype"/>
2870
2742
  <xsl:param name="footer-text"/>
2871
- <fo:static-content flow-name="footer-even" role="artifact">
2872
- <fo:block-container height="20mm">
2873
- <fo:table table-layout="fixed" width="100%" margin-top="3mm">
2874
- <fo:table-column column-width="proportional-column-width(2)"/>
2875
- <fo:table-column column-width="proportional-column-width(2)"/>
2876
- <fo:table-column column-width="proportional-column-width(2)"/>
2877
- <fo:table-body>
2878
- <fo:table-row>
2879
- <fo:table-cell text-align="start" font-size="10pt" display-align="center">
2880
- <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2881
- </fo:table-cell>
2882
- <fo:table-cell text-align="center">
2883
- <fo:block>– <fo:page-number/> –</fo:block>
2884
- </fo:table-cell>
2885
- <fo:table-cell>
2886
- <fo:block> </fo:block>
2887
- </fo:table-cell>
2888
- </fo:table-row>
2889
- </fo:table-body>
2890
- </fo:table>
2891
- </fo:block-container>
2892
- </fo:static-content>
2893
- <fo:static-content flow-name="footer-odd" role="artifact">
2894
- <fo:block-container height="20mm">
2895
- <fo:table table-layout="fixed" width="100%" margin-top="3mm">
2896
- <fo:table-column column-width="proportional-column-width(2)"/>
2897
- <fo:table-column column-width="proportional-column-width(2)"/>
2898
- <fo:table-column column-width="proportional-column-width(2)"/>
2899
- <fo:table-body>
2900
- <fo:table-row>
2901
- <fo:table-cell text-align="start" font-size="10pt" display-align="center">
2902
- <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2903
- </fo:table-cell>
2904
- <fo:table-cell text-align="center">
2905
- <fo:block>– <fo:page-number/> –</fo:block>
2906
- </fo:table-cell>
2907
- <fo:table-cell>
2908
- <fo:block> </fo:block>
2909
- </fo:table-cell>
2910
- </fo:table-row>
2911
- </fo:table-body>
2912
- </fo:table>
2913
- </fo:block-container>
2914
- </fo:static-content>
2743
+ <xsl:choose>
2744
+ <xsl:when test="$doctype = 'service-publication'">
2745
+ <fo:static-content flow-name="footer-even" role="artifact">
2746
+ <fo:block-container height="20mm">
2747
+ <fo:table table-layout="fixed" width="100%" margin-top="3mm">
2748
+ <fo:table-column column-width="proportional-column-width(2)"/>
2749
+ <fo:table-column column-width="proportional-column-width(2)"/>
2750
+ <fo:table-column column-width="proportional-column-width(2)"/>
2751
+ <fo:table-body>
2752
+ <fo:table-row>
2753
+ <fo:table-cell text-align="start" font-size="10pt" display-align="center">
2754
+ <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2755
+ </fo:table-cell>
2756
+ <fo:table-cell text-align="center">
2757
+ <fo:block>– <fo:page-number/> –</fo:block>
2758
+ </fo:table-cell>
2759
+ <fo:table-cell>
2760
+ <fo:block> </fo:block>
2761
+ </fo:table-cell>
2762
+ </fo:table-row>
2763
+ </fo:table-body>
2764
+ </fo:table>
2765
+ </fo:block-container>
2766
+ </fo:static-content>
2767
+ <fo:static-content flow-name="footer-odd" role="artifact">
2768
+ <fo:block-container height="20mm">
2769
+ <fo:table table-layout="fixed" width="100%" margin-top="3mm">
2770
+ <fo:table-column column-width="proportional-column-width(2)"/>
2771
+ <fo:table-column column-width="proportional-column-width(2)"/>
2772
+ <fo:table-column column-width="proportional-column-width(2)"/>
2773
+ <fo:table-body>
2774
+ <fo:table-row>
2775
+ <fo:table-cell text-align="start" font-size="10pt" display-align="center">
2776
+ <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2777
+ </fo:table-cell>
2778
+ <fo:table-cell text-align="center">
2779
+ <fo:block>– <fo:page-number/> –</fo:block>
2780
+ </fo:table-cell>
2781
+ <fo:table-cell>
2782
+ <fo:block> </fo:block>
2783
+ </fo:table-cell>
2784
+ </fo:table-row>
2785
+ </fo:table-body>
2786
+ </fo:table>
2787
+ </fo:block-container>
2788
+ </fo:static-content>
2789
+ </xsl:when>
2790
+ <xsl:otherwise>
2791
+ <fo:static-content flow-name="footer-even" font-family="Times New Roman" font-size="11pt" role="artifact">
2792
+ <fo:block-container height="19mm" display-align="after">
2793
+ <fo:table table-layout="fixed" width="100%" display-align="after">
2794
+ <fo:table-column column-width="10%"/>
2795
+ <fo:table-column column-width="90%"/>
2796
+ <fo:table-body>
2797
+ <fo:table-row>
2798
+ <fo:table-cell text-align="start" padding-bottom="8mm">
2799
+ <fo:block><fo:page-number/></fo:block>
2800
+ </fo:table-cell>
2801
+ <fo:table-cell font-weight="bold" text-align="start" padding-bottom="8mm">
2802
+ <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2803
+ </fo:table-cell>
2804
+ </fo:table-row>
2805
+ </fo:table-body>
2806
+ </fo:table>
2807
+ </fo:block-container>
2808
+ </fo:static-content>
2809
+ <fo:static-content flow-name="footer-odd" font-family="Times New Roman" font-size="11pt" role="artifact">
2810
+ <fo:block-container height="19mm" display-align="after">
2811
+ <fo:table table-layout="fixed" width="100%" display-align="after">
2812
+ <fo:table-column column-width="90%"/>
2813
+ <fo:table-column column-width="10%"/>
2814
+ <fo:table-body>
2815
+ <fo:table-row>
2816
+ <fo:table-cell font-weight="bold" text-align="end" padding-bottom="8mm">
2817
+ <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2818
+ </fo:table-cell>
2819
+ <fo:table-cell text-align="end" padding-bottom="8mm" padding-right="2mm">
2820
+ <fo:block><fo:page-number/></fo:block>
2821
+ </fo:table-cell>
2822
+ </fo:table-row>
2823
+ </fo:table-body>
2824
+ </fo:table>
2825
+ </fo:block-container>
2826
+ </fo:static-content>
2827
+ </xsl:otherwise>
2828
+ </xsl:choose>
2915
2829
  </xsl:template>
2916
2830
 
2917
2831
  <xsl:variable name="Image-Fond-Rec">
@@ -5074,6 +4988,10 @@
5074
4988
  </xsl:element>
5075
4989
  </xsl:template>
5076
4990
 
4991
+ <!-- show sourcecode's name 'before' or 'after' source code -->
4992
+ <xsl:variable name="sourcecode-name-position"><xsl:text>after</xsl:text>
4993
+ </xsl:variable>
4994
+
5077
4995
  <xsl:template match="mn:sourcecode" name="sourcecode">
5078
4996
 
5079
4997
  <xsl:variable name="sourcecode_attributes">
@@ -5097,7 +5015,12 @@
5097
5015
 
5098
5016
  <xsl:call-template name="refine_sourcecode-container-style"/>
5099
5017
 
5100
- <fo:block-container margin-left="0mm" role="SKIP">
5018
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
5019
+
5020
+ <!-- <xsl:if test="$namespace = 'rsd'"> -->
5021
+ <xsl:if test="$sourcecode-name-position = 'before'">
5022
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
5023
+ </xsl:if>
5101
5024
 
5102
5025
  <fo:block xsl:use-attribute-sets="sourcecode-style">
5103
5026
 
@@ -5119,7 +5042,16 @@
5119
5042
  </fo:block>
5120
5043
 
5121
5044
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
5122
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
5045
+
5046
+ <!-- <xsl:choose>
5047
+ <xsl:when test="$namespace = 'rsd'"></xsl:when>
5048
+ <xsl:otherwise>
5049
+ <xsl:apply-templates select="mn:fmt-name" /> --><!-- show sourcecode's name AFTER content -->
5050
+ <!-- </xsl:otherwise>
5051
+ </xsl:choose> -->
5052
+ <xsl:if test="$sourcecode-name-position = 'after'">
5053
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
5054
+ </xsl:if>
5123
5055
 
5124
5056
  </fo:block-container>
5125
5057
  </fo:block-container>
@@ -6377,83 +6309,96 @@
6377
6309
  <xsl:template name="refine_term-style">
6378
6310
  </xsl:template>
6379
6311
 
6380
- <xsl:attribute-set name="term-name-style">
6312
+ <xsl:attribute-set name="term-number-style">
6381
6313
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6382
6314
  <xsl:attribute name="font-weight">bold</xsl:attribute>
6315
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
6383
6316
  </xsl:attribute-set> <!-- term-name-style -->
6384
6317
 
6385
- <xsl:template name="refine_term-name-style">
6386
- </xsl:template>
6387
-
6388
- <xsl:attribute-set name="preferred-style">
6389
- </xsl:attribute-set> <!-- preferred-style -->
6390
-
6391
- <xsl:template name="refine_preferred-style">
6318
+ <xsl:template name="refine_term-number-style">
6319
+ <xsl:variable name="level">
6320
+ <xsl:call-template name="getLevel"/>
6321
+ </xsl:variable>
6322
+ <!-- level=<xsl:value-of select="$level"/> -->
6323
+ <xsl:attribute name="padding-right">
6324
+ <xsl:choose>
6325
+ <xsl:when test="$level = 4">2mm</xsl:when>
6326
+ <xsl:when test="$level = 3">4mm</xsl:when>
6327
+ <xsl:otherwise>5mm</xsl:otherwise>
6328
+ </xsl:choose>
6329
+ </xsl:attribute>
6392
6330
  </xsl:template>
6393
6331
 
6394
- <xsl:attribute-set name="preferred-block-style">
6332
+ <xsl:attribute-set name="term-preferred-block-style">
6333
+ <xsl:attribute name="space-before">6pt</xsl:attribute>
6334
+ <xsl:attribute name="text-align">justify</xsl:attribute>
6395
6335
  </xsl:attribute-set> <!-- preferred-block-style -->
6396
6336
 
6397
- <xsl:template name="refine_preferred-block-style">
6337
+ <xsl:template name="refine_term-preferred-block-style">
6338
+ <xsl:variable name="levelTerm">
6339
+ <xsl:call-template name="getLevelTermName"/>
6340
+ </xsl:variable>
6341
+ <xsl:attribute name="role">H<xsl:value-of select="$levelTerm"/></xsl:attribute>
6398
6342
  </xsl:template>
6399
6343
 
6400
- <xsl:attribute-set name="preferred-term-style">
6344
+ <xsl:attribute-set name="term-preferred-style">
6401
6345
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6402
6346
  <xsl:attribute name="font-weight">bold</xsl:attribute>
6347
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6403
6348
  </xsl:attribute-set> <!-- preferred-term-style -->
6404
6349
 
6405
- <xsl:template name="refine_preferred-term-style">
6350
+ <xsl:template name="refine_term-preferred-style">
6406
6351
  <xsl:if test="mn:strong">
6407
6352
  <xsl:attribute name="font-weight">normal</xsl:attribute>
6408
6353
  </xsl:if>
6409
6354
  </xsl:template>
6410
6355
 
6411
- <xsl:attribute-set name="domain-style">
6412
- </xsl:attribute-set> <!-- domain-style -->
6356
+ <xsl:attribute-set name="term-domain-style">
6357
+ </xsl:attribute-set> <!-- term-domain-style -->
6413
6358
 
6414
- <xsl:template name="refine_domain-style">
6359
+ <xsl:template name="refine_term-domain-style">
6415
6360
  </xsl:template>
6416
6361
 
6417
- <xsl:attribute-set name="admitted-style">
6418
- </xsl:attribute-set> <!-- admitted-style -->
6362
+ <xsl:attribute-set name="term-admitted-style">
6363
+ </xsl:attribute-set> <!-- term-admitted-style -->
6419
6364
 
6420
- <xsl:template name="refine_admitted-style">
6365
+ <xsl:template name="refine_term-admitted-style">
6421
6366
  </xsl:template>
6422
6367
 
6423
- <xsl:attribute-set name="deprecates-style">
6424
- </xsl:attribute-set> <!-- deprecates-style -->
6368
+ <xsl:attribute-set name="term-deprecates-style">
6369
+ </xsl:attribute-set> <!-- term-deprecates-style -->
6425
6370
 
6426
- <xsl:template name="refine_deprecates-style">
6371
+ <xsl:template name="refine_term-deprecates-style">
6427
6372
  </xsl:template>
6428
6373
 
6429
- <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
6374
+ <xsl:attribute-set name="term-related-block-style" use-attribute-sets="term-preferred-block-style">
6430
6375
  </xsl:attribute-set>
6431
6376
 
6432
- <xsl:template name="refine_related-block-style">
6377
+ <xsl:template name="refine_term-related-block-style">
6433
6378
  </xsl:template>
6434
6379
 
6435
- <xsl:attribute-set name="definition-style">
6436
- </xsl:attribute-set> <!-- definition-style -->
6380
+ <xsl:attribute-set name="term-definition-style">
6381
+ </xsl:attribute-set> <!-- term-definition-style -->
6437
6382
 
6438
- <xsl:template name="refine_definition-style">
6383
+ <xsl:template name="refine_term-definition-style">
6439
6384
  </xsl:template>
6440
6385
 
6441
- <xsl:attribute-set name="termsource-style">
6442
- </xsl:attribute-set> <!-- termsource-style -->
6386
+ <xsl:attribute-set name="term-termsource-style">
6387
+ </xsl:attribute-set> <!-- term-termsource-style -->
6443
6388
 
6444
- <xsl:template name="refine_termsource-style">
6445
- </xsl:template> <!-- refine_termsource-style -->
6389
+ <xsl:template name="refine_term-termsource-style">
6390
+ </xsl:template> <!-- refine_term-termsource-style -->
6446
6391
 
6447
- <xsl:attribute-set name="termsource-text-style">
6448
- </xsl:attribute-set> <!-- termsource-text-style -->
6392
+ <xsl:attribute-set name="term-termsource-text-style">
6393
+ </xsl:attribute-set> <!-- term-termsource-text-style -->
6449
6394
 
6450
- <xsl:template name="refine_termsource-text-style">
6395
+ <xsl:template name="refine_term-termsource-text-style">
6451
6396
  </xsl:template>
6452
6397
 
6453
- <xsl:attribute-set name="origin-style">
6454
- </xsl:attribute-set> <!-- origin-style -->
6398
+ <xsl:attribute-set name="term-origin-style">
6399
+ </xsl:attribute-set> <!-- term-origin-style -->
6455
6400
 
6456
- <xsl:template name="refine_origin-style">
6401
+ <xsl:template name="refine_term-origin-style">
6457
6402
  </xsl:template>
6458
6403
 
6459
6404
  <!-- ====== -->
@@ -6497,9 +6442,9 @@
6497
6442
  <!-- modification -->
6498
6443
  <!-- ====== -->
6499
6444
  <xsl:template match="mn:fmt-termsource" name="termsource">
6500
- <fo:block xsl:use-attribute-sets="termsource-style">
6445
+ <fo:block xsl:use-attribute-sets="term-termsource-style">
6501
6446
 
6502
- <xsl:call-template name="refine_termsource-style"/>
6447
+ <xsl:call-template name="refine_term-termsource-style"/>
6503
6448
 
6504
6449
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
6505
6450
  <xsl:variable name="termsource_text">
@@ -6547,8 +6492,8 @@
6547
6492
 
6548
6493
  <!-- text SOURCE: -->
6549
6494
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
6550
- <fo:inline xsl:use-attribute-sets="termsource-text-style">
6551
- <xsl:call-template name="refine_termsource-text-style"/>
6495
+ <fo:inline xsl:use-attribute-sets="term-termsource-text-style">
6496
+ <xsl:call-template name="refine_term-termsource-text-style"/>
6552
6497
  <xsl:value-of select="."/>
6553
6498
  </fo:inline>
6554
6499
  </xsl:template>
@@ -6560,8 +6505,8 @@
6560
6505
  <xsl:if test="normalize-space(@citeas) = ''">
6561
6506
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
6562
6507
  </xsl:if>
6563
- <fo:inline xsl:use-attribute-sets="origin-style">
6564
- <xsl:call-template name="refine_origin-style"/>
6508
+ <fo:inline xsl:use-attribute-sets="term-origin-style">
6509
+ <xsl:call-template name="refine_term-origin-style"/>
6565
6510
  <xsl:apply-templates/>
6566
6511
  </fo:inline>
6567
6512
  </fo:basic-link>
@@ -6609,14 +6554,14 @@
6609
6554
  <xsl:variable name="levelTerm">
6610
6555
  <xsl:call-template name="getLevelTermName"/>
6611
6556
  </xsl:variable>
6612
- <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
6557
+ <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="term-preferred-block-style">
6613
6558
 
6614
- <xsl:call-template name="refine_preferred-block-style"/>
6559
+ <xsl:call-template name="refine_term-preferred-block-style"/>
6615
6560
 
6616
6561
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
6617
6562
 
6618
- <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
6619
- <xsl:call-template name="refine_term-name-style"/>
6563
+ <fo:block xsl:use-attribute-sets="term-number-style" role="SKIP">
6564
+ <xsl:call-template name="refine_term-number-style"/>
6620
6565
 
6621
6566
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
6622
6567
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -6626,8 +6571,8 @@
6626
6571
  </fo:block>
6627
6572
  </xsl:if>
6628
6573
 
6629
- <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
6630
- <xsl:call-template name="refine_preferred-term-style"/>
6574
+ <fo:block xsl:use-attribute-sets="term-preferred-style" role="SKIP">
6575
+ <xsl:call-template name="refine_term-preferred-style"/>
6631
6576
 
6632
6577
  <xsl:apply-templates/>
6633
6578
  </fo:block>
@@ -6647,15 +6592,15 @@
6647
6592
  <xsl:template match="mn:domain"/>
6648
6593
 
6649
6594
  <xsl:template match="mn:fmt-admitted">
6650
- <fo:block xsl:use-attribute-sets="admitted-style">
6651
- <xsl:call-template name="refine_admitted-style"/>
6595
+ <fo:block xsl:use-attribute-sets="term-admitted-style">
6596
+ <xsl:call-template name="refine_term-admitted-style"/>
6652
6597
  <xsl:apply-templates/>
6653
6598
  </fo:block>
6654
6599
  </xsl:template>
6655
6600
 
6656
6601
  <xsl:template match="mn:fmt-deprecates">
6657
- <fo:block xsl:use-attribute-sets="deprecates-style">
6658
- <xsl:call-template name="refine_deprecates-style"/>
6602
+ <fo:block xsl:use-attribute-sets="term-deprecates-style">
6603
+ <xsl:call-template name="refine_term-deprecates-style"/>
6659
6604
  <xsl:apply-templates/>
6660
6605
  </fo:block>
6661
6606
  </xsl:template>
@@ -6668,8 +6613,8 @@
6668
6613
  <!-- End Preferred, admitted, deprecated -->
6669
6614
 
6670
6615
  <xsl:template match="mn:fmt-related">
6671
- <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
6672
- <xsl:call-template name="refine_related-block-style"/>
6616
+ <fo:block role="SKIP" xsl:use-attribute-sets="term-related-block-style">
6617
+ <xsl:call-template name="refine_term-related-block-style"/>
6673
6618
  <xsl:apply-templates/>
6674
6619
  </fo:block>
6675
6620
  </xsl:template>
@@ -6683,8 +6628,8 @@
6683
6628
  <!-- definition -->
6684
6629
  <!-- ========== -->
6685
6630
  <xsl:template match="mn:fmt-definition">
6686
- <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
6687
- <xsl:call-template name="refine_definition-style"/>
6631
+ <fo:block xsl:use-attribute-sets="term-definition-style" role="SKIP">
6632
+ <xsl:call-template name="refine_term-definition-style"/>
6688
6633
  <xsl:apply-templates/>
6689
6634
  </fo:block>
6690
6635
  </xsl:template>
@@ -10987,6 +10932,10 @@
10987
10932
  <!-- image -->
10988
10933
  <!-- ====== -->
10989
10934
 
10935
+ <!-- show figure's name 'before' or 'after' image -->
10936
+ <xsl:variable name="figure-name-position"><xsl:text>after</xsl:text>
10937
+ </xsl:variable>
10938
+
10990
10939
  <xsl:template match="mn:figure" name="figure">
10991
10940
  <xsl:variable name="isAdded" select="@added"/>
10992
10941
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -10999,6 +10948,10 @@
10999
10948
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
11000
10949
  </xsl:call-template>
11001
10950
 
10951
+ <xsl:if test="$figure-name-position = 'before'"> <!-- show figure's name BEFORE image -->
10952
+ <xsl:apply-templates select="mn:fmt-name"/>
10953
+ </xsl:if>
10954
+
11002
10955
  <!-- Example: Dimensions in millimeters -->
11003
10956
  <xsl:apply-templates select="mn:note[@type = 'units']"/>
11004
10957
 
@@ -11019,7 +10972,16 @@
11019
10972
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
11020
10973
  <xsl:call-template name="showFigureKey"/>
11021
10974
  </xsl:if>
11022
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
10975
+
10976
+ <!-- <xsl:choose>
10977
+ <xsl:when test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'rsd'"></xsl:when>
10978
+ <xsl:otherwise>
10979
+ <xsl:apply-templates select="mn:fmt-name" /> --> <!-- show figure's name AFTER image -->
10980
+ <!-- </xsl:otherwise>
10981
+ </xsl:choose> -->
10982
+ <xsl:if test="$figure-name-position = 'after'">
10983
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
10984
+ </xsl:if>
11023
10985
 
11024
10986
  </fo:block-container>
11025
10987
  </xsl:template>
@@ -13105,10 +13067,20 @@
13105
13067
  <!-- ================ -->
13106
13068
 
13107
13069
  <xsl:attribute-set name="references-non-normative-title-style">
13070
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
13071
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
13072
+ <xsl:attribute name="text-align">center</xsl:attribute>
13073
+ <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
13074
+ <xsl:attribute name="role">H1</xsl:attribute>
13108
13075
  </xsl:attribute-set>
13109
13076
 
13110
13077
  <xsl:template name="refine_references-non-normative-title-style">
13111
-
13078
+ <xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
13079
+ <xsl:if test="$doctype = 'implementers-guide'">
13080
+ <xsl:attribute name="text-align">left</xsl:attribute>
13081
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
13082
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13083
+ </xsl:if>
13112
13084
  </xsl:template>
13113
13085
 
13114
13086
  <!-- bibitem in Normative References (references/@normative="true") -->
@@ -15224,7 +15196,12 @@
15224
15196
  <!-- ===================================== -->
15225
15197
 
15226
15198
  <xsl:attribute-set name="annex-title-style">
15227
- </xsl:attribute-set>
15199
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
15200
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
15201
+ <xsl:attribute name="text-align">center</xsl:attribute>
15202
+ <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
15203
+ <xsl:attribute name="role">H1</xsl:attribute>
15204
+ </xsl:attribute-set> <!-- annex-title-style -->
15228
15205
 
15229
15206
  <xsl:template name="refine_annex-title-style">
15230
15207
  </xsl:template>
@@ -15235,6 +15212,110 @@
15235
15212
  <xsl:template name="refine_p-zzSTDTitle1-style">
15236
15213
  </xsl:template>
15237
15214
 
15215
+ <xsl:attribute-set name="p-style">
15216
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
15217
+ </xsl:attribute-set> <!-- p-style -->
15218
+
15219
+ <xsl:template name="refine_p-style">
15220
+ <xsl:param name="element-name"/>
15221
+ <xsl:param name="margin"/>
15222
+ <xsl:call-template name="setKeepAttributes"/>
15223
+
15224
+ <xsl:if test="@class='supertitle'">
15225
+ <xsl:attribute name="space-before">36pt</xsl:attribute>
15226
+ <xsl:attribute name="margin-bottom">24pt</xsl:attribute>
15227
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
15228
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
15229
+ </xsl:if>
15230
+ <xsl:attribute name="text-align">
15231
+ <xsl:choose>
15232
+ <xsl:when test="@class='supertitle'">center</xsl:when>
15233
+ <!-- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when> -->
15234
+ <xsl:when test="@align"><xsl:call-template name="setAlignment"/></xsl:when>
15235
+ <xsl:when test="ancestor::*[1][self::mn:td]/@align">
15236
+ <!-- <xsl:value-of select="ancestor::*[1][local-name() = 'td']/@align"/> -->
15237
+ <xsl:call-template name="setAlignment">
15238
+ <xsl:with-param name="align" select="ancestor::*[1][self::mn:td]/@align"/>
15239
+ </xsl:call-template>
15240
+ </xsl:when>
15241
+ <xsl:when test="ancestor::*[1][self::mn:th]/@align">
15242
+ <!-- <xsl:value-of select="ancestor::*[1][local-name() = 'th']/@align"/> -->
15243
+ <xsl:call-template name="setAlignment">
15244
+ <xsl:with-param name="align" select="ancestor::*[1][self::mn:th]/@align"/>
15245
+ </xsl:call-template>
15246
+ </xsl:when>
15247
+ <xsl:otherwise>justify</xsl:otherwise>
15248
+ </xsl:choose>
15249
+ </xsl:attribute>
15250
+ <!-- $namespace = 'itu' -->
15251
+
15252
+ </xsl:template> <!-- refine_p-style -->
15253
+
15254
+ <xsl:attribute-set name="title-style">
15255
+ <!-- Note: font-size for level 1 title -->
15256
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
15257
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
15258
+ <xsl:attribute name="text-align">left</xsl:attribute>
15259
+ <xsl:attribute name="space-before">18pt</xsl:attribute>
15260
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
15261
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
15262
+ </xsl:attribute-set> <!-- title-style -->
15263
+
15264
+ <xsl:template name="refine_title-style">
15265
+ <xsl:param name="element-name"/>
15266
+ <xsl:variable name="level">
15267
+ <xsl:call-template name="getLevel"/>
15268
+ </xsl:variable>
15269
+ <xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
15270
+
15271
+ <xsl:if test="$level = 1">
15272
+ <xsl:if test="$doctype = 'resolution'">
15273
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
15274
+ <xsl:attribute name="text-align">center</xsl:attribute>
15275
+ <xsl:attribute name="space-after">24pt</xsl:attribute>
15276
+ </xsl:if>
15277
+ <xsl:if test="$doctype = 'service-publication'">
15278
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
15279
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
15280
+ </xsl:if>
15281
+ </xsl:if>
15282
+
15283
+ <xsl:if test="$level = 2">
15284
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
15285
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
15286
+ </xsl:if>
15287
+
15288
+ <xsl:if test="$level &gt;= 2">
15289
+ <xsl:if test="$doctype = 'resolution' and ../@inline-header = 'true'">
15290
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
15291
+ </xsl:if>
15292
+ </xsl:if>
15293
+
15294
+ <xsl:if test="$level &gt;= 3">
15295
+ <xsl:attribute name="space-before">6pt</xsl:attribute>
15296
+ </xsl:if>
15297
+
15298
+ <xsl:if test="$doctype = 'service-publication'">
15299
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
15300
+ </xsl:if>
15301
+
15302
+ <xsl:if test="$lang = 'ar'">
15303
+ <xsl:attribute name="text-align">start</xsl:attribute>
15304
+ </xsl:if>
15305
+
15306
+ <xsl:if test="$element-name = 'fo:inline'">
15307
+ <xsl:attribute name="padding-right">
15308
+ <xsl:choose>
15309
+ <xsl:when test="$level = 2">9mm</xsl:when>
15310
+ <xsl:when test="$level = 3">6.5mm</xsl:when>
15311
+ <xsl:otherwise>4mm</xsl:otherwise>
15312
+ </xsl:choose>
15313
+ </xsl:attribute>
15314
+ </xsl:if>
15315
+ <!-- $namespace = 'itu' -->
15316
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
15317
+ </xsl:template> <!-- refine_title-style -->
15318
+
15238
15319
  <xsl:template name="processPrefaceSectionsDefault">
15239
15320
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
15240
15321
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -15573,6 +15654,12 @@
15573
15654
  </xsl:choose>
15574
15655
  </xsl:template>
15575
15656
 
15657
+ <xsl:attribute-set name="reset-margins-style">
15658
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
15659
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
15660
+ <xsl:attribute name="role">SKIP</xsl:attribute>
15661
+ </xsl:attribute-set>
15662
+
15576
15663
  <xsl:attribute-set name="clause-style">
15577
15664
 
15578
15665
  </xsl:attribute-set>
@@ -16593,8 +16680,9 @@
16593
16680
 
16594
16681
  <xsl:template name="setTextAlignment">
16595
16682
  <xsl:param name="default">left</xsl:param>
16683
+ <xsl:param name="skip_default">false</xsl:param>
16596
16684
  <xsl:variable name="align" select="normalize-space(@align)"/>
16597
- <xsl:attribute name="text-align">
16685
+ <xsl:variable name="text_align">
16598
16686
  <xsl:choose>
16599
16687
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
16600
16688
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
@@ -16602,9 +16690,13 @@
16602
16690
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
16603
16691
  <xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
16604
16692
  <xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
16693
+ <xsl:when test="$skip_default = 'true'"/>
16605
16694
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
16606
16695
  </xsl:choose>
16607
- </xsl:attribute>
16696
+ </xsl:variable>
16697
+ <xsl:if test="normalize-space($text_align) != ''">
16698
+ <xsl:attribute name="text-align"><xsl:value-of select="$text_align"/></xsl:attribute>
16699
+ </xsl:if>
16608
16700
  <xsl:if test="$align = 'indent'">
16609
16701
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
16610
16702
  </xsl:if>
@@ -16612,8 +16704,10 @@
16612
16704
 
16613
16705
  <xsl:template name="setBlockAttributes">
16614
16706
  <xsl:param name="text_align_default">left</xsl:param>
16707
+ <xsl:param name="skip_text_align_default">false</xsl:param>
16615
16708
  <xsl:call-template name="setTextAlignment">
16616
16709
  <xsl:with-param name="default" select="$text_align_default"/>
16710
+ <xsl:with-param name="skip_default" select="$skip_text_align_default"/>
16617
16711
  </xsl:call-template>
16618
16712
  <xsl:call-template name="setKeepAttributes"/>
16619
16713
  <xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
@@ -16656,6 +16750,20 @@
16656
16750
  </fo:block-container>
16657
16751
  </xsl:template>
16658
16752
 
16753
+ <!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
16754
+ <xsl:template name="insertCoverPageFullImage">
16755
+ <xsl:param name="name">coverpage-image</xsl:param>
16756
+ <xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image">
16757
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
16758
+ <fo:flow flow-name="xsl-region-body">
16759
+ <xsl:call-template name="insertBackgroundPageImage">
16760
+ <xsl:with-param name="number" select="position()"/>
16761
+ </xsl:call-template>
16762
+ </fo:flow>
16763
+ </fo:page-sequence>
16764
+ </xsl:for-each>
16765
+ </xsl:template>
16766
+
16659
16767
  <xsl:template name="insertPageImage">
16660
16768
  <xsl:param name="svg_content_height" select="$pageHeight"/>
16661
16769
  <xsl:param name="bitmap_width" select="$pageWidth"/>