metanorma-cc 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/cc/cc.standard.xsl +1011 -945
- data/lib/isodoc/cc/html/htmlstyle.css +18 -14
- data/lib/isodoc/cc/html/htmlstyle.scss +6 -1
- data/lib/metanorma/cc/version.rb +1 -1
- metadata +2 -2
@@ -46,7 +46,7 @@
|
|
46
46
|
|
47
47
|
<xsl:template match="/">
|
48
48
|
<xsl:call-template name="namespaceCheck"/>
|
49
|
-
<fo:root
|
49
|
+
<fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
|
50
50
|
<fo:layout-master-set>
|
51
51
|
<!-- Cover page -->
|
52
52
|
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
@@ -317,10 +317,7 @@
|
|
317
317
|
<!-- ============================= -->
|
318
318
|
<!-- CONTENTS -->
|
319
319
|
<!-- ============================= -->
|
320
|
-
|
321
|
-
<xsl:apply-templates mode="contents"/>
|
322
|
-
</xsl:template>
|
323
|
-
|
320
|
+
|
324
321
|
<!-- element with title -->
|
325
322
|
<xsl:template match="*[csd:title]" mode="contents">
|
326
323
|
<xsl:variable name="level">
|
@@ -508,42 +505,6 @@
|
|
508
505
|
</xsl:template>
|
509
506
|
|
510
507
|
|
511
|
-
<xsl:template match="csd:bibitem">
|
512
|
-
<fo:block id="{@id}" margin-bottom="6pt"> <!-- 12 pt -->
|
513
|
-
<xsl:call-template name="processBibitem"/>
|
514
|
-
</fo:block>
|
515
|
-
</xsl:template>
|
516
|
-
|
517
|
-
|
518
|
-
<xsl:template match="csd:bibitem/csd:note" priority="2">
|
519
|
-
<fo:footnote>
|
520
|
-
<xsl:variable name="number">
|
521
|
-
<xsl:choose>
|
522
|
-
<xsl:when test="ancestor::csd:references[preceding-sibling::csd:references]">
|
523
|
-
<xsl:number level="any" count="csd:references[preceding-sibling::csd:references]//csd:bibitem/csd:note"/>
|
524
|
-
</xsl:when>
|
525
|
-
<xsl:otherwise>
|
526
|
-
<xsl:number level="any" count="csd:bibitem/csd:note"/>
|
527
|
-
</xsl:otherwise>
|
528
|
-
</xsl:choose>
|
529
|
-
</xsl:variable>
|
530
|
-
<fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super"> <!-- 60% baseline-shift="35%" -->
|
531
|
-
<fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
|
532
|
-
<xsl:value-of select="$number"/><!-- <xsl:text>)</xsl:text> -->
|
533
|
-
</fo:basic-link>
|
534
|
-
</fo:inline>
|
535
|
-
<fo:footnote-body>
|
536
|
-
<fo:block font-size="10pt" margin-bottom="12pt" start-indent="0pt">
|
537
|
-
<fo:inline id="{generate-id()}" keep-with-next.within-line="always" font-size="60%" vertical-align="super"><!-- baseline-shift="30%" padding-right="9mm" alignment-baseline="hanging" -->
|
538
|
-
<xsl:value-of select="$number"/><!-- <xsl:text>)</xsl:text> -->
|
539
|
-
</fo:inline>
|
540
|
-
<xsl:apply-templates/>
|
541
|
-
</fo:block>
|
542
|
-
</fo:footnote-body>
|
543
|
-
</fo:footnote>
|
544
|
-
</xsl:template>
|
545
|
-
|
546
|
-
|
547
508
|
|
548
509
|
<xsl:template match="csd:ul | csd:ol" mode="ul_ol">
|
549
510
|
<fo:list-block provisional-distance-between-starts="6.5mm" margin-bottom="12pt">
|
@@ -602,7 +563,7 @@
|
|
602
563
|
</xsl:variable>
|
603
564
|
<fo:block font-size="{$font-size}" line-height="1.1" role="H{$levelTerm}">
|
604
565
|
<fo:block font-weight="bold" keep-with-next="always">
|
605
|
-
<xsl:apply-templates select="ancestor::csd:term[1]/csd:name"
|
566
|
+
<xsl:apply-templates select="ancestor::csd:term[1]/csd:name"/>
|
606
567
|
</fo:block>
|
607
568
|
<fo:block font-weight="bold" keep-with-next="always">
|
608
569
|
<xsl:call-template name="setStyle_preferred"/>
|
@@ -612,47 +573,6 @@
|
|
612
573
|
</xsl:template>
|
613
574
|
|
614
575
|
|
615
|
-
|
616
|
-
|
617
|
-
<!-- <xsl:template match="csd:references[@id = '_bibliography']"> -->
|
618
|
-
<xsl:template match="csd:references[not(@normative='true')]">
|
619
|
-
<fo:block break-after="page"/>
|
620
|
-
<fo:block id="{@id}">
|
621
|
-
<xsl:apply-templates/>
|
622
|
-
</fo:block>
|
623
|
-
</xsl:template>
|
624
|
-
|
625
|
-
|
626
|
-
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
627
|
-
<!-- <xsl:template match="csd:references[@id = '_bibliography']/csd:bibitem"> -->
|
628
|
-
<xsl:template match="csd:references[not(@normative='true')]/csd:bibitem">
|
629
|
-
<fo:list-block margin-bottom="12pt" provisional-distance-between-starts="12mm">
|
630
|
-
<fo:list-item>
|
631
|
-
<fo:list-item-label end-indent="label-end()">
|
632
|
-
<fo:block>
|
633
|
-
<fo:inline id="{@id}">
|
634
|
-
<xsl:value-of select="*[local-name()='docidentifier'][@type = 'metanorma-ordinal']"/>
|
635
|
-
<xsl:if test="not(*[local-name()='docidentifier'][@type = 'metanorma-ordinal'])">
|
636
|
-
<xsl:number format="[1]"/>
|
637
|
-
</xsl:if>
|
638
|
-
</fo:inline>
|
639
|
-
</fo:block>
|
640
|
-
</fo:list-item-label>
|
641
|
-
<fo:list-item-body start-indent="body-start()">
|
642
|
-
<fo:block>
|
643
|
-
<xsl:call-template name="processBibitem"/>
|
644
|
-
</fo:block>
|
645
|
-
</fo:list-item-body>
|
646
|
-
</fo:list-item>
|
647
|
-
</fo:list-block>
|
648
|
-
</xsl:template>
|
649
|
-
|
650
|
-
<!-- <xsl:template match="csd:references[@id = '_bibliography']/csd:bibitem/csd:title"> -->
|
651
|
-
<xsl:template match="csd:references/csd:bibitem/csd:title">
|
652
|
-
<fo:inline font-style="italic">
|
653
|
-
<xsl:apply-templates/>
|
654
|
-
</fo:inline>
|
655
|
-
</xsl:template>
|
656
576
|
|
657
577
|
|
658
578
|
<xsl:template match="csd:xref" priority="2">
|
@@ -666,17 +586,6 @@
|
|
666
586
|
</xsl:template>
|
667
587
|
|
668
588
|
|
669
|
-
|
670
|
-
<xsl:template match="csd:admonition">
|
671
|
-
<fo:block margin-bottom="12pt" font-weight="bold"> <!-- text-align="center" -->
|
672
|
-
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@type))"/>
|
673
|
-
<xsl:text> — </xsl:text>
|
674
|
-
<xsl:apply-templates/>
|
675
|
-
</fo:block>
|
676
|
-
</xsl:template>
|
677
|
-
|
678
|
-
|
679
|
-
|
680
589
|
<xsl:template match="csd:formula/csd:stem">
|
681
590
|
<fo:block margin-top="6pt" margin-bottom="12pt">
|
682
591
|
<fo:table table-layout="fixed" width="100%">
|
@@ -691,7 +600,7 @@
|
|
691
600
|
</fo:table-cell>
|
692
601
|
<fo:table-cell display-align="center">
|
693
602
|
<fo:block text-align="right">
|
694
|
-
<xsl:apply-templates select="../csd:name" mode="
|
603
|
+
<xsl:apply-templates select="../csd:name" mode="formula_number"/>
|
695
604
|
</fo:block>
|
696
605
|
</fo:table-cell>
|
697
606
|
</fo:table-row>
|
@@ -756,22 +665,18 @@
|
|
756
665
|
</xsl:template>
|
757
666
|
|
758
667
|
|
759
|
-
<xsl:variable name="
|
668
|
+
<xsl:variable name="titles_">
|
760
669
|
|
761
670
|
<title-edition lang="en">
|
762
671
|
|
763
|
-
|
764
|
-
|
765
|
-
|
672
|
+
<xsl:text>Edition </xsl:text>
|
673
|
+
|
766
674
|
</title-edition>
|
767
675
|
|
768
676
|
<title-edition lang="fr">
|
769
|
-
|
770
|
-
<xsl:text>Édition </xsl:text>
|
771
|
-
|
677
|
+
<xsl:text>Édition </xsl:text>
|
772
678
|
</title-edition>
|
773
679
|
|
774
|
-
|
775
680
|
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
776
681
|
<title-toc lang="en">
|
777
682
|
|
@@ -781,14 +686,13 @@
|
|
781
686
|
|
782
687
|
</title-toc>
|
783
688
|
<title-toc lang="fr">
|
689
|
+
<xsl:text>Sommaire</xsl:text>
|
690
|
+
</title-toc>
|
691
|
+
<title-toc lang="zh">
|
784
692
|
|
785
|
-
|
786
|
-
|
693
|
+
<xsl:text>Contents</xsl:text>
|
694
|
+
|
787
695
|
</title-toc>
|
788
|
-
|
789
|
-
<title-toc lang="zh">Contents</title-toc>
|
790
|
-
|
791
|
-
|
792
696
|
|
793
697
|
<title-descriptors lang="en">Descriptors</title-descriptors>
|
794
698
|
|
@@ -804,12 +708,8 @@
|
|
804
708
|
</title-part>
|
805
709
|
<title-part lang="zh">第 # 部分:</title-part>
|
806
710
|
|
807
|
-
<title-subpart lang="en">
|
808
|
-
|
809
|
-
</title-subpart>
|
810
|
-
<title-subpart lang="fr">
|
811
|
-
|
812
|
-
</title-subpart>
|
711
|
+
<title-subpart lang="en">Sub-part #</title-subpart>
|
712
|
+
<title-subpart lang="fr">Partie de sub #</title-subpart>
|
813
713
|
|
814
714
|
<title-list-tables lang="en">List of Tables</title-list-tables>
|
815
715
|
|
@@ -824,7 +724,7 @@
|
|
824
724
|
<title-continued lang="en">(continued)</title-continued>
|
825
725
|
<title-continued lang="fr">(continué)</title-continued>
|
826
726
|
|
827
|
-
</xsl:variable><xsl:variable name="bibdata">
|
727
|
+
</xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
|
828
728
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
829
729
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
830
730
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
@@ -853,6 +753,23 @@
|
|
853
753
|
</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="'
'"/><xsl:attribute-set name="root-style">
|
854
754
|
|
855
755
|
|
756
|
+
|
757
|
+
|
758
|
+
<xsl:attribute name="font-family">Source Sans Pro, STIX Two Math, Source Han Sans</xsl:attribute>
|
759
|
+
<xsl:attribute name="font-size">10.5pt</xsl:attribute>
|
760
|
+
|
761
|
+
|
762
|
+
|
763
|
+
|
764
|
+
|
765
|
+
|
766
|
+
|
767
|
+
|
768
|
+
|
769
|
+
|
770
|
+
|
771
|
+
|
772
|
+
|
856
773
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
857
774
|
|
858
775
|
|
@@ -862,6 +779,9 @@
|
|
862
779
|
|
863
780
|
|
864
781
|
|
782
|
+
</xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
|
783
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
784
|
+
|
865
785
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
866
786
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
867
787
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -875,10 +795,17 @@
|
|
875
795
|
|
876
796
|
|
877
797
|
|
798
|
+
|
799
|
+
|
800
|
+
|
801
|
+
|
802
|
+
|
878
803
|
|
879
804
|
|
880
805
|
|
881
806
|
|
807
|
+
|
808
|
+
|
882
809
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
883
810
|
|
884
811
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -990,7 +917,60 @@
|
|
990
917
|
|
991
918
|
</xsl:attribute-set><xsl:variable name="table-border_">
|
992
919
|
|
993
|
-
</xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-
|
920
|
+
</xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
|
921
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
922
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
923
|
+
|
924
|
+
|
925
|
+
|
926
|
+
|
927
|
+
|
928
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
929
|
+
|
930
|
+
|
931
|
+
|
932
|
+
|
933
|
+
|
934
|
+
|
935
|
+
|
936
|
+
|
937
|
+
|
938
|
+
|
939
|
+
|
940
|
+
|
941
|
+
|
942
|
+
|
943
|
+
|
944
|
+
|
945
|
+
|
946
|
+
</xsl:attribute-set><xsl:attribute-set name="table-style">
|
947
|
+
<xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
|
948
|
+
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
949
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
950
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
951
|
+
|
952
|
+
|
953
|
+
|
954
|
+
|
955
|
+
|
956
|
+
|
957
|
+
|
958
|
+
|
959
|
+
|
960
|
+
|
961
|
+
|
962
|
+
|
963
|
+
|
964
|
+
|
965
|
+
|
966
|
+
|
967
|
+
|
968
|
+
|
969
|
+
|
970
|
+
|
971
|
+
|
972
|
+
|
973
|
+
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
994
974
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
995
975
|
|
996
976
|
|
@@ -1010,7 +990,148 @@
|
|
1010
990
|
|
1011
991
|
|
1012
992
|
|
993
|
+
</xsl:attribute-set><xsl:attribute-set name="table-row-style">
|
994
|
+
<xsl:attribute name="min-height">4mm</xsl:attribute>
|
995
|
+
|
996
|
+
|
997
|
+
|
998
|
+
|
999
|
+
</xsl:attribute-set><xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
|
1000
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1001
|
+
|
1002
|
+
|
1003
|
+
|
1004
|
+
|
1005
|
+
|
1006
|
+
|
1007
|
+
|
1008
|
+
|
1009
|
+
|
1010
|
+
</xsl:attribute-set><xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
|
1011
|
+
|
1012
|
+
|
1013
|
+
|
1014
|
+
</xsl:attribute-set><xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
|
1015
|
+
|
1016
|
+
</xsl:attribute-set><xsl:attribute-set name="table-header-cell-style">
|
1017
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1018
|
+
<xsl:attribute name="border">solid black 1pt</xsl:attribute>
|
1019
|
+
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
1020
|
+
<xsl:attribute name="display-align">center</xsl:attribute>
|
1021
|
+
|
1022
|
+
|
1023
|
+
|
1024
|
+
|
1025
|
+
|
1026
|
+
|
1027
|
+
|
1028
|
+
|
1029
|
+
|
1030
|
+
|
1031
|
+
|
1032
|
+
|
1033
|
+
|
1034
|
+
</xsl:attribute-set><xsl:attribute-set name="table-cell-style">
|
1035
|
+
<xsl:attribute name="display-align">center</xsl:attribute>
|
1036
|
+
<xsl:attribute name="border">solid black 1pt</xsl:attribute>
|
1037
|
+
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
1038
|
+
|
1039
|
+
|
1040
|
+
|
1041
|
+
|
1042
|
+
|
1043
|
+
|
1044
|
+
|
1045
|
+
|
1046
|
+
|
1047
|
+
|
1048
|
+
|
1049
|
+
|
1050
|
+
|
1013
1051
|
</xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
|
1052
|
+
<xsl:attribute name="border">solid black 1pt</xsl:attribute>
|
1053
|
+
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
1054
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1055
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
1056
|
+
|
1057
|
+
|
1058
|
+
|
1059
|
+
|
1060
|
+
|
1061
|
+
|
1062
|
+
|
1063
|
+
|
1064
|
+
|
1065
|
+
|
1066
|
+
|
1067
|
+
</xsl:attribute-set><xsl:attribute-set name="table-note-style">
|
1068
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1069
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1070
|
+
|
1071
|
+
|
1072
|
+
|
1073
|
+
|
1074
|
+
|
1075
|
+
|
1076
|
+
|
1077
|
+
|
1078
|
+
</xsl:attribute-set><xsl:attribute-set name="table-fn-style">
|
1079
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1080
|
+
|
1081
|
+
|
1082
|
+
|
1083
|
+
|
1084
|
+
|
1085
|
+
|
1086
|
+
</xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
|
1087
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
1088
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
1089
|
+
|
1090
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1091
|
+
|
1092
|
+
|
1093
|
+
|
1094
|
+
|
1095
|
+
|
1096
|
+
|
1097
|
+
|
1098
|
+
|
1099
|
+
|
1100
|
+
|
1101
|
+
|
1102
|
+
|
1103
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
|
1104
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1105
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
1106
|
+
|
1107
|
+
|
1108
|
+
</xsl:attribute-set><xsl:attribute-set name="table-fn-body-style">
|
1109
|
+
|
1110
|
+
</xsl:attribute-set><xsl:attribute-set name="figure-fn-number-style">
|
1111
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
1112
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
1113
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1114
|
+
|
1115
|
+
</xsl:attribute-set><xsl:attribute-set name="figure-fn-body-style">
|
1116
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
1117
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1118
|
+
|
1119
|
+
</xsl:attribute-set><xsl:attribute-set name="dt-row-style">
|
1120
|
+
|
1121
|
+
|
1122
|
+
</xsl:attribute-set><xsl:attribute-set name="dt-style">
|
1123
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1124
|
+
|
1125
|
+
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
1126
|
+
|
1127
|
+
|
1128
|
+
|
1129
|
+
|
1130
|
+
|
1131
|
+
|
1132
|
+
|
1133
|
+
|
1134
|
+
|
1014
1135
|
|
1015
1136
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1016
1137
|
|
@@ -1082,6 +1203,7 @@
|
|
1082
1203
|
|
1083
1204
|
|
1084
1205
|
</xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
|
1206
|
+
<xsl:attribute name="padding-right">2mm</xsl:attribute>
|
1085
1207
|
|
1086
1208
|
|
1087
1209
|
|
@@ -1148,6 +1270,9 @@
|
|
1148
1270
|
|
1149
1271
|
|
1150
1272
|
|
1273
|
+
</xsl:attribute-set><xsl:attribute-set name="termsource-text-style">
|
1274
|
+
|
1275
|
+
|
1151
1276
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1152
1277
|
|
1153
1278
|
|
@@ -1155,6 +1280,8 @@
|
|
1155
1280
|
|
1156
1281
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1157
1282
|
|
1283
|
+
</xsl:attribute-set><xsl:attribute-set name="figure-style">
|
1284
|
+
|
1158
1285
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1159
1286
|
|
1160
1287
|
|
@@ -1255,7 +1382,18 @@
|
|
1255
1382
|
|
1256
1383
|
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1257
1384
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1258
|
-
</xsl:attribute-set><xsl:attribute-set name="fn-style">
|
1385
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-reference-style">
|
1386
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
1387
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1388
|
+
|
1389
|
+
|
1390
|
+
|
1391
|
+
|
1392
|
+
|
1393
|
+
|
1394
|
+
|
1395
|
+
|
1396
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-style">
|
1259
1397
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1260
1398
|
</xsl:attribute-set><xsl:attribute-set name="fn-num-style">
|
1261
1399
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
@@ -1326,30 +1464,192 @@
|
|
1326
1464
|
|
1327
1465
|
|
1328
1466
|
|
1329
|
-
</xsl:attribute-set><xsl:
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1467
|
+
</xsl:attribute-set><xsl:attribute-set name="admonition-style">
|
1468
|
+
|
1469
|
+
|
1470
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1471
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1472
|
+
|
1473
|
+
|
1474
|
+
|
1475
|
+
|
1476
|
+
|
1477
|
+
|
1478
|
+
|
1479
|
+
|
1480
|
+
|
1481
|
+
|
1482
|
+
|
1483
|
+
|
1484
|
+
|
1485
|
+
</xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
|
1486
|
+
|
1487
|
+
|
1488
|
+
|
1489
|
+
|
1490
|
+
|
1491
|
+
|
1492
|
+
|
1493
|
+
|
1494
|
+
|
1495
|
+
|
1496
|
+
</xsl:attribute-set><xsl:attribute-set name="admonition-name-style">
|
1497
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1498
|
+
|
1499
|
+
|
1500
|
+
|
1501
|
+
|
1502
|
+
|
1503
|
+
|
1504
|
+
|
1505
|
+
|
1506
|
+
|
1507
|
+
|
1508
|
+
|
1509
|
+
|
1510
|
+
|
1511
|
+
</xsl:attribute-set><xsl:attribute-set name="admonition-p-style">
|
1512
|
+
|
1513
|
+
|
1514
|
+
|
1515
|
+
|
1516
|
+
|
1517
|
+
|
1518
|
+
|
1519
|
+
|
1520
|
+
|
1521
|
+
|
1522
|
+
|
1523
|
+
</xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
|
1524
|
+
|
1525
|
+
|
1526
|
+
|
1527
|
+
|
1528
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1529
|
+
|
1530
|
+
|
1531
|
+
|
1532
|
+
|
1533
|
+
|
1534
|
+
|
1535
|
+
|
1536
|
+
|
1537
|
+
|
1538
|
+
|
1539
|
+
|
1540
|
+
|
1541
|
+
|
1542
|
+
|
1543
|
+
|
1544
|
+
</xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-style">
|
1545
|
+
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
1546
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1547
|
+
|
1548
|
+
|
1549
|
+
|
1550
|
+
|
1551
|
+
|
1552
|
+
|
1553
|
+
|
1554
|
+
|
1555
|
+
|
1556
|
+
|
1557
|
+
|
1558
|
+
|
1559
|
+
|
1560
|
+
</xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
|
1561
|
+
|
1562
|
+
|
1563
|
+
|
1564
|
+
|
1565
|
+
</xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-style">
|
1566
|
+
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
1567
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1568
|
+
|
1569
|
+
|
1570
|
+
|
1571
|
+
|
1572
|
+
|
1573
|
+
|
1574
|
+
|
1575
|
+
|
1576
|
+
|
1577
|
+
|
1578
|
+
|
1579
|
+
|
1580
|
+
|
1581
|
+
</xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
|
1582
|
+
|
1583
|
+
|
1584
|
+
</xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
|
1585
|
+
|
1586
|
+
|
1587
|
+
</xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
|
1588
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1589
|
+
<xsl:attribute name="font-size">65%</xsl:attribute>
|
1590
|
+
|
1591
|
+
|
1592
|
+
|
1593
|
+
|
1594
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1595
|
+
|
1596
|
+
|
1597
|
+
|
1598
|
+
|
1599
|
+
|
1600
|
+
|
1601
|
+
|
1602
|
+
|
1603
|
+
|
1604
|
+
|
1605
|
+
|
1606
|
+
|
1607
|
+
|
1608
|
+
</xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
|
1609
|
+
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
1610
|
+
|
1611
|
+
|
1612
|
+
|
1613
|
+
|
1614
|
+
<xsl:attribute name="font-size">60%</xsl:attribute>
|
1615
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1616
|
+
|
1617
|
+
|
1618
|
+
|
1619
|
+
|
1620
|
+
|
1621
|
+
|
1622
|
+
|
1623
|
+
|
1624
|
+
|
1625
|
+
|
1626
|
+
|
1627
|
+
|
1628
|
+
|
1629
|
+
</xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
|
1630
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1631
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1632
|
+
<xsl:attribute name="start-indent">0pt</xsl:attribute>
|
1633
|
+
|
1634
|
+
|
1635
|
+
|
1636
|
+
|
1637
|
+
|
1638
|
+
|
1639
|
+
|
1640
|
+
|
1641
|
+
|
1642
|
+
|
1643
|
+
|
1644
|
+
</xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
|
1645
|
+
|
1646
|
+
|
1647
|
+
|
1648
|
+
</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">
|
1336
1649
|
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1337
1650
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1338
1651
|
<xsl:apply-templates select="." mode="contents"/>
|
1339
1652
|
</xsl:for-each>
|
1340
|
-
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1341
|
-
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1342
|
-
|
1343
|
-
<!-- Normative references -->
|
1344
|
-
<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"/>
|
1345
|
-
<!-- Terms and definitions -->
|
1346
|
-
<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"/>
|
1347
|
-
<!-- Another main sections -->
|
1348
|
-
<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"/>
|
1349
|
-
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
1350
|
-
<!-- Bibliography -->
|
1351
|
-
<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"/>
|
1352
|
-
|
1353
1653
|
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1354
1654
|
|
1355
1655
|
<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']]">
|
@@ -1366,29 +1666,11 @@
|
|
1366
1666
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1367
1667
|
<xsl:apply-templates select="." mode="contents"/>
|
1368
1668
|
</xsl:for-each>
|
1369
|
-
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1370
|
-
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1371
|
-
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1372
|
-
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1373
|
-
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1374
|
-
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1375
1669
|
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1376
1670
|
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1377
1671
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1378
1672
|
<xsl:apply-templates select="."/>
|
1379
1673
|
</xsl:for-each>
|
1380
|
-
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1381
|
-
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1382
|
-
|
1383
|
-
<!-- Normative references -->
|
1384
|
-
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
1385
|
-
<!-- Terms and definitions -->
|
1386
|
-
<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']]"/>
|
1387
|
-
<!-- Another main sections -->
|
1388
|
-
<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'])]"/>
|
1389
|
-
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1390
|
-
<!-- Bibliography -->
|
1391
|
-
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1392
1674
|
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1393
1675
|
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1394
1676
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -1425,43 +1707,19 @@
|
|
1425
1707
|
<xsl:call-template name="getSimpleTable"/>
|
1426
1708
|
</xsl:variable>
|
1427
1709
|
|
1428
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
1429
|
-
<fo:block> </fo:block>
|
1430
|
-
</xsl:if> -->
|
1431
|
-
|
1432
1710
|
|
1433
1711
|
<!-- Display table's name before table as standalone block -->
|
1434
1712
|
<!-- $namespace = 'iso' or -->
|
1435
1713
|
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1714
|
+
<xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
|
1715
|
+
|
1441
1716
|
|
1442
|
-
<xsl:call-template name="fn_name_display"/>
|
1443
1717
|
|
1718
|
+
<xsl:call-template name="table_name_fn_display"/>
|
1444
1719
|
|
1445
1720
|
|
1446
1721
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
1447
1722
|
|
1448
|
-
<!-- <xsl:variable name="cols-count">
|
1449
|
-
<xsl:choose>
|
1450
|
-
<xsl:when test="*[local-name()='thead']">
|
1451
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1452
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1453
|
-
</xsl:call-template>
|
1454
|
-
</xsl:when>
|
1455
|
-
<xsl:otherwise>
|
1456
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1457
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1458
|
-
</xsl:call-template>
|
1459
|
-
</xsl:otherwise>
|
1460
|
-
</xsl:choose>
|
1461
|
-
</xsl:variable> -->
|
1462
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1463
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1464
|
-
|
1465
1723
|
<xsl:variable name="colwidths">
|
1466
1724
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1467
1725
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1472,17 +1730,8 @@
|
|
1472
1730
|
</xsl:variable>
|
1473
1731
|
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1474
1732
|
|
1475
|
-
<!-- <xsl:variable name="colwidths2">
|
1476
|
-
<xsl:call-template name="calculate-column-widths">
|
1477
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1478
|
-
</xsl:call-template>
|
1479
|
-
</xsl:variable> -->
|
1480
|
-
|
1481
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1482
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1483
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1484
1733
|
|
1485
|
-
<xsl:variable name="margin-
|
1734
|
+
<xsl:variable name="margin-side">
|
1486
1735
|
<xsl:choose>
|
1487
1736
|
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1488
1737
|
<xsl:otherwise>0</xsl:otherwise>
|
@@ -1490,65 +1739,67 @@
|
|
1490
1739
|
</xsl:variable>
|
1491
1740
|
|
1492
1741
|
|
1493
|
-
<fo:block-container
|
1494
|
-
|
1495
|
-
|
1496
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1742
|
+
<fo:block-container xsl:use-attribute-sets="table-container-style">
|
1743
|
+
|
1502
1744
|
|
1745
|
+
<xsl:attribute name="margin-left"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
|
1746
|
+
<xsl:attribute name="margin-right"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
|
1503
1747
|
|
1504
|
-
|
1748
|
+
|
1505
1749
|
|
1750
|
+
|
1506
1751
|
|
1752
|
+
|
1507
1753
|
|
1508
1754
|
|
1509
1755
|
|
1756
|
+
|
1510
1757
|
|
1511
1758
|
|
1512
1759
|
|
1513
1760
|
|
1514
1761
|
|
1762
|
+
<!-- end table block-container attributes -->
|
1515
1763
|
|
1516
1764
|
<!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
|
1517
1765
|
|
1518
1766
|
|
1767
|
+
<xsl:variable name="table_width_default">100%</xsl:variable>
|
1519
1768
|
<xsl:variable name="table_width">
|
1520
1769
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1770
|
+
<xsl:value-of select="$table_width_default"/>
|
1524
1771
|
</xsl:variable>
|
1525
1772
|
|
1773
|
+
|
1526
1774
|
<xsl:variable name="table_attributes">
|
1527
|
-
|
1528
|
-
<
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1775
|
+
|
1776
|
+
<xsl:element name="table_attributes" use-attribute-sets="table-style">
|
1777
|
+
<xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
|
1778
|
+
|
1779
|
+
|
1780
|
+
<xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
|
1781
|
+
<xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
|
1782
|
+
|
1783
|
+
|
1784
|
+
|
1785
|
+
|
1786
|
+
|
1787
|
+
|
1788
|
+
|
1789
|
+
|
1790
|
+
|
1791
|
+
|
1792
|
+
|
1793
|
+
|
1794
|
+
|
1795
|
+
</xsl:element>
|
1545
1796
|
</xsl:variable>
|
1546
1797
|
|
1547
1798
|
|
1548
|
-
<fo:table id="{@id}"
|
1799
|
+
<fo:table id="{@id}">
|
1549
1800
|
|
1550
|
-
<xsl:for-each select="xalan:nodeset($table_attributes)/
|
1551
|
-
<xsl:attribute name="{
|
1801
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
|
1802
|
+
<xsl:attribute name="{local-name()}">
|
1552
1803
|
<xsl:value-of select="."/>
|
1553
1804
|
</xsl:attribute>
|
1554
1805
|
</xsl:for-each>
|
@@ -1559,7 +1810,6 @@
|
|
1559
1810
|
</xsl:if>
|
1560
1811
|
|
1561
1812
|
|
1562
|
-
|
1563
1813
|
<xsl:choose>
|
1564
1814
|
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1565
1815
|
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
@@ -1585,7 +1835,7 @@
|
|
1585
1835
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1586
1836
|
</xsl:when>
|
1587
1837
|
<xsl:otherwise>
|
1588
|
-
<xsl:apply-templates/>
|
1838
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
1589
1839
|
</xsl:otherwise>
|
1590
1840
|
</xsl:choose>
|
1591
1841
|
|
@@ -1600,25 +1850,6 @@
|
|
1600
1850
|
</xsl:call-template>
|
1601
1851
|
</xsl:for-each>
|
1602
1852
|
|
1603
|
-
<!-- insert footer as table -->
|
1604
|
-
<!-- <fo:table>
|
1605
|
-
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1606
|
-
<xsl:attribute name="{@name}">
|
1607
|
-
<xsl:value-of select="."/>
|
1608
|
-
</xsl:attribute>
|
1609
|
-
</xsl:for-each>
|
1610
|
-
|
1611
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1612
|
-
<xsl:choose>
|
1613
|
-
<xsl:when test=". = 1 or . = 0">
|
1614
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
1615
|
-
</xsl:when>
|
1616
|
-
<xsl:otherwise>
|
1617
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
1618
|
-
</xsl:otherwise>
|
1619
|
-
</xsl:choose>
|
1620
|
-
</xsl:for-each>
|
1621
|
-
</fo:table>-->
|
1622
1853
|
|
1623
1854
|
|
1624
1855
|
|
@@ -1679,18 +1910,17 @@
|
|
1679
1910
|
</xsl:otherwise>
|
1680
1911
|
</xsl:choose>
|
1681
1912
|
|
1682
|
-
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"
|
1913
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
1683
1914
|
<xsl:param name="continued"/>
|
1684
1915
|
<xsl:if test="normalize-space() != ''">
|
1685
1916
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1686
|
-
|
1917
|
+
|
1687
1918
|
|
1688
1919
|
|
1689
1920
|
|
1690
1921
|
|
1691
1922
|
<xsl:choose>
|
1692
1923
|
<xsl:when test="$continued = 'true'">
|
1693
|
-
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
1694
1924
|
|
1695
1925
|
</xsl:when>
|
1696
1926
|
<xsl:otherwise>
|
@@ -1753,13 +1983,6 @@
|
|
1753
1983
|
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
1754
1984
|
<xsl:variable name="td_text">
|
1755
1985
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1756
|
-
|
1757
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
1758
|
-
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1759
|
-
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1760
|
-
</xsl:for-each>
|
1761
|
-
</xsl:if> -->
|
1762
|
-
|
1763
1986
|
</xsl:variable>
|
1764
1987
|
<xsl:variable name="words">
|
1765
1988
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1796,7 +2019,6 @@
|
|
1796
2019
|
</xsl:otherwise>
|
1797
2020
|
</xsl:choose>
|
1798
2021
|
</xsl:variable>
|
1799
|
-
|
1800
2022
|
|
1801
2023
|
<column>
|
1802
2024
|
<xsl:for-each select="xalan:nodeset($widths)//width">
|
@@ -1832,7 +2054,6 @@
|
|
1832
2054
|
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1833
2055
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1834
2056
|
<xsl:param name="cols-count"/>
|
1835
|
-
<!-- font-weight="bold" -->
|
1836
2057
|
<fo:table-header>
|
1837
2058
|
|
1838
2059
|
|
@@ -1844,13 +2065,12 @@
|
|
1844
2065
|
<fo:table-row>
|
1845
2066
|
<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">
|
1846
2067
|
|
1847
|
-
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']"
|
2068
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
1848
2069
|
<xsl:with-param name="continued">true</xsl:with-param>
|
1849
2070
|
</xsl:apply-templates>
|
1850
2071
|
|
1851
2072
|
|
1852
2073
|
|
1853
|
-
|
1854
2074
|
</fo:table-cell>
|
1855
2075
|
</fo:table-row>
|
1856
2076
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -1866,64 +2086,6 @@
|
|
1866
2086
|
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1867
2087
|
</fo:table-footer>
|
1868
2088
|
</xsl:if>
|
1869
|
-
</xsl:template><xsl:template name="insertTableFooter2">
|
1870
|
-
<xsl:param name="cols-count"/>
|
1871
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1872
|
-
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
1873
|
-
|
1874
|
-
<fo:table-footer>
|
1875
|
-
|
1876
|
-
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1877
|
-
|
1878
|
-
<!-- if there are note(s) or fn(s) then create footer row -->
|
1879
|
-
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1883
|
-
<fo:table-row>
|
1884
|
-
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
<!-- fn will be processed inside 'note' processing -->
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
|
-
<!-- except gb -->
|
1896
|
-
|
1897
|
-
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1898
|
-
|
1899
|
-
|
1900
|
-
<!-- show Note under table in preface (ex. abstract) sections -->
|
1901
|
-
<!-- empty, because notes show at page side in main sections -->
|
1902
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
1903
|
-
<xsl:choose>
|
1904
|
-
<xsl:when test="ancestor::*[local-name()='preface']">
|
1905
|
-
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1906
|
-
</xsl:when>
|
1907
|
-
<xsl:otherwise>
|
1908
|
-
<fo:block/>
|
1909
|
-
</xsl:otherwise>
|
1910
|
-
</xsl:choose>
|
1911
|
-
</xsl:if> -->
|
1912
|
-
|
1913
|
-
|
1914
|
-
<!-- horizontal row separator -->
|
1915
|
-
|
1916
|
-
|
1917
|
-
<!-- fn processing -->
|
1918
|
-
<xsl:call-template name="fn_display"/>
|
1919
|
-
|
1920
|
-
</fo:table-cell>
|
1921
|
-
</fo:table-row>
|
1922
|
-
|
1923
|
-
</xsl:if>
|
1924
|
-
</fo:table-footer>
|
1925
|
-
|
1926
|
-
</xsl:if>
|
1927
2089
|
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
1928
2090
|
<xsl:param name="table_attributes"/>
|
1929
2091
|
<xsl:param name="colwidths"/>
|
@@ -1949,17 +2111,18 @@
|
|
1949
2111
|
</xsl:variable>
|
1950
2112
|
|
1951
2113
|
<fo:table keep-with-previous="always">
|
1952
|
-
<xsl:for-each select="xalan:nodeset($table_attributes)/
|
2114
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
|
2115
|
+
<xsl:variable name="name" select="local-name()"/>
|
1953
2116
|
<xsl:choose>
|
1954
|
-
<xsl:when test="
|
1955
|
-
<xsl:attribute name="{
|
2117
|
+
<xsl:when test="$name = 'border-top'">
|
2118
|
+
<xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
|
1956
2119
|
</xsl:when>
|
1957
|
-
<xsl:when test="
|
1958
|
-
<xsl:attribute name="{
|
2120
|
+
<xsl:when test="$name = 'border'">
|
2121
|
+
<xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
|
1959
2122
|
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
1960
2123
|
</xsl:when>
|
1961
2124
|
<xsl:otherwise>
|
1962
|
-
<xsl:attribute name="{
|
2125
|
+
<xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
|
1963
2126
|
</xsl:otherwise>
|
1964
2127
|
</xsl:choose>
|
1965
2128
|
</xsl:for-each>
|
@@ -1988,9 +2151,10 @@
|
|
1988
2151
|
|
1989
2152
|
<fo:table-body>
|
1990
2153
|
<fo:table-row>
|
1991
|
-
<fo:table-cell
|
2154
|
+
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
1992
2155
|
|
1993
2156
|
|
2157
|
+
|
1994
2158
|
|
1995
2159
|
|
1996
2160
|
<!-- fn will be processed inside 'note' processing -->
|
@@ -2000,37 +2164,20 @@
|
|
2000
2164
|
|
2001
2165
|
|
2002
2166
|
|
2003
|
-
|
2004
|
-
|
2005
|
-
|
2006
2167
|
<!-- for BSI (not PAS) display Notes before footnotes -->
|
2007
2168
|
|
2008
2169
|
|
2009
|
-
<!-- except gb -->
|
2010
|
-
|
2011
|
-
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2170
|
+
<!-- except gb and bsi -->
|
2012
2171
|
|
2013
|
-
|
2014
|
-
|
2015
|
-
<xsl:choose>
|
2016
|
-
<xsl:when test="ancestor::*[local-name()='preface']">
|
2017
|
-
show Note under table in preface (ex. abstract) sections
|
2018
|
-
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2019
|
-
</xsl:when>
|
2020
|
-
<xsl:otherwise>
|
2021
|
-
empty, because notes show at page side in main sections
|
2022
|
-
<fo:block/>
|
2023
|
-
</xsl:otherwise>
|
2024
|
-
</xsl:choose>
|
2025
|
-
</xsl:if> -->
|
2172
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2173
|
+
|
2026
2174
|
|
2027
2175
|
|
2028
2176
|
<!-- horizontal row separator -->
|
2029
2177
|
|
2030
2178
|
|
2031
2179
|
<!-- fn processing -->
|
2032
|
-
<xsl:call-template name="
|
2033
|
-
|
2180
|
+
<xsl:call-template name="table_fn_display"/>
|
2034
2181
|
|
2035
2182
|
<!-- for PAS display Notes after footnotes -->
|
2036
2183
|
|
@@ -2072,78 +2219,57 @@
|
|
2072
2219
|
|
2073
2220
|
|
2074
2221
|
<xsl:apply-templates/>
|
2075
|
-
|
2076
|
-
|
2222
|
+
|
2077
2223
|
</fo:table-body>
|
2078
2224
|
|
2079
|
-
</xsl:template><xsl:template match="*[local-name()='
|
2080
|
-
<xsl:
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2084
|
-
|
2085
|
-
|
2086
|
-
|
2087
|
-
</xsl:choose>
|
2088
|
-
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
|
2089
|
-
<xsl:apply-templates mode="presentation_name"/>
|
2090
|
-
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
|
2091
|
-
<xsl:apply-templates select="."/>
|
2092
|
-
</xsl:template><xsl:template match="*[local-name()='tr']">
|
2093
|
-
<xsl:variable name="parent-name" select="local-name(..)"/>
|
2094
|
-
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
2095
|
-
<fo:table-row min-height="4mm">
|
2096
|
-
<xsl:if test="$parent-name = 'thead'">
|
2097
|
-
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2104
|
-
|
2105
|
-
|
2106
|
-
</xsl:if>
|
2107
|
-
<xsl:if test="$parent-name = 'tfoot'">
|
2108
|
-
|
2109
|
-
|
2110
|
-
|
2111
|
-
</xsl:if>
|
2112
|
-
|
2113
|
-
|
2114
|
-
|
2115
|
-
|
2116
|
-
|
2117
|
-
|
2118
|
-
|
2119
|
-
|
2120
|
-
|
2121
|
-
|
2122
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
2123
|
-
<xsl:attribute name="height">8mm</xsl:attribute>
|
2124
|
-
</xsl:if> -->
|
2125
|
-
|
2126
|
-
<xsl:apply-templates/>
|
2127
|
-
</fo:table-row>
|
2128
|
-
</xsl:template><xsl:template match="*[local-name()='th']">
|
2129
|
-
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
2130
|
-
<xsl:attribute name="text-align">
|
2131
|
-
<xsl:choose>
|
2132
|
-
<xsl:when test="@align">
|
2133
|
-
<xsl:call-template name="setAlignment"/>
|
2134
|
-
<!-- <xsl:value-of select="@align"/> -->
|
2135
|
-
</xsl:when>
|
2136
|
-
<xsl:otherwise>center</xsl:otherwise>
|
2137
|
-
</xsl:choose>
|
2138
|
-
</xsl:attribute>
|
2225
|
+
</xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
2226
|
+
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
2227
|
+
|
2228
|
+
|
2229
|
+
|
2230
|
+
|
2231
|
+
|
2232
|
+
|
2139
2233
|
|
2234
|
+
<xsl:call-template name="setTableRowAttributes"/>
|
2140
2235
|
|
2236
|
+
<xsl:apply-templates/>
|
2237
|
+
</fo:table-row>
|
2238
|
+
</xsl:template><xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
|
2239
|
+
<fo:table-row xsl:use-attribute-sets="table-footer-row-style">
|
2240
|
+
|
2241
|
+
<xsl:call-template name="setTableRowAttributes"/>
|
2242
|
+
<xsl:apply-templates/>
|
2243
|
+
</fo:table-row>
|
2244
|
+
</xsl:template><xsl:template match="*[local-name()='tr']">
|
2245
|
+
<fo:table-row xsl:use-attribute-sets="table-body-row-style">
|
2246
|
+
|
2141
2247
|
|
2248
|
+
|
2142
2249
|
|
2250
|
+
|
2251
|
+
<xsl:call-template name="setTableRowAttributes"/>
|
2252
|
+
<xsl:apply-templates/>
|
2253
|
+
</fo:table-row>
|
2254
|
+
</xsl:template><xsl:template name="setTableRowAttributes">
|
2255
|
+
|
2256
|
+
|
2257
|
+
|
2258
|
+
|
2259
|
+
|
2260
|
+
|
2261
|
+
|
2262
|
+
|
2263
|
+
</xsl:template><xsl:template match="*[local-name()='th']">
|
2264
|
+
<fo:table-cell xsl:use-attribute-sets="table-header-cell-style"> <!-- text-align="{@align}" -->
|
2265
|
+
<xsl:call-template name="setTextAlignment">
|
2266
|
+
<xsl:with-param name="default">center</xsl:with-param>
|
2267
|
+
</xsl:call-template>
|
2143
2268
|
|
2144
2269
|
|
2145
2270
|
|
2146
2271
|
|
2272
|
+
|
2147
2273
|
|
2148
2274
|
|
2149
2275
|
|
@@ -2152,21 +2278,25 @@
|
|
2152
2278
|
<xsl:if test="$lang = 'ar'">
|
2153
2279
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2154
2280
|
</xsl:if>
|
2155
|
-
|
2156
|
-
|
2157
|
-
|
2158
|
-
</xsl:attribute>
|
2159
|
-
</xsl:if>
|
2160
|
-
<xsl:if test="@rowspan">
|
2161
|
-
<xsl:attribute name="number-rows-spanned">
|
2162
|
-
<xsl:value-of select="@rowspan"/>
|
2163
|
-
</xsl:attribute>
|
2164
|
-
</xsl:if>
|
2165
|
-
<xsl:call-template name="display-align"/>
|
2281
|
+
|
2282
|
+
<xsl:call-template name="setTableCellAttributes"/>
|
2283
|
+
|
2166
2284
|
<fo:block>
|
2167
2285
|
<xsl:apply-templates/>
|
2168
2286
|
</fo:block>
|
2169
2287
|
</fo:table-cell>
|
2288
|
+
</xsl:template><xsl:template name="setTableCellAttributes">
|
2289
|
+
<xsl:if test="@colspan">
|
2290
|
+
<xsl:attribute name="number-columns-spanned">
|
2291
|
+
<xsl:value-of select="@colspan"/>
|
2292
|
+
</xsl:attribute>
|
2293
|
+
</xsl:if>
|
2294
|
+
<xsl:if test="@rowspan">
|
2295
|
+
<xsl:attribute name="number-rows-spanned">
|
2296
|
+
<xsl:value-of select="@rowspan"/>
|
2297
|
+
</xsl:attribute>
|
2298
|
+
</xsl:if>
|
2299
|
+
<xsl:call-template name="display-align"/>
|
2170
2300
|
</xsl:template><xsl:template name="display-align">
|
2171
2301
|
<xsl:if test="@valign">
|
2172
2302
|
<xsl:attribute name="display-align">
|
@@ -2179,22 +2309,19 @@
|
|
2179
2309
|
</xsl:attribute>
|
2180
2310
|
</xsl:if>
|
2181
2311
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
2182
|
-
<fo:table-cell text-align="{@align}"
|
2183
|
-
<xsl:
|
2184
|
-
<xsl:
|
2185
|
-
|
2186
|
-
|
2187
|
-
<!-- <xsl:value-of select="@align"/> -->
|
2188
|
-
</xsl:when>
|
2189
|
-
<xsl:otherwise>left</xsl:otherwise>
|
2190
|
-
</xsl:choose>
|
2191
|
-
</xsl:attribute>
|
2312
|
+
<fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
|
2313
|
+
<xsl:call-template name="setTextAlignment">
|
2314
|
+
<xsl:with-param name="default">left</xsl:with-param>
|
2315
|
+
</xsl:call-template>
|
2316
|
+
|
2192
2317
|
<xsl:if test="$lang = 'ar'">
|
2193
2318
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2194
2319
|
</xsl:if>
|
2195
2320
|
|
2196
2321
|
|
2197
2322
|
|
2323
|
+
<!-- bsi -->
|
2324
|
+
|
2198
2325
|
|
2199
2326
|
|
2200
2327
|
|
@@ -2202,36 +2329,36 @@
|
|
2202
2329
|
|
2203
2330
|
|
2204
2331
|
|
2332
|
+
|
2205
2333
|
|
2206
2334
|
|
2207
2335
|
|
2208
2336
|
|
2209
2337
|
|
2210
2338
|
|
2211
|
-
<xsl:if test=".//*[local-name() = 'table']">
|
2339
|
+
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
2212
2340
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2213
2341
|
</xsl:if>
|
2214
|
-
|
2215
|
-
|
2216
|
-
|
2217
|
-
</xsl:attribute>
|
2218
|
-
</xsl:if>
|
2219
|
-
<xsl:if test="@rowspan">
|
2220
|
-
<xsl:attribute name="number-rows-spanned">
|
2221
|
-
<xsl:value-of select="@rowspan"/>
|
2222
|
-
</xsl:attribute>
|
2223
|
-
</xsl:if>
|
2224
|
-
<xsl:call-template name="display-align"/>
|
2342
|
+
|
2343
|
+
<xsl:call-template name="setTableCellAttributes"/>
|
2344
|
+
|
2225
2345
|
<fo:block>
|
2226
|
-
|
2346
|
+
|
2347
|
+
|
2348
|
+
|
2227
2349
|
<xsl:apply-templates/>
|
2228
2350
|
</fo:block>
|
2229
2351
|
</fo:table-cell>
|
2230
2352
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
|
2353
|
+
|
2354
|
+
<fo:block xsl:use-attribute-sets="table-note-style">
|
2355
|
+
|
2356
|
+
|
2357
|
+
|
2358
|
+
|
2231
2359
|
|
2232
|
-
|
2233
|
-
<fo:
|
2234
|
-
|
2360
|
+
<!-- Table's note name (NOTE, for example) -->
|
2361
|
+
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
2235
2362
|
|
2236
2363
|
|
2237
2364
|
|
@@ -2239,22 +2366,14 @@
|
|
2239
2366
|
|
2240
2367
|
|
2241
2368
|
|
2242
|
-
|
2243
|
-
|
2244
|
-
<fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
|
2245
|
-
|
2369
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
2246
2370
|
|
2247
|
-
|
2248
|
-
|
2249
|
-
|
2250
|
-
|
2251
|
-
|
2252
|
-
|
2253
|
-
|
2254
|
-
|
2255
|
-
|
2256
|
-
<xsl:apply-templates mode="process"/>
|
2257
|
-
</fo:block>
|
2371
|
+
</fo:inline>
|
2372
|
+
|
2373
|
+
|
2374
|
+
|
2375
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]" mode="process"/>
|
2376
|
+
</fo:block>
|
2258
2377
|
|
2259
2378
|
</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">
|
2260
2379
|
<xsl:apply-templates/>
|
@@ -2334,8 +2453,7 @@
|
|
2334
2453
|
<xsl:copy-of select="$footnote_inline"/>
|
2335
2454
|
<fo:footnote-body>
|
2336
2455
|
|
2337
|
-
<fo:block-container
|
2338
|
-
|
2456
|
+
<fo:block-container xsl:use-attribute-sets="fn-container-body-style">
|
2339
2457
|
|
2340
2458
|
<fo:block xsl:use-attribute-sets="fn-body-style">
|
2341
2459
|
|
@@ -2354,7 +2472,7 @@
|
|
2354
2472
|
<xsl:copy-of select="$footnote_inline"/>
|
2355
2473
|
</xsl:otherwise>
|
2356
2474
|
</xsl:choose>
|
2357
|
-
</xsl:template><xsl:template name="
|
2475
|
+
</xsl:template><xsl:template name="table_fn_display">
|
2358
2476
|
<xsl:variable name="references">
|
2359
2477
|
|
2360
2478
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
@@ -2365,33 +2483,26 @@
|
|
2365
2483
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
2366
2484
|
<xsl:variable name="reference" select="@reference"/>
|
2367
2485
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
2368
|
-
<fo:block
|
2486
|
+
<fo:block xsl:use-attribute-sets="table-fn-style">
|
2369
2487
|
|
2370
2488
|
|
2371
2489
|
|
2372
|
-
|
2373
|
-
|
2374
|
-
|
2375
|
-
|
2376
|
-
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
2490
|
+
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
2377
2491
|
|
2378
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2379
2492
|
|
2380
2493
|
|
2381
2494
|
|
2382
2495
|
|
2496
|
+
<xsl:value-of select="@reference"/>
|
2383
2497
|
|
2384
2498
|
|
2385
2499
|
|
2386
2500
|
|
2387
|
-
<xsl:value-of select="@reference"/>
|
2388
2501
|
|
2389
2502
|
|
2390
2503
|
|
2391
2504
|
</fo:inline>
|
2392
|
-
<fo:inline>
|
2393
|
-
|
2394
|
-
<!-- <xsl:apply-templates /> -->
|
2505
|
+
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
2395
2506
|
<xsl:copy-of select="./node()"/>
|
2396
2507
|
</fo:inline>
|
2397
2508
|
</fo:block>
|
@@ -2403,15 +2514,7 @@
|
|
2403
2514
|
|
2404
2515
|
<xsl:apply-templates/>
|
2405
2516
|
</fn>
|
2406
|
-
</xsl:template><xsl:template name="
|
2407
|
-
<!-- <xsl:variable name="references">
|
2408
|
-
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
2409
|
-
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2410
|
-
<xsl:apply-templates />
|
2411
|
-
</fn>
|
2412
|
-
</xsl:for-each>
|
2413
|
-
</xsl:variable>
|
2414
|
-
$references=<xsl:copy-of select="$references"/> -->
|
2517
|
+
</xsl:template><xsl:template name="table_name_fn_display">
|
2415
2518
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
2416
2519
|
<xsl:variable name="reference" select="@reference"/>
|
2417
2520
|
<fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
|
@@ -2420,9 +2523,7 @@
|
|
2420
2523
|
</fo:block>
|
2421
2524
|
</xsl:for-each>
|
2422
2525
|
</xsl:template><xsl:template name="fn_display_figure">
|
2423
|
-
|
2424
|
-
<!-- and (not(@class) or @class !='pseudocode') -->
|
2425
|
-
</xsl:variable>
|
2526
|
+
|
2426
2527
|
<xsl:variable name="references">
|
2427
2528
|
<xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
|
2428
2529
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
@@ -2430,50 +2531,52 @@
|
|
2430
2531
|
</fn>
|
2431
2532
|
</xsl:for-each>
|
2432
2533
|
</xsl:variable>
|
2534
|
+
|
2535
|
+
<xsl:if test="xalan:nodeset($references)//fn">
|
2433
2536
|
|
2434
|
-
|
2435
|
-
|
2436
|
-
|
2437
|
-
|
2438
|
-
|
2537
|
+
<xsl:variable name="key_iso">
|
2538
|
+
|
2539
|
+
</xsl:variable>
|
2540
|
+
|
2541
|
+
<!-- current hierarchy is 'figure' element -->
|
2542
|
+
<xsl:variable name="following_dl_colwidths">
|
2543
|
+
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
2544
|
+
<xsl:variable name="html-table">
|
2545
|
+
<xsl:variable name="doc_ns">
|
2546
|
+
|
2547
|
+
</xsl:variable>
|
2548
|
+
<xsl:variable name="ns">
|
2549
|
+
<xsl:choose>
|
2550
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2551
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2552
|
+
</xsl:when>
|
2553
|
+
<xsl:otherwise>
|
2554
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2555
|
+
</xsl:otherwise>
|
2556
|
+
</xsl:choose>
|
2557
|
+
</xsl:variable>
|
2439
2558
|
|
2440
|
-
</xsl:variable>
|
2441
|
-
<xsl:variable name="ns">
|
2442
|
-
<xsl:choose>
|
2443
|
-
<xsl:when test="normalize-space($doc_ns) != ''">
|
2444
|
-
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2445
|
-
</xsl:when>
|
2446
|
-
<xsl:otherwise>
|
2447
|
-
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2448
|
-
</xsl:otherwise>
|
2449
|
-
</xsl:choose>
|
2450
|
-
</xsl:variable>
|
2451
|
-
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2452
|
-
<!-- <xsl:element name="{$ns}:table"> -->
|
2453
2559
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2454
2560
|
<tbody>
|
2455
2561
|
<xsl:apply-templates mode="dl"/>
|
2456
2562
|
</tbody>
|
2457
2563
|
</xsl:for-each>
|
2458
|
-
|
2459
|
-
|
2460
|
-
|
2461
|
-
|
2462
|
-
|
2463
|
-
|
2464
|
-
|
2465
|
-
|
2466
|
-
</xsl:
|
2467
|
-
|
2468
|
-
|
2469
|
-
|
2470
|
-
|
2471
|
-
|
2472
|
-
|
2473
|
-
|
2474
|
-
</xsl:variable>
|
2475
|
-
|
2476
|
-
<xsl:if test="xalan:nodeset($references)//fn">
|
2564
|
+
</xsl:variable>
|
2565
|
+
|
2566
|
+
<xsl:call-template name="calculate-column-widths">
|
2567
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2568
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2569
|
+
</xsl:call-template>
|
2570
|
+
|
2571
|
+
</xsl:if>
|
2572
|
+
</xsl:variable>
|
2573
|
+
|
2574
|
+
<xsl:variable name="maxlength_dt">
|
2575
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2576
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2577
|
+
</xsl:for-each>
|
2578
|
+
</xsl:variable>
|
2579
|
+
|
2477
2580
|
<fo:block>
|
2478
2581
|
<fo:table width="95%" table-layout="fixed">
|
2479
2582
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
@@ -2500,20 +2603,18 @@
|
|
2500
2603
|
<fo:table-row>
|
2501
2604
|
<fo:table-cell>
|
2502
2605
|
<fo:block>
|
2503
|
-
<fo:inline
|
2504
|
-
|
2606
|
+
<fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
|
2505
2607
|
<xsl:value-of select="@reference"/>
|
2506
2608
|
</fo:inline>
|
2507
2609
|
</fo:block>
|
2508
2610
|
</fo:table-cell>
|
2509
2611
|
<fo:table-cell>
|
2510
|
-
<fo:block
|
2511
|
-
|
2612
|
+
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
2512
2613
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2513
|
-
|
2614
|
+
|
2615
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2616
|
+
|
2514
2617
|
</xsl:if>
|
2515
|
-
|
2516
|
-
<!-- <xsl:apply-templates /> -->
|
2517
2618
|
<xsl:copy-of select="./node()"/>
|
2518
2619
|
</fo:block>
|
2519
2620
|
</fo:table-cell>
|
@@ -2526,14 +2627,8 @@
|
|
2526
2627
|
</xsl:if>
|
2527
2628
|
|
2528
2629
|
</xsl:template><xsl:template match="*[local-name()='fn']">
|
2529
|
-
|
2530
|
-
|
2531
|
-
|
2532
|
-
|
2533
|
-
|
2534
|
-
|
2535
|
-
|
2536
|
-
|
2630
|
+
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
2631
|
+
|
2537
2632
|
|
2538
2633
|
|
2539
2634
|
|
@@ -2557,10 +2652,10 @@
|
|
2557
2652
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
2558
2653
|
<fo:block-container>
|
2559
2654
|
|
2560
|
-
|
2561
|
-
|
2562
|
-
|
2563
|
-
|
2655
|
+
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
2656
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2657
|
+
</xsl:if>
|
2658
|
+
|
2564
2659
|
|
2565
2660
|
<xsl:if test="parent::*[local-name() = 'note']">
|
2566
2661
|
<xsl:attribute name="margin-left">
|
@@ -2577,11 +2672,11 @@
|
|
2577
2672
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2578
2673
|
</xsl:call-template>
|
2579
2674
|
|
2580
|
-
<fo:block-container>
|
2581
|
-
|
2582
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2583
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2675
|
+
<fo:block-container margin-left="0mm">
|
2676
|
+
|
2584
2677
|
|
2678
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2679
|
+
|
2585
2680
|
|
2586
2681
|
<xsl:variable name="parent" select="local-name(..)"/>
|
2587
2682
|
|
@@ -2592,20 +2687,19 @@
|
|
2592
2687
|
<xsl:choose>
|
2593
2688
|
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2594
2689
|
|
2595
|
-
|
2596
|
-
|
2597
|
-
|
2598
|
-
|
2599
|
-
|
2600
|
-
|
2601
|
-
</xsl:
|
2602
|
-
|
2603
|
-
|
2604
|
-
|
2605
|
-
|
2606
|
-
|
2607
|
-
|
2608
|
-
|
2690
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2691
|
+
|
2692
|
+
<xsl:variable name="title-where">
|
2693
|
+
<xsl:call-template name="getLocalizedString">
|
2694
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
2695
|
+
</xsl:call-template>
|
2696
|
+
</xsl:variable>
|
2697
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2698
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2699
|
+
<xsl:text/>
|
2700
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2701
|
+
</fo:block>
|
2702
|
+
|
2609
2703
|
</xsl:when>
|
2610
2704
|
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2611
2705
|
<fo:block margin-bottom="12pt" text-align="left">
|
@@ -2652,9 +2746,7 @@
|
|
2652
2746
|
<fo:table width="95%" table-layout="fixed">
|
2653
2747
|
|
2654
2748
|
<xsl:choose>
|
2655
|
-
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"
|
2656
|
-
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2657
|
-
</xsl:when>
|
2749
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
|
2658
2750
|
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2659
2751
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2660
2752
|
|
@@ -2675,12 +2767,9 @@
|
|
2675
2767
|
</xsl:otherwise>
|
2676
2768
|
</xsl:choose>
|
2677
2769
|
</xsl:variable>
|
2678
|
-
|
2679
|
-
|
2680
|
-
|
2681
|
-
<xsl:apply-templates mode="dl"/>
|
2682
|
-
</tbody>
|
2683
|
-
<!-- </xsl:element> -->
|
2770
|
+
<tbody>
|
2771
|
+
<xsl:apply-templates mode="dl"/>
|
2772
|
+
</tbody>
|
2684
2773
|
</xsl:variable>
|
2685
2774
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2686
2775
|
<xsl:variable name="colwidths">
|
@@ -2760,8 +2849,6 @@
|
|
2760
2849
|
</xsl:for-each>
|
2761
2850
|
</xsl:otherwise>
|
2762
2851
|
</xsl:choose>
|
2763
|
-
<!-- <fo:table-column column-width="15%"/>
|
2764
|
-
<fo:table-column column-width="85%"/> -->
|
2765
2852
|
</xsl:otherwise>
|
2766
2853
|
</xsl:choose>
|
2767
2854
|
</xsl:template><xsl:template name="getMaxLength_dt">
|
@@ -2776,12 +2863,6 @@
|
|
2776
2863
|
</xsl:for-each>
|
2777
2864
|
</xsl:variable>
|
2778
2865
|
<xsl:variable name="maxLength">
|
2779
|
-
<!-- <xsl:for-each select="*[local-name()='dt']">
|
2780
|
-
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
2781
|
-
<xsl:if test="position() = 1">
|
2782
|
-
<xsl:value-of select="string-length(normalize-space(.))"/>
|
2783
|
-
</xsl:if>
|
2784
|
-
</xsl:for-each> -->
|
2785
2866
|
<xsl:for-each select="xalan:nodeset($lengths)/length">
|
2786
2867
|
<xsl:sort select="." data-type="number" order="descending"/>
|
2787
2868
|
<xsl:if test="position() = 1">
|
@@ -2807,12 +2888,12 @@
|
|
2807
2888
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2808
2889
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2809
2890
|
</xsl:if>
|
2810
|
-
<xsl:apply-templates select="*[local-name() = 'name']"
|
2891
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
2811
2892
|
</fo:block>
|
2812
2893
|
</fo:table-cell>
|
2813
2894
|
<fo:table-cell>
|
2814
2895
|
<fo:block>
|
2815
|
-
<xsl:apply-templates/>
|
2896
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
2816
2897
|
</fo:block>
|
2817
2898
|
</fo:table-cell>
|
2818
2899
|
</fo:table-row>
|
@@ -2823,78 +2904,37 @@
|
|
2823
2904
|
</td>
|
2824
2905
|
<td>
|
2825
2906
|
|
2826
|
-
|
2827
|
-
|
2828
|
-
|
2907
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2908
|
+
|
2829
2909
|
</td>
|
2830
2910
|
</tr>
|
2831
2911
|
|
2832
2912
|
</xsl:template><xsl:template match="*[local-name()='dt']">
|
2833
2913
|
<xsl:param name="key_iso"/>
|
2834
2914
|
|
2835
|
-
<fo:table-row>
|
2836
|
-
|
2837
|
-
|
2915
|
+
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
2838
2916
|
<fo:table-cell>
|
2839
2917
|
|
2840
|
-
<fo:block
|
2918
|
+
<fo:block xsl:use-attribute-sets="dt-style">
|
2841
2919
|
<xsl:copy-of select="@id"/>
|
2842
2920
|
|
2843
|
-
|
2844
2921
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2845
2922
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2846
|
-
|
2847
2923
|
</xsl:if>
|
2848
2924
|
|
2849
2925
|
|
2850
|
-
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
2851
|
-
|
2852
|
-
|
2853
|
-
|
2854
|
-
|
2855
|
-
|
2856
2926
|
|
2857
2927
|
<xsl:apply-templates/>
|
2858
|
-
<!-- <xsl:if test="$namespace = 'gb'">
|
2859
|
-
<xsl:if test="ancestor::*[local-name()='formula']">
|
2860
|
-
<xsl:text>—</xsl:text>
|
2861
|
-
</xsl:if>
|
2862
|
-
</xsl:if> -->
|
2863
2928
|
</fo:block>
|
2864
2929
|
</fo:table-cell>
|
2865
2930
|
<fo:table-cell>
|
2866
2931
|
<fo:block>
|
2867
2932
|
|
2868
|
-
|
2869
|
-
|
2870
|
-
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2871
|
-
</xsl:if>
|
2872
|
-
</xsl:if> -->
|
2873
|
-
|
2874
|
-
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2875
|
-
|
2933
|
+
|
2934
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2876
2935
|
</fo:block>
|
2877
2936
|
</fo:table-cell>
|
2878
2937
|
</fo:table-row>
|
2879
|
-
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2880
|
-
<xsl:if test="local-name(*[1]) = 'stem'">
|
2881
|
-
<fo:table-row>
|
2882
|
-
<fo:table-cell>
|
2883
|
-
<fo:block margin-top="6pt">
|
2884
|
-
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2885
|
-
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2886
|
-
</xsl:if>
|
2887
|
-
<xsl:text> </xsl:text>
|
2888
|
-
</fo:block>
|
2889
|
-
</fo:table-cell>
|
2890
|
-
<fo:table-cell>
|
2891
|
-
<fo:block>
|
2892
|
-
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2893
|
-
</fo:block>
|
2894
|
-
</fo:table-cell>
|
2895
|
-
</fo:table-row>
|
2896
|
-
</xsl:if>
|
2897
|
-
</xsl:if> -->
|
2898
2938
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2899
2939
|
<xsl:apply-templates/>
|
2900
2940
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -2923,6 +2963,7 @@
|
|
2923
2963
|
</fo:inline>
|
2924
2964
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2925
2965
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2966
|
+
|
2926
2967
|
<xsl:variable name="_font-size">
|
2927
2968
|
|
2928
2969
|
10
|
@@ -2959,15 +3000,21 @@
|
|
2959
3000
|
<xsl:apply-templates/>
|
2960
3001
|
</fo:inline>
|
2961
3002
|
</xsl:template><xsl:template match="*[local-name()='add']">
|
3003
|
+
<xsl:param name="skip">true</xsl:param>
|
2962
3004
|
<xsl:choose>
|
2963
3005
|
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
|
2964
|
-
<
|
2965
|
-
<xsl:
|
2966
|
-
|
2967
|
-
<
|
2968
|
-
|
2969
|
-
|
2970
|
-
|
3006
|
+
<xsl:choose>
|
3007
|
+
<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>
|
3008
|
+
<xsl:otherwise>
|
3009
|
+
<fo:inline>
|
3010
|
+
<xsl:call-template name="insertTag">
|
3011
|
+
<xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
|
3012
|
+
<xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
3013
|
+
<xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
3014
|
+
</xsl:call-template>
|
3015
|
+
</fo:inline>
|
3016
|
+
</xsl:otherwise>
|
3017
|
+
</xsl:choose>
|
2971
3018
|
</xsl:when>
|
2972
3019
|
<xsl:when test="@amendment">
|
2973
3020
|
<fo:inline>
|
@@ -3010,8 +3057,6 @@
|
|
3010
3057
|
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
3011
3058
|
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
3012
3059
|
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
3013
|
-
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
3014
|
-
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
3015
3060
|
<xsl:attribute name="height">5mm</xsl:attribute>
|
3016
3061
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
3017
3062
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
@@ -3229,14 +3274,6 @@
|
|
3229
3274
|
|
3230
3275
|
<xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
|
3231
3276
|
|
3232
|
-
<!-- <xsl:choose>
|
3233
|
-
<xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
|
3234
|
-
|
3235
|
-
</xsl:when>
|
3236
|
-
<xsl:otherwise>
|
3237
|
-
<xsl:copy-of select="current()"/>
|
3238
|
-
</xsl:otherwise>
|
3239
|
-
</xsl:choose> -->
|
3240
3277
|
</xsl:variable>
|
3241
3278
|
<xsl:copy-of select="$simple-table"/>
|
3242
3279
|
</xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
|
@@ -3355,8 +3392,6 @@
|
|
3355
3392
|
<xsl:choose>
|
3356
3393
|
<xsl:when test="contains($str2, ' ')">
|
3357
3394
|
<xsl:variable name="substr" select="substring-before($str2, ' ')"/>
|
3358
|
-
<!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
|
3359
|
-
<xsl:value-of select="substring($substr, 2)"/> -->
|
3360
3395
|
<xsl:call-template name="capitalize">
|
3361
3396
|
<xsl:with-param name="str" select="$substr"/>
|
3362
3397
|
</xsl:call-template>
|
@@ -3366,8 +3401,6 @@
|
|
3366
3401
|
</xsl:call-template>
|
3367
3402
|
</xsl:when>
|
3368
3403
|
<xsl:otherwise>
|
3369
|
-
<!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
|
3370
|
-
<xsl:value-of select="substring($str2, 2)"/> -->
|
3371
3404
|
<xsl:call-template name="capitalize">
|
3372
3405
|
<xsl:with-param name="str" select="$str2"/>
|
3373
3406
|
</xsl:call-template>
|
@@ -3395,6 +3428,7 @@
|
|
3395
3428
|
<xsl:apply-templates select="." mode="mathml"/>
|
3396
3429
|
</xsl:variable>
|
3397
3430
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3431
|
+
|
3398
3432
|
|
3399
3433
|
|
3400
3434
|
<xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
|
@@ -3426,7 +3460,7 @@
|
|
3426
3460
|
</xsl:attribute>
|
3427
3461
|
|
3428
3462
|
|
3429
|
-
|
3463
|
+
|
3430
3464
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3431
3465
|
</fo:instream-foreign-object>
|
3432
3466
|
</fo:inline>
|
@@ -3485,6 +3519,10 @@
|
|
3485
3519
|
|
3486
3520
|
|
3487
3521
|
|
3522
|
+
|
3523
|
+
|
3524
|
+
|
3525
|
+
|
3488
3526
|
<xsl:choose>
|
3489
3527
|
<xsl:when test="$target_text = ''">
|
3490
3528
|
<xsl:apply-templates/>
|
@@ -3542,7 +3580,6 @@
|
|
3542
3580
|
</fo:inline>
|
3543
3581
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3544
3582
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3545
|
-
|
3546
3583
|
<xsl:apply-templates/>
|
3547
3584
|
</fo:basic-link>
|
3548
3585
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
@@ -3570,49 +3607,64 @@
|
|
3570
3607
|
<fo:inline>
|
3571
3608
|
<xsl:apply-templates/>
|
3572
3609
|
</fo:inline>
|
3573
|
-
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="
|
3610
|
+
</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 -->
|
3574
3611
|
<xsl:if test="normalize-space() != ''">
|
3575
3612
|
<xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
|
3576
3613
|
</xsl:if>
|
3577
3614
|
</xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
|
3578
3615
|
|
3579
3616
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
|
3617
|
+
|
3580
3618
|
|
3581
3619
|
|
3582
3620
|
|
3583
3621
|
|
3584
3622
|
|
3623
|
+
|
3624
|
+
|
3625
|
+
|
3626
|
+
|
3627
|
+
|
3585
3628
|
<fo:block-container margin-left="0mm">
|
3629
|
+
|
3586
3630
|
|
3587
3631
|
|
3588
3632
|
|
3633
|
+
|
3589
3634
|
|
3590
|
-
|
3591
|
-
|
3592
|
-
|
3593
|
-
|
3594
|
-
<fo:block>
|
3595
|
-
|
3596
|
-
|
3597
|
-
|
3598
|
-
|
3599
|
-
|
3635
|
+
<fo:block>
|
3636
|
+
|
3637
|
+
|
3600
3638
|
|
3601
|
-
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3602
3639
|
|
3603
|
-
|
3604
|
-
|
3605
|
-
|
3606
|
-
|
3607
|
-
|
3608
|
-
|
3640
|
+
|
3641
|
+
|
3642
|
+
|
3643
|
+
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3644
|
+
|
3645
|
+
|
3646
|
+
|
3647
|
+
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
3648
|
+
<xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
3649
|
+
<xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
3650
|
+
<xsl:with-param name="skip">false</xsl:with-param>
|
3651
|
+
</xsl:apply-templates>
|
3652
|
+
</xsl:if>
|
3653
|
+
|
3654
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
3655
|
+
|
3656
|
+
</fo:inline>
|
3657
|
+
|
3658
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
3659
|
+
</fo:block>
|
3660
|
+
|
3609
3661
|
</fo:block-container>
|
3610
3662
|
</fo:block-container>
|
3611
3663
|
|
3612
3664
|
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
3613
3665
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
3614
3666
|
<xsl:choose>
|
3615
|
-
<xsl:when test="$num = 1">
|
3667
|
+
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
3616
3668
|
<fo:inline xsl:use-attribute-sets="note-p-style">
|
3617
3669
|
<xsl:apply-templates/>
|
3618
3670
|
</fo:inline>
|
@@ -3627,12 +3679,16 @@
|
|
3627
3679
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3628
3680
|
|
3629
3681
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3682
|
+
|
3683
|
+
|
3684
|
+
|
3685
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
3630
3686
|
|
3631
|
-
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3632
3687
|
</fo:inline>
|
3633
|
-
|
3688
|
+
|
3689
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
3634
3690
|
</fo:block>
|
3635
|
-
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']
|
3691
|
+
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']">
|
3636
3692
|
<xsl:param name="sfx"/>
|
3637
3693
|
<xsl:variable name="suffix">
|
3638
3694
|
<xsl:choose>
|
@@ -3649,7 +3705,7 @@
|
|
3649
3705
|
<xsl:apply-templates/>
|
3650
3706
|
<xsl:value-of select="$suffix"/>
|
3651
3707
|
</xsl:if>
|
3652
|
-
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']"
|
3708
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']">
|
3653
3709
|
<xsl:param name="sfx"/>
|
3654
3710
|
<xsl:variable name="suffix">
|
3655
3711
|
<xsl:choose>
|
@@ -3674,25 +3730,23 @@
|
|
3674
3730
|
<xsl:apply-templates/>
|
3675
3731
|
</fo:block>
|
3676
3732
|
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
3677
|
-
<!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
|
3678
3733
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
3679
3734
|
|
3680
3735
|
|
3736
|
+
|
3737
|
+
|
3681
3738
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
3682
3739
|
|
3683
3740
|
</xsl:if>
|
3684
|
-
<xsl:apply-templates/>
|
3741
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
3685
3742
|
</fo:block>
|
3686
|
-
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"
|
3743
|
+
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
|
3687
3744
|
<xsl:if test="normalize-space() != ''">
|
3688
3745
|
<xsl:variable name="level">
|
3689
3746
|
<xsl:call-template name="getLevelTermName"/>
|
3690
3747
|
</xsl:variable>
|
3691
3748
|
<fo:inline role="H{$level}">
|
3692
3749
|
<xsl:apply-templates/>
|
3693
|
-
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
3694
|
-
<xsl:text>.</xsl:text>
|
3695
|
-
</xsl:if> -->
|
3696
3750
|
</fo:inline>
|
3697
3751
|
</xsl:if>
|
3698
3752
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
@@ -3705,9 +3759,10 @@
|
|
3705
3759
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3706
3760
|
</xsl:call-template>
|
3707
3761
|
|
3708
|
-
|
3709
|
-
|
3710
|
-
|
3762
|
+
|
3763
|
+
|
3764
|
+
<fo:block xsl:use-attribute-sets="figure-style">
|
3765
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
3711
3766
|
</fo:block>
|
3712
3767
|
<xsl:call-template name="fn_display_figure"/>
|
3713
3768
|
<xsl:for-each select="*[local-name() = 'note']">
|
@@ -3715,14 +3770,15 @@
|
|
3715
3770
|
</xsl:for-each>
|
3716
3771
|
|
3717
3772
|
|
3718
|
-
|
3773
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
|
3774
|
+
|
3719
3775
|
|
3720
3776
|
</fo:block-container>
|
3721
3777
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
3722
3778
|
<fo:block id="{@id}">
|
3723
|
-
<xsl:apply-templates/>
|
3779
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
3724
3780
|
</fo:block>
|
3725
|
-
<xsl:apply-templates select="*[local-name() = 'name']"
|
3781
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
3726
3782
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
|
3727
3783
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
3728
3784
|
<xsl:apply-templates/>
|
@@ -3829,9 +3885,7 @@
|
|
3829
3885
|
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
3830
3886
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
3831
3887
|
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3832
|
-
<!-- width=<xsl:value-of select="$width"/> -->
|
3833
3888
|
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3834
|
-
<!-- height=<xsl:value-of select="$height"/> -->
|
3835
3889
|
<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">
|
3836
3890
|
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
3837
3891
|
<xsl:call-template name="svg_cross">
|
@@ -4101,7 +4155,7 @@
|
|
4101
4155
|
</fo:basic-link>
|
4102
4156
|
</fo:block>
|
4103
4157
|
</fo:block-container>
|
4104
|
-
</xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']
|
4158
|
+
</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">
|
4105
4159
|
<xsl:apply-templates mode="contents"/>
|
4106
4160
|
<xsl:text> </xsl:text>
|
4107
4161
|
</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">
|
@@ -4254,8 +4308,6 @@
|
|
4254
4308
|
|
4255
4309
|
|
4256
4310
|
|
4257
|
-
|
4258
|
-
|
4259
4311
|
</fo:bookmark-tree>
|
4260
4312
|
</xsl:if>
|
4261
4313
|
</xsl:template><xsl:template name="insertFigureBookmarks">
|
@@ -4326,7 +4378,7 @@
|
|
4326
4378
|
<xsl:apply-templates mode="bookmark"/>
|
4327
4379
|
</xsl:otherwise>
|
4328
4380
|
</xsl:choose>
|
4329
|
-
</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']"
|
4381
|
+
</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']">
|
4330
4382
|
<xsl:if test="normalize-space() != ''">
|
4331
4383
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
4332
4384
|
|
@@ -4342,12 +4394,6 @@
|
|
4342
4394
|
<!-- <xsl:text> </xsl:text> -->
|
4343
4395
|
</xsl:template><xsl:template name="getSection">
|
4344
4396
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
4345
|
-
<!--
|
4346
|
-
<xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
|
4347
|
-
<xsl:value-of select="."/>
|
4348
|
-
</xsl:for-each>
|
4349
|
-
-->
|
4350
|
-
|
4351
4397
|
</xsl:template><xsl:template name="getName">
|
4352
4398
|
<xsl:choose>
|
4353
4399
|
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
@@ -4416,16 +4462,21 @@
|
|
4416
4462
|
<xsl:apply-templates mode="contents_item">
|
4417
4463
|
<xsl:with-param name="mode" select="$mode"/>
|
4418
4464
|
</xsl:apply-templates>
|
4419
|
-
</xsl:template><xsl:template match="*[local-name() = 'add']
|
4465
|
+
</xsl:template><xsl:template match="*[local-name() = 'add']" mode="contents_item">
|
4420
4466
|
<xsl:param name="mode">bookmarks</xsl:param>
|
4421
|
-
<xsl:
|
4422
|
-
<xsl:
|
4423
|
-
<xsl:
|
4424
|
-
|
4425
|
-
|
4467
|
+
<xsl:choose>
|
4468
|
+
<xsl:when test="starts-with(text(), $ace_tag)">
|
4469
|
+
<xsl:if test="$mode = 'contents'">
|
4470
|
+
<xsl:copy>
|
4471
|
+
<xsl:apply-templates mode="contents_item"/>
|
4472
|
+
</xsl:copy>
|
4473
|
+
</xsl:if>
|
4474
|
+
</xsl:when>
|
4475
|
+
<xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
|
4476
|
+
</xsl:choose>
|
4426
4477
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4427
4478
|
|
4428
|
-
<fo:block-container
|
4479
|
+
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
|
4429
4480
|
<xsl:copy-of select="@id"/>
|
4430
4481
|
|
4431
4482
|
<xsl:if test="parent::*[local-name() = 'note']">
|
@@ -4462,6 +4513,7 @@
|
|
4462
4513
|
|
4463
4514
|
|
4464
4515
|
</xsl:variable>
|
4516
|
+
|
4465
4517
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
4466
4518
|
<xsl:if test="$font-size != ''">
|
4467
4519
|
<xsl:attribute name="font-size">
|
@@ -4478,11 +4530,11 @@
|
|
4478
4530
|
|
4479
4531
|
|
4480
4532
|
|
4481
|
-
<xsl:apply-templates/>
|
4533
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
4482
4534
|
</fo:block>
|
4483
4535
|
|
4484
4536
|
|
4485
|
-
|
4537
|
+
<xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
|
4486
4538
|
|
4487
4539
|
|
4488
4540
|
|
@@ -4496,7 +4548,7 @@
|
|
4496
4548
|
<xsl:call-template name="add-zero-spaces-java">
|
4497
4549
|
<xsl:with-param name="text" select="$text"/>
|
4498
4550
|
</xsl:call-template>
|
4499
|
-
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"
|
4551
|
+
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']">
|
4500
4552
|
<xsl:if test="normalize-space() != ''">
|
4501
4553
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4502
4554
|
<xsl:apply-templates/>
|
@@ -4504,10 +4556,10 @@
|
|
4504
4556
|
</xsl:if>
|
4505
4557
|
</xsl:template><xsl:template match="*[local-name() = 'permission']">
|
4506
4558
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
4507
|
-
<xsl:apply-templates select="*[local-name()='name']"
|
4508
|
-
<xsl:apply-templates/>
|
4559
|
+
<xsl:apply-templates select="*[local-name()='name']"/>
|
4560
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
4509
4561
|
</fo:block>
|
4510
|
-
</xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"
|
4562
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
|
4511
4563
|
<xsl:if test="normalize-space() != ''">
|
4512
4564
|
<fo:block xsl:use-attribute-sets="permission-name-style">
|
4513
4565
|
<xsl:apply-templates/>
|
@@ -4520,13 +4572,13 @@
|
|
4520
4572
|
</fo:block>
|
4521
4573
|
</xsl:template><xsl:template match="*[local-name() = 'requirement']">
|
4522
4574
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
4523
|
-
<xsl:apply-templates select="*[local-name()='name']"
|
4524
|
-
<xsl:apply-templates select="*[local-name()='label']"
|
4525
|
-
<xsl:apply-templates select="@obligation"
|
4526
|
-
<xsl:apply-templates select="*[local-name()='subject']"
|
4527
|
-
<xsl:apply-templates/>
|
4575
|
+
<xsl:apply-templates select="*[local-name()='name']"/>
|
4576
|
+
<xsl:apply-templates select="*[local-name()='label']"/>
|
4577
|
+
<xsl:apply-templates select="@obligation"/>
|
4578
|
+
<xsl:apply-templates select="*[local-name()='subject']"/>
|
4579
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'label') and not(local-name() = 'subject')]"/>
|
4528
4580
|
</fo:block>
|
4529
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"
|
4581
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
|
4530
4582
|
<xsl:if test="normalize-space() != ''">
|
4531
4583
|
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
4532
4584
|
|
@@ -4534,20 +4586,24 @@
|
|
4534
4586
|
|
4535
4587
|
</fo:block>
|
4536
4588
|
</xsl:if>
|
4537
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"
|
4589
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']">
|
4538
4590
|
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
4539
4591
|
<xsl:apply-templates/>
|
4540
4592
|
</fo:block>
|
4541
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation"
|
4593
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation">
|
4542
4594
|
<fo:block>
|
4543
4595
|
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
4544
4596
|
</fo:block>
|
4597
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2">
|
4598
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
4599
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4600
|
+
</fo:block>
|
4545
4601
|
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
4546
4602
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
4547
|
-
<xsl:apply-templates select="*[local-name()='name']"
|
4548
|
-
<xsl:apply-templates/>
|
4603
|
+
<xsl:apply-templates select="*[local-name()='name']"/>
|
4604
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
4549
4605
|
</fo:block>
|
4550
|
-
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"
|
4606
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
|
4551
4607
|
<xsl:if test="normalize-space() != ''">
|
4552
4608
|
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
4553
4609
|
<xsl:apply-templates/>
|
@@ -4558,10 +4614,6 @@
|
|
4558
4614
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
4559
4615
|
<xsl:apply-templates/>
|
4560
4616
|
</fo:block>
|
4561
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
4562
|
-
<fo:block xsl:use-attribute-sets="subject-style">
|
4563
|
-
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
4564
|
-
</fo:block>
|
4565
4617
|
</xsl:template><xsl:template match="*[local-name() = 'subject']">
|
4566
4618
|
<fo:block xsl:use-attribute-sets="subject-style">
|
4567
4619
|
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
@@ -4605,8 +4657,6 @@
|
|
4605
4657
|
</xsl:variable>
|
4606
4658
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
4607
4659
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
4608
|
-
<!-- <fo:table-column column-width="35mm"/>
|
4609
|
-
<fo:table-column column-width="115mm"/> -->
|
4610
4660
|
<fo:table-column column-width="30%"/>
|
4611
4661
|
<fo:table-column column-width="70%"/>
|
4612
4662
|
</xsl:if>
|
@@ -4616,7 +4666,7 @@
|
|
4616
4666
|
<xsl:if test=".//*[local-name() = 'fn']">
|
4617
4667
|
<xsl:for-each select="*[local-name() = 'tbody']">
|
4618
4668
|
<fo:block font-size="90%" border-bottom="1pt solid black">
|
4619
|
-
<xsl:call-template name="
|
4669
|
+
<xsl:call-template name="table_fn_display"/>
|
4620
4670
|
</fo:block>
|
4621
4671
|
</xsl:for-each>
|
4622
4672
|
</xsl:if>
|
@@ -4633,7 +4683,6 @@
|
|
4633
4683
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
4634
4684
|
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
4635
4685
|
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
4636
|
-
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
4637
4686
|
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
4638
4687
|
</xsl:if>
|
4639
4688
|
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
@@ -4646,34 +4695,11 @@
|
|
4646
4695
|
</fo:table-row>
|
4647
4696
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
4648
4697
|
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
4649
|
-
<xsl:
|
4650
|
-
<xsl:
|
4651
|
-
|
4652
|
-
<xsl:value-of select="@align"/>
|
4653
|
-
</xsl:when>
|
4654
|
-
<xsl:otherwise>left</xsl:otherwise>
|
4655
|
-
</xsl:choose>
|
4656
|
-
</xsl:attribute>
|
4657
|
-
<xsl:if test="@colspan">
|
4658
|
-
<xsl:attribute name="number-columns-spanned">
|
4659
|
-
<xsl:value-of select="@colspan"/>
|
4660
|
-
</xsl:attribute>
|
4661
|
-
</xsl:if>
|
4662
|
-
<xsl:if test="@rowspan">
|
4663
|
-
<xsl:attribute name="number-rows-spanned">
|
4664
|
-
<xsl:value-of select="@rowspan"/>
|
4665
|
-
</xsl:attribute>
|
4666
|
-
</xsl:if>
|
4667
|
-
<xsl:call-template name="display-align"/>
|
4698
|
+
<xsl:call-template name="setTextAlignment">
|
4699
|
+
<xsl:with-param name="default">left</xsl:with-param>
|
4700
|
+
</xsl:call-template>
|
4668
4701
|
|
4669
|
-
|
4670
|
-
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4671
|
-
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
4672
|
-
</xsl:if>
|
4673
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
4674
|
-
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4675
|
-
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
4676
|
-
</xsl:if> -->
|
4702
|
+
<xsl:call-template name="setTableCellAttributes"/>
|
4677
4703
|
|
4678
4704
|
<fo:block>
|
4679
4705
|
<xsl:apply-templates/>
|
@@ -4685,37 +4711,15 @@
|
|
4685
4711
|
<xsl:attribute name="padding">0mm</xsl:attribute>
|
4686
4712
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
4687
4713
|
</xsl:if>
|
4688
|
-
<xsl:
|
4689
|
-
<xsl:
|
4690
|
-
|
4691
|
-
|
4692
|
-
</xsl:when>
|
4693
|
-
<xsl:otherwise>left</xsl:otherwise>
|
4694
|
-
</xsl:choose>
|
4695
|
-
</xsl:attribute>
|
4714
|
+
<xsl:call-template name="setTextAlignment">
|
4715
|
+
<xsl:with-param name="default">left</xsl:with-param>
|
4716
|
+
</xsl:call-template>
|
4717
|
+
|
4696
4718
|
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
4697
4719
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4698
4720
|
</xsl:if>
|
4699
|
-
<xsl:if test="@colspan">
|
4700
|
-
<xsl:attribute name="number-columns-spanned">
|
4701
|
-
<xsl:value-of select="@colspan"/>
|
4702
|
-
</xsl:attribute>
|
4703
|
-
</xsl:if>
|
4704
|
-
<xsl:if test="@rowspan">
|
4705
|
-
<xsl:attribute name="number-rows-spanned">
|
4706
|
-
<xsl:value-of select="@rowspan"/>
|
4707
|
-
</xsl:attribute>
|
4708
|
-
</xsl:if>
|
4709
|
-
<xsl:call-template name="display-align"/>
|
4710
4721
|
|
4711
|
-
|
4712
|
-
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
4713
|
-
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4714
|
-
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
4715
|
-
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
4716
|
-
</xsl:if>
|
4717
|
-
</xsl:if> -->
|
4718
|
-
<!-- 2nd line and below -->
|
4722
|
+
<xsl:call-template name="setTableCellAttributes"/>
|
4719
4723
|
|
4720
4724
|
<fo:block>
|
4721
4725
|
<xsl:apply-templates/>
|
@@ -4727,15 +4731,15 @@
|
|
4727
4731
|
<xsl:apply-templates/>
|
4728
4732
|
</fo:block>
|
4729
4733
|
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
4730
|
-
<fo:block>
|
4734
|
+
<fo:block>
|
4731
4735
|
<xsl:apply-templates/>
|
4732
4736
|
</fo:block>
|
4733
4737
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
4734
4738
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
4735
|
-
<xsl:apply-templates select="*[local-name()='name']"
|
4736
|
-
<xsl:apply-templates/>
|
4739
|
+
<xsl:apply-templates select="*[local-name()='name']"/>
|
4740
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
4737
4741
|
</fo:block>
|
4738
|
-
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"
|
4742
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
|
4739
4743
|
<xsl:if test="normalize-space() != ''">
|
4740
4744
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
4741
4745
|
<xsl:apply-templates/>
|
@@ -4761,9 +4765,7 @@
|
|
4761
4765
|
|
4762
4766
|
<xsl:variable name="fo_element">
|
4763
4767
|
<xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
|
4764
|
-
block
|
4765
|
-
|
4766
|
-
|
4768
|
+
block
|
4767
4769
|
</xsl:variable>
|
4768
4770
|
|
4769
4771
|
<!-- display 'EXAMPLE' -->
|
@@ -4836,6 +4838,8 @@
|
|
4836
4838
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
4837
4839
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4838
4840
|
|
4841
|
+
|
4842
|
+
|
4839
4843
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4840
4844
|
<xsl:variable name="termsource_text">
|
4841
4845
|
<xsl:apply-templates/>
|
@@ -4873,9 +4877,7 @@
|
|
4873
4877
|
<xsl:value-of select="."/>
|
4874
4878
|
</xsl:if>
|
4875
4879
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
|
4876
|
-
<fo:inline>
|
4877
|
-
|
4878
|
-
|
4880
|
+
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
4879
4881
|
<xsl:value-of select="."/>
|
4880
4882
|
</fo:inline>
|
4881
4883
|
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
@@ -4918,7 +4920,6 @@
|
|
4918
4920
|
<fo:block-container margin-left="0mm">
|
4919
4921
|
|
4920
4922
|
<fo:block xsl:use-attribute-sets="quote-style">
|
4921
|
-
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
4922
4923
|
|
4923
4924
|
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
4924
4925
|
</fo:block>
|
@@ -4961,15 +4962,13 @@
|
|
4961
4962
|
</xsl:variable>
|
4962
4963
|
|
4963
4964
|
<xsl:choose>
|
4964
|
-
<xsl:when test="normalize-space($bibitemid) != ''">
|
4965
|
+
<xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
|
4965
4966
|
<fo:inline xsl:use-attribute-sets="eref-style">
|
4966
4967
|
<xsl:if test="@type = 'footnote'">
|
4967
|
-
|
4968
|
-
|
4969
|
-
|
4970
|
-
|
4971
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
4972
|
-
|
4968
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
4969
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
4970
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
4971
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4973
4972
|
|
4974
4973
|
</xsl:if>
|
4975
4974
|
|
@@ -4989,7 +4988,6 @@
|
|
4989
4988
|
|
4990
4989
|
|
4991
4990
|
|
4992
|
-
|
4993
4991
|
</xsl:if>
|
4994
4992
|
|
4995
4993
|
|
@@ -5048,8 +5046,6 @@
|
|
5048
5046
|
</xsl:choose>
|
5049
5047
|
</xsl:variable>
|
5050
5048
|
|
5051
|
-
<!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
|
5052
|
-
|
5053
5049
|
<xsl:choose>
|
5054
5050
|
<xsl:when test="$lang = 'zh'">
|
5055
5051
|
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
@@ -5105,7 +5101,6 @@
|
|
5105
5101
|
<xsl:apply-templates/>
|
5106
5102
|
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
|
5107
5103
|
<fo:inline> <xsl:apply-templates/></fo:inline>
|
5108
|
-
<!-- <fo:block> </fo:block> -->
|
5109
5104
|
<fo:block/>
|
5110
5105
|
</xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
|
5111
5106
|
|
@@ -5146,11 +5141,6 @@
|
|
5146
5141
|
<xsl:apply-templates/>
|
5147
5142
|
</fo:block>
|
5148
5143
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
5149
|
-
<fo:block id="{@id}">
|
5150
|
-
<xsl:apply-templates/>
|
5151
|
-
</fo:block>
|
5152
|
-
</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']">
|
5153
|
-
|
5154
5144
|
<fo:block id="{@id}">
|
5155
5145
|
<xsl:apply-templates/>
|
5156
5146
|
</fo:block>
|
@@ -5418,56 +5408,100 @@
|
|
5418
5408
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
5419
5409
|
<fo:block><xsl:apply-templates/></fo:block>
|
5420
5410
|
</fo:table-cell>
|
5421
|
-
</xsl:template><xsl:template name="
|
5422
|
-
|
5423
|
-
|
5424
|
-
|
5425
|
-
|
5411
|
+
</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">
|
5426
5412
|
|
5427
5413
|
|
5428
5414
|
|
5415
|
+
<fo:block id="{@id}">
|
5416
|
+
<xsl:apply-templates/>
|
5417
|
+
</fo:block>
|
5418
|
+
</xsl:template><xsl:template match="*[local-name() = 'references']">
|
5419
|
+
<xsl:if test="not(ancestor::*[local-name() = 'annex'])">
|
5420
|
+
|
5421
|
+
<fo:block break-after="page"/>
|
5422
|
+
|
5423
|
+
</xsl:if>
|
5429
5424
|
|
5430
|
-
|
5431
|
-
<xsl:if test="
|
5432
|
-
<
|
5425
|
+
<!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
|
5426
|
+
<xsl:if test="$namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'itu'">
|
5427
|
+
<fo:block break-after="page"/>
|
5433
5428
|
</xsl:if>
|
5434
|
-
|
5435
|
-
<xsl:choose>
|
5436
|
-
<xsl:when test="*[local-name() = 'docidentifier']/@type = 'metanorma'"/>
|
5437
|
-
<xsl:otherwise><xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma-ordinal')]"/></xsl:otherwise>
|
5438
|
-
</xsl:choose>
|
5439
|
-
</xsl:variable>
|
5440
|
-
<xsl:value-of select="$docidentifier"/>
|
5441
|
-
<xsl:apply-templates select="csd:note"/>
|
5442
|
-
<xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
|
5443
|
-
<xsl:choose>
|
5444
|
-
<xsl:when test="csd:title[@type = 'main' and @language = 'en']">
|
5445
|
-
<xsl:apply-templates select="csd:title[@type = 'main' and @language = 'en']"/>
|
5446
|
-
</xsl:when>
|
5447
|
-
<xsl:otherwise>
|
5448
|
-
<xsl:apply-templates select="csd:title"/>
|
5449
|
-
</xsl:otherwise>
|
5450
|
-
</xsl:choose>
|
5451
|
-
<xsl:apply-templates select="csd:formattedref"/>
|
5452
|
-
<!-- end CSD bibtem processing -->
|
5453
|
-
|
5429
|
+
</xsl:if> -->
|
5454
5430
|
|
5431
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
|
5432
|
+
<xsl:apply-templates/>
|
5433
|
+
</fo:block>
|
5455
5434
|
|
5456
5435
|
|
5457
|
-
|
5458
5436
|
|
5459
5437
|
|
5460
|
-
|
5438
|
+
</xsl:template><xsl:template match="*[local-name() = 'bibitem']">
|
5439
|
+
<xsl:call-template name="bibitem"/>
|
5440
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
5461
5441
|
|
5442
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
5443
|
+
<xsl:call-template name="processBibitem"/>
|
5444
|
+
</fo:block>
|
5445
|
+
|
5462
5446
|
|
5447
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
|
5448
|
+
|
5449
|
+
<!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
5450
|
+
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
5451
|
+
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
5452
|
+
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
5453
|
+
<fo:list-item>
|
5454
|
+
<fo:list-item-label end-indent="label-end()">
|
5455
|
+
<fo:block>
|
5456
|
+
<fo:inline>
|
5457
|
+
|
5458
|
+
<xsl:value-of select="*[local-name()='docidentifier'][@type = 'metanorma-ordinal']"/>
|
5459
|
+
<xsl:if test="not(*[local-name()='docidentifier'][@type = 'metanorma-ordinal'])">
|
5460
|
+
<xsl:number format="[1]"/>
|
5461
|
+
</xsl:if>
|
5462
|
+
|
5463
|
+
</fo:inline>
|
5464
|
+
</fo:block>
|
5465
|
+
</fo:list-item-label>
|
5466
|
+
<fo:list-item-body start-indent="body-start()">
|
5467
|
+
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style">
|
5468
|
+
<xsl:call-template name="processBibitem"/>
|
5469
|
+
</fo:block>
|
5470
|
+
</fo:list-item-body>
|
5471
|
+
</fo:list-item>
|
5472
|
+
</fo:list-block>
|
5473
|
+
|
5463
5474
|
|
5464
|
-
|
5465
|
-
|
5466
|
-
<!-- start M3D bibitem processing -->
|
5467
|
-
|
5475
|
+
</xsl:template><xsl:template name="processBibitem">
|
5468
5476
|
|
5469
|
-
|
5470
5477
|
|
5478
|
+
<!-- start bibitem processing -->
|
5479
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
5480
|
+
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
5481
|
+
</xsl:if>
|
5482
|
+
<xsl:variable name="docidentifier">
|
5483
|
+
<xsl:choose>
|
5484
|
+
<xsl:when test="*[local-name() = 'docidentifier']/@type = 'metanorma'"/>
|
5485
|
+
<xsl:otherwise><xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma-ordinal')]"/></xsl:otherwise>
|
5486
|
+
</xsl:choose>
|
5487
|
+
</xsl:variable>
|
5488
|
+
<fo:inline><xsl:value-of select="$docidentifier"/></fo:inline>
|
5489
|
+
<xsl:apply-templates select="*[local-name() = 'note']"/>
|
5490
|
+
<xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
|
5491
|
+
<xsl:choose>
|
5492
|
+
<xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = $lang]">
|
5493
|
+
<xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = $lang]"/>
|
5494
|
+
</xsl:when>
|
5495
|
+
<xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = 'en']">
|
5496
|
+
<xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = 'en']"/>
|
5497
|
+
</xsl:when>
|
5498
|
+
<xsl:otherwise>
|
5499
|
+
<xsl:apply-templates select="*[local-name() = 'title']"/>
|
5500
|
+
</xsl:otherwise>
|
5501
|
+
</xsl:choose>
|
5502
|
+
<xsl:apply-templates select="*[local-name() = 'formattedref']"/>
|
5503
|
+
<!-- end bibitem processing -->
|
5504
|
+
|
5471
5505
|
</xsl:template><xsl:template name="processBibitemDocId">
|
5472
5506
|
<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')]"/>
|
5473
5507
|
<xsl:choose>
|
@@ -5524,6 +5558,55 @@
|
|
5524
5558
|
<xsl:value-of select="substring(.,1,1)"/>
|
5525
5559
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
5526
5560
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5561
|
+
</xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
|
5562
|
+
<!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
|
5563
|
+
<fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
|
5564
|
+
<xsl:apply-templates/>
|
5565
|
+
</fo:inline>
|
5566
|
+
</xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
|
5567
|
+
<fo:footnote>
|
5568
|
+
<xsl:variable name="number">
|
5569
|
+
|
5570
|
+
<xsl:choose>
|
5571
|
+
<xsl:when test="ancestor::*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]">
|
5572
|
+
<xsl:number level="any" count="*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]//*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
|
5573
|
+
</xsl:when>
|
5574
|
+
<xsl:otherwise>
|
5575
|
+
<xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
|
5576
|
+
</xsl:otherwise>
|
5577
|
+
</xsl:choose>
|
5578
|
+
|
5579
|
+
</xsl:variable>
|
5580
|
+
<fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
|
5581
|
+
<fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
|
5582
|
+
<xsl:value-of select="$number"/>
|
5583
|
+
|
5584
|
+
</fo:basic-link>
|
5585
|
+
</fo:inline>
|
5586
|
+
<fo:footnote-body>
|
5587
|
+
<fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
|
5588
|
+
<fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
|
5589
|
+
<xsl:value-of select="$number"/>
|
5590
|
+
|
5591
|
+
</fo:inline>
|
5592
|
+
<xsl:apply-templates/>
|
5593
|
+
</fo:block>
|
5594
|
+
</fo:footnote-body>
|
5595
|
+
</fo:footnote>
|
5596
|
+
</xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
|
5597
|
+
<xsl:text> edition </xsl:text>
|
5598
|
+
<xsl:value-of select="."/>
|
5599
|
+
</xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
|
5600
|
+
<xsl:text> (</xsl:text>
|
5601
|
+
<fo:inline xsl:use-attribute-sets="link-style">
|
5602
|
+
<fo:basic-link external-destination="." fox:alt-text=".">
|
5603
|
+
<xsl:value-of select="."/>
|
5604
|
+
</fo:basic-link>
|
5605
|
+
</fo:inline>
|
5606
|
+
<xsl:text>)</xsl:text>
|
5607
|
+
</xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/><xsl:template match="*[local-name() = 'formattedref']">
|
5608
|
+
|
5609
|
+
<xsl:apply-templates/>
|
5527
5610
|
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
5528
5611
|
<fo:block>
|
5529
5612
|
<xsl:apply-templates/>
|
@@ -5596,24 +5679,7 @@
|
|
5596
5679
|
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
5597
5680
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
5598
5681
|
<xsl:otherwise><!-- default value -->
|
5599
|
-
|
5600
|
-
|
5601
|
-
|
5602
5682
|
2
|
5603
|
-
|
5604
|
-
|
5605
|
-
|
5606
|
-
|
5607
|
-
|
5608
|
-
|
5609
|
-
|
5610
|
-
|
5611
|
-
|
5612
|
-
|
5613
|
-
|
5614
|
-
|
5615
|
-
|
5616
|
-
|
5617
5683
|
</xsl:otherwise>
|
5618
5684
|
</xsl:choose>
|
5619
5685
|
</xsl:variable><xsl:template match="*[local-name() = 'toc']">
|
@@ -5711,6 +5777,56 @@
|
|
5711
5777
|
<xsl:copy-of select="."/>
|
5712
5778
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
|
5713
5779
|
<xsl:call-template name="title"/>
|
5780
|
+
</xsl:template><xsl:template match="*[local-name() = 'admonition']">
|
5781
|
+
|
5782
|
+
|
5783
|
+
|
5784
|
+
|
5785
|
+
|
5786
|
+
|
5787
|
+
<fo:block xsl:use-attribute-sets="admonition-style">
|
5788
|
+
|
5789
|
+
|
5790
|
+
|
5791
|
+
|
5792
|
+
|
5793
|
+
|
5794
|
+
<xsl:call-template name="displayAdmonitionName"/>
|
5795
|
+
<xsl:text> — </xsl:text>
|
5796
|
+
|
5797
|
+
|
5798
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
5799
|
+
</fo:block>
|
5800
|
+
|
5801
|
+
</xsl:template><xsl:template name="displayAdmonitionName">
|
5802
|
+
|
5803
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
5804
|
+
<xsl:if test="not(*[local-name() = 'name'])">
|
5805
|
+
<xsl:apply-templates select="@type"/>
|
5806
|
+
</xsl:if>
|
5807
|
+
|
5808
|
+
</xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
|
5809
|
+
<xsl:apply-templates/>
|
5810
|
+
</xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
|
5811
|
+
<xsl:variable name="admonition_type_">
|
5812
|
+
<xsl:call-template name="getLocalizedString">
|
5813
|
+
<xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
|
5814
|
+
</xsl:call-template>
|
5815
|
+
</xsl:variable>
|
5816
|
+
<xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
|
5817
|
+
<xsl:value-of select="$admonition_type"/>
|
5818
|
+
<xsl:if test="$admonition_type = ''">
|
5819
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
|
5820
|
+
</xsl:if>
|
5821
|
+
</xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
|
5822
|
+
|
5823
|
+
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
5824
|
+
|
5825
|
+
|
5826
|
+
|
5827
|
+
<xsl:apply-templates/>
|
5828
|
+
</fo:block>
|
5829
|
+
|
5714
5830
|
</xsl:template><xsl:template name="convertDate">
|
5715
5831
|
<xsl:param name="date"/>
|
5716
5832
|
<xsl:param name="format" select="'short'"/>
|
@@ -5719,78 +5835,39 @@
|
|
5719
5835
|
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
5720
5836
|
<xsl:variable name="monthStr">
|
5721
5837
|
<xsl:choose>
|
5722
|
-
<xsl:when test="$month = '01'">
|
5723
|
-
<xsl:when test="$month = '02'">
|
5724
|
-
<xsl:when test="$month = '03'">
|
5725
|
-
<xsl:when test="$month = '04'">
|
5726
|
-
<xsl:when test="$month = '05'">
|
5727
|
-
<xsl:when test="$month = '06'">
|
5728
|
-
<xsl:when test="$month = '07'">
|
5729
|
-
<xsl:when test="$month = '08'">
|
5730
|
-
<xsl:when test="$month = '09'">
|
5731
|
-
<xsl:when test="$month = '10'">
|
5732
|
-
<xsl:when test="$month = '11'">
|
5733
|
-
<xsl:when test="$month = '12'">
|
5734
|
-
</xsl:choose>
|
5735
|
-
</xsl:variable>
|
5736
|
-
<xsl:variable name="result">
|
5737
|
-
<xsl:choose>
|
5738
|
-
<xsl:when test="$format = 'ddMMyyyy'">
|
5739
|
-
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
5740
|
-
<xsl:text> </xsl:text>
|
5741
|
-
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
5742
|
-
</xsl:when>
|
5743
|
-
<xsl:when test="$format = 'ddMM'">
|
5744
|
-
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
5745
|
-
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
5746
|
-
</xsl:when>
|
5747
|
-
<xsl:when test="$format = 'short' or $day = ''">
|
5748
|
-
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
5749
|
-
</xsl:when>
|
5750
|
-
<xsl:otherwise>
|
5751
|
-
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
|
5752
|
-
</xsl:otherwise>
|
5838
|
+
<xsl:when test="$month = '01'">january</xsl:when>
|
5839
|
+
<xsl:when test="$month = '02'">february</xsl:when>
|
5840
|
+
<xsl:when test="$month = '03'">march</xsl:when>
|
5841
|
+
<xsl:when test="$month = '04'">april</xsl:when>
|
5842
|
+
<xsl:when test="$month = '05'">may</xsl:when>
|
5843
|
+
<xsl:when test="$month = '06'">june</xsl:when>
|
5844
|
+
<xsl:when test="$month = '07'">july</xsl:when>
|
5845
|
+
<xsl:when test="$month = '08'">august</xsl:when>
|
5846
|
+
<xsl:when test="$month = '09'">september</xsl:when>
|
5847
|
+
<xsl:when test="$month = '10'">october</xsl:when>
|
5848
|
+
<xsl:when test="$month = '11'">november</xsl:when>
|
5849
|
+
<xsl:when test="$month = '12'">december</xsl:when>
|
5753
5850
|
</xsl:choose>
|
5754
5851
|
</xsl:variable>
|
5755
|
-
<xsl:
|
5756
|
-
|
5757
|
-
<xsl:param name="date"/>
|
5758
|
-
<xsl:param name="format" select="'short'"/>
|
5759
|
-
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
5760
|
-
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
5761
|
-
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
5762
|
-
<xsl:variable name="monthStr">
|
5763
|
-
<xsl:choose>
|
5764
|
-
<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>
|
5765
|
-
<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>
|
5766
|
-
<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>
|
5767
|
-
<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>
|
5768
|
-
<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>
|
5769
|
-
<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>
|
5770
|
-
<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>
|
5771
|
-
<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>
|
5772
|
-
<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>
|
5773
|
-
<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>
|
5774
|
-
<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>
|
5775
|
-
<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>
|
5776
|
-
</xsl:choose>
|
5852
|
+
<xsl:variable name="monthStr_localized">
|
5853
|
+
<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>
|
5777
5854
|
</xsl:variable>
|
5778
5855
|
<xsl:variable name="result">
|
5779
5856
|
<xsl:choose>
|
5780
5857
|
<xsl:when test="$format = 'ddMMyyyy'">
|
5781
5858
|
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
5782
5859
|
<xsl:text> </xsl:text>
|
5783
|
-
<xsl:value-of select="normalize-space(concat($
|
5860
|
+
<xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
|
5784
5861
|
</xsl:when>
|
5785
5862
|
<xsl:when test="$format = 'ddMM'">
|
5786
5863
|
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
5787
|
-
<xsl:text> </xsl:text><xsl:value-of select="$
|
5864
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr_localized"/>
|
5788
5865
|
</xsl:when>
|
5789
5866
|
<xsl:when test="$format = 'short' or $day = ''">
|
5790
|
-
<xsl:value-of select="normalize-space(concat($
|
5867
|
+
<xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
|
5791
5868
|
</xsl:when>
|
5792
5869
|
<xsl:otherwise>
|
5793
|
-
<xsl:value-of select="normalize-space(concat($
|
5870
|
+
<xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/>
|
5794
5871
|
</xsl:otherwise>
|
5795
5872
|
</xsl:choose>
|
5796
5873
|
</xsl:variable>
|
@@ -5842,14 +5919,9 @@
|
|
5842
5919
|
<dc:title>
|
5843
5920
|
<xsl:variable name="title">
|
5844
5921
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
5845
|
-
|
5846
|
-
|
5847
|
-
|
5848
|
-
|
5849
|
-
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
5850
|
-
|
5851
|
-
|
5852
5922
|
|
5923
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
5924
|
+
|
5853
5925
|
</xsl:for-each>
|
5854
5926
|
</xsl:variable>
|
5855
5927
|
<xsl:choose>
|
@@ -5864,21 +5936,18 @@
|
|
5864
5936
|
<dc:creator>
|
5865
5937
|
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
5866
5938
|
|
5867
|
-
|
5868
|
-
|
5869
|
-
|
5870
|
-
|
5871
|
-
|
5872
|
-
|
5873
|
-
|
5939
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
5940
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
5941
|
+
<xsl:if test="position() != last()">; </xsl:if>
|
5942
|
+
</xsl:for-each>
|
5943
|
+
|
5874
5944
|
</xsl:for-each>
|
5875
5945
|
</dc:creator>
|
5876
5946
|
<dc:description>
|
5877
5947
|
<xsl:variable name="abstract">
|
5878
5948
|
|
5879
|
-
|
5880
|
-
|
5881
|
-
|
5949
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
5950
|
+
|
5882
5951
|
</xsl:variable>
|
5883
5952
|
<xsl:value-of select="normalize-space($abstract)"/>
|
5884
5953
|
</dc:description>
|
@@ -5898,7 +5967,6 @@
|
|
5898
5967
|
<xsl:value-of select="../@id"/>
|
5899
5968
|
</xsl:when>
|
5900
5969
|
<xsl:otherwise>
|
5901
|
-
<!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
|
5902
5970
|
<xsl:value-of select="concat(generate-id(..), '_', text())"/>
|
5903
5971
|
</xsl:otherwise>
|
5904
5972
|
</xsl:choose>
|
@@ -5924,9 +5992,6 @@
|
|
5924
5992
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
5925
5993
|
<xsl:value-of select="$level_total - 2"/>
|
5926
5994
|
</xsl:when>
|
5927
|
-
<!-- <xsl:when test="parent::*[local-name() = 'sections']">
|
5928
|
-
<xsl:value-of select="$level_total - 1"/>
|
5929
|
-
</xsl:when> -->
|
5930
5995
|
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
5931
5996
|
<xsl:value-of select="$level_total - 1"/>
|
5932
5997
|
</xsl:when>
|
@@ -6116,7 +6181,6 @@
|
|
6116
6181
|
<xsl:value-of select="$key_"/>
|
6117
6182
|
</xsl:otherwise>
|
6118
6183
|
</xsl:choose>
|
6119
|
-
|
6120
6184
|
</xsl:template><xsl:template name="setTrackChangesStyles">
|
6121
6185
|
<xsl:param name="isAdded"/>
|
6122
6186
|
<xsl:param name="isDeleted"/>
|
@@ -6139,7 +6203,6 @@
|
|
6139
6203
|
<xsl:if test="local-name() = 'table'">
|
6140
6204
|
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
6141
6205
|
</xsl:if>
|
6142
|
-
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
6143
6206
|
<xsl:attribute name="padding">2mm</xsl:attribute>
|
6144
6207
|
</xsl:if>
|
6145
6208
|
</xsl:otherwise>
|
@@ -6159,15 +6222,18 @@
|
|
6159
6222
|
</xsl:choose>
|
6160
6223
|
</xsl:template><xsl:template name="setTextAlignment">
|
6161
6224
|
<xsl:param name="default">left</xsl:param>
|
6225
|
+
<xsl:variable name="align" select="normalize-space(@align)"/>
|
6162
6226
|
<xsl:attribute name="text-align">
|
6163
6227
|
<xsl:choose>
|
6164
|
-
<xsl:when test="
|
6228
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
6229
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
6230
|
+
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
6165
6231
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
6166
6232
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
6167
6233
|
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
6168
6234
|
</xsl:choose>
|
6169
6235
|
</xsl:attribute>
|
6170
|
-
<xsl:if test="
|
6236
|
+
<xsl:if test="$align = 'indent'">
|
6171
6237
|
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
6172
6238
|
</xsl:if>
|
6173
6239
|
</xsl:template><xsl:template name="number-to-words">
|