metanorma-ogc 2.8.5 → 2.8.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.
@@ -27,8 +27,8 @@
27
27
 
28
28
  <xsl:variable name="layoutVersion_">
29
29
  <xsl:choose>
30
- <xsl:when test="$document_scheme = '' or $document_scheme = 'current'">2022</xsl:when>
31
- <xsl:otherwise>default</xsl:otherwise>
30
+ <xsl:when test="$document_scheme = '' or $document_scheme = '2022'">2022</xsl:when>
31
+ <xsl:otherwise>2018</xsl:otherwise>
32
32
  </xsl:choose>
33
33
  </xsl:variable>
34
34
  <xsl:variable name="layoutVersion" select="normalize-space($layoutVersion_)"/>
@@ -540,252 +540,259 @@
540
540
 
541
541
  <xsl:template name="cover-page">
542
542
  <!-- Cover Page -->
543
- <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
544
- <xsl:call-template name="insertFootnoteSeparatorCommon"/>
545
-
546
- <fo:flow flow-name="xsl-region-body" color="white">
543
+ <xsl:choose>
544
+ <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'">
545
+ <xsl:call-template name="insertCoverPageFullImage"/>
546
+ </xsl:when>
547
+ <xsl:otherwise>
548
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
549
+ <xsl:call-template name="insertFootnoteSeparatorCommon"/>
547
550
 
548
- <xsl:variable name="curr_lang" select="/mn:metanorma/mn:bibdata/mn:language[@current = 'true']"/>
549
- <xsl:variable name="stage" select="/mn:metanorma/mn:bibdata/mn:status/mn:stage[@language = $curr_lang] | /mn:metanorma/mn:bibdata/mn:status/mn:stage[not(@language)]"/>
550
- <xsl:variable name="isLegacy" select="normalize-space($stage = 'deprecated' or $stage = 'legacy' or $stage = 'retired' or $stage = 'rescinded')"/>
551
+ <fo:flow flow-name="xsl-region-body" color="white">
551
552
 
552
- <!-- background image -->
553
- <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
554
- <fo:block>
555
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
556
- </fo:block>
557
- </fo:block-container>
553
+ <xsl:variable name="curr_lang" select="/mn:metanorma/mn:bibdata/mn:language[@current = 'true']"/>
554
+ <xsl:variable name="stage" select="/mn:metanorma/mn:bibdata/mn:status/mn:stage[@language = $curr_lang] | /mn:metanorma/mn:bibdata/mn:status/mn:stage[not(@language)]"/>
555
+ <xsl:variable name="isLegacy" select="normalize-space($stage = 'deprecated' or $stage = 'legacy' or $stage = 'retired' or $stage = 'rescinded')"/>
558
556
 
559
- <xsl:call-template name="insertBackgroundColor">
560
- <xsl:with-param name="opacity">0.85</xsl:with-param>
561
- </xsl:call-template>
557
+ <!-- background image -->
558
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
559
+ <fo:block>
560
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
561
+ </fo:block>
562
+ </fo:block-container>
562
563
 
563
- <xsl:call-template name="insertCrossingLines"/>
564
+ <xsl:call-template name="insertBackgroundColor">
565
+ <xsl:with-param name="opacity">0.85</xsl:with-param>
566
+ </xsl:call-template>
564
567
 
565
- <!-- title and logo -->
566
- <fo:block>
567
- <fo:table table-layout="fixed" width="100%">
568
- <fo:table-column column-width="75%"/>
569
- <fo:table-column column-width="25%"/>
570
- <fo:table-body>
571
- <fo:table-row>
572
- <fo:table-cell font-weight="bold">
573
- <fo:block font-size="16pt" color="{$color_design}" margin-bottom="4pt">
574
- <xsl:variable name="ogc_document" select="concat('OGC® DOCUMENT: ', $docnumber)"/>
575
- <xsl:call-template name="addLetterSpacing">
576
- <xsl:with-param name="text" select="$ogc_document"/>
577
- <xsl:with-param name="letter-spacing" select="0.3"/>
578
- </xsl:call-template>
579
- </fo:block>
580
- <xsl:variable name="ogc_external" select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type='ogc-external']"/>
581
- <xsl:if test="normalize-space($ogc_external) != ''">
582
- <fo:block font-size="10pt">External identifier of this OGC<fo:inline font-size="58%" baseline-shift="30%">®</fo:inline> document: <fo:inline font-weight="normal"><xsl:value-of select="$ogc_external"/></fo:inline></fo:block>
583
- </xsl:if>
584
- </fo:table-cell>
585
- <fo:table-cell text-align="right">
586
- <fo:block>
587
- <xsl:call-template name="insertLogo"/>
588
- </fo:block>
589
- </fo:table-cell>
590
- </fo:table-row>
591
- </fo:table-body>
592
- </fo:table>
593
- </fo:block>
568
+ <xsl:call-template name="insertCrossingLines"/>
594
569
 
595
- <!-- <fo:block-container absolute-position="fixed" left="16.5mm" top="83mm" height="90mm"> -->
596
- <fo:block-container absolute-position="fixed" left="16.5mm" top="40mm" height="170mm">
597
- <fo:block-container width="155mm" height="99%" display-align="center">
598
- <fo:block font-size="33pt" role="H1">
599
- <xsl:variable name="length_title" select="string-length($doctitle)"/>
600
- <xsl:variable name="fit_font-size">
601
- <xsl:choose>
602
- <xsl:when test="$length_title &gt; 230">20</xsl:when>
603
- <xsl:when test="$length_title &gt; 170">26</xsl:when>
604
- <xsl:when test="$length_title &gt; 155">28</xsl:when>
605
- <xsl:when test="$length_title &gt; 130">30</xsl:when>
606
- </xsl:choose>
607
- </xsl:variable>
608
- <xsl:if test="normalize-space($fit_font-size) != ''">
609
- <xsl:attribute name="font-size"><xsl:value-of select="$fit_font-size"/>pt</xsl:attribute>
610
- </xsl:if>
611
- <xsl:call-template name="addLetterSpacing">
612
- <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctitle))"/>
613
- <xsl:with-param name="letter-spacing" select="1.1"/>
614
- </xsl:call-template>
570
+ <!-- title and logo -->
571
+ <fo:block>
572
+ <fo:table table-layout="fixed" width="100%">
573
+ <fo:table-column column-width="75%"/>
574
+ <fo:table-column column-width="25%"/>
575
+ <fo:table-body>
576
+ <fo:table-row>
577
+ <fo:table-cell font-weight="bold">
578
+ <fo:block font-size="16pt" color="{$color_design}" margin-bottom="4pt">
579
+ <xsl:variable name="ogc_document" select="concat('OGC® DOCUMENT: ', $docnumber)"/>
580
+ <xsl:call-template name="addLetterSpacing">
581
+ <xsl:with-param name="text" select="$ogc_document"/>
582
+ <xsl:with-param name="letter-spacing" select="0.3"/>
583
+ </xsl:call-template>
584
+ </fo:block>
585
+ <xsl:variable name="ogc_external" select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type='ogc-external']"/>
586
+ <xsl:if test="normalize-space($ogc_external) != ''">
587
+ <fo:block font-size="10pt">External identifier of this OGC<fo:inline font-size="58%" baseline-shift="30%">®</fo:inline> document: <fo:inline font-weight="normal"><xsl:value-of select="$ogc_external"/></fo:inline></fo:block>
588
+ </xsl:if>
589
+ </fo:table-cell>
590
+ <fo:table-cell text-align="right">
591
+ <fo:block>
592
+ <xsl:call-template name="insertLogo"/>
593
+ </fo:block>
594
+ </fo:table-cell>
595
+ </fo:table-row>
596
+ </fo:table-body>
597
+ </fo:table>
615
598
  </fo:block>
616
- <fo:block-container width="22.5mm" border-bottom="2pt solid {$color_design}" margin-bottom="24pt">
617
- <fo:block margin-top="4pt"> </fo:block>
618
- </fo:block-container>
619
- <fo:block color="{$color_design}">
620
- <fo:block font-size="17pt">
621
- <xsl:call-template name="addLetterSpacing">
622
- <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctype))"/>
623
- </xsl:call-template>
624
- <xsl:value-of select="$linebreak"/>
625
- <xsl:variable name="docsubtype" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:subdoctype)"/>
626
- <xsl:variable name="docsubtype_str">
627
- <xsl:choose>
628
- <xsl:when test="$docsubtype = 'implementation'">Implementation</xsl:when>
629
- <xsl:when test="$docsubtype = 'conceptual-model'">Conceptual model</xsl:when>
630
- <xsl:when test="$docsubtype = 'conceptual-model-and-encoding'">Conceptual model &amp; encoding</xsl:when>
631
- <xsl:when test="$docsubtype = 'conceptual-model-and-implementation'">Conceptual model &amp; implementation</xsl:when>
632
- <xsl:when test="$docsubtype = 'encoding'">Encoding</xsl:when>
633
- <xsl:when test="$docsubtype = 'extension'">Extension</xsl:when>
634
- <xsl:when test="$docsubtype = 'profile'">Profile</xsl:when>
635
- <xsl:when test="$docsubtype = 'profile-with-extension'">Profile with extension</xsl:when>
636
- <xsl:when test="$docsubtype = 'general'">General</xsl:when>
637
- </xsl:choose>
638
- </xsl:variable>
639
- <xsl:call-template name="addLetterSpacing">
640
- <xsl:with-param name="text" select="$docsubtype_str"/>
641
- <xsl:with-param name="letter-spacing" select="0.25"/>
642
- </xsl:call-template>
643
- </fo:block>
644
- <xsl:variable name="stage_uc" select="java:toUpperCase(java:java.lang.String.new($stage))"/>
645
599
 
646
- <xsl:choose>
647
- <xsl:when test="$isLegacy = 'true'">
648
- <fo:block-container font-size="17pt" background-color="{$color_background_blue}" margin-left="-2.5mm" height="11.5mm" width="56mm" display-align="center" margin-top="0.5mm">
649
- <fo:block-container margin-left="2.5mm">
650
- <fo:block-container margin-left="0mm">
651
- <fo:block margin-top="1mm">
652
- <xsl:call-template name="addLetterSpacing">
653
- <xsl:with-param name="text" select="$stage_uc"/>
654
- </xsl:call-template>
655
- </fo:block>
656
- </fo:block-container>
657
- </fo:block-container>
658
- </fo:block-container>
659
- </xsl:when>
660
- <xsl:otherwise>
661
- <fo:block font-size="12pt" font-weight="bold" margin-top="14pt">
600
+ <!-- <fo:block-container absolute-position="fixed" left="16.5mm" top="83mm" height="90mm"> -->
601
+ <fo:block-container absolute-position="fixed" left="16.5mm" top="40mm" height="170mm">
602
+ <fo:block-container width="155mm" height="99%" display-align="center">
603
+ <fo:block font-size="33pt" role="H1">
604
+ <xsl:variable name="length_title" select="string-length($doctitle)"/>
605
+ <xsl:variable name="fit_font-size">
606
+ <xsl:choose>
607
+ <xsl:when test="$length_title &gt; 230">20</xsl:when>
608
+ <xsl:when test="$length_title &gt; 170">26</xsl:when>
609
+ <xsl:when test="$length_title &gt; 155">28</xsl:when>
610
+ <xsl:when test="$length_title &gt; 130">30</xsl:when>
611
+ </xsl:choose>
612
+ </xsl:variable>
613
+ <xsl:if test="normalize-space($fit_font-size) != ''">
614
+ <xsl:attribute name="font-size"><xsl:value-of select="$fit_font-size"/>pt</xsl:attribute>
615
+ </xsl:if>
616
+ <xsl:call-template name="addLetterSpacing">
617
+ <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctitle))"/>
618
+ <xsl:with-param name="letter-spacing" select="1.1"/>
619
+ </xsl:call-template>
620
+ </fo:block>
621
+ <fo:block-container width="22.5mm" border-bottom="2pt solid {$color_design}" margin-bottom="24pt">
622
+ <fo:block margin-top="4pt"> </fo:block>
623
+ </fo:block-container>
624
+ <fo:block color="{$color_design}">
625
+ <fo:block font-size="17pt">
662
626
  <xsl:call-template name="addLetterSpacing">
663
- <xsl:with-param name="text" select="$stage_uc"/>
627
+ <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctype))"/>
628
+ </xsl:call-template>
629
+ <xsl:value-of select="$linebreak"/>
630
+ <xsl:variable name="docsubtype" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:subdoctype)"/>
631
+ <xsl:variable name="docsubtype_str">
632
+ <xsl:choose>
633
+ <xsl:when test="$docsubtype = 'implementation'">Implementation</xsl:when>
634
+ <xsl:when test="$docsubtype = 'conceptual-model'">Conceptual model</xsl:when>
635
+ <xsl:when test="$docsubtype = 'conceptual-model-and-encoding'">Conceptual model &amp; encoding</xsl:when>
636
+ <xsl:when test="$docsubtype = 'conceptual-model-and-implementation'">Conceptual model &amp; implementation</xsl:when>
637
+ <xsl:when test="$docsubtype = 'encoding'">Encoding</xsl:when>
638
+ <xsl:when test="$docsubtype = 'extension'">Extension</xsl:when>
639
+ <xsl:when test="$docsubtype = 'profile'">Profile</xsl:when>
640
+ <xsl:when test="$docsubtype = 'profile-with-extension'">Profile with extension</xsl:when>
641
+ <xsl:when test="$docsubtype = 'general'">General</xsl:when>
642
+ </xsl:choose>
643
+ </xsl:variable>
644
+ <xsl:call-template name="addLetterSpacing">
645
+ <xsl:with-param name="text" select="$docsubtype_str"/>
646
+ <xsl:with-param name="letter-spacing" select="0.25"/>
664
647
  </xsl:call-template>
665
648
  </fo:block>
666
- </xsl:otherwise>
667
- </xsl:choose>
649
+ <xsl:variable name="stage_uc" select="java:toUpperCase(java:java.lang.String.new($stage))"/>
668
650
 
669
- </fo:block>
670
- </fo:block-container>
671
- </fo:block-container>
651
+ <xsl:choose>
652
+ <xsl:when test="$isLegacy = 'true'">
653
+ <fo:block-container font-size="17pt" background-color="{$color_background_blue}" margin-left="-2.5mm" height="11.5mm" width="56mm" display-align="center" margin-top="0.5mm">
654
+ <fo:block-container margin-left="2.5mm">
655
+ <fo:block-container margin-left="0mm">
656
+ <fo:block margin-top="1mm">
657
+ <xsl:call-template name="addLetterSpacing">
658
+ <xsl:with-param name="text" select="$stage_uc"/>
659
+ </xsl:call-template>
660
+ </fo:block>
661
+ </fo:block-container>
662
+ </fo:block-container>
663
+ </fo:block-container>
664
+ </xsl:when>
665
+ <xsl:otherwise>
666
+ <fo:block font-size="12pt" font-weight="bold" margin-top="14pt">
667
+ <xsl:call-template name="addLetterSpacing">
668
+ <xsl:with-param name="text" select="$stage_uc"/>
669
+ </xsl:call-template>
670
+ </fo:block>
671
+ </xsl:otherwise>
672
+ </xsl:choose>
672
673
 
673
- <fo:block-container absolute-position="fixed" left="16.5mm" top="204mm" height="60mm" width="180mm" display-align="after" font-size="10pt">
674
- <fo:block line-height="140%">
675
- <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = '']"/>
676
- <fo:block>
677
- <fo:inline font-weight="bold">
678
- <!-- Submission Date: -->
679
- <xsl:call-template name="getLocalizedString">
680
- <xsl:with-param name="key">submission_date</xsl:with-param>
681
- </xsl:call-template><xsl:text>: </xsl:text>
682
- </fo:inline>
683
- <xsl:choose>
684
- <xsl:when test="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on">
685
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on"/>
686
- </xsl:when>
687
- <xsl:otherwise>XXX</xsl:otherwise>
688
- </xsl:choose>
689
- </fo:block>
690
- <fo:block>
691
- <fo:inline font-weight="bold">
692
- <!-- Approval Date: -->
693
- <xsl:call-template name="getLocalizedString">
694
- <xsl:with-param name="key">approval_date</xsl:with-param>
695
- </xsl:call-template><xsl:text>: </xsl:text>
696
- </fo:inline>
697
- <xsl:choose>
698
- <xsl:when test="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on">
699
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on"/>
700
- </xsl:when>
701
- <xsl:otherwise>XXX</xsl:otherwise>
702
- </xsl:choose>
703
- </fo:block>
704
- <fo:block>
705
- <fo:inline font-weight="bold">
706
- <!-- Publication Date: -->
707
- <xsl:call-template name="getLocalizedString">
708
- <xsl:with-param name="key">publication_date</xsl:with-param>
709
- </xsl:call-template><xsl:text>: </xsl:text>
710
- </fo:inline>
711
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']/mn:on"/>
712
- </fo:block>
674
+ </fo:block>
675
+ </fo:block-container>
676
+ </fo:block-container>
713
677
 
714
- <fo:block margin-bottom="12pt">
715
- <xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
678
+ <fo:block-container absolute-position="fixed" left="16.5mm" top="204mm" height="60mm" width="180mm" display-align="after" font-size="10pt">
679
+ <fo:block line-height="140%">
680
+ <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = '']"/>
716
681
  <fo:block>
717
682
  <fo:inline font-weight="bold">
718
- <!-- Author: -->
683
+ <!-- Submission Date: -->
719
684
  <xsl:call-template name="getLocalizedString">
720
- <xsl:with-param name="key">author</xsl:with-param>
685
+ <xsl:with-param name="key">submission_date</xsl:with-param>
721
686
  </xsl:call-template><xsl:text>: </xsl:text>
722
687
  </fo:inline>
723
- <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
724
- <xsl:value-of select="."/>
725
- <xsl:if test="position() != last()">, </xsl:if>
726
- </xsl:for-each>
688
+ <xsl:choose>
689
+ <xsl:when test="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on">
690
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on"/>
691
+ </xsl:when>
692
+ <xsl:otherwise>XXX</xsl:otherwise>
693
+ </xsl:choose>
727
694
  </fo:block>
728
- </xsl:if>
729
- <xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
730
695
  <fo:block>
731
696
  <fo:inline font-weight="bold">
732
- <!-- Editor: -->
733
- <xsl:call-template name="getLocalizedString">
734
- <xsl:with-param name="key">editor_full</xsl:with-param>
735
- </xsl:call-template><xsl:text>: </xsl:text>
697
+ <!-- Approval Date: -->
698
+ <xsl:call-template name="getLocalizedString">
699
+ <xsl:with-param name="key">approval_date</xsl:with-param>
700
+ </xsl:call-template><xsl:text>: </xsl:text>
736
701
  </fo:inline>
737
- <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
738
- <xsl:value-of select="."/>
739
- <xsl:if test="position() != last()">, </xsl:if>
740
- </xsl:for-each>
702
+ <xsl:choose>
703
+ <xsl:when test="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on">
704
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on"/>
705
+ </xsl:when>
706
+ <xsl:otherwise>XXX</xsl:otherwise>
707
+ </xsl:choose>
741
708
  </fo:block>
742
- </xsl:if>
743
- <xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='contributor']/mn:person/mn:name/mn:completename">
744
709
  <fo:block>
745
710
  <fo:inline font-weight="bold">
746
- <!-- Contributor: -->
711
+ <!-- Publication Date: -->
747
712
  <xsl:call-template name="getLocalizedString">
748
- <xsl:with-param name="key">contributor</xsl:with-param>
713
+ <xsl:with-param name="key">publication_date</xsl:with-param>
749
714
  </xsl:call-template><xsl:text>: </xsl:text>
750
715
  </fo:inline>
751
- <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='contributor']/mn:person/mn:name/mn:completename">
752
- <xsl:value-of select="."/>
753
- <xsl:if test="position() != last()">, </xsl:if>
754
- </xsl:for-each>
716
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']/mn:on"/>
755
717
  </fo:block>
756
- </xsl:if>
757
- </fo:block>
758
- </fo:block>
759
718
 
760
- <xsl:choose>
761
- <xsl:when test="$isLegacy = 'true'">
762
- <fo:block-container margin-left="-7mm" color="{$color_design}" background-color="{$color_background_blue}" width="202mm">
763
- <fo:block-container margin-left="2.5mm" margin-right="1mm" padding-top="0.5mm" padding-bottom="0.5mm">
764
- <fo:block-container margin-left="0mm" margin-right="0mm">
719
+ <fo:block margin-bottom="12pt">
720
+ <xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
765
721
  <fo:block>
766
- <xsl:variable name="legal_statement">
767
- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
768
- </xsl:variable>
769
- <xsl:apply-templates select="xalan:nodeset($legal_statement)/*">
770
- <xsl:with-param name="isLegacy" select="$isLegacy"/>
771
- </xsl:apply-templates>
722
+ <fo:inline font-weight="bold">
723
+ <!-- Author: -->
724
+ <xsl:call-template name="getLocalizedString">
725
+ <xsl:with-param name="key">author</xsl:with-param>
726
+ </xsl:call-template><xsl:text>: </xsl:text>
727
+ </fo:inline>
728
+ <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
729
+ <xsl:value-of select="."/>
730
+ <xsl:if test="position() != last()">, </xsl:if>
731
+ </xsl:for-each>
732
+ </fo:block>
733
+ </xsl:if>
734
+ <xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
735
+ <fo:block>
736
+ <fo:inline font-weight="bold">
737
+ <!-- Editor: -->
738
+ <xsl:call-template name="getLocalizedString">
739
+ <xsl:with-param name="key">editor_full</xsl:with-param>
740
+ </xsl:call-template><xsl:text>: </xsl:text>
741
+ </fo:inline>
742
+ <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
743
+ <xsl:value-of select="."/>
744
+ <xsl:if test="position() != last()">, </xsl:if>
745
+ </xsl:for-each>
772
746
  </fo:block>
747
+ </xsl:if>
748
+ <xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='contributor']/mn:person/mn:name/mn:completename">
749
+ <fo:block>
750
+ <fo:inline font-weight="bold">
751
+ <!-- Contributor: -->
752
+ <xsl:call-template name="getLocalizedString">
753
+ <xsl:with-param name="key">contributor</xsl:with-param>
754
+ </xsl:call-template><xsl:text>: </xsl:text>
755
+ </fo:inline>
756
+ <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='contributor']/mn:person/mn:name/mn:completename">
757
+ <xsl:value-of select="."/>
758
+ <xsl:if test="position() != last()">, </xsl:if>
759
+ </xsl:for-each>
760
+ </fo:block>
761
+ </xsl:if>
762
+ </fo:block>
763
+ </fo:block>
764
+
765
+ <xsl:choose>
766
+ <xsl:when test="$isLegacy = 'true'">
767
+ <fo:block-container margin-left="-7mm" color="{$color_design}" background-color="{$color_background_blue}" width="202mm">
768
+ <fo:block-container margin-left="2.5mm" margin-right="1mm" padding-top="0.5mm" padding-bottom="0.5mm">
769
+ <fo:block-container margin-left="0mm" margin-right="0mm">
770
+ <fo:block>
771
+ <xsl:variable name="legal_statement">
772
+ <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
773
+ </xsl:variable>
774
+ <xsl:apply-templates select="xalan:nodeset($legal_statement)/*">
775
+ <xsl:with-param name="isLegacy" select="$isLegacy"/>
776
+ </xsl:apply-templates>
777
+ </fo:block>
778
+ </fo:block-container>
779
+ </fo:block-container>
773
780
  </fo:block-container>
774
- </fo:block-container>
775
- </fo:block-container>
776
- </xsl:when>
777
- <xsl:otherwise>
778
- <xsl:variable name="legal_statement">
779
- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
780
- </xsl:variable>
781
- <xsl:apply-templates select="xalan:nodeset($legal_statement)/*"/>
782
- </xsl:otherwise>
783
- </xsl:choose>
781
+ </xsl:when>
782
+ <xsl:otherwise>
783
+ <xsl:variable name="legal_statement">
784
+ <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
785
+ </xsl:variable>
786
+ <xsl:apply-templates select="xalan:nodeset($legal_statement)/*"/>
787
+ </xsl:otherwise>
788
+ </xsl:choose>
784
789
 
785
- </fo:block-container>
790
+ </fo:block-container>
786
791
 
787
- </fo:flow>
788
- </fo:page-sequence>
792
+ </fo:flow>
793
+ </fo:page-sequence>
794
+ </xsl:otherwise>
795
+ </xsl:choose>
789
796
  </xsl:template> <!-- END: cover-page -->
790
797
 
791
798
  <xsl:template name="inner-cover-page">
@@ -1525,8 +1532,8 @@
1525
1532
  </xsl:template>
1526
1533
 
1527
1534
  <xsl:template match="mn:term/mn:fmt-name" priority="2">
1528
- <fo:block xsl:use-attribute-sets="term-name-style">
1529
- <xsl:call-template name="refine_term-name-style"/>
1535
+ <fo:block xsl:use-attribute-sets="term-number-style">
1536
+ <xsl:call-template name="refine_term-number-style"/>
1530
1537
  <fo:list-block color="{$color_text_title}" keep-with-next="always" provisional-distance-between-starts="{string-length()*3.25}mm">
1531
1538
  <fo:list-item>
1532
1539
  <fo:list-item-label end-indent="label-end()">
@@ -1547,7 +1554,7 @@
1547
1554
 
1548
1555
  <!-- first preferred displays on the same line as term/name -->
1549
1556
  <xsl:template match="mn:fmt-preferred[not(preceding-sibling::mn:fmt-preferred)]" mode="term_name" priority="2">
1550
- <fo:inline xsl:use-attribute-sets="preferred-term-style"><xsl:call-template name="refine_preferred-term-style"/><xsl:apply-templates/></fo:inline>
1557
+ <fo:inline xsl:use-attribute-sets="term-preferred-style"><xsl:call-template name="refine_term-preferred-style"/><xsl:apply-templates/></fo:inline>
1551
1558
  <fo:inline padding-right="2mm"> </fo:inline>
1552
1559
  </xsl:template>
1553
1560
 
@@ -1637,6 +1644,17 @@
1637
1644
  </xsl:template>
1638
1645
 
1639
1646
  <xsl:template name="insertHeaderFooter">
1647
+ <xsl:param name="color" select="$color_text_title"/>
1648
+ <xsl:call-template name="insertHeader"/>
1649
+ <xsl:call-template name="insertFooter">
1650
+ <xsl:with-param name="color" select="$color"/>
1651
+ </xsl:call-template>
1652
+ </xsl:template>
1653
+
1654
+ <xsl:template name="insertHeader">
1655
+ </xsl:template>
1656
+
1657
+ <xsl:template name="insertFooter">
1640
1658
  <xsl:param name="color" select="$color_text_title"/>
1641
1659
  <fo:static-content flow-name="footer" role="artifact">
1642
1660
  <fo:block-container font-size="8pt" color="{$color}" padding-top="6mm">
@@ -5322,7 +5340,7 @@
5322
5340
  <xsl:template name="refine_term-style">
5323
5341
  </xsl:template>
5324
5342
 
5325
- <xsl:attribute-set name="term-name-style">
5343
+ <xsl:attribute-set name="term-number-style">
5326
5344
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5327
5345
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5328
5346
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -5331,89 +5349,83 @@
5331
5349
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5332
5350
  </xsl:attribute-set> <!-- term-name-style -->
5333
5351
 
5334
- <xsl:template name="refine_term-name-style">
5352
+ <xsl:template name="refine_term-number-style">
5335
5353
  <xsl:variable name="levelTerm">
5336
5354
  <xsl:call-template name="getLevelTermName"/>
5337
5355
  </xsl:variable>
5338
5356
  <xsl:attribute name="role">H<xsl:value-of select="$levelTerm"/></xsl:attribute>
5339
5357
  </xsl:template>
5340
5358
 
5341
- <xsl:attribute-set name="preferred-style">
5342
- </xsl:attribute-set> <!-- preferred-style -->
5343
-
5344
- <xsl:template name="refine_preferred-style">
5345
- </xsl:template>
5346
-
5347
- <xsl:attribute-set name="preferred-block-style">
5359
+ <xsl:attribute-set name="term-preferred-block-style">
5348
5360
  </xsl:attribute-set> <!-- preferred-block-style -->
5349
5361
 
5350
- <xsl:template name="refine_preferred-block-style">
5362
+ <xsl:template name="refine_term-preferred-block-style">
5351
5363
  </xsl:template>
5352
5364
 
5353
- <xsl:attribute-set name="preferred-term-style">
5365
+ <xsl:attribute-set name="term-preferred-style">
5354
5366
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5355
5367
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5356
5368
  <xsl:attribute name="font-size">18pt</xsl:attribute>
5357
5369
  <xsl:attribute name="padding-right">3mm</xsl:attribute>
5358
5370
  </xsl:attribute-set> <!-- preferred-term-style -->
5359
5371
 
5360
- <xsl:template name="refine_preferred-term-style">
5372
+ <xsl:template name="refine_term-preferred-style">
5361
5373
  <xsl:if test="mn:strong">
5362
5374
  <xsl:attribute name="font-weight">normal</xsl:attribute>
5363
5375
  </xsl:if>
5364
5376
  </xsl:template>
5365
5377
 
5366
- <xsl:attribute-set name="domain-style">
5367
- </xsl:attribute-set> <!-- domain-style -->
5378
+ <xsl:attribute-set name="term-domain-style">
5379
+ </xsl:attribute-set> <!-- term-domain-style -->
5368
5380
 
5369
- <xsl:template name="refine_domain-style">
5381
+ <xsl:template name="refine_term-domain-style">
5370
5382
  </xsl:template>
5371
5383
 
5372
- <xsl:attribute-set name="admitted-style">
5384
+ <xsl:attribute-set name="term-admitted-style">
5373
5385
  <xsl:attribute name="font-size">11pt</xsl:attribute>
5374
- </xsl:attribute-set> <!-- admitted-style -->
5386
+ </xsl:attribute-set> <!-- term-admitted-style -->
5375
5387
 
5376
- <xsl:template name="refine_admitted-style">
5388
+ <xsl:template name="refine_term-admitted-style">
5377
5389
  </xsl:template>
5378
5390
 
5379
- <xsl:attribute-set name="deprecates-style">
5380
- </xsl:attribute-set> <!-- deprecates-style -->
5391
+ <xsl:attribute-set name="term-deprecates-style">
5392
+ </xsl:attribute-set> <!-- term-deprecates-style -->
5381
5393
 
5382
- <xsl:template name="refine_deprecates-style">
5394
+ <xsl:template name="refine_term-deprecates-style">
5383
5395
  </xsl:template>
5384
5396
 
5385
- <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
5397
+ <xsl:attribute-set name="term-related-block-style" use-attribute-sets="term-preferred-block-style">
5386
5398
  </xsl:attribute-set>
5387
5399
 
5388
- <xsl:template name="refine_related-block-style">
5400
+ <xsl:template name="refine_term-related-block-style">
5389
5401
  </xsl:template>
5390
5402
 
5391
- <xsl:attribute-set name="definition-style">
5403
+ <xsl:attribute-set name="term-definition-style">
5392
5404
  <xsl:attribute name="space-after">6pt</xsl:attribute>
5393
- </xsl:attribute-set> <!-- definition-style -->
5405
+ </xsl:attribute-set> <!-- term-definition-style -->
5394
5406
 
5395
- <xsl:template name="refine_definition-style">
5407
+ <xsl:template name="refine_term-definition-style">
5396
5408
  </xsl:template>
5397
5409
 
5398
- <xsl:attribute-set name="termsource-style">
5410
+ <xsl:attribute-set name="term-termsource-style">
5399
5411
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5400
5412
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
5401
- </xsl:attribute-set> <!-- termsource-style -->
5413
+ </xsl:attribute-set> <!-- term-termsource-style -->
5402
5414
 
5403
- <xsl:template name="refine_termsource-style">
5404
- </xsl:template> <!-- refine_termsource-style -->
5415
+ <xsl:template name="refine_term-termsource-style">
5416
+ </xsl:template> <!-- refine_term-termsource-style -->
5405
5417
 
5406
- <xsl:attribute-set name="termsource-text-style">
5418
+ <xsl:attribute-set name="term-termsource-text-style">
5407
5419
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
5408
- </xsl:attribute-set> <!-- termsource-text-style -->
5420
+ </xsl:attribute-set> <!-- term-termsource-text-style -->
5409
5421
 
5410
- <xsl:template name="refine_termsource-text-style">
5422
+ <xsl:template name="refine_term-termsource-text-style">
5411
5423
  </xsl:template>
5412
5424
 
5413
- <xsl:attribute-set name="origin-style">
5414
- </xsl:attribute-set> <!-- origin-style -->
5425
+ <xsl:attribute-set name="term-origin-style">
5426
+ </xsl:attribute-set> <!-- term-origin-style -->
5415
5427
 
5416
- <xsl:template name="refine_origin-style">
5428
+ <xsl:template name="refine_term-origin-style">
5417
5429
  </xsl:template>
5418
5430
 
5419
5431
  <!-- ====== -->
@@ -5458,9 +5470,9 @@
5458
5470
  <!-- modification -->
5459
5471
  <!-- ====== -->
5460
5472
  <xsl:template match="mn:fmt-termsource" name="termsource">
5461
- <fo:block xsl:use-attribute-sets="termsource-style">
5473
+ <fo:block xsl:use-attribute-sets="term-termsource-style">
5462
5474
 
5463
- <xsl:call-template name="refine_termsource-style"/>
5475
+ <xsl:call-template name="refine_term-termsource-style"/>
5464
5476
 
5465
5477
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
5466
5478
  <xsl:variable name="termsource_text">
@@ -5508,8 +5520,8 @@
5508
5520
 
5509
5521
  <!-- text SOURCE: -->
5510
5522
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
5511
- <fo:inline xsl:use-attribute-sets="termsource-text-style">
5512
- <xsl:call-template name="refine_termsource-text-style"/>
5523
+ <fo:inline xsl:use-attribute-sets="term-termsource-text-style">
5524
+ <xsl:call-template name="refine_term-termsource-text-style"/>
5513
5525
  <xsl:value-of select="."/>
5514
5526
  </fo:inline>
5515
5527
  </xsl:template>
@@ -5521,8 +5533,8 @@
5521
5533
  <xsl:if test="normalize-space(@citeas) = ''">
5522
5534
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
5523
5535
  </xsl:if>
5524
- <fo:inline xsl:use-attribute-sets="origin-style">
5525
- <xsl:call-template name="refine_origin-style"/>
5536
+ <fo:inline xsl:use-attribute-sets="term-origin-style">
5537
+ <xsl:call-template name="refine_term-origin-style"/>
5526
5538
  <xsl:apply-templates/>
5527
5539
  </fo:inline>
5528
5540
  </fo:basic-link>
@@ -5570,14 +5582,14 @@
5570
5582
  <xsl:variable name="levelTerm">
5571
5583
  <xsl:call-template name="getLevelTermName"/>
5572
5584
  </xsl:variable>
5573
- <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
5585
+ <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="term-preferred-block-style">
5574
5586
 
5575
- <xsl:call-template name="refine_preferred-block-style"/>
5587
+ <xsl:call-template name="refine_term-preferred-block-style"/>
5576
5588
 
5577
5589
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
5578
5590
 
5579
- <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
5580
- <xsl:call-template name="refine_term-name-style"/>
5591
+ <fo:block xsl:use-attribute-sets="term-number-style" role="SKIP">
5592
+ <xsl:call-template name="refine_term-number-style"/>
5581
5593
 
5582
5594
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
5583
5595
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -5587,8 +5599,8 @@
5587
5599
  </fo:block>
5588
5600
  </xsl:if>
5589
5601
 
5590
- <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
5591
- <xsl:call-template name="refine_preferred-term-style"/>
5602
+ <fo:block xsl:use-attribute-sets="term-preferred-style" role="SKIP">
5603
+ <xsl:call-template name="refine_term-preferred-style"/>
5592
5604
 
5593
5605
  <xsl:apply-templates/>
5594
5606
  </fo:block>
@@ -5608,15 +5620,15 @@
5608
5620
  <xsl:template match="mn:domain"/>
5609
5621
 
5610
5622
  <xsl:template match="mn:fmt-admitted">
5611
- <fo:block xsl:use-attribute-sets="admitted-style">
5612
- <xsl:call-template name="refine_admitted-style"/>
5623
+ <fo:block xsl:use-attribute-sets="term-admitted-style">
5624
+ <xsl:call-template name="refine_term-admitted-style"/>
5613
5625
  <xsl:apply-templates/>
5614
5626
  </fo:block>
5615
5627
  </xsl:template>
5616
5628
 
5617
5629
  <xsl:template match="mn:fmt-deprecates">
5618
- <fo:block xsl:use-attribute-sets="deprecates-style">
5619
- <xsl:call-template name="refine_deprecates-style"/>
5630
+ <fo:block xsl:use-attribute-sets="term-deprecates-style">
5631
+ <xsl:call-template name="refine_term-deprecates-style"/>
5620
5632
  <xsl:apply-templates/>
5621
5633
  </fo:block>
5622
5634
  </xsl:template>
@@ -5629,8 +5641,8 @@
5629
5641
  <!-- End Preferred, admitted, deprecated -->
5630
5642
 
5631
5643
  <xsl:template match="mn:fmt-related">
5632
- <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
5633
- <xsl:call-template name="refine_related-block-style"/>
5644
+ <fo:block role="SKIP" xsl:use-attribute-sets="term-related-block-style">
5645
+ <xsl:call-template name="refine_term-related-block-style"/>
5634
5646
  <xsl:apply-templates/>
5635
5647
  </fo:block>
5636
5648
  </xsl:template>
@@ -5644,8 +5656,8 @@
5644
5656
  <!-- definition -->
5645
5657
  <!-- ========== -->
5646
5658
  <xsl:template match="mn:fmt-definition">
5647
- <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
5648
- <xsl:call-template name="refine_definition-style"/>
5659
+ <fo:block xsl:use-attribute-sets="term-definition-style" role="SKIP">
5660
+ <xsl:call-template name="refine_term-definition-style"/>
5649
5661
  <xsl:apply-templates/>
5650
5662
  </fo:block>
5651
5663
  </xsl:template>
@@ -15521,6 +15533,20 @@
15521
15533
  </fo:block-container>
15522
15534
  </xsl:template>
15523
15535
 
15536
+ <!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
15537
+ <xsl:template name="insertCoverPageFullImage">
15538
+ <xsl:param name="name">coverpage-image</xsl:param>
15539
+ <xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image">
15540
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
15541
+ <fo:flow flow-name="xsl-region-body">
15542
+ <xsl:call-template name="insertBackgroundPageImage">
15543
+ <xsl:with-param name="number" select="position()"/>
15544
+ </xsl:call-template>
15545
+ </fo:flow>
15546
+ </fo:page-sequence>
15547
+ </xsl:for-each>
15548
+ </xsl:template>
15549
+
15524
15550
  <xsl:template name="insertPageImage">
15525
15551
  <xsl:param name="svg_content_height" select="$pageHeight"/>
15526
15552
  <xsl:param name="bitmap_width" select="$pageWidth"/>