metanorma-cc 1.6.8 → 1.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +7 -1
- data/lib/asciidoctor/cc/biblio.rng +5 -6
- data/lib/asciidoctor/cc/isodoc.rng +305 -4
- data/lib/isodoc/cc/cc.standard.xsl +462 -61
- data/lib/isodoc/cc/html/_coverpage.css +7 -0
- data/lib/isodoc/cc/html/htmlstyle.css +14 -0
- data/lib/metanorma/cc/version.rb +1 -1
- data/metanorma-cc.gemspec +4 -4
- metadata +20 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4246fc710a6116a54dbb54fb9d983194f44fd97c1874d5e1caa684a3b8729974
|
4
|
+
data.tar.gz: 6af597c710faabc0b2eb57f31e32e6349103f1d7472259221a445d9bb06475f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa96ffbafe4f555da75dd05a02b0eecf6b0f3b6f2b56c757818d93749872a262b9ad24f6b46ca644df5244ee530e0b928aab819f7aaf8bb7df3a98f9f0779da1
|
7
|
+
data.tar.gz: bbe9b70f768719e9d4f004f22495268e5fbfa6cfae88ae977de8ea19214de73cbfa5732b43be8847ba0d07aba0fa8ee9524de6fda06d704d250158aac90cca6c
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# This project follows the Ribose OSS style guide.
|
2
2
|
# https://github.com/riboseinc/oss-guides
|
3
3
|
# All project-specific additions and overrides should be specified in this file.
|
4
|
-
|
5
4
|
inherit_from:
|
6
5
|
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
6
|
+
|
7
|
+
# local repo-specific modifications
|
8
|
+
|
9
|
+
AllCops:
|
10
|
+
DisplayCopNames: false
|
11
|
+
StyleGuideCopsOnly: false
|
12
|
+
TargetRubyVersion: 2.4
|
@@ -124,7 +124,7 @@
|
|
124
124
|
<value>application/tei+xml</value>
|
125
125
|
<value>text/x-asciidoc</value>
|
126
126
|
<value>text/markdown</value>
|
127
|
-
<value>application/x-
|
127
|
+
<value>application/x-metanorma+xml</value>
|
128
128
|
<text/>
|
129
129
|
</choice>
|
130
130
|
</attribute>
|
@@ -452,6 +452,7 @@
|
|
452
452
|
<attribute name="type">
|
453
453
|
<choice>
|
454
454
|
<value>isni</value>
|
455
|
+
<value>orcid</value>
|
455
456
|
<value>uri</value>
|
456
457
|
</choice>
|
457
458
|
</attribute>
|
@@ -461,10 +462,7 @@
|
|
461
462
|
<define name="org-identifier">
|
462
463
|
<element name="identifier">
|
463
464
|
<attribute name="type">
|
464
|
-
<
|
465
|
-
<value>orcid</value>
|
466
|
-
<value>uri</value>
|
467
|
-
</choice>
|
465
|
+
<data type="string" datatypeLibrary=""/>
|
468
466
|
</attribute>
|
469
467
|
<text/>
|
470
468
|
</element>
|
@@ -789,6 +787,7 @@
|
|
789
787
|
<value>adapted</value>
|
790
788
|
<value>vote-started</value>
|
791
789
|
<value>vote-ended</value>
|
790
|
+
<value>announced</value>
|
792
791
|
</choice>
|
793
792
|
</define>
|
794
793
|
<define name="bdate">
|
@@ -1106,7 +1105,7 @@
|
|
1106
1105
|
<value>complementOf</value>
|
1107
1106
|
<value>obsoletes</value>
|
1108
1107
|
<value>obsoletedBy</value>
|
1109
|
-
<value>
|
1108
|
+
<value>cites</value>
|
1110
1109
|
<value>isCitedIn</value>
|
1111
1110
|
</choice>
|
1112
1111
|
</define>
|
@@ -86,6 +86,35 @@
|
|
86
86
|
<text/>
|
87
87
|
</element>
|
88
88
|
</define>
|
89
|
+
<define name="erefType">
|
90
|
+
<optional>
|
91
|
+
<attribute name="normative">
|
92
|
+
<data type="boolean"/>
|
93
|
+
</attribute>
|
94
|
+
</optional>
|
95
|
+
<attribute name="citeas"/>
|
96
|
+
<attribute name="type">
|
97
|
+
<ref name="ReferenceFormat"/>
|
98
|
+
</attribute>
|
99
|
+
<optional>
|
100
|
+
<attribute name="alt"/>
|
101
|
+
</optional>
|
102
|
+
<optional>
|
103
|
+
<attribute name="case">
|
104
|
+
<choice>
|
105
|
+
<value>capital</value>
|
106
|
+
<value>lowercase</value>
|
107
|
+
</choice>
|
108
|
+
</attribute>
|
109
|
+
</optional>
|
110
|
+
<optional>
|
111
|
+
<attribute name="droploc">
|
112
|
+
<data type="boolean"/>
|
113
|
+
</attribute>
|
114
|
+
</optional>
|
115
|
+
<ref name="CitationType"/>
|
116
|
+
<text/>
|
117
|
+
</define>
|
89
118
|
<define name="ul">
|
90
119
|
<element name="ul">
|
91
120
|
<attribute name="id">
|
@@ -775,6 +804,90 @@
|
|
775
804
|
<ref name="paragraph"/>
|
776
805
|
</element>
|
777
806
|
</define>
|
807
|
+
<define name="em">
|
808
|
+
<element name="em">
|
809
|
+
<zeroOrMore>
|
810
|
+
<choice>
|
811
|
+
<ref name="PureTextElement"/>
|
812
|
+
<ref name="stem"/>
|
813
|
+
<ref name="index"/>
|
814
|
+
</choice>
|
815
|
+
</zeroOrMore>
|
816
|
+
</element>
|
817
|
+
</define>
|
818
|
+
<define name="strong">
|
819
|
+
<element name="strong">
|
820
|
+
<zeroOrMore>
|
821
|
+
<choice>
|
822
|
+
<ref name="PureTextElement"/>
|
823
|
+
<ref name="stem"/>
|
824
|
+
<ref name="index"/>
|
825
|
+
</choice>
|
826
|
+
</zeroOrMore>
|
827
|
+
</element>
|
828
|
+
</define>
|
829
|
+
<define name="tt">
|
830
|
+
<element name="tt">
|
831
|
+
<zeroOrMore>
|
832
|
+
<choice>
|
833
|
+
<ref name="PureTextElement"/>
|
834
|
+
<ref name="index"/>
|
835
|
+
</choice>
|
836
|
+
</zeroOrMore>
|
837
|
+
</element>
|
838
|
+
</define>
|
839
|
+
<define name="keyword">
|
840
|
+
<element name="keyword">
|
841
|
+
<zeroOrMore>
|
842
|
+
<choice>
|
843
|
+
<ref name="PureTextElement"/>
|
844
|
+
<ref name="index"/>
|
845
|
+
</choice>
|
846
|
+
</zeroOrMore>
|
847
|
+
</element>
|
848
|
+
</define>
|
849
|
+
<define name="strike">
|
850
|
+
<element name="strike">
|
851
|
+
<zeroOrMore>
|
852
|
+
<choice>
|
853
|
+
<ref name="PureTextElement"/>
|
854
|
+
<ref name="index"/>
|
855
|
+
</choice>
|
856
|
+
</zeroOrMore>
|
857
|
+
</element>
|
858
|
+
</define>
|
859
|
+
<define name="underline">
|
860
|
+
<element name="underline">
|
861
|
+
<zeroOrMore>
|
862
|
+
<choice>
|
863
|
+
<ref name="PureTextElement"/>
|
864
|
+
<ref name="index"/>
|
865
|
+
</choice>
|
866
|
+
</zeroOrMore>
|
867
|
+
</element>
|
868
|
+
</define>
|
869
|
+
<define name="smallcap">
|
870
|
+
<element name="smallcap">
|
871
|
+
<zeroOrMore>
|
872
|
+
<choice>
|
873
|
+
<ref name="PureTextElement"/>
|
874
|
+
<ref name="index"/>
|
875
|
+
</choice>
|
876
|
+
</zeroOrMore>
|
877
|
+
</element>
|
878
|
+
</define>
|
879
|
+
<define name="pagebreak">
|
880
|
+
<element name="pagebreak">
|
881
|
+
<optional>
|
882
|
+
<attribute name="orientation">
|
883
|
+
<choice>
|
884
|
+
<value>landscape</value>
|
885
|
+
<value>portrait</value>
|
886
|
+
</choice>
|
887
|
+
</attribute>
|
888
|
+
</optional>
|
889
|
+
</element>
|
890
|
+
</define>
|
778
891
|
</include>
|
779
892
|
<!-- end overrides -->
|
780
893
|
<define name="colgroup">
|
@@ -793,7 +906,35 @@
|
|
793
906
|
<value>internal</value>
|
794
907
|
</define>
|
795
908
|
<define name="TextElement" combine="choice">
|
796
|
-
<
|
909
|
+
<choice>
|
910
|
+
<ref name="concept"/>
|
911
|
+
<ref name="add"/>
|
912
|
+
<ref name="del"/>
|
913
|
+
</choice>
|
914
|
+
</define>
|
915
|
+
<define name="add">
|
916
|
+
<element name="add">
|
917
|
+
<choice>
|
918
|
+
<ref name="PureTextElement"/>
|
919
|
+
<ref name="eref"/>
|
920
|
+
<ref name="stem"/>
|
921
|
+
<ref name="keyword"/>
|
922
|
+
<ref name="xref"/>
|
923
|
+
<ref name="hyperlink"/>
|
924
|
+
</choice>
|
925
|
+
</element>
|
926
|
+
</define>
|
927
|
+
<define name="del">
|
928
|
+
<element name="del">
|
929
|
+
<choice>
|
930
|
+
<ref name="PureTextElement"/>
|
931
|
+
<ref name="eref"/>
|
932
|
+
<ref name="stem"/>
|
933
|
+
<ref name="keyword"/>
|
934
|
+
<ref name="xref"/>
|
935
|
+
<ref name="hyperlink"/>
|
936
|
+
</choice>
|
937
|
+
</element>
|
797
938
|
</define>
|
798
939
|
<define name="concept">
|
799
940
|
<element name="concept">
|
@@ -814,8 +955,170 @@
|
|
814
955
|
<ref name="permission"/>
|
815
956
|
<ref name="imagemap"/>
|
816
957
|
<ref name="svgmap"/>
|
958
|
+
<ref name="inputform"/>
|
959
|
+
</choice>
|
960
|
+
</define>
|
961
|
+
<define name="inputform">
|
962
|
+
<element name="form">
|
963
|
+
<attribute name="id">
|
964
|
+
<data type="ID"/>
|
965
|
+
</attribute>
|
966
|
+
<attribute name="name"/>
|
967
|
+
<attribute name="action"/>
|
968
|
+
<zeroOrMore>
|
969
|
+
<choice>
|
970
|
+
<ref name="TextElement"/>
|
971
|
+
<ref name="FormInput"/>
|
972
|
+
</choice>
|
973
|
+
</zeroOrMore>
|
974
|
+
</element>
|
975
|
+
</define>
|
976
|
+
<define name="FormInput">
|
977
|
+
<choice>
|
978
|
+
<ref name="input"/>
|
979
|
+
<ref name="formlabel"/>
|
980
|
+
<ref name="select"/>
|
981
|
+
<ref name="textarea"/>
|
982
|
+
</choice>
|
983
|
+
</define>
|
984
|
+
<define name="InputType">
|
985
|
+
<choice>
|
986
|
+
<value>button</value>
|
987
|
+
<value>checkbox</value>
|
988
|
+
<value>date</value>
|
989
|
+
<value>file</value>
|
990
|
+
<value>password</value>
|
991
|
+
<value>radio</value>
|
992
|
+
<value>submit</value>
|
993
|
+
<value>text</value>
|
817
994
|
</choice>
|
818
995
|
</define>
|
996
|
+
<define name="input">
|
997
|
+
<element name="input">
|
998
|
+
<attribute name="type">
|
999
|
+
<ref name="InputType"/>
|
1000
|
+
</attribute>
|
1001
|
+
<optional>
|
1002
|
+
<attribute name="checked">
|
1003
|
+
<data type="boolean"/>
|
1004
|
+
</attribute>
|
1005
|
+
</optional>
|
1006
|
+
<optional>
|
1007
|
+
<attribute name="disabled">
|
1008
|
+
<data type="boolean"/>
|
1009
|
+
</attribute>
|
1010
|
+
</optional>
|
1011
|
+
<optional>
|
1012
|
+
<attribute name="readonly">
|
1013
|
+
<data type="boolean"/>
|
1014
|
+
</attribute>
|
1015
|
+
</optional>
|
1016
|
+
<optional>
|
1017
|
+
<attribute name="maxlength">
|
1018
|
+
<data type="int"/>
|
1019
|
+
</attribute>
|
1020
|
+
</optional>
|
1021
|
+
<optional>
|
1022
|
+
<attribute name="minlength">
|
1023
|
+
<data type="int"/>
|
1024
|
+
</attribute>
|
1025
|
+
</optional>
|
1026
|
+
<optional>
|
1027
|
+
<attribute name="name"/>
|
1028
|
+
</optional>
|
1029
|
+
<optional>
|
1030
|
+
<attribute name="value"/>
|
1031
|
+
</optional>
|
1032
|
+
<optional>
|
1033
|
+
<attribute name="id">
|
1034
|
+
<data type="ID"/>
|
1035
|
+
</attribute>
|
1036
|
+
</optional>
|
1037
|
+
</element>
|
1038
|
+
</define>
|
1039
|
+
<define name="formlabel">
|
1040
|
+
<element name="label">
|
1041
|
+
<attribute name="for">
|
1042
|
+
<data type="IDREF"/>
|
1043
|
+
</attribute>
|
1044
|
+
<zeroOrMore>
|
1045
|
+
<ref name="PureTextElement"/>
|
1046
|
+
</zeroOrMore>
|
1047
|
+
</element>
|
1048
|
+
</define>
|
1049
|
+
<define name="select">
|
1050
|
+
<element name="select">
|
1051
|
+
<optional>
|
1052
|
+
<attribute name="name"/>
|
1053
|
+
</optional>
|
1054
|
+
<optional>
|
1055
|
+
<attribute name="value"/>
|
1056
|
+
</optional>
|
1057
|
+
<optional>
|
1058
|
+
<attribute name="id">
|
1059
|
+
<data type="ID"/>
|
1060
|
+
</attribute>
|
1061
|
+
</optional>
|
1062
|
+
<optional>
|
1063
|
+
<attribute name="disabled">
|
1064
|
+
<data type="boolean"/>
|
1065
|
+
</attribute>
|
1066
|
+
</optional>
|
1067
|
+
<optional>
|
1068
|
+
<attribute name="multiple">
|
1069
|
+
<data type="boolean"/>
|
1070
|
+
</attribute>
|
1071
|
+
</optional>
|
1072
|
+
<optional>
|
1073
|
+
<attribute name="size">
|
1074
|
+
<data type="int"/>
|
1075
|
+
</attribute>
|
1076
|
+
</optional>
|
1077
|
+
<oneOrMore>
|
1078
|
+
<ref name="option"/>
|
1079
|
+
</oneOrMore>
|
1080
|
+
</element>
|
1081
|
+
</define>
|
1082
|
+
<define name="option">
|
1083
|
+
<element name="option">
|
1084
|
+
<optional>
|
1085
|
+
<attribute name="disabled">
|
1086
|
+
<data type="boolean"/>
|
1087
|
+
</attribute>
|
1088
|
+
</optional>
|
1089
|
+
<optional>
|
1090
|
+
<attribute name="value"/>
|
1091
|
+
</optional>
|
1092
|
+
<zeroOrMore>
|
1093
|
+
<ref name="PureTextElement"/>
|
1094
|
+
</zeroOrMore>
|
1095
|
+
</element>
|
1096
|
+
</define>
|
1097
|
+
<define name="textarea">
|
1098
|
+
<element name="textarea">
|
1099
|
+
<optional>
|
1100
|
+
<attribute name="name"/>
|
1101
|
+
</optional>
|
1102
|
+
<optional>
|
1103
|
+
<attribute name="value"/>
|
1104
|
+
</optional>
|
1105
|
+
<optional>
|
1106
|
+
<attribute name="id">
|
1107
|
+
<data type="ID"/>
|
1108
|
+
</attribute>
|
1109
|
+
</optional>
|
1110
|
+
<optional>
|
1111
|
+
<attribute name="rows">
|
1112
|
+
<data type="int"/>
|
1113
|
+
</attribute>
|
1114
|
+
</optional>
|
1115
|
+
<optional>
|
1116
|
+
<attribute name="cols">
|
1117
|
+
<data type="int"/>
|
1118
|
+
</attribute>
|
1119
|
+
</optional>
|
1120
|
+
</element>
|
1121
|
+
</define>
|
819
1122
|
<define name="bibliography">
|
820
1123
|
<element name="bibliography">
|
821
1124
|
<oneOrMore>
|
@@ -888,9 +1191,7 @@
|
|
888
1191
|
</define>
|
889
1192
|
<define name="IsoWorkgroup">
|
890
1193
|
<optional>
|
891
|
-
<attribute name="number"
|
892
|
-
<data type="int"/>
|
893
|
-
</attribute>
|
1194
|
+
<attribute name="number"/>
|
894
1195
|
</optional>
|
895
1196
|
<optional>
|
896
1197
|
<attribute name="type"/>
|
@@ -5,6 +5,7 @@
|
|
5
5
|
<xsl:param name="svg_images"/>
|
6
6
|
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
7
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
8
|
+
<xsl:param name="basepath"/>
|
8
9
|
|
9
10
|
<xsl:variable name="pageWidth" select="'210mm'"/>
|
10
11
|
<xsl:variable name="pageHeight" select="'297mm'"/>
|
@@ -931,6 +932,9 @@
|
|
931
932
|
<title-continued lang="en">(continued)</title-continued>
|
932
933
|
<title-continued lang="fr">(continué)</title-continued>
|
933
934
|
|
935
|
+
</xsl:variable><xsl:variable name="bibdata">
|
936
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
937
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
934
938
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
935
939
|
<xsl:param name="name"/>
|
936
940
|
<xsl:param name="lang"/>
|
@@ -956,8 +960,10 @@
|
|
956
960
|
</xsl:choose>
|
957
961
|
</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">
|
958
962
|
|
963
|
+
|
959
964
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
960
965
|
|
966
|
+
|
961
967
|
<xsl:attribute name="color">blue</xsl:attribute>
|
962
968
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
963
969
|
|
@@ -1081,6 +1087,7 @@
|
|
1081
1087
|
|
1082
1088
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
1083
1089
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1090
|
+
|
1084
1091
|
|
1085
1092
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1086
1093
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -1118,6 +1125,7 @@
|
|
1118
1125
|
|
1119
1126
|
|
1120
1127
|
|
1128
|
+
|
1121
1129
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1122
1130
|
|
1123
1131
|
|
@@ -1129,6 +1137,7 @@
|
|
1129
1137
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1130
1138
|
|
1131
1139
|
|
1140
|
+
|
1132
1141
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1133
1142
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1134
1143
|
|
@@ -1147,6 +1156,7 @@
|
|
1147
1156
|
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
1148
1157
|
|
1149
1158
|
|
1159
|
+
|
1150
1160
|
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
1151
1161
|
|
1152
1162
|
|
@@ -1177,6 +1187,7 @@
|
|
1177
1187
|
|
1178
1188
|
</xsl:attribute-set><xsl:attribute-set name="termnote-style">
|
1179
1189
|
|
1190
|
+
|
1180
1191
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1181
1192
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1182
1193
|
|
@@ -1185,6 +1196,7 @@
|
|
1185
1196
|
|
1186
1197
|
|
1187
1198
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1199
|
+
|
1188
1200
|
|
1189
1201
|
|
1190
1202
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
@@ -1208,6 +1220,7 @@
|
|
1208
1220
|
</xsl:attribute-set><xsl:attribute-set name="termsource-style">
|
1209
1221
|
|
1210
1222
|
|
1223
|
+
|
1211
1224
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1212
1225
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1213
1226
|
|
@@ -1222,6 +1235,7 @@
|
|
1222
1235
|
|
1223
1236
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1224
1237
|
|
1238
|
+
|
1225
1239
|
|
1226
1240
|
|
1227
1241
|
|
@@ -1254,10 +1268,12 @@
|
|
1254
1268
|
|
1255
1269
|
|
1256
1270
|
|
1271
|
+
|
1257
1272
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
1258
1273
|
|
1259
1274
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1260
1275
|
|
1276
|
+
|
1261
1277
|
<xsl:attribute name="width">100%</xsl:attribute>
|
1262
1278
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
1263
1279
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -1283,7 +1299,7 @@
|
|
1283
1299
|
|
1284
1300
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1285
1301
|
|
1286
|
-
|
1302
|
+
|
1287
1303
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1288
1304
|
|
1289
1305
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
@@ -1291,7 +1307,26 @@
|
|
1291
1307
|
|
1292
1308
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1293
1309
|
|
1294
|
-
|
1310
|
+
|
1311
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
1312
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
1313
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
1314
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
1315
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1316
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
1317
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
1318
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
1319
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
1320
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
1321
|
+
<xsl:text>red</xsl:text>
|
1322
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
1323
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
1324
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
1325
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
1326
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
1327
|
+
|
1328
|
+
|
1329
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1295
1330
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1296
1331
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1297
1332
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -1336,16 +1371,17 @@
|
|
1336
1371
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1337
1372
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1338
1373
|
|
1374
|
+
<xsl:variable name="table-preamble">
|
1375
|
+
|
1376
|
+
|
1377
|
+
</xsl:variable>
|
1378
|
+
|
1339
1379
|
<xsl:variable name="table">
|
1340
1380
|
|
1341
1381
|
<xsl:variable name="simple-table">
|
1342
1382
|
<xsl:call-template name="getSimpleTable"/>
|
1343
1383
|
</xsl:variable>
|
1344
1384
|
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
1385
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
1350
1386
|
<fo:block> </fo:block>
|
1351
1387
|
</xsl:if> -->
|
@@ -1360,7 +1396,7 @@
|
|
1360
1396
|
|
1361
1397
|
|
1362
1398
|
|
1363
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
1399
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
1364
1400
|
|
1365
1401
|
<!-- <xsl:variable name="cols-count">
|
1366
1402
|
<xsl:choose>
|
@@ -1379,8 +1415,6 @@
|
|
1379
1415
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1380
1416
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1381
1417
|
|
1382
|
-
|
1383
|
-
|
1384
1418
|
<xsl:variable name="colwidths">
|
1385
1419
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1386
1420
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1408,8 +1442,10 @@
|
|
1408
1442
|
</xsl:choose>
|
1409
1443
|
</xsl:variable>
|
1410
1444
|
|
1445
|
+
|
1411
1446
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1412
1447
|
|
1448
|
+
|
1413
1449
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1414
1450
|
|
1415
1451
|
|
@@ -1425,6 +1461,8 @@
|
|
1425
1461
|
|
1426
1462
|
|
1427
1463
|
|
1464
|
+
|
1465
|
+
|
1428
1466
|
<xsl:variable name="table_width">
|
1429
1467
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1430
1468
|
100%
|
@@ -1441,6 +1479,8 @@
|
|
1441
1479
|
|
1442
1480
|
|
1443
1481
|
|
1482
|
+
|
1483
|
+
|
1444
1484
|
|
1445
1485
|
|
1446
1486
|
|
@@ -1530,7 +1570,8 @@
|
|
1530
1570
|
</fo:block-container>
|
1531
1571
|
</xsl:variable>
|
1532
1572
|
|
1533
|
-
|
1573
|
+
<xsl:variable name="isAdded" select="@added"/>
|
1574
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
1534
1575
|
|
1535
1576
|
<xsl:choose>
|
1536
1577
|
<xsl:when test="@width">
|
@@ -1544,7 +1585,14 @@
|
|
1544
1585
|
<fo:table-body>
|
1545
1586
|
<fo:table-row>
|
1546
1587
|
<fo:table-cell column-number="2">
|
1547
|
-
<
|
1588
|
+
<xsl:copy-of select="$table-preamble"/>
|
1589
|
+
<fo:block>
|
1590
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1591
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1592
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1593
|
+
</xsl:call-template>
|
1594
|
+
<xsl:copy-of select="$table"/>
|
1595
|
+
</fo:block>
|
1548
1596
|
</fo:table-cell>
|
1549
1597
|
</fo:table-row>
|
1550
1598
|
</fo:table-body>
|
@@ -1555,16 +1603,42 @@
|
|
1555
1603
|
|
1556
1604
|
</xsl:when>
|
1557
1605
|
<xsl:otherwise>
|
1558
|
-
<xsl:
|
1606
|
+
<xsl:choose>
|
1607
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
1608
|
+
<xsl:copy-of select="$table-preamble"/>
|
1609
|
+
<fo:block>
|
1610
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1611
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1612
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1613
|
+
</xsl:call-template>
|
1614
|
+
<xsl:copy-of select="$table"/>
|
1615
|
+
</fo:block>
|
1616
|
+
</xsl:when>
|
1617
|
+
<xsl:otherwise>
|
1618
|
+
<xsl:copy-of select="$table-preamble"/>
|
1619
|
+
<xsl:copy-of select="$table"/>
|
1620
|
+
</xsl:otherwise>
|
1621
|
+
</xsl:choose>
|
1559
1622
|
</xsl:otherwise>
|
1560
1623
|
</xsl:choose>
|
1561
1624
|
|
1562
1625
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1626
|
+
<xsl:param name="continued"/>
|
1563
1627
|
<xsl:if test="normalize-space() != ''">
|
1564
1628
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1565
1629
|
|
1566
1630
|
|
1567
|
-
<xsl:
|
1631
|
+
<xsl:choose>
|
1632
|
+
<xsl:when test="$continued = 'true'">
|
1633
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
1634
|
+
|
1635
|
+
</xsl:when>
|
1636
|
+
<xsl:otherwise>
|
1637
|
+
<xsl:apply-templates/>
|
1638
|
+
</xsl:otherwise>
|
1639
|
+
</xsl:choose>
|
1640
|
+
|
1641
|
+
|
1568
1642
|
</fo:block>
|
1569
1643
|
</xsl:if>
|
1570
1644
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -1616,7 +1690,7 @@
|
|
1616
1690
|
</xsl:for-each>
|
1617
1691
|
</xsl:when>
|
1618
1692
|
<xsl:otherwise>
|
1619
|
-
<xsl:for-each select="xalan:nodeset($table)
|
1693
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
1620
1694
|
<xsl:variable name="td_text">
|
1621
1695
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1622
1696
|
|
@@ -1704,18 +1778,18 @@
|
|
1704
1778
|
<xsl:apply-templates/>
|
1705
1779
|
</fo:table-header>
|
1706
1780
|
</xsl:template><xsl:template name="table-header-title">
|
1707
|
-
<xsl:param name="cols-count"/>
|
1781
|
+
<xsl:param name="cols-count"/>
|
1708
1782
|
<!-- row for title -->
|
1709
1783
|
<fo:table-row>
|
1710
1784
|
<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">
|
1711
|
-
|
1785
|
+
|
1786
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
1787
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
1788
|
+
</xsl:apply-templates>
|
1712
1789
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1713
1790
|
<xsl:call-template name="fn_name_display"/>
|
1714
|
-
</xsl:for-each>
|
1715
|
-
|
1716
|
-
<xsl:text> </xsl:text>
|
1717
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1718
|
-
</fo:block>
|
1791
|
+
</xsl:for-each>
|
1792
|
+
|
1719
1793
|
</fo:table-cell>
|
1720
1794
|
</fo:table-row>
|
1721
1795
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -1936,6 +2010,7 @@
|
|
1936
2010
|
|
1937
2011
|
|
1938
2012
|
|
2013
|
+
|
1939
2014
|
</xsl:if>
|
1940
2015
|
<xsl:if test="$parent-name = 'tfoot'">
|
1941
2016
|
|
@@ -1956,7 +2031,8 @@
|
|
1956
2031
|
<xsl:attribute name="text-align">
|
1957
2032
|
<xsl:choose>
|
1958
2033
|
<xsl:when test="@align">
|
1959
|
-
<xsl:
|
2034
|
+
<xsl:call-template name="setAlignment"/>
|
2035
|
+
<!-- <xsl:value-of select="@align"/> -->
|
1960
2036
|
</xsl:when>
|
1961
2037
|
<xsl:otherwise>center</xsl:otherwise>
|
1962
2038
|
</xsl:choose>
|
@@ -1972,6 +2048,10 @@
|
|
1972
2048
|
|
1973
2049
|
|
1974
2050
|
|
2051
|
+
|
2052
|
+
<xsl:if test="$lang = 'ar'">
|
2053
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2054
|
+
</xsl:if>
|
1975
2055
|
<xsl:if test="@colspan">
|
1976
2056
|
<xsl:attribute name="number-columns-spanned">
|
1977
2057
|
<xsl:value-of select="@colspan"/>
|
@@ -2003,11 +2083,16 @@
|
|
2003
2083
|
<xsl:attribute name="text-align">
|
2004
2084
|
<xsl:choose>
|
2005
2085
|
<xsl:when test="@align">
|
2006
|
-
<xsl:
|
2086
|
+
<xsl:call-template name="setAlignment"/>
|
2087
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2007
2088
|
</xsl:when>
|
2008
2089
|
<xsl:otherwise>left</xsl:otherwise>
|
2009
2090
|
</xsl:choose>
|
2010
2091
|
</xsl:attribute>
|
2092
|
+
<xsl:if test="$lang = 'ar'">
|
2093
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2094
|
+
</xsl:if>
|
2095
|
+
|
2011
2096
|
|
2012
2097
|
|
2013
2098
|
|
@@ -2019,6 +2104,9 @@
|
|
2019
2104
|
|
2020
2105
|
|
2021
2106
|
|
2107
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
2108
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2109
|
+
</xsl:if>
|
2022
2110
|
<xsl:if test="@colspan">
|
2023
2111
|
<xsl:attribute name="number-columns-spanned">
|
2024
2112
|
<xsl:value-of select="@colspan"/>
|
@@ -2146,13 +2234,13 @@
|
|
2146
2234
|
</xsl:choose>
|
2147
2235
|
</xsl:variable>
|
2148
2236
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2149
|
-
<xsl:element name="{$ns}:table">
|
2237
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2150
2238
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2151
2239
|
<tbody>
|
2152
2240
|
<xsl:apply-templates mode="dl"/>
|
2153
2241
|
</tbody>
|
2154
2242
|
</xsl:for-each>
|
2155
|
-
</xsl:element>
|
2243
|
+
<!-- </xsl:element> -->
|
2156
2244
|
</xsl:variable>
|
2157
2245
|
|
2158
2246
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2243,6 +2331,8 @@
|
|
2243
2331
|
<xsl:apply-templates/>
|
2244
2332
|
</fo:inline>
|
2245
2333
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2334
|
+
<xsl:variable name="isAdded" select="@added"/>
|
2335
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
2246
2336
|
<fo:block-container>
|
2247
2337
|
|
2248
2338
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -2259,6 +2349,12 @@
|
|
2259
2349
|
</xsl:attribute>
|
2260
2350
|
|
2261
2351
|
</xsl:if>
|
2352
|
+
|
2353
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2354
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2355
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2356
|
+
</xsl:call-template>
|
2357
|
+
|
2262
2358
|
<fo:block-container>
|
2263
2359
|
|
2264
2360
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -2366,11 +2462,11 @@
|
|
2366
2462
|
</xsl:choose>
|
2367
2463
|
</xsl:variable>
|
2368
2464
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2369
|
-
<xsl:element name="{$ns}:table">
|
2465
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2370
2466
|
<tbody>
|
2371
2467
|
<xsl:apply-templates mode="dl"/>
|
2372
2468
|
</tbody>
|
2373
|
-
</xsl:element>
|
2469
|
+
<!-- </xsl:element> -->
|
2374
2470
|
</xsl:variable>
|
2375
2471
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2376
2472
|
<xsl:variable name="colwidths">
|
@@ -2622,6 +2718,7 @@
|
|
2622
2718
|
|
2623
2719
|
|
2624
2720
|
|
2721
|
+
|
2625
2722
|
|
2626
2723
|
</xsl:variable>
|
2627
2724
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -2639,8 +2736,74 @@
|
|
2639
2736
|
<fo:inline text-decoration="underline">
|
2640
2737
|
<xsl:apply-templates/>
|
2641
2738
|
</fo:inline>
|
2739
|
+
</xsl:template><xsl:template match="*[local-name()='add']">
|
2740
|
+
<xsl:choose>
|
2741
|
+
<xsl:when test="@amendment">
|
2742
|
+
<fo:inline>
|
2743
|
+
<xsl:call-template name="insertTag">
|
2744
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2745
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2746
|
+
</xsl:call-template>
|
2747
|
+
<xsl:apply-templates/>
|
2748
|
+
<xsl:call-template name="insertTag">
|
2749
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
2750
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2751
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2752
|
+
</xsl:call-template>
|
2753
|
+
</fo:inline>
|
2754
|
+
</xsl:when>
|
2755
|
+
<xsl:when test="@corrigenda">
|
2756
|
+
<fo:inline>
|
2757
|
+
<xsl:call-template name="insertTag">
|
2758
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
2759
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
2760
|
+
</xsl:call-template>
|
2761
|
+
<xsl:apply-templates/>
|
2762
|
+
<xsl:call-template name="insertTag">
|
2763
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
2764
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
2765
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
2766
|
+
</xsl:call-template>
|
2767
|
+
</fo:inline>
|
2768
|
+
</xsl:when>
|
2769
|
+
<xsl:otherwise>
|
2770
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
2771
|
+
<xsl:apply-templates/>
|
2772
|
+
</fo:inline>
|
2773
|
+
</xsl:otherwise>
|
2774
|
+
</xsl:choose>
|
2775
|
+
|
2776
|
+
</xsl:template><xsl:template name="insertTag">
|
2777
|
+
<xsl:param name="type"/>
|
2778
|
+
<xsl:param name="kind"/>
|
2779
|
+
<xsl:param name="value"/>
|
2780
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
2781
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
2782
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
2783
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
2784
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
2785
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
2786
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
2787
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
2788
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2789
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
2790
|
+
<g>
|
2791
|
+
<xsl:if test="$type = 'closing'">
|
2792
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
2793
|
+
</xsl:if>
|
2794
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
2795
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
2796
|
+
</g>
|
2797
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
2798
|
+
<xsl:if test="$type = 'closing'">
|
2799
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
2800
|
+
</xsl:if>
|
2801
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
2802
|
+
</text>
|
2803
|
+
</svg>
|
2804
|
+
</fo:instream-foreign-object>
|
2642
2805
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2643
|
-
<fo:inline
|
2806
|
+
<fo:inline xsl:use-attribute-sets="del-style">
|
2644
2807
|
<xsl:apply-templates/>
|
2645
2808
|
</fo:inline>
|
2646
2809
|
</xsl:template><xsl:template match="*[local-name()='hi']">
|
@@ -2937,11 +3100,15 @@
|
|
2937
3100
|
</xsl:apply-templates>
|
2938
3101
|
</xsl:template><xsl:template name="getLang">
|
2939
3102
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3103
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
2940
3104
|
<xsl:variable name="language">
|
2941
3105
|
<xsl:choose>
|
2942
3106
|
<xsl:when test="$language_current != ''">
|
2943
3107
|
<xsl:value-of select="$language_current"/>
|
2944
3108
|
</xsl:when>
|
3109
|
+
<xsl:when test="$language_current_2 != ''">
|
3110
|
+
<xsl:value-of select="$language_current_2"/>
|
3111
|
+
</xsl:when>
|
2945
3112
|
<xsl:otherwise>
|
2946
3113
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
2947
3114
|
</xsl:otherwise>
|
@@ -2981,13 +3148,23 @@
|
|
2981
3148
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2982
3149
|
<xsl:value-of select="substring($str, 2)"/>
|
2983
3150
|
</xsl:template><xsl:template match="mathml:math">
|
2984
|
-
<
|
3151
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3152
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3153
|
+
|
3154
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
3155
|
+
|
3156
|
+
|
3157
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3158
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3159
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3160
|
+
</xsl:call-template>
|
2985
3161
|
|
2986
3162
|
<xsl:variable name="mathml">
|
2987
3163
|
<xsl:apply-templates select="." mode="mathml"/>
|
2988
3164
|
</xsl:variable>
|
2989
3165
|
<fo:instream-foreign-object fox:alt-text="Math">
|
2990
3166
|
|
3167
|
+
|
2991
3168
|
<!-- <xsl:copy-of select="."/> -->
|
2992
3169
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
2993
3170
|
</fo:instream-foreign-object>
|
@@ -3144,6 +3321,7 @@
|
|
3144
3321
|
|
3145
3322
|
|
3146
3323
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3324
|
+
|
3147
3325
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3148
3326
|
</fo:inline>
|
3149
3327
|
<xsl:apply-templates/>
|
@@ -3170,6 +3348,7 @@
|
|
3170
3348
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3171
3349
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3172
3350
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3351
|
+
|
3173
3352
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3174
3353
|
</fo:inline>
|
3175
3354
|
<xsl:apply-templates/>
|
@@ -3231,8 +3410,15 @@
|
|
3231
3410
|
</fo:inline>
|
3232
3411
|
</xsl:if>
|
3233
3412
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3413
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3414
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3234
3415
|
<fo:block-container id="{@id}">
|
3235
3416
|
|
3417
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3418
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3419
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3420
|
+
</xsl:call-template>
|
3421
|
+
|
3236
3422
|
<fo:block>
|
3237
3423
|
<xsl:apply-templates/>
|
3238
3424
|
</fo:block>
|
@@ -3240,7 +3426,10 @@
|
|
3240
3426
|
<xsl:for-each select="*[local-name() = 'note']">
|
3241
3427
|
<xsl:call-template name="note"/>
|
3242
3428
|
</xsl:for-each>
|
3243
|
-
|
3429
|
+
|
3430
|
+
|
3431
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3432
|
+
|
3244
3433
|
</fo:block-container>
|
3245
3434
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
3246
3435
|
<fo:block id="{@id}">
|
@@ -3252,37 +3441,122 @@
|
|
3252
3441
|
<xsl:apply-templates/>
|
3253
3442
|
</fo:block>
|
3254
3443
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
3255
|
-
<
|
3256
|
-
|
3257
|
-
|
3258
|
-
<xsl:
|
3259
|
-
<
|
3260
|
-
<xsl:
|
3261
|
-
<xsl:
|
3262
|
-
</xsl:
|
3263
|
-
<
|
3264
|
-
|
3265
|
-
|
3266
|
-
|
3267
|
-
|
3268
|
-
|
3269
|
-
|
3270
|
-
|
3444
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
3445
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
3446
|
+
<xsl:choose>
|
3447
|
+
<xsl:when test="ancestor::*[local-name() = 'title']">
|
3448
|
+
<fo:inline padding-left="1mm" padding-right="1mm">
|
3449
|
+
<xsl:variable name="src">
|
3450
|
+
<xsl:call-template name="image_src"/>
|
3451
|
+
</xsl:variable>
|
3452
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
3453
|
+
</fo:inline>
|
3454
|
+
</xsl:when>
|
3455
|
+
<xsl:otherwise>
|
3456
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
3457
|
+
|
3458
|
+
<xsl:variable name="src">
|
3459
|
+
<xsl:call-template name="image_src"/>
|
3460
|
+
</xsl:variable>
|
3461
|
+
|
3462
|
+
<xsl:choose>
|
3463
|
+
<xsl:when test="$isDeleted = 'true'">
|
3464
|
+
<!-- enclose in svg -->
|
3465
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
3466
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
3467
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
3468
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3469
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3470
|
+
|
3471
|
+
|
3472
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
3473
|
+
|
3474
|
+
</fo:instream-foreign-object>
|
3475
|
+
</xsl:when>
|
3476
|
+
<xsl:otherwise>
|
3477
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3478
|
+
</xsl:otherwise>
|
3479
|
+
</xsl:choose>
|
3480
|
+
|
3481
|
+
</fo:block>
|
3482
|
+
</xsl:otherwise>
|
3483
|
+
</xsl:choose>
|
3484
|
+
</xsl:template><xsl:template name="image_src">
|
3485
|
+
<xsl:choose>
|
3486
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3487
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3488
|
+
</xsl:when>
|
3489
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3490
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3491
|
+
</xsl:when>
|
3492
|
+
<xsl:otherwise>
|
3493
|
+
<xsl:value-of select="@src"/>
|
3494
|
+
</xsl:otherwise>
|
3495
|
+
</xsl:choose>
|
3496
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
3497
|
+
<xsl:choose>
|
3498
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3499
|
+
<xsl:variable name="src">
|
3500
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3501
|
+
</xsl:variable>
|
3502
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
3503
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
3504
|
+
<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">
|
3505
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3506
|
+
</svg>
|
3507
|
+
</xsl:when>
|
3508
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3509
|
+
<xsl:variable name="src">
|
3510
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3511
|
+
</xsl:variable>
|
3512
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
3513
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
3514
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3515
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3516
|
+
<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">
|
3517
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3518
|
+
</svg>
|
3519
|
+
</xsl:when>
|
3520
|
+
<xsl:otherwise>
|
3521
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
3522
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
3523
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
3524
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
3525
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
3526
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3527
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
3528
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3529
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
3530
|
+
<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">
|
3531
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
3532
|
+
<xsl:call-template name="svg_cross">
|
3533
|
+
<xsl:with-param name="width" select="$width"/>
|
3534
|
+
<xsl:with-param name="height" select="$height"/>
|
3535
|
+
</xsl:call-template>
|
3536
|
+
</svg>
|
3537
|
+
</xsl:otherwise>
|
3538
|
+
</xsl:choose>
|
3539
|
+
|
3540
|
+
</xsl:template><xsl:template name="svg_cross">
|
3541
|
+
<xsl:param name="width"/>
|
3542
|
+
<xsl:param name="height"/>
|
3543
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="0" x2="{$width}" y2="{$height}" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
3544
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="{$height}" x2="{$width}" y2="0" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
3271
3545
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
3272
3546
|
<xsl:apply-templates mode="contents"/>
|
3273
3547
|
<xsl:text> </xsl:text>
|
3274
3548
|
</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']" mode="bookmarks">
|
3275
3549
|
<xsl:apply-templates mode="bookmarks"/>
|
3276
3550
|
<xsl:text> </xsl:text>
|
3277
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3551
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3278
3552
|
<xsl:value-of select="."/>
|
3279
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3553
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3280
3554
|
<xsl:value-of select="."/>
|
3281
3555
|
</xsl:template><xsl:template match="node()" mode="contents">
|
3282
3556
|
<xsl:apply-templates mode="contents"/>
|
3283
3557
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3284
3558
|
<xsl:apply-templates mode="bookmarks"/>
|
3285
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3559
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
3286
3560
|
<xsl:apply-templates select="."/>
|
3287
3561
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3288
3562
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -3481,6 +3755,8 @@
|
|
3481
3755
|
</fo:list-item-body>
|
3482
3756
|
</fo:list-item>
|
3483
3757
|
</fo:list-block>
|
3758
|
+
</xsl:template><xsl:template name="extractSection">
|
3759
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3484
3760
|
</xsl:template><xsl:template name="extractTitle">
|
3485
3761
|
<xsl:choose>
|
3486
3762
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -3528,6 +3804,7 @@
|
|
3528
3804
|
|
3529
3805
|
|
3530
3806
|
|
3807
|
+
|
3531
3808
|
|
3532
3809
|
|
3533
3810
|
|
@@ -3810,6 +4087,7 @@
|
|
3810
4087
|
<xsl:variable name="element">
|
3811
4088
|
block
|
3812
4089
|
|
4090
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
3813
4091
|
</xsl:variable>
|
3814
4092
|
<xsl:choose>
|
3815
4093
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -3817,7 +4095,7 @@
|
|
3817
4095
|
<xsl:apply-templates/>
|
3818
4096
|
</fo:inline>
|
3819
4097
|
</xsl:when>
|
3820
|
-
<xsl:when test="normalize-space($element)
|
4098
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3821
4099
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
3822
4100
|
<xsl:apply-templates/>
|
3823
4101
|
</fo:block>
|
@@ -3849,7 +4127,7 @@
|
|
3849
4127
|
</fo:inline>
|
3850
4128
|
</xsl:otherwise>
|
3851
4129
|
</xsl:choose>
|
3852
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4130
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
3853
4131
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3854
4132
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3855
4133
|
<xsl:variable name="termsource_text">
|
@@ -3858,13 +4136,15 @@
|
|
3858
4136
|
|
3859
4137
|
<xsl:choose>
|
3860
4138
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3861
|
-
<xsl:apply-templates/>
|
4139
|
+
<!-- <xsl:apply-templates /> -->
|
4140
|
+
<xsl:copy-of select="$termsource_text"/>
|
3862
4141
|
</xsl:when>
|
3863
4142
|
<xsl:otherwise>
|
3864
4143
|
|
3865
4144
|
<xsl:text>[</xsl:text>
|
3866
4145
|
|
3867
|
-
<xsl:apply-templates/>
|
4146
|
+
<!-- <xsl:apply-templates /> -->
|
4147
|
+
<xsl:copy-of select="$termsource_text"/>
|
3868
4148
|
|
3869
4149
|
<xsl:text>]</xsl:text>
|
3870
4150
|
|
@@ -3875,14 +4155,20 @@
|
|
3875
4155
|
<xsl:if test="normalize-space() != ''">
|
3876
4156
|
<xsl:value-of select="."/>
|
3877
4157
|
</xsl:if>
|
3878
|
-
</xsl:template><xsl:
|
4158
|
+
</xsl:template><xsl:variable name="localized.source">
|
4159
|
+
<xsl:call-template name="getLocalizedString">
|
4160
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4161
|
+
</xsl:call-template>
|
4162
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
3879
4163
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4164
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
4165
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4166
|
+
</xsl:if>
|
3880
4167
|
|
3881
4168
|
<fo:inline>
|
3882
4169
|
|
3883
4170
|
|
3884
4171
|
|
3885
|
-
|
3886
4172
|
<xsl:call-template name="getTitle">
|
3887
4173
|
<xsl:with-param name="name" select="'title-source'"/>
|
3888
4174
|
</xsl:call-template>
|
@@ -4040,7 +4326,8 @@
|
|
4040
4326
|
</fo:inline>
|
4041
4327
|
</xsl:when>
|
4042
4328
|
<xsl:otherwise>
|
4043
|
-
<
|
4329
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
4330
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
4044
4331
|
</xsl:otherwise>
|
4045
4332
|
</xsl:choose>
|
4046
4333
|
|
@@ -4099,7 +4386,6 @@
|
|
4099
4386
|
|
4100
4387
|
|
4101
4388
|
|
4102
|
-
|
4103
4389
|
<xsl:apply-templates/>
|
4104
4390
|
</fo:block>
|
4105
4391
|
|
@@ -4142,7 +4428,7 @@
|
|
4142
4428
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4143
4429
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4144
4430
|
<xsl:choose>
|
4145
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
4431
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
4146
4432
|
<fo:block-container>
|
4147
4433
|
<xsl:attribute name="margin-left">
|
4148
4434
|
<xsl:choose>
|
@@ -4152,6 +4438,7 @@
|
|
4152
4438
|
</xsl:attribute>
|
4153
4439
|
|
4154
4440
|
|
4441
|
+
|
4155
4442
|
<fo:block-container margin-left="0mm">
|
4156
4443
|
<fo:block>
|
4157
4444
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -4310,8 +4597,8 @@
|
|
4310
4597
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
4311
4598
|
<xsl:apply-templates/>
|
4312
4599
|
</fo:block>
|
4313
|
-
</xsl:template><xsl:template match="*[local-name() = 'bookmark']">
|
4314
|
-
<fo:inline id="{@id}"/>
|
4600
|
+
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
4601
|
+
<fo:inline id="{@id}" font-size="1pt"/>
|
4315
4602
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4316
4603
|
<!-- <row>
|
4317
4604
|
<date>05-07-2013</date>
|
@@ -4353,6 +4640,10 @@
|
|
4353
4640
|
|
4354
4641
|
|
4355
4642
|
|
4643
|
+
|
4644
|
+
|
4645
|
+
|
4646
|
+
|
4356
4647
|
</xsl:template><xsl:template name="processBibitemDocId">
|
4357
4648
|
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
4358
4649
|
<xsl:choose>
|
@@ -4409,6 +4700,70 @@
|
|
4409
4700
|
<xsl:value-of select="substring(.,1,1)"/>
|
4410
4701
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4411
4702
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
4703
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
4704
|
+
<fo:block>
|
4705
|
+
<xsl:apply-templates/>
|
4706
|
+
</fo:block>
|
4707
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
4708
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4709
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
4710
|
+
<fo:inline>
|
4711
|
+
<xsl:call-template name="text_input"/>
|
4712
|
+
</fo:inline>
|
4713
|
+
</xsl:template><xsl:template name="text_input">
|
4714
|
+
<xsl:variable name="count">
|
4715
|
+
<xsl:choose>
|
4716
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
4717
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
4718
|
+
<xsl:otherwise>10</xsl:otherwise>
|
4719
|
+
</xsl:choose>
|
4720
|
+
</xsl:variable>
|
4721
|
+
<xsl:call-template name="repeat">
|
4722
|
+
<xsl:with-param name="char" select="'_'"/>
|
4723
|
+
<xsl:with-param name="count" select="$count"/>
|
4724
|
+
</xsl:call-template>
|
4725
|
+
<xsl:text> </xsl:text>
|
4726
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
4727
|
+
<xsl:variable name="caption">
|
4728
|
+
<xsl:choose>
|
4729
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
4730
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
4731
|
+
</xsl:choose>
|
4732
|
+
</xsl:variable>
|
4733
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
4734
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
4735
|
+
<fo:inline padding-right="1mm">
|
4736
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
4737
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
4738
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4739
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4740
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4741
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
4742
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
4743
|
+
</svg>
|
4744
|
+
</fo:instream-foreign-object>
|
4745
|
+
</fo:inline>
|
4746
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
4747
|
+
<fo:inline padding-right="1mm">
|
4748
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
4749
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
4750
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4751
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4752
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4753
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
4754
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
4755
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
4756
|
+
</svg>
|
4757
|
+
</fo:instream-foreign-object>
|
4758
|
+
</fo:inline>
|
4759
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
4760
|
+
<fo:inline>
|
4761
|
+
<xsl:call-template name="text_input"/>
|
4762
|
+
</fo:inline>
|
4763
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
4764
|
+
<fo:block-container border="1pt solid black" width="50%">
|
4765
|
+
<fo:block> </fo:block>
|
4766
|
+
</fo:block-container>
|
4412
4767
|
</xsl:template><xsl:template name="convertDate">
|
4413
4768
|
<xsl:param name="date"/>
|
4414
4769
|
<xsl:param name="format" select="'short'"/>
|
@@ -4679,6 +5034,7 @@
|
|
4679
5034
|
|
4680
5035
|
|
4681
5036
|
|
5037
|
+
|
4682
5038
|
<xsl:value-of select="document('')//*/namespace::csd"/>
|
4683
5039
|
|
4684
5040
|
|
@@ -4740,17 +5096,62 @@
|
|
4740
5096
|
</xsl:call-template>
|
4741
5097
|
</xsl:if>
|
4742
5098
|
</xsl:template><xsl:template name="getLocalizedString">
|
4743
|
-
<xsl:param name="key"/>
|
5099
|
+
<xsl:param name="key"/>
|
4744
5100
|
|
4745
5101
|
<xsl:variable name="curr_lang">
|
4746
5102
|
<xsl:call-template name="getLang"/>
|
4747
5103
|
</xsl:variable>
|
4748
5104
|
|
5105
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
5106
|
+
|
4749
5107
|
<xsl:choose>
|
5108
|
+
<xsl:when test="$data_value != ''">
|
5109
|
+
<xsl:value-of select="$data_value"/>
|
5110
|
+
</xsl:when>
|
4750
5111
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
4751
5112
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4752
5113
|
</xsl:when>
|
4753
5114
|
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
4754
5115
|
</xsl:choose>
|
4755
5116
|
|
5117
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
5118
|
+
<xsl:param name="isAdded"/>
|
5119
|
+
<xsl:param name="isDeleted"/>
|
5120
|
+
<xsl:choose>
|
5121
|
+
<xsl:when test="local-name() = 'math'">
|
5122
|
+
<xsl:if test="$isAdded = 'true'">
|
5123
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
5124
|
+
</xsl:if>
|
5125
|
+
<xsl:if test="$isDeleted = 'true'">
|
5126
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
5127
|
+
</xsl:if>
|
5128
|
+
</xsl:when>
|
5129
|
+
<xsl:otherwise>
|
5130
|
+
<xsl:if test="$isAdded = 'true'">
|
5131
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
5132
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5133
|
+
</xsl:if>
|
5134
|
+
<xsl:if test="$isDeleted = 'true'">
|
5135
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
5136
|
+
<xsl:if test="local-name() = 'table'">
|
5137
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
5138
|
+
</xsl:if>
|
5139
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
5140
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5141
|
+
</xsl:if>
|
5142
|
+
</xsl:otherwise>
|
5143
|
+
</xsl:choose>
|
5144
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
5145
|
+
<xsl:if test="$lang = 'ar'">
|
5146
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
5147
|
+
</xsl:if>
|
5148
|
+
</xsl:template><xsl:template name="setAlignment">
|
5149
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
5150
|
+
<xsl:choose>
|
5151
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
5152
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
5153
|
+
<xsl:when test="$align != ''">
|
5154
|
+
<xsl:value-of select="$align"/>
|
5155
|
+
</xsl:when>
|
5156
|
+
</xsl:choose>
|
4756
5157
|
</xsl:template></xsl:stylesheet>
|