metanorma-iho 0.4.4 → 0.5.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="210"/>
18
- <xsl:variable name="pageHeight" select="297"/>
17
+
19
18
  <xsl:variable name="marginLeftRight1" select="25.4"/>
20
19
  <xsl:variable name="marginLeftRight2" select="25.4"/>
21
20
  <xsl:variable name="marginTop" select="25.4"/>
@@ -44,7 +43,7 @@
44
43
  <xsl:template match="/">
45
44
 
46
45
  <xsl:variable name="xslfo">
47
- <fo:root font-family="Arial, Cambria Math" font-size="12pt" xml:lang="{$lang}">
46
+ <fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
48
47
  <fo:layout-master-set>
49
48
  <!-- cover page -->
50
49
  <fo:simple-page-master master-name="cover" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
@@ -362,9 +361,6 @@
362
361
  <!-- ============================= -->
363
362
  <!-- CONTENTS -->
364
363
  <!-- ============================= -->
365
- <xsl:template match="node()" mode="contents">
366
- <xsl:apply-templates mode="contents"/>
367
- </xsl:template>
368
364
 
369
365
  <!-- element with title -->
370
366
  <xsl:template match="*[iho:title]" mode="contents">
@@ -419,8 +415,6 @@
419
415
 
420
416
  </xsl:template>
421
417
 
422
-
423
- <xsl:template match="iho:references/iho:bibitem" mode="contents"/>
424
418
  <!-- ============================= -->
425
419
  <!-- END CONTENTS -->
426
420
  <!-- ============================= -->
@@ -466,7 +460,7 @@
466
460
  </fo:block>
467
461
  </xsl:template>
468
462
 
469
- <xsl:template match="iho:title">
463
+ <xsl:template match="iho:title" name="title">
470
464
 
471
465
  <xsl:variable name="level">
472
466
  <xsl:call-template name="getLevel"/>
@@ -523,7 +517,7 @@
523
517
  <!-- ====== -->
524
518
 
525
519
 
526
- <xsl:template match="iho:p">
520
+ <xsl:template match="iho:p" name="paragraph">
527
521
  <xsl:param name="inline" select="'false'"/>
528
522
  <xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
529
523
  <xsl:variable name="element-name">
@@ -582,30 +576,18 @@
582
576
 
583
577
  <xsl:template match="iho:ul | iho:ol" mode="ul_ol">
584
578
  <fo:list-block provisional-distance-between-starts="6mm">
585
- <xsl:apply-templates/>
579
+ <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
586
580
  </fo:list-block>
587
581
  <xsl:for-each select="./iho:note">
588
582
  <xsl:call-template name="note"/>
589
583
  </xsl:for-each>
590
584
  </xsl:template>
591
585
 
592
- <xsl:template match="iho:ul//iho:note | iho:ol//iho:note" priority="2"/>
593
- <xsl:template match="iho:ul//iho:note | iho:ol//iho:note" mode="process">
586
+ <xsl:template match="iho:ul//iho:note | iho:ol//iho:note" priority="2">
594
587
  <fo:block id="{@id}">
595
- <xsl:apply-templates select="iho:name" mode="presentation"/>
596
- <xsl:apply-templates mode="process"/>
597
- </fo:block>
598
- </xsl:template>
599
- <xsl:template match="iho:ul//iho:note/iho:name | iho:ol//iho:note/iho:name" mode="process" priority="2"/>
600
- <xsl:template match="iho:ul//iho:note/iho:p | iho:ol//iho:note/iho:p" mode="process" priority="2">
601
- <fo:block font-size="11pt" margin-top="4pt">
602
588
  <xsl:apply-templates/>
603
589
  </fo:block>
604
590
  </xsl:template>
605
-
606
- <xsl:template match="iho:ul//iho:note/* | iho:ol//iho:note/*" mode="process">
607
- <xsl:apply-templates select="."/>
608
- </xsl:template>
609
591
 
610
592
 
611
593
  <xsl:template match="iho:li">
@@ -617,8 +599,8 @@
617
599
  </fo:list-item-label>
618
600
  <fo:list-item-body start-indent="body-start()">
619
601
  <fo:block>
620
- <xsl:apply-templates/>
621
- <xsl:apply-templates select=".//iho:note" mode="process"/>
602
+ <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
603
+ <xsl:apply-templates select=".//iho:note"/>
622
604
  </fo:block>
623
605
  </fo:list-item-body>
624
606
  </fo:list-item>
@@ -635,21 +617,6 @@
635
617
  </xsl:choose>
636
618
  </xsl:template>
637
619
 
638
-
639
-
640
- <xsl:template match="iho:admonition">
641
- <fo:block-container border="0.5pt solid rgb(79, 129, 189)" color="rgb(79, 129, 189)" margin-left="16mm" margin-right="16mm" margin-bottom="12pt">
642
- <fo:block-container margin-left="0mm" margin-right="0mm" padding="2mm" padding-top="3mm">
643
- <fo:block font-size="11pt" margin-bottom="6pt" font-weight="bold" font-style="italic" text-align="center">
644
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@type))"/>
645
- </fo:block>
646
- <fo:block font-style="italic">
647
- <xsl:apply-templates/>
648
- </fo:block>
649
- </fo:block-container>
650
- </fo:block-container>
651
- </xsl:template>
652
-
653
620
 
654
621
  <xsl:template match="iho:formula/iho:stem">
655
622
  <fo:block margin-top="6pt" margin-bottom="12pt" text-align="center">
@@ -658,82 +625,6 @@
658
625
  </xsl:template>
659
626
 
660
627
 
661
-
662
- <xsl:template match="iho:references"><!-- [position() &gt; 1] -->
663
- <fo:block id="{@id}">
664
- <xsl:apply-templates/>
665
- </fo:block>
666
- </xsl:template>
667
-
668
-
669
- <!-- IHO documents:
670
- "[1] S57 edition 3.1: IHO Transfer Standard for Digital Hydrographic Data, International Hydrographic Organization (www.iho.int)”
671
- [{number}] {docID} edition {edition}: {title}, {author/organization}
672
-
673
- Non-IHO documents:
674
- Provide title and publisher -->
675
- <xsl:template match="iho:bibitem">
676
- <fo:list-block margin-bottom="12pt" provisional-distance-between-starts="12mm" line-height="115%">
677
- <fo:list-item>
678
- <fo:list-item-label end-indent="label-end()">
679
- <fo:block>
680
- <fo:inline id="{@id}">
681
- <xsl:number format="[1]"/>
682
- </fo:inline>
683
- </fo:block>
684
- </fo:list-item-label>
685
- <fo:list-item-body start-indent="body-start()">
686
- <fo:block>
687
- <xsl:call-template name="processBibitem"/>
688
- </fo:block>
689
- </fo:list-item-body>
690
- </fo:list-item>
691
- </fo:list-block>
692
- </xsl:template>
693
-
694
- <xsl:template match="iho:bibitem/iho:edition">
695
- <xsl:text> edition </xsl:text>
696
- <xsl:value-of select="."/>
697
- </xsl:template>
698
-
699
- <xsl:template match="iho:bibitem/iho:title">
700
- <fo:inline font-style="italic">
701
- <xsl:apply-templates/>
702
- </fo:inline>
703
- </xsl:template>
704
-
705
- <xsl:template match="iho:bibitem/iho:uri">
706
- <xsl:text> (</xsl:text>
707
- <fo:inline xsl:use-attribute-sets="link-style">
708
- <fo:basic-link external-destination="." fox:alt-text=".">
709
- <xsl:value-of select="."/>
710
- </fo:basic-link>
711
- </fo:inline>
712
- <xsl:text>)</xsl:text>
713
- </xsl:template>
714
-
715
- <xsl:template match="iho:bibitem/iho:note" priority="2">
716
- <fo:footnote>
717
- <xsl:variable name="number">
718
- <xsl:number level="any" count="iho:bibitem/iho:note"/>
719
- </xsl:variable>
720
- <fo:inline font-size="8pt" keep-with-previous.within-line="always" baseline-shift="30%"> <!--85% vertical-align="super"-->
721
- <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
722
- <xsl:value-of select="$number"/><xsl:text>)</xsl:text>
723
- </fo:basic-link>
724
- </fo:inline>
725
- <fo:footnote-body>
726
- <fo:block font-size="10pt" margin-bottom="4pt" start-indent="0pt">
727
- <fo:inline id="{generate-id()}" keep-with-next.within-line="always" alignment-baseline="hanging" padding-right="3mm"><!-- font-size="60%" -->
728
- <xsl:value-of select="$number"/><xsl:text>)</xsl:text>
729
- </fo:inline>
730
- <xsl:apply-templates/>
731
- </fo:block>
732
- </fo:footnote-body>
733
- </fo:footnote>
734
- </xsl:template>
735
-
736
-
737
628
 
738
629
  <xsl:template match="iho:example/iho:p" priority="2">
739
630
  <fo:block-container xsl:use-attribute-sets="example-p-style">
@@ -747,7 +638,7 @@
747
638
 
748
639
 
749
640
 
750
- <xsl:template match="iho:pagebreak">
641
+ <xsl:template match="iho:pagebreak" priority="2">
751
642
  <xsl:copy-of select="."/>
752
643
  </xsl:template>
753
644
 
@@ -761,7 +652,7 @@
761
652
  </xsl:variable>
762
653
  <fo:block line-height="1.1" role="H{$levelTerm}">
763
654
  <fo:block font-weight="bold" keep-with-next="always">
764
- <xsl:apply-templates select="ancestor::iho:term[1]/iho:name" mode="presentation"/>
655
+ <xsl:apply-templates select="ancestor::iho:term[1]/iho:name"/>
765
656
  </fo:block>
766
657
  <fo:block font-weight="bold" keep-with-next="always">
767
658
  <xsl:call-template name="setStyle_preferred"/>
@@ -820,7 +711,9 @@
820
711
 
821
712
  <xsl:template name="getListItemFormat">
822
713
  <xsl:choose>
823
- <xsl:when test="local-name(..) = 'ul'">—</xsl:when> <!-- dash -->
714
+ <xsl:when test="local-name(..) = 'ul'">
715
+ <xsl:call-template name="setULLabel"/>
716
+ </xsl:when>
824
717
  <xsl:otherwise> <!-- for ordered lists -->
825
718
  <xsl:choose>
826
719
  <xsl:when test="../@type = 'arabic'">
@@ -913,29 +806,23 @@
913
806
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAN8AAADfCAIAAAD5m5F7AAAAAXNSR0IArs4c6QAAAAlwSFlzAAAh1QAAIdUBBJy0nQAAPjlJREFUeAHtXQdAFEcX5qhH772IgIAgxYLYFRV7773EEjWWaKImplmS2BKT2BVjr9hFxN4bghRBpYn03nvn//aWW5cDkagcd//NxXB7uzNv3rz3zZs37S2noryoqqJQSoojRT5EAiImAdmqiqKyklSCThHTC2GHkoAsTwwwnMR2EkCInASkRY4jwhCRAF8CBJ18SZBv0ZMAQafo6YRwxJcAQSdfEuRb9CRA0Cl6OiEc8SVA0MmXBPkWPQkQdIqeTghHfAkQdPIlQb5FTwIEnaKnE8IRXwIEnXxJkG/RkwBBp+jphHDElwBBJ18S5Fv0JEDQKXo6IRzxJUDQyZcE+RY9CRB0ip5OCEd8CRB08iVBvkVPAgSdoqcTwhFfAgSdfEmQb9GTAEGn6OmEcMSXAEEnXxLkW/QkQNApejohHPElQNDJlwT5Fj0JEHSKnk4IR3wJEHTyJUG+RU8CBJ2ipxPCEV8CBJ18SZBv0ZMAQafo6YRwxJcAQSdfEuRb9CRA0Cl6O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qQsiWOVoFPiVC5GFSboFCNlSRyrBJ0Sp3IxqjBBpxgpS+JYJeiUOJWLUYUJOsVIWRLHKkGnxKlcjCpM0ClGypI4Vgk6JU7lYlRhgk4xUpbEsUrQKXEqF6MKE3SKkbIkjlWCTolTuRhVmKBTjJQlcawSdEqcysWowgSdYqQsiWP1f5V8zYCHJlYcAAAAAElFTkSuQmCC</xsl:text>
914
807
  </xsl:variable>
915
808
 
916
- <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
917
-
918
- <title-annex lang="en">Annex </title-annex>
919
- <title-annex lang="fr">Annexe </title-annex>
920
-
921
- <title-annex lang="zh">Annex </title-annex>
922
-
923
-
809
+ <xsl:variable name="pageWidth_">
810
+ 210
811
+ </xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
812
+ 297
813
+ </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="titles_">
924
814
 
925
815
  <title-edition lang="en">
926
816
 
927
- <xsl:text>Edition </xsl:text>
928
-
929
-
817
+ <xsl:text>Edition </xsl:text>
818
+
930
819
  </title-edition>
931
820
 
932
821
  <title-edition lang="fr">
933
-
934
- <xsl:text>Édition </xsl:text>
935
-
822
+ <xsl:text>Édition </xsl:text>
936
823
  </title-edition>
937
824
 
938
-
825
+ <!-- These titles of Table of contents renders different than determined in localized-strings -->
939
826
  <title-toc lang="en">
940
827
 
941
828
  <xsl:text>Contents</xsl:text>
@@ -944,24 +831,13 @@
944
831
 
945
832
  </title-toc>
946
833
  <title-toc lang="fr">
834
+ <xsl:text>Sommaire</xsl:text>
835
+ </title-toc>
836
+ <title-toc lang="zh">
947
837
 
948
- <xsl:text>Sommaire</xsl:text>
949
-
950
-
951
- </title-toc>
952
-
953
- <title-toc lang="zh">Contents</title-toc>
954
-
955
-
956
-
957
- <title-page lang="en">Page</title-page>
958
- <title-page lang="fr">Page</title-page>
959
-
960
- <title-key lang="en">Key</title-key>
961
- <title-key lang="fr">Légende</title-key>
962
-
963
- <title-where lang="en">where</title-where>
964
- <title-where lang="fr">où</title-where>
838
+ <xsl:text>Contents</xsl:text>
839
+
840
+ </title-toc>
965
841
 
966
842
  <title-descriptors lang="en">Descriptors</title-descriptors>
967
843
 
@@ -977,32 +853,9 @@
977
853
  </title-part>
978
854
  <title-part lang="zh">第 # 部分:</title-part>
979
855
 
980
- <title-subpart lang="en">
981
-
982
- </title-subpart>
983
- <title-subpart lang="fr">
984
-
985
- </title-subpart>
986
-
987
- <title-modified lang="en">modified</title-modified>
988
- <title-modified lang="fr">modifiée</title-modified>
856
+ <title-subpart lang="en">Sub-part #</title-subpart>
857
+ <title-subpart lang="fr">Partie de sub #</title-subpart>
989
858
 
990
- <title-modified lang="zh">modified</title-modified>
991
-
992
-
993
-
994
- <title-source lang="en">
995
-
996
- <xsl:text>SOURCE</xsl:text>
997
-
998
-
999
- </title-source>
1000
-
1001
- <title-keywords lang="en">Keywords</title-keywords>
1002
-
1003
- <title-deprecated lang="en">DEPRECATED</title-deprecated>
1004
- <title-deprecated lang="fr">DEPRECATED</title-deprecated>
1005
-
1006
859
  <title-list-tables lang="en">List of Tables</title-list-tables>
1007
860
 
1008
861
  <title-list-figures lang="en">List of Figures</title-list-figures>
@@ -1011,41 +864,12 @@
1011
864
 
1012
865
  <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
1013
866
 
1014
- <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
1015
-
1016
- <title-abstract lang="en">Abstract</title-abstract>
1017
-
1018
867
  <title-summary lang="en">Summary</title-summary>
1019
868
 
1020
- <title-in lang="en">in </title-in>
1021
-
1022
- <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
1023
- <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
1024
-
1025
- <title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
1026
- <title-completion-date lang="zh">本稿完成日期</title-completion-date>
1027
-
1028
- <title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
1029
- <title-issuance-date lang="zh"># 发布</title-issuance-date>
1030
-
1031
- <title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
1032
- <title-implementation-date lang="zh"># 实施</title-implementation-date>
1033
-
1034
- <title-obligation-normative lang="en">normative</title-obligation-normative>
1035
- <title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
1036
-
1037
- <title-caution lang="en">CAUTION</title-caution>
1038
- <title-caution lang="zh">注意</title-caution>
1039
-
1040
- <title-warning lang="en">WARNING</title-warning>
1041
- <title-warning lang="zh">警告</title-warning>
1042
-
1043
- <title-amendment lang="en">AMENDMENT</title-amendment>
1044
-
1045
869
  <title-continued lang="en">(continued)</title-continued>
1046
870
  <title-continued lang="fr">(continué)</title-continued>
1047
871
 
1048
- </xsl:variable><xsl:variable name="bibdata">
872
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
1049
873
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
1050
874
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
1051
875
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
@@ -1074,6 +898,70 @@
1074
898
  </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">
1075
899
 
1076
900
 
901
+
902
+
903
+
904
+
905
+
906
+ <xsl:attribute name="font-family">Arial, Cambria Math</xsl:attribute>
907
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
908
+
909
+
910
+
911
+
912
+
913
+
914
+
915
+
916
+
917
+
918
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-style">
919
+
920
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
921
+
922
+
923
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-p-style">
924
+
925
+
926
+
927
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-style">
928
+
929
+
930
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-title-style">
931
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
932
+
933
+
934
+
935
+
936
+
937
+
938
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-p-style">
939
+
940
+
941
+
942
+
943
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-style">
944
+
945
+
946
+
947
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-title-style">
948
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
949
+
950
+
951
+
952
+
953
+
954
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-p-style">
955
+
956
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-style">
957
+
958
+
959
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-title-style">
960
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
961
+
962
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-p-style">
963
+
964
+
1077
965
  </xsl:attribute-set><xsl:attribute-set name="link-style">
1078
966
 
1079
967
 
@@ -1083,6 +971,9 @@
1083
971
 
1084
972
 
1085
973
 
974
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
975
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
976
+
1086
977
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1087
978
  <xsl:attribute name="white-space">pre</xsl:attribute>
1088
979
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1092,8 +983,6 @@
1092
983
 
1093
984
 
1094
985
 
1095
-
1096
-
1097
986
 
1098
987
 
1099
988
  <xsl:attribute name="font-family">Fira Code</xsl:attribute>
@@ -1101,6 +990,15 @@
1101
990
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1102
991
  <xsl:attribute name="line-height">113%</xsl:attribute>
1103
992
 
993
+
994
+
995
+
996
+
997
+
998
+
999
+
1000
+
1001
+
1104
1002
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
1105
1003
 
1106
1004
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -1146,6 +1044,7 @@
1146
1044
 
1147
1045
 
1148
1046
 
1047
+
1149
1048
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1150
1049
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
1151
1050
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -1162,7 +1061,9 @@
1162
1061
 
1163
1062
 
1164
1063
 
1064
+
1165
1065
  </xsl:attribute-set><xsl:attribute-set name="example-name-style">
1066
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1166
1067
 
1167
1068
 
1168
1069
 
@@ -1188,6 +1089,7 @@
1188
1089
 
1189
1090
 
1190
1091
 
1092
+
1191
1093
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1192
1094
  <xsl:attribute name="margin-left">12.7mm</xsl:attribute>
1193
1095
 
@@ -1211,108 +1113,108 @@
1211
1113
 
1212
1114
  </xsl:attribute-set><xsl:variable name="table-border_">
1213
1115
 
1214
- </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
1215
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1216
-
1116
+ </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
1117
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1118
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1217
1119
 
1218
1120
 
1219
1121
 
1220
1122
 
1221
- <xsl:attribute name="text-align">center</xsl:attribute>
1222
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1223
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1224
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1225
1123
 
1226
-
1227
1124
 
1228
1125
 
1229
1126
 
1230
-
1127
+ <xsl:attribute name="space-after">18pt</xsl:attribute>
1231
1128
 
1232
1129
 
1233
1130
 
1234
1131
 
1235
- </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1236
1132
 
1237
- </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1238
1133
 
1239
1134
 
1240
1135
 
1241
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1242
1136
 
1243
1137
 
1244
1138
 
1245
- </xsl:attribute-set><xsl:attribute-set name="xref-style">
1139
+
1246
1140
 
1247
1141
 
1142
+ </xsl:attribute-set><xsl:attribute-set name="table-style">
1143
+ <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
1144
+ <xsl:attribute name="table-layout">fixed</xsl:attribute>
1145
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1146
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1248
1147
 
1249
- <xsl:attribute name="color">blue</xsl:attribute>
1250
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1251
1148
 
1252
1149
 
1253
1150
 
1254
- </xsl:attribute-set><xsl:attribute-set name="eref-style">
1255
1151
 
1256
1152
 
1257
1153
 
1258
1154
 
1155
+
1259
1156
 
1260
1157
 
1261
- </xsl:attribute-set><xsl:attribute-set name="note-style">
1262
1158
 
1263
1159
 
1264
1160
 
1265
1161
 
1266
-
1267
1162
 
1268
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1269
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
1270
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1271
- <xsl:attribute name="text-align">justify</xsl:attribute>
1272
1163
 
1273
1164
 
1274
1165
 
1275
1166
 
1276
1167
 
1277
1168
 
1169
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1170
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1171
+
1278
1172
 
1279
1173
 
1280
1174
 
1281
1175
 
1176
+ <xsl:attribute name="text-align">center</xsl:attribute>
1177
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1178
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1179
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1282
1180
 
1283
- </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">
1181
+
1284
1182
 
1285
1183
 
1286
1184
 
1185
+
1287
1186
 
1288
1187
 
1289
1188
 
1290
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1291
- <xsl:attribute name="padding-right">2mm</xsl:attribute>
1292
1189
 
1190
+ </xsl:attribute-set><xsl:attribute-set name="table-row-style">
1191
+ <xsl:attribute name="min-height">4mm</xsl:attribute>
1293
1192
 
1294
1193
 
1295
1194
 
1296
1195
 
1196
+ </xsl:attribute-set><xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
1197
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1297
1198
 
1298
1199
 
1299
1200
 
1300
- </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1301
1201
 
1302
1202
 
1303
1203
 
1304
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1305
- <xsl:attribute name="padding-right">3mm</xsl:attribute>
1306
1204
 
1205
+
1307
1206
 
1308
- </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1207
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
1309
1208
 
1310
1209
 
1311
1210
 
1312
-
1313
-
1314
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
1315
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1211
+ </xsl:attribute-set><xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
1212
+
1213
+ </xsl:attribute-set><xsl:attribute-set name="table-header-cell-style">
1214
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1215
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1216
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1217
+ <xsl:attribute name="display-align">center</xsl:attribute>
1316
1218
 
1317
1219
 
1318
1220
 
@@ -1322,80 +1224,501 @@
1322
1224
 
1323
1225
 
1324
1226
 
1325
- </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1326
1227
 
1327
1228
 
1328
1229
 
1329
1230
 
1330
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1331
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
1332
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1333
- <xsl:attribute name="text-align">justify</xsl:attribute>
1231
+ </xsl:attribute-set><xsl:attribute-set name="table-cell-style">
1232
+ <xsl:attribute name="display-align">center</xsl:attribute>
1233
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1234
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1334
1235
 
1335
1236
 
1336
1237
 
1337
1238
 
1338
- </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1339
1239
 
1340
-
1341
1240
 
1241
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
1342
1242
 
1343
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
1344
- <xsl:attribute name="role">BlockQuote</xsl:attribute>
1345
1243
 
1346
1244
 
1347
1245
 
1348
1246
 
1349
-
1350
- <xsl:attribute name="margin-left">12.5mm</xsl:attribute>
1351
- <xsl:attribute name="margin-right">14mm</xsl:attribute>
1352
1247
 
1353
1248
 
1354
1249
 
1355
- </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1250
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1251
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1252
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1253
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1254
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1356
1255
 
1357
1256
 
1358
- <xsl:attribute name="text-align">right</xsl:attribute>
1359
-
1360
-
1361
- </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1362
1257
 
1363
1258
 
1364
1259
 
1365
1260
 
1366
1261
 
1367
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1262
+
1368
1263
 
1369
1264
 
1370
1265
 
1371
- </xsl:attribute-set><xsl:attribute-set name="origin-style">
1266
+ </xsl:attribute-set><xsl:attribute-set name="table-note-style">
1267
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1268
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1372
1269
 
1373
1270
 
1374
- <xsl:attribute name="color">blue</xsl:attribute>
1375
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1376
1271
 
1377
1272
 
1378
1273
 
1379
- </xsl:attribute-set><xsl:attribute-set name="term-style">
1380
1274
 
1381
- <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
1275
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
1276
+
1277
+
1278
+
1279
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
1280
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1281
+
1282
+
1283
+
1284
+
1285
+
1286
+
1287
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
1288
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1289
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1290
+
1291
+
1292
+
1293
+
1294
+
1295
+
1296
+
1297
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1298
+
1299
+
1300
+
1301
+
1302
+
1303
+
1304
+ </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
1305
+ <xsl:attribute name="text-indent">0</xsl:attribute>
1306
+ <xsl:attribute name="start-indent">0</xsl:attribute>
1307
+
1308
+
1309
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-body-style">
1310
+
1311
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-number-style">
1312
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1313
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1314
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1315
+
1316
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-body-style">
1317
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1318
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1319
+
1320
+ </xsl:attribute-set><xsl:attribute-set name="dt-row-style">
1321
+
1322
+
1323
+ </xsl:attribute-set><xsl:attribute-set name="dt-style">
1324
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1325
+
1326
+
1327
+
1328
+
1329
+
1330
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
1331
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1332
+
1333
+
1334
+
1335
+
1336
+
1337
+
1338
+ </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1339
+
1340
+
1341
+
1342
+ </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1343
+
1344
+
1345
+
1346
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
1347
+
1348
+
1349
+
1350
+ <xsl:attribute name="color">blue</xsl:attribute>
1351
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1352
+
1353
+
1354
+
1355
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
1356
+
1357
+
1358
+
1359
+
1360
+
1361
+
1362
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
1363
+
1364
+
1365
+
1366
+
1367
+
1368
+
1369
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1370
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1371
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1372
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1373
+
1374
+
1375
+
1376
+
1377
+
1378
+
1379
+
1380
+
1381
+
1382
+
1383
+
1384
+ </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">
1385
+
1386
+
1387
+
1388
+
1389
+
1390
+
1391
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1392
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
1393
+
1394
+
1395
+
1396
+
1397
+
1398
+
1399
+
1400
+
1401
+ </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1402
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
1403
+
1404
+
1405
+
1406
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1407
+
1408
+
1409
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1410
+
1411
+
1412
+
1413
+
1414
+
1415
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1416
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1417
+
1418
+
1419
+
1420
+
1421
+
1422
+
1423
+
1424
+
1425
+
1426
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1427
+
1428
+
1429
+
1430
+
1431
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1432
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1433
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1434
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1435
+
1436
+
1437
+
1438
+
1439
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1440
+
1441
+
1442
+
1443
+
1444
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
1445
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
1446
+
1447
+
1448
+
1449
+
1450
+
1451
+ <xsl:attribute name="margin-left">12.5mm</xsl:attribute>
1452
+ <xsl:attribute name="margin-right">14mm</xsl:attribute>
1453
+
1454
+
1455
+
1456
+ </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1457
+
1458
+
1459
+ <xsl:attribute name="text-align">right</xsl:attribute>
1460
+
1461
+
1462
+ </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1463
+
1464
+
1465
+
1466
+
1467
+
1468
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1469
+
1470
+
1471
+
1472
+ </xsl:attribute-set><xsl:attribute-set name="termsource-text-style">
1473
+
1474
+
1475
+ </xsl:attribute-set><xsl:attribute-set name="origin-style">
1476
+
1477
+
1478
+ <xsl:attribute name="color">blue</xsl:attribute>
1479
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1480
+
1481
+
1482
+
1483
+ </xsl:attribute-set><xsl:attribute-set name="term-style">
1484
+
1485
+ <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
1486
+
1487
+ </xsl:attribute-set><xsl:attribute-set name="figure-style">
1488
+
1489
+ </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1490
+
1491
+
1492
+
1493
+
1494
+
1495
+
1496
+
1497
+
1498
+
1499
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1500
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1501
+ <xsl:attribute name="text-align">center</xsl:attribute>
1502
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1503
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1504
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1505
+
1506
+
1507
+
1508
+
1509
+
1510
+
1511
+
1512
+
1513
+
1514
+
1515
+
1516
+
1517
+ </xsl:attribute-set><xsl:attribute-set name="formula-style">
1518
+
1519
+ </xsl:attribute-set><xsl:attribute-set name="image-style">
1520
+ <xsl:attribute name="text-align">center</xsl:attribute>
1521
+
1522
+
1523
+
1524
+
1525
+
1526
+
1527
+ </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1528
+
1529
+ </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1530
+
1531
+
1532
+ <xsl:attribute name="width">100%</xsl:attribute>
1533
+ <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
1534
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
1535
+
1536
+
1537
+
1538
+
1539
+
1540
+ </xsl:attribute-set><xsl:attribute-set name="tt-style">
1541
+
1542
+
1543
+ <xsl:attribute name="font-family">Courier New</xsl:attribute>
1544
+
1545
+
1546
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1547
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1548
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1549
+ <xsl:attribute name="text-align">center</xsl:attribute>
1550
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1551
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1552
+
1553
+ </xsl:attribute-set><xsl:attribute-set name="domain-style">
1554
+
1555
+ </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1556
+
1557
+
1558
+
1559
+ </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1560
+
1561
+
1562
+ </xsl:attribute-set><xsl:attribute-set name="definition-style">
1563
+
1564
+
1565
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1566
+
1567
+
1568
+ </xsl:attribute-set><xsl:variable name="color-added-text">
1569
+ <xsl:text>rgb(0, 255, 0)</xsl:text>
1570
+ </xsl:variable><xsl:attribute-set name="add-style">
1571
+ <xsl:attribute name="color">red</xsl:attribute>
1572
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1573
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
1574
+ <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1575
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1576
+ <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1577
+ </xsl:attribute-set><xsl:variable name="color-deleted-text">
1578
+ <xsl:text>red</xsl:text>
1579
+ </xsl:variable><xsl:attribute-set name="del-style">
1580
+ <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
1581
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1582
+ </xsl:attribute-set><xsl:attribute-set name="mathml-style">
1583
+ <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
1584
+
1585
+
1586
+ </xsl:attribute-set><xsl:attribute-set name="list-style">
1587
+
1588
+ </xsl:attribute-set><xsl:attribute-set name="toc-style">
1589
+ <xsl:attribute name="line-height">135%</xsl:attribute>
1590
+ </xsl:attribute-set><xsl:attribute-set name="fn-reference-style">
1591
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1592
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1593
+
1594
+
1595
+
1596
+
1597
+
1598
+
1599
+
1600
+
1601
+ </xsl:attribute-set><xsl:attribute-set name="fn-style">
1602
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1603
+ </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
1604
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1605
+
1606
+
1607
+
1608
+
1609
+
1610
+
1611
+
1612
+ <xsl:attribute name="font-size">70%</xsl:attribute>
1613
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1614
+
1615
+
1616
+
1617
+
1618
+
1619
+
1620
+
1621
+
1622
+
1623
+
1624
+ </xsl:attribute-set><xsl:attribute-set name="fn-body-style">
1625
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1626
+ <xsl:attribute name="font-style">normal</xsl:attribute>
1627
+ <xsl:attribute name="text-indent">0</xsl:attribute>
1628
+ <xsl:attribute name="start-indent">0</xsl:attribute>
1629
+
1630
+
1631
+
1632
+
1633
+
1634
+
1635
+
1636
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1637
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1638
+
1639
+
1640
+
1641
+
1642
+
1643
+
1644
+
1645
+
1646
+
1647
+
1648
+
1649
+
1650
+ </xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
1651
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
1652
+
1653
+
1654
+
1655
+
1656
+
1657
+
1658
+
1659
+ <xsl:attribute name="font-size">60%</xsl:attribute>
1660
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1661
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1662
+
1663
+
1664
+
1665
+
1666
+
1667
+
1668
+
1669
+
1670
+
1671
+
1672
+
1673
+ </xsl:attribute-set><xsl:attribute-set name="admonition-style">
1674
+
1675
+
1676
+
1677
+
1678
+
1679
+
1680
+ <xsl:attribute name="border">0.5pt solid rgb(79, 129, 189)</xsl:attribute>
1681
+ <xsl:attribute name="color">rgb(79, 129, 189)</xsl:attribute>
1682
+ <xsl:attribute name="margin-left">16mm</xsl:attribute>
1683
+ <xsl:attribute name="margin-right">16mm</xsl:attribute>
1684
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1685
+
1686
+
1687
+
1688
+
1689
+
1690
+
1691
+
1692
+
1693
+
1694
+ </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
1695
+
1696
+
1697
+
1698
+
1699
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1700
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1701
+ <xsl:attribute name="padding">2mm</xsl:attribute>
1702
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
1703
+
1704
+
1705
+
1382
1706
 
1383
- </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1384
1707
 
1385
1708
 
1386
-
1387
1709
 
1710
+ </xsl:attribute-set><xsl:attribute-set name="admonition-name-style">
1711
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1388
1712
 
1389
1713
 
1390
1714
 
1391
1715
 
1392
1716
 
1393
1717
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1718
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1394
1719
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1720
+ <xsl:attribute name="font-style">italic</xsl:attribute>
1395
1721
  <xsl:attribute name="text-align">center</xsl:attribute>
1396
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
1397
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1398
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1399
1722
 
1400
1723
 
1401
1724
 
@@ -1403,98 +1726,71 @@
1403
1726
 
1404
1727
 
1405
1728
 
1406
-
1407
1729
 
1408
1730
 
1731
+ </xsl:attribute-set><xsl:attribute-set name="admonition-p-style">
1409
1732
 
1410
-
1411
- </xsl:attribute-set><xsl:attribute-set name="formula-style">
1412
1733
 
1413
- </xsl:attribute-set><xsl:attribute-set name="image-style">
1414
- <xsl:attribute name="text-align">center</xsl:attribute>
1415
1734
 
1416
1735
 
1736
+ <xsl:attribute name="font-style">italic</xsl:attribute>
1417
1737
 
1418
1738
 
1419
1739
 
1420
1740
 
1421
- </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1422
1741
 
1423
- </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1424
1742
 
1425
1743
 
1426
- <xsl:attribute name="width">100%</xsl:attribute>
1427
- <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
1428
- <xsl:attribute name="scaling">uniform</xsl:attribute>
1429
1744
 
1745
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
1430
1746
 
1431
1747
 
1432
-
1433
-
1434
- </xsl:attribute-set><xsl:attribute-set name="tt-style">
1435
1748
 
1436
1749
 
1437
- <xsl:attribute name="font-family">Courier New</xsl:attribute>
1438
1750
 
1439
1751
 
1440
- </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1441
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1442
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1443
- <xsl:attribute name="text-align">center</xsl:attribute>
1752
+
1753
+
1754
+
1755
+
1756
+
1757
+
1758
+
1759
+
1760
+
1761
+
1762
+
1763
+
1764
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-style">
1765
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
1444
1766
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1445
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1446
1767
 
1447
- </xsl:attribute-set><xsl:attribute-set name="domain-style">
1448
-
1449
- </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1450
1768
 
1451
1769
 
1452
1770
 
1453
- </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1454
1771
 
1772
+ <xsl:attribute name="line-height">115%</xsl:attribute>
1455
1773
 
1456
- </xsl:attribute-set><xsl:attribute-set name="definition-style">
1457
1774
 
1458
1775
 
1459
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1460
1776
 
1461
1777
 
1462
- </xsl:attribute-set><xsl:variable name="color-added-text">
1463
- <xsl:text>rgb(0, 255, 0)</xsl:text>
1464
- </xsl:variable><xsl:attribute-set name="add-style">
1465
- <xsl:attribute name="color">red</xsl:attribute>
1466
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1467
- <!-- <xsl:attribute name="color">black</xsl:attribute>
1468
- <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1469
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
1470
- <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1471
- </xsl:attribute-set><xsl:variable name="color-deleted-text">
1472
- <xsl:text>red</xsl:text>
1473
- </xsl:variable><xsl:attribute-set name="del-style">
1474
- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
1475
- <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1476
- </xsl:attribute-set><xsl:attribute-set name="mathml-style">
1477
- <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
1478
1778
 
1479
1779
 
1480
- </xsl:attribute-set><xsl:attribute-set name="list-style">
1780
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
1481
1781
 
1482
- </xsl:attribute-set><xsl:attribute-set name="toc-style">
1483
- <xsl:attribute name="line-height">135%</xsl:attribute>
1484
- </xsl:attribute-set><xsl:attribute-set name="fn-style">
1485
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1486
- </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
1487
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1488
1782
 
1489
1783
 
1490
1784
 
1785
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-style">
1786
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
1787
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1491
1788
 
1492
1789
 
1493
1790
 
1494
1791
 
1495
- <xsl:attribute name="font-size">70%</xsl:attribute>
1496
- <xsl:attribute name="vertical-align">super</xsl:attribute>
1497
1792
 
1793
+ <xsl:attribute name="line-height">115%</xsl:attribute>
1498
1794
 
1499
1795
 
1500
1796
 
@@ -1502,24 +1798,25 @@
1502
1798
 
1503
1799
 
1504
1800
 
1801
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
1505
1802
 
1506
1803
 
1507
- </xsl:attribute-set><xsl:attribute-set name="fn-body-style">
1508
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1509
- <xsl:attribute name="font-style">normal</xsl:attribute>
1510
- <xsl:attribute name="text-indent">0</xsl:attribute>
1511
- <xsl:attribute name="start-indent">0</xsl:attribute>
1804
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
1805
+
1512
1806
 
1513
1807
 
1808
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
1809
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1810
+ <xsl:attribute name="font-size">65%</xsl:attribute>
1514
1811
 
1515
1812
 
1516
1813
 
1517
1814
 
1518
1815
 
1519
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1520
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1521
1816
 
1522
1817
 
1818
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
1819
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
1523
1820
 
1524
1821
 
1525
1822
 
@@ -1530,7 +1827,7 @@
1530
1827
 
1531
1828
 
1532
1829
 
1533
- </xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
1830
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
1534
1831
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
1535
1832
 
1536
1833
 
@@ -1539,13 +1836,28 @@
1539
1836
 
1540
1837
 
1541
1838
 
1542
- <xsl:attribute name="font-size">60%</xsl:attribute>
1543
- <xsl:attribute name="vertical-align">super</xsl:attribute>
1544
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
1839
+ <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
1840
+ <xsl:attribute name="padding-right">3mm</xsl:attribute>
1841
+
1842
+
1843
+
1844
+
1845
+
1846
+
1847
+
1848
+
1849
+
1850
+
1851
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
1852
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1853
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1854
+ <xsl:attribute name="start-indent">0pt</xsl:attribute>
1855
+
1545
1856
 
1546
1857
 
1547
1858
 
1548
1859
 
1860
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
1549
1861
 
1550
1862
 
1551
1863
 
@@ -1553,30 +1865,15 @@
1553
1865
 
1554
1866
 
1555
1867
 
1556
- </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">
1557
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1558
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
1559
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
1560
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
1561
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
1562
- </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
1868
+ </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
1869
+
1870
+
1871
+
1872
+ </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">
1563
1873
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1564
1874
  <xsl:sort select="@displayorder" data-type="number"/>
1565
1875
  <xsl:apply-templates select="." mode="contents"/>
1566
1876
  </xsl:for-each>
1567
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
1568
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
1569
-
1570
- <!-- Normative references -->
1571
- <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"/>
1572
- <!-- Terms and definitions -->
1573
- <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"/>
1574
- <!-- Another main sections -->
1575
- <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"/>
1576
- <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
1577
- <!-- Bibliography -->
1578
- <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"/>
1579
-
1580
1877
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1581
1878
 
1582
1879
  <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']]">
@@ -1593,29 +1890,11 @@
1593
1890
  <xsl:sort select="@displayorder" data-type="number"/>
1594
1891
  <xsl:apply-templates select="." mode="contents"/>
1595
1892
  </xsl:for-each>
1596
- </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
1597
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
1598
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
1599
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
1600
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
1601
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
1602
1893
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1603
1894
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1604
1895
  <xsl:sort select="@displayorder" data-type="number"/>
1605
1896
  <xsl:apply-templates select="."/>
1606
1897
  </xsl:for-each>
1607
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
1608
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
1609
-
1610
- <!-- Normative references -->
1611
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
1612
- <!-- Terms and definitions -->
1613
- <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']]"/>
1614
- <!-- Another main sections -->
1615
- <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'])]"/>
1616
- <xsl:apply-templates select="/*/*[local-name()='annex']"/>
1617
- <!-- Bibliography -->
1618
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
1619
1898
  </xsl:template><xsl:template name="processMainSectionsDefault">
1620
1899
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
1621
1900
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -1636,6 +1915,64 @@
1636
1915
  <xsl:value-of select="."/>
1637
1916
  </xsl:template><xsl:template match="*[local-name()='br']">
1638
1917
  <xsl:value-of select="$linebreak"/>
1918
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
1919
+ <fo:block xsl:use-attribute-sets="copyright-statement-style">
1920
+ <xsl:apply-templates/>
1921
+ </fo:block>
1922
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
1923
+
1924
+ <!-- process in the template 'title' -->
1925
+ <xsl:call-template name="title"/>
1926
+
1927
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
1928
+
1929
+
1930
+ <!-- process in the template 'paragraph' -->
1931
+ <xsl:call-template name="paragraph"/>
1932
+
1933
+ </xsl:template><xsl:template match="*[local-name()='license-statement']">
1934
+ <fo:block xsl:use-attribute-sets="license-statement-style">
1935
+ <xsl:apply-templates/>
1936
+ </fo:block>
1937
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
1938
+
1939
+ <!-- process in the template 'title' -->
1940
+ <xsl:call-template name="title"/>
1941
+
1942
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
1943
+
1944
+ <!-- process in the template 'paragraph' -->
1945
+ <xsl:call-template name="paragraph"/>
1946
+
1947
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']">
1948
+ <fo:block xsl:use-attribute-sets="legal-statement-style">
1949
+ <xsl:apply-templates/>
1950
+ </fo:block>
1951
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
1952
+
1953
+ <!-- process in the template 'title' -->
1954
+ <xsl:call-template name="title"/>
1955
+
1956
+
1957
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
1958
+
1959
+ <!-- process in the template 'paragraph' -->
1960
+ <xsl:call-template name="paragraph"/>
1961
+
1962
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']">
1963
+ <fo:block xsl:use-attribute-sets="feedback-statement-style">
1964
+ <xsl:apply-templates/>
1965
+ </fo:block>
1966
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
1967
+
1968
+ <!-- process in the template 'title' -->
1969
+ <xsl:call-template name="title"/>
1970
+
1971
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
1972
+
1973
+ <!-- process in the template 'paragraph' -->
1974
+ <xsl:call-template name="paragraph"/>
1975
+
1639
1976
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1640
1977
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1641
1978
  <xsl:call-template name="add-zero-spaces-java"/>
@@ -1652,43 +1989,19 @@
1652
1989
  <xsl:call-template name="getSimpleTable"/>
1653
1990
  </xsl:variable>
1654
1991
 
1655
- <!-- <xsl:if test="$namespace = 'bipm'">
1656
- <fo:block>&#xA0;</fo:block>
1657
- </xsl:if> -->
1658
-
1659
1992
 
1660
1993
  <!-- Display table's name before table as standalone block -->
1661
1994
  <!-- $namespace = 'iso' or -->
1662
1995
 
1663
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1664
-
1665
-
1666
-
1667
-
1996
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
1997
+
1668
1998
 
1669
- <xsl:call-template name="fn_name_display"/>
1670
1999
 
2000
+ <xsl:call-template name="table_name_fn_display"/>
1671
2001
 
1672
2002
 
1673
2003
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
1674
2004
 
1675
- <!-- <xsl:variable name="cols-count">
1676
- <xsl:choose>
1677
- <xsl:when test="*[local-name()='thead']">
1678
- <xsl:call-template name="calculate-columns-numbers">
1679
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1680
- </xsl:call-template>
1681
- </xsl:when>
1682
- <xsl:otherwise>
1683
- <xsl:call-template name="calculate-columns-numbers">
1684
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1685
- </xsl:call-template>
1686
- </xsl:otherwise>
1687
- </xsl:choose>
1688
- </xsl:variable> -->
1689
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1690
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1691
-
1692
2005
  <xsl:variable name="colwidths">
1693
2006
  <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1694
2007
  <xsl:call-template name="calculate-column-widths">
@@ -1699,17 +2012,8 @@
1699
2012
  </xsl:variable>
1700
2013
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1701
2014
 
1702
- <!-- <xsl:variable name="colwidths2">
1703
- <xsl:call-template name="calculate-column-widths">
1704
- <xsl:with-param name="cols-count" select="$cols-count"/>
1705
- </xsl:call-template>
1706
- </xsl:variable> -->
1707
-
1708
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1709
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
1710
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1711
2015
 
1712
- <xsl:variable name="margin-left">
2016
+ <xsl:variable name="margin-side">
1713
2017
  <xsl:choose>
1714
2018
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1715
2019
  <xsl:otherwise>0</xsl:otherwise>
@@ -1717,70 +2021,61 @@
1717
2021
  </xsl:variable>
1718
2022
 
1719
2023
 
1720
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1721
-
1722
-
1723
-
1724
-
1725
-
1726
-
1727
-
1728
-
1729
-
2024
+ <fo:block-container xsl:use-attribute-sets="table-container-style">
2025
+
1730
2026
 
2027
+
1731
2028
 
2029
+
1732
2030
 
2031
+
1733
2032
 
1734
2033
 
1735
- <xsl:attribute name="space-after">18pt</xsl:attribute>
1736
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1737
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
1738
2034
 
2035
+
1739
2036
 
1740
2037
 
1741
2038
 
1742
2039
 
1743
2040
 
2041
+ <!-- end table block-container attributes -->
1744
2042
 
1745
2043
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
1746
2044
 
1747
2045
 
2046
+ <xsl:variable name="table_width_default">100%</xsl:variable>
1748
2047
  <xsl:variable name="table_width">
1749
2048
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1750
- 100%
1751
-
1752
-
2049
+ <xsl:value-of select="$table_width_default"/>
1753
2050
  </xsl:variable>
1754
2051
 
2052
+
1755
2053
  <xsl:variable name="table_attributes">
1756
- <attribute name="table-layout">fixed</attribute>
1757
- <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
1758
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1759
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1760
-
1761
-
1762
-
1763
-
1764
-
1765
-
1766
-
1767
-
1768
-
1769
-
1770
-
1771
- <attribute name="margin-left">0mm</attribute>
1772
- <attribute name="margin-right">0mm</attribute>
1773
-
1774
-
1775
-
1776
-
2054
+
2055
+ <xsl:element name="table_attributes" use-attribute-sets="table-style">
2056
+ <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
2057
+
2058
+
2059
+
2060
+
2061
+
2062
+
2063
+
2064
+
2065
+
2066
+
2067
+
2068
+
2069
+
2070
+
2071
+ </xsl:element>
1777
2072
  </xsl:variable>
1778
2073
 
1779
2074
 
1780
- <fo:table id="{@id}" table-omit-footer-at-break="true">
2075
+ <fo:table id="{@id}">
1781
2076
 
1782
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1783
- <xsl:attribute name="{@name}">
2077
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2078
+ <xsl:attribute name="{local-name()}">
1784
2079
  <xsl:value-of select="."/>
1785
2080
  </xsl:attribute>
1786
2081
  </xsl:for-each>
@@ -1791,7 +2086,6 @@
1791
2086
  </xsl:if>
1792
2087
 
1793
2088
 
1794
-
1795
2089
  <xsl:choose>
1796
2090
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1797
2091
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -1817,7 +2111,7 @@
1817
2111
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1818
2112
  </xsl:when>
1819
2113
  <xsl:otherwise>
1820
- <xsl:apply-templates/>
2114
+ <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 -->
1821
2115
  </xsl:otherwise>
1822
2116
  </xsl:choose>
1823
2117
 
@@ -1832,25 +2126,6 @@
1832
2126
  </xsl:call-template>
1833
2127
  </xsl:for-each>
1834
2128
 
1835
- <!-- insert footer as table -->
1836
- <!-- <fo:table>
1837
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1838
- <xsl:attribute name="{@name}">
1839
- <xsl:value-of select="."/>
1840
- </xsl:attribute>
1841
- </xsl:for-each>
1842
-
1843
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1844
- <xsl:choose>
1845
- <xsl:when test=". = 1 or . = 0">
1846
- <fo:table-column column-width="proportional-column-width(2)"/>
1847
- </xsl:when>
1848
- <xsl:otherwise>
1849
- <fo:table-column column-width="proportional-column-width({.})"/>
1850
- </xsl:otherwise>
1851
- </xsl:choose>
1852
- </xsl:for-each>
1853
- </fo:table>-->
1854
2129
 
1855
2130
 
1856
2131
 
@@ -1911,18 +2186,17 @@
1911
2186
  </xsl:otherwise>
1912
2187
  </xsl:choose>
1913
2188
 
1914
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
2189
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
1915
2190
  <xsl:param name="continued"/>
1916
2191
  <xsl:if test="normalize-space() != ''">
1917
2192
  <fo:block xsl:use-attribute-sets="table-name-style">
1918
-
2193
+
1919
2194
 
1920
2195
 
1921
2196
 
1922
2197
 
1923
2198
  <xsl:choose>
1924
2199
  <xsl:when test="$continued = 'true'">
1925
- <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
1926
2200
 
1927
2201
  </xsl:when>
1928
2202
  <xsl:otherwise>
@@ -1985,13 +2259,6 @@
1985
2259
  <xsl:for-each select="xalan:nodeset($table)/*/tr">
1986
2260
  <xsl:variable name="td_text">
1987
2261
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
1988
-
1989
- <!-- <xsl:if test="$namespace = 'bipm'">
1990
- <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
1991
- <word><xsl:value-of select="normalize-space(.)"/></word>
1992
- </xsl:for-each>
1993
- </xsl:if> -->
1994
-
1995
2262
  </xsl:variable>
1996
2263
  <xsl:variable name="words">
1997
2264
  <xsl:variable name="string_with_added_zerospaces">
@@ -2028,7 +2295,6 @@
2028
2295
  </xsl:otherwise>
2029
2296
  </xsl:choose>
2030
2297
  </xsl:variable>
2031
-
2032
2298
 
2033
2299
  <column>
2034
2300
  <xsl:for-each select="xalan:nodeset($widths)//width">
@@ -2062,9 +2328,8 @@
2062
2328
 
2063
2329
  <xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
2064
2330
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2065
- </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2331
+ </xsl:template><xsl:template match="*[local-name()='thead']">
2066
2332
  <xsl:param name="cols-count"/>
2067
- <!-- font-weight="bold" -->
2068
2333
  <fo:table-header>
2069
2334
 
2070
2335
 
@@ -2076,85 +2341,26 @@
2076
2341
  <fo:table-row>
2077
2342
  <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">
2078
2343
 
2079
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
2344
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
2080
2345
  <xsl:with-param name="continued">true</xsl:with-param>
2081
2346
  </xsl:apply-templates>
2082
2347
 
2083
2348
 
2084
2349
 
2085
-
2086
- </fo:table-cell>
2087
- </fo:table-row>
2088
- </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
2089
- <fo:table-body>
2090
- <xsl:apply-templates/>
2091
- </fo:table-body>
2092
- </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
2093
- <xsl:apply-templates/>
2094
- </xsl:template><xsl:template name="insertTableFooter">
2095
- <xsl:param name="cols-count"/>
2096
- <xsl:if test="../*[local-name()='tfoot']">
2097
- <fo:table-footer>
2098
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2099
- </fo:table-footer>
2100
- </xsl:if>
2101
- </xsl:template><xsl:template name="insertTableFooter2">
2102
- <xsl:param name="cols-count"/>
2103
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2104
- <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
2105
-
2106
- <fo:table-footer>
2107
-
2108
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2109
-
2110
- <!-- if there are note(s) or fn(s) then create footer row -->
2111
- <xsl:if test="$isNoteOrFnExist = 'true'">
2112
-
2113
-
2114
-
2115
- <fo:table-row>
2116
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2117
-
2118
-
2119
-
2120
- <!-- fn will be processed inside 'note' processing -->
2121
-
2122
-
2123
-
2124
-
2125
-
2126
-
2127
- <!-- except gb -->
2128
-
2129
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2130
-
2131
-
2132
- <!-- show Note under table in preface (ex. abstract) sections -->
2133
- <!-- empty, because notes show at page side in main sections -->
2134
- <!-- <xsl:if test="$namespace = 'bipm'">
2135
- <xsl:choose>
2136
- <xsl:when test="ancestor::*[local-name()='preface']">
2137
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2138
- </xsl:when>
2139
- <xsl:otherwise>
2140
- <fo:block/>
2141
- </xsl:otherwise>
2142
- </xsl:choose>
2143
- </xsl:if> -->
2144
-
2145
-
2146
- <!-- horizontal row separator -->
2147
-
2148
-
2149
- <!-- fn processing -->
2150
- <xsl:call-template name="fn_display"/>
2151
-
2152
- </fo:table-cell>
2153
- </fo:table-row>
2154
-
2155
- </xsl:if>
2350
+ </fo:table-cell>
2351
+ </fo:table-row>
2352
+ </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
2353
+ <fo:table-body>
2354
+ <xsl:apply-templates/>
2355
+ </fo:table-body>
2356
+ </xsl:template><xsl:template match="*[local-name()='tfoot']">
2357
+ <xsl:apply-templates/>
2358
+ </xsl:template><xsl:template name="insertTableFooter">
2359
+ <xsl:param name="cols-count"/>
2360
+ <xsl:if test="../*[local-name()='tfoot']">
2361
+ <fo:table-footer>
2362
+ <xsl:apply-templates select="../*[local-name()='tfoot']"/>
2156
2363
  </fo:table-footer>
2157
-
2158
2364
  </xsl:if>
2159
2365
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
2160
2366
  <xsl:param name="table_attributes"/>
@@ -2181,17 +2387,18 @@
2181
2387
  </xsl:variable>
2182
2388
 
2183
2389
  <fo:table keep-with-previous="always">
2184
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2390
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2391
+ <xsl:variable name="name" select="local-name()"/>
2185
2392
  <xsl:choose>
2186
- <xsl:when test="@name = 'border-top'">
2187
- <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
2393
+ <xsl:when test="$name = 'border-top'">
2394
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
2188
2395
  </xsl:when>
2189
- <xsl:when test="@name = 'border'">
2190
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2396
+ <xsl:when test="$name = 'border'">
2397
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2191
2398
  <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
2192
2399
  </xsl:when>
2193
2400
  <xsl:otherwise>
2194
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2401
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2195
2402
  </xsl:otherwise>
2196
2403
  </xsl:choose>
2197
2404
  </xsl:for-each>
@@ -2220,9 +2427,10 @@
2220
2427
 
2221
2428
  <fo:table-body>
2222
2429
  <fo:table-row>
2223
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2430
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
2224
2431
 
2225
2432
 
2433
+
2226
2434
 
2227
2435
 
2228
2436
  <!-- fn will be processed inside 'note' processing -->
@@ -2232,37 +2440,20 @@
2232
2440
 
2233
2441
 
2234
2442
 
2235
-
2236
-
2237
-
2238
2443
  <!-- for BSI (not PAS) display Notes before footnotes -->
2239
2444
 
2240
2445
 
2241
- <!-- except gb -->
2446
+ <!-- except gb and bsi -->
2242
2447
 
2243
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2244
-
2245
-
2246
- <!-- <xsl:if test="$namespace = 'bipm'">
2247
- <xsl:choose>
2248
- <xsl:when test="ancestor::*[local-name()='preface']">
2249
- show Note under table in preface (ex. abstract) sections
2250
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2251
- </xsl:when>
2252
- <xsl:otherwise>
2253
- empty, because notes show at page side in main sections
2254
- <fo:block/>
2255
- </xsl:otherwise>
2256
- </xsl:choose>
2257
- </xsl:if> -->
2448
+ <xsl:apply-templates select="../*[local-name()='note']"/>
2449
+
2258
2450
 
2259
2451
 
2260
2452
  <!-- horizontal row separator -->
2261
2453
 
2262
2454
 
2263
2455
  <!-- fn processing -->
2264
- <xsl:call-template name="fn_display"/>
2265
-
2456
+ <xsl:call-template name="table_fn_display"/>
2266
2457
 
2267
2458
  <!-- for PAS display Notes after footnotes -->
2268
2459
 
@@ -2292,7 +2483,7 @@
2292
2483
 
2293
2484
 
2294
2485
 
2295
- <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
2486
+ <xsl:apply-templates select="../*[local-name()='thead']">
2296
2487
  <xsl:with-param name="cols-count" select="$cols-count"/>
2297
2488
  </xsl:apply-templates>
2298
2489
 
@@ -2304,78 +2495,57 @@
2304
2495
 
2305
2496
 
2306
2497
  <xsl:apply-templates/>
2307
- <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
2308
-
2498
+
2309
2499
  </fo:table-body>
2310
2500
 
2311
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
2312
- <xsl:choose>
2313
- <xsl:when test="substring-after(., '—') != ''">
2314
- <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
2315
- </xsl:when>
2316
- <xsl:otherwise>
2317
- <xsl:value-of select="."/>
2318
- </xsl:otherwise>
2319
- </xsl:choose>
2320
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
2321
- <xsl:apply-templates mode="presentation_name"/>
2322
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
2323
- <xsl:apply-templates select="."/>
2324
- </xsl:template><xsl:template match="*[local-name()='tr']">
2325
- <xsl:variable name="parent-name" select="local-name(..)"/>
2326
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2327
- <fo:table-row min-height="4mm">
2328
- <xsl:if test="$parent-name = 'thead'">
2329
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2330
-
2331
-
2332
-
2333
-
2334
-
2335
-
2336
-
2337
-
2338
- </xsl:if>
2339
- <xsl:if test="$parent-name = 'tfoot'">
2340
-
2341
-
2342
-
2343
- </xsl:if>
2344
-
2345
-
2346
-
2347
-
2348
-
2349
-
2350
-
2351
-
2352
-
2353
-
2354
- <!-- <xsl:if test="$namespace = 'bipm'">
2355
- <xsl:attribute name="height">8mm</xsl:attribute>
2356
- </xsl:if> -->
2357
-
2501
+ </xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
2502
+ <fo:table-row xsl:use-attribute-sets="table-header-row-style">
2503
+
2504
+
2505
+
2506
+
2507
+
2508
+
2509
+
2510
+ <xsl:call-template name="setTableRowAttributes"/>
2511
+
2358
2512
  <xsl:apply-templates/>
2359
2513
  </fo:table-row>
2360
- </xsl:template><xsl:template match="*[local-name()='th']">
2361
- <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
2362
- <xsl:attribute name="text-align">
2363
- <xsl:choose>
2364
- <xsl:when test="@align">
2365
- <xsl:call-template name="setAlignment"/>
2366
- <!-- <xsl:value-of select="@align"/> -->
2367
- </xsl:when>
2368
- <xsl:otherwise>center</xsl:otherwise>
2369
- </xsl:choose>
2370
- </xsl:attribute>
2371
-
2514
+ </xsl:template><xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
2515
+ <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
2372
2516
 
2517
+ <xsl:call-template name="setTableRowAttributes"/>
2518
+ <xsl:apply-templates/>
2519
+ </fo:table-row>
2520
+ </xsl:template><xsl:template match="*[local-name()='tr']">
2521
+ <fo:table-row xsl:use-attribute-sets="table-body-row-style">
2522
+
2373
2523
 
2524
+
2374
2525
 
2526
+
2527
+ <xsl:call-template name="setTableRowAttributes"/>
2528
+ <xsl:apply-templates/>
2529
+ </fo:table-row>
2530
+ </xsl:template><xsl:template name="setTableRowAttributes">
2531
+
2532
+
2533
+
2534
+
2535
+
2536
+
2537
+
2538
+
2539
+ </xsl:template><xsl:template match="*[local-name()='th']">
2540
+ <fo:table-cell xsl:use-attribute-sets="table-header-cell-style"> <!-- text-align="{@align}" -->
2541
+ <xsl:call-template name="setTextAlignment">
2542
+ <xsl:with-param name="default">center</xsl:with-param>
2543
+ </xsl:call-template>
2375
2544
 
2376
2545
 
2377
2546
 
2378
2547
 
2548
+
2379
2549
 
2380
2550
 
2381
2551
 
@@ -2384,21 +2554,25 @@
2384
2554
  <xsl:if test="$lang = 'ar'">
2385
2555
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2386
2556
  </xsl:if>
2387
- <xsl:if test="@colspan">
2388
- <xsl:attribute name="number-columns-spanned">
2389
- <xsl:value-of select="@colspan"/>
2390
- </xsl:attribute>
2391
- </xsl:if>
2392
- <xsl:if test="@rowspan">
2393
- <xsl:attribute name="number-rows-spanned">
2394
- <xsl:value-of select="@rowspan"/>
2395
- </xsl:attribute>
2396
- </xsl:if>
2397
- <xsl:call-template name="display-align"/>
2557
+
2558
+ <xsl:call-template name="setTableCellAttributes"/>
2559
+
2398
2560
  <fo:block>
2399
2561
  <xsl:apply-templates/>
2400
2562
  </fo:block>
2401
2563
  </fo:table-cell>
2564
+ </xsl:template><xsl:template name="setTableCellAttributes">
2565
+ <xsl:if test="@colspan">
2566
+ <xsl:attribute name="number-columns-spanned">
2567
+ <xsl:value-of select="@colspan"/>
2568
+ </xsl:attribute>
2569
+ </xsl:if>
2570
+ <xsl:if test="@rowspan">
2571
+ <xsl:attribute name="number-rows-spanned">
2572
+ <xsl:value-of select="@rowspan"/>
2573
+ </xsl:attribute>
2574
+ </xsl:if>
2575
+ <xsl:call-template name="display-align"/>
2402
2576
  </xsl:template><xsl:template name="display-align">
2403
2577
  <xsl:if test="@valign">
2404
2578
  <xsl:attribute name="display-align">
@@ -2411,24 +2585,18 @@
2411
2585
  </xsl:attribute>
2412
2586
  </xsl:if>
2413
2587
  </xsl:template><xsl:template match="*[local-name()='td']">
2414
- <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
2415
- <xsl:attribute name="text-align">
2416
- <xsl:choose>
2417
- <xsl:when test="@align">
2418
- <xsl:call-template name="setAlignment"/>
2419
- <!-- <xsl:value-of select="@align"/> -->
2420
- </xsl:when>
2421
- <xsl:otherwise>left</xsl:otherwise>
2422
- </xsl:choose>
2423
- </xsl:attribute>
2588
+ <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
2589
+ <xsl:call-template name="setTextAlignment">
2590
+ <xsl:with-param name="default">left</xsl:with-param>
2591
+ </xsl:call-template>
2592
+
2424
2593
  <xsl:if test="$lang = 'ar'">
2425
2594
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2426
2595
  </xsl:if>
2427
- <!-- and ancestor::*[local-name() = 'thead'] -->
2428
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2429
2596
 
2430
2597
 
2431
2598
 
2599
+ <!-- bsi -->
2432
2600
 
2433
2601
 
2434
2602
 
@@ -2437,62 +2605,53 @@
2437
2605
 
2438
2606
 
2439
2607
 
2608
+
2609
+
2440
2610
 
2441
2611
 
2442
2612
 
2443
2613
 
2444
2614
 
2445
- <xsl:if test=".//*[local-name() = 'table']">
2615
+ <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
2446
2616
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2447
2617
  </xsl:if>
2448
- <xsl:if test="@colspan">
2449
- <xsl:attribute name="number-columns-spanned">
2450
- <xsl:value-of select="@colspan"/>
2451
- </xsl:attribute>
2452
- </xsl:if>
2453
- <xsl:if test="@rowspan">
2454
- <xsl:attribute name="number-rows-spanned">
2455
- <xsl:value-of select="@rowspan"/>
2456
- </xsl:attribute>
2457
- </xsl:if>
2458
- <xsl:call-template name="display-align"/>
2618
+
2619
+ <xsl:call-template name="setTableCellAttributes"/>
2620
+
2459
2621
  <fo:block>
2460
-
2622
+
2623
+
2624
+
2461
2625
  <xsl:apply-templates/>
2462
2626
  </fo:block>
2463
2627
  </fo:table-cell>
2464
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
2465
-
2628
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
2629
+
2630
+ <fo:block xsl:use-attribute-sets="table-note-style">
2631
+
2632
+
2633
+
2634
+
2466
2635
 
2467
- <fo:block font-size="10pt" margin-bottom="12pt">
2468
-
2469
-
2636
+ <!-- Table's note name (NOTE, for example) -->
2637
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
2470
2638
 
2471
2639
 
2472
2640
 
2473
- <xsl:attribute name="font-size">12pt</xsl:attribute>
2474
2641
 
2475
2642
 
2476
2643
 
2477
2644
 
2478
- <!-- Table's note name (NOTE, for example) -->
2479
-
2480
- <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
2481
-
2482
-
2483
-
2645
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
2484
2646
 
2485
-
2486
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2487
-
2488
- </fo:inline>
2489
-
2490
-
2491
-
2492
- <xsl:apply-templates mode="process"/>
2493
- </fo:block>
2647
+ </fo:inline>
2648
+
2649
+
2650
+
2651
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
2652
+ </fo:block>
2494
2653
 
2495
- </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">
2654
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
2496
2655
  <xsl:apply-templates/>
2497
2656
  </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">
2498
2657
 
@@ -2570,8 +2729,7 @@
2570
2729
  <xsl:copy-of select="$footnote_inline"/>
2571
2730
  <fo:footnote-body>
2572
2731
 
2573
- <fo:block-container text-indent="0" start-indent="0">
2574
-
2732
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
2575
2733
 
2576
2734
  <fo:block xsl:use-attribute-sets="fn-body-style">
2577
2735
 
@@ -2590,7 +2748,7 @@
2590
2748
  <xsl:copy-of select="$footnote_inline"/>
2591
2749
  </xsl:otherwise>
2592
2750
  </xsl:choose>
2593
- </xsl:template><xsl:template name="fn_display">
2751
+ </xsl:template><xsl:template name="table_fn_display">
2594
2752
  <xsl:variable name="references">
2595
2753
 
2596
2754
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
@@ -2601,33 +2759,26 @@
2601
2759
  <xsl:for-each select="xalan:nodeset($references)//fn">
2602
2760
  <xsl:variable name="reference" select="@reference"/>
2603
2761
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
2604
- <fo:block margin-bottom="12pt">
2762
+ <fo:block xsl:use-attribute-sets="table-fn-style">
2605
2763
 
2606
2764
 
2607
2765
 
2608
-
2609
-
2610
-
2611
-
2612
- <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
2766
+ <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
2613
2767
 
2614
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2615
2768
 
2616
2769
 
2617
2770
 
2618
2771
 
2772
+ <xsl:value-of select="@reference"/>
2619
2773
 
2620
2774
 
2621
2775
 
2622
2776
 
2623
- <xsl:value-of select="@reference"/>
2624
2777
 
2625
2778
 
2626
2779
 
2627
2780
  </fo:inline>
2628
- <fo:inline>
2629
-
2630
- <!-- <xsl:apply-templates /> -->
2781
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
2631
2782
  <xsl:copy-of select="./node()"/>
2632
2783
  </fo:inline>
2633
2784
  </fo:block>
@@ -2639,15 +2790,7 @@
2639
2790
 
2640
2791
  <xsl:apply-templates/>
2641
2792
  </fn>
2642
- </xsl:template><xsl:template name="fn_name_display">
2643
- <!-- <xsl:variable name="references">
2644
- <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2645
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2646
- <xsl:apply-templates />
2647
- </fn>
2648
- </xsl:for-each>
2649
- </xsl:variable>
2650
- $references=<xsl:copy-of select="$references"/> -->
2793
+ </xsl:template><xsl:template name="table_name_fn_display">
2651
2794
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2652
2795
  <xsl:variable name="reference" select="@reference"/>
2653
2796
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
@@ -2656,9 +2799,7 @@
2656
2799
  </fo:block>
2657
2800
  </xsl:for-each>
2658
2801
  </xsl:template><xsl:template name="fn_display_figure">
2659
- <xsl:variable name="key_iso">
2660
- <!-- and (not(@class) or @class !='pseudocode') -->
2661
- </xsl:variable>
2802
+
2662
2803
  <xsl:variable name="references">
2663
2804
  <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
2664
2805
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -2666,50 +2807,52 @@
2666
2807
  </fn>
2667
2808
  </xsl:for-each>
2668
2809
  </xsl:variable>
2810
+
2811
+ <xsl:if test="xalan:nodeset($references)//fn">
2669
2812
 
2670
- <!-- current hierarchy is 'figure' element -->
2671
- <xsl:variable name="following_dl_colwidths">
2672
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2673
- <xsl:variable name="html-table">
2674
- <xsl:variable name="doc_ns">
2813
+ <xsl:variable name="key_iso">
2814
+
2815
+ </xsl:variable>
2816
+
2817
+ <!-- current hierarchy is 'figure' element -->
2818
+ <xsl:variable name="following_dl_colwidths">
2819
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2820
+ <xsl:variable name="html-table">
2821
+ <xsl:variable name="doc_ns">
2822
+
2823
+ </xsl:variable>
2824
+ <xsl:variable name="ns">
2825
+ <xsl:choose>
2826
+ <xsl:when test="normalize-space($doc_ns) != ''">
2827
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2828
+ </xsl:when>
2829
+ <xsl:otherwise>
2830
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2831
+ </xsl:otherwise>
2832
+ </xsl:choose>
2833
+ </xsl:variable>
2675
2834
 
2676
- </xsl:variable>
2677
- <xsl:variable name="ns">
2678
- <xsl:choose>
2679
- <xsl:when test="normalize-space($doc_ns) != ''">
2680
- <xsl:value-of select="normalize-space($doc_ns)"/>
2681
- </xsl:when>
2682
- <xsl:otherwise>
2683
- <xsl:value-of select="substring-before(name(/*), '-')"/>
2684
- </xsl:otherwise>
2685
- </xsl:choose>
2686
- </xsl:variable>
2687
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2688
- <!-- <xsl:element name="{$ns}:table"> -->
2689
2835
  <xsl:for-each select="*[local-name() = 'dl'][1]">
2690
2836
  <tbody>
2691
2837
  <xsl:apply-templates mode="dl"/>
2692
2838
  </tbody>
2693
2839
  </xsl:for-each>
2694
- <!-- </xsl:element> -->
2695
- </xsl:variable>
2696
-
2697
- <xsl:call-template name="calculate-column-widths">
2698
- <xsl:with-param name="cols-count" select="2"/>
2699
- <xsl:with-param name="table" select="$html-table"/>
2700
- </xsl:call-template>
2701
-
2702
- </xsl:if>
2703
- </xsl:variable>
2704
-
2705
-
2706
- <xsl:variable name="maxlength_dt">
2707
- <xsl:for-each select="*[local-name() = 'dl'][1]">
2708
- <xsl:call-template name="getMaxLength_dt"/>
2709
- </xsl:for-each>
2710
- </xsl:variable>
2711
-
2712
- <xsl:if test="xalan:nodeset($references)//fn">
2840
+ </xsl:variable>
2841
+
2842
+ <xsl:call-template name="calculate-column-widths">
2843
+ <xsl:with-param name="cols-count" select="2"/>
2844
+ <xsl:with-param name="table" select="$html-table"/>
2845
+ </xsl:call-template>
2846
+
2847
+ </xsl:if>
2848
+ </xsl:variable>
2849
+
2850
+ <xsl:variable name="maxlength_dt">
2851
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
2852
+ <xsl:call-template name="getMaxLength_dt"/>
2853
+ </xsl:for-each>
2854
+ </xsl:variable>
2855
+
2713
2856
  <fo:block>
2714
2857
  <fo:table width="95%" table-layout="fixed">
2715
2858
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -2736,20 +2879,18 @@
2736
2879
  <fo:table-row>
2737
2880
  <fo:table-cell>
2738
2881
  <fo:block>
2739
- <fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
2740
-
2882
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
2741
2883
  <xsl:value-of select="@reference"/>
2742
2884
  </fo:inline>
2743
2885
  </fo:block>
2744
2886
  </fo:table-cell>
2745
2887
  <fo:table-cell>
2746
- <fo:block text-align="justify" margin-bottom="12pt">
2747
-
2888
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
2748
2889
  <xsl:if test="normalize-space($key_iso) = 'true'">
2749
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
2890
+
2891
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
2892
+
2750
2893
  </xsl:if>
2751
-
2752
- <!-- <xsl:apply-templates /> -->
2753
2894
  <xsl:copy-of select="./node()"/>
2754
2895
  </fo:block>
2755
2896
  </fo:table-cell>
@@ -2762,14 +2903,8 @@
2762
2903
  </xsl:if>
2763
2904
 
2764
2905
  </xsl:template><xsl:template match="*[local-name()='fn']">
2765
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2766
- <fo:inline font-size="80%" keep-with-previous.within-line="always">
2767
-
2768
-
2769
-
2770
-
2771
-
2772
-
2906
+ <fo:inline xsl:use-attribute-sets="fn-reference-style">
2907
+
2773
2908
 
2774
2909
 
2775
2910
 
@@ -2793,10 +2928,10 @@
2793
2928
  <xsl:variable name="isDeleted" select="@deleted"/>
2794
2929
  <fo:block-container>
2795
2930
 
2796
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2797
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2798
- </xsl:if>
2799
-
2931
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2932
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2933
+ </xsl:if>
2934
+
2800
2935
 
2801
2936
  <xsl:if test="parent::*[local-name() = 'note']">
2802
2937
  <xsl:attribute name="margin-left">
@@ -2813,11 +2948,11 @@
2813
2948
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
2814
2949
  </xsl:call-template>
2815
2950
 
2816
- <fo:block-container>
2817
-
2818
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2819
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2951
+ <fo:block-container margin-left="0mm">
2952
+
2820
2953
 
2954
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2955
+
2821
2956
 
2822
2957
  <xsl:variable name="parent" select="local-name(..)"/>
2823
2958
 
@@ -2828,23 +2963,19 @@
2828
2963
  <xsl:choose>
2829
2964
  <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2830
2965
 
2831
-
2832
- <fo:block margin-bottom="12pt" text-align="left">
2833
-
2834
- <xsl:variable name="title-where">
2835
-
2966
+ <fo:block margin-bottom="12pt" text-align="left">
2836
2967
 
2837
- <xsl:call-template name="getTitle">
2838
- <xsl:with-param name="name" select="'title-where'"/>
2968
+ <xsl:variable name="title-where">
2969
+ <xsl:call-template name="getLocalizedString">
2970
+ <xsl:with-param name="key">where</xsl:with-param>
2839
2971
  </xsl:call-template>
2840
-
2841
- </xsl:variable>
2842
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2843
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
2844
- <xsl:text/>
2845
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2846
- </fo:block>
2847
-
2972
+ </xsl:variable>
2973
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2974
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
2975
+ <xsl:text/>
2976
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2977
+ </fo:block>
2978
+
2848
2979
  </xsl:when>
2849
2980
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2850
2981
  <fo:block margin-bottom="12pt" text-align="left">
@@ -2853,12 +2984,9 @@
2853
2984
 
2854
2985
 
2855
2986
  <xsl:variable name="title-where">
2856
-
2857
-
2858
- <xsl:call-template name="getTitle">
2859
- <xsl:with-param name="name" select="'title-where'"/>
2860
- </xsl:call-template>
2861
-
2987
+ <xsl:call-template name="getLocalizedString">
2988
+ <xsl:with-param name="key">where</xsl:with-param>
2989
+ </xsl:call-template>
2862
2990
  </xsl:variable>
2863
2991
  <xsl:value-of select="$title-where"/>
2864
2992
  </fo:block>
@@ -2870,12 +2998,9 @@
2870
2998
 
2871
2999
 
2872
3000
  <xsl:variable name="title-key">
2873
-
2874
-
2875
- <xsl:call-template name="getTitle">
2876
- <xsl:with-param name="name" select="'title-key'"/>
2877
- </xsl:call-template>
2878
-
3001
+ <xsl:call-template name="getLocalizedString">
3002
+ <xsl:with-param name="key">key</xsl:with-param>
3003
+ </xsl:call-template>
2879
3004
  </xsl:variable>
2880
3005
  <xsl:value-of select="$title-key"/>
2881
3006
  </fo:block>
@@ -2901,9 +3026,7 @@
2901
3026
  <fo:table width="95%" table-layout="fixed">
2902
3027
 
2903
3028
  <xsl:choose>
2904
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2905
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2906
- </xsl:when>
3029
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
2907
3030
  <xsl:when test="normalize-space($key_iso) = 'true'">
2908
3031
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2909
3032
 
@@ -2924,12 +3047,9 @@
2924
3047
  </xsl:otherwise>
2925
3048
  </xsl:choose>
2926
3049
  </xsl:variable>
2927
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2928
- <!-- <xsl:element name="{$ns}:table"> -->
2929
- <tbody>
2930
- <xsl:apply-templates mode="dl"/>
2931
- </tbody>
2932
- <!-- </xsl:element> -->
3050
+ <tbody>
3051
+ <xsl:apply-templates mode="dl"/>
3052
+ </tbody>
2933
3053
  </xsl:variable>
2934
3054
  <!-- html-table<xsl:copy-of select="$html-table"/> -->
2935
3055
  <xsl:variable name="colwidths">
@@ -3009,8 +3129,6 @@
3009
3129
  </xsl:for-each>
3010
3130
  </xsl:otherwise>
3011
3131
  </xsl:choose>
3012
- <!-- <fo:table-column column-width="15%"/>
3013
- <fo:table-column column-width="85%"/> -->
3014
3132
  </xsl:otherwise>
3015
3133
  </xsl:choose>
3016
3134
  </xsl:template><xsl:template name="getMaxLength_dt">
@@ -3025,12 +3143,6 @@
3025
3143
  </xsl:for-each>
3026
3144
  </xsl:variable>
3027
3145
  <xsl:variable name="maxLength">
3028
- <!-- <xsl:for-each select="*[local-name()='dt']">
3029
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
3030
- <xsl:if test="position() = 1">
3031
- <xsl:value-of select="string-length(normalize-space(.))"/>
3032
- </xsl:if>
3033
- </xsl:for-each> -->
3034
3146
  <xsl:for-each select="xalan:nodeset($lengths)/length">
3035
3147
  <xsl:sort select="." data-type="number" order="descending"/>
3036
3148
  <xsl:if test="position() = 1">
@@ -3056,12 +3168,12 @@
3056
3168
  <xsl:if test="normalize-space($key_iso) = 'true'">
3057
3169
  <xsl:attribute name="margin-top">0</xsl:attribute>
3058
3170
  </xsl:if>
3059
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3171
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3060
3172
  </fo:block>
3061
3173
  </fo:table-cell>
3062
3174
  <fo:table-cell>
3063
3175
  <fo:block>
3064
- <xsl:apply-templates/>
3176
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3065
3177
  </fo:block>
3066
3178
  </fo:table-cell>
3067
3179
  </fo:table-row>
@@ -3072,83 +3184,49 @@
3072
3184
  </td>
3073
3185
  <td>
3074
3186
 
3075
-
3076
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3077
-
3187
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
3188
+ <xsl:with-param name="process">true</xsl:with-param>
3189
+ </xsl:apply-templates>
3190
+
3078
3191
  </td>
3079
3192
  </tr>
3080
3193
 
3081
3194
  </xsl:template><xsl:template match="*[local-name()='dt']">
3082
3195
  <xsl:param name="key_iso"/>
3083
3196
 
3084
- <fo:table-row>
3085
-
3086
-
3197
+ <fo:table-row xsl:use-attribute-sets="dt-row-style">
3087
3198
  <fo:table-cell>
3088
3199
 
3089
- <fo:block margin-top="6pt">
3200
+ <fo:block xsl:use-attribute-sets="dt-style">
3090
3201
  <xsl:copy-of select="@id"/>
3091
3202
 
3092
-
3093
3203
  <xsl:if test="normalize-space($key_iso) = 'true'">
3094
3204
  <xsl:attribute name="margin-top">0</xsl:attribute>
3095
-
3096
3205
  </xsl:if>
3097
3206
 
3098
3207
 
3099
3208
 
3100
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
3101
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3102
-
3103
-
3104
-
3105
-
3106
-
3107
3209
  <xsl:apply-templates/>
3108
- <!-- <xsl:if test="$namespace = 'gb'">
3109
- <xsl:if test="ancestor::*[local-name()='formula']">
3110
- <xsl:text>—</xsl:text>
3111
- </xsl:if>
3112
- </xsl:if> -->
3113
3210
  </fo:block>
3114
3211
  </fo:table-cell>
3115
3212
  <fo:table-cell>
3116
3213
  <fo:block>
3117
3214
 
3118
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3119
- <xsl:if test="local-name(*[1]) != 'stem'">
3120
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3121
- </xsl:if>
3122
- </xsl:if> -->
3123
-
3124
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3125
-
3215
+
3216
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
3217
+ <xsl:with-param name="process">true</xsl:with-param>
3218
+ </xsl:apply-templates>
3126
3219
  </fo:block>
3127
3220
  </fo:table-cell>
3128
3221
  </fo:table-row>
3129
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3130
- <xsl:if test="local-name(*[1]) = 'stem'">
3131
- <fo:table-row>
3132
- <fo:table-cell>
3133
- <fo:block margin-top="6pt">
3134
- <xsl:if test="normalize-space($key_iso) = 'true'">
3135
- <xsl:attribute name="margin-top">0</xsl:attribute>
3136
- </xsl:if>
3137
- <xsl:text>&#xA0;</xsl:text>
3138
- </fo:block>
3139
- </fo:table-cell>
3140
- <fo:table-cell>
3141
- <fo:block>
3142
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3143
- </fo:block>
3144
- </fo:table-cell>
3145
- </fo:table-row>
3146
- </xsl:if>
3147
- </xsl:if> -->
3148
3222
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
3149
3223
  <xsl:apply-templates/>
3150
- </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
3151
- <xsl:apply-templates/>
3224
+ </xsl:template><xsl:template match="*[local-name()='dd']">
3225
+ <xsl:param name="process">false</xsl:param>
3226
+ <xsl:if test="$process = 'true'">
3227
+ <xsl:apply-templates select="@language"/>
3228
+ <xsl:apply-templates/>
3229
+ </xsl:if>
3152
3230
  </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
3153
3231
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
3154
3232
  </xsl:template><xsl:template match="*[local-name()='em']">
@@ -3172,6 +3250,7 @@
3172
3250
  </fo:inline>
3173
3251
  </xsl:template><xsl:template match="*[local-name()='tt']">
3174
3252
  <fo:inline xsl:use-attribute-sets="tt-style">
3253
+
3175
3254
  <xsl:variable name="_font-size">
3176
3255
 
3177
3256
 
@@ -3208,7 +3287,22 @@
3208
3287
  <xsl:apply-templates/>
3209
3288
  </fo:inline>
3210
3289
  </xsl:template><xsl:template match="*[local-name()='add']">
3290
+ <xsl:param name="skip">true</xsl:param>
3211
3291
  <xsl:choose>
3292
+ <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
3293
+ <xsl:choose>
3294
+ <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>
3295
+ <xsl:otherwise>
3296
+ <fo:inline>
3297
+ <xsl:call-template name="insertTag">
3298
+ <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
3299
+ <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
3300
+ <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
3301
+ </xsl:call-template>
3302
+ </fo:inline>
3303
+ </xsl:otherwise>
3304
+ </xsl:choose>
3305
+ </xsl:when>
3212
3306
  <xsl:when test="@amendment">
3213
3307
  <fo:inline>
3214
3308
  <xsl:call-template name="insertTag">
@@ -3243,7 +3337,6 @@
3243
3337
  </fo:inline>
3244
3338
  </xsl:otherwise>
3245
3339
  </xsl:choose>
3246
-
3247
3340
  </xsl:template><xsl:template name="insertTag">
3248
3341
  <xsl:param name="type"/>
3249
3342
  <xsl:param name="kind"/>
@@ -3251,22 +3344,20 @@
3251
3344
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
3252
3345
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
3253
3346
  <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
3254
- <!-- <xsl:attribute name="width">7mm</xsl:attribute>
3255
- <xsl:attribute name="content-height">100%</xsl:attribute> -->
3256
3347
  <xsl:attribute name="height">5mm</xsl:attribute>
3257
3348
  <xsl:attribute name="content-width">100%</xsl:attribute>
3258
3349
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
3259
3350
  <xsl:attribute name="scaling">uniform</xsl:attribute>
3260
3351
  <svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
3261
3352
  <g>
3262
- <xsl:if test="$type = 'closing'">
3353
+ <xsl:if test="$type = 'closing' or $type = 'end'">
3263
3354
  <xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
3264
3355
  </xsl:if>
3265
3356
  <polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
3266
3357
  <line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
3267
3358
  </g>
3268
3359
  <text font-family="Arial" x="15" y="57" font-size="40pt">
3269
- <xsl:if test="$type = 'closing'">
3360
+ <xsl:if test="$type = 'closing' or $type = 'end'">
3270
3361
  <xsl:attribute name="x">25</xsl:attribute>
3271
3362
  </xsl:if>
3272
3363
  <xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
@@ -3310,7 +3401,11 @@
3310
3401
  <xsl:with-param name="text" select="substring($text,2)"/>
3311
3402
  </xsl:call-template>
3312
3403
  </xsl:if>
3313
- </xsl:template><xsl:template name="tokenize">
3404
+ </xsl:template><xsl:template match="*[local-name() = 'pagebreak']">
3405
+ <fo:block break-after="page"/>
3406
+ <fo:block> </fo:block>
3407
+ <fo:block break-after="page"/>
3408
+ </xsl:template><xsl:template name="tokenize">
3314
3409
  <xsl:param name="text"/>
3315
3410
  <xsl:param name="separator" select="' '"/>
3316
3411
  <xsl:choose>
@@ -3470,14 +3565,6 @@
3470
3565
 
3471
3566
  <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
3472
3567
 
3473
- <!-- <xsl:choose>
3474
- <xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
3475
-
3476
- </xsl:when>
3477
- <xsl:otherwise>
3478
- <xsl:copy-of select="current()"/>
3479
- </xsl:otherwise>
3480
- </xsl:choose> -->
3481
3568
  </xsl:variable>
3482
3569
  <xsl:copy-of select="$simple-table"/>
3483
3570
  </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
@@ -3596,8 +3683,6 @@
3596
3683
  <xsl:choose>
3597
3684
  <xsl:when test="contains($str2, ' ')">
3598
3685
  <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
3599
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
3600
- <xsl:value-of select="substring($substr, 2)"/> -->
3601
3686
  <xsl:call-template name="capitalize">
3602
3687
  <xsl:with-param name="str" select="$substr"/>
3603
3688
  </xsl:call-template>
@@ -3607,8 +3692,6 @@
3607
3692
  </xsl:call-template>
3608
3693
  </xsl:when>
3609
3694
  <xsl:otherwise>
3610
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
3611
- <xsl:value-of select="substring($str2, 2)"/> -->
3612
3695
  <xsl:call-template name="capitalize">
3613
3696
  <xsl:with-param name="str" select="$str2"/>
3614
3697
  </xsl:call-template>
@@ -3636,6 +3719,7 @@
3636
3719
  <xsl:apply-templates select="." mode="mathml"/>
3637
3720
  </xsl:variable>
3638
3721
  <fo:instream-foreign-object fox:alt-text="Math">
3722
+
3639
3723
 
3640
3724
 
3641
3725
  <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
@@ -3667,7 +3751,7 @@
3667
3751
  </xsl:attribute>
3668
3752
 
3669
3753
 
3670
- <!-- <xsl:copy-of select="."/> -->
3754
+
3671
3755
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
3672
3756
  </fo:instream-foreign-object>
3673
3757
  </fo:inline>
@@ -3726,6 +3810,10 @@
3726
3810
 
3727
3811
 
3728
3812
 
3813
+
3814
+
3815
+
3816
+
3729
3817
  <xsl:choose>
3730
3818
  <xsl:when test="$target_text = ''">
3731
3819
  <xsl:apply-templates/>
@@ -3749,19 +3837,19 @@
3749
3837
  </fo:inline>
3750
3838
  </xsl:template><xsl:template match="*[local-name()='appendix']">
3751
3839
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
3752
- <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
3840
+ <xsl:apply-templates select="*[local-name()='title']"/>
3753
3841
  </fo:block>
3754
- <xsl:apply-templates/>
3755
- </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
3842
+ <xsl:apply-templates select="node()[not(local-name()='title')]"/>
3843
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" priority="2">
3756
3844
  <xsl:variable name="level">
3757
3845
  <xsl:call-template name="getLevel"/>
3758
3846
  </xsl:variable>
3759
3847
  <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
3760
3848
  </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
3761
3849
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
3762
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3850
+ <xsl:apply-templates select="*[local-name()='name']"/>
3763
3851
  </fo:block>
3764
- <xsl:apply-templates/>
3852
+ <xsl:apply-templates select="node()[not(local-name()='name')]"/>
3765
3853
  </xsl:template><xsl:template match="*[local-name() = 'callout']">
3766
3854
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
3767
3855
  </xsl:template><xsl:template match="*[local-name() = 'annotation']">
@@ -3783,7 +3871,6 @@
3783
3871
  </fo:inline>
3784
3872
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
3785
3873
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
3786
-
3787
3874
  <xsl:apply-templates/>
3788
3875
  </fo:basic-link>
3789
3876
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -3811,22 +3898,26 @@
3811
3898
  <fo:inline>
3812
3899
  <xsl:apply-templates/>
3813
3900
  </fo:inline>
3814
- </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
3901
+ </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 -->
3815
3902
  <xsl:if test="normalize-space() != ''">
3816
3903
  <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
3817
3904
  </xsl:if>
3818
3905
  </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
3819
3906
 
3820
3907
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
3908
+
3909
+
3821
3910
 
3822
3911
 
3823
3912
 
3824
3913
 
3825
3914
 
3915
+
3916
+
3917
+
3918
+
3826
3919
  <fo:block-container margin-left="0mm">
3827
-
3828
-
3829
-
3920
+
3830
3921
 
3831
3922
 
3832
3923
 
@@ -3834,30 +3925,41 @@
3834
3925
  <xsl:attribute name="font-size">12pt</xsl:attribute>
3835
3926
  </xsl:if>
3836
3927
 
3837
-
3928
+
3838
3929
 
3839
- <fo:block>
3840
-
3841
-
3842
-
3843
-
3844
-
3930
+ <fo:block>
3931
+
3932
+
3845
3933
 
3846
- <fo:inline xsl:use-attribute-sets="note-name-style">
3847
3934
 
3848
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3849
- </fo:inline>
3850
- <xsl:apply-templates/>
3851
- </fo:block>
3852
-
3853
-
3935
+
3936
+
3937
+
3938
+ <fo:inline xsl:use-attribute-sets="note-name-style">
3939
+
3940
+
3941
+
3942
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
3943
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
3944
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
3945
+ <xsl:with-param name="skip">false</xsl:with-param>
3946
+ </xsl:apply-templates>
3947
+ </xsl:if>
3948
+
3949
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3950
+
3951
+ </fo:inline>
3952
+
3953
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3954
+ </fo:block>
3955
+
3854
3956
  </fo:block-container>
3855
3957
  </fo:block-container>
3856
3958
 
3857
3959
  </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
3858
3960
  <xsl:variable name="num"><xsl:number/></xsl:variable>
3859
3961
  <xsl:choose>
3860
- <xsl:when test="$num = 1">
3962
+ <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
3861
3963
  <fo:inline xsl:use-attribute-sets="note-p-style">
3862
3964
  <xsl:apply-templates/>
3863
3965
  </fo:inline>
@@ -3872,12 +3974,16 @@
3872
3974
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3873
3975
 
3874
3976
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
3977
+
3978
+
3979
+
3980
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3875
3981
 
3876
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3877
3982
  </fo:inline>
3878
- <xsl:apply-templates/>
3983
+
3984
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3879
3985
  </fo:block>
3880
- </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">
3986
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']">
3881
3987
  <xsl:param name="sfx"/>
3882
3988
  <xsl:variable name="suffix">
3883
3989
  <xsl:choose>
@@ -3894,7 +4000,7 @@
3894
4000
  <xsl:apply-templates/>
3895
4001
  <xsl:value-of select="$suffix"/>
3896
4002
  </xsl:if>
3897
- </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
4003
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']">
3898
4004
  <xsl:param name="sfx"/>
3899
4005
  <xsl:variable name="suffix">
3900
4006
  <xsl:choose>
@@ -3919,25 +4025,23 @@
3919
4025
  <xsl:apply-templates/>
3920
4026
  </fo:block>
3921
4027
  </xsl:template><xsl:template match="*[local-name() = 'term']">
3922
- <!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
3923
4028
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
3924
4029
 
3925
4030
 
4031
+
4032
+
3926
4033
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
3927
4034
 
3928
4035
  </xsl:if>
3929
- <xsl:apply-templates/>
4036
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3930
4037
  </fo:block>
3931
- </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
4038
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
3932
4039
  <xsl:if test="normalize-space() != ''">
3933
4040
  <xsl:variable name="level">
3934
4041
  <xsl:call-template name="getLevelTermName"/>
3935
4042
  </xsl:variable>
3936
4043
  <fo:inline role="H{$level}">
3937
4044
  <xsl:apply-templates/>
3938
- <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
3939
- <xsl:text>.</xsl:text>
3940
- </xsl:if> -->
3941
4045
  </fo:inline>
3942
4046
  </xsl:if>
3943
4047
  </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
@@ -3950,9 +4054,10 @@
3950
4054
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3951
4055
  </xsl:call-template>
3952
4056
 
3953
- <fo:block>
3954
-
3955
- <xsl:apply-templates/>
4057
+
4058
+
4059
+ <fo:block xsl:use-attribute-sets="figure-style">
4060
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3956
4061
  </fo:block>
3957
4062
  <xsl:call-template name="fn_display_figure"/>
3958
4063
  <xsl:for-each select="*[local-name() = 'note']">
@@ -3960,14 +4065,15 @@
3960
4065
  </xsl:for-each>
3961
4066
 
3962
4067
 
3963
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4068
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
4069
+
3964
4070
 
3965
4071
  </fo:block-container>
3966
4072
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
3967
4073
  <fo:block id="{@id}">
3968
- <xsl:apply-templates/>
4074
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3969
4075
  </fo:block>
3970
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4076
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3971
4077
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
3972
4078
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
3973
4079
  <xsl:apply-templates/>
@@ -4074,9 +4180,7 @@
4074
4180
  <xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
4075
4181
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
4076
4182
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
4077
- <!-- width=<xsl:value-of select="$width"/> -->
4078
4183
  <xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
4079
- <!-- height=<xsl:value-of select="$height"/> -->
4080
4184
  <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">
4081
4185
  <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
4082
4186
  <xsl:call-template name="svg_cross">
@@ -4346,7 +4450,7 @@
4346
4450
  </fo:basic-link>
4347
4451
  </fo:block>
4348
4452
  </fo:block-container>
4349
- </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">
4453
+ </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">
4350
4454
  <xsl:apply-templates mode="contents"/>
4351
4455
  <xsl:text> </xsl:text>
4352
4456
  </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">
@@ -4358,11 +4462,72 @@
4358
4462
  <xsl:value-of select="."/>
4359
4463
  </xsl:template><xsl:template match="node()" mode="contents">
4360
4464
  <xsl:apply-templates mode="contents"/>
4465
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" mode="contents">
4466
+ <xsl:variable name="level">
4467
+ <xsl:call-template name="getLevel">
4468
+ <xsl:with-param name="depth" select="@depth"/>
4469
+ </xsl:call-template>
4470
+ </xsl:variable>
4471
+
4472
+ <xsl:variable name="section">
4473
+ <xsl:choose>
4474
+ <xsl:when test="@type = 'section-title'"/>
4475
+ <xsl:otherwise>
4476
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4477
+ </xsl:otherwise>
4478
+ </xsl:choose>
4479
+ </xsl:variable>
4480
+
4481
+ <xsl:variable name="type"><xsl:value-of select="@type"/></xsl:variable>
4482
+
4483
+ <xsl:variable name="display">
4484
+ <xsl:choose>
4485
+ <xsl:when test="normalize-space(@id) = ''">false</xsl:when>
4486
+ <xsl:when test="$level &lt;= $toc_level">true</xsl:when>
4487
+ <xsl:otherwise>false</xsl:otherwise>
4488
+ </xsl:choose>
4489
+ </xsl:variable>
4490
+
4491
+ <xsl:variable name="skip">false</xsl:variable>
4492
+
4493
+ <xsl:if test="$skip = 'false'">
4494
+
4495
+ <xsl:variable name="title">
4496
+ <xsl:choose>
4497
+ <xsl:when test="*[local-name() = 'tab']">
4498
+ <xsl:choose>
4499
+ <xsl:when test="@type = 'section-title'">
4500
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4501
+ <xsl:text>: </xsl:text>
4502
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
4503
+ </xsl:when>
4504
+ <xsl:otherwise>
4505
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
4506
+ </xsl:otherwise>
4507
+ </xsl:choose>
4508
+ </xsl:when>
4509
+ <xsl:otherwise>
4510
+ <xsl:copy-of select="node()"/>
4511
+ </xsl:otherwise>
4512
+ </xsl:choose>
4513
+ </xsl:variable>
4514
+
4515
+ <xsl:variable name="root">
4516
+ <xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
4517
+ <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
4518
+ </xsl:variable>
4519
+
4520
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
4521
+ <title>
4522
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
4523
+ </title>
4524
+ </item>
4525
+ </xsl:if>
4361
4526
  </xsl:template><xsl:template match="node()" mode="bookmarks">
4362
4527
  <xsl:apply-templates mode="bookmarks"/>
4363
4528
  </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
4364
4529
  <xsl:apply-templates select="."/>
4365
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4530
+ </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">
4366
4531
  <xsl:apply-templates mode="bookmarks"/>
4367
4532
  </xsl:template><xsl:template name="addBookmarks">
4368
4533
  <xsl:param name="contents"/>
@@ -4452,8 +4617,6 @@
4452
4617
 
4453
4618
 
4454
4619
 
4455
-
4456
-
4457
4620
  </fo:bookmark-tree>
4458
4621
  </xsl:if>
4459
4622
  </xsl:template><xsl:template name="insertFigureBookmarks">
@@ -4524,7 +4687,7 @@
4524
4687
  <xsl:apply-templates mode="bookmark"/>
4525
4688
  </xsl:otherwise>
4526
4689
  </xsl:choose>
4527
- </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">
4690
+ </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']">
4528
4691
  <xsl:if test="normalize-space() != ''">
4529
4692
  <fo:block xsl:use-attribute-sets="figure-name-style">
4530
4693
 
@@ -4533,16 +4696,13 @@
4533
4696
  </fo:block>
4534
4697
  </xsl:if>
4535
4698
  </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">
4536
- <xsl:apply-templates mode="contents_item"/>
4699
+ <xsl:param name="mode">bookmarks</xsl:param>
4700
+ <xsl:apply-templates mode="contents_item">
4701
+ <xsl:with-param name="mode" select="$mode"/>
4702
+ </xsl:apply-templates>
4537
4703
  <!-- <xsl:text> </xsl:text> -->
4538
4704
  </xsl:template><xsl:template name="getSection">
4539
4705
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4540
- <!--
4541
- <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
4542
- <xsl:value-of select="."/>
4543
- </xsl:for-each>
4544
- -->
4545
-
4546
4706
  </xsl:template><xsl:template name="getName">
4547
4707
  <xsl:choose>
4548
4708
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -4606,9 +4766,26 @@
4606
4766
  <xsl:copy-of select="."/>
4607
4767
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
4608
4768
  <xsl:text> </xsl:text>
4769
+ </xsl:template><xsl:template match="*[local-name() = 'name']" mode="contents_item">
4770
+ <xsl:param name="mode">bookmarks</xsl:param>
4771
+ <xsl:apply-templates mode="contents_item">
4772
+ <xsl:with-param name="mode" select="$mode"/>
4773
+ </xsl:apply-templates>
4774
+ </xsl:template><xsl:template match="*[local-name() = 'add']" mode="contents_item">
4775
+ <xsl:param name="mode">bookmarks</xsl:param>
4776
+ <xsl:choose>
4777
+ <xsl:when test="starts-with(text(), $ace_tag)">
4778
+ <xsl:if test="$mode = 'contents'">
4779
+ <xsl:copy>
4780
+ <xsl:apply-templates mode="contents_item"/>
4781
+ </xsl:copy>
4782
+ </xsl:if>
4783
+ </xsl:when>
4784
+ <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
4785
+ </xsl:choose>
4609
4786
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
4610
4787
 
4611
- <fo:block-container margin-left="0mm">
4788
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
4612
4789
  <xsl:copy-of select="@id"/>
4613
4790
 
4614
4791
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -4645,6 +4822,7 @@
4645
4822
 
4646
4823
 
4647
4824
  </xsl:variable>
4825
+
4648
4826
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
4649
4827
  <xsl:if test="$font-size != ''">
4650
4828
  <xsl:attribute name="font-size">
@@ -4661,11 +4839,11 @@
4661
4839
 
4662
4840
 
4663
4841
 
4664
- <xsl:apply-templates/>
4842
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4665
4843
  </fo:block>
4666
4844
 
4667
4845
 
4668
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4846
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
4669
4847
 
4670
4848
 
4671
4849
 
@@ -4679,7 +4857,7 @@
4679
4857
  <xsl:call-template name="add-zero-spaces-java">
4680
4858
  <xsl:with-param name="text" select="$text"/>
4681
4859
  </xsl:call-template>
4682
- </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
4860
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']">
4683
4861
  <xsl:if test="normalize-space() != ''">
4684
4862
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4685
4863
  <xsl:apply-templates/>
@@ -4687,10 +4865,10 @@
4687
4865
  </xsl:if>
4688
4866
  </xsl:template><xsl:template match="*[local-name() = 'permission']">
4689
4867
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
4690
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4691
- <xsl:apply-templates/>
4868
+ <xsl:apply-templates select="*[local-name()='name']"/>
4869
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4692
4870
  </fo:block>
4693
- </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
4871
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
4694
4872
  <xsl:if test="normalize-space() != ''">
4695
4873
  <fo:block xsl:use-attribute-sets="permission-name-style">
4696
4874
  <xsl:apply-templates/>
@@ -4703,13 +4881,13 @@
4703
4881
  </fo:block>
4704
4882
  </xsl:template><xsl:template match="*[local-name() = 'requirement']">
4705
4883
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
4706
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4707
- <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
4708
- <xsl:apply-templates select="@obligation" mode="presentation"/>
4709
- <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
4710
- <xsl:apply-templates/>
4884
+ <xsl:apply-templates select="*[local-name()='name']"/>
4885
+ <xsl:apply-templates select="*[local-name()='label']"/>
4886
+ <xsl:apply-templates select="@obligation"/>
4887
+ <xsl:apply-templates select="*[local-name()='subject']"/>
4888
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'label') and not(local-name() = 'subject')]"/>
4711
4889
  </fo:block>
4712
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
4890
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
4713
4891
  <xsl:if test="normalize-space() != ''">
4714
4892
  <fo:block xsl:use-attribute-sets="requirement-name-style">
4715
4893
 
@@ -4717,20 +4895,24 @@
4717
4895
 
4718
4896
  </fo:block>
4719
4897
  </xsl:if>
4720
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
4898
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']">
4721
4899
  <fo:block xsl:use-attribute-sets="requirement-label-style">
4722
4900
  <xsl:apply-templates/>
4723
4901
  </fo:block>
4724
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
4902
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation">
4725
4903
  <fo:block>
4726
4904
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
4727
4905
  </fo:block>
4906
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2">
4907
+ <fo:block xsl:use-attribute-sets="subject-style">
4908
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4909
+ </fo:block>
4728
4910
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
4729
4911
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
4730
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4731
- <xsl:apply-templates/>
4912
+ <xsl:apply-templates select="*[local-name()='name']"/>
4913
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4732
4914
  </fo:block>
4733
- </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
4915
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
4734
4916
  <xsl:if test="normalize-space() != ''">
4735
4917
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
4736
4918
  <xsl:apply-templates/>
@@ -4741,10 +4923,6 @@
4741
4923
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
4742
4924
  <xsl:apply-templates/>
4743
4925
  </fo:block>
4744
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
4745
- <fo:block xsl:use-attribute-sets="subject-style">
4746
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4747
- </fo:block>
4748
4926
  </xsl:template><xsl:template match="*[local-name() = 'subject']">
4749
4927
  <fo:block xsl:use-attribute-sets="subject-style">
4750
4928
  <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
@@ -4788,8 +4966,6 @@
4788
4966
  </xsl:variable>
4789
4967
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
4790
4968
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
4791
- <!-- <fo:table-column column-width="35mm"/>
4792
- <fo:table-column column-width="115mm"/> -->
4793
4969
  <fo:table-column column-width="30%"/>
4794
4970
  <fo:table-column column-width="70%"/>
4795
4971
  </xsl:if>
@@ -4799,7 +4975,7 @@
4799
4975
  <xsl:if test=".//*[local-name() = 'fn']">
4800
4976
  <xsl:for-each select="*[local-name() = 'tbody']">
4801
4977
  <fo:block font-size="90%" border-bottom="1pt solid black">
4802
- <xsl:call-template name="fn_display"/>
4978
+ <xsl:call-template name="table_fn_display"/>
4803
4979
  </fo:block>
4804
4980
  </xsl:for-each>
4805
4981
  </xsl:if>
@@ -4816,7 +4992,6 @@
4816
4992
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
4817
4993
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
4818
4994
  <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
4819
- <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
4820
4995
  <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
4821
4996
  </xsl:if>
4822
4997
  <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
@@ -4829,34 +5004,11 @@
4829
5004
  </fo:table-row>
4830
5005
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
4831
5006
  <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
4832
- <xsl:attribute name="text-align">
4833
- <xsl:choose>
4834
- <xsl:when test="@align">
4835
- <xsl:value-of select="@align"/>
4836
- </xsl:when>
4837
- <xsl:otherwise>left</xsl:otherwise>
4838
- </xsl:choose>
4839
- </xsl:attribute>
4840
- <xsl:if test="@colspan">
4841
- <xsl:attribute name="number-columns-spanned">
4842
- <xsl:value-of select="@colspan"/>
4843
- </xsl:attribute>
4844
- </xsl:if>
4845
- <xsl:if test="@rowspan">
4846
- <xsl:attribute name="number-rows-spanned">
4847
- <xsl:value-of select="@rowspan"/>
4848
- </xsl:attribute>
4849
- </xsl:if>
4850
- <xsl:call-template name="display-align"/>
5007
+ <xsl:call-template name="setTextAlignment">
5008
+ <xsl:with-param name="default">left</xsl:with-param>
5009
+ </xsl:call-template>
4851
5010
 
4852
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
4853
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4854
- <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
4855
- </xsl:if>
4856
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
4857
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4858
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
4859
- </xsl:if> -->
5011
+ <xsl:call-template name="setTableCellAttributes"/>
4860
5012
 
4861
5013
  <fo:block>
4862
5014
  <xsl:apply-templates/>
@@ -4868,37 +5020,15 @@
4868
5020
  <xsl:attribute name="padding">0mm</xsl:attribute>
4869
5021
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
4870
5022
  </xsl:if>
4871
- <xsl:attribute name="text-align">
4872
- <xsl:choose>
4873
- <xsl:when test="@align">
4874
- <xsl:value-of select="@align"/>
4875
- </xsl:when>
4876
- <xsl:otherwise>left</xsl:otherwise>
4877
- </xsl:choose>
4878
- </xsl:attribute>
5023
+ <xsl:call-template name="setTextAlignment">
5024
+ <xsl:with-param name="default">left</xsl:with-param>
5025
+ </xsl:call-template>
5026
+
4879
5027
  <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
4880
5028
  <xsl:attribute name="font-weight">bold</xsl:attribute>
4881
5029
  </xsl:if>
4882
- <xsl:if test="@colspan">
4883
- <xsl:attribute name="number-columns-spanned">
4884
- <xsl:value-of select="@colspan"/>
4885
- </xsl:attribute>
4886
- </xsl:if>
4887
- <xsl:if test="@rowspan">
4888
- <xsl:attribute name="number-rows-spanned">
4889
- <xsl:value-of select="@rowspan"/>
4890
- </xsl:attribute>
4891
- </xsl:if>
4892
- <xsl:call-template name="display-align"/>
4893
5030
 
4894
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
4895
- <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
4896
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
4897
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
4898
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
4899
- </xsl:if>
4900
- </xsl:if> -->
4901
- <!-- 2nd line and below -->
5031
+ <xsl:call-template name="setTableCellAttributes"/>
4902
5032
 
4903
5033
  <fo:block>
4904
5034
  <xsl:apply-templates/>
@@ -4910,15 +5040,15 @@
4910
5040
  <xsl:apply-templates/>
4911
5041
  </fo:block>
4912
5042
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
4913
- <fo:block> <!-- margin-bottom="10pt" -->
5043
+ <fo:block>
4914
5044
  <xsl:apply-templates/>
4915
5045
  </fo:block>
4916
5046
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
4917
5047
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
4918
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4919
- <xsl:apply-templates/>
5048
+ <xsl:apply-templates select="*[local-name()='name']"/>
5049
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4920
5050
  </fo:block>
4921
- </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
5051
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
4922
5052
  <xsl:if test="normalize-space() != ''">
4923
5053
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
4924
5054
  <xsl:apply-templates/>
@@ -4942,42 +5072,46 @@
4942
5072
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4943
5073
 
4944
5074
 
4945
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4946
-
4947
- <xsl:variable name="element">
4948
- block
4949
-
4950
- <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
5075
+ <xsl:variable name="fo_element">
5076
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
5077
+ block
4951
5078
  </xsl:variable>
4952
5079
 
5080
+ <!-- display 'EXAMPLE' -->
5081
+ <xsl:apply-templates select="*[local-name()='name']">
5082
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5083
+ </xsl:apply-templates>
5084
+
4953
5085
  <xsl:choose>
4954
- <xsl:when test="contains(normalize-space($element), 'block')">
4955
- <fo:block xsl:use-attribute-sets="example-body-style">
4956
- <xsl:apply-templates/>
4957
- </fo:block>
5086
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
5087
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
5088
+ <fo:block-container margin-left="0mm" margin-right="0mm">
5089
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
5090
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5091
+ </xsl:apply-templates>
5092
+ </fo:block-container>
5093
+ </fo:block-container>
4958
5094
  </xsl:when>
4959
5095
  <xsl:otherwise>
4960
5096
  <fo:inline>
4961
- <xsl:apply-templates/>
5097
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
5098
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5099
+ </xsl:apply-templates>
4962
5100
  </fo:inline>
4963
5101
  </xsl:otherwise>
4964
5102
  </xsl:choose>
4965
5103
 
4966
5104
  </fo:block>
4967
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
4968
-
4969
- <xsl:variable name="element">
4970
- block
4971
-
4972
- <xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
4973
- </xsl:variable>
5105
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
5106
+ <xsl:param name="fo_element">block</xsl:param>
5107
+
4974
5108
  <xsl:choose>
4975
5109
  <xsl:when test="ancestor::*[local-name() = 'appendix']">
4976
5110
  <fo:inline>
4977
5111
  <xsl:apply-templates/>
4978
5112
  </fo:inline>
4979
5113
  </xsl:when>
4980
- <xsl:when test="contains(normalize-space($element), 'block')">
5114
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
4981
5115
  <fo:block xsl:use-attribute-sets="example-name-style">
4982
5116
  <xsl:apply-templates/>
4983
5117
  </fo:block>
@@ -4990,14 +5124,15 @@
4990
5124
  </xsl:choose>
4991
5125
 
4992
5126
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
5127
+ <xsl:param name="fo_element">block</xsl:param>
5128
+
4993
5129
  <xsl:variable name="num"><xsl:number/></xsl:variable>
4994
5130
  <xsl:variable name="element">
4995
- block
4996
-
4997
5131
 
5132
+ <xsl:value-of select="$fo_element"/>
4998
5133
  </xsl:variable>
4999
5134
  <xsl:choose>
5000
- <xsl:when test="normalize-space($element) = 'block'">
5135
+ <xsl:when test="starts-with(normalize-space($element), 'block')">
5001
5136
  <fo:block xsl:use-attribute-sets="example-p-style">
5002
5137
 
5003
5138
  <xsl:apply-templates/>
@@ -5012,6 +5147,8 @@
5012
5147
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
5013
5148
  <fo:block xsl:use-attribute-sets="termsource-style">
5014
5149
 
5150
+
5151
+
5015
5152
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
5016
5153
  <xsl:variable name="termsource_text">
5017
5154
  <xsl:apply-templates/>
@@ -5049,9 +5186,7 @@
5049
5186
  <xsl:value-of select="."/>
5050
5187
  </xsl:if>
5051
5188
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
5052
- <fo:inline>
5053
-
5054
-
5189
+ <fo:inline xsl:use-attribute-sets="termsource-text-style">
5055
5190
  <xsl:value-of select="."/>
5056
5191
  </fo:inline>
5057
5192
  </xsl:template><xsl:template match="*[local-name() = 'origin']">
@@ -5065,12 +5200,9 @@
5065
5200
  </fo:basic-link>
5066
5201
  </xsl:template><xsl:template match="*[local-name() = 'modification']">
5067
5202
  <xsl:variable name="title-modified">
5068
-
5069
-
5070
- <xsl:call-template name="getTitle">
5071
- <xsl:with-param name="name" select="'title-modified'"/>
5072
- </xsl:call-template>
5073
-
5203
+ <xsl:call-template name="getLocalizedString">
5204
+ <xsl:with-param name="key">modified</xsl:with-param>
5205
+ </xsl:call-template>
5074
5206
  </xsl:variable>
5075
5207
 
5076
5208
  <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
@@ -5097,7 +5229,6 @@
5097
5229
  <fo:block-container margin-left="0mm">
5098
5230
 
5099
5231
  <fo:block xsl:use-attribute-sets="quote-style">
5100
- <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
5101
5232
 
5102
5233
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
5103
5234
  </fo:block>
@@ -5140,15 +5271,13 @@
5140
5271
  </xsl:variable>
5141
5272
 
5142
5273
  <xsl:choose>
5143
- <xsl:when test="normalize-space($bibitemid) != ''">
5274
+ <xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
5144
5275
  <fo:inline xsl:use-attribute-sets="eref-style">
5145
5276
  <xsl:if test="@type = 'footnote'">
5146
-
5147
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5148
- <xsl:attribute name="font-size">80%</xsl:attribute>
5149
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5150
- <xsl:attribute name="vertical-align">super</xsl:attribute>
5151
-
5277
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5278
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5279
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5280
+ <xsl:attribute name="font-size">80%</xsl:attribute>
5152
5281
 
5153
5282
  </xsl:if>
5154
5283
 
@@ -5168,7 +5297,6 @@
5168
5297
 
5169
5298
 
5170
5299
 
5171
-
5172
5300
  </xsl:if>
5173
5301
 
5174
5302
 
@@ -5227,8 +5355,6 @@
5227
5355
  </xsl:choose>
5228
5356
  </xsl:variable>
5229
5357
 
5230
- <!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
5231
-
5232
5358
  <xsl:choose>
5233
5359
  <xsl:when test="$lang = 'zh'">
5234
5360
  <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -5263,12 +5389,9 @@
5263
5389
  </fo:block>
5264
5390
  </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
5265
5391
  <xsl:variable name="title-deprecated">
5266
-
5267
- <xsl:call-template name="getLocalizedString">
5268
- <xsl:with-param name="key">deprecated</xsl:with-param>
5269
- </xsl:call-template>
5270
-
5271
-
5392
+ <xsl:call-template name="getLocalizedString">
5393
+ <xsl:with-param name="key">deprecated</xsl:with-param>
5394
+ </xsl:call-template>
5272
5395
  </xsl:variable>
5273
5396
  <fo:block xsl:use-attribute-sets="deprecates-style">
5274
5397
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
@@ -5277,6 +5400,8 @@
5277
5400
  <xsl:if test="*[local-name() = 'strong']">
5278
5401
  <xsl:attribute name="font-weight">normal</xsl:attribute>
5279
5402
  </xsl:if>
5403
+ </xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
5404
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
5280
5405
  </xsl:template><xsl:template match="*[local-name() = 'definition']">
5281
5406
  <fo:block xsl:use-attribute-sets="definition-style">
5282
5407
  <xsl:apply-templates/>
@@ -5285,7 +5410,6 @@
5285
5410
  <xsl:apply-templates/>
5286
5411
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
5287
5412
  <fo:inline> <xsl:apply-templates/></fo:inline>
5288
- <!-- <fo:block>&#xA0;</fo:block> -->
5289
5413
  <fo:block/>
5290
5414
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
5291
5415
 
@@ -5321,11 +5445,6 @@
5321
5445
  <xsl:apply-templates/>
5322
5446
  </fo:block>
5323
5447
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
5324
- <fo:block id="{@id}">
5325
- <xsl:apply-templates/>
5326
- </fo:block>
5327
- </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']">
5328
-
5329
5448
  <fo:block id="{@id}">
5330
5449
  <xsl:apply-templates/>
5331
5450
  </fo:block>
@@ -5342,6 +5461,51 @@
5342
5461
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
5343
5462
  <!-- 0xA0 to space replacement -->
5344
5463
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
5464
+ </xsl:template><xsl:variable name="ul_labels_">
5465
+
5466
+
5467
+
5468
+
5469
+
5470
+
5471
+ <label>—</label> <!-- em dash -->
5472
+
5473
+
5474
+
5475
+
5476
+
5477
+
5478
+
5479
+
5480
+
5481
+
5482
+
5483
+
5484
+ </xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
5485
+ <xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
5486
+ <xsl:variable name="list_level">
5487
+ <xsl:choose>
5488
+ <xsl:when test="$list_level_ &lt;= 3"><xsl:value-of select="$list_level_"/></xsl:when>
5489
+ <xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
5490
+ </xsl:choose>
5491
+ </xsl:variable>
5492
+ <xsl:choose>
5493
+ <xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
5494
+ <xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
5495
+ </xsl:when>
5496
+ <xsl:when test="$list_level mod 3 = 0">
5497
+ <xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
5498
+ </xsl:when>
5499
+ <xsl:when test="$list_level mod 2 = 0">
5500
+ <xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
5501
+ </xsl:when>
5502
+ <xsl:otherwise>
5503
+ <xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
5504
+ </xsl:otherwise>
5505
+ </xsl:choose>
5506
+ </xsl:template><xsl:template match="label" mode="ul_labels">
5507
+ <xsl:copy-of select="@*[not(local-name() = 'level')]"/>
5508
+ <xsl:value-of select="."/>
5345
5509
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
5346
5510
  <xsl:choose>
5347
5511
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
@@ -5548,119 +5712,173 @@
5548
5712
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
5549
5713
  <fo:block><xsl:apply-templates/></fo:block>
5550
5714
  </fo:table-cell>
5551
- </xsl:template><xsl:template name="processBibitem">
5715
+ </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">
5552
5716
 
5553
5717
 
5554
5718
 
5555
-
5719
+ <fo:block id="{@id}">
5720
+ <xsl:apply-templates/>
5721
+ </fo:block>
5722
+ </xsl:template><xsl:template match="*[local-name() = 'references']">
5723
+ <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
5724
+
5725
+ </xsl:if>
5556
5726
 
5727
+ <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
5728
+ <xsl:if test="$namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'itu'">
5729
+ <fo:block break-after="page"/>
5730
+ </xsl:if>
5731
+ </xsl:if> -->
5557
5732
 
5733
+ <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
5734
+ <xsl:apply-templates/>
5735
+ </fo:block>
5558
5736
 
5559
- <!-- start IHO bibtem processing -->
5560
- <xsl:choose>
5561
- <xsl:when test="iho:formattedref">
5562
- <xsl:apply-templates select="iho:formattedref"/>
5563
- </xsl:when>
5564
- <xsl:otherwise>
5565
- <xsl:choose>
5566
- <!-- IHO documents -->
5567
- <!-- {docID} edition {edition}: {title}, {author/organization} -->
5568
- <xsl:when test="iho:docidentifier[1]/@type='IHO'">
5569
- <xsl:value-of select="iho:docidentifier[1]"/>
5570
- <xsl:apply-templates select="iho:edition"/>
5571
- <xsl:if test="iho:title or iho:contributor or iho:url">
5572
- <xsl:text>: </xsl:text>
5573
- </xsl:if>
5574
- </xsl:when>
5575
-
5576
- <!-- Non-IHO documents -->
5577
- <!-- title and publisher -->
5578
- <xsl:otherwise>
5579
- <xsl:variable name="docID">
5580
- <xsl:call-template name="processBibitemDocId"/>
5581
- </xsl:variable>
5582
- <xsl:value-of select="normalize-space($docID)"/>
5583
- <xsl:if test="normalize-space($docID) != ''"><xsl:text>: </xsl:text></xsl:if>
5584
- </xsl:otherwise>
5585
- </xsl:choose>
5586
-
5587
- <xsl:choose>
5588
- <xsl:when test="iho:title[@type = 'main' and @language = 'en']">
5589
- <xsl:apply-templates select="iho:title[@type = 'main' and @language = 'en']"/>
5590
- </xsl:when>
5591
- <xsl:otherwise>
5592
- <xsl:apply-templates select="iho:title"/>
5593
- </xsl:otherwise>
5594
- </xsl:choose>
5595
-
5596
- <xsl:if test="iho:title and iho:contributor">
5597
- <xsl:text>, </xsl:text>
5598
- </xsl:if>
5599
-
5600
- <xsl:variable name="authors">
5737
+
5738
+
5739
+
5740
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']">
5741
+ <xsl:call-template name="bibitem"/>
5742
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
5743
+
5744
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-normative-list-style">
5745
+ <fo:list-item>
5746
+ <fo:list-item-label end-indent="label-end()">
5747
+ <fo:block>
5748
+ <fo:inline>
5749
+
5750
+ <xsl:value-of select="*[local-name() = 'docidentifier'][@type = 'metanorma-ordinal']"/>
5751
+ <xsl:if test="not(*[local-name() = 'docidentifier'][@type = 'metanorma-ordinal'])">
5752
+ <xsl:number format="[1]"/>
5753
+ </xsl:if>
5754
+
5755
+ </fo:inline>
5756
+ </fo:block>
5757
+ </fo:list-item-label>
5758
+ <fo:list-item-body start-indent="body-start()">
5759
+ <fo:block xsl:use-attribute-sets="bibitem-normative-list-body-style">
5760
+ <xsl:call-template name="processBibitem"/>
5761
+ </fo:block>
5762
+ </fo:list-item-body>
5763
+ </fo:list-item>
5764
+ </fo:list-block>
5765
+
5766
+
5767
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
5768
+
5769
+
5770
+ <xsl:call-template name="bibitem"/>
5771
+
5772
+
5773
+ </xsl:template><xsl:template name="processBibitem">
5774
+
5775
+
5776
+ <!-- start IHO bibitem processing -->
5777
+ <!-- IHO documents:
5778
+ "[1] S57 edition 3.1: IHO Transfer Standard for Digital Hydrographic Data, International Hydrographic Organization (www.iho.int)”
5779
+ [{number}] {docID} edition {edition}: {title}, {author/organization}
5780
+ Non-IHO documents:
5781
+ Provide title and publisher -->
5782
+ <xsl:choose>
5783
+ <xsl:when test="iho:formattedref">
5784
+ <xsl:apply-templates select="iho:formattedref"/>
5785
+ </xsl:when>
5786
+ <xsl:otherwise>
5601
5787
  <xsl:choose>
5602
- <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5603
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5604
- <xsl:copy-of select="."/>
5605
- </xsl:for-each>
5606
- </xsl:when>
5607
- <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='editor']">
5608
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='editor']">
5609
- <xsl:copy-of select="."/>
5610
- </xsl:for-each>
5611
- </xsl:when>
5612
- <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='publisher'][*[local-name() = 'organization']]">
5613
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='publisher'][*[local-name() = 'organization']]">
5614
- <xsl:copy>
5615
- <xsl:choose>
5616
- <xsl:when test="position() != 1 and position() != last()">, </xsl:when>
5617
- <xsl:when test="position() != 1 and position() = last()"> and </xsl:when>
5618
- </xsl:choose>
5619
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
5620
- </xsl:copy>
5621
- </xsl:for-each>
5788
+ <!-- IHO documents -->
5789
+ <!-- {docID} edition {edition}: {title}, {author/organization} -->
5790
+ <xsl:when test="iho:docidentifier[1]/@type='IHO'">
5791
+ <xsl:value-of select="iho:docidentifier[1]"/>
5792
+ <xsl:apply-templates select="iho:edition"/>
5793
+ <xsl:if test="iho:title or iho:contributor or iho:url">
5794
+ <xsl:text>: </xsl:text>
5795
+ </xsl:if>
5622
5796
  </xsl:when>
5623
- </xsl:choose>
5624
- </xsl:variable>
5625
-
5626
- <xsl:for-each select="xalan:nodeset($authors)/*">
5627
- <xsl:choose>
5628
- <xsl:when test="not(*[local-name() = 'role'])"><!-- publisher organisation -->
5629
- <xsl:value-of select="."/>
5797
+
5798
+ <!-- Non-IHO documents -->
5799
+ <!-- title and publisher -->
5800
+ <xsl:otherwise>
5801
+ <xsl:variable name="docID">
5802
+ <xsl:call-template name="processBibitemDocId"/>
5803
+ </xsl:variable>
5804
+ <xsl:value-of select="normalize-space($docID)"/>
5805
+ <xsl:if test="normalize-space($docID) != ''"><xsl:text>: </xsl:text></xsl:if>
5806
+ </xsl:otherwise>
5807
+ </xsl:choose>
5808
+
5809
+ <xsl:choose>
5810
+ <xsl:when test="iho:title[@type = 'main' and @language = 'en']">
5811
+ <xsl:apply-templates select="iho:title[@type = 'main' and @language = 'en']"/>
5630
5812
  </xsl:when>
5631
- <xsl:otherwise> <!-- author, editor -->
5632
- <xsl:choose>
5633
- <xsl:when test="*[local-name() = 'organization']/*[local-name() = 'name']">
5634
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
5635
- </xsl:when>
5636
- <xsl:otherwise>
5637
- <xsl:for-each select="*[local-name() = 'person']">
5638
- <xsl:variable name="author">
5639
- <xsl:call-template name="processPersonalAuthor"/>
5640
- </xsl:variable>
5641
- <xsl:value-of select="xalan:nodeset($author)/author"/>
5642
- </xsl:for-each>
5643
- </xsl:otherwise>
5644
- </xsl:choose>
5813
+ <xsl:otherwise>
5814
+ <xsl:apply-templates select="iho:title"/>
5645
5815
  </xsl:otherwise>
5646
5816
  </xsl:choose>
5647
- <xsl:if test="*[local-name() = 'organization']/*[local-name() = 'name'] and position() != last()">
5817
+
5818
+ <xsl:if test="iho:title and iho:contributor">
5648
5819
  <xsl:text>, </xsl:text>
5649
- </xsl:if>
5650
- </xsl:for-each>
5651
-
5652
- <xsl:apply-templates select="*[local-name() = 'uri'][1]"/>
5653
-
5654
- </xsl:otherwise>
5655
- </xsl:choose>
5656
- <!-- end IHO bibitem processing -->
5657
-
5658
-
5659
-
5660
-
5661
-
5820
+ </xsl:if>
5821
+
5822
+ <xsl:variable name="authors">
5823
+ <xsl:choose>
5824
+ <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5825
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
5826
+ <xsl:copy-of select="."/>
5827
+ </xsl:for-each>
5828
+ </xsl:when>
5829
+ <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='editor']">
5830
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='editor']">
5831
+ <xsl:copy-of select="."/>
5832
+ </xsl:for-each>
5833
+ </xsl:when>
5834
+ <xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='publisher'][*[local-name() = 'organization']]">
5835
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='publisher'][*[local-name() = 'organization']]">
5836
+ <xsl:copy>
5837
+ <xsl:choose>
5838
+ <xsl:when test="position() != 1 and position() != last()">, </xsl:when>
5839
+ <xsl:when test="position() != 1 and position() = last()"> and </xsl:when>
5840
+ </xsl:choose>
5841
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
5842
+ </xsl:copy>
5843
+ </xsl:for-each>
5844
+ </xsl:when>
5845
+ </xsl:choose>
5846
+ </xsl:variable>
5847
+
5848
+ <xsl:for-each select="xalan:nodeset($authors)/*">
5849
+ <xsl:choose>
5850
+ <xsl:when test="not(*[local-name() = 'role'])"><!-- publisher organisation -->
5851
+ <xsl:value-of select="."/>
5852
+ </xsl:when>
5853
+ <xsl:otherwise> <!-- author, editor -->
5854
+ <xsl:choose>
5855
+ <xsl:when test="*[local-name() = 'organization']/*[local-name() = 'name']">
5856
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
5857
+ </xsl:when>
5858
+ <xsl:otherwise>
5859
+ <xsl:for-each select="*[local-name() = 'person']">
5860
+ <xsl:variable name="author">
5861
+ <xsl:call-template name="processPersonalAuthor"/>
5862
+ </xsl:variable>
5863
+ <xsl:value-of select="xalan:nodeset($author)/author"/>
5864
+ </xsl:for-each>
5865
+ </xsl:otherwise>
5866
+ </xsl:choose>
5867
+ </xsl:otherwise>
5868
+ </xsl:choose>
5869
+ <xsl:if test="*[local-name() = 'organization']/*[local-name() = 'name'] and position() != last()">
5870
+ <xsl:text>, </xsl:text>
5871
+ </xsl:if>
5872
+ </xsl:for-each>
5873
+
5874
+ <xsl:apply-templates select="*[local-name() = 'uri'][1]"/>
5875
+
5876
+ </xsl:otherwise>
5877
+ </xsl:choose>
5878
+ <!-- end IHO bibitem processing -->
5879
+
5662
5880
  </xsl:template><xsl:template name="processBibitemDocId">
5663
- <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')]"/>
5881
+ <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')]"/>
5664
5882
  <xsl:choose>
5665
5883
  <xsl:when test="normalize-space($_doc_ident) != ''">
5666
5884
  <!-- <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"/>
@@ -5674,7 +5892,7 @@
5674
5892
  <xsl:if test="$type != ''">
5675
5893
  <xsl:value-of select="$type"/><xsl:text> </xsl:text>
5676
5894
  </xsl:if> -->
5677
- <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
5895
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
5678
5896
  </xsl:otherwise>
5679
5897
  </xsl:choose>
5680
5898
  </xsl:template><xsl:template name="processPersonalAuthor">
@@ -5715,6 +5933,52 @@
5715
5933
  <xsl:value-of select="substring(.,1,1)"/>
5716
5934
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
5717
5935
  <fo:inline><xsl:apply-templates/></fo:inline>
5936
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
5937
+ <!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
5938
+ <fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
5939
+ <xsl:apply-templates/>
5940
+ </fo:inline>
5941
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
5942
+ <fo:footnote>
5943
+ <xsl:variable name="number">
5944
+
5945
+ <xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
5946
+
5947
+ </xsl:variable>
5948
+ <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
5949
+ <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
5950
+ <xsl:value-of select="$number"/>
5951
+
5952
+ <xsl:text>)</xsl:text>
5953
+
5954
+ </fo:basic-link>
5955
+ </fo:inline>
5956
+ <fo:footnote-body>
5957
+ <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
5958
+ <fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
5959
+ <xsl:value-of select="$number"/>
5960
+
5961
+ <xsl:text>)</xsl:text>
5962
+
5963
+ </fo:inline>
5964
+ <xsl:apply-templates/>
5965
+ </fo:block>
5966
+ </fo:footnote-body>
5967
+ </fo:footnote>
5968
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
5969
+ <xsl:text> edition </xsl:text>
5970
+ <xsl:value-of select="."/>
5971
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
5972
+ <xsl:text> (</xsl:text>
5973
+ <fo:inline xsl:use-attribute-sets="link-style">
5974
+ <fo:basic-link external-destination="." fox:alt-text=".">
5975
+ <xsl:value-of select="."/>
5976
+ </fo:basic-link>
5977
+ </fo:inline>
5978
+ <xsl:text>)</xsl:text>
5979
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/><xsl:template match="*[local-name() = 'formattedref']">
5980
+
5981
+ <xsl:apply-templates/>
5718
5982
  </xsl:template><xsl:template match="*[local-name() = 'form']">
5719
5983
  <fo:block>
5720
5984
  <xsl:apply-templates/>
@@ -5780,27 +6044,14 @@
5780
6044
  <fo:block> </fo:block>
5781
6045
  </fo:block-container>
5782
6046
  </xsl:template><xsl:variable name="toc_level">
6047
+ <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
6048
+ <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:-->
6049
+ <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 -->
5783
6050
  <xsl:choose>
5784
- <xsl:when test="1 = 2"/> <!-- to do https://github.com/metanorma/mn-native-pdf/issues/337: if there is value in xml -->
6051
+ <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
6052
+ <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
5785
6053
  <xsl:otherwise><!-- default value -->
5786
-
5787
-
5788
-
5789
-
5790
-
5791
-
5792
6054
  2
5793
-
5794
-
5795
-
5796
-
5797
-
5798
-
5799
-
5800
-
5801
-
5802
-
5803
-
5804
6055
  </xsl:otherwise>
5805
6056
  </xsl:choose>
5806
6057
  </xsl:variable><xsl:template match="*[local-name() = 'toc']">
@@ -5883,7 +6134,7 @@
5883
6134
  </td>
5884
6135
  </xsl:for-each>
5885
6136
  <td>333</td> <!-- page number, just for fill -->
5886
- </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
6137
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
5887
6138
  <fo:inline padding-right="5mm"> </fo:inline>
5888
6139
  <fo:inline><xsl:apply-templates/></fo:inline>
5889
6140
  </xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
@@ -5894,6 +6145,61 @@
5894
6145
  </svg>
5895
6146
  </fo:instream-foreign-object>
5896
6147
  </fo:inline>
6148
+ </xsl:template><xsl:template match="@language">
6149
+ <xsl:copy-of select="."/>
6150
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="4">
6151
+ <xsl:call-template name="title"/>
6152
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']">
6153
+
6154
+
6155
+
6156
+
6157
+
6158
+ <!-- text in the box -->
6159
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
6160
+
6161
+
6162
+
6163
+
6164
+
6165
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style">
6166
+
6167
+
6168
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
6169
+ <xsl:call-template name="displayAdmonitionName"/>
6170
+ </fo:block>
6171
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
6172
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6173
+ </fo:block>
6174
+
6175
+ </fo:block-container>
6176
+
6177
+ </fo:block-container>
6178
+
6179
+ </xsl:template><xsl:template name="displayAdmonitionName">
6180
+
6181
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
6182
+ <xsl:if test="not(*[local-name() = 'name'])">
6183
+ <xsl:apply-templates select="@type"/>
6184
+ </xsl:if>
6185
+
6186
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
6187
+ <xsl:apply-templates/>
6188
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
6189
+ <xsl:variable name="admonition_type_">
6190
+ <xsl:call-template name="getLocalizedString">
6191
+ <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
6192
+ </xsl:call-template>
6193
+ </xsl:variable>
6194
+ <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
6195
+ <xsl:value-of select="$admonition_type"/>
6196
+ <xsl:if test="$admonition_type = ''">
6197
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
6198
+ </xsl:if>
6199
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
6200
+ <!-- processing for admonition/p found in the template for 'p' -->
6201
+ <xsl:call-template name="paragraph"/>
6202
+
5897
6203
  </xsl:template><xsl:template name="convertDate">
5898
6204
  <xsl:param name="date"/>
5899
6205
  <xsl:param name="format" select="'short'"/>
@@ -5901,83 +6207,80 @@
5901
6207
  <xsl:variable name="month" select="substring($date, 6, 2)"/>
5902
6208
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
5903
6209
  <xsl:variable name="monthStr">
5904
- <xsl:choose>
5905
- <xsl:when test="$month = '01'">January</xsl:when>
5906
- <xsl:when test="$month = '02'">February</xsl:when>
5907
- <xsl:when test="$month = '03'">March</xsl:when>
5908
- <xsl:when test="$month = '04'">April</xsl:when>
5909
- <xsl:when test="$month = '05'">May</xsl:when>
5910
- <xsl:when test="$month = '06'">June</xsl:when>
5911
- <xsl:when test="$month = '07'">July</xsl:when>
5912
- <xsl:when test="$month = '08'">August</xsl:when>
5913
- <xsl:when test="$month = '09'">September</xsl:when>
5914
- <xsl:when test="$month = '10'">October</xsl:when>
5915
- <xsl:when test="$month = '11'">November</xsl:when>
5916
- <xsl:when test="$month = '12'">December</xsl:when>
5917
- </xsl:choose>
6210
+ <xsl:call-template name="getMonthByNum">
6211
+ <xsl:with-param name="num" select="$month"/>
6212
+ <xsl:with-param name="lowercase" select="'true'"/>
6213
+ </xsl:call-template>
6214
+ </xsl:variable>
6215
+ <xsl:variable name="monthStr_localized">
6216
+ <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>
5918
6217
  </xsl:variable>
5919
6218
  <xsl:variable name="result">
5920
6219
  <xsl:choose>
5921
- <xsl:when test="$format = 'ddMMyyyy'">
6220
+ <xsl:when test="$format = 'ddMMyyyy'"> <!-- convert date from format 2007-04-01 to 1 April 2007 -->
5922
6221
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5923
6222
  <xsl:text> </xsl:text>
5924
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
6223
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
5925
6224
  </xsl:when>
5926
6225
  <xsl:when test="$format = 'ddMM'">
5927
6226
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5928
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
6227
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr_localized"/>
5929
6228
  </xsl:when>
5930
6229
  <xsl:when test="$format = 'short' or $day = ''">
5931
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
6230
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
5932
6231
  </xsl:when>
5933
6232
  <xsl:otherwise>
5934
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
6233
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/> <!-- January 01, 2022 -->
5935
6234
  </xsl:otherwise>
5936
6235
  </xsl:choose>
5937
6236
  </xsl:variable>
5938
6237
  <xsl:value-of select="$result"/>
5939
- </xsl:template><xsl:template name="convertDateLocalized">
5940
- <xsl:param name="date"/>
5941
- <xsl:param name="format" select="'short'"/>
5942
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
5943
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
5944
- <xsl:variable name="day" select="substring($date, 9, 2)"/>
5945
- <xsl:variable name="monthStr">
5946
- <xsl:choose>
5947
- <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>
5948
- <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>
5949
- <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>
5950
- <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>
5951
- <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>
5952
- <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>
5953
- <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>
5954
- <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>
5955
- <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>
5956
- <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>
5957
- <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>
5958
- <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>
5959
- </xsl:choose>
5960
- </xsl:variable>
5961
- <xsl:variable name="result">
6238
+ </xsl:template><xsl:template name="getMonthByNum">
6239
+ <xsl:param name="num"/>
6240
+ <xsl:param name="lang">en</xsl:param>
6241
+ <xsl:param name="lowercase">false</xsl:param> <!-- return 'january' instead of 'January' -->
6242
+ <xsl:variable name="monthStr_">
5962
6243
  <xsl:choose>
5963
- <xsl:when test="$format = 'ddMMyyyy'">
5964
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5965
- <xsl:text> </xsl:text>
5966
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
5967
- </xsl:when>
5968
- <xsl:when test="$format = 'ddMM'">
5969
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
5970
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
5971
- </xsl:when>
5972
- <xsl:when test="$format = 'short' or $day = ''">
5973
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
6244
+ <xsl:when test="$lang = 'fr'">
6245
+ <xsl:choose>
6246
+ <xsl:when test="$num = '01'">Janvier</xsl:when>
6247
+ <xsl:when test="$num = '02'">Février</xsl:when>
6248
+ <xsl:when test="$num = '03'">Mars</xsl:when>
6249
+ <xsl:when test="$num = '04'">Avril</xsl:when>
6250
+ <xsl:when test="$num = '05'">Mai</xsl:when>
6251
+ <xsl:when test="$num = '06'">Juin</xsl:when>
6252
+ <xsl:when test="$num = '07'">Juillet</xsl:when>
6253
+ <xsl:when test="$num = '08'">Août</xsl:when>
6254
+ <xsl:when test="$num = '09'">Septembre</xsl:when>
6255
+ <xsl:when test="$num = '10'">Octobre</xsl:when>
6256
+ <xsl:when test="$num = '11'">Novembre</xsl:when>
6257
+ <xsl:when test="$num = '12'">Décembre</xsl:when>
6258
+ </xsl:choose>
5974
6259
  </xsl:when>
5975
6260
  <xsl:otherwise>
5976
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
6261
+ <xsl:choose>
6262
+ <xsl:when test="$num = '01'">January</xsl:when>
6263
+ <xsl:when test="$num = '02'">February</xsl:when>
6264
+ <xsl:when test="$num = '03'">March</xsl:when>
6265
+ <xsl:when test="$num = '04'">April</xsl:when>
6266
+ <xsl:when test="$num = '05'">May</xsl:when>
6267
+ <xsl:when test="$num = '06'">June</xsl:when>
6268
+ <xsl:when test="$num = '07'">July</xsl:when>
6269
+ <xsl:when test="$num = '08'">August</xsl:when>
6270
+ <xsl:when test="$num = '09'">September</xsl:when>
6271
+ <xsl:when test="$num = '10'">October</xsl:when>
6272
+ <xsl:when test="$num = '11'">November</xsl:when>
6273
+ <xsl:when test="$num = '12'">December</xsl:when>
6274
+ </xsl:choose>
5977
6275
  </xsl:otherwise>
5978
6276
  </xsl:choose>
5979
6277
  </xsl:variable>
5980
- <xsl:value-of select="$result"/>
6278
+ <xsl:choose>
6279
+ <xsl:when test="normalize-space($lowercase) = 'true'">
6280
+ <xsl:value-of select="java:toLowerCase(java:java.lang.String.new($monthStr_))"/>
6281
+ </xsl:when>
6282
+ <xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
6283
+ </xsl:choose>
5981
6284
  </xsl:template><xsl:template name="insertKeywords">
5982
6285
  <xsl:param name="sorting" select="'true'"/>
5983
6286
  <xsl:param name="charAtEnd" select="'.'"/>
@@ -6025,14 +6328,9 @@
6025
6328
  <dc:title>
6026
6329
  <xsl:variable name="title">
6027
6330
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
6028
-
6029
-
6030
-
6031
-
6032
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
6033
-
6034
-
6035
6331
 
6332
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
6333
+
6036
6334
  </xsl:for-each>
6037
6335
  </xsl:variable>
6038
6336
  <xsl:choose>
@@ -6047,21 +6345,18 @@
6047
6345
  <dc:creator>
6048
6346
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
6049
6347
 
6050
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
6051
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
6052
- <xsl:if test="position() != last()">; </xsl:if>
6053
- </xsl:for-each>
6054
-
6055
-
6056
-
6348
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
6349
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
6350
+ <xsl:if test="position() != last()">; </xsl:if>
6351
+ </xsl:for-each>
6352
+
6057
6353
  </xsl:for-each>
6058
6354
  </dc:creator>
6059
6355
  <dc:description>
6060
6356
  <xsl:variable name="abstract">
6061
6357
 
6062
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
6063
-
6064
-
6358
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
6359
+
6065
6360
  </xsl:variable>
6066
6361
  <xsl:value-of select="normalize-space($abstract)"/>
6067
6362
  </dc:description>
@@ -6081,7 +6376,6 @@
6081
6376
  <xsl:value-of select="../@id"/>
6082
6377
  </xsl:when>
6083
6378
  <xsl:otherwise>
6084
- <!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
6085
6379
  <xsl:value-of select="concat(generate-id(..), '_', text())"/>
6086
6380
  </xsl:otherwise>
6087
6381
  </xsl:choose>
@@ -6107,9 +6401,6 @@
6107
6401
  <xsl:when test="ancestor::*[local-name() = 'preface']">
6108
6402
  <xsl:value-of select="$level_total - 2"/>
6109
6403
  </xsl:when>
6110
- <!-- <xsl:when test="parent::*[local-name() = 'sections']">
6111
- <xsl:value-of select="$level_total - 1"/>
6112
- </xsl:when> -->
6113
6404
  <xsl:when test="ancestor::*[local-name() = 'sections']">
6114
6405
  <xsl:value-of select="$level_total - 1"/>
6115
6406
  </xsl:when>
@@ -6251,9 +6542,15 @@
6251
6542
  </xsl:template><xsl:template name="getLocalizedString">
6252
6543
  <xsl:param name="key"/>
6253
6544
  <xsl:param name="formatted">false</xsl:param>
6545
+ <xsl:param name="lang"/>
6254
6546
 
6255
6547
  <xsl:variable name="curr_lang">
6256
- <xsl:call-template name="getLang"/>
6548
+ <xsl:choose>
6549
+ <xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
6550
+ <xsl:otherwise>
6551
+ <xsl:call-template name="getLang"/>
6552
+ </xsl:otherwise>
6553
+ </xsl:choose>
6257
6554
  </xsl:variable>
6258
6555
 
6259
6556
  <xsl:variable name="data_value">
@@ -6293,7 +6590,6 @@
6293
6590
  <xsl:value-of select="$key_"/>
6294
6591
  </xsl:otherwise>
6295
6592
  </xsl:choose>
6296
-
6297
6593
  </xsl:template><xsl:template name="setTrackChangesStyles">
6298
6594
  <xsl:param name="isAdded"/>
6299
6595
  <xsl:param name="isDeleted"/>
@@ -6316,7 +6612,6 @@
6316
6612
  <xsl:if test="local-name() = 'table'">
6317
6613
  <xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
6318
6614
  </xsl:if>
6319
- <!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
6320
6615
  <xsl:attribute name="padding">2mm</xsl:attribute>
6321
6616
  </xsl:if>
6322
6617
  </xsl:otherwise>
@@ -6336,15 +6631,18 @@
6336
6631
  </xsl:choose>
6337
6632
  </xsl:template><xsl:template name="setTextAlignment">
6338
6633
  <xsl:param name="default">left</xsl:param>
6634
+ <xsl:variable name="align" select="normalize-space(@align)"/>
6339
6635
  <xsl:attribute name="text-align">
6340
6636
  <xsl:choose>
6341
- <xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
6637
+ <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
6638
+ <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
6639
+ <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
6342
6640
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
6343
6641
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
6344
6642
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
6345
6643
  </xsl:choose>
6346
6644
  </xsl:attribute>
6347
- <xsl:if test="@align = 'indent'">
6645
+ <xsl:if test="$align = 'indent'">
6348
6646
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
6349
6647
  </xsl:if>
6350
6648
  </xsl:template><xsl:template name="number-to-words">
@@ -6443,6 +6741,25 @@
6443
6741
  </xsl:otherwise>
6444
6742
  </xsl:choose>
6445
6743
  </xsl:if>
6744
+ </xsl:template><xsl:template name="number-to-ordinal">
6745
+ <xsl:param name="number"/>
6746
+ <xsl:param name="curr_lang"/>
6747
+ <xsl:choose>
6748
+ <xsl:when test="$curr_lang = 'fr'">
6749
+ <xsl:choose>
6750
+ <xsl:when test="$number = '1'">re</xsl:when>
6751
+ <xsl:otherwise>e</xsl:otherwise>
6752
+ </xsl:choose>
6753
+ </xsl:when>
6754
+ <xsl:otherwise>
6755
+ <xsl:choose>
6756
+ <xsl:when test="$number = 1">st</xsl:when>
6757
+ <xsl:when test="$number = 2">nd</xsl:when>
6758
+ <xsl:when test="$number = 3">rd</xsl:when>
6759
+ <xsl:otherwise>th</xsl:otherwise>
6760
+ </xsl:choose>
6761
+ </xsl:otherwise>
6762
+ </xsl:choose>
6446
6763
  </xsl:template><xsl:template name="setAltText">
6447
6764
  <xsl:param name="value"/>
6448
6765
  <xsl:attribute name="fox:alt-text">