metanorma-itu 2.7.5 → 2.7.7

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.
@@ -326,6 +326,10 @@
326
326
  <xsl:with-param name="num" select="$num"/>
327
327
  </xsl:call-template>
328
328
 
329
+ <xsl:call-template name="inner-cover-page">
330
+ <xsl:with-param name="num" select="$num"/>
331
+ </xsl:call-template>
332
+
329
333
  <!-- <xsl:for-each select="xalan:nodeset($updated_xml)/*"> -->
330
334
 
331
335
  <!-- <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma">
@@ -371,18 +375,10 @@
371
375
  <xsl:attribute name="initial-page-number">1</xsl:attribute>
372
376
  </xsl:if>
373
377
 
374
- <xsl:choose>
375
- <xsl:when test="$doctype = 'service-publication'">
376
- <xsl:call-template name="insertHeaderFooterSP">
377
- <xsl:with-param name="footer-text" select="$footer-text"/>
378
- </xsl:call-template>
379
- </xsl:when>
380
- <xsl:otherwise>
381
- <xsl:call-template name="insertHeaderFooter">
382
- <xsl:with-param name="footer-text" select="$footer-text"/>
383
- </xsl:call-template>
384
- </xsl:otherwise>
385
- </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>
386
382
 
387
383
  <fo:flow flow-name="xsl-region-body">
388
384
 
@@ -494,18 +490,10 @@
494
490
 
495
491
  <xsl:call-template name="insertFootnoteSeparatorCommon"/>
496
492
 
497
- <xsl:choose>
498
- <xsl:when test="$doctype = 'service-publication'">
499
- <xsl:call-template name="insertHeaderFooterSP">
500
- <xsl:with-param name="footer-text" select="$footer-text"/>
501
- </xsl:call-template>
502
- </xsl:when>
503
- <xsl:otherwise>
504
- <xsl:call-template name="insertHeaderFooter">
505
- <xsl:with-param name="footer-text" select="$footer-text"/>
506
- </xsl:call-template>
507
- </xsl:otherwise>
508
- </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>
509
497
 
510
498
  <fo:flow flow-name="xsl-region-body">
511
499
 
@@ -588,6 +576,8 @@
588
576
  </xsl:for-each>
589
577
  </xsl:for-each>
590
578
 
579
+ <xsl:call-template name="back-page"/>
580
+
591
581
  </fo:root>
592
582
  </xsl:template>
593
583
 
@@ -699,6 +689,10 @@
699
689
  <!-- ============================================= -->
700
690
 
701
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
+
702
696
  <xsl:when test="$layoutVersion = '2023'">
703
697
  <!-- cover page, version 2023 -->
704
698
  <fo:page-sequence force-page-count="no-force" master-reference="cover-page_2023" writing-mode="lr-tb" font-family="Arial" font-size="12pt">
@@ -1072,24 +1066,6 @@
1072
1066
  </fo:block-container>
1073
1067
  </fo:flow>
1074
1068
  </fo:page-sequence>
1075
- <!-- Second cover page -->
1076
- <xsl:variable name="secondCoverPageData_">
1077
- <xsl:call-template name="insertBackgroundPageImage">
1078
- <xsl:with-param name="number">2</xsl:with-param>
1079
- </xsl:call-template>
1080
- </xsl:variable>
1081
- <xsl:variable name="secondCoverPageData" select="xalan:nodeset($secondCoverPageData_)"/>
1082
- <fo:page-sequence force-page-count="no-force" master-reference="cover-page_2023">
1083
- <xsl:if test="$secondCoverPageData//*[self::fo:instream-foreign-object or self::fo:external-graphic]">
1084
- <fo:static-content flow-name="header" role="artifact" id="__internal_layout__coverpage2_header_{$num}_{generate-id()}">
1085
- <xsl:copy-of select="$secondCoverPageData"/>
1086
- </fo:static-content>
1087
- </xsl:if>
1088
- <fo:flow flow-name="xsl-region-body">
1089
- <fo:block> </fo:block>
1090
- </fo:flow>
1091
- </fo:page-sequence>
1092
- <!-- End: Second cover page -->
1093
1069
  </xsl:when> <!-- $layoutVersion = '2023' -->
1094
1070
 
1095
1071
  <xsl:otherwise>
@@ -1761,6 +1737,41 @@
1761
1737
  <!-- ============================================= -->
1762
1738
  </xsl:template>
1763
1739
 
1740
+ <xsl:template name="inner-cover-page">
1741
+ <xsl:param name="num"/>
1742
+ <xsl:variable name="document_scheme" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'document-scheme']/mn:value)"/>
1743
+ <xsl:variable name="layoutVersion_">
1744
+ <xsl:choose>
1745
+ <xsl:when test="$document_scheme = '' or $document_scheme = 'current'">2023</xsl:when>
1746
+ <xsl:otherwise>default</xsl:otherwise>
1747
+ </xsl:choose>
1748
+ </xsl:variable>
1749
+ <xsl:variable name="layoutVersion" select="normalize-space($layoutVersion_)"/>
1750
+ <xsl:if test="$layoutVersion = '2023'">
1751
+ <!-- Second cover page -->
1752
+ <xsl:variable name="secondCoverPageData_">
1753
+ <xsl:call-template name="insertBackgroundPageImage">
1754
+ <xsl:with-param name="number">2</xsl:with-param>
1755
+ </xsl:call-template>
1756
+ </xsl:variable>
1757
+ <xsl:variable name="secondCoverPageData" select="xalan:nodeset($secondCoverPageData_)"/>
1758
+ <fo:page-sequence force-page-count="no-force" master-reference="cover-page_2023">
1759
+ <xsl:if test="$secondCoverPageData//*[self::fo:instream-foreign-object or self::fo:external-graphic]">
1760
+ <fo:static-content flow-name="header" role="artifact" id="__internal_layout__coverpage2_header_{$num}_{generate-id()}">
1761
+ <xsl:copy-of select="$secondCoverPageData"/>
1762
+ </fo:static-content>
1763
+ </xsl:if>
1764
+ <fo:flow flow-name="xsl-region-body">
1765
+ <fo:block> </fo:block>
1766
+ </fo:flow>
1767
+ </fo:page-sequence>
1768
+ <!-- End: Second cover page -->
1769
+ </xsl:if>
1770
+ </xsl:template> <!-- END: inner-cover-page -->
1771
+
1772
+ <xsl:template name="back-page">
1773
+ </xsl:template>
1774
+
1764
1775
  <xsl:template name="insertMeetingInfo">
1765
1776
  <fo:block><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:meeting"/></fo:block>
1766
1777
  <fo:block>
@@ -2345,7 +2356,7 @@
2345
2356
  <!-- ====== -->
2346
2357
 
2347
2358
  <xsl:template match="mn:legal-statement//mn:p | mn:license-statement//mn:p" priority="2">
2348
- <fo:block margin-top="6pt">
2359
+ <fo:block xsl:use-attribute-sets="legal-statement-p-style">
2349
2360
  <xsl:apply-templates/>
2350
2361
  </fo:block>
2351
2362
  <xsl:if test="not(following-sibling::mn:p)"> <!-- last para -->
@@ -2364,27 +2375,16 @@
2364
2375
  </xsl:template>
2365
2376
 
2366
2377
  <xsl:template match="mn:fmt-preferred" priority="2">
2367
- <!-- DEBUG need -->
2368
- <xsl:variable name="level">
2369
- <xsl:call-template name="getLevel"/>
2370
- </xsl:variable>
2371
- <xsl:variable name="levelTerm">
2372
- <xsl:call-template name="getLevelTermName"/>
2373
- </xsl:variable>
2374
- <fo:block space-before="6pt" text-align="justify" role="H{$levelTerm}">
2375
- <fo:inline padding-right="5mm" font-weight="bold">
2376
- <!-- level=<xsl:value-of select="$level"/> -->
2377
- <xsl:attribute name="padding-right">
2378
- <xsl:choose>
2379
- <xsl:when test="$level = 4">2mm</xsl:when>
2380
- <xsl:when test="$level = 3">4mm</xsl:when>
2381
- <xsl:otherwise>5mm</xsl:otherwise>
2382
- </xsl:choose>
2383
- </xsl:attribute>
2378
+ <fo:block xsl:use-attribute-sets="term-preferred-block-style">
2379
+ <xsl:call-template name="refine_term-preferred-block-style"/>
2380
+
2381
+ <fo:inline xsl:use-attribute-sets="term-number-style">
2382
+ <xsl:call-template name="refine_term-number-style"/>
2383
+
2384
2384
  <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
2385
2385
  </fo:inline>
2386
- <fo:inline font-weight="bold">
2387
- <xsl:call-template name="refine_preferred-term-style"/>
2386
+ <fo:inline xsl:use-attribute-sets="term-preferred-style">
2387
+ <xsl:call-template name="refine_term-preferred-style"/>
2388
2388
  <xsl:apply-templates/>
2389
2389
  </fo:inline>
2390
2390
  <xsl:if test="../mn:fmt-termsource">
@@ -2804,91 +2804,109 @@
2804
2804
  </xsl:template> -->
2805
2805
 
2806
2806
  <xsl:template name="insertHeaderFooter">
2807
+ <xsl:param name="doctype"/>
2807
2808
  <xsl:param name="footer-text"/>
2808
- <fo:static-content flow-name="footer-even" font-family="Times New Roman" font-size="11pt" role="artifact">
2809
- <fo:block-container height="19mm" display-align="after">
2810
- <fo:table table-layout="fixed" width="100%" display-align="after">
2811
- <fo:table-column column-width="10%"/>
2812
- <fo:table-column column-width="90%"/>
2813
- <fo:table-body>
2814
- <fo:table-row>
2815
- <fo:table-cell text-align="start" padding-bottom="8mm">
2816
- <fo:block><fo:page-number/></fo:block>
2817
- </fo:table-cell>
2818
- <fo:table-cell font-weight="bold" text-align="start" padding-bottom="8mm">
2819
- <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2820
- </fo:table-cell>
2821
- </fo:table-row>
2822
- </fo:table-body>
2823
- </fo:table>
2824
- </fo:block-container>
2825
- </fo:static-content>
2826
- <fo:static-content flow-name="footer-odd" font-family="Times New Roman" font-size="11pt" role="artifact">
2827
- <fo:block-container height="19mm" display-align="after">
2828
- <fo:table table-layout="fixed" width="100%" display-align="after">
2829
- <fo:table-column column-width="90%"/>
2830
- <fo:table-column column-width="10%"/>
2831
- <fo:table-body>
2832
- <fo:table-row>
2833
- <fo:table-cell font-weight="bold" text-align="end" padding-bottom="8mm">
2834
- <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2835
- </fo:table-cell>
2836
- <fo:table-cell text-align="end" padding-bottom="8mm" padding-right="2mm">
2837
- <fo:block><fo:page-number/></fo:block>
2838
- </fo:table-cell>
2839
- </fo:table-row>
2840
- </fo:table-body>
2841
- </fo:table>
2842
- </fo:block-container>
2843
- </fo:static-content>
2809
+
2810
+ <xsl:call-template name="insertHeader"/>
2811
+
2812
+ <xsl:call-template name="insertFooter">
2813
+ <xsl:with-param name="doctype" select="$doctype"/>
2814
+ <xsl:with-param name="footer-text" select="$footer-text"/>
2815
+ </xsl:call-template>
2844
2816
  </xsl:template>
2845
2817
 
2846
- <xsl:template name="insertHeaderFooterSP">
2818
+ <xsl:template name="insertHeader">
2819
+ </xsl:template>
2820
+
2821
+ <xsl:template name="insertFooter">
2822
+ <xsl:param name="doctype"/>
2847
2823
  <xsl:param name="footer-text"/>
2848
- <fo:static-content flow-name="footer-even" role="artifact">
2849
- <fo:block-container height="20mm">
2850
- <fo:table table-layout="fixed" width="100%" margin-top="3mm">
2851
- <fo:table-column column-width="proportional-column-width(2)"/>
2852
- <fo:table-column column-width="proportional-column-width(2)"/>
2853
- <fo:table-column column-width="proportional-column-width(2)"/>
2854
- <fo:table-body>
2855
- <fo:table-row>
2856
- <fo:table-cell text-align="start" font-size="10pt" display-align="center">
2857
- <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2858
- </fo:table-cell>
2859
- <fo:table-cell text-align="center">
2860
- <fo:block>– <fo:page-number/> –</fo:block>
2861
- </fo:table-cell>
2862
- <fo:table-cell>
2863
- <fo:block> </fo:block>
2864
- </fo:table-cell>
2865
- </fo:table-row>
2866
- </fo:table-body>
2867
- </fo:table>
2868
- </fo:block-container>
2869
- </fo:static-content>
2870
- <fo:static-content flow-name="footer-odd" role="artifact">
2871
- <fo:block-container height="20mm">
2872
- <fo:table table-layout="fixed" width="100%" margin-top="3mm">
2873
- <fo:table-column column-width="proportional-column-width(2)"/>
2874
- <fo:table-column column-width="proportional-column-width(2)"/>
2875
- <fo:table-column column-width="proportional-column-width(2)"/>
2876
- <fo:table-body>
2877
- <fo:table-row>
2878
- <fo:table-cell text-align="start" font-size="10pt" display-align="center">
2879
- <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2880
- </fo:table-cell>
2881
- <fo:table-cell text-align="center">
2882
- <fo:block>– <fo:page-number/> –</fo:block>
2883
- </fo:table-cell>
2884
- <fo:table-cell>
2885
- <fo:block> </fo:block>
2886
- </fo:table-cell>
2887
- </fo:table-row>
2888
- </fo:table-body>
2889
- </fo:table>
2890
- </fo:block-container>
2891
- </fo:static-content>
2824
+ <xsl:choose>
2825
+ <xsl:when test="$doctype = 'service-publication'">
2826
+ <fo:static-content flow-name="footer-even" role="artifact">
2827
+ <fo:block-container height="20mm">
2828
+ <fo:table table-layout="fixed" width="100%" margin-top="3mm">
2829
+ <fo:table-column column-width="proportional-column-width(2)"/>
2830
+ <fo:table-column column-width="proportional-column-width(2)"/>
2831
+ <fo:table-column column-width="proportional-column-width(2)"/>
2832
+ <fo:table-body>
2833
+ <fo:table-row>
2834
+ <fo:table-cell text-align="start" font-size="10pt" display-align="center">
2835
+ <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2836
+ </fo:table-cell>
2837
+ <fo:table-cell text-align="center">
2838
+ <fo:block>– <fo:page-number/> –</fo:block>
2839
+ </fo:table-cell>
2840
+ <fo:table-cell>
2841
+ <fo:block> </fo:block>
2842
+ </fo:table-cell>
2843
+ </fo:table-row>
2844
+ </fo:table-body>
2845
+ </fo:table>
2846
+ </fo:block-container>
2847
+ </fo:static-content>
2848
+ <fo:static-content flow-name="footer-odd" role="artifact">
2849
+ <fo:block-container height="20mm">
2850
+ <fo:table table-layout="fixed" width="100%" margin-top="3mm">
2851
+ <fo:table-column column-width="proportional-column-width(2)"/>
2852
+ <fo:table-column column-width="proportional-column-width(2)"/>
2853
+ <fo:table-column column-width="proportional-column-width(2)"/>
2854
+ <fo:table-body>
2855
+ <fo:table-row>
2856
+ <fo:table-cell text-align="start" font-size="10pt" display-align="center">
2857
+ <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2858
+ </fo:table-cell>
2859
+ <fo:table-cell text-align="center">
2860
+ <fo:block>– <fo:page-number/> –</fo:block>
2861
+ </fo:table-cell>
2862
+ <fo:table-cell>
2863
+ <fo:block> </fo:block>
2864
+ </fo:table-cell>
2865
+ </fo:table-row>
2866
+ </fo:table-body>
2867
+ </fo:table>
2868
+ </fo:block-container>
2869
+ </fo:static-content>
2870
+ </xsl:when>
2871
+ <xsl:otherwise>
2872
+ <fo:static-content flow-name="footer-even" font-family="Times New Roman" font-size="11pt" role="artifact">
2873
+ <fo:block-container height="19mm" display-align="after">
2874
+ <fo:table table-layout="fixed" width="100%" display-align="after">
2875
+ <fo:table-column column-width="10%"/>
2876
+ <fo:table-column column-width="90%"/>
2877
+ <fo:table-body>
2878
+ <fo:table-row>
2879
+ <fo:table-cell text-align="start" padding-bottom="8mm">
2880
+ <fo:block><fo:page-number/></fo:block>
2881
+ </fo:table-cell>
2882
+ <fo:table-cell font-weight="bold" text-align="start" padding-bottom="8mm">
2883
+ <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2884
+ </fo:table-cell>
2885
+ </fo:table-row>
2886
+ </fo:table-body>
2887
+ </fo:table>
2888
+ </fo:block-container>
2889
+ </fo:static-content>
2890
+ <fo:static-content flow-name="footer-odd" font-family="Times New Roman" font-size="11pt" role="artifact">
2891
+ <fo:block-container height="19mm" display-align="after">
2892
+ <fo:table table-layout="fixed" width="100%" display-align="after">
2893
+ <fo:table-column column-width="90%"/>
2894
+ <fo:table-column column-width="10%"/>
2895
+ <fo:table-body>
2896
+ <fo:table-row>
2897
+ <fo:table-cell font-weight="bold" text-align="end" padding-bottom="8mm">
2898
+ <fo:block><xsl:value-of select="$footer-text"/></fo:block>
2899
+ </fo:table-cell>
2900
+ <fo:table-cell text-align="end" padding-bottom="8mm" padding-right="2mm">
2901
+ <fo:block><fo:page-number/></fo:block>
2902
+ </fo:table-cell>
2903
+ </fo:table-row>
2904
+ </fo:table-body>
2905
+ </fo:table>
2906
+ </fo:block-container>
2907
+ </fo:static-content>
2908
+ </xsl:otherwise>
2909
+ </xsl:choose>
2892
2910
  </xsl:template>
2893
2911
 
2894
2912
  <xsl:variable name="Image-Fond-Rec">
@@ -4660,6 +4678,7 @@
4660
4678
  </xsl:template>
4661
4679
 
4662
4680
  <xsl:attribute-set name="license-statement-p-style">
4681
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4663
4682
  </xsl:attribute-set> <!-- license-statement-p-style -->
4664
4683
 
4665
4684
  <xsl:template name="refine_license-statement-p-style">
@@ -4682,6 +4701,7 @@
4682
4701
  </xsl:template>
4683
4702
 
4684
4703
  <xsl:attribute-set name="legal-statement-p-style">
4704
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4685
4705
  </xsl:attribute-set> <!-- legal-statement-p-style -->
4686
4706
 
4687
4707
  <xsl:template name="refine_legal-statement-p-style">
@@ -4703,7 +4723,6 @@
4703
4723
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
4704
4724
 
4705
4725
  <xsl:template name="refine_feedback-statement-title-style">
4706
-
4707
4726
  </xsl:template>
4708
4727
 
4709
4728
  <xsl:attribute-set name="feedback-statement-p-style">
@@ -6353,83 +6372,96 @@
6353
6372
  <xsl:template name="refine_term-style">
6354
6373
  </xsl:template>
6355
6374
 
6356
- <xsl:attribute-set name="term-name-style">
6375
+ <xsl:attribute-set name="term-number-style">
6357
6376
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6358
6377
  <xsl:attribute name="font-weight">bold</xsl:attribute>
6378
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
6359
6379
  </xsl:attribute-set> <!-- term-name-style -->
6360
6380
 
6361
- <xsl:template name="refine_term-name-style">
6362
- </xsl:template>
6363
-
6364
- <xsl:attribute-set name="preferred-style">
6365
- </xsl:attribute-set> <!-- preferred-style -->
6366
-
6367
- <xsl:template name="refine_preferred-style">
6381
+ <xsl:template name="refine_term-number-style">
6382
+ <xsl:variable name="level">
6383
+ <xsl:call-template name="getLevel"/>
6384
+ </xsl:variable>
6385
+ <!-- level=<xsl:value-of select="$level"/> -->
6386
+ <xsl:attribute name="padding-right">
6387
+ <xsl:choose>
6388
+ <xsl:when test="$level = 4">2mm</xsl:when>
6389
+ <xsl:when test="$level = 3">4mm</xsl:when>
6390
+ <xsl:otherwise>5mm</xsl:otherwise>
6391
+ </xsl:choose>
6392
+ </xsl:attribute>
6368
6393
  </xsl:template>
6369
6394
 
6370
- <xsl:attribute-set name="preferred-block-style">
6395
+ <xsl:attribute-set name="term-preferred-block-style">
6396
+ <xsl:attribute name="space-before">6pt</xsl:attribute>
6397
+ <xsl:attribute name="text-align">justify</xsl:attribute>
6371
6398
  </xsl:attribute-set> <!-- preferred-block-style -->
6372
6399
 
6373
- <xsl:template name="refine_preferred-block-style">
6400
+ <xsl:template name="refine_term-preferred-block-style">
6401
+ <xsl:variable name="levelTerm">
6402
+ <xsl:call-template name="getLevelTermName"/>
6403
+ </xsl:variable>
6404
+ <xsl:attribute name="role">H<xsl:value-of select="$levelTerm"/></xsl:attribute>
6374
6405
  </xsl:template>
6375
6406
 
6376
- <xsl:attribute-set name="preferred-term-style">
6407
+ <xsl:attribute-set name="term-preferred-style">
6377
6408
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6378
6409
  <xsl:attribute name="font-weight">bold</xsl:attribute>
6410
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6379
6411
  </xsl:attribute-set> <!-- preferred-term-style -->
6380
6412
 
6381
- <xsl:template name="refine_preferred-term-style">
6413
+ <xsl:template name="refine_term-preferred-style">
6382
6414
  <xsl:if test="mn:strong">
6383
6415
  <xsl:attribute name="font-weight">normal</xsl:attribute>
6384
6416
  </xsl:if>
6385
6417
  </xsl:template>
6386
6418
 
6387
- <xsl:attribute-set name="domain-style">
6388
- </xsl:attribute-set> <!-- domain-style -->
6419
+ <xsl:attribute-set name="term-domain-style">
6420
+ </xsl:attribute-set> <!-- term-domain-style -->
6389
6421
 
6390
- <xsl:template name="refine_domain-style">
6422
+ <xsl:template name="refine_term-domain-style">
6391
6423
  </xsl:template>
6392
6424
 
6393
- <xsl:attribute-set name="admitted-style">
6394
- </xsl:attribute-set> <!-- admitted-style -->
6425
+ <xsl:attribute-set name="term-admitted-style">
6426
+ </xsl:attribute-set> <!-- term-admitted-style -->
6395
6427
 
6396
- <xsl:template name="refine_admitted-style">
6428
+ <xsl:template name="refine_term-admitted-style">
6397
6429
  </xsl:template>
6398
6430
 
6399
- <xsl:attribute-set name="deprecates-style">
6400
- </xsl:attribute-set> <!-- deprecates-style -->
6431
+ <xsl:attribute-set name="term-deprecates-style">
6432
+ </xsl:attribute-set> <!-- term-deprecates-style -->
6401
6433
 
6402
- <xsl:template name="refine_deprecates-style">
6434
+ <xsl:template name="refine_term-deprecates-style">
6403
6435
  </xsl:template>
6404
6436
 
6405
- <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
6437
+ <xsl:attribute-set name="term-related-block-style" use-attribute-sets="term-preferred-block-style">
6406
6438
  </xsl:attribute-set>
6407
6439
 
6408
- <xsl:template name="refine_related-block-style">
6440
+ <xsl:template name="refine_term-related-block-style">
6409
6441
  </xsl:template>
6410
6442
 
6411
- <xsl:attribute-set name="definition-style">
6412
- </xsl:attribute-set> <!-- definition-style -->
6443
+ <xsl:attribute-set name="term-definition-style">
6444
+ </xsl:attribute-set> <!-- term-definition-style -->
6413
6445
 
6414
- <xsl:template name="refine_definition-style">
6446
+ <xsl:template name="refine_term-definition-style">
6415
6447
  </xsl:template>
6416
6448
 
6417
- <xsl:attribute-set name="termsource-style">
6418
- </xsl:attribute-set> <!-- termsource-style -->
6449
+ <xsl:attribute-set name="term-termsource-style">
6450
+ </xsl:attribute-set> <!-- term-termsource-style -->
6419
6451
 
6420
- <xsl:template name="refine_termsource-style">
6421
- </xsl:template> <!-- refine_termsource-style -->
6452
+ <xsl:template name="refine_term-termsource-style">
6453
+ </xsl:template> <!-- refine_term-termsource-style -->
6422
6454
 
6423
- <xsl:attribute-set name="termsource-text-style">
6424
- </xsl:attribute-set> <!-- termsource-text-style -->
6455
+ <xsl:attribute-set name="term-termsource-text-style">
6456
+ </xsl:attribute-set> <!-- term-termsource-text-style -->
6425
6457
 
6426
- <xsl:template name="refine_termsource-text-style">
6458
+ <xsl:template name="refine_term-termsource-text-style">
6427
6459
  </xsl:template>
6428
6460
 
6429
- <xsl:attribute-set name="origin-style">
6430
- </xsl:attribute-set> <!-- origin-style -->
6461
+ <xsl:attribute-set name="term-origin-style">
6462
+ </xsl:attribute-set> <!-- term-origin-style -->
6431
6463
 
6432
- <xsl:template name="refine_origin-style">
6464
+ <xsl:template name="refine_term-origin-style">
6433
6465
  </xsl:template>
6434
6466
 
6435
6467
  <!-- ====== -->
@@ -6473,9 +6505,9 @@
6473
6505
  <!-- modification -->
6474
6506
  <!-- ====== -->
6475
6507
  <xsl:template match="mn:fmt-termsource" name="termsource">
6476
- <fo:block xsl:use-attribute-sets="termsource-style">
6508
+ <fo:block xsl:use-attribute-sets="term-termsource-style">
6477
6509
 
6478
- <xsl:call-template name="refine_termsource-style"/>
6510
+ <xsl:call-template name="refine_term-termsource-style"/>
6479
6511
 
6480
6512
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
6481
6513
  <xsl:variable name="termsource_text">
@@ -6523,8 +6555,8 @@
6523
6555
 
6524
6556
  <!-- text SOURCE: -->
6525
6557
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
6526
- <fo:inline xsl:use-attribute-sets="termsource-text-style">
6527
- <xsl:call-template name="refine_termsource-text-style"/>
6558
+ <fo:inline xsl:use-attribute-sets="term-termsource-text-style">
6559
+ <xsl:call-template name="refine_term-termsource-text-style"/>
6528
6560
  <xsl:value-of select="."/>
6529
6561
  </fo:inline>
6530
6562
  </xsl:template>
@@ -6536,8 +6568,8 @@
6536
6568
  <xsl:if test="normalize-space(@citeas) = ''">
6537
6569
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
6538
6570
  </xsl:if>
6539
- <fo:inline xsl:use-attribute-sets="origin-style">
6540
- <xsl:call-template name="refine_origin-style"/>
6571
+ <fo:inline xsl:use-attribute-sets="term-origin-style">
6572
+ <xsl:call-template name="refine_term-origin-style"/>
6541
6573
  <xsl:apply-templates/>
6542
6574
  </fo:inline>
6543
6575
  </fo:basic-link>
@@ -6585,14 +6617,14 @@
6585
6617
  <xsl:variable name="levelTerm">
6586
6618
  <xsl:call-template name="getLevelTermName"/>
6587
6619
  </xsl:variable>
6588
- <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
6620
+ <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="term-preferred-block-style">
6589
6621
 
6590
- <xsl:call-template name="refine_preferred-block-style"/>
6622
+ <xsl:call-template name="refine_term-preferred-block-style"/>
6591
6623
 
6592
6624
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
6593
6625
 
6594
- <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
6595
- <xsl:call-template name="refine_term-name-style"/>
6626
+ <fo:block xsl:use-attribute-sets="term-number-style" role="SKIP">
6627
+ <xsl:call-template name="refine_term-number-style"/>
6596
6628
 
6597
6629
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
6598
6630
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -6602,8 +6634,8 @@
6602
6634
  </fo:block>
6603
6635
  </xsl:if>
6604
6636
 
6605
- <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
6606
- <xsl:call-template name="refine_preferred-term-style"/>
6637
+ <fo:block xsl:use-attribute-sets="term-preferred-style" role="SKIP">
6638
+ <xsl:call-template name="refine_term-preferred-style"/>
6607
6639
 
6608
6640
  <xsl:apply-templates/>
6609
6641
  </fo:block>
@@ -6623,15 +6655,15 @@
6623
6655
  <xsl:template match="mn:domain"/>
6624
6656
 
6625
6657
  <xsl:template match="mn:fmt-admitted">
6626
- <fo:block xsl:use-attribute-sets="admitted-style">
6627
- <xsl:call-template name="refine_admitted-style"/>
6658
+ <fo:block xsl:use-attribute-sets="term-admitted-style">
6659
+ <xsl:call-template name="refine_term-admitted-style"/>
6628
6660
  <xsl:apply-templates/>
6629
6661
  </fo:block>
6630
6662
  </xsl:template>
6631
6663
 
6632
6664
  <xsl:template match="mn:fmt-deprecates">
6633
- <fo:block xsl:use-attribute-sets="deprecates-style">
6634
- <xsl:call-template name="refine_deprecates-style"/>
6665
+ <fo:block xsl:use-attribute-sets="term-deprecates-style">
6666
+ <xsl:call-template name="refine_term-deprecates-style"/>
6635
6667
  <xsl:apply-templates/>
6636
6668
  </fo:block>
6637
6669
  </xsl:template>
@@ -6644,8 +6676,8 @@
6644
6676
  <!-- End Preferred, admitted, deprecated -->
6645
6677
 
6646
6678
  <xsl:template match="mn:fmt-related">
6647
- <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
6648
- <xsl:call-template name="refine_related-block-style"/>
6679
+ <fo:block role="SKIP" xsl:use-attribute-sets="term-related-block-style">
6680
+ <xsl:call-template name="refine_term-related-block-style"/>
6649
6681
  <xsl:apply-templates/>
6650
6682
  </fo:block>
6651
6683
  </xsl:template>
@@ -6659,8 +6691,8 @@
6659
6691
  <!-- definition -->
6660
6692
  <!-- ========== -->
6661
6693
  <xsl:template match="mn:fmt-definition">
6662
- <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
6663
- <xsl:call-template name="refine_definition-style"/>
6694
+ <fo:block xsl:use-attribute-sets="term-definition-style" role="SKIP">
6695
+ <xsl:call-template name="refine_term-definition-style"/>
6664
6696
  <xsl:apply-templates/>
6665
6697
  </fo:block>
6666
6698
  </xsl:template>
@@ -10576,15 +10608,22 @@
10576
10608
  </xsl:attribute-set> <!-- quote-style -->
10577
10609
 
10578
10610
  <xsl:template name="refine_quote-style">
10579
- </xsl:template>
10611
+ </xsl:template> <!-- refine_quote-style -->
10580
10612
 
10581
10613
  <xsl:attribute-set name="quote-source-style">
10582
10614
  <xsl:attribute name="text-align">right</xsl:attribute>
10583
- </xsl:attribute-set>
10615
+ </xsl:attribute-set> <!-- quote-source-style -->
10584
10616
 
10585
10617
  <xsl:template name="refine_quote-source-style">
10586
10618
  </xsl:template>
10587
10619
 
10620
+ <xsl:attribute-set name="source-style">
10621
+ </xsl:attribute-set> <!-- source-style -->
10622
+
10623
+ <xsl:template name="refine_source-style">
10624
+
10625
+ </xsl:template> <!-- refine_source-style -->
10626
+
10588
10627
  <!-- ====== -->
10589
10628
  <!-- quote -->
10590
10629
  <!-- source -->
@@ -10632,7 +10671,9 @@
10632
10671
  </xsl:if>
10633
10672
  <xsl:choose>
10634
10673
  <xsl:when test="not(parent::quote)">
10635
- <fo:block>
10674
+ <fo:block xsl:use-attribute-sets="source-style">
10675
+ <xsl:call-template name="refine_source-style"/>
10676
+
10636
10677
  <xsl:call-template name="insert_basic_link">
10637
10678
  <xsl:with-param name="element">
10638
10679
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -12729,7 +12770,7 @@
12729
12770
 
12730
12771
  <xsl:template name="refine_fn-reference-style">
12731
12772
  <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
12732
- <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
12773
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">, </xsl:if><!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas'"></xsl:if> -->
12733
12774
  </xsl:template> <!-- refine_fn-reference-style -->
12734
12775
 
12735
12776
  <xsl:attribute-set name="fn-style">
@@ -12740,7 +12781,9 @@
12740
12781
  </xsl:template>
12741
12782
 
12742
12783
  <xsl:attribute-set name="fn-num-style">
12784
+ <xsl:attribute name="role">Reference</xsl:attribute>
12743
12785
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
12786
+ <xsl:attribute name="font-size">65%</xsl:attribute>
12744
12787
  <xsl:attribute name="font-size">60%</xsl:attribute>
12745
12788
  <xsl:attribute name="vertical-align">super</xsl:attribute>
12746
12789
  </xsl:attribute-set> <!-- fn-num-style -->
@@ -12819,33 +12862,16 @@
12819
12862
  <xsl:variable name="ref_id" select="@target"/>
12820
12863
 
12821
12864
  <xsl:variable name="footnote_inline">
12822
- <fo:inline role="Reference">
12865
+ <fo:inline xsl:use-attribute-sets="fn-num-style">
12823
12866
 
12824
- <xsl:variable name="fn_styles">
12825
- <xsl:choose>
12826
- <xsl:when test="ancestor::mn:bibitem">
12827
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
12828
- <xsl:call-template name="refine_bibitem-note-fn-style"/>
12829
- </fn_styles>
12830
- </xsl:when>
12831
- <xsl:otherwise>
12832
- <fn_styles xsl:use-attribute-sets="fn-num-style">
12833
- <xsl:call-template name="refine_fn-num-style"/>
12834
- </fn_styles>
12835
- </xsl:otherwise>
12836
- </xsl:choose>
12837
- </xsl:variable>
12838
-
12839
- <xsl:for-each select="xalan:nodeset($fn_styles)/fn_styles/@*">
12840
- <xsl:copy-of select="."/>
12841
- </xsl:for-each>
12867
+ <xsl:call-template name="refine_fn-num-style"/>
12842
12868
 
12843
12869
  <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
12844
12870
  <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
12845
12871
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
12846
12872
  </xsl:if> -->
12847
12873
 
12848
- <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
12874
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">, </xsl:if>
12849
12875
 
12850
12876
  <xsl:call-template name="insert_basic_link">
12851
12877
  <xsl:with-param name="element">
@@ -13154,32 +13180,6 @@
13154
13180
  <xsl:template name="refine_bibitem-non-normative-list-body-style">
13155
13181
  </xsl:template>
13156
13182
 
13157
- <!-- footnote reference number for bibitem, in the text -->
13158
- <xsl:attribute-set name="bibitem-note-fn-style">
13159
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
13160
- <xsl:attribute name="font-size">65%</xsl:attribute>
13161
- <xsl:attribute name="font-size">8pt</xsl:attribute>
13162
- <xsl:attribute name="baseline-shift">30%</xsl:attribute>
13163
- </xsl:attribute-set> <!-- bibitem-note-fn-style -->
13164
-
13165
- <xsl:template name="refine_bibitem-note-fn-style">
13166
- </xsl:template>
13167
-
13168
- <!-- footnote number on the page bottom -->
13169
- <xsl:attribute-set name="bibitem-note-fn-number-style">
13170
- <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
13171
- <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
13172
- <xsl:attribute name="padding-right">3mm</xsl:attribute>
13173
- </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
13174
-
13175
- <!-- footnote body (text) on the page bottom -->
13176
- <xsl:attribute-set name="bibitem-note-fn-body-style">
13177
- <xsl:attribute name="font-size">10pt</xsl:attribute>
13178
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13179
- <xsl:attribute name="start-indent">0pt</xsl:attribute>
13180
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
13181
- </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
13182
-
13183
13183
  <xsl:attribute-set name="references-non-normative-style">
13184
13184
  </xsl:attribute-set> <!-- references-non-normative-style -->
13185
13185
 
@@ -15586,6 +15586,17 @@
15586
15586
  </xsl:attribute-set>
15587
15587
 
15588
15588
  <xsl:template name="refine_clause-style">
15589
+ <!-- commented for https://github.com/metanorma/metanorma-ribose/issues/421 -->
15590
+ <!-- <xsl:if test="$namespace = 'rsd'">
15591
+ <xsl:variable name="level">
15592
+ <xsl:call-template name="getLevel">
15593
+ <xsl:with-param name="depth" select="mn:fmt-title/@depth"/>
15594
+ </xsl:call-template>
15595
+ </xsl:variable>
15596
+ <xsl:if test="$level &gt;= 4">
15597
+ <xsl:attribute name="margin-left">13mm</xsl:attribute>
15598
+ </xsl:if>
15599
+ </xsl:if> -->
15589
15600
  </xsl:template>
15590
15601
 
15591
15602
  <!-- main sections -->
@@ -16653,6 +16664,20 @@
16653
16664
  </fo:block-container>
16654
16665
  </xsl:template>
16655
16666
 
16667
+ <!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
16668
+ <xsl:template name="insertCoverPageFullImage">
16669
+ <xsl:param name="name">coverpage-image</xsl:param>
16670
+ <xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image">
16671
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
16672
+ <fo:flow flow-name="xsl-region-body">
16673
+ <xsl:call-template name="insertBackgroundPageImage">
16674
+ <xsl:with-param name="number" select="position()"/>
16675
+ </xsl:call-template>
16676
+ </fo:flow>
16677
+ </fo:page-sequence>
16678
+ </xsl:for-each>
16679
+ </xsl:template>
16680
+
16656
16681
  <xsl:template name="insertPageImage">
16657
16682
  <xsl:param name="svg_content_height" select="$pageHeight"/>
16658
16683
  <xsl:param name="bitmap_width" select="$pageWidth"/>