metanorma-ogc 2.8.6 → 2.8.8

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.
@@ -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"/>
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"/>
545
550
 
546
- <fo:flow flow-name="xsl-region-body" color="white">
551
+ <fo:flow flow-name="xsl-region-body" color="white">
547
552
 
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')"/>
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')"/>
551
556
 
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>
558
-
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">
626
+ <xsl:call-template name="addLetterSpacing">
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>
662
644
  <xsl:call-template name="addLetterSpacing">
663
- <xsl:with-param name="text" select="$stage_uc"/>
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 xsl:use-attribute-sets="reset-margins-style">
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>
772
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>
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 xsl:use-attribute-sets="reset-margins-style">
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">
@@ -852,7 +859,7 @@
852
859
  <xsl:template name="insertListOf_Title">
853
860
  <xsl:param name="title"/>
854
861
  <fo:block-container xsl:use-attribute-sets="toc-listof-title-style">
855
- <fo:block-container margin-left="0mm" role="H2">
862
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style" role="H2">
856
863
  <xsl:call-template name="insertSectionTitle">
857
864
  <xsl:with-param name="title" select="$title"/>
858
865
  </xsl:call-template>
@@ -1015,7 +1022,7 @@
1015
1022
  </xsl:variable>
1016
1023
 
1017
1024
  <fo:block-container margin-left="-18mm" margin-bottom="40pt">
1018
- <fo:block-container margin-left="0mm">
1025
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
1019
1026
  <fo:block xsl:use-attribute-sets="toc-title-style">
1020
1027
  <xsl:call-template name="addLetterSpacing">
1021
1028
  <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($title-toc))"/>
@@ -1325,24 +1332,6 @@
1325
1332
  <xsl:call-template name="getLevel"/>
1326
1333
  </xsl:variable>
1327
1334
 
1328
- <xsl:variable name="font-size">
1329
- <xsl:choose>
1330
- <xsl:when test="$level = 3">14pt</xsl:when>
1331
- <xsl:when test="$level = 4">12pt</xsl:when>
1332
- <xsl:when test="$level &gt;= 5">11pt</xsl:when>
1333
- <xsl:otherwise>18pt</xsl:otherwise>
1334
- </xsl:choose>
1335
- </xsl:variable>
1336
-
1337
- <xsl:variable name="font-weight">
1338
- <xsl:choose>
1339
- <xsl:when test="$level = 3">bold</xsl:when>
1340
- <xsl:when test="$level = 4">bold</xsl:when>
1341
- <xsl:when test="$level = 5">bold</xsl:when>
1342
- <xsl:otherwise>normal</xsl:otherwise>
1343
- </xsl:choose>
1344
- </xsl:variable>
1345
-
1346
1335
  <xsl:variable name="element-name">
1347
1336
  <xsl:choose>
1348
1337
  <xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
@@ -1350,11 +1339,14 @@
1350
1339
  </xsl:choose>
1351
1340
  </xsl:variable>
1352
1341
 
1342
+ <xsl:variable name="title_styles"><styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"/></styles></xsl:variable>
1343
+
1353
1344
  <xsl:choose>
1354
1345
  <xsl:when test="$level = 1">
1355
1346
  <fo:block-container margin-left="-22mm" role="SKIP">
1356
- <fo:block-container margin-left="0mm" role="SKIP">
1357
- <fo:block margin-bottom="10pt" space-before="36pt" keep-with-next="always" role="H{$level}">
1347
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
1348
+ <fo:block>
1349
+ <xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*[local-name() = 'space-before' or local-name() = 'margin-bottom' or local-name() = 'keep-with-next' or local-name() = 'role']"/>
1358
1350
  <fo:table table-layout="fixed" width="100%">
1359
1351
  <fo:table-column column-width="22mm"/>
1360
1352
  <fo:table-column column-width="158mm"/>
@@ -1370,7 +1362,8 @@
1370
1362
  </fo:block>
1371
1363
  </fo:table-cell>
1372
1364
  <fo:table-cell>
1373
- <fo:block space-before="36pt">
1365
+ <fo:block>
1366
+ <xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*[local-name() = 'space-before']"/>
1374
1367
  <xsl:variable name="title">
1375
1368
  <xsl:choose>
1376
1369
  <xsl:when test="mn:tab">
@@ -1394,8 +1387,8 @@
1394
1387
  </fo:block-container>
1395
1388
  </xsl:when>
1396
1389
  <xsl:when test="$level = 2">
1397
- <fo:block space-before="24pt" margin-bottom="10pt" role="H{$level}">
1398
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1390
+ <fo:block>
1391
+ <xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*[local-name() = 'space-before' or local-name() = 'margin-bottom' or local-name() = 'keep-with-next' or local-name() = 'role']"/>
1399
1392
  <xsl:variable name="title">
1400
1393
  <xsl:choose>
1401
1394
  <xsl:when test="mn:tab">
@@ -1416,13 +1409,8 @@
1416
1409
  </xsl:when>
1417
1410
  <xsl:otherwise>
1418
1411
  <xsl:element name="{$element-name}">
1419
- <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
1420
- <xsl:attribute name="font-weight"><xsl:value-of select="$font-weight"/></xsl:attribute>
1421
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1422
- <xsl:attribute name="margin-top">30pt</xsl:attribute>
1423
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1424
- <xsl:attribute name="color"><xsl:value-of select="$color_text_title"/></xsl:attribute>
1425
- <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
1412
+ <xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
1413
+
1426
1414
  <xsl:apply-templates/>
1427
1415
  <xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
1428
1416
  </xsl:element>
@@ -1447,21 +1435,15 @@
1447
1435
  <xsl:otherwise>fo:block</xsl:otherwise>
1448
1436
  </xsl:choose>
1449
1437
  </xsl:variable>
1450
- <xsl:element name="{$element-name}">
1451
- <xsl:copy-of select="@id"/>
1452
1438
 
1453
- <xsl:call-template name="setBlockAttributes"/>
1439
+ <xsl:variable name="p_styles">
1440
+ <styles xsl:use-attribute-sets="p-style">
1441
+ <xsl:call-template name="refine_p-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template>
1442
+ </styles>
1443
+ </xsl:variable>
1454
1444
 
1455
- <xsl:if test="not(ancestor::mn:table)">
1456
- <xsl:attribute name="line-height">124%</xsl:attribute>
1457
- <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
1458
- </xsl:if>
1459
- <xsl:if test="ancestor::mn:dd and not(ancestor::mn:table)">
1460
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
1461
- <xsl:if test="not(ancestor::mn:dd[1]/following-sibling::mn:dt)">
1462
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
1463
- </xsl:if>
1464
- </xsl:if>
1445
+ <xsl:element name="{$element-name}">
1446
+ <xsl:copy-of select="xalan:nodeset($p_styles)/styles/@*"/>
1465
1447
 
1466
1448
  <xsl:apply-templates>
1467
1449
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -1500,7 +1482,7 @@
1500
1482
  <xsl:attribute name="margin-top">1mm</xsl:attribute>
1501
1483
  </xsl:if>
1502
1484
  </xsl:if>
1503
- <fo:block-container margin-left="0mm">
1485
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
1504
1486
  <fo:list-block xsl:use-attribute-sets="list-style">
1505
1487
  <xsl:call-template name="refine_list-style"/>
1506
1488
 
@@ -1525,8 +1507,8 @@
1525
1507
  </xsl:template>
1526
1508
 
1527
1509
  <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"/>
1510
+ <fo:block xsl:use-attribute-sets="term-number-style">
1511
+ <xsl:call-template name="refine_term-number-style"/>
1530
1512
  <fo:list-block color="{$color_text_title}" keep-with-next="always" provisional-distance-between-starts="{string-length()*3.25}mm">
1531
1513
  <fo:list-item>
1532
1514
  <fo:list-item-label end-indent="label-end()">
@@ -1547,7 +1529,7 @@
1547
1529
 
1548
1530
  <!-- first preferred displays on the same line as term/name -->
1549
1531
  <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>
1532
+ <fo:inline xsl:use-attribute-sets="term-preferred-style"><xsl:call-template name="refine_term-preferred-style"/><xsl:apply-templates/></fo:inline>
1551
1533
  <fo:inline padding-right="2mm"> </fo:inline>
1552
1534
  </xsl:template>
1553
1535
 
@@ -3972,6 +3954,10 @@
3972
3954
  </xsl:element>
3973
3955
  </xsl:template>
3974
3956
 
3957
+ <!-- show sourcecode's name 'before' or 'after' source code -->
3958
+ <xsl:variable name="sourcecode-name-position"><xsl:text>after</xsl:text>
3959
+ </xsl:variable>
3960
+
3975
3961
  <xsl:template match="mn:sourcecode" name="sourcecode">
3976
3962
 
3977
3963
  <xsl:variable name="sourcecode_attributes">
@@ -3995,7 +3981,12 @@
3995
3981
 
3996
3982
  <xsl:call-template name="refine_sourcecode-container-style"/>
3997
3983
 
3998
- <fo:block-container margin-left="0mm" role="SKIP">
3984
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
3985
+
3986
+ <!-- <xsl:if test="$namespace = 'rsd'"> -->
3987
+ <xsl:if test="$sourcecode-name-position = 'before'">
3988
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
3989
+ </xsl:if>
3999
3990
  <xsl:if test="parent::mn:example">
4000
3991
  <fo:block font-size="1pt" line-height="10%" space-after="4pt"> </fo:block>
4001
3992
  </xsl:if>
@@ -4020,7 +4011,16 @@
4020
4011
  </fo:block>
4021
4012
 
4022
4013
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
4023
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
4014
+
4015
+ <!-- <xsl:choose>
4016
+ <xsl:when test="$namespace = 'rsd'"></xsl:when>
4017
+ <xsl:otherwise>
4018
+ <xsl:apply-templates select="mn:fmt-name" /> --><!-- show sourcecode's name AFTER content -->
4019
+ <!-- </xsl:otherwise>
4020
+ </xsl:choose> -->
4021
+ <xsl:if test="$sourcecode-name-position = 'after'">
4022
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
4023
+ </xsl:if>
4024
4024
  <xsl:if test="parent::mn:example">
4025
4025
  <fo:block font-size="1pt" line-height="10%" space-before="6pt"> </fo:block>
4026
4026
  </xsl:if>
@@ -5333,7 +5333,7 @@
5333
5333
  <xsl:template name="refine_term-style">
5334
5334
  </xsl:template>
5335
5335
 
5336
- <xsl:attribute-set name="term-name-style">
5336
+ <xsl:attribute-set name="term-number-style">
5337
5337
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5338
5338
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5339
5339
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -5342,89 +5342,83 @@
5342
5342
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5343
5343
  </xsl:attribute-set> <!-- term-name-style -->
5344
5344
 
5345
- <xsl:template name="refine_term-name-style">
5345
+ <xsl:template name="refine_term-number-style">
5346
5346
  <xsl:variable name="levelTerm">
5347
5347
  <xsl:call-template name="getLevelTermName"/>
5348
5348
  </xsl:variable>
5349
5349
  <xsl:attribute name="role">H<xsl:value-of select="$levelTerm"/></xsl:attribute>
5350
5350
  </xsl:template>
5351
5351
 
5352
- <xsl:attribute-set name="preferred-style">
5353
- </xsl:attribute-set> <!-- preferred-style -->
5354
-
5355
- <xsl:template name="refine_preferred-style">
5356
- </xsl:template>
5357
-
5358
- <xsl:attribute-set name="preferred-block-style">
5352
+ <xsl:attribute-set name="term-preferred-block-style">
5359
5353
  </xsl:attribute-set> <!-- preferred-block-style -->
5360
5354
 
5361
- <xsl:template name="refine_preferred-block-style">
5355
+ <xsl:template name="refine_term-preferred-block-style">
5362
5356
  </xsl:template>
5363
5357
 
5364
- <xsl:attribute-set name="preferred-term-style">
5358
+ <xsl:attribute-set name="term-preferred-style">
5365
5359
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5366
5360
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5367
5361
  <xsl:attribute name="font-size">18pt</xsl:attribute>
5368
5362
  <xsl:attribute name="padding-right">3mm</xsl:attribute>
5369
5363
  </xsl:attribute-set> <!-- preferred-term-style -->
5370
5364
 
5371
- <xsl:template name="refine_preferred-term-style">
5365
+ <xsl:template name="refine_term-preferred-style">
5372
5366
  <xsl:if test="mn:strong">
5373
5367
  <xsl:attribute name="font-weight">normal</xsl:attribute>
5374
5368
  </xsl:if>
5375
5369
  </xsl:template>
5376
5370
 
5377
- <xsl:attribute-set name="domain-style">
5378
- </xsl:attribute-set> <!-- domain-style -->
5371
+ <xsl:attribute-set name="term-domain-style">
5372
+ </xsl:attribute-set> <!-- term-domain-style -->
5379
5373
 
5380
- <xsl:template name="refine_domain-style">
5374
+ <xsl:template name="refine_term-domain-style">
5381
5375
  </xsl:template>
5382
5376
 
5383
- <xsl:attribute-set name="admitted-style">
5377
+ <xsl:attribute-set name="term-admitted-style">
5384
5378
  <xsl:attribute name="font-size">11pt</xsl:attribute>
5385
- </xsl:attribute-set> <!-- admitted-style -->
5379
+ </xsl:attribute-set> <!-- term-admitted-style -->
5386
5380
 
5387
- <xsl:template name="refine_admitted-style">
5381
+ <xsl:template name="refine_term-admitted-style">
5388
5382
  </xsl:template>
5389
5383
 
5390
- <xsl:attribute-set name="deprecates-style">
5391
- </xsl:attribute-set> <!-- deprecates-style -->
5384
+ <xsl:attribute-set name="term-deprecates-style">
5385
+ </xsl:attribute-set> <!-- term-deprecates-style -->
5392
5386
 
5393
- <xsl:template name="refine_deprecates-style">
5387
+ <xsl:template name="refine_term-deprecates-style">
5394
5388
  </xsl:template>
5395
5389
 
5396
- <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
5390
+ <xsl:attribute-set name="term-related-block-style" use-attribute-sets="term-preferred-block-style">
5397
5391
  </xsl:attribute-set>
5398
5392
 
5399
- <xsl:template name="refine_related-block-style">
5393
+ <xsl:template name="refine_term-related-block-style">
5400
5394
  </xsl:template>
5401
5395
 
5402
- <xsl:attribute-set name="definition-style">
5396
+ <xsl:attribute-set name="term-definition-style">
5403
5397
  <xsl:attribute name="space-after">6pt</xsl:attribute>
5404
- </xsl:attribute-set> <!-- definition-style -->
5398
+ </xsl:attribute-set> <!-- term-definition-style -->
5405
5399
 
5406
- <xsl:template name="refine_definition-style">
5400
+ <xsl:template name="refine_term-definition-style">
5407
5401
  </xsl:template>
5408
5402
 
5409
- <xsl:attribute-set name="termsource-style">
5403
+ <xsl:attribute-set name="term-termsource-style">
5410
5404
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5411
5405
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
5412
- </xsl:attribute-set> <!-- termsource-style -->
5406
+ </xsl:attribute-set> <!-- term-termsource-style -->
5413
5407
 
5414
- <xsl:template name="refine_termsource-style">
5415
- </xsl:template> <!-- refine_termsource-style -->
5408
+ <xsl:template name="refine_term-termsource-style">
5409
+ </xsl:template> <!-- refine_term-termsource-style -->
5416
5410
 
5417
- <xsl:attribute-set name="termsource-text-style">
5411
+ <xsl:attribute-set name="term-termsource-text-style">
5418
5412
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
5419
- </xsl:attribute-set> <!-- termsource-text-style -->
5413
+ </xsl:attribute-set> <!-- term-termsource-text-style -->
5420
5414
 
5421
- <xsl:template name="refine_termsource-text-style">
5415
+ <xsl:template name="refine_term-termsource-text-style">
5422
5416
  </xsl:template>
5423
5417
 
5424
- <xsl:attribute-set name="origin-style">
5425
- </xsl:attribute-set> <!-- origin-style -->
5418
+ <xsl:attribute-set name="term-origin-style">
5419
+ </xsl:attribute-set> <!-- term-origin-style -->
5426
5420
 
5427
- <xsl:template name="refine_origin-style">
5421
+ <xsl:template name="refine_term-origin-style">
5428
5422
  </xsl:template>
5429
5423
 
5430
5424
  <!-- ====== -->
@@ -5469,9 +5463,9 @@
5469
5463
  <!-- modification -->
5470
5464
  <!-- ====== -->
5471
5465
  <xsl:template match="mn:fmt-termsource" name="termsource">
5472
- <fo:block xsl:use-attribute-sets="termsource-style">
5466
+ <fo:block xsl:use-attribute-sets="term-termsource-style">
5473
5467
 
5474
- <xsl:call-template name="refine_termsource-style"/>
5468
+ <xsl:call-template name="refine_term-termsource-style"/>
5475
5469
 
5476
5470
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
5477
5471
  <xsl:variable name="termsource_text">
@@ -5519,8 +5513,8 @@
5519
5513
 
5520
5514
  <!-- text SOURCE: -->
5521
5515
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
5522
- <fo:inline xsl:use-attribute-sets="termsource-text-style">
5523
- <xsl:call-template name="refine_termsource-text-style"/>
5516
+ <fo:inline xsl:use-attribute-sets="term-termsource-text-style">
5517
+ <xsl:call-template name="refine_term-termsource-text-style"/>
5524
5518
  <xsl:value-of select="."/>
5525
5519
  </fo:inline>
5526
5520
  </xsl:template>
@@ -5532,8 +5526,8 @@
5532
5526
  <xsl:if test="normalize-space(@citeas) = ''">
5533
5527
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
5534
5528
  </xsl:if>
5535
- <fo:inline xsl:use-attribute-sets="origin-style">
5536
- <xsl:call-template name="refine_origin-style"/>
5529
+ <fo:inline xsl:use-attribute-sets="term-origin-style">
5530
+ <xsl:call-template name="refine_term-origin-style"/>
5537
5531
  <xsl:apply-templates/>
5538
5532
  </fo:inline>
5539
5533
  </fo:basic-link>
@@ -5581,14 +5575,14 @@
5581
5575
  <xsl:variable name="levelTerm">
5582
5576
  <xsl:call-template name="getLevelTermName"/>
5583
5577
  </xsl:variable>
5584
- <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
5578
+ <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="term-preferred-block-style">
5585
5579
 
5586
- <xsl:call-template name="refine_preferred-block-style"/>
5580
+ <xsl:call-template name="refine_term-preferred-block-style"/>
5587
5581
 
5588
5582
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
5589
5583
 
5590
- <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
5591
- <xsl:call-template name="refine_term-name-style"/>
5584
+ <fo:block xsl:use-attribute-sets="term-number-style" role="SKIP">
5585
+ <xsl:call-template name="refine_term-number-style"/>
5592
5586
 
5593
5587
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
5594
5588
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -5598,8 +5592,8 @@
5598
5592
  </fo:block>
5599
5593
  </xsl:if>
5600
5594
 
5601
- <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
5602
- <xsl:call-template name="refine_preferred-term-style"/>
5595
+ <fo:block xsl:use-attribute-sets="term-preferred-style" role="SKIP">
5596
+ <xsl:call-template name="refine_term-preferred-style"/>
5603
5597
 
5604
5598
  <xsl:apply-templates/>
5605
5599
  </fo:block>
@@ -5619,15 +5613,15 @@
5619
5613
  <xsl:template match="mn:domain"/>
5620
5614
 
5621
5615
  <xsl:template match="mn:fmt-admitted">
5622
- <fo:block xsl:use-attribute-sets="admitted-style">
5623
- <xsl:call-template name="refine_admitted-style"/>
5616
+ <fo:block xsl:use-attribute-sets="term-admitted-style">
5617
+ <xsl:call-template name="refine_term-admitted-style"/>
5624
5618
  <xsl:apply-templates/>
5625
5619
  </fo:block>
5626
5620
  </xsl:template>
5627
5621
 
5628
5622
  <xsl:template match="mn:fmt-deprecates">
5629
- <fo:block xsl:use-attribute-sets="deprecates-style">
5630
- <xsl:call-template name="refine_deprecates-style"/>
5623
+ <fo:block xsl:use-attribute-sets="term-deprecates-style">
5624
+ <xsl:call-template name="refine_term-deprecates-style"/>
5631
5625
  <xsl:apply-templates/>
5632
5626
  </fo:block>
5633
5627
  </xsl:template>
@@ -5640,8 +5634,8 @@
5640
5634
  <!-- End Preferred, admitted, deprecated -->
5641
5635
 
5642
5636
  <xsl:template match="mn:fmt-related">
5643
- <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
5644
- <xsl:call-template name="refine_related-block-style"/>
5637
+ <fo:block role="SKIP" xsl:use-attribute-sets="term-related-block-style">
5638
+ <xsl:call-template name="refine_term-related-block-style"/>
5645
5639
  <xsl:apply-templates/>
5646
5640
  </fo:block>
5647
5641
  </xsl:template>
@@ -5655,8 +5649,8 @@
5655
5649
  <!-- definition -->
5656
5650
  <!-- ========== -->
5657
5651
  <xsl:template match="mn:fmt-definition">
5658
- <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
5659
- <xsl:call-template name="refine_definition-style"/>
5652
+ <fo:block xsl:use-attribute-sets="term-definition-style" role="SKIP">
5653
+ <xsl:call-template name="refine_term-definition-style"/>
5660
5654
  <xsl:apply-templates/>
5661
5655
  </fo:block>
5662
5656
  </xsl:template>
@@ -9914,6 +9908,10 @@
9914
9908
  <!-- image -->
9915
9909
  <!-- ====== -->
9916
9910
 
9911
+ <!-- show figure's name 'before' or 'after' image -->
9912
+ <xsl:variable name="figure-name-position"><xsl:text>after</xsl:text>
9913
+ </xsl:variable>
9914
+
9917
9915
  <xsl:template match="mn:figure" name="figure">
9918
9916
  <xsl:variable name="isAdded" select="@added"/>
9919
9917
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -9926,6 +9924,10 @@
9926
9924
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
9927
9925
  </xsl:call-template>
9928
9926
 
9927
+ <xsl:if test="$figure-name-position = 'before'"> <!-- show figure's name BEFORE image -->
9928
+ <xsl:apply-templates select="mn:fmt-name"/>
9929
+ </xsl:if>
9930
+
9929
9931
  <!-- Example: Dimensions in millimeters -->
9930
9932
  <xsl:apply-templates select="mn:note[@type = 'units']"/>
9931
9933
 
@@ -9946,7 +9948,16 @@
9946
9948
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
9947
9949
  <xsl:call-template name="showFigureKey"/>
9948
9950
  </xsl:if>
9949
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
9951
+
9952
+ <!-- <xsl:choose>
9953
+ <xsl:when test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'rsd'"></xsl:when>
9954
+ <xsl:otherwise>
9955
+ <xsl:apply-templates select="mn:fmt-name" /> --> <!-- show figure's name AFTER image -->
9956
+ <!-- </xsl:otherwise>
9957
+ </xsl:choose> -->
9958
+ <xsl:if test="$figure-name-position = 'after'">
9959
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
9960
+ </xsl:if>
9950
9961
 
9951
9962
  </fo:block-container>
9952
9963
  </xsl:template>
@@ -12064,7 +12075,6 @@
12064
12075
  </xsl:attribute-set>
12065
12076
 
12066
12077
  <xsl:template name="refine_references-non-normative-title-style">
12067
-
12068
12078
  </xsl:template>
12069
12079
 
12070
12080
  <!-- bibitem in Normative References (references/@normative="true") -->
@@ -14105,7 +14115,7 @@
14105
14115
  <!-- ===================================== -->
14106
14116
 
14107
14117
  <xsl:attribute-set name="annex-title-style">
14108
- </xsl:attribute-set>
14118
+ </xsl:attribute-set> <!-- annex-title-style -->
14109
14119
 
14110
14120
  <xsl:template name="refine_annex-title-style">
14111
14121
  </xsl:template>
@@ -14116,6 +14126,78 @@
14116
14126
  <xsl:template name="refine_p-zzSTDTitle1-style">
14117
14127
  </xsl:template>
14118
14128
 
14129
+ <xsl:attribute-set name="p-style">
14130
+ </xsl:attribute-set> <!-- p-style -->
14131
+
14132
+ <xsl:template name="refine_p-style">
14133
+ <xsl:param name="element-name"/>
14134
+ <xsl:param name="margin"/>
14135
+ <xsl:copy-of select="@id"/>
14136
+
14137
+ <xsl:call-template name="setBlockAttributes"/>
14138
+
14139
+ <xsl:if test="not(ancestor::mn:table)">
14140
+ <xsl:attribute name="line-height">124%</xsl:attribute>
14141
+ <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
14142
+ </xsl:if>
14143
+ <xsl:if test="ancestor::mn:dd and not(ancestor::mn:table)">
14144
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
14145
+ <xsl:if test="not(ancestor::mn:dd[1]/following-sibling::mn:dt)">
14146
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
14147
+ </xsl:if>
14148
+ </xsl:if>
14149
+ <!-- $namespace = 'ogc' -->
14150
+
14151
+ </xsl:template> <!-- refine_p-style -->
14152
+
14153
+ <xsl:attribute-set name="title-style">
14154
+ <!-- Note: font-size for level 1 title -->
14155
+ <xsl:attribute name="font-size">18pt</xsl:attribute>
14156
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
14157
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
14158
+ <xsl:attribute name="color"><xsl:value-of select="$color_text_title"/></xsl:attribute>
14159
+ </xsl:attribute-set> <!-- title-style -->
14160
+
14161
+ <xsl:template name="refine_title-style">
14162
+ <xsl:param name="element-name"/>
14163
+ <xsl:variable name="level">
14164
+ <xsl:call-template name="getLevel"/>
14165
+ </xsl:variable>
14166
+
14167
+ <xsl:if test="$level = 1">
14168
+ <xsl:attribute name="space-before">36pt</xsl:attribute>
14169
+ <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
14170
+ </xsl:if>
14171
+
14172
+ <xsl:if test="$level = 2">
14173
+ <xsl:attribute name="space-before">24pt</xsl:attribute>
14174
+ <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
14175
+ </xsl:if>
14176
+
14177
+ <xsl:if test="$level = 3">
14178
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
14179
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
14180
+ </xsl:if>
14181
+
14182
+ <xsl:if test="$level &gt;= 3">
14183
+ <xsl:attribute name="margin-top">30pt</xsl:attribute>
14184
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
14185
+ </xsl:if>
14186
+
14187
+ <xsl:if test="$level = 4">
14188
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
14189
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
14190
+ </xsl:if>
14191
+ <xsl:if test="$level = 5">
14192
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
14193
+ </xsl:if>
14194
+ <xsl:if test="$level &gt;= 5">
14195
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
14196
+ </xsl:if>
14197
+ <!-- $namespace = 'ogc' -->
14198
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
14199
+ </xsl:template> <!-- refine_title-style -->
14200
+
14119
14201
  <xsl:template name="processPrefaceSectionsDefault">
14120
14202
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
14121
14203
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -14454,6 +14536,12 @@
14454
14536
  </xsl:choose>
14455
14537
  </xsl:template>
14456
14538
 
14539
+ <xsl:attribute-set name="reset-margins-style">
14540
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
14541
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
14542
+ <xsl:attribute name="role">SKIP</xsl:attribute>
14543
+ </xsl:attribute-set>
14544
+
14457
14545
  <xsl:attribute-set name="clause-style">
14458
14546
 
14459
14547
  </xsl:attribute-set>
@@ -15469,8 +15557,9 @@
15469
15557
 
15470
15558
  <xsl:template name="setTextAlignment">
15471
15559
  <xsl:param name="default">left</xsl:param>
15560
+ <xsl:param name="skip_default">false</xsl:param>
15472
15561
  <xsl:variable name="align" select="normalize-space(@align)"/>
15473
- <xsl:attribute name="text-align">
15562
+ <xsl:variable name="text_align">
15474
15563
  <xsl:choose>
15475
15564
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
15476
15565
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
@@ -15478,9 +15567,13 @@
15478
15567
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
15479
15568
  <xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
15480
15569
  <xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
15570
+ <xsl:when test="$skip_default = 'true'"/>
15481
15571
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
15482
15572
  </xsl:choose>
15483
- </xsl:attribute>
15573
+ </xsl:variable>
15574
+ <xsl:if test="normalize-space($text_align) != ''">
15575
+ <xsl:attribute name="text-align"><xsl:value-of select="$text_align"/></xsl:attribute>
15576
+ </xsl:if>
15484
15577
  <xsl:if test="$align = 'indent'">
15485
15578
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
15486
15579
  </xsl:if>
@@ -15488,8 +15581,10 @@
15488
15581
 
15489
15582
  <xsl:template name="setBlockAttributes">
15490
15583
  <xsl:param name="text_align_default">left</xsl:param>
15584
+ <xsl:param name="skip_text_align_default">false</xsl:param>
15491
15585
  <xsl:call-template name="setTextAlignment">
15492
15586
  <xsl:with-param name="default" select="$text_align_default"/>
15587
+ <xsl:with-param name="skip_default" select="$skip_text_align_default"/>
15493
15588
  </xsl:call-template>
15494
15589
  <xsl:call-template name="setKeepAttributes"/>
15495
15590
  <xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
@@ -15532,6 +15627,20 @@
15532
15627
  </fo:block-container>
15533
15628
  </xsl:template>
15534
15629
 
15630
+ <!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
15631
+ <xsl:template name="insertCoverPageFullImage">
15632
+ <xsl:param name="name">coverpage-image</xsl:param>
15633
+ <xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image">
15634
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
15635
+ <fo:flow flow-name="xsl-region-body">
15636
+ <xsl:call-template name="insertBackgroundPageImage">
15637
+ <xsl:with-param name="number" select="position()"/>
15638
+ </xsl:call-template>
15639
+ </fo:flow>
15640
+ </fo:page-sequence>
15641
+ </xsl:for-each>
15642
+ </xsl:template>
15643
+
15535
15644
  <xsl:template name="insertPageImage">
15536
15645
  <xsl:param name="svg_content_height" select="$pageHeight"/>
15537
15646
  <xsl:param name="bitmap_width" select="$pageWidth"/>