metanorma-csa 1.7.6 → 1.8.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 +6 -4
- data/lib/asciidoctor/csa/biblio.rng +5 -6
- data/lib/asciidoctor/csa/isodoc.rng +305 -4
- data/lib/isodoc/csa/csa.standard.xsl +462 -61
- data/lib/isodoc/csa/html/htmlstyle.css +7 -0
- data/lib/metanorma/csa/version.rb +1 -3
- data/metanorma-csa.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: 1c7e132a7ba4bc10103b15b3e017a682872eef818912d69a24a0245364864c3f
|
4
|
+
data.tar.gz: b1856f5f189efc7263ac72cc447d82809403cc8e1b1c42086fcd14f14d8ddc0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0f0e53eb1e557d5a971f3049ec2bf8cdd717dab84779a000fae8d19d35850f930c7ff2b61b0f4f9a1e256106aa8e55d7e91f919424d0e4e8708468846d5ffe8
|
7
|
+
data.tar.gz: f6d84227cde217a93dd6fb18b4e886b7e9708fe111706acb852f19ef992c00eb411eb706837f47cd980f2ada769faec575686ad48f37635cccd7d136196c9d7e
|
data/.rubocop.yml
CHANGED
@@ -1,10 +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
|
+
|
7
9
|
AllCops:
|
8
|
-
|
9
|
-
|
10
|
-
|
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="'215.9mm'"/>
|
10
11
|
<xsl:variable name="pageHeight" select="'279.4mm'"/>
|
@@ -1006,6 +1007,9 @@
|
|
1006
1007
|
<title-continued lang="en">(continued)</title-continued>
|
1007
1008
|
<title-continued lang="fr">(continué)</title-continued>
|
1008
1009
|
|
1010
|
+
</xsl:variable><xsl:variable name="bibdata">
|
1011
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
1012
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
1009
1013
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1010
1014
|
<xsl:param name="name"/>
|
1011
1015
|
<xsl:param name="lang"/>
|
@@ -1031,10 +1035,12 @@
|
|
1031
1035
|
</xsl:choose>
|
1032
1036
|
</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">
|
1033
1037
|
|
1038
|
+
|
1034
1039
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1035
1040
|
|
1036
1041
|
|
1037
1042
|
|
1043
|
+
|
1038
1044
|
<xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
|
1039
1045
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1040
1046
|
|
@@ -1159,6 +1165,7 @@
|
|
1159
1165
|
|
1160
1166
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
1161
1167
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1168
|
+
|
1162
1169
|
|
1163
1170
|
|
1164
1171
|
|
@@ -1181,6 +1188,7 @@
|
|
1181
1188
|
|
1182
1189
|
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1183
1190
|
|
1191
|
+
|
1184
1192
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1185
1193
|
|
1186
1194
|
|
@@ -1195,6 +1203,7 @@
|
|
1195
1203
|
|
1196
1204
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1197
1205
|
|
1206
|
+
|
1198
1207
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1199
1208
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1200
1209
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -1215,6 +1224,7 @@
|
|
1215
1224
|
|
1216
1225
|
</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">
|
1217
1226
|
|
1227
|
+
|
1218
1228
|
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
1219
1229
|
|
1220
1230
|
|
@@ -1247,6 +1257,7 @@
|
|
1247
1257
|
|
1248
1258
|
</xsl:attribute-set><xsl:attribute-set name="termnote-style">
|
1249
1259
|
|
1260
|
+
|
1250
1261
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1251
1262
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1252
1263
|
|
@@ -1255,6 +1266,7 @@
|
|
1255
1266
|
|
1256
1267
|
|
1257
1268
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1269
|
+
|
1258
1270
|
|
1259
1271
|
|
1260
1272
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
@@ -1278,6 +1290,7 @@
|
|
1278
1290
|
|
1279
1291
|
</xsl:attribute-set><xsl:attribute-set name="termsource-style">
|
1280
1292
|
|
1293
|
+
|
1281
1294
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1282
1295
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1283
1296
|
|
@@ -1297,6 +1310,7 @@
|
|
1297
1310
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1298
1311
|
|
1299
1312
|
|
1313
|
+
|
1300
1314
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1301
1315
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1302
1316
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -1329,10 +1343,12 @@
|
|
1329
1343
|
|
1330
1344
|
|
1331
1345
|
|
1346
|
+
|
1332
1347
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
1333
1348
|
|
1334
1349
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1335
1350
|
|
1351
|
+
|
1336
1352
|
<xsl:attribute name="width">100%</xsl:attribute>
|
1337
1353
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
1338
1354
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -1358,7 +1374,7 @@
|
|
1358
1374
|
|
1359
1375
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1360
1376
|
|
1361
|
-
|
1377
|
+
|
1362
1378
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1363
1379
|
|
1364
1380
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
@@ -1366,7 +1382,26 @@
|
|
1366
1382
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
1367
1383
|
|
1368
1384
|
|
1369
|
-
|
1385
|
+
|
1386
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
1387
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
1388
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
1389
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
1390
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1391
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
1392
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
1393
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
1394
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
1395
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
1396
|
+
<xsl:text>red</xsl:text>
|
1397
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
1398
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
1399
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
1400
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
1401
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
1402
|
+
|
1403
|
+
|
1404
|
+
</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">
|
1370
1405
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1371
1406
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1372
1407
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -1411,16 +1446,17 @@
|
|
1411
1446
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1412
1447
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1413
1448
|
|
1449
|
+
<xsl:variable name="table-preamble">
|
1450
|
+
|
1451
|
+
|
1452
|
+
</xsl:variable>
|
1453
|
+
|
1414
1454
|
<xsl:variable name="table">
|
1415
1455
|
|
1416
1456
|
<xsl:variable name="simple-table">
|
1417
1457
|
<xsl:call-template name="getSimpleTable"/>
|
1418
1458
|
</xsl:variable>
|
1419
1459
|
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
1460
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
1425
1461
|
<fo:block> </fo:block>
|
1426
1462
|
</xsl:if> -->
|
@@ -1433,7 +1469,7 @@
|
|
1433
1469
|
|
1434
1470
|
|
1435
1471
|
|
1436
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
1472
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
1437
1473
|
|
1438
1474
|
<!-- <xsl:variable name="cols-count">
|
1439
1475
|
<xsl:choose>
|
@@ -1452,8 +1488,6 @@
|
|
1452
1488
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1453
1489
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1454
1490
|
|
1455
|
-
|
1456
|
-
|
1457
1491
|
<xsl:variable name="colwidths">
|
1458
1492
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1459
1493
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1481,9 +1515,11 @@
|
|
1481
1515
|
</xsl:choose>
|
1482
1516
|
</xsl:variable>
|
1483
1517
|
|
1518
|
+
|
1484
1519
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1485
1520
|
|
1486
1521
|
|
1522
|
+
|
1487
1523
|
|
1488
1524
|
|
1489
1525
|
|
@@ -1496,6 +1532,8 @@
|
|
1496
1532
|
|
1497
1533
|
|
1498
1534
|
|
1535
|
+
|
1536
|
+
|
1499
1537
|
<xsl:variable name="table_width">
|
1500
1538
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1501
1539
|
100%
|
@@ -1512,6 +1550,8 @@
|
|
1512
1550
|
|
1513
1551
|
|
1514
1552
|
|
1553
|
+
|
1554
|
+
|
1515
1555
|
|
1516
1556
|
|
1517
1557
|
|
@@ -1601,7 +1641,8 @@
|
|
1601
1641
|
</fo:block-container>
|
1602
1642
|
</xsl:variable>
|
1603
1643
|
|
1604
|
-
|
1644
|
+
<xsl:variable name="isAdded" select="@added"/>
|
1645
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
1605
1646
|
|
1606
1647
|
<xsl:choose>
|
1607
1648
|
<xsl:when test="@width">
|
@@ -1615,7 +1656,14 @@
|
|
1615
1656
|
<fo:table-body>
|
1616
1657
|
<fo:table-row>
|
1617
1658
|
<fo:table-cell column-number="2">
|
1618
|
-
<
|
1659
|
+
<xsl:copy-of select="$table-preamble"/>
|
1660
|
+
<fo:block>
|
1661
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1662
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1663
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1664
|
+
</xsl:call-template>
|
1665
|
+
<xsl:copy-of select="$table"/>
|
1666
|
+
</fo:block>
|
1619
1667
|
</fo:table-cell>
|
1620
1668
|
</fo:table-row>
|
1621
1669
|
</fo:table-body>
|
@@ -1626,16 +1674,42 @@
|
|
1626
1674
|
|
1627
1675
|
</xsl:when>
|
1628
1676
|
<xsl:otherwise>
|
1629
|
-
<xsl:
|
1677
|
+
<xsl:choose>
|
1678
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
1679
|
+
<xsl:copy-of select="$table-preamble"/>
|
1680
|
+
<fo:block>
|
1681
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1682
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1683
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1684
|
+
</xsl:call-template>
|
1685
|
+
<xsl:copy-of select="$table"/>
|
1686
|
+
</fo:block>
|
1687
|
+
</xsl:when>
|
1688
|
+
<xsl:otherwise>
|
1689
|
+
<xsl:copy-of select="$table-preamble"/>
|
1690
|
+
<xsl:copy-of select="$table"/>
|
1691
|
+
</xsl:otherwise>
|
1692
|
+
</xsl:choose>
|
1630
1693
|
</xsl:otherwise>
|
1631
1694
|
</xsl:choose>
|
1632
1695
|
|
1633
1696
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1697
|
+
<xsl:param name="continued"/>
|
1634
1698
|
<xsl:if test="normalize-space() != ''">
|
1635
1699
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1636
1700
|
|
1637
1701
|
|
1638
|
-
<xsl:
|
1702
|
+
<xsl:choose>
|
1703
|
+
<xsl:when test="$continued = 'true'">
|
1704
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
1705
|
+
|
1706
|
+
</xsl:when>
|
1707
|
+
<xsl:otherwise>
|
1708
|
+
<xsl:apply-templates/>
|
1709
|
+
</xsl:otherwise>
|
1710
|
+
</xsl:choose>
|
1711
|
+
|
1712
|
+
|
1639
1713
|
</fo:block>
|
1640
1714
|
</xsl:if>
|
1641
1715
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -1687,7 +1761,7 @@
|
|
1687
1761
|
</xsl:for-each>
|
1688
1762
|
</xsl:when>
|
1689
1763
|
<xsl:otherwise>
|
1690
|
-
<xsl:for-each select="xalan:nodeset($table)
|
1764
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
1691
1765
|
<xsl:variable name="td_text">
|
1692
1766
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1693
1767
|
|
@@ -1775,18 +1849,18 @@
|
|
1775
1849
|
<xsl:apply-templates/>
|
1776
1850
|
</fo:table-header>
|
1777
1851
|
</xsl:template><xsl:template name="table-header-title">
|
1778
|
-
<xsl:param name="cols-count"/>
|
1852
|
+
<xsl:param name="cols-count"/>
|
1779
1853
|
<!-- row for title -->
|
1780
1854
|
<fo:table-row>
|
1781
1855
|
<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">
|
1782
|
-
|
1856
|
+
|
1857
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
1858
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
1859
|
+
</xsl:apply-templates>
|
1783
1860
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1784
1861
|
<xsl:call-template name="fn_name_display"/>
|
1785
|
-
</xsl:for-each>
|
1786
|
-
|
1787
|
-
<xsl:text> </xsl:text>
|
1788
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1789
|
-
</fo:block>
|
1862
|
+
</xsl:for-each>
|
1863
|
+
|
1790
1864
|
</fo:table-cell>
|
1791
1865
|
</fo:table-row>
|
1792
1866
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -2007,6 +2081,7 @@
|
|
2007
2081
|
|
2008
2082
|
|
2009
2083
|
|
2084
|
+
|
2010
2085
|
</xsl:if>
|
2011
2086
|
<xsl:if test="$parent-name = 'tfoot'">
|
2012
2087
|
|
@@ -2027,7 +2102,8 @@
|
|
2027
2102
|
<xsl:attribute name="text-align">
|
2028
2103
|
<xsl:choose>
|
2029
2104
|
<xsl:when test="@align">
|
2030
|
-
<xsl:
|
2105
|
+
<xsl:call-template name="setAlignment"/>
|
2106
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2031
2107
|
</xsl:when>
|
2032
2108
|
<xsl:otherwise>center</xsl:otherwise>
|
2033
2109
|
</xsl:choose>
|
@@ -2043,6 +2119,10 @@
|
|
2043
2119
|
|
2044
2120
|
|
2045
2121
|
|
2122
|
+
|
2123
|
+
<xsl:if test="$lang = 'ar'">
|
2124
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2125
|
+
</xsl:if>
|
2046
2126
|
<xsl:if test="@colspan">
|
2047
2127
|
<xsl:attribute name="number-columns-spanned">
|
2048
2128
|
<xsl:value-of select="@colspan"/>
|
@@ -2074,11 +2154,15 @@
|
|
2074
2154
|
<xsl:attribute name="text-align">
|
2075
2155
|
<xsl:choose>
|
2076
2156
|
<xsl:when test="@align">
|
2077
|
-
<xsl:
|
2157
|
+
<xsl:call-template name="setAlignment"/>
|
2158
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2078
2159
|
</xsl:when>
|
2079
2160
|
<xsl:otherwise>left</xsl:otherwise>
|
2080
2161
|
</xsl:choose>
|
2081
2162
|
</xsl:attribute>
|
2163
|
+
<xsl:if test="$lang = 'ar'">
|
2164
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2165
|
+
</xsl:if>
|
2082
2166
|
|
2083
2167
|
|
2084
2168
|
|
@@ -2090,6 +2174,10 @@
|
|
2090
2174
|
|
2091
2175
|
|
2092
2176
|
|
2177
|
+
|
2178
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
2179
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2180
|
+
</xsl:if>
|
2093
2181
|
<xsl:if test="@colspan">
|
2094
2182
|
<xsl:attribute name="number-columns-spanned">
|
2095
2183
|
<xsl:value-of select="@colspan"/>
|
@@ -2215,13 +2303,13 @@
|
|
2215
2303
|
</xsl:choose>
|
2216
2304
|
</xsl:variable>
|
2217
2305
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2218
|
-
<xsl:element name="{$ns}:table">
|
2306
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2219
2307
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2220
2308
|
<tbody>
|
2221
2309
|
<xsl:apply-templates mode="dl"/>
|
2222
2310
|
</tbody>
|
2223
2311
|
</xsl:for-each>
|
2224
|
-
</xsl:element>
|
2312
|
+
<!-- </xsl:element> -->
|
2225
2313
|
</xsl:variable>
|
2226
2314
|
|
2227
2315
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2312,6 +2400,8 @@
|
|
2312
2400
|
<xsl:apply-templates/>
|
2313
2401
|
</fo:inline>
|
2314
2402
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2403
|
+
<xsl:variable name="isAdded" select="@added"/>
|
2404
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
2315
2405
|
<fo:block-container>
|
2316
2406
|
|
2317
2407
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -2328,6 +2418,12 @@
|
|
2328
2418
|
</xsl:attribute>
|
2329
2419
|
|
2330
2420
|
</xsl:if>
|
2421
|
+
|
2422
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2423
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2424
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2425
|
+
</xsl:call-template>
|
2426
|
+
|
2331
2427
|
<fo:block-container>
|
2332
2428
|
|
2333
2429
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -2435,11 +2531,11 @@
|
|
2435
2531
|
</xsl:choose>
|
2436
2532
|
</xsl:variable>
|
2437
2533
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2438
|
-
<xsl:element name="{$ns}:table">
|
2534
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2439
2535
|
<tbody>
|
2440
2536
|
<xsl:apply-templates mode="dl"/>
|
2441
2537
|
</tbody>
|
2442
|
-
</xsl:element>
|
2538
|
+
<!-- </xsl:element> -->
|
2443
2539
|
</xsl:variable>
|
2444
2540
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2445
2541
|
<xsl:variable name="colwidths">
|
@@ -2689,6 +2785,7 @@
|
|
2689
2785
|
|
2690
2786
|
|
2691
2787
|
|
2788
|
+
|
2692
2789
|
|
2693
2790
|
</xsl:variable>
|
2694
2791
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -2706,8 +2803,74 @@
|
|
2706
2803
|
<fo:inline text-decoration="underline">
|
2707
2804
|
<xsl:apply-templates/>
|
2708
2805
|
</fo:inline>
|
2806
|
+
</xsl:template><xsl:template match="*[local-name()='add']">
|
2807
|
+
<xsl:choose>
|
2808
|
+
<xsl:when test="@amendment">
|
2809
|
+
<fo:inline>
|
2810
|
+
<xsl:call-template name="insertTag">
|
2811
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2812
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2813
|
+
</xsl:call-template>
|
2814
|
+
<xsl:apply-templates/>
|
2815
|
+
<xsl:call-template name="insertTag">
|
2816
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
2817
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2818
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2819
|
+
</xsl:call-template>
|
2820
|
+
</fo:inline>
|
2821
|
+
</xsl:when>
|
2822
|
+
<xsl:when test="@corrigenda">
|
2823
|
+
<fo:inline>
|
2824
|
+
<xsl:call-template name="insertTag">
|
2825
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
2826
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
2827
|
+
</xsl:call-template>
|
2828
|
+
<xsl:apply-templates/>
|
2829
|
+
<xsl:call-template name="insertTag">
|
2830
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
2831
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
2832
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
2833
|
+
</xsl:call-template>
|
2834
|
+
</fo:inline>
|
2835
|
+
</xsl:when>
|
2836
|
+
<xsl:otherwise>
|
2837
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
2838
|
+
<xsl:apply-templates/>
|
2839
|
+
</fo:inline>
|
2840
|
+
</xsl:otherwise>
|
2841
|
+
</xsl:choose>
|
2842
|
+
|
2843
|
+
</xsl:template><xsl:template name="insertTag">
|
2844
|
+
<xsl:param name="type"/>
|
2845
|
+
<xsl:param name="kind"/>
|
2846
|
+
<xsl:param name="value"/>
|
2847
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
2848
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
2849
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
2850
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
2851
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
2852
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
2853
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
2854
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
2855
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2856
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
2857
|
+
<g>
|
2858
|
+
<xsl:if test="$type = 'closing'">
|
2859
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
2860
|
+
</xsl:if>
|
2861
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
2862
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
2863
|
+
</g>
|
2864
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
2865
|
+
<xsl:if test="$type = 'closing'">
|
2866
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
2867
|
+
</xsl:if>
|
2868
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
2869
|
+
</text>
|
2870
|
+
</svg>
|
2871
|
+
</fo:instream-foreign-object>
|
2709
2872
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2710
|
-
<fo:inline
|
2873
|
+
<fo:inline xsl:use-attribute-sets="del-style">
|
2711
2874
|
<xsl:apply-templates/>
|
2712
2875
|
</fo:inline>
|
2713
2876
|
</xsl:template><xsl:template match="*[local-name()='hi']">
|
@@ -3004,11 +3167,15 @@
|
|
3004
3167
|
</xsl:apply-templates>
|
3005
3168
|
</xsl:template><xsl:template name="getLang">
|
3006
3169
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3170
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3007
3171
|
<xsl:variable name="language">
|
3008
3172
|
<xsl:choose>
|
3009
3173
|
<xsl:when test="$language_current != ''">
|
3010
3174
|
<xsl:value-of select="$language_current"/>
|
3011
3175
|
</xsl:when>
|
3176
|
+
<xsl:when test="$language_current_2 != ''">
|
3177
|
+
<xsl:value-of select="$language_current_2"/>
|
3178
|
+
</xsl:when>
|
3012
3179
|
<xsl:otherwise>
|
3013
3180
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3014
3181
|
</xsl:otherwise>
|
@@ -3048,13 +3215,23 @@
|
|
3048
3215
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3049
3216
|
<xsl:value-of select="substring($str, 2)"/>
|
3050
3217
|
</xsl:template><xsl:template match="mathml:math">
|
3051
|
-
<
|
3218
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3219
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3220
|
+
|
3221
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
3222
|
+
|
3223
|
+
|
3224
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3225
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3226
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3227
|
+
</xsl:call-template>
|
3052
3228
|
|
3053
3229
|
<xsl:variable name="mathml">
|
3054
3230
|
<xsl:apply-templates select="." mode="mathml"/>
|
3055
3231
|
</xsl:variable>
|
3056
3232
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3057
3233
|
|
3234
|
+
|
3058
3235
|
<!-- <xsl:copy-of select="."/> -->
|
3059
3236
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3060
3237
|
</fo:instream-foreign-object>
|
@@ -3215,6 +3392,7 @@
|
|
3215
3392
|
|
3216
3393
|
|
3217
3394
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3395
|
+
|
3218
3396
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3219
3397
|
</fo:inline>
|
3220
3398
|
<xsl:apply-templates/>
|
@@ -3241,6 +3419,7 @@
|
|
3241
3419
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3242
3420
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3243
3421
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3422
|
+
|
3244
3423
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3245
3424
|
</fo:inline>
|
3246
3425
|
<xsl:apply-templates/>
|
@@ -3302,8 +3481,15 @@
|
|
3302
3481
|
</fo:inline>
|
3303
3482
|
</xsl:if>
|
3304
3483
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3484
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3485
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3305
3486
|
<fo:block-container id="{@id}">
|
3306
3487
|
|
3488
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3489
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3490
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3491
|
+
</xsl:call-template>
|
3492
|
+
|
3307
3493
|
<fo:block>
|
3308
3494
|
<xsl:apply-templates/>
|
3309
3495
|
</fo:block>
|
@@ -3311,7 +3497,10 @@
|
|
3311
3497
|
<xsl:for-each select="*[local-name() = 'note']">
|
3312
3498
|
<xsl:call-template name="note"/>
|
3313
3499
|
</xsl:for-each>
|
3314
|
-
|
3500
|
+
|
3501
|
+
|
3502
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3503
|
+
|
3315
3504
|
</fo:block-container>
|
3316
3505
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
3317
3506
|
<fo:block id="{@id}">
|
@@ -3323,37 +3512,122 @@
|
|
3323
3512
|
<xsl:apply-templates/>
|
3324
3513
|
</fo:block>
|
3325
3514
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
3326
|
-
<
|
3327
|
-
|
3328
|
-
|
3329
|
-
<xsl:
|
3330
|
-
<
|
3331
|
-
<xsl:
|
3332
|
-
<xsl:
|
3333
|
-
</xsl:
|
3334
|
-
<
|
3335
|
-
|
3336
|
-
|
3337
|
-
|
3338
|
-
|
3339
|
-
|
3340
|
-
|
3341
|
-
|
3515
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
3516
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
3517
|
+
<xsl:choose>
|
3518
|
+
<xsl:when test="ancestor::*[local-name() = 'title']">
|
3519
|
+
<fo:inline padding-left="1mm" padding-right="1mm">
|
3520
|
+
<xsl:variable name="src">
|
3521
|
+
<xsl:call-template name="image_src"/>
|
3522
|
+
</xsl:variable>
|
3523
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
3524
|
+
</fo:inline>
|
3525
|
+
</xsl:when>
|
3526
|
+
<xsl:otherwise>
|
3527
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
3528
|
+
|
3529
|
+
<xsl:variable name="src">
|
3530
|
+
<xsl:call-template name="image_src"/>
|
3531
|
+
</xsl:variable>
|
3532
|
+
|
3533
|
+
<xsl:choose>
|
3534
|
+
<xsl:when test="$isDeleted = 'true'">
|
3535
|
+
<!-- enclose in svg -->
|
3536
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
3537
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
3538
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
3539
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3540
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3541
|
+
|
3542
|
+
|
3543
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
3544
|
+
|
3545
|
+
</fo:instream-foreign-object>
|
3546
|
+
</xsl:when>
|
3547
|
+
<xsl:otherwise>
|
3548
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3549
|
+
</xsl:otherwise>
|
3550
|
+
</xsl:choose>
|
3551
|
+
|
3552
|
+
</fo:block>
|
3553
|
+
</xsl:otherwise>
|
3554
|
+
</xsl:choose>
|
3555
|
+
</xsl:template><xsl:template name="image_src">
|
3556
|
+
<xsl:choose>
|
3557
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3558
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3559
|
+
</xsl:when>
|
3560
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3561
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3562
|
+
</xsl:when>
|
3563
|
+
<xsl:otherwise>
|
3564
|
+
<xsl:value-of select="@src"/>
|
3565
|
+
</xsl:otherwise>
|
3566
|
+
</xsl:choose>
|
3567
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
3568
|
+
<xsl:choose>
|
3569
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3570
|
+
<xsl:variable name="src">
|
3571
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3572
|
+
</xsl:variable>
|
3573
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
3574
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
3575
|
+
<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">
|
3576
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3577
|
+
</svg>
|
3578
|
+
</xsl:when>
|
3579
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3580
|
+
<xsl:variable name="src">
|
3581
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3582
|
+
</xsl:variable>
|
3583
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
3584
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
3585
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3586
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3587
|
+
<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">
|
3588
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3589
|
+
</svg>
|
3590
|
+
</xsl:when>
|
3591
|
+
<xsl:otherwise>
|
3592
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
3593
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
3594
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
3595
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
3596
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
3597
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3598
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
3599
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3600
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
3601
|
+
<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">
|
3602
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
3603
|
+
<xsl:call-template name="svg_cross">
|
3604
|
+
<xsl:with-param name="width" select="$width"/>
|
3605
|
+
<xsl:with-param name="height" select="$height"/>
|
3606
|
+
</xsl:call-template>
|
3607
|
+
</svg>
|
3608
|
+
</xsl:otherwise>
|
3609
|
+
</xsl:choose>
|
3610
|
+
|
3611
|
+
</xsl:template><xsl:template name="svg_cross">
|
3612
|
+
<xsl:param name="width"/>
|
3613
|
+
<xsl:param name="height"/>
|
3614
|
+
<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; "/>
|
3615
|
+
<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; "/>
|
3342
3616
|
</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">
|
3343
3617
|
<xsl:apply-templates mode="contents"/>
|
3344
3618
|
<xsl:text> </xsl:text>
|
3345
3619
|
</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">
|
3346
3620
|
<xsl:apply-templates mode="bookmarks"/>
|
3347
3621
|
<xsl:text> </xsl:text>
|
3348
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3622
|
+
</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">
|
3349
3623
|
<xsl:value-of select="."/>
|
3350
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3624
|
+
</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">
|
3351
3625
|
<xsl:value-of select="."/>
|
3352
3626
|
</xsl:template><xsl:template match="node()" mode="contents">
|
3353
3627
|
<xsl:apply-templates mode="contents"/>
|
3354
3628
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3355
3629
|
<xsl:apply-templates mode="bookmarks"/>
|
3356
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3630
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
3357
3631
|
<xsl:apply-templates select="."/>
|
3358
3632
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3359
3633
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -3552,6 +3826,8 @@
|
|
3552
3826
|
</fo:list-item-body>
|
3553
3827
|
</fo:list-item>
|
3554
3828
|
</fo:list-block>
|
3829
|
+
</xsl:template><xsl:template name="extractSection">
|
3830
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3555
3831
|
</xsl:template><xsl:template name="extractTitle">
|
3556
3832
|
<xsl:choose>
|
3557
3833
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -3599,6 +3875,7 @@
|
|
3599
3875
|
|
3600
3876
|
|
3601
3877
|
|
3878
|
+
|
3602
3879
|
|
3603
3880
|
|
3604
3881
|
|
@@ -3881,6 +4158,7 @@
|
|
3881
4158
|
<xsl:variable name="element">
|
3882
4159
|
block
|
3883
4160
|
|
4161
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
3884
4162
|
</xsl:variable>
|
3885
4163
|
<xsl:choose>
|
3886
4164
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -3888,7 +4166,7 @@
|
|
3888
4166
|
<xsl:apply-templates/>
|
3889
4167
|
</fo:inline>
|
3890
4168
|
</xsl:when>
|
3891
|
-
<xsl:when test="normalize-space($element)
|
4169
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3892
4170
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
3893
4171
|
<xsl:apply-templates/>
|
3894
4172
|
</fo:block>
|
@@ -3920,7 +4198,7 @@
|
|
3920
4198
|
</fo:inline>
|
3921
4199
|
</xsl:otherwise>
|
3922
4200
|
</xsl:choose>
|
3923
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4201
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
3924
4202
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3925
4203
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3926
4204
|
<xsl:variable name="termsource_text">
|
@@ -3929,13 +4207,15 @@
|
|
3929
4207
|
|
3930
4208
|
<xsl:choose>
|
3931
4209
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3932
|
-
<xsl:apply-templates/>
|
4210
|
+
<!-- <xsl:apply-templates /> -->
|
4211
|
+
<xsl:copy-of select="$termsource_text"/>
|
3933
4212
|
</xsl:when>
|
3934
4213
|
<xsl:otherwise>
|
3935
4214
|
|
3936
4215
|
<xsl:text>[</xsl:text>
|
3937
4216
|
|
3938
|
-
<xsl:apply-templates/>
|
4217
|
+
<!-- <xsl:apply-templates /> -->
|
4218
|
+
<xsl:copy-of select="$termsource_text"/>
|
3939
4219
|
|
3940
4220
|
<xsl:text>]</xsl:text>
|
3941
4221
|
|
@@ -3946,14 +4226,20 @@
|
|
3946
4226
|
<xsl:if test="normalize-space() != ''">
|
3947
4227
|
<xsl:value-of select="."/>
|
3948
4228
|
</xsl:if>
|
3949
|
-
</xsl:template><xsl:
|
4229
|
+
</xsl:template><xsl:variable name="localized.source">
|
4230
|
+
<xsl:call-template name="getLocalizedString">
|
4231
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4232
|
+
</xsl:call-template>
|
4233
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
3950
4234
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4235
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
4236
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4237
|
+
</xsl:if>
|
3951
4238
|
|
3952
4239
|
<fo:inline>
|
3953
4240
|
|
3954
4241
|
|
3955
4242
|
|
3956
|
-
|
3957
4243
|
<xsl:call-template name="getTitle">
|
3958
4244
|
<xsl:with-param name="name" select="'title-source'"/>
|
3959
4245
|
</xsl:call-template>
|
@@ -4102,7 +4388,8 @@
|
|
4102
4388
|
</fo:inline>
|
4103
4389
|
</xsl:when>
|
4104
4390
|
<xsl:otherwise>
|
4105
|
-
<
|
4391
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
4392
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
4106
4393
|
</xsl:otherwise>
|
4107
4394
|
</xsl:choose>
|
4108
4395
|
|
@@ -4161,7 +4448,6 @@
|
|
4161
4448
|
|
4162
4449
|
|
4163
4450
|
|
4164
|
-
|
4165
4451
|
<xsl:apply-templates/>
|
4166
4452
|
</fo:block>
|
4167
4453
|
|
@@ -4204,7 +4490,7 @@
|
|
4204
4490
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4205
4491
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4206
4492
|
<xsl:choose>
|
4207
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
4493
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
4208
4494
|
<fo:block-container>
|
4209
4495
|
<xsl:attribute name="margin-left">
|
4210
4496
|
<xsl:choose>
|
@@ -4214,6 +4500,7 @@
|
|
4214
4500
|
</xsl:attribute>
|
4215
4501
|
|
4216
4502
|
|
4503
|
+
|
4217
4504
|
<fo:block-container margin-left="0mm">
|
4218
4505
|
<fo:block>
|
4219
4506
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -4372,8 +4659,8 @@
|
|
4372
4659
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
4373
4660
|
<xsl:apply-templates/>
|
4374
4661
|
</fo:block>
|
4375
|
-
</xsl:template><xsl:template match="*[local-name() = 'bookmark']">
|
4376
|
-
<fo:inline id="{@id}"/>
|
4662
|
+
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
4663
|
+
<fo:inline id="{@id}" font-size="1pt"/>
|
4377
4664
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4378
4665
|
<!-- <row>
|
4379
4666
|
<date>05-07-2013</date>
|
@@ -4415,6 +4702,10 @@
|
|
4415
4702
|
|
4416
4703
|
|
4417
4704
|
|
4705
|
+
|
4706
|
+
|
4707
|
+
|
4708
|
+
|
4418
4709
|
</xsl:template><xsl:template name="processBibitemDocId">
|
4419
4710
|
<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')]"/>
|
4420
4711
|
<xsl:choose>
|
@@ -4471,6 +4762,70 @@
|
|
4471
4762
|
<xsl:value-of select="substring(.,1,1)"/>
|
4472
4763
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4473
4764
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
4765
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
4766
|
+
<fo:block>
|
4767
|
+
<xsl:apply-templates/>
|
4768
|
+
</fo:block>
|
4769
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
4770
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4771
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
4772
|
+
<fo:inline>
|
4773
|
+
<xsl:call-template name="text_input"/>
|
4774
|
+
</fo:inline>
|
4775
|
+
</xsl:template><xsl:template name="text_input">
|
4776
|
+
<xsl:variable name="count">
|
4777
|
+
<xsl:choose>
|
4778
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
4779
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
4780
|
+
<xsl:otherwise>10</xsl:otherwise>
|
4781
|
+
</xsl:choose>
|
4782
|
+
</xsl:variable>
|
4783
|
+
<xsl:call-template name="repeat">
|
4784
|
+
<xsl:with-param name="char" select="'_'"/>
|
4785
|
+
<xsl:with-param name="count" select="$count"/>
|
4786
|
+
</xsl:call-template>
|
4787
|
+
<xsl:text> </xsl:text>
|
4788
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
4789
|
+
<xsl:variable name="caption">
|
4790
|
+
<xsl:choose>
|
4791
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
4792
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
4793
|
+
</xsl:choose>
|
4794
|
+
</xsl:variable>
|
4795
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
4796
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
4797
|
+
<fo:inline padding-right="1mm">
|
4798
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
4799
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
4800
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4801
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4802
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4803
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
4804
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
4805
|
+
</svg>
|
4806
|
+
</fo:instream-foreign-object>
|
4807
|
+
</fo:inline>
|
4808
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
4809
|
+
<fo:inline padding-right="1mm">
|
4810
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
4811
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
4812
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4813
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4814
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4815
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
4816
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
4817
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
4818
|
+
</svg>
|
4819
|
+
</fo:instream-foreign-object>
|
4820
|
+
</fo:inline>
|
4821
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
4822
|
+
<fo:inline>
|
4823
|
+
<xsl:call-template name="text_input"/>
|
4824
|
+
</fo:inline>
|
4825
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
4826
|
+
<fo:block-container border="1pt solid black" width="50%">
|
4827
|
+
<fo:block> </fo:block>
|
4828
|
+
</fo:block-container>
|
4474
4829
|
</xsl:template><xsl:template name="convertDate">
|
4475
4830
|
<xsl:param name="date"/>
|
4476
4831
|
<xsl:param name="format" select="'short'"/>
|
@@ -4740,6 +5095,7 @@
|
|
4740
5095
|
|
4741
5096
|
|
4742
5097
|
|
5098
|
+
|
4743
5099
|
<xsl:value-of select="document('')//*/namespace::csa"/>
|
4744
5100
|
|
4745
5101
|
|
@@ -4802,17 +5158,62 @@
|
|
4802
5158
|
</xsl:call-template>
|
4803
5159
|
</xsl:if>
|
4804
5160
|
</xsl:template><xsl:template name="getLocalizedString">
|
4805
|
-
<xsl:param name="key"/>
|
5161
|
+
<xsl:param name="key"/>
|
4806
5162
|
|
4807
5163
|
<xsl:variable name="curr_lang">
|
4808
5164
|
<xsl:call-template name="getLang"/>
|
4809
5165
|
</xsl:variable>
|
4810
5166
|
|
5167
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
5168
|
+
|
4811
5169
|
<xsl:choose>
|
5170
|
+
<xsl:when test="$data_value != ''">
|
5171
|
+
<xsl:value-of select="$data_value"/>
|
5172
|
+
</xsl:when>
|
4812
5173
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
4813
5174
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4814
5175
|
</xsl:when>
|
4815
5176
|
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
4816
5177
|
</xsl:choose>
|
4817
5178
|
|
5179
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
5180
|
+
<xsl:param name="isAdded"/>
|
5181
|
+
<xsl:param name="isDeleted"/>
|
5182
|
+
<xsl:choose>
|
5183
|
+
<xsl:when test="local-name() = 'math'">
|
5184
|
+
<xsl:if test="$isAdded = 'true'">
|
5185
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
5186
|
+
</xsl:if>
|
5187
|
+
<xsl:if test="$isDeleted = 'true'">
|
5188
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
5189
|
+
</xsl:if>
|
5190
|
+
</xsl:when>
|
5191
|
+
<xsl:otherwise>
|
5192
|
+
<xsl:if test="$isAdded = 'true'">
|
5193
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
5194
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5195
|
+
</xsl:if>
|
5196
|
+
<xsl:if test="$isDeleted = 'true'">
|
5197
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
5198
|
+
<xsl:if test="local-name() = 'table'">
|
5199
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
5200
|
+
</xsl:if>
|
5201
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
5202
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5203
|
+
</xsl:if>
|
5204
|
+
</xsl:otherwise>
|
5205
|
+
</xsl:choose>
|
5206
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
5207
|
+
<xsl:if test="$lang = 'ar'">
|
5208
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
5209
|
+
</xsl:if>
|
5210
|
+
</xsl:template><xsl:template name="setAlignment">
|
5211
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
5212
|
+
<xsl:choose>
|
5213
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
5214
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
5215
|
+
<xsl:when test="$align != ''">
|
5216
|
+
<xsl:value-of select="$align"/>
|
5217
|
+
</xsl:when>
|
5218
|
+
</xsl:choose>
|
4818
5219
|
</xsl:template></xsl:stylesheet>
|