metanorma-m3aawg 1.8.4 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,8 +14,7 @@
14
14
 
15
15
 
16
16
  <xsl:variable name="debug">false</xsl:variable>
17
- <xsl:variable name="pageWidth" select="215.9"/>
18
- <xsl:variable name="pageHeight" select="279.4"/>
17
+
19
18
  <xsl:variable name="marginLeftRight1" select="17.3"/>
20
19
  <xsl:variable name="marginLeftRight2" select="17.3"/>
21
20
  <xsl:variable name="marginTop" select="35"/>
@@ -39,7 +38,7 @@
39
38
 
40
39
  <xsl:template match="/">
41
40
  <xsl:call-template name="namespaceCheck"/>
42
- <fo:root font-family="EB Garamond 12" font-size="12pt" xml:lang="{$lang}">
41
+ <fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
43
42
  <fo:layout-master-set>
44
43
 
45
44
  <!-- cover page -->
@@ -333,7 +332,7 @@
333
332
  </xsl:template>
334
333
 
335
334
 
336
- <xsl:template match="m3d:boilerplate//m3d:p">
335
+ <xsl:template match="m3d:boilerplate//m3d:p" priority="2">
337
336
  <fo:block font-size="11pt" margin-bottom="12pt">
338
337
  <xsl:apply-templates/>
339
338
  </fo:block>
@@ -346,11 +345,7 @@
346
345
  <!-- ============================= -->
347
346
  <!-- CONTENTS -->
348
347
  <!-- ============================= -->
349
- <xsl:template match="node()" mode="contents">
350
- <xsl:apply-templates mode="contents"/>
351
- </xsl:template>
352
-
353
-
348
+
354
349
  <!-- element with title -->
355
350
  <xsl:template match="*[m3d:title]" mode="contents">
356
351
  <xsl:variable name="level">
@@ -403,7 +398,9 @@
403
398
 
404
399
  <xsl:template name="getListItemFormat">
405
400
  <xsl:choose>
406
- <xsl:when test="local-name(..) = 'ul'">•</xsl:when> <!-- &#x2014; dash -->
401
+ <xsl:when test="local-name(..) = 'ul'">
402
+ <xsl:call-template name="setULLabel"/>
403
+ </xsl:when>
407
404
  <xsl:otherwise> <!-- for ordered lists -->
408
405
  <xsl:choose>
409
406
  <xsl:when test="../@type = 'arabic'">
@@ -446,7 +443,7 @@
446
443
  <!-- title -->
447
444
  <!-- ====== -->
448
445
 
449
- <xsl:template match="m3d:boilerplate//m3d:title">
446
+ <xsl:template match="m3d:boilerplate//m3d:title" priority="2">
450
447
  <xsl:variable name="level">
451
448
  <xsl:call-template name="getLevel"/>
452
449
  </xsl:variable>
@@ -473,7 +470,7 @@
473
470
  </xsl:template>
474
471
 
475
472
 
476
- <xsl:template match="m3d:title">
473
+ <xsl:template match="m3d:title" name="title">
477
474
 
478
475
  <xsl:variable name="level">
479
476
  <xsl:call-template name="getLevel"/>
@@ -533,7 +530,7 @@
533
530
  <!-- ====== -->
534
531
 
535
532
 
536
- <xsl:template match="m3d:p">
533
+ <xsl:template match="m3d:p" name="paragraph">
537
534
  <xsl:param name="inline" select="'false'"/>
538
535
  <xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
539
536
  <xsl:variable name="element-name">
@@ -591,54 +588,6 @@
591
588
  </xsl:template>
592
589
 
593
590
 
594
- <xsl:template match="m3d:bibitem">
595
- <fo:block id="{@id}" margin-bottom="12pt" text-indent="-11.7mm" margin-left="11.7mm"> <!-- 12 pt -->
596
- <!-- m3d:docidentifier -->
597
- <xsl:if test="m3d:docidentifier">
598
- <xsl:choose>
599
- <xsl:when test="m3d:docidentifier/@type = 'metanorma'"/>
600
- <xsl:otherwise><fo:inline><xsl:value-of select="m3d:docidentifier"/></fo:inline></xsl:otherwise>
601
- </xsl:choose>
602
- </xsl:if>
603
- <xsl:apply-templates select="m3d:note"/>
604
- <xsl:if test="m3d:docidentifier">, </xsl:if>
605
- <fo:inline font-style="italic">
606
- <xsl:choose>
607
- <xsl:when test="m3d:title[@type = 'main' and @language = 'en']">
608
- <xsl:value-of select="m3d:title[@type = 'main' and @language = 'en']"/>
609
- </xsl:when>
610
- <xsl:otherwise>
611
- <xsl:value-of select="m3d:title"/>
612
- </xsl:otherwise>
613
- </xsl:choose>
614
- </fo:inline>
615
- </fo:block>
616
- </xsl:template>
617
-
618
-
619
- <xsl:template match="m3d:bibitem/m3d:note" priority="2">
620
- <fo:footnote>
621
- <xsl:variable name="number">
622
- <xsl:number level="any" count="m3d:bibitem/m3d:note"/>
623
- </xsl:variable>
624
- <fo:inline font-size="7pt" keep-with-previous.within-line="always" baseline-shift="30%">
625
- <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
626
- <xsl:value-of select="$number"/>
627
- </fo:basic-link>
628
- </fo:inline>
629
- <fo:footnote-body>
630
- <fo:block font-size="9pt" margin-bottom="4pt" start-indent="0pt">
631
- <fo:inline font-size="6pt" id="{generate-id()}" keep-with-next.within-line="always" baseline-shift="30%" padding-right="1mm"><!-- alignment-baseline="hanging" font-size="60%" -->
632
- <xsl:value-of select="$number"/>
633
- </fo:inline>
634
- <xsl:apply-templates/>
635
- </fo:block>
636
- </fo:footnote-body>
637
- </fo:footnote>
638
- </xsl:template>
639
-
640
-
641
-
642
591
  <xsl:template match="m3d:ul | m3d:ol" mode="ul_ol">
643
592
  <fo:block-container margin-left="6mm">
644
593
  <fo:block-container margin-left="0mm">
@@ -646,7 +595,7 @@
646
595
  <xsl:if test="local-name() = 'ol'">
647
596
  <xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
648
597
  </xsl:if>
649
- <xsl:apply-templates/>
598
+ <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
650
599
  </fo:list-block>
651
600
  <xsl:for-each select="./m3d:note">
652
601
  <xsl:call-template name="note"/>
@@ -655,32 +604,23 @@
655
604
  </fo:block-container>
656
605
  </xsl:template>
657
606
 
658
- <xsl:template match="m3d:ul//m3d:note | m3d:ol//m3d:note" priority="2"/>
659
-
660
607
  <xsl:template match="m3d:li">
661
608
  <fo:list-item id="{@id}">
662
609
  <fo:list-item-label end-indent="label-end()">
663
610
  <fo:block>
664
- <xsl:if test="local-name(..) = 'ul'">
665
- <xsl:attribute name="font-size">18pt</xsl:attribute>
666
- <xsl:attribute name="margin-top">-0.5mm</xsl:attribute><!-- to vertical align big dot -->
667
- </xsl:if>
668
611
  <xsl:call-template name="getListItemFormat"/>
669
612
  </fo:block>
670
613
  </fo:list-item-label>
671
614
  <fo:list-item-body start-indent="body-start()">
672
615
  <fo:block>
673
- <xsl:apply-templates/>
674
- <xsl:apply-templates select=".//m3d:note" mode="process"/>
616
+ <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
617
+ <xsl:apply-templates select="./m3d:note"/>
675
618
  </fo:block>
676
619
  </fo:list-item-body>
677
620
  </fo:list-item>
678
621
  </xsl:template>
679
622
 
680
- <xsl:template match="m3d:note" mode="process">
681
- <xsl:call-template name="note"/>
682
- </xsl:template>
683
-
623
+
684
624
  <xsl:template match="m3d:preferred">
685
625
 
686
626
  <fo:inline>
@@ -700,9 +640,9 @@
700
640
  <fo:block-container margin-left="0mm" margin-top="4pt" line-height="125%">
701
641
  <fo:block>
702
642
  <fo:inline padding-right="1mm">
703
- <xsl:apply-templates select="m3d:name" mode="presentation"/>
643
+ <xsl:apply-templates select="m3d:name"/>
704
644
  </fo:inline>
705
- <xsl:apply-templates/>
645
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
706
646
  </fo:block>
707
647
  </fo:block-container>
708
648
  </xsl:template>
@@ -715,73 +655,6 @@
715
655
 
716
656
 
717
657
 
718
- <!-- <xsl:template match="m3d:references[@id = '_bibliography']"> -->
719
- <xsl:template match="m3d:references[not(@normative='true')]">
720
- <fo:block break-after="page"/>
721
- <fo:block id="{@id}">
722
- <xsl:apply-templates/>
723
- </fo:block>
724
- <fo:block-container text-align="center">
725
- <fo:block-container margin-left="63mm" width="42mm" border-bottom="2pt solid black">
726
- <fo:block> </fo:block>
727
- </fo:block-container>
728
- </fo:block-container>
729
- </xsl:template>
730
-
731
-
732
- <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
733
- <!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem"> -->
734
- <xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem">
735
- <fo:list-block margin-bottom="12pt" provisional-distance-between-starts="12mm">
736
- <fo:list-item>
737
- <fo:list-item-label end-indent="label-end()">
738
- <fo:block>
739
- <fo:inline id="{@id}">
740
- <xsl:number format="[1]"/>
741
- </fo:inline>
742
- </fo:block>
743
- </fo:list-item-label>
744
- <fo:list-item-body start-indent="body-start()">
745
- <fo:block text-align="justify">
746
- <xsl:variable name="docidentifier">
747
- <xsl:if test="m3d:docidentifier">
748
- <xsl:choose>
749
- <xsl:when test="m3d:docidentifier/@type = 'metanorma'"/>
750
- <xsl:otherwise><xsl:value-of select="m3d:docidentifier"/></xsl:otherwise>
751
- </xsl:choose>
752
- </xsl:if>
753
- </xsl:variable>
754
- <fo:inline><xsl:value-of select="$docidentifier"/></fo:inline>
755
- <xsl:apply-templates select="m3d:note"/>
756
- <xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
757
- <xsl:choose>
758
- <xsl:when test="m3d:title[@type = 'main' and @language = 'en']">
759
- <xsl:apply-templates select="m3d:title[@type = 'main' and @language = 'en']"/>
760
- </xsl:when>
761
- <xsl:otherwise>
762
- <xsl:apply-templates select="m3d:title"/>
763
- </xsl:otherwise>
764
- </xsl:choose>
765
- <xsl:apply-templates select="m3d:formattedref"/>
766
- </fo:block>
767
- </fo:list-item-body>
768
- </fo:list-item>
769
- </fo:list-block>
770
- </xsl:template>
771
-
772
- <!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem" mode="contents"/> -->
773
- <xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem" mode="contents"/>
774
-
775
- <!-- <xsl:template match="m3d:references[@id = '_bibliography']/m3d:bibitem/m3d:title"> -->
776
- <xsl:template match="m3d:references[not(@normative='true')]/m3d:bibitem/m3d:title">
777
- <fo:inline font-style="italic">
778
- <xsl:apply-templates/>
779
- </fo:inline>
780
- </xsl:template>
781
-
782
-
783
-
784
-
785
658
  <xsl:template match="mathml:math" priority="2">
786
659
  <fo:inline font-family="Cambria Math">
787
660
  <xsl:variable name="mathml">
@@ -793,31 +666,7 @@
793
666
  </fo:instream-foreign-object>
794
667
  </fo:inline>
795
668
  </xsl:template>
796
-
797
-
798
- <!-- <xsl:template match="m3d:note/m3d:p" name="note">
799
- <fo:block-container margin-left="0mm" margin-top="4pt" line-height="125%">
800
- <fo:block>
801
- <fo:inline >
802
- <xsl:apply-templates select="../m3d:name" mode="presentation">
803
- <xsl:with-param name="sfx" select="':'"/>
804
- </xsl:apply-templates>
805
- </fo:inline>
806
- <xsl:apply-templates />
807
- </fo:block>
808
- </fo:block-container>
809
- </xsl:template> -->
810
669
 
811
-
812
-
813
- <xsl:template match="m3d:admonition">
814
- <fo:block text-align="center" margin-bottom="12pt" font-weight="bold">
815
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@type))"/>
816
- </fo:block>
817
- <fo:block font-weight="bold">
818
- <xsl:apply-templates/>
819
- </fo:block>
820
- </xsl:template>
821
670
 
822
671
 
823
672
  <xsl:template match="m3d:formula/m3d:stem">
@@ -834,7 +683,7 @@
834
683
  </fo:table-cell>
835
684
  <fo:table-cell display-align="center">
836
685
  <fo:block text-align="left">
837
- <xsl:apply-templates select="../m3d:name" mode="presentation"/>
686
+ <xsl:apply-templates select="../m3d:name" mode="formula_number"/>
838
687
  </fo:block>
839
688
  </fo:table-cell>
840
689
  </fo:table-row>
@@ -848,29 +697,23 @@
848
697
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAjUAAAA8CAYAAACehUt5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA99pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDEx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ErkJggg==</xsl:text>
849
698
  </xsl:variable>
850
699
 
851
- <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
852
-
853
- <title-annex lang="en">Annex </title-annex>
854
- <title-annex lang="fr">Annexe </title-annex>
855
-
856
- <title-annex lang="zh">Annex </title-annex>
857
-
858
-
700
+ <xsl:variable name="pageWidth_">
701
+ 215.9
702
+ </xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
703
+ 279.4
704
+ </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="titles_">
859
705
 
860
706
  <title-edition lang="en">
861
707
 
862
-
863
- <xsl:text>Version</xsl:text>
864
-
708
+ <xsl:text>Version</xsl:text>
709
+
865
710
  </title-edition>
866
711
 
867
712
  <title-edition lang="fr">
868
-
869
- <xsl:text>Édition </xsl:text>
870
-
713
+ <xsl:text>Édition </xsl:text>
871
714
  </title-edition>
872
715
 
873
-
716
+ <!-- These titles of Table of contents renders different than determined in localized-strings -->
874
717
  <title-toc lang="en">
875
718
 
876
719
 
@@ -879,24 +722,13 @@
879
722
 
880
723
  </title-toc>
881
724
  <title-toc lang="fr">
725
+ <xsl:text>Sommaire</xsl:text>
726
+ </title-toc>
727
+ <title-toc lang="zh">
882
728
 
883
- <xsl:text>Sommaire</xsl:text>
884
-
885
-
886
- </title-toc>
887
-
888
- <title-toc lang="zh">Contents</title-toc>
889
-
890
-
891
-
892
- <title-page lang="en">Page</title-page>
893
- <title-page lang="fr">Page</title-page>
894
-
895
- <title-key lang="en">Key</title-key>
896
- <title-key lang="fr">Légende</title-key>
897
-
898
- <title-where lang="en">where</title-where>
899
- <title-where lang="fr">où</title-where>
729
+ <xsl:text>Contents</xsl:text>
730
+
731
+ </title-toc>
900
732
 
901
733
  <title-descriptors lang="en">Descriptors</title-descriptors>
902
734
 
@@ -912,32 +744,9 @@
912
744
  </title-part>
913
745
  <title-part lang="zh">第 # 部分:</title-part>
914
746
 
915
- <title-subpart lang="en">
916
-
917
- </title-subpart>
918
- <title-subpart lang="fr">
919
-
920
- </title-subpart>
921
-
922
- <title-modified lang="en">modified</title-modified>
923
- <title-modified lang="fr">modifiée</title-modified>
924
-
925
- <title-modified lang="zh">modified</title-modified>
926
-
927
-
928
-
929
- <title-source lang="en">
930
-
931
- <xsl:text>SOURCE</xsl:text>
932
-
933
-
934
- </title-source>
747
+ <title-subpart lang="en">Sub-part #</title-subpart>
748
+ <title-subpart lang="fr">Partie de sub #</title-subpart>
935
749
 
936
- <title-keywords lang="en">Keywords</title-keywords>
937
-
938
- <title-deprecated lang="en">DEPRECATED</title-deprecated>
939
- <title-deprecated lang="fr">DEPRECATED</title-deprecated>
940
-
941
750
  <title-list-tables lang="en">List of Tables</title-list-tables>
942
751
 
943
752
  <title-list-figures lang="en">List of Figures</title-list-figures>
@@ -946,41 +755,12 @@
946
755
 
947
756
  <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
948
757
 
949
- <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
950
-
951
- <title-abstract lang="en">Abstract</title-abstract>
952
-
953
758
  <title-summary lang="en">Summary</title-summary>
954
759
 
955
- <title-in lang="en">in </title-in>
956
-
957
- <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
958
- <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
959
-
960
- <title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
961
- <title-completion-date lang="zh">本稿完成日期</title-completion-date>
962
-
963
- <title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
964
- <title-issuance-date lang="zh"># 发布</title-issuance-date>
965
-
966
- <title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
967
- <title-implementation-date lang="zh"># 实施</title-implementation-date>
968
-
969
- <title-obligation-normative lang="en">normative</title-obligation-normative>
970
- <title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
971
-
972
- <title-caution lang="en">CAUTION</title-caution>
973
- <title-caution lang="zh">注意</title-caution>
974
-
975
- <title-warning lang="en">WARNING</title-warning>
976
- <title-warning lang="zh">警告</title-warning>
977
-
978
- <title-amendment lang="en">AMENDMENT</title-amendment>
979
-
980
760
  <title-continued lang="en">(continued)</title-continued>
981
761
  <title-continued lang="fr">(continué)</title-continued>
982
762
 
983
- </xsl:variable><xsl:variable name="bibdata">
763
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
984
764
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
985
765
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
986
766
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
@@ -1009,6 +789,70 @@
1009
789
  </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="root-style">
1010
790
 
1011
791
 
792
+
793
+
794
+
795
+
796
+
797
+
798
+
799
+
800
+ <xsl:attribute name="font-family">EB Garamond 12</xsl:attribute>
801
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
802
+
803
+
804
+
805
+
806
+
807
+
808
+
809
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-style">
810
+
811
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
812
+
813
+
814
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-p-style">
815
+
816
+
817
+
818
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-style">
819
+
820
+
821
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-title-style">
822
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
823
+
824
+
825
+
826
+
827
+
828
+
829
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-p-style">
830
+
831
+
832
+
833
+
834
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-style">
835
+
836
+
837
+
838
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-title-style">
839
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
840
+
841
+
842
+
843
+
844
+
845
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-p-style">
846
+
847
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-style">
848
+
849
+
850
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-title-style">
851
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
852
+
853
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-p-style">
854
+
855
+
1012
856
  </xsl:attribute-set><xsl:attribute-set name="link-style">
1013
857
 
1014
858
 
@@ -1018,6 +862,9 @@
1018
862
 
1019
863
 
1020
864
 
865
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
866
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
867
+
1021
868
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1022
869
  <xsl:attribute name="white-space">pre</xsl:attribute>
1023
870
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1028,12 +875,19 @@
1028
875
 
1029
876
 
1030
877
 
878
+
879
+
880
+
881
+
882
+
1031
883
  <xsl:attribute name="font-family">Courier New</xsl:attribute>
1032
884
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1033
885
 
1034
886
 
1035
887
 
1036
888
 
889
+
890
+
1037
891
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
1038
892
 
1039
893
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -1080,6 +934,7 @@
1080
934
 
1081
935
 
1082
936
 
937
+
1083
938
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
1084
939
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1085
940
 
@@ -1093,7 +948,9 @@
1093
948
 
1094
949
 
1095
950
 
951
+
1096
952
  </xsl:attribute-set><xsl:attribute-set name="example-name-style">
953
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1097
954
 
1098
955
 
1099
956
 
@@ -1122,6 +979,7 @@
1122
979
 
1123
980
 
1124
981
 
982
+
1125
983
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
1126
984
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1127
985
 
@@ -1143,128 +1001,321 @@
1143
1001
 
1144
1002
  </xsl:attribute-set><xsl:variable name="table-border_">
1145
1003
 
1146
- </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
1147
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1148
-
1004
+ </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
1005
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1006
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1149
1007
 
1150
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1151
- <xsl:attribute name="text-align">center</xsl:attribute>
1152
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1153
1008
 
1154
1009
 
1155
1010
 
1156
1011
 
1157
-
1158
1012
 
1159
1013
 
1160
1014
 
1161
-
1162
1015
 
1163
1016
 
1164
1017
 
1165
1018
 
1166
- </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1019
+
1167
1020
 
1168
- </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1169
-
1170
- <xsl:attribute name="font-size">12pt</xsl:attribute>
1171
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1172
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1173
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1174
1021
 
1175
1022
 
1176
1023
 
1177
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1178
1024
 
1179
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1180
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
1181
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1182
1025
 
1183
1026
 
1027
+
1184
1028
 
1185
- </xsl:attribute-set><xsl:attribute-set name="xref-style">
1186
1029
 
1030
+ </xsl:attribute-set><xsl:attribute-set name="table-style">
1031
+ <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
1032
+ <xsl:attribute name="table-layout">fixed</xsl:attribute>
1033
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1034
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1187
1035
 
1188
1036
 
1189
1037
 
1190
1038
 
1191
- </xsl:attribute-set><xsl:attribute-set name="eref-style">
1192
1039
 
1193
1040
 
1194
1041
 
1195
1042
 
1196
1043
 
1197
1044
 
1198
- </xsl:attribute-set><xsl:attribute-set name="note-style">
1199
1045
 
1200
1046
 
1047
+
1201
1048
 
1202
1049
 
1203
-
1204
1050
 
1205
1051
 
1206
1052
 
1207
1053
 
1208
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1209
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
1210
- <xsl:attribute name="text-align">justify</xsl:attribute>
1211
- <xsl:attribute name="line-height">125%</xsl:attribute>
1212
1054
 
1213
1055
 
1214
1056
 
1057
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1058
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1059
+
1215
1060
 
1061
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1062
+ <xsl:attribute name="text-align">center</xsl:attribute>
1063
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1216
1064
 
1217
1065
 
1218
1066
 
1219
1067
 
1220
- </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
1068
+
1221
1069
 
1222
1070
 
1223
1071
 
1072
+
1224
1073
 
1225
1074
 
1226
1075
 
1227
1076
 
1077
+ </xsl:attribute-set><xsl:attribute-set name="table-row-style">
1078
+ <xsl:attribute name="min-height">4mm</xsl:attribute>
1228
1079
 
1229
1080
 
1230
- <xsl:attribute name="padding-right">5mm</xsl:attribute>
1231
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1232
1081
 
1233
1082
 
1083
+ </xsl:attribute-set><xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
1084
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1234
1085
 
1235
1086
 
1236
1087
 
1237
- </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1238
1088
 
1239
1089
 
1240
1090
 
1241
1091
 
1242
- </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1092
+
1243
1093
 
1094
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
1244
1095
 
1245
1096
 
1246
-
1247
1097
 
1098
+ </xsl:attribute-set><xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
1099
+
1100
+ </xsl:attribute-set><xsl:attribute-set name="table-header-cell-style">
1101
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1102
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1103
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1104
+ <xsl:attribute name="display-align">center</xsl:attribute>
1248
1105
 
1249
1106
 
1250
1107
 
1251
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1252
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
1253
1108
 
1254
1109
 
1255
1110
 
1256
1111
 
1257
1112
 
1258
1113
 
1259
- </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1260
1114
 
1261
1115
 
1262
1116
 
1263
1117
 
1118
+ </xsl:attribute-set><xsl:attribute-set name="table-cell-style">
1119
+ <xsl:attribute name="display-align">center</xsl:attribute>
1120
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1121
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1122
+
1123
+
1124
+
1125
+
1126
+
1127
+
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+
1134
+
1135
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1136
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1137
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1138
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1139
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1140
+
1141
+
1142
+
1143
+
1144
+
1145
+
1146
+
1147
+
1148
+
1149
+
1150
+
1151
+ </xsl:attribute-set><xsl:attribute-set name="table-note-style">
1152
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1153
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1154
+
1155
+
1156
+
1157
+
1158
+
1159
+
1160
+
1161
+
1162
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
1163
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1164
+
1165
+
1166
+
1167
+
1168
+
1169
+
1170
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
1171
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1172
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+
1181
+
1182
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1183
+
1184
+
1185
+
1186
+
1187
+ </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
1188
+ <xsl:attribute name="text-indent">0</xsl:attribute>
1189
+ <xsl:attribute name="start-indent">0</xsl:attribute>
1190
+
1191
+
1192
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-body-style">
1193
+
1194
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-number-style">
1195
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1196
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1197
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1198
+
1199
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-body-style">
1200
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1201
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1202
+
1203
+ </xsl:attribute-set><xsl:attribute-set name="dt-row-style">
1204
+
1205
+
1206
+ </xsl:attribute-set><xsl:attribute-set name="dt-style">
1207
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1208
+
1209
+
1210
+
1211
+
1212
+
1213
+
1214
+
1215
+
1216
+
1217
+
1218
+ </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1219
+
1220
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
1221
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1222
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1223
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1224
+
1225
+
1226
+
1227
+ </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1228
+
1229
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1230
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1231
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1232
+
1233
+
1234
+
1235
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
1236
+
1237
+
1238
+
1239
+
1240
+
1241
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
1242
+
1243
+
1244
+
1245
+
1246
+
1247
+
1248
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
1264
1249
 
1265
1250
 
1266
1251
 
1267
- </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1252
+
1253
+
1254
+
1255
+
1256
+
1257
+
1258
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1259
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
1260
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1261
+ <xsl:attribute name="line-height">125%</xsl:attribute>
1262
+
1263
+
1264
+
1265
+
1266
+
1267
+
1268
+
1269
+
1270
+ </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
1271
+
1272
+
1273
+
1274
+
1275
+
1276
+
1277
+
1278
+
1279
+
1280
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1281
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1282
+
1283
+
1284
+
1285
+
1286
+
1287
+ </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1288
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
1289
+
1290
+
1291
+
1292
+
1293
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1294
+
1295
+
1296
+
1297
+
1298
+
1299
+
1300
+
1301
+
1302
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1303
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
1304
+
1305
+
1306
+
1307
+
1308
+
1309
+
1310
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1311
+
1312
+
1313
+
1314
+
1315
+
1316
+
1317
+
1318
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1268
1319
 
1269
1320
 
1270
1321
 
@@ -1296,6 +1347,9 @@
1296
1347
 
1297
1348
 
1298
1349
 
1350
+ </xsl:attribute-set><xsl:attribute-set name="termsource-text-style">
1351
+
1352
+
1299
1353
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1300
1354
 
1301
1355
 
@@ -1303,6 +1357,8 @@
1303
1357
 
1304
1358
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1305
1359
 
1360
+ </xsl:attribute-set><xsl:attribute-set name="figure-style">
1361
+
1306
1362
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1307
1363
 
1308
1364
 
@@ -1401,6 +1457,17 @@
1401
1457
 
1402
1458
  </xsl:attribute-set><xsl:attribute-set name="toc-style">
1403
1459
  <xsl:attribute name="line-height">135%</xsl:attribute>
1460
+ </xsl:attribute-set><xsl:attribute-set name="fn-reference-style">
1461
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1462
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1463
+
1464
+
1465
+
1466
+
1467
+
1468
+
1469
+
1470
+
1404
1471
  </xsl:attribute-set><xsl:attribute-set name="fn-style">
1405
1472
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1406
1473
  </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
@@ -1473,30 +1540,201 @@
1473
1540
 
1474
1541
 
1475
1542
 
1476
- </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
1477
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1478
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
1479
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
1480
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
1481
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
1482
- </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
1543
+ </xsl:attribute-set><xsl:attribute-set name="admonition-style">
1544
+
1545
+
1546
+
1547
+
1548
+
1549
+
1550
+
1551
+
1552
+
1553
+
1554
+
1555
+
1556
+
1557
+
1558
+ </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
1559
+
1560
+
1561
+
1562
+
1563
+
1564
+
1565
+
1566
+
1567
+
1568
+
1569
+ </xsl:attribute-set><xsl:attribute-set name="admonition-name-style">
1570
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1571
+
1572
+
1573
+
1574
+
1575
+
1576
+
1577
+ <xsl:attribute name="text-align">center</xsl:attribute>
1578
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1579
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1580
+
1581
+
1582
+
1583
+
1584
+
1585
+
1586
+
1587
+
1588
+ </xsl:attribute-set><xsl:attribute-set name="admonition-p-style">
1589
+
1590
+
1591
+
1592
+
1593
+
1594
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1595
+
1596
+
1597
+
1598
+
1599
+
1600
+
1601
+
1602
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
1603
+
1604
+
1605
+
1606
+
1607
+
1608
+
1609
+
1610
+
1611
+
1612
+
1613
+
1614
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1615
+ <xsl:attribute name="text-indent">-11.7mm</xsl:attribute>
1616
+ <xsl:attribute name="margin-left">11.7mm</xsl:attribute>
1617
+
1618
+
1619
+
1620
+
1621
+
1622
+
1623
+
1624
+
1625
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-style">
1626
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
1627
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1628
+
1629
+
1630
+
1631
+
1632
+
1633
+
1634
+
1635
+
1636
+
1637
+
1638
+
1639
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
1640
+
1641
+
1642
+
1643
+
1644
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-style">
1645
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
1646
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1647
+
1648
+
1649
+
1650
+
1651
+
1652
+
1653
+
1654
+
1655
+
1656
+
1657
+
1658
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
1659
+
1660
+
1661
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
1662
+
1663
+
1664
+
1665
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1666
+
1667
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
1668
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1669
+ <xsl:attribute name="font-size">65%</xsl:attribute>
1670
+
1671
+
1672
+
1673
+
1674
+
1675
+
1676
+
1677
+
1678
+
1679
+
1680
+
1681
+ <xsl:attribute name="font-size">7pt</xsl:attribute>
1682
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
1683
+
1684
+
1685
+
1686
+
1687
+
1688
+
1689
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
1690
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
1691
+
1692
+
1693
+
1694
+
1695
+
1696
+
1697
+
1698
+
1699
+
1700
+
1701
+
1702
+ <xsl:attribute name="font-size">6pt</xsl:attribute>
1703
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
1704
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1705
+
1706
+
1707
+
1708
+
1709
+
1710
+
1711
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
1712
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1713
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1714
+ <xsl:attribute name="start-indent">0pt</xsl:attribute>
1715
+
1716
+
1717
+
1718
+
1719
+
1720
+
1721
+
1722
+
1723
+
1724
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
1725
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
1726
+
1727
+
1728
+
1729
+ </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
1730
+
1731
+
1732
+
1733
+ </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
1483
1734
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1484
1735
  <xsl:sort select="@displayorder" data-type="number"/>
1485
1736
  <xsl:apply-templates select="." mode="contents"/>
1486
1737
  </xsl:for-each>
1487
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
1488
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
1489
-
1490
- <!-- Normative references -->
1491
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]" mode="contents"/>
1492
- <!-- Terms and definitions -->
1493
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
1494
- <!-- Another main sections -->
1495
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
1496
- <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
1497
- <!-- Bibliography -->
1498
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
1499
-
1500
1738
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1501
1739
 
1502
1740
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
@@ -1513,33 +1751,11 @@
1513
1751
  <xsl:sort select="@displayorder" data-type="number"/>
1514
1752
  <xsl:apply-templates select="." mode="contents"/>
1515
1753
  </xsl:for-each>
1516
- </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
1517
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
1518
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
1519
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
1520
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
1521
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
1522
1754
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1523
1755
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1524
1756
  <xsl:sort select="@displayorder" data-type="number"/>
1525
1757
  <xsl:apply-templates select="."/>
1526
1758
  </xsl:for-each>
1527
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
1528
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
1529
-
1530
- <xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
1531
- <fo:block break-after="page"/>
1532
- </xsl:if>
1533
-
1534
- <!-- Normative references -->
1535
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
1536
- <!-- Terms and definitions -->
1537
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
1538
- <!-- Another main sections -->
1539
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
1540
- <xsl:apply-templates select="/*/*[local-name()='annex']"/>
1541
- <!-- Bibliography -->
1542
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
1543
1759
  </xsl:template><xsl:template name="processMainSectionsDefault">
1544
1760
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
1545
1761
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -1566,6 +1782,64 @@
1566
1782
  <xsl:value-of select="."/>
1567
1783
  </xsl:template><xsl:template match="*[local-name()='br']">
1568
1784
  <xsl:value-of select="$linebreak"/>
1785
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
1786
+ <fo:block xsl:use-attribute-sets="copyright-statement-style">
1787
+ <xsl:apply-templates/>
1788
+ </fo:block>
1789
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
1790
+
1791
+ <!-- process in the template 'title' -->
1792
+ <xsl:call-template name="title"/>
1793
+
1794
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
1795
+
1796
+
1797
+ <!-- process in the template 'paragraph' -->
1798
+ <xsl:call-template name="paragraph"/>
1799
+
1800
+ </xsl:template><xsl:template match="*[local-name()='license-statement']">
1801
+ <fo:block xsl:use-attribute-sets="license-statement-style">
1802
+ <xsl:apply-templates/>
1803
+ </fo:block>
1804
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
1805
+
1806
+ <!-- process in the template 'title' -->
1807
+ <xsl:call-template name="title"/>
1808
+
1809
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
1810
+
1811
+ <!-- process in the template 'paragraph' -->
1812
+ <xsl:call-template name="paragraph"/>
1813
+
1814
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']">
1815
+ <fo:block xsl:use-attribute-sets="legal-statement-style">
1816
+ <xsl:apply-templates/>
1817
+ </fo:block>
1818
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
1819
+
1820
+ <!-- process in the template 'title' -->
1821
+ <xsl:call-template name="title"/>
1822
+
1823
+
1824
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
1825
+
1826
+ <!-- process in the template 'paragraph' -->
1827
+ <xsl:call-template name="paragraph"/>
1828
+
1829
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']">
1830
+ <fo:block xsl:use-attribute-sets="feedback-statement-style">
1831
+ <xsl:apply-templates/>
1832
+ </fo:block>
1833
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
1834
+
1835
+ <!-- process in the template 'title' -->
1836
+ <xsl:call-template name="title"/>
1837
+
1838
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
1839
+
1840
+ <!-- process in the template 'paragraph' -->
1841
+ <xsl:call-template name="paragraph"/>
1842
+
1569
1843
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1570
1844
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1571
1845
  <xsl:call-template name="add-zero-spaces-java"/>
@@ -1582,43 +1856,19 @@
1582
1856
  <xsl:call-template name="getSimpleTable"/>
1583
1857
  </xsl:variable>
1584
1858
 
1585
- <!-- <xsl:if test="$namespace = 'bipm'">
1586
- <fo:block>&#xA0;</fo:block>
1587
- </xsl:if> -->
1588
-
1589
1859
 
1590
1860
  <!-- Display table's name before table as standalone block -->
1591
1861
  <!-- $namespace = 'iso' or -->
1592
1862
 
1593
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1594
-
1595
-
1596
-
1597
-
1863
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
1864
+
1598
1865
 
1599
- <xsl:call-template name="fn_name_display"/>
1600
1866
 
1867
+ <xsl:call-template name="table_name_fn_display"/>
1601
1868
 
1602
1869
 
1603
1870
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
1604
1871
 
1605
- <!-- <xsl:variable name="cols-count">
1606
- <xsl:choose>
1607
- <xsl:when test="*[local-name()='thead']">
1608
- <xsl:call-template name="calculate-columns-numbers">
1609
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1610
- </xsl:call-template>
1611
- </xsl:when>
1612
- <xsl:otherwise>
1613
- <xsl:call-template name="calculate-columns-numbers">
1614
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1615
- </xsl:call-template>
1616
- </xsl:otherwise>
1617
- </xsl:choose>
1618
- </xsl:variable> -->
1619
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1620
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1621
-
1622
1872
  <xsl:variable name="colwidths">
1623
1873
  <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1624
1874
  <xsl:call-template name="calculate-column-widths">
@@ -1629,17 +1879,8 @@
1629
1879
  </xsl:variable>
1630
1880
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1631
1881
 
1632
- <!-- <xsl:variable name="colwidths2">
1633
- <xsl:call-template name="calculate-column-widths">
1634
- <xsl:with-param name="cols-count" select="$cols-count"/>
1635
- </xsl:call-template>
1636
- </xsl:variable> -->
1637
1882
 
1638
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1639
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
1640
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1641
-
1642
- <xsl:variable name="margin-left">
1883
+ <xsl:variable name="margin-side">
1643
1884
  <xsl:choose>
1644
1885
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1645
1886
  <xsl:otherwise>0</xsl:otherwise>
@@ -1647,63 +1888,67 @@
1647
1888
  </xsl:variable>
1648
1889
 
1649
1890
 
1650
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1651
-
1652
-
1653
-
1654
-
1655
-
1656
-
1891
+ <fo:block-container xsl:use-attribute-sets="table-container-style">
1892
+
1657
1893
 
1894
+ <xsl:attribute name="margin-left"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
1895
+ <xsl:attribute name="margin-right"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
1658
1896
 
1659
-
1897
+
1660
1898
 
1899
+
1661
1900
 
1901
+
1662
1902
 
1663
1903
 
1664
1904
 
1905
+
1665
1906
 
1666
1907
 
1667
1908
 
1668
1909
 
1669
1910
 
1911
+ <!-- end table block-container attributes -->
1670
1912
 
1671
1913
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
1672
1914
 
1673
1915
 
1916
+ <xsl:variable name="table_width_default">100%</xsl:variable>
1674
1917
  <xsl:variable name="table_width">
1675
1918
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1676
- 100%
1677
-
1678
-
1919
+ <xsl:value-of select="$table_width_default"/>
1679
1920
  </xsl:variable>
1680
1921
 
1922
+
1681
1923
  <xsl:variable name="table_attributes">
1682
- <attribute name="table-layout">fixed</attribute>
1683
- <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
1684
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1685
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1686
-
1687
-
1688
-
1689
-
1690
-
1691
-
1692
-
1693
-
1694
-
1695
-
1696
-
1697
-
1698
-
1699
-
1924
+
1925
+ <xsl:element name="table_attributes" use-attribute-sets="table-style">
1926
+ <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
1927
+
1928
+
1929
+ <xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
1930
+ <xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
1931
+
1932
+
1933
+
1934
+
1935
+
1936
+
1937
+
1938
+
1939
+
1940
+
1941
+
1942
+
1943
+
1944
+ </xsl:element>
1700
1945
  </xsl:variable>
1701
1946
 
1702
1947
 
1703
- <fo:table id="{@id}" table-omit-footer-at-break="true">
1948
+ <fo:table id="{@id}">
1704
1949
 
1705
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1706
- <xsl:attribute name="{@name}">
1950
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
1951
+ <xsl:attribute name="{local-name()}">
1707
1952
  <xsl:value-of select="."/>
1708
1953
  </xsl:attribute>
1709
1954
  </xsl:for-each>
@@ -1714,7 +1959,6 @@
1714
1959
  </xsl:if>
1715
1960
 
1716
1961
 
1717
-
1718
1962
  <xsl:choose>
1719
1963
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1720
1964
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -1740,7 +1984,7 @@
1740
1984
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1741
1985
  </xsl:when>
1742
1986
  <xsl:otherwise>
1743
- <xsl:apply-templates/>
1987
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer and note that renders separaterely -->
1744
1988
  </xsl:otherwise>
1745
1989
  </xsl:choose>
1746
1990
 
@@ -1755,25 +1999,6 @@
1755
1999
  </xsl:call-template>
1756
2000
  </xsl:for-each>
1757
2001
 
1758
- <!-- insert footer as table -->
1759
- <!-- <fo:table>
1760
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1761
- <xsl:attribute name="{@name}">
1762
- <xsl:value-of select="."/>
1763
- </xsl:attribute>
1764
- </xsl:for-each>
1765
-
1766
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1767
- <xsl:choose>
1768
- <xsl:when test=". = 1 or . = 0">
1769
- <fo:table-column column-width="proportional-column-width(2)"/>
1770
- </xsl:when>
1771
- <xsl:otherwise>
1772
- <fo:table-column column-width="proportional-column-width({.})"/>
1773
- </xsl:otherwise>
1774
- </xsl:choose>
1775
- </xsl:for-each>
1776
- </fo:table>-->
1777
2002
 
1778
2003
 
1779
2004
 
@@ -1834,18 +2059,17 @@
1834
2059
  </xsl:otherwise>
1835
2060
  </xsl:choose>
1836
2061
 
1837
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
2062
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
1838
2063
  <xsl:param name="continued"/>
1839
2064
  <xsl:if test="normalize-space() != ''">
1840
2065
  <fo:block xsl:use-attribute-sets="table-name-style">
1841
-
2066
+
1842
2067
 
1843
2068
 
1844
2069
 
1845
2070
 
1846
2071
  <xsl:choose>
1847
2072
  <xsl:when test="$continued = 'true'">
1848
- <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
1849
2073
 
1850
2074
  </xsl:when>
1851
2075
  <xsl:otherwise>
@@ -1908,13 +2132,6 @@
1908
2132
  <xsl:for-each select="xalan:nodeset($table)/*/tr">
1909
2133
  <xsl:variable name="td_text">
1910
2134
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
1911
-
1912
- <!-- <xsl:if test="$namespace = 'bipm'">
1913
- <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
1914
- <word><xsl:value-of select="normalize-space(.)"/></word>
1915
- </xsl:for-each>
1916
- </xsl:if> -->
1917
-
1918
2135
  </xsl:variable>
1919
2136
  <xsl:variable name="words">
1920
2137
  <xsl:variable name="string_with_added_zerospaces">
@@ -1951,7 +2168,6 @@
1951
2168
  </xsl:otherwise>
1952
2169
  </xsl:choose>
1953
2170
  </xsl:variable>
1954
-
1955
2171
 
1956
2172
  <column>
1957
2173
  <xsl:for-each select="xalan:nodeset($widths)//width">
@@ -1985,9 +2201,8 @@
1985
2201
 
1986
2202
  <xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
1987
2203
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
1988
- </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2204
+ </xsl:template><xsl:template match="*[local-name()='thead']">
1989
2205
  <xsl:param name="cols-count"/>
1990
- <!-- font-weight="bold" -->
1991
2206
  <fo:table-header>
1992
2207
 
1993
2208
 
@@ -1999,85 +2214,26 @@
1999
2214
  <fo:table-row>
2000
2215
  <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
2001
2216
 
2002
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
2217
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
2003
2218
  <xsl:with-param name="continued">true</xsl:with-param>
2004
2219
  </xsl:apply-templates>
2005
2220
 
2006
2221
 
2007
2222
 
2008
-
2009
2223
  </fo:table-cell>
2010
2224
  </fo:table-row>
2011
2225
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
2012
2226
  <fo:table-body>
2013
2227
  <xsl:apply-templates/>
2014
2228
  </fo:table-body>
2015
- </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
2229
+ </xsl:template><xsl:template match="*[local-name()='tfoot']">
2016
2230
  <xsl:apply-templates/>
2017
2231
  </xsl:template><xsl:template name="insertTableFooter">
2018
2232
  <xsl:param name="cols-count"/>
2019
2233
  <xsl:if test="../*[local-name()='tfoot']">
2020
2234
  <fo:table-footer>
2021
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2022
- </fo:table-footer>
2023
- </xsl:if>
2024
- </xsl:template><xsl:template name="insertTableFooter2">
2025
- <xsl:param name="cols-count"/>
2026
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2027
- <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
2028
-
2029
- <fo:table-footer>
2030
-
2031
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2032
-
2033
- <!-- if there are note(s) or fn(s) then create footer row -->
2034
- <xsl:if test="$isNoteOrFnExist = 'true'">
2035
-
2036
-
2037
-
2038
- <fo:table-row>
2039
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2040
-
2041
-
2042
-
2043
- <!-- fn will be processed inside 'note' processing -->
2044
-
2045
-
2046
-
2047
-
2048
-
2049
-
2050
- <!-- except gb -->
2051
-
2052
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2053
-
2054
-
2055
- <!-- show Note under table in preface (ex. abstract) sections -->
2056
- <!-- empty, because notes show at page side in main sections -->
2057
- <!-- <xsl:if test="$namespace = 'bipm'">
2058
- <xsl:choose>
2059
- <xsl:when test="ancestor::*[local-name()='preface']">
2060
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2061
- </xsl:when>
2062
- <xsl:otherwise>
2063
- <fo:block/>
2064
- </xsl:otherwise>
2065
- </xsl:choose>
2066
- </xsl:if> -->
2067
-
2068
-
2069
- <!-- horizontal row separator -->
2070
-
2071
-
2072
- <!-- fn processing -->
2073
- <xsl:call-template name="fn_display"/>
2074
-
2075
- </fo:table-cell>
2076
- </fo:table-row>
2077
-
2078
- </xsl:if>
2235
+ <xsl:apply-templates select="../*[local-name()='tfoot']"/>
2079
2236
  </fo:table-footer>
2080
-
2081
2237
  </xsl:if>
2082
2238
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
2083
2239
  <xsl:param name="table_attributes"/>
@@ -2104,17 +2260,18 @@
2104
2260
  </xsl:variable>
2105
2261
 
2106
2262
  <fo:table keep-with-previous="always">
2107
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2263
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2264
+ <xsl:variable name="name" select="local-name()"/>
2108
2265
  <xsl:choose>
2109
- <xsl:when test="@name = 'border-top'">
2110
- <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
2266
+ <xsl:when test="$name = 'border-top'">
2267
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
2111
2268
  </xsl:when>
2112
- <xsl:when test="@name = 'border'">
2113
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2269
+ <xsl:when test="$name = 'border'">
2270
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2114
2271
  <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
2115
2272
  </xsl:when>
2116
2273
  <xsl:otherwise>
2117
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2274
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2118
2275
  </xsl:otherwise>
2119
2276
  </xsl:choose>
2120
2277
  </xsl:for-each>
@@ -2143,9 +2300,10 @@
2143
2300
 
2144
2301
  <fo:table-body>
2145
2302
  <fo:table-row>
2146
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2303
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
2147
2304
 
2148
2305
 
2306
+
2149
2307
 
2150
2308
 
2151
2309
  <!-- fn will be processed inside 'note' processing -->
@@ -2155,37 +2313,20 @@
2155
2313
 
2156
2314
 
2157
2315
 
2158
-
2159
-
2160
-
2161
2316
  <!-- for BSI (not PAS) display Notes before footnotes -->
2162
2317
 
2163
2318
 
2164
- <!-- except gb -->
2165
-
2166
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2167
-
2319
+ <!-- except gb and bsi -->
2168
2320
 
2169
- <!-- <xsl:if test="$namespace = 'bipm'">
2170
- <xsl:choose>
2171
- <xsl:when test="ancestor::*[local-name()='preface']">
2172
- show Note under table in preface (ex. abstract) sections
2173
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2174
- </xsl:when>
2175
- <xsl:otherwise>
2176
- empty, because notes show at page side in main sections
2177
- <fo:block/>
2178
- </xsl:otherwise>
2179
- </xsl:choose>
2180
- </xsl:if> -->
2321
+ <xsl:apply-templates select="../*[local-name()='note']"/>
2322
+
2181
2323
 
2182
2324
 
2183
2325
  <!-- horizontal row separator -->
2184
2326
 
2185
2327
 
2186
2328
  <!-- fn processing -->
2187
- <xsl:call-template name="fn_display"/>
2188
-
2329
+ <xsl:call-template name="table_fn_display"/>
2189
2330
 
2190
2331
  <!-- for PAS display Notes after footnotes -->
2191
2332
 
@@ -2215,7 +2356,7 @@
2215
2356
 
2216
2357
 
2217
2358
 
2218
- <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
2359
+ <xsl:apply-templates select="../*[local-name()='thead']">
2219
2360
  <xsl:with-param name="cols-count" select="$cols-count"/>
2220
2361
  </xsl:apply-templates>
2221
2362
 
@@ -2227,78 +2368,57 @@
2227
2368
 
2228
2369
 
2229
2370
  <xsl:apply-templates/>
2230
- <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
2231
-
2371
+
2232
2372
  </fo:table-body>
2233
2373
 
2234
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
2235
- <xsl:choose>
2236
- <xsl:when test="substring-after(., '—') != ''">
2237
- <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
2238
- </xsl:when>
2239
- <xsl:otherwise>
2240
- <xsl:value-of select="."/>
2241
- </xsl:otherwise>
2242
- </xsl:choose>
2243
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
2244
- <xsl:apply-templates mode="presentation_name"/>
2245
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
2246
- <xsl:apply-templates select="."/>
2247
- </xsl:template><xsl:template match="*[local-name()='tr']">
2248
- <xsl:variable name="parent-name" select="local-name(..)"/>
2249
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2250
- <fo:table-row min-height="4mm">
2251
- <xsl:if test="$parent-name = 'thead'">
2252
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2253
-
2254
-
2255
-
2256
-
2257
-
2258
-
2259
-
2260
-
2261
- </xsl:if>
2262
- <xsl:if test="$parent-name = 'tfoot'">
2263
-
2264
-
2265
-
2266
- </xsl:if>
2267
-
2268
-
2269
-
2270
-
2271
-
2272
-
2273
-
2274
-
2275
-
2276
-
2277
- <!-- <xsl:if test="$namespace = 'bipm'">
2278
- <xsl:attribute name="height">8mm</xsl:attribute>
2279
- </xsl:if> -->
2280
-
2374
+ </xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
2375
+ <fo:table-row xsl:use-attribute-sets="table-header-row-style">
2376
+
2377
+
2378
+
2379
+
2380
+
2381
+
2382
+
2383
+ <xsl:call-template name="setTableRowAttributes"/>
2384
+
2281
2385
  <xsl:apply-templates/>
2282
2386
  </fo:table-row>
2283
- </xsl:template><xsl:template match="*[local-name()='th']">
2284
- <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
2285
- <xsl:attribute name="text-align">
2286
- <xsl:choose>
2287
- <xsl:when test="@align">
2288
- <xsl:call-template name="setAlignment"/>
2289
- <!-- <xsl:value-of select="@align"/> -->
2290
- </xsl:when>
2291
- <xsl:otherwise>center</xsl:otherwise>
2292
- </xsl:choose>
2293
- </xsl:attribute>
2294
-
2387
+ </xsl:template><xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
2388
+ <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
2295
2389
 
2390
+ <xsl:call-template name="setTableRowAttributes"/>
2391
+ <xsl:apply-templates/>
2392
+ </fo:table-row>
2393
+ </xsl:template><xsl:template match="*[local-name()='tr']">
2394
+ <fo:table-row xsl:use-attribute-sets="table-body-row-style">
2395
+
2296
2396
 
2397
+
2297
2398
 
2399
+
2400
+ <xsl:call-template name="setTableRowAttributes"/>
2401
+ <xsl:apply-templates/>
2402
+ </fo:table-row>
2403
+ </xsl:template><xsl:template name="setTableRowAttributes">
2404
+
2405
+
2406
+
2407
+
2408
+
2409
+
2410
+
2411
+
2412
+ </xsl:template><xsl:template match="*[local-name()='th']">
2413
+ <fo:table-cell xsl:use-attribute-sets="table-header-cell-style"> <!-- text-align="{@align}" -->
2414
+ <xsl:call-template name="setTextAlignment">
2415
+ <xsl:with-param name="default">center</xsl:with-param>
2416
+ </xsl:call-template>
2298
2417
 
2299
2418
 
2300
2419
 
2301
2420
 
2421
+
2302
2422
 
2303
2423
 
2304
2424
 
@@ -2307,21 +2427,25 @@
2307
2427
  <xsl:if test="$lang = 'ar'">
2308
2428
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2309
2429
  </xsl:if>
2310
- <xsl:if test="@colspan">
2311
- <xsl:attribute name="number-columns-spanned">
2312
- <xsl:value-of select="@colspan"/>
2313
- </xsl:attribute>
2314
- </xsl:if>
2315
- <xsl:if test="@rowspan">
2316
- <xsl:attribute name="number-rows-spanned">
2317
- <xsl:value-of select="@rowspan"/>
2318
- </xsl:attribute>
2319
- </xsl:if>
2320
- <xsl:call-template name="display-align"/>
2430
+
2431
+ <xsl:call-template name="setTableCellAttributes"/>
2432
+
2321
2433
  <fo:block>
2322
2434
  <xsl:apply-templates/>
2323
2435
  </fo:block>
2324
2436
  </fo:table-cell>
2437
+ </xsl:template><xsl:template name="setTableCellAttributes">
2438
+ <xsl:if test="@colspan">
2439
+ <xsl:attribute name="number-columns-spanned">
2440
+ <xsl:value-of select="@colspan"/>
2441
+ </xsl:attribute>
2442
+ </xsl:if>
2443
+ <xsl:if test="@rowspan">
2444
+ <xsl:attribute name="number-rows-spanned">
2445
+ <xsl:value-of select="@rowspan"/>
2446
+ </xsl:attribute>
2447
+ </xsl:if>
2448
+ <xsl:call-template name="display-align"/>
2325
2449
  </xsl:template><xsl:template name="display-align">
2326
2450
  <xsl:if test="@valign">
2327
2451
  <xsl:attribute name="display-align">
@@ -2334,22 +2458,19 @@
2334
2458
  </xsl:attribute>
2335
2459
  </xsl:if>
2336
2460
  </xsl:template><xsl:template match="*[local-name()='td']">
2337
- <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
2338
- <xsl:attribute name="text-align">
2339
- <xsl:choose>
2340
- <xsl:when test="@align">
2341
- <xsl:call-template name="setAlignment"/>
2342
- <!-- <xsl:value-of select="@align"/> -->
2343
- </xsl:when>
2344
- <xsl:otherwise>left</xsl:otherwise>
2345
- </xsl:choose>
2346
- </xsl:attribute>
2461
+ <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
2462
+ <xsl:call-template name="setTextAlignment">
2463
+ <xsl:with-param name="default">left</xsl:with-param>
2464
+ </xsl:call-template>
2465
+
2347
2466
  <xsl:if test="$lang = 'ar'">
2348
2467
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2349
2468
  </xsl:if>
2350
2469
 
2351
2470
 
2352
2471
 
2472
+ <!-- bsi -->
2473
+
2353
2474
 
2354
2475
 
2355
2476
 
@@ -2357,36 +2478,36 @@
2357
2478
 
2358
2479
 
2359
2480
 
2481
+
2360
2482
 
2361
2483
 
2362
2484
 
2363
2485
 
2364
2486
 
2365
2487
 
2366
- <xsl:if test=".//*[local-name() = 'table']">
2488
+ <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
2367
2489
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2368
2490
  </xsl:if>
2369
- <xsl:if test="@colspan">
2370
- <xsl:attribute name="number-columns-spanned">
2371
- <xsl:value-of select="@colspan"/>
2372
- </xsl:attribute>
2373
- </xsl:if>
2374
- <xsl:if test="@rowspan">
2375
- <xsl:attribute name="number-rows-spanned">
2376
- <xsl:value-of select="@rowspan"/>
2377
- </xsl:attribute>
2378
- </xsl:if>
2379
- <xsl:call-template name="display-align"/>
2491
+
2492
+ <xsl:call-template name="setTableCellAttributes"/>
2493
+
2380
2494
  <fo:block>
2381
-
2495
+
2496
+
2497
+
2382
2498
  <xsl:apply-templates/>
2383
2499
  </fo:block>
2384
2500
  </fo:table-cell>
2385
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
2386
-
2501
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
2502
+
2503
+ <fo:block xsl:use-attribute-sets="table-note-style">
2504
+
2505
+
2506
+
2507
+
2387
2508
 
2388
- <fo:block font-size="10pt" margin-bottom="12pt">
2389
-
2509
+ <!-- Table's note name (NOTE, for example) -->
2510
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
2390
2511
 
2391
2512
 
2392
2513
 
@@ -2394,24 +2515,16 @@
2394
2515
 
2395
2516
 
2396
2517
 
2397
- <!-- Table's note name (NOTE, for example) -->
2398
-
2399
- <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
2400
-
2401
-
2402
-
2518
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
2403
2519
 
2404
-
2405
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2406
-
2407
- </fo:inline>
2408
-
2409
-
2410
-
2411
- <xsl:apply-templates mode="process"/>
2412
- </fo:block>
2520
+ </fo:inline>
2521
+
2522
+
2523
+
2524
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
2525
+ </fo:block>
2413
2526
 
2414
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
2527
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
2415
2528
  <xsl:apply-templates/>
2416
2529
  </xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
2417
2530
 
@@ -2489,8 +2602,7 @@
2489
2602
  <xsl:copy-of select="$footnote_inline"/>
2490
2603
  <fo:footnote-body>
2491
2604
 
2492
- <fo:block-container text-indent="0" start-indent="0">
2493
-
2605
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
2494
2606
 
2495
2607
  <fo:block xsl:use-attribute-sets="fn-body-style">
2496
2608
 
@@ -2509,7 +2621,7 @@
2509
2621
  <xsl:copy-of select="$footnote_inline"/>
2510
2622
  </xsl:otherwise>
2511
2623
  </xsl:choose>
2512
- </xsl:template><xsl:template name="fn_display">
2624
+ </xsl:template><xsl:template name="table_fn_display">
2513
2625
  <xsl:variable name="references">
2514
2626
 
2515
2627
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
@@ -2520,33 +2632,26 @@
2520
2632
  <xsl:for-each select="xalan:nodeset($references)//fn">
2521
2633
  <xsl:variable name="reference" select="@reference"/>
2522
2634
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
2523
- <fo:block margin-bottom="12pt">
2635
+ <fo:block xsl:use-attribute-sets="table-fn-style">
2524
2636
 
2525
2637
 
2526
2638
 
2527
-
2528
-
2529
-
2530
-
2531
- <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
2639
+ <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
2532
2640
 
2533
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2534
2641
 
2535
2642
 
2536
2643
 
2537
2644
 
2645
+ <xsl:value-of select="@reference"/>
2538
2646
 
2539
2647
 
2540
2648
 
2541
2649
 
2542
- <xsl:value-of select="@reference"/>
2543
2650
 
2544
2651
 
2545
2652
 
2546
2653
  </fo:inline>
2547
- <fo:inline>
2548
-
2549
- <!-- <xsl:apply-templates /> -->
2654
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
2550
2655
  <xsl:copy-of select="./node()"/>
2551
2656
  </fo:inline>
2552
2657
  </fo:block>
@@ -2558,15 +2663,7 @@
2558
2663
 
2559
2664
  <xsl:apply-templates/>
2560
2665
  </fn>
2561
- </xsl:template><xsl:template name="fn_name_display">
2562
- <!-- <xsl:variable name="references">
2563
- <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2564
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2565
- <xsl:apply-templates />
2566
- </fn>
2567
- </xsl:for-each>
2568
- </xsl:variable>
2569
- $references=<xsl:copy-of select="$references"/> -->
2666
+ </xsl:template><xsl:template name="table_name_fn_display">
2570
2667
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2571
2668
  <xsl:variable name="reference" select="@reference"/>
2572
2669
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
@@ -2575,9 +2672,7 @@
2575
2672
  </fo:block>
2576
2673
  </xsl:for-each>
2577
2674
  </xsl:template><xsl:template name="fn_display_figure">
2578
- <xsl:variable name="key_iso">
2579
- <!-- and (not(@class) or @class !='pseudocode') -->
2580
- </xsl:variable>
2675
+
2581
2676
  <xsl:variable name="references">
2582
2677
  <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
2583
2678
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -2585,50 +2680,52 @@
2585
2680
  </fn>
2586
2681
  </xsl:for-each>
2587
2682
  </xsl:variable>
2683
+
2684
+ <xsl:if test="xalan:nodeset($references)//fn">
2588
2685
 
2589
- <!-- current hierarchy is 'figure' element -->
2590
- <xsl:variable name="following_dl_colwidths">
2591
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2592
- <xsl:variable name="html-table">
2593
- <xsl:variable name="doc_ns">
2594
-
2595
- </xsl:variable>
2596
- <xsl:variable name="ns">
2597
- <xsl:choose>
2598
- <xsl:when test="normalize-space($doc_ns) != ''">
2599
- <xsl:value-of select="normalize-space($doc_ns)"/>
2600
- </xsl:when>
2601
- <xsl:otherwise>
2602
- <xsl:value-of select="substring-before(name(/*), '-')"/>
2603
- </xsl:otherwise>
2604
- </xsl:choose>
2605
- </xsl:variable>
2606
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2607
- <!-- <xsl:element name="{$ns}:table"> -->
2608
- <xsl:for-each select="*[local-name() = 'dl'][1]">
2609
- <tbody>
2610
- <xsl:apply-templates mode="dl"/>
2611
- </tbody>
2612
- </xsl:for-each>
2613
- <!-- </xsl:element> -->
2614
- </xsl:variable>
2615
-
2616
- <xsl:call-template name="calculate-column-widths">
2617
- <xsl:with-param name="cols-count" select="2"/>
2618
- <xsl:with-param name="table" select="$html-table"/>
2619
- </xsl:call-template>
2686
+ <xsl:variable name="key_iso">
2620
2687
 
2621
- </xsl:if>
2622
- </xsl:variable>
2623
-
2624
-
2625
- <xsl:variable name="maxlength_dt">
2626
- <xsl:for-each select="*[local-name() = 'dl'][1]">
2627
- <xsl:call-template name="getMaxLength_dt"/>
2628
- </xsl:for-each>
2629
- </xsl:variable>
2630
-
2631
- <xsl:if test="xalan:nodeset($references)//fn">
2688
+ </xsl:variable>
2689
+
2690
+ <!-- current hierarchy is 'figure' element -->
2691
+ <xsl:variable name="following_dl_colwidths">
2692
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2693
+ <xsl:variable name="html-table">
2694
+ <xsl:variable name="doc_ns">
2695
+
2696
+ </xsl:variable>
2697
+ <xsl:variable name="ns">
2698
+ <xsl:choose>
2699
+ <xsl:when test="normalize-space($doc_ns) != ''">
2700
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2701
+ </xsl:when>
2702
+ <xsl:otherwise>
2703
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2704
+ </xsl:otherwise>
2705
+ </xsl:choose>
2706
+ </xsl:variable>
2707
+
2708
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
2709
+ <tbody>
2710
+ <xsl:apply-templates mode="dl"/>
2711
+ </tbody>
2712
+ </xsl:for-each>
2713
+ </xsl:variable>
2714
+
2715
+ <xsl:call-template name="calculate-column-widths">
2716
+ <xsl:with-param name="cols-count" select="2"/>
2717
+ <xsl:with-param name="table" select="$html-table"/>
2718
+ </xsl:call-template>
2719
+
2720
+ </xsl:if>
2721
+ </xsl:variable>
2722
+
2723
+ <xsl:variable name="maxlength_dt">
2724
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
2725
+ <xsl:call-template name="getMaxLength_dt"/>
2726
+ </xsl:for-each>
2727
+ </xsl:variable>
2728
+
2632
2729
  <fo:block>
2633
2730
  <fo:table width="95%" table-layout="fixed">
2634
2731
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -2655,20 +2752,18 @@
2655
2752
  <fo:table-row>
2656
2753
  <fo:table-cell>
2657
2754
  <fo:block>
2658
- <fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
2659
-
2755
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
2660
2756
  <xsl:value-of select="@reference"/>
2661
2757
  </fo:inline>
2662
2758
  </fo:block>
2663
2759
  </fo:table-cell>
2664
2760
  <fo:table-cell>
2665
- <fo:block text-align="justify" margin-bottom="12pt">
2666
-
2761
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
2667
2762
  <xsl:if test="normalize-space($key_iso) = 'true'">
2668
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
2763
+
2764
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
2765
+
2669
2766
  </xsl:if>
2670
-
2671
- <!-- <xsl:apply-templates /> -->
2672
2767
  <xsl:copy-of select="./node()"/>
2673
2768
  </fo:block>
2674
2769
  </fo:table-cell>
@@ -2681,14 +2776,8 @@
2681
2776
  </xsl:if>
2682
2777
 
2683
2778
  </xsl:template><xsl:template match="*[local-name()='fn']">
2684
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2685
- <fo:inline font-size="80%" keep-with-previous.within-line="always">
2686
-
2687
-
2688
-
2689
-
2690
-
2691
-
2779
+ <fo:inline xsl:use-attribute-sets="fn-reference-style">
2780
+
2692
2781
 
2693
2782
 
2694
2783
 
@@ -2712,10 +2801,10 @@
2712
2801
  <xsl:variable name="isDeleted" select="@deleted"/>
2713
2802
  <fo:block-container>
2714
2803
 
2715
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2716
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2717
- </xsl:if>
2718
-
2804
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2805
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2806
+ </xsl:if>
2807
+
2719
2808
 
2720
2809
  <xsl:if test="parent::*[local-name() = 'note']">
2721
2810
  <xsl:attribute name="margin-left">
@@ -2732,11 +2821,11 @@
2732
2821
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
2733
2822
  </xsl:call-template>
2734
2823
 
2735
- <fo:block-container>
2736
-
2737
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2738
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2824
+ <fo:block-container margin-left="0mm">
2825
+
2739
2826
 
2827
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2828
+
2740
2829
 
2741
2830
  <xsl:variable name="parent" select="local-name(..)"/>
2742
2831
 
@@ -2747,23 +2836,19 @@
2747
2836
  <xsl:choose>
2748
2837
  <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2749
2838
 
2750
-
2751
- <fo:block margin-bottom="12pt" text-align="left">
2752
-
2753
- <xsl:variable name="title-where">
2754
-
2839
+ <fo:block margin-bottom="12pt" text-align="left">
2755
2840
 
2756
- <xsl:call-template name="getTitle">
2757
- <xsl:with-param name="name" select="'title-where'"/>
2841
+ <xsl:variable name="title-where">
2842
+ <xsl:call-template name="getLocalizedString">
2843
+ <xsl:with-param name="key">where</xsl:with-param>
2758
2844
  </xsl:call-template>
2759
-
2760
- </xsl:variable>
2761
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2762
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
2763
- <xsl:text/>
2764
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2765
- </fo:block>
2766
-
2845
+ </xsl:variable>
2846
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2847
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
2848
+ <xsl:text/>
2849
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2850
+ </fo:block>
2851
+
2767
2852
  </xsl:when>
2768
2853
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2769
2854
  <fo:block margin-bottom="12pt" text-align="left">
@@ -2772,12 +2857,9 @@
2772
2857
 
2773
2858
 
2774
2859
  <xsl:variable name="title-where">
2775
-
2776
-
2777
- <xsl:call-template name="getTitle">
2778
- <xsl:with-param name="name" select="'title-where'"/>
2779
- </xsl:call-template>
2780
-
2860
+ <xsl:call-template name="getLocalizedString">
2861
+ <xsl:with-param name="key">where</xsl:with-param>
2862
+ </xsl:call-template>
2781
2863
  </xsl:variable>
2782
2864
  <xsl:value-of select="$title-where"/>
2783
2865
  </fo:block>
@@ -2789,12 +2871,9 @@
2789
2871
 
2790
2872
 
2791
2873
  <xsl:variable name="title-key">
2792
-
2793
-
2794
- <xsl:call-template name="getTitle">
2795
- <xsl:with-param name="name" select="'title-key'"/>
2796
- </xsl:call-template>
2797
-
2874
+ <xsl:call-template name="getLocalizedString">
2875
+ <xsl:with-param name="key">key</xsl:with-param>
2876
+ </xsl:call-template>
2798
2877
  </xsl:variable>
2799
2878
  <xsl:value-of select="$title-key"/>
2800
2879
  </fo:block>
@@ -2816,9 +2895,7 @@
2816
2895
  <fo:table width="95%" table-layout="fixed">
2817
2896
 
2818
2897
  <xsl:choose>
2819
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2820
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2821
- </xsl:when>
2898
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
2822
2899
  <xsl:when test="normalize-space($key_iso) = 'true'">
2823
2900
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2824
2901
 
@@ -2839,12 +2916,9 @@
2839
2916
  </xsl:otherwise>
2840
2917
  </xsl:choose>
2841
2918
  </xsl:variable>
2842
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2843
- <!-- <xsl:element name="{$ns}:table"> -->
2844
- <tbody>
2845
- <xsl:apply-templates mode="dl"/>
2846
- </tbody>
2847
- <!-- </xsl:element> -->
2919
+ <tbody>
2920
+ <xsl:apply-templates mode="dl"/>
2921
+ </tbody>
2848
2922
  </xsl:variable>
2849
2923
  <!-- html-table<xsl:copy-of select="$html-table"/> -->
2850
2924
  <xsl:variable name="colwidths">
@@ -2924,8 +2998,6 @@
2924
2998
  </xsl:for-each>
2925
2999
  </xsl:otherwise>
2926
3000
  </xsl:choose>
2927
- <!-- <fo:table-column column-width="15%"/>
2928
- <fo:table-column column-width="85%"/> -->
2929
3001
  </xsl:otherwise>
2930
3002
  </xsl:choose>
2931
3003
  </xsl:template><xsl:template name="getMaxLength_dt">
@@ -2940,12 +3012,6 @@
2940
3012
  </xsl:for-each>
2941
3013
  </xsl:variable>
2942
3014
  <xsl:variable name="maxLength">
2943
- <!-- <xsl:for-each select="*[local-name()='dt']">
2944
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
2945
- <xsl:if test="position() = 1">
2946
- <xsl:value-of select="string-length(normalize-space(.))"/>
2947
- </xsl:if>
2948
- </xsl:for-each> -->
2949
3015
  <xsl:for-each select="xalan:nodeset($lengths)/length">
2950
3016
  <xsl:sort select="." data-type="number" order="descending"/>
2951
3017
  <xsl:if test="position() = 1">
@@ -2971,12 +3037,12 @@
2971
3037
  <xsl:if test="normalize-space($key_iso) = 'true'">
2972
3038
  <xsl:attribute name="margin-top">0</xsl:attribute>
2973
3039
  </xsl:if>
2974
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3040
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
2975
3041
  </fo:block>
2976
3042
  </fo:table-cell>
2977
3043
  <fo:table-cell>
2978
3044
  <fo:block>
2979
- <xsl:apply-templates/>
3045
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
2980
3046
  </fo:block>
2981
3047
  </fo:table-cell>
2982
3048
  </fo:table-row>
@@ -2987,80 +3053,49 @@
2987
3053
  </td>
2988
3054
  <td>
2989
3055
 
2990
-
2991
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2992
-
3056
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
3057
+ <xsl:with-param name="process">true</xsl:with-param>
3058
+ </xsl:apply-templates>
3059
+
2993
3060
  </td>
2994
3061
  </tr>
2995
3062
 
2996
3063
  </xsl:template><xsl:template match="*[local-name()='dt']">
2997
3064
  <xsl:param name="key_iso"/>
2998
3065
 
2999
- <fo:table-row>
3000
-
3001
-
3066
+ <fo:table-row xsl:use-attribute-sets="dt-row-style">
3002
3067
  <fo:table-cell>
3003
3068
 
3004
- <fo:block margin-top="6pt">
3069
+ <fo:block xsl:use-attribute-sets="dt-style">
3005
3070
  <xsl:copy-of select="@id"/>
3006
3071
 
3007
-
3008
3072
  <xsl:if test="normalize-space($key_iso) = 'true'">
3009
3073
  <xsl:attribute name="margin-top">0</xsl:attribute>
3010
-
3011
3074
  </xsl:if>
3012
3075
 
3013
3076
 
3014
3077
 
3015
-
3016
-
3017
-
3018
-
3019
3078
  <xsl:apply-templates/>
3020
- <!-- <xsl:if test="$namespace = 'gb'">
3021
- <xsl:if test="ancestor::*[local-name()='formula']">
3022
- <xsl:text>—</xsl:text>
3023
- </xsl:if>
3024
- </xsl:if> -->
3025
3079
  </fo:block>
3026
3080
  </fo:table-cell>
3027
3081
  <fo:table-cell>
3028
3082
  <fo:block>
3029
3083
 
3030
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3031
- <xsl:if test="local-name(*[1]) != 'stem'">
3032
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3033
- </xsl:if>
3034
- </xsl:if> -->
3035
-
3036
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3037
-
3084
+
3085
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
3086
+ <xsl:with-param name="process">true</xsl:with-param>
3087
+ </xsl:apply-templates>
3038
3088
  </fo:block>
3039
3089
  </fo:table-cell>
3040
3090
  </fo:table-row>
3041
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3042
- <xsl:if test="local-name(*[1]) = 'stem'">
3043
- <fo:table-row>
3044
- <fo:table-cell>
3045
- <fo:block margin-top="6pt">
3046
- <xsl:if test="normalize-space($key_iso) = 'true'">
3047
- <xsl:attribute name="margin-top">0</xsl:attribute>
3048
- </xsl:if>
3049
- <xsl:text>&#xA0;</xsl:text>
3050
- </fo:block>
3051
- </fo:table-cell>
3052
- <fo:table-cell>
3053
- <fo:block>
3054
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3055
- </fo:block>
3056
- </fo:table-cell>
3057
- </fo:table-row>
3058
- </xsl:if>
3059
- </xsl:if> -->
3060
3091
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
3061
3092
  <xsl:apply-templates/>
3062
- </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
3063
- <xsl:apply-templates/>
3093
+ </xsl:template><xsl:template match="*[local-name()='dd']">
3094
+ <xsl:param name="process">false</xsl:param>
3095
+ <xsl:if test="$process = 'true'">
3096
+ <xsl:apply-templates select="@language"/>
3097
+ <xsl:apply-templates/>
3098
+ </xsl:if>
3064
3099
  </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
3065
3100
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
3066
3101
  </xsl:template><xsl:template match="*[local-name()='em']">
@@ -3084,6 +3119,7 @@
3084
3119
  </fo:inline>
3085
3120
  </xsl:template><xsl:template match="*[local-name()='tt']">
3086
3121
  <fo:inline xsl:use-attribute-sets="tt-style">
3122
+
3087
3123
  <xsl:variable name="_font-size">
3088
3124
 
3089
3125
 
@@ -3125,7 +3161,22 @@
3125
3161
  <xsl:apply-templates/>
3126
3162
  </fo:inline>
3127
3163
  </xsl:template><xsl:template match="*[local-name()='add']">
3164
+ <xsl:param name="skip">true</xsl:param>
3128
3165
  <xsl:choose>
3166
+ <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
3167
+ <xsl:choose>
3168
+ <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab'])) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
3169
+ <xsl:otherwise>
3170
+ <fo:inline>
3171
+ <xsl:call-template name="insertTag">
3172
+ <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
3173
+ <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
3174
+ <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
3175
+ </xsl:call-template>
3176
+ </fo:inline>
3177
+ </xsl:otherwise>
3178
+ </xsl:choose>
3179
+ </xsl:when>
3129
3180
  <xsl:when test="@amendment">
3130
3181
  <fo:inline>
3131
3182
  <xsl:call-template name="insertTag">
@@ -3160,7 +3211,6 @@
3160
3211
  </fo:inline>
3161
3212
  </xsl:otherwise>
3162
3213
  </xsl:choose>
3163
-
3164
3214
  </xsl:template><xsl:template name="insertTag">
3165
3215
  <xsl:param name="type"/>
3166
3216
  <xsl:param name="kind"/>
@@ -3168,22 +3218,20 @@
3168
3218
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
3169
3219
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
3170
3220
  <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
3171
- <!-- <xsl:attribute name="width">7mm</xsl:attribute>
3172
- <xsl:attribute name="content-height">100%</xsl:attribute> -->
3173
3221
  <xsl:attribute name="height">5mm</xsl:attribute>
3174
3222
  <xsl:attribute name="content-width">100%</xsl:attribute>
3175
3223
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
3176
3224
  <xsl:attribute name="scaling">uniform</xsl:attribute>
3177
3225
  <svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
3178
3226
  <g>
3179
- <xsl:if test="$type = 'closing'">
3227
+ <xsl:if test="$type = 'closing' or $type = 'end'">
3180
3228
  <xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
3181
3229
  </xsl:if>
3182
3230
  <polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
3183
3231
  <line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
3184
3232
  </g>
3185
3233
  <text font-family="Arial" x="15" y="57" font-size="40pt">
3186
- <xsl:if test="$type = 'closing'">
3234
+ <xsl:if test="$type = 'closing' or $type = 'end'">
3187
3235
  <xsl:attribute name="x">25</xsl:attribute>
3188
3236
  </xsl:if>
3189
3237
  <xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
@@ -3227,7 +3275,11 @@
3227
3275
  <xsl:with-param name="text" select="substring($text,2)"/>
3228
3276
  </xsl:call-template>
3229
3277
  </xsl:if>
3230
- </xsl:template><xsl:template name="tokenize">
3278
+ </xsl:template><xsl:template match="*[local-name() = 'pagebreak']">
3279
+ <fo:block break-after="page"/>
3280
+ <fo:block> </fo:block>
3281
+ <fo:block break-after="page"/>
3282
+ </xsl:template><xsl:template name="tokenize">
3231
3283
  <xsl:param name="text"/>
3232
3284
  <xsl:param name="separator" select="' '"/>
3233
3285
  <xsl:choose>
@@ -3387,14 +3439,6 @@
3387
3439
 
3388
3440
  <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
3389
3441
 
3390
- <!-- <xsl:choose>
3391
- <xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
3392
-
3393
- </xsl:when>
3394
- <xsl:otherwise>
3395
- <xsl:copy-of select="current()"/>
3396
- </xsl:otherwise>
3397
- </xsl:choose> -->
3398
3442
  </xsl:variable>
3399
3443
  <xsl:copy-of select="$simple-table"/>
3400
3444
  </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
@@ -3513,8 +3557,6 @@
3513
3557
  <xsl:choose>
3514
3558
  <xsl:when test="contains($str2, ' ')">
3515
3559
  <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
3516
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
3517
- <xsl:value-of select="substring($substr, 2)"/> -->
3518
3560
  <xsl:call-template name="capitalize">
3519
3561
  <xsl:with-param name="str" select="$substr"/>
3520
3562
  </xsl:call-template>
@@ -3524,8 +3566,6 @@
3524
3566
  </xsl:call-template>
3525
3567
  </xsl:when>
3526
3568
  <xsl:otherwise>
3527
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
3528
- <xsl:value-of select="substring($str2, 2)"/> -->
3529
3569
  <xsl:call-template name="capitalize">
3530
3570
  <xsl:with-param name="str" select="$str2"/>
3531
3571
  </xsl:call-template>
@@ -3553,6 +3593,7 @@
3553
3593
  <xsl:apply-templates select="." mode="mathml"/>
3554
3594
  </xsl:variable>
3555
3595
  <fo:instream-foreign-object fox:alt-text="Math">
3596
+
3556
3597
 
3557
3598
 
3558
3599
  <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
@@ -3584,7 +3625,7 @@
3584
3625
  </xsl:attribute>
3585
3626
 
3586
3627
 
3587
- <!-- <xsl:copy-of select="."/> -->
3628
+
3588
3629
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
3589
3630
  </fo:instream-foreign-object>
3590
3631
  </fo:inline>
@@ -3643,6 +3684,10 @@
3643
3684
 
3644
3685
 
3645
3686
 
3687
+
3688
+
3689
+
3690
+
3646
3691
  <xsl:choose>
3647
3692
  <xsl:when test="$target_text = ''">
3648
3693
  <xsl:apply-templates/>
@@ -3666,19 +3711,19 @@
3666
3711
  </fo:inline>
3667
3712
  </xsl:template><xsl:template match="*[local-name()='appendix']">
3668
3713
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
3669
- <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
3714
+ <xsl:apply-templates select="*[local-name()='title']"/>
3670
3715
  </fo:block>
3671
- <xsl:apply-templates/>
3672
- </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
3716
+ <xsl:apply-templates select="node()[not(local-name()='title')]"/>
3717
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" priority="2">
3673
3718
  <xsl:variable name="level">
3674
3719
  <xsl:call-template name="getLevel"/>
3675
3720
  </xsl:variable>
3676
3721
  <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
3677
3722
  </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
3678
3723
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
3679
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3724
+ <xsl:apply-templates select="*[local-name()='name']"/>
3680
3725
  </fo:block>
3681
- <xsl:apply-templates/>
3726
+ <xsl:apply-templates select="node()[not(local-name()='name')]"/>
3682
3727
  </xsl:template><xsl:template match="*[local-name() = 'callout']">
3683
3728
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
3684
3729
  </xsl:template><xsl:template match="*[local-name() = 'annotation']">
@@ -3700,7 +3745,6 @@
3700
3745
  </fo:inline>
3701
3746
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
3702
3747
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
3703
-
3704
3748
  <xsl:apply-templates/>
3705
3749
  </fo:basic-link>
3706
3750
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -3728,49 +3772,64 @@
3728
3772
  <fo:inline>
3729
3773
  <xsl:apply-templates/>
3730
3774
  </fo:inline>
3731
- </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
3775
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="formula_number"> <!-- show by demand -->
3732
3776
  <xsl:if test="normalize-space() != ''">
3733
3777
  <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
3734
3778
  </xsl:if>
3735
3779
  </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
3736
3780
 
3737
3781
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
3782
+
3783
+
3784
+
3785
+
3786
+
3738
3787
 
3739
3788
 
3740
3789
 
3790
+
3741
3791
 
3742
3792
 
3743
3793
  <fo:block-container margin-left="0mm">
3794
+
3744
3795
 
3745
3796
 
3746
3797
 
3798
+
3747
3799
 
3748
-
3749
-
3750
-
3751
-
3752
- <fo:block>
3753
-
3754
-
3755
-
3756
-
3757
-
3800
+ <fo:block>
3801
+
3802
+
3758
3803
 
3759
- <fo:inline xsl:use-attribute-sets="note-name-style">
3760
3804
 
3761
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3762
- </fo:inline>
3763
- <xsl:apply-templates/>
3764
- </fo:block>
3765
-
3766
-
3805
+
3806
+
3807
+
3808
+ <fo:inline xsl:use-attribute-sets="note-name-style">
3809
+
3810
+
3811
+
3812
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
3813
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
3814
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
3815
+ <xsl:with-param name="skip">false</xsl:with-param>
3816
+ </xsl:apply-templates>
3817
+ </xsl:if>
3818
+
3819
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3820
+
3821
+ </fo:inline>
3822
+
3823
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3824
+ </fo:block>
3825
+
3767
3826
  </fo:block-container>
3768
3827
  </fo:block-container>
3769
3828
 
3770
3829
  </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
3771
3830
  <xsl:variable name="num"><xsl:number/></xsl:variable>
3772
3831
  <xsl:choose>
3773
- <xsl:when test="$num = 1">
3832
+ <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
3774
3833
  <fo:inline xsl:use-attribute-sets="note-p-style">
3775
3834
  <xsl:apply-templates/>
3776
3835
  </fo:inline>
@@ -3785,12 +3844,16 @@
3785
3844
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3786
3845
 
3787
3846
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
3847
+
3848
+
3849
+
3850
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3788
3851
 
3789
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3790
3852
  </fo:inline>
3791
- <xsl:apply-templates/>
3853
+
3854
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3792
3855
  </fo:block>
3793
- </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
3856
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']">
3794
3857
  <xsl:param name="sfx"/>
3795
3858
  <xsl:variable name="suffix">
3796
3859
  <xsl:choose>
@@ -3809,7 +3872,7 @@
3809
3872
  <xsl:apply-templates/>
3810
3873
  <xsl:value-of select="$suffix"/>
3811
3874
  </xsl:if>
3812
- </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
3875
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']">
3813
3876
  <xsl:param name="sfx"/>
3814
3877
  <xsl:variable name="suffix">
3815
3878
  <xsl:choose>
@@ -3834,29 +3897,27 @@
3834
3897
  <xsl:apply-templates/>
3835
3898
  </fo:block>
3836
3899
  </xsl:template><xsl:template match="*[local-name() = 'term']">
3837
- <!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
3838
3900
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
3839
3901
 
3840
3902
 
3841
3903
  <fo:block keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
3842
- <xsl:apply-templates select="m3d:name" mode="presentation"/>
3904
+ <xsl:apply-templates select="m3d:name"/>
3843
3905
  </fo:block>
3844
3906
 
3907
+
3908
+
3845
3909
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
3846
3910
 
3847
3911
  </xsl:if>
3848
- <xsl:apply-templates/>
3912
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3849
3913
  </fo:block>
3850
- </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
3914
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
3851
3915
  <xsl:if test="normalize-space() != ''">
3852
3916
  <xsl:variable name="level">
3853
3917
  <xsl:call-template name="getLevelTermName"/>
3854
3918
  </xsl:variable>
3855
3919
  <fo:inline role="H{$level}">
3856
3920
  <xsl:apply-templates/>
3857
- <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
3858
- <xsl:text>.</xsl:text>
3859
- </xsl:if> -->
3860
3921
  </fo:inline>
3861
3922
  </xsl:if>
3862
3923
  </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
@@ -3869,9 +3930,10 @@
3869
3930
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3870
3931
  </xsl:call-template>
3871
3932
 
3872
- <fo:block>
3873
-
3874
- <xsl:apply-templates/>
3933
+
3934
+
3935
+ <fo:block xsl:use-attribute-sets="figure-style">
3936
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3875
3937
  </fo:block>
3876
3938
  <xsl:call-template name="fn_display_figure"/>
3877
3939
  <xsl:for-each select="*[local-name() = 'note']">
@@ -3879,14 +3941,15 @@
3879
3941
  </xsl:for-each>
3880
3942
 
3881
3943
 
3882
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3944
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
3945
+
3883
3946
 
3884
3947
  </fo:block-container>
3885
3948
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
3886
3949
  <fo:block id="{@id}">
3887
- <xsl:apply-templates/>
3950
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3888
3951
  </fo:block>
3889
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3952
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3890
3953
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
3891
3954
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
3892
3955
  <xsl:apply-templates/>
@@ -3993,9 +4056,7 @@
3993
4056
  <xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
3994
4057
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
3995
4058
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
3996
- <!-- width=<xsl:value-of select="$width"/> -->
3997
4059
  <xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
3998
- <!-- height=<xsl:value-of select="$height"/> -->
3999
4060
  <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
4000
4061
  <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
4001
4062
  <xsl:call-template name="svg_cross">
@@ -4265,7 +4326,7 @@
4265
4326
  </fo:basic-link>
4266
4327
  </fo:block>
4267
4328
  </fo:block-container>
4268
- </xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4329
+ </xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4269
4330
  <xsl:apply-templates mode="contents"/>
4270
4331
  <xsl:text> </xsl:text>
4271
4332
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
@@ -4277,11 +4338,72 @@
4277
4338
  <xsl:value-of select="."/>
4278
4339
  </xsl:template><xsl:template match="node()" mode="contents">
4279
4340
  <xsl:apply-templates mode="contents"/>
4341
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" mode="contents">
4342
+ <xsl:variable name="level">
4343
+ <xsl:call-template name="getLevel">
4344
+ <xsl:with-param name="depth" select="@depth"/>
4345
+ </xsl:call-template>
4346
+ </xsl:variable>
4347
+
4348
+ <xsl:variable name="section">
4349
+ <xsl:choose>
4350
+ <xsl:when test="@type = 'section-title'"/>
4351
+ <xsl:otherwise>
4352
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4353
+ </xsl:otherwise>
4354
+ </xsl:choose>
4355
+ </xsl:variable>
4356
+
4357
+ <xsl:variable name="type"><xsl:value-of select="@type"/></xsl:variable>
4358
+
4359
+ <xsl:variable name="display">
4360
+ <xsl:choose>
4361
+ <xsl:when test="normalize-space(@id) = ''">false</xsl:when>
4362
+ <xsl:when test="$level &lt;= $toc_level">true</xsl:when>
4363
+ <xsl:otherwise>false</xsl:otherwise>
4364
+ </xsl:choose>
4365
+ </xsl:variable>
4366
+
4367
+ <xsl:variable name="skip">false</xsl:variable>
4368
+
4369
+ <xsl:if test="$skip = 'false'">
4370
+
4371
+ <xsl:variable name="title">
4372
+ <xsl:choose>
4373
+ <xsl:when test="*[local-name() = 'tab']">
4374
+ <xsl:choose>
4375
+ <xsl:when test="@type = 'section-title'">
4376
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4377
+ <xsl:text>: </xsl:text>
4378
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
4379
+ </xsl:when>
4380
+ <xsl:otherwise>
4381
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
4382
+ </xsl:otherwise>
4383
+ </xsl:choose>
4384
+ </xsl:when>
4385
+ <xsl:otherwise>
4386
+ <xsl:copy-of select="node()"/>
4387
+ </xsl:otherwise>
4388
+ </xsl:choose>
4389
+ </xsl:variable>
4390
+
4391
+ <xsl:variable name="root">
4392
+ <xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
4393
+ <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
4394
+ </xsl:variable>
4395
+
4396
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
4397
+ <title>
4398
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
4399
+ </title>
4400
+ </item>
4401
+ </xsl:if>
4280
4402
  </xsl:template><xsl:template match="node()" mode="bookmarks">
4281
4403
  <xsl:apply-templates mode="bookmarks"/>
4282
4404
  </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
4283
4405
  <xsl:apply-templates select="."/>
4284
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4406
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4285
4407
  <xsl:apply-templates mode="bookmarks"/>
4286
4408
  </xsl:template><xsl:template name="addBookmarks">
4287
4409
  <xsl:param name="contents"/>
@@ -4371,8 +4493,6 @@
4371
4493
 
4372
4494
 
4373
4495
 
4374
-
4375
-
4376
4496
  </fo:bookmark-tree>
4377
4497
  </xsl:if>
4378
4498
  </xsl:template><xsl:template name="insertFigureBookmarks">
@@ -4443,7 +4563,7 @@
4443
4563
  <xsl:apply-templates mode="bookmark"/>
4444
4564
  </xsl:otherwise>
4445
4565
  </xsl:choose>
4446
- </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
4566
+ </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
4447
4567
  <xsl:if test="normalize-space() != ''">
4448
4568
  <fo:block xsl:use-attribute-sets="figure-name-style">
4449
4569
 
@@ -4452,16 +4572,13 @@
4452
4572
  </fo:block>
4453
4573
  </xsl:if>
4454
4574
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
4455
- <xsl:apply-templates mode="contents_item"/>
4575
+ <xsl:param name="mode">bookmarks</xsl:param>
4576
+ <xsl:apply-templates mode="contents_item">
4577
+ <xsl:with-param name="mode" select="$mode"/>
4578
+ </xsl:apply-templates>
4456
4579
  <!-- <xsl:text> </xsl:text> -->
4457
4580
  </xsl:template><xsl:template name="getSection">
4458
4581
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4459
- <!--
4460
- <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
4461
- <xsl:value-of select="."/>
4462
- </xsl:for-each>
4463
- -->
4464
-
4465
4582
  </xsl:template><xsl:template name="getName">
4466
4583
  <xsl:choose>
4467
4584
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -4525,9 +4642,26 @@
4525
4642
  <xsl:copy-of select="."/>
4526
4643
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
4527
4644
  <xsl:text> </xsl:text>
4645
+ </xsl:template><xsl:template match="*[local-name() = 'name']" mode="contents_item">
4646
+ <xsl:param name="mode">bookmarks</xsl:param>
4647
+ <xsl:apply-templates mode="contents_item">
4648
+ <xsl:with-param name="mode" select="$mode"/>
4649
+ </xsl:apply-templates>
4650
+ </xsl:template><xsl:template match="*[local-name() = 'add']" mode="contents_item">
4651
+ <xsl:param name="mode">bookmarks</xsl:param>
4652
+ <xsl:choose>
4653
+ <xsl:when test="starts-with(text(), $ace_tag)">
4654
+ <xsl:if test="$mode = 'contents'">
4655
+ <xsl:copy>
4656
+ <xsl:apply-templates mode="contents_item"/>
4657
+ </xsl:copy>
4658
+ </xsl:if>
4659
+ </xsl:when>
4660
+ <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
4661
+ </xsl:choose>
4528
4662
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
4529
4663
 
4530
- <fo:block-container margin-left="0mm">
4664
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
4531
4665
  <xsl:copy-of select="@id"/>
4532
4666
 
4533
4667
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -4564,6 +4698,7 @@
4564
4698
 
4565
4699
 
4566
4700
  </xsl:variable>
4701
+
4567
4702
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
4568
4703
  <xsl:if test="$font-size != ''">
4569
4704
  <xsl:attribute name="font-size">
@@ -4580,11 +4715,11 @@
4580
4715
 
4581
4716
 
4582
4717
 
4583
- <xsl:apply-templates/>
4718
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4584
4719
  </fo:block>
4585
4720
 
4586
4721
 
4587
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4722
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
4588
4723
 
4589
4724
 
4590
4725
 
@@ -4598,7 +4733,7 @@
4598
4733
  <xsl:call-template name="add-zero-spaces-java">
4599
4734
  <xsl:with-param name="text" select="$text"/>
4600
4735
  </xsl:call-template>
4601
- </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
4736
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']">
4602
4737
  <xsl:if test="normalize-space() != ''">
4603
4738
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4604
4739
  <xsl:apply-templates/>
@@ -4606,10 +4741,10 @@
4606
4741
  </xsl:if>
4607
4742
  </xsl:template><xsl:template match="*[local-name() = 'permission']">
4608
4743
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
4609
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4610
- <xsl:apply-templates/>
4744
+ <xsl:apply-templates select="*[local-name()='name']"/>
4745
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4611
4746
  </fo:block>
4612
- </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
4747
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
4613
4748
  <xsl:if test="normalize-space() != ''">
4614
4749
  <fo:block xsl:use-attribute-sets="permission-name-style">
4615
4750
  <xsl:apply-templates/>
@@ -4622,13 +4757,13 @@
4622
4757
  </fo:block>
4623
4758
  </xsl:template><xsl:template match="*[local-name() = 'requirement']">
4624
4759
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
4625
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4626
- <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
4627
- <xsl:apply-templates select="@obligation" mode="presentation"/>
4628
- <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
4629
- <xsl:apply-templates/>
4760
+ <xsl:apply-templates select="*[local-name()='name']"/>
4761
+ <xsl:apply-templates select="*[local-name()='label']"/>
4762
+ <xsl:apply-templates select="@obligation"/>
4763
+ <xsl:apply-templates select="*[local-name()='subject']"/>
4764
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'label') and not(local-name() = 'subject')]"/>
4630
4765
  </fo:block>
4631
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
4766
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
4632
4767
  <xsl:if test="normalize-space() != ''">
4633
4768
  <fo:block xsl:use-attribute-sets="requirement-name-style">
4634
4769
 
@@ -4636,20 +4771,24 @@
4636
4771
 
4637
4772
  </fo:block>
4638
4773
  </xsl:if>
4639
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
4774
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']">
4640
4775
  <fo:block xsl:use-attribute-sets="requirement-label-style">
4641
4776
  <xsl:apply-templates/>
4642
4777
  </fo:block>
4643
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
4778
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation">
4644
4779
  <fo:block>
4645
4780
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
4646
4781
  </fo:block>
4782
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2">
4783
+ <fo:block xsl:use-attribute-sets="subject-style">
4784
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4785
+ </fo:block>
4647
4786
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
4648
4787
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
4649
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4650
- <xsl:apply-templates/>
4788
+ <xsl:apply-templates select="*[local-name()='name']"/>
4789
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4651
4790
  </fo:block>
4652
- </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
4791
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
4653
4792
  <xsl:if test="normalize-space() != ''">
4654
4793
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
4655
4794
  <xsl:apply-templates/>
@@ -4660,10 +4799,6 @@
4660
4799
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
4661
4800
  <xsl:apply-templates/>
4662
4801
  </fo:block>
4663
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
4664
- <fo:block xsl:use-attribute-sets="subject-style">
4665
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4666
- </fo:block>
4667
4802
  </xsl:template><xsl:template match="*[local-name() = 'subject']">
4668
4803
  <fo:block xsl:use-attribute-sets="subject-style">
4669
4804
  <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
@@ -4707,8 +4842,6 @@
4707
4842
  </xsl:variable>
4708
4843
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
4709
4844
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
4710
- <!-- <fo:table-column column-width="35mm"/>
4711
- <fo:table-column column-width="115mm"/> -->
4712
4845
  <fo:table-column column-width="30%"/>
4713
4846
  <fo:table-column column-width="70%"/>
4714
4847
  </xsl:if>
@@ -4718,7 +4851,7 @@
4718
4851
  <xsl:if test=".//*[local-name() = 'fn']">
4719
4852
  <xsl:for-each select="*[local-name() = 'tbody']">
4720
4853
  <fo:block font-size="90%" border-bottom="1pt solid black">
4721
- <xsl:call-template name="fn_display"/>
4854
+ <xsl:call-template name="table_fn_display"/>
4722
4855
  </fo:block>
4723
4856
  </xsl:for-each>
4724
4857
  </xsl:if>
@@ -4735,7 +4868,6 @@
4735
4868
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
4736
4869
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
4737
4870
  <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
4738
- <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
4739
4871
  <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
4740
4872
  </xsl:if>
4741
4873
  <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
@@ -4748,34 +4880,11 @@
4748
4880
  </fo:table-row>
4749
4881
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
4750
4882
  <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
4751
- <xsl:attribute name="text-align">
4752
- <xsl:choose>
4753
- <xsl:when test="@align">
4754
- <xsl:value-of select="@align"/>
4755
- </xsl:when>
4756
- <xsl:otherwise>left</xsl:otherwise>
4757
- </xsl:choose>
4758
- </xsl:attribute>
4759
- <xsl:if test="@colspan">
4760
- <xsl:attribute name="number-columns-spanned">
4761
- <xsl:value-of select="@colspan"/>
4762
- </xsl:attribute>
4763
- </xsl:if>
4764
- <xsl:if test="@rowspan">
4765
- <xsl:attribute name="number-rows-spanned">
4766
- <xsl:value-of select="@rowspan"/>
4767
- </xsl:attribute>
4768
- </xsl:if>
4769
- <xsl:call-template name="display-align"/>
4883
+ <xsl:call-template name="setTextAlignment">
4884
+ <xsl:with-param name="default">left</xsl:with-param>
4885
+ </xsl:call-template>
4770
4886
 
4771
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
4772
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4773
- <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
4774
- </xsl:if>
4775
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
4776
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4777
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
4778
- </xsl:if> -->
4887
+ <xsl:call-template name="setTableCellAttributes"/>
4779
4888
 
4780
4889
  <fo:block>
4781
4890
  <xsl:apply-templates/>
@@ -4784,40 +4893,18 @@
4784
4893
  </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
4785
4894
  <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
4786
4895
  <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
4787
- <xsl:attribute name="padding">0mm</xsl:attribute>
4788
- <xsl:attribute name="padding-left">0mm</xsl:attribute>
4789
- </xsl:if>
4790
- <xsl:attribute name="text-align">
4791
- <xsl:choose>
4792
- <xsl:when test="@align">
4793
- <xsl:value-of select="@align"/>
4794
- </xsl:when>
4795
- <xsl:otherwise>left</xsl:otherwise>
4796
- </xsl:choose>
4797
- </xsl:attribute>
4896
+ <xsl:attribute name="padding">0mm</xsl:attribute>
4897
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
4898
+ </xsl:if>
4899
+ <xsl:call-template name="setTextAlignment">
4900
+ <xsl:with-param name="default">left</xsl:with-param>
4901
+ </xsl:call-template>
4902
+
4798
4903
  <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
4799
4904
  <xsl:attribute name="font-weight">bold</xsl:attribute>
4800
4905
  </xsl:if>
4801
- <xsl:if test="@colspan">
4802
- <xsl:attribute name="number-columns-spanned">
4803
- <xsl:value-of select="@colspan"/>
4804
- </xsl:attribute>
4805
- </xsl:if>
4806
- <xsl:if test="@rowspan">
4807
- <xsl:attribute name="number-rows-spanned">
4808
- <xsl:value-of select="@rowspan"/>
4809
- </xsl:attribute>
4810
- </xsl:if>
4811
- <xsl:call-template name="display-align"/>
4812
4906
 
4813
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
4814
- <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
4815
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4816
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
4817
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
4818
- </xsl:if>
4819
- </xsl:if> -->
4820
- <!-- 2nd line and below -->
4907
+ <xsl:call-template name="setTableCellAttributes"/>
4821
4908
 
4822
4909
  <fo:block>
4823
4910
  <xsl:apply-templates/>
@@ -4829,15 +4916,15 @@
4829
4916
  <xsl:apply-templates/>
4830
4917
  </fo:block>
4831
4918
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
4832
- <fo:block> <!-- margin-bottom="10pt" -->
4919
+ <fo:block>
4833
4920
  <xsl:apply-templates/>
4834
4921
  </fo:block>
4835
4922
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
4836
4923
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
4837
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4838
- <xsl:apply-templates/>
4924
+ <xsl:apply-templates select="*[local-name()='name']"/>
4925
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4839
4926
  </fo:block>
4840
- </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
4927
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
4841
4928
  <xsl:if test="normalize-space() != ''">
4842
4929
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
4843
4930
  <xsl:apply-templates/>
@@ -4861,42 +4948,46 @@
4861
4948
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4862
4949
 
4863
4950
 
4864
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4865
-
4866
- <xsl:variable name="element">
4867
-
4951
+ <xsl:variable name="fo_element">
4952
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
4868
4953
  inline
4869
- <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
4870
4954
  </xsl:variable>
4871
4955
 
4956
+ <!-- display 'EXAMPLE' -->
4957
+ <xsl:apply-templates select="*[local-name()='name']">
4958
+ <xsl:with-param name="fo_element" select="$fo_element"/>
4959
+ </xsl:apply-templates>
4960
+
4872
4961
  <xsl:choose>
4873
- <xsl:when test="contains(normalize-space($element), 'block')">
4874
- <fo:block xsl:use-attribute-sets="example-body-style">
4875
- <xsl:apply-templates/>
4876
- </fo:block>
4962
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
4963
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
4964
+ <fo:block-container margin-left="0mm" margin-right="0mm">
4965
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
4966
+ <xsl:with-param name="fo_element" select="$fo_element"/>
4967
+ </xsl:apply-templates>
4968
+ </fo:block-container>
4969
+ </fo:block-container>
4877
4970
  </xsl:when>
4878
4971
  <xsl:otherwise>
4879
4972
  <fo:inline>
4880
- <xsl:apply-templates/>
4973
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
4974
+ <xsl:with-param name="fo_element" select="$fo_element"/>
4975
+ </xsl:apply-templates>
4881
4976
  </fo:inline>
4882
4977
  </xsl:otherwise>
4883
4978
  </xsl:choose>
4884
4979
 
4885
4980
  </fo:block>
4886
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
4887
-
4888
- <xsl:variable name="element">
4889
-
4890
- inline
4891
- <xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
4892
- </xsl:variable>
4981
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
4982
+ <xsl:param name="fo_element">block</xsl:param>
4983
+
4893
4984
  <xsl:choose>
4894
4985
  <xsl:when test="ancestor::*[local-name() = 'appendix']">
4895
4986
  <fo:inline>
4896
4987
  <xsl:apply-templates/>
4897
4988
  </fo:inline>
4898
4989
  </xsl:when>
4899
- <xsl:when test="contains(normalize-space($element), 'block')">
4990
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
4900
4991
  <fo:block xsl:use-attribute-sets="example-name-style">
4901
4992
  <xsl:apply-templates/>
4902
4993
  </fo:block>
@@ -4909,14 +5000,15 @@
4909
5000
  </xsl:choose>
4910
5001
 
4911
5002
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
5003
+ <xsl:param name="fo_element">block</xsl:param>
5004
+
4912
5005
  <xsl:variable name="num"><xsl:number/></xsl:variable>
4913
5006
  <xsl:variable name="element">
4914
- block
4915
-
4916
5007
 
5008
+ <xsl:value-of select="$fo_element"/>
4917
5009
  </xsl:variable>
4918
5010
  <xsl:choose>
4919
- <xsl:when test="normalize-space($element) = 'block'">
5011
+ <xsl:when test="starts-with(normalize-space($element), 'block')">
4920
5012
  <fo:block xsl:use-attribute-sets="example-p-style">
4921
5013
 
4922
5014
  <xsl:apply-templates/>
@@ -4931,6 +5023,8 @@
4931
5023
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
4932
5024
  <fo:block xsl:use-attribute-sets="termsource-style">
4933
5025
 
5026
+
5027
+
4934
5028
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
4935
5029
  <xsl:variable name="termsource_text">
4936
5030
  <xsl:apply-templates/>
@@ -4968,9 +5062,7 @@
4968
5062
  <xsl:value-of select="."/>
4969
5063
  </xsl:if>
4970
5064
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
4971
- <fo:inline>
4972
-
4973
-
5065
+ <fo:inline xsl:use-attribute-sets="termsource-text-style">
4974
5066
  <xsl:value-of select="."/>
4975
5067
  </fo:inline>
4976
5068
  </xsl:template><xsl:template match="*[local-name() = 'origin']">
@@ -4984,12 +5076,9 @@
4984
5076
  </fo:basic-link>
4985
5077
  </xsl:template><xsl:template match="*[local-name() = 'modification']">
4986
5078
  <xsl:variable name="title-modified">
4987
-
4988
-
4989
- <xsl:call-template name="getTitle">
4990
- <xsl:with-param name="name" select="'title-modified'"/>
4991
- </xsl:call-template>
4992
-
5079
+ <xsl:call-template name="getLocalizedString">
5080
+ <xsl:with-param name="key">modified</xsl:with-param>
5081
+ </xsl:call-template>
4993
5082
  </xsl:variable>
4994
5083
 
4995
5084
  <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
@@ -5016,7 +5105,6 @@
5016
5105
  <fo:block-container margin-left="0mm">
5017
5106
 
5018
5107
  <fo:block xsl:use-attribute-sets="quote-style">
5019
- <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
5020
5108
 
5021
5109
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
5022
5110
  </fo:block>
@@ -5059,15 +5147,15 @@
5059
5147
  </xsl:variable>
5060
5148
 
5061
5149
  <xsl:choose>
5062
- <xsl:when test="normalize-space($bibitemid) != ''">
5150
+ <xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
5063
5151
  <fo:inline xsl:use-attribute-sets="eref-style">
5064
5152
  <xsl:if test="@type = 'footnote'">
5065
-
5153
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5154
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5155
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5156
+ <xsl:attribute name="font-size">80%</xsl:attribute>
5066
5157
 
5067
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5068
5158
  <xsl:attribute name="font-size">50%</xsl:attribute>
5069
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5070
- <xsl:attribute name="vertical-align">super</xsl:attribute>
5071
5159
 
5072
5160
  </xsl:if>
5073
5161
 
@@ -5084,7 +5172,6 @@
5084
5172
 
5085
5173
 
5086
5174
 
5087
-
5088
5175
  </xsl:if>
5089
5176
 
5090
5177
 
@@ -5145,8 +5232,6 @@
5145
5232
  </xsl:choose>
5146
5233
  </xsl:variable>
5147
5234
 
5148
- <!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
5149
-
5150
5235
  <xsl:choose>
5151
5236
  <xsl:when test="$lang = 'zh'">
5152
5237
  <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -5181,12 +5266,9 @@
5181
5266
  </fo:block>
5182
5267
  </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
5183
5268
  <xsl:variable name="title-deprecated">
5184
-
5185
- <xsl:call-template name="getLocalizedString">
5186
- <xsl:with-param name="key">deprecated</xsl:with-param>
5187
- </xsl:call-template>
5188
-
5189
-
5269
+ <xsl:call-template name="getLocalizedString">
5270
+ <xsl:with-param name="key">deprecated</xsl:with-param>
5271
+ </xsl:call-template>
5190
5272
  </xsl:variable>
5191
5273
  <fo:block xsl:use-attribute-sets="deprecates-style">
5192
5274
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
@@ -5195,6 +5277,8 @@
5195
5277
  <xsl:if test="*[local-name() = 'strong']">
5196
5278
  <xsl:attribute name="font-weight">normal</xsl:attribute>
5197
5279
  </xsl:if>
5280
+ </xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
5281
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
5198
5282
  </xsl:template><xsl:template match="*[local-name() = 'definition']">
5199
5283
  <fo:block xsl:use-attribute-sets="definition-style">
5200
5284
  <xsl:apply-templates/>
@@ -5203,7 +5287,6 @@
5203
5287
  <xsl:apply-templates/>
5204
5288
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
5205
5289
  <fo:inline> <xsl:apply-templates/></fo:inline>
5206
- <!-- <fo:block>&#xA0;</fo:block> -->
5207
5290
  <fo:block/>
5208
5291
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
5209
5292
 
@@ -5246,11 +5329,6 @@
5246
5329
  <xsl:apply-templates/>
5247
5330
  </fo:block>
5248
5331
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
5249
- <fo:block id="{@id}">
5250
- <xsl:apply-templates/>
5251
- </fo:block>
5252
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
5253
-
5254
5332
  <fo:block id="{@id}">
5255
5333
  <xsl:apply-templates/>
5256
5334
  </fo:block>
@@ -5267,6 +5345,51 @@
5267
5345
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
5268
5346
  <!-- 0xA0 to space replacement -->
5269
5347
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
5348
+ </xsl:template><xsl:variable name="ul_labels_">
5349
+
5350
+
5351
+
5352
+
5353
+
5354
+
5355
+
5356
+
5357
+
5358
+ <label font-size="18pt" margin-top="-0.5mm">•</label> <!-- margin-top to vertical align big dot -->
5359
+
5360
+
5361
+
5362
+
5363
+
5364
+
5365
+
5366
+
5367
+
5368
+ </xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
5369
+ <xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
5370
+ <xsl:variable name="list_level">
5371
+ <xsl:choose>
5372
+ <xsl:when test="$list_level_ &lt;= 3"><xsl:value-of select="$list_level_"/></xsl:when>
5373
+ <xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
5374
+ </xsl:choose>
5375
+ </xsl:variable>
5376
+ <xsl:choose>
5377
+ <xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
5378
+ <xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
5379
+ </xsl:when>
5380
+ <xsl:when test="$list_level mod 3 = 0">
5381
+ <xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
5382
+ </xsl:when>
5383
+ <xsl:when test="$list_level mod 2 = 0">
5384
+ <xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
5385
+ </xsl:when>
5386
+ <xsl:otherwise>
5387
+ <xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
5388
+ </xsl:otherwise>
5389
+ </xsl:choose>
5390
+ </xsl:template><xsl:template match="label" mode="ul_labels">
5391
+ <xsl:copy-of select="@*[not(local-name() = 'level')]"/>
5392
+ <xsl:value-of select="."/>
5270
5393
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
5271
5394
  <xsl:choose>
5272
5395
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
@@ -5473,20 +5596,109 @@
5473
5596
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
5474
5597
  <fo:block><xsl:apply-templates/></fo:block>
5475
5598
  </fo:table-cell>
5476
- </xsl:template><xsl:template name="processBibitem">
5599
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/><xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
5600
+
5601
+
5602
+
5603
+ <fo:block id="{@id}">
5604
+ <xsl:apply-templates/>
5605
+ </fo:block>
5606
+ </xsl:template><xsl:template match="*[local-name() = 'references']">
5607
+ <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
5608
+
5609
+ <fo:block break-after="page"/>
5610
+
5611
+ </xsl:if>
5612
+
5613
+ <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
5614
+ <xsl:if test="$namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'itu'">
5615
+ <fo:block break-after="page"/>
5616
+ </xsl:if>
5617
+ </xsl:if> -->
5618
+
5619
+ <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
5620
+ <xsl:apply-templates/>
5621
+ </fo:block>
5477
5622
 
5478
5623
 
5624
+ <!-- horizontal line -->
5625
+ <fo:block-container text-align="center">
5626
+ <fo:block-container margin-left="63mm" width="42mm" border-bottom="2pt solid black">
5627
+ <fo:block> </fo:block>
5628
+ </fo:block-container>
5629
+ </fo:block-container>
5479
5630
 
5480
-
5481
5631
 
5482
5632
 
5483
-
5633
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']">
5634
+ <xsl:call-template name="bibitem"/>
5635
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
5484
5636
 
5637
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
5638
+ <xsl:call-template name="processBibitem"/>
5639
+ </fo:block>
5640
+
5641
+
5642
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
5643
+
5644
+ <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
5645
+ $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
5646
+ <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
5647
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
5648
+ <fo:list-item>
5649
+ <fo:list-item-label end-indent="label-end()">
5650
+ <fo:block>
5651
+ <fo:inline>
5652
+
5653
+ <xsl:value-of select="*[local-name()='docidentifier'][@type = 'metanorma-ordinal']"/>
5654
+ <xsl:if test="not(*[local-name()='docidentifier'][@type = 'metanorma-ordinal'])">
5655
+ <xsl:number format="[1]"/>
5656
+ </xsl:if>
5657
+
5658
+ </fo:inline>
5659
+ </fo:block>
5660
+ </fo:list-item-label>
5661
+ <fo:list-item-body start-indent="body-start()">
5662
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style">
5663
+ <xsl:call-template name="processBibitem"/>
5664
+ </fo:block>
5665
+ </fo:list-item-body>
5666
+ </fo:list-item>
5667
+ </fo:list-block>
5668
+
5485
5669
 
5670
+ </xsl:template><xsl:template name="processBibitem">
5486
5671
 
5487
5672
 
5673
+ <!-- start bibitem processing -->
5674
+ <xsl:if test=".//*[local-name() = 'fn']">
5675
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
5676
+ </xsl:if>
5677
+ <xsl:variable name="docidentifier">
5678
+ <xsl:choose>
5679
+ <xsl:when test="*[local-name() = 'docidentifier']/@type = 'metanorma'"/>
5680
+ <xsl:otherwise><xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma-ordinal')]"/></xsl:otherwise>
5681
+ </xsl:choose>
5682
+ </xsl:variable>
5683
+ <fo:inline><xsl:value-of select="$docidentifier"/></fo:inline>
5684
+ <xsl:apply-templates select="*[local-name() = 'note']"/>
5685
+ <xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
5686
+ <xsl:choose>
5687
+ <xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = $lang]">
5688
+ <xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = $lang]"/>
5689
+ </xsl:when>
5690
+ <xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = 'en']">
5691
+ <xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = 'en']"/>
5692
+ </xsl:when>
5693
+ <xsl:otherwise>
5694
+ <xsl:apply-templates select="*[local-name() = 'title']"/>
5695
+ </xsl:otherwise>
5696
+ </xsl:choose>
5697
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
5698
+ <!-- end bibitem processing -->
5699
+
5488
5700
  </xsl:template><xsl:template name="processBibitemDocId">
5489
- <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
5701
+ <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
5490
5702
  <xsl:choose>
5491
5703
  <xsl:when test="normalize-space($_doc_ident) != ''">
5492
5704
  <!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
@@ -5500,7 +5712,7 @@
5500
5712
  <xsl:if test="$type != ''">
5501
5713
  <xsl:value-of select="$type"/><xsl:text> </xsl:text>
5502
5714
  </xsl:if> -->
5503
- <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
5715
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
5504
5716
  </xsl:otherwise>
5505
5717
  </xsl:choose>
5506
5718
  </xsl:template><xsl:template name="processPersonalAuthor">
@@ -5541,6 +5753,48 @@
5541
5753
  <xsl:value-of select="substring(.,1,1)"/>
5542
5754
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
5543
5755
  <fo:inline><xsl:apply-templates/></fo:inline>
5756
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
5757
+ <!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
5758
+ <fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
5759
+ <xsl:apply-templates/>
5760
+ </fo:inline>
5761
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
5762
+ <fo:footnote>
5763
+ <xsl:variable name="number">
5764
+
5765
+ <xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
5766
+
5767
+ </xsl:variable>
5768
+ <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
5769
+ <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
5770
+ <xsl:value-of select="$number"/>
5771
+
5772
+ </fo:basic-link>
5773
+ </fo:inline>
5774
+ <fo:footnote-body>
5775
+ <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
5776
+ <fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
5777
+ <xsl:value-of select="$number"/>
5778
+
5779
+ </fo:inline>
5780
+ <xsl:apply-templates/>
5781
+ </fo:block>
5782
+ </fo:footnote-body>
5783
+ </fo:footnote>
5784
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
5785
+ <xsl:text> edition </xsl:text>
5786
+ <xsl:value-of select="."/>
5787
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
5788
+ <xsl:text> (</xsl:text>
5789
+ <fo:inline xsl:use-attribute-sets="link-style">
5790
+ <fo:basic-link external-destination="." fox:alt-text=".">
5791
+ <xsl:value-of select="."/>
5792
+ </fo:basic-link>
5793
+ </fo:inline>
5794
+ <xsl:text>)</xsl:text>
5795
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/><xsl:template match="*[local-name() = 'formattedref']">
5796
+
5797
+ <xsl:apply-templates/>
5544
5798
  </xsl:template><xsl:template match="*[local-name() = 'form']">
5545
5799
  <fo:block>
5546
5800
  <xsl:apply-templates/>
@@ -5606,27 +5860,14 @@
5606
5860
  <fo:block> </fo:block>
5607
5861
  </fo:block-container>
5608
5862
  </xsl:template><xsl:variable name="toc_level">
5863
+ <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
5864
+ <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
5865
+ <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
5609
5866
  <xsl:choose>
5610
- <xsl:when test="1 = 2"/> <!-- to do https://github.com/metanorma/mn-native-pdf/issues/337: if there is value in xml -->
5867
+ <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
5868
+ <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
5611
5869
  <xsl:otherwise><!-- default value -->
5612
-
5613
-
5614
-
5615
-
5616
-
5617
-
5618
-
5619
-
5620
-
5621
5870
  3
5622
-
5623
-
5624
-
5625
-
5626
-
5627
-
5628
-
5629
-
5630
5871
  </xsl:otherwise>
5631
5872
  </xsl:choose>
5632
5873
  </xsl:variable><xsl:template match="*[local-name() = 'toc']">
@@ -5709,7 +5950,7 @@
5709
5950
  </td>
5710
5951
  </xsl:for-each>
5711
5952
  <td>333</td> <!-- page number, just for fill -->
5712
- </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
5953
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
5713
5954
  <fo:inline padding-right="5mm"> </fo:inline>
5714
5955
  <fo:inline><xsl:apply-templates/></fo:inline>
5715
5956
  </xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
@@ -5720,6 +5961,61 @@
5720
5961
  </svg>
5721
5962
  </fo:instream-foreign-object>
5722
5963
  </fo:inline>
5964
+ </xsl:template><xsl:template match="@language">
5965
+ <xsl:copy-of select="."/>
5966
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="4">
5967
+ <xsl:call-template name="title"/>
5968
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']">
5969
+
5970
+
5971
+
5972
+
5973
+
5974
+ <!-- text in the box -->
5975
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
5976
+
5977
+
5978
+
5979
+
5980
+
5981
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style">
5982
+
5983
+
5984
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
5985
+ <xsl:call-template name="displayAdmonitionName"/>
5986
+ </fo:block>
5987
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
5988
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5989
+ </fo:block>
5990
+
5991
+ </fo:block-container>
5992
+
5993
+ </fo:block-container>
5994
+
5995
+ </xsl:template><xsl:template name="displayAdmonitionName">
5996
+
5997
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
5998
+ <xsl:if test="not(*[local-name() = 'name'])">
5999
+ <xsl:apply-templates select="@type"/>
6000
+ </xsl:if>
6001
+
6002
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
6003
+ <xsl:apply-templates/>
6004
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
6005
+ <xsl:variable name="admonition_type_">
6006
+ <xsl:call-template name="getLocalizedString">
6007
+ <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
6008
+ </xsl:call-template>
6009
+ </xsl:variable>
6010
+ <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
6011
+ <xsl:value-of select="$admonition_type"/>
6012
+ <xsl:if test="$admonition_type = ''">
6013
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
6014
+ </xsl:if>
6015
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
6016
+ <!-- processing for admonition/p found in the template for 'p' -->
6017
+ <xsl:call-template name="paragraph"/>
6018
+
5723
6019
  </xsl:template><xsl:template name="convertDate">
5724
6020
  <xsl:param name="date"/>
5725
6021
  <xsl:param name="format" select="'short'"/>
@@ -5727,83 +6023,80 @@
5727
6023
  <xsl:variable name="month" select="substring($date, 6, 2)"/>
5728
6024
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
5729
6025
  <xsl:variable name="monthStr">
5730
- <xsl:choose>
5731
- <xsl:when test="$month = '01'">January</xsl:when>
5732
- <xsl:when test="$month = '02'">February</xsl:when>
5733
- <xsl:when test="$month = '03'">March</xsl:when>
5734
- <xsl:when test="$month = '04'">April</xsl:when>
5735
- <xsl:when test="$month = '05'">May</xsl:when>
5736
- <xsl:when test="$month = '06'">June</xsl:when>
5737
- <xsl:when test="$month = '07'">July</xsl:when>
5738
- <xsl:when test="$month = '08'">August</xsl:when>
5739
- <xsl:when test="$month = '09'">September</xsl:when>
5740
- <xsl:when test="$month = '10'">October</xsl:when>
5741
- <xsl:when test="$month = '11'">November</xsl:when>
5742
- <xsl:when test="$month = '12'">December</xsl:when>
5743
- </xsl:choose>
6026
+ <xsl:call-template name="getMonthByNum">
6027
+ <xsl:with-param name="num" select="$month"/>
6028
+ <xsl:with-param name="lowercase" select="'true'"/>
6029
+ </xsl:call-template>
6030
+ </xsl:variable>
6031
+ <xsl:variable name="monthStr_localized">
6032
+ <xsl:if test="normalize-space($monthStr) != ''"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param></xsl:call-template></xsl:if>
5744
6033
  </xsl:variable>
5745
6034
  <xsl:variable name="result">
5746
6035
  <xsl:choose>
5747
- <xsl:when test="$format = 'ddMMyyyy'">
6036
+ <xsl:when test="$format = 'ddMMyyyy'"> <!-- convert date from format 2007-04-01 to 1 April 2007 -->
5748
6037
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5749
6038
  <xsl:text> </xsl:text>
5750
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
6039
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
5751
6040
  </xsl:when>
5752
6041
  <xsl:when test="$format = 'ddMM'">
5753
6042
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5754
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
6043
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr_localized"/>
5755
6044
  </xsl:when>
5756
6045
  <xsl:when test="$format = 'short' or $day = ''">
5757
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
6046
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
5758
6047
  </xsl:when>
5759
6048
  <xsl:otherwise>
5760
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
6049
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/> <!-- January 01, 2022 -->
5761
6050
  </xsl:otherwise>
5762
6051
  </xsl:choose>
5763
6052
  </xsl:variable>
5764
6053
  <xsl:value-of select="$result"/>
5765
- </xsl:template><xsl:template name="convertDateLocalized">
5766
- <xsl:param name="date"/>
5767
- <xsl:param name="format" select="'short'"/>
5768
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
5769
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
5770
- <xsl:variable name="day" select="substring($date, 9, 2)"/>
5771
- <xsl:variable name="monthStr">
5772
- <xsl:choose>
5773
- <xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
5774
- <xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
5775
- <xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
5776
- <xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
5777
- <xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
5778
- <xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
5779
- <xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
5780
- <xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
5781
- <xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
5782
- <xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
5783
- <xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
5784
- <xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
5785
- </xsl:choose>
5786
- </xsl:variable>
5787
- <xsl:variable name="result">
6054
+ </xsl:template><xsl:template name="getMonthByNum">
6055
+ <xsl:param name="num"/>
6056
+ <xsl:param name="lang">en</xsl:param>
6057
+ <xsl:param name="lowercase">false</xsl:param> <!-- return 'january' instead of 'January' -->
6058
+ <xsl:variable name="monthStr_">
5788
6059
  <xsl:choose>
5789
- <xsl:when test="$format = 'ddMMyyyy'">
5790
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5791
- <xsl:text> </xsl:text>
5792
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
5793
- </xsl:when>
5794
- <xsl:when test="$format = 'ddMM'">
5795
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5796
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
5797
- </xsl:when>
5798
- <xsl:when test="$format = 'short' or $day = ''">
5799
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
6060
+ <xsl:when test="$lang = 'fr'">
6061
+ <xsl:choose>
6062
+ <xsl:when test="$num = '01'">Janvier</xsl:when>
6063
+ <xsl:when test="$num = '02'">Février</xsl:when>
6064
+ <xsl:when test="$num = '03'">Mars</xsl:when>
6065
+ <xsl:when test="$num = '04'">Avril</xsl:when>
6066
+ <xsl:when test="$num = '05'">Mai</xsl:when>
6067
+ <xsl:when test="$num = '06'">Juin</xsl:when>
6068
+ <xsl:when test="$num = '07'">Juillet</xsl:when>
6069
+ <xsl:when test="$num = '08'">Août</xsl:when>
6070
+ <xsl:when test="$num = '09'">Septembre</xsl:when>
6071
+ <xsl:when test="$num = '10'">Octobre</xsl:when>
6072
+ <xsl:when test="$num = '11'">Novembre</xsl:when>
6073
+ <xsl:when test="$num = '12'">Décembre</xsl:when>
6074
+ </xsl:choose>
5800
6075
  </xsl:when>
5801
6076
  <xsl:otherwise>
5802
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
6077
+ <xsl:choose>
6078
+ <xsl:when test="$num = '01'">January</xsl:when>
6079
+ <xsl:when test="$num = '02'">February</xsl:when>
6080
+ <xsl:when test="$num = '03'">March</xsl:when>
6081
+ <xsl:when test="$num = '04'">April</xsl:when>
6082
+ <xsl:when test="$num = '05'">May</xsl:when>
6083
+ <xsl:when test="$num = '06'">June</xsl:when>
6084
+ <xsl:when test="$num = '07'">July</xsl:when>
6085
+ <xsl:when test="$num = '08'">August</xsl:when>
6086
+ <xsl:when test="$num = '09'">September</xsl:when>
6087
+ <xsl:when test="$num = '10'">October</xsl:when>
6088
+ <xsl:when test="$num = '11'">November</xsl:when>
6089
+ <xsl:when test="$num = '12'">December</xsl:when>
6090
+ </xsl:choose>
5803
6091
  </xsl:otherwise>
5804
6092
  </xsl:choose>
5805
6093
  </xsl:variable>
5806
- <xsl:value-of select="$result"/>
6094
+ <xsl:choose>
6095
+ <xsl:when test="normalize-space($lowercase) = 'true'">
6096
+ <xsl:value-of select="java:toLowerCase(java:java.lang.String.new($monthStr_))"/>
6097
+ </xsl:when>
6098
+ <xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
6099
+ </xsl:choose>
5807
6100
  </xsl:template><xsl:template name="insertKeywords">
5808
6101
  <xsl:param name="sorting" select="'true'"/>
5809
6102
  <xsl:param name="charAtEnd" select="'.'"/>
@@ -5852,13 +6145,8 @@
5852
6145
  <xsl:variable name="title">
5853
6146
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5854
6147
 
5855
-
5856
-
5857
-
5858
-
5859
- <xsl:value-of select="*[local-name() = 'title']"/>
5860
-
5861
-
6148
+ <xsl:value-of select="*[local-name() = 'title']"/>
6149
+
5862
6150
  </xsl:for-each>
5863
6151
  </xsl:variable>
5864
6152
  <xsl:choose>
@@ -5873,21 +6161,18 @@
5873
6161
  <dc:creator>
5874
6162
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
5875
6163
 
5876
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5877
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
5878
- <xsl:if test="position() != last()">; </xsl:if>
5879
- </xsl:for-each>
5880
-
5881
-
5882
-
6164
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
6165
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
6166
+ <xsl:if test="position() != last()">; </xsl:if>
6167
+ </xsl:for-each>
6168
+
5883
6169
  </xsl:for-each>
5884
6170
  </dc:creator>
5885
6171
  <dc:description>
5886
6172
  <xsl:variable name="abstract">
5887
6173
 
5888
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
5889
-
5890
-
6174
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
6175
+
5891
6176
  </xsl:variable>
5892
6177
  <xsl:value-of select="normalize-space($abstract)"/>
5893
6178
  </dc:description>
@@ -5907,7 +6192,6 @@
5907
6192
  <xsl:value-of select="../@id"/>
5908
6193
  </xsl:when>
5909
6194
  <xsl:otherwise>
5910
- <!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
5911
6195
  <xsl:value-of select="concat(generate-id(..), '_', text())"/>
5912
6196
  </xsl:otherwise>
5913
6197
  </xsl:choose>
@@ -5933,9 +6217,6 @@
5933
6217
  <xsl:when test="ancestor::*[local-name() = 'preface']">
5934
6218
  <xsl:value-of select="$level_total - 2"/>
5935
6219
  </xsl:when>
5936
- <!-- <xsl:when test="parent::*[local-name() = 'sections']">
5937
- <xsl:value-of select="$level_total - 1"/>
5938
- </xsl:when> -->
5939
6220
  <xsl:when test="ancestor::*[local-name() = 'sections']">
5940
6221
  <xsl:value-of select="$level_total - 1"/>
5941
6222
  </xsl:when>
@@ -6077,9 +6358,15 @@
6077
6358
  </xsl:template><xsl:template name="getLocalizedString">
6078
6359
  <xsl:param name="key"/>
6079
6360
  <xsl:param name="formatted">false</xsl:param>
6361
+ <xsl:param name="lang"/>
6080
6362
 
6081
6363
  <xsl:variable name="curr_lang">
6082
- <xsl:call-template name="getLang"/>
6364
+ <xsl:choose>
6365
+ <xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
6366
+ <xsl:otherwise>
6367
+ <xsl:call-template name="getLang"/>
6368
+ </xsl:otherwise>
6369
+ </xsl:choose>
6083
6370
  </xsl:variable>
6084
6371
 
6085
6372
  <xsl:variable name="data_value">
@@ -6119,7 +6406,6 @@
6119
6406
  <xsl:value-of select="$key_"/>
6120
6407
  </xsl:otherwise>
6121
6408
  </xsl:choose>
6122
-
6123
6409
  </xsl:template><xsl:template name="setTrackChangesStyles">
6124
6410
  <xsl:param name="isAdded"/>
6125
6411
  <xsl:param name="isDeleted"/>
@@ -6142,7 +6428,6 @@
6142
6428
  <xsl:if test="local-name() = 'table'">
6143
6429
  <xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
6144
6430
  </xsl:if>
6145
- <!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
6146
6431
  <xsl:attribute name="padding">2mm</xsl:attribute>
6147
6432
  </xsl:if>
6148
6433
  </xsl:otherwise>
@@ -6162,15 +6447,18 @@
6162
6447
  </xsl:choose>
6163
6448
  </xsl:template><xsl:template name="setTextAlignment">
6164
6449
  <xsl:param name="default">left</xsl:param>
6450
+ <xsl:variable name="align" select="normalize-space(@align)"/>
6165
6451
  <xsl:attribute name="text-align">
6166
6452
  <xsl:choose>
6167
- <xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
6453
+ <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
6454
+ <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
6455
+ <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
6168
6456
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
6169
6457
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
6170
6458
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
6171
6459
  </xsl:choose>
6172
6460
  </xsl:attribute>
6173
- <xsl:if test="@align = 'indent'">
6461
+ <xsl:if test="$align = 'indent'">
6174
6462
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
6175
6463
  </xsl:if>
6176
6464
  </xsl:template><xsl:template name="number-to-words">
@@ -6269,6 +6557,25 @@
6269
6557
  </xsl:otherwise>
6270
6558
  </xsl:choose>
6271
6559
  </xsl:if>
6560
+ </xsl:template><xsl:template name="number-to-ordinal">
6561
+ <xsl:param name="number"/>
6562
+ <xsl:param name="curr_lang"/>
6563
+ <xsl:choose>
6564
+ <xsl:when test="$curr_lang = 'fr'">
6565
+ <xsl:choose>
6566
+ <xsl:when test="$number = '1'">re</xsl:when>
6567
+ <xsl:otherwise>e</xsl:otherwise>
6568
+ </xsl:choose>
6569
+ </xsl:when>
6570
+ <xsl:otherwise>
6571
+ <xsl:choose>
6572
+ <xsl:when test="$number = 1">st</xsl:when>
6573
+ <xsl:when test="$number = 2">nd</xsl:when>
6574
+ <xsl:when test="$number = 3">rd</xsl:when>
6575
+ <xsl:otherwise>th</xsl:otherwise>
6576
+ </xsl:choose>
6577
+ </xsl:otherwise>
6578
+ </xsl:choose>
6272
6579
  </xsl:template><xsl:template name="setAltText">
6273
6580
  <xsl:param name="value"/>
6274
6581
  <xsl:attribute name="fox:alt-text">