metanorma-csa 2.1.0 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/csa/csa.standard.xsl +1358 -261
- data/lib/isodoc/csa/html/csa.css +18 -12
- data/lib/isodoc/csa/html/csa.scss +18 -10
- data/lib/isodoc/csa/html/htmlstyle.css +6 -0
- data/lib/isodoc/csa/html/htmlstyle.scss +1 -0
- data/lib/isodoc/csa/presentation_xml_convert.rb +4 -5
- data/lib/metanorma/csa/biblio.rng +134 -39
- data/lib/metanorma/csa/isodoc.rng +16 -0
- data/lib/metanorma/csa/version.rb +1 -1
- data/metanorma-csa.gemspec +1 -1
- metadata +5 -5
@@ -454,6 +454,7 @@
|
|
454
454
|
|
455
455
|
<xsl:template match="csa:p" name="paragraph">
|
456
456
|
<xsl:param name="inline" select="'false'"/>
|
457
|
+
<xsl:param name="split_keep-within-line"/>
|
457
458
|
<xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
|
458
459
|
<xsl:variable name="element-name">
|
459
460
|
<xsl:choose>
|
@@ -481,7 +482,9 @@
|
|
481
482
|
</xsl:choose>
|
482
483
|
</xsl:attribute>
|
483
484
|
<xsl:attribute name="line-height">155%</xsl:attribute>
|
484
|
-
<xsl:apply-templates
|
485
|
+
<xsl:apply-templates>
|
486
|
+
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
487
|
+
</xsl:apply-templates>
|
485
488
|
</xsl:element>
|
486
489
|
<xsl:if test="$element-name = 'fo:inline' and not($inline = 'true') and not(local-name(..) = 'admonition')">
|
487
490
|
<fo:block margin-bottom="12pt">
|
@@ -571,12 +574,41 @@
|
|
571
574
|
<xsl:text>iVBORw0KGgoAAAANSUhEUgAAASEAAAEhCAYAAAAwHRYbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzV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wOtNcx73OVUZKU8kEjQ7lBslnlk6LeLCQDkH0+KXsAyQmoA1prmMffttSMUoQwVkQicLgeDmSG0ruzNZpoCSkCAcwMb9O8ybTgn8OHP/gALge/xsOga0DfQaQCgJE4Uw5monmff5vNaErCSkiBPQkr3IrB7yRyz2V2zAxwYFwOf5dwsP9wCnwWzIhJXCEhIl8IhmPbbTPqMpKISsJKaoVP7OE8f4C+jSlud7OJc/nlvz/mlDdYRU/sjQzi+Z6WE+juR7XGoOlUBJSWG3vJnNTKJxDE90rFAolIYVCoSSkUCgUSkIKhUJJSKFQKJSEFAqFkpBCoVAoCSkUCiUhhUKhUBJSKBRKQgqFQuEF/yfAACbVBNmSyrCxAAAAAElFTkSuQmCC</xsl:text>
|
572
575
|
</xsl:variable>
|
573
576
|
|
574
|
-
<xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:param name="add_math_as_text">true</xsl:param><xsl:variable name="
|
577
|
+
<xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:param name="add_math_as_text">true</xsl:param><xsl:param name="table_if">false</xsl:param><xsl:param name="table_widths"/><xsl:variable name="table_widths_from_if" select="xalan:nodeset($table_widths)"/><xsl:variable name="table_widths_from_if_calculated_">
|
578
|
+
<xsl:for-each select="$table_widths_from_if//table">
|
579
|
+
<xsl:copy>
|
580
|
+
<xsl:copy-of select="@*"/>
|
581
|
+
<xsl:call-template name="calculate-column-widths-autolayout-algorithm"/>
|
582
|
+
</xsl:copy>
|
583
|
+
</xsl:for-each>
|
584
|
+
</xsl:variable><xsl:variable name="table_widths_from_if_calculated" select="xalan:nodeset($table_widths_from_if_calculated_)"/><xsl:param name="table_if_debug">false</xsl:param><xsl:variable name="isGenerateTableIF_">
|
585
|
+
false
|
586
|
+
</xsl:variable><xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/><xsl:variable name="lang">
|
575
587
|
<xsl:call-template name="getLang"/>
|
576
|
-
</xsl:variable><xsl:variable name="
|
577
|
-
|
588
|
+
</xsl:variable><xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/><xsl:variable name="papersize_width_">
|
589
|
+
<xsl:choose>
|
590
|
+
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
591
|
+
<xsl:when test="$papersize = 'a4'">210</xsl:when>
|
592
|
+
</xsl:choose>
|
593
|
+
</xsl:variable><xsl:variable name="papersize_width" select="normalize-space($papersize_width_)"/><xsl:variable name="papersize_height_">
|
594
|
+
<xsl:choose>
|
595
|
+
<xsl:when test="$papersize = 'letter'">279.4</xsl:when>
|
596
|
+
<xsl:when test="$papersize = 'a4'">297</xsl:when>
|
597
|
+
</xsl:choose>
|
598
|
+
</xsl:variable><xsl:variable name="papersize_height" select="normalize-space($papersize_height_)"/><xsl:variable name="pageWidth_">
|
599
|
+
<xsl:choose>
|
600
|
+
<xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
|
601
|
+
<xsl:otherwise>
|
602
|
+
215.9
|
603
|
+
</xsl:otherwise>
|
604
|
+
</xsl:choose>
|
578
605
|
</xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
|
579
|
-
|
606
|
+
<xsl:choose>
|
607
|
+
<xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
|
608
|
+
<xsl:otherwise>
|
609
|
+
279.4
|
610
|
+
</xsl:otherwise>
|
611
|
+
</xsl:choose>
|
580
612
|
</xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="marginLeftRight1_">
|
581
613
|
25
|
582
614
|
</xsl:variable><xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/><xsl:variable name="marginLeftRight2_">
|
@@ -690,11 +722,12 @@
|
|
690
722
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
691
723
|
</xsl:otherwise>
|
692
724
|
</xsl:choose>
|
693
|
-
</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:attribute-set name="root-style">
|
725
|
+
</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="font_noto_sans">Noto Sans, Noto Sans HK, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Sans TC</xsl:variable><xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable><xsl:variable name="font_noto_serif">Noto Serif, Noto Serif HK, Noto Serif JP, Noto Serif KR, Noto Serif SC, Noto Serif TC</xsl:variable><xsl:attribute-set name="root-style">
|
694
726
|
|
695
727
|
|
696
728
|
|
697
|
-
<xsl:attribute name="font-family">Azo Sans, STIX Two Math
|
729
|
+
<xsl:attribute name="font-family">Azo Sans, STIX Two Math, <xsl:value-of select="$font_noto_sans"/></xsl:attribute>
|
730
|
+
<xsl:attribute name="font-family-generic">Sans</xsl:attribute>
|
698
731
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
699
732
|
|
700
733
|
|
@@ -710,6 +743,7 @@
|
|
710
743
|
|
711
744
|
|
712
745
|
|
746
|
+
|
713
747
|
</xsl:attribute-set><xsl:template name="insertRootStyle">
|
714
748
|
<xsl:param name="root-style"/>
|
715
749
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
@@ -721,17 +755,60 @@
|
|
721
755
|
</xsl:variable>
|
722
756
|
<xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
|
723
757
|
|
758
|
+
<xsl:variable name="font_family_generic" select="$root-style_/root-style/@font-family-generic"/>
|
759
|
+
|
724
760
|
<xsl:for-each select="$root-style_/root-style/@*">
|
761
|
+
|
725
762
|
<xsl:choose>
|
726
|
-
<xsl:when test="local-name() = 'font-family'
|
763
|
+
<xsl:when test="local-name() = 'font-family-generic'"><!-- skip, it's using for determine 'sans' or 'serif' --></xsl:when>
|
764
|
+
<xsl:when test="local-name() = 'font-family'">
|
765
|
+
|
766
|
+
<xsl:variable name="font_regional_prefix">
|
767
|
+
<xsl:choose>
|
768
|
+
<xsl:when test="$font_family_generic = 'Sans'">Noto Sans</xsl:when>
|
769
|
+
<xsl:otherwise>Noto Serif</xsl:otherwise>
|
770
|
+
</xsl:choose>
|
771
|
+
</xsl:variable>
|
772
|
+
|
727
773
|
<xsl:attribute name="{local-name()}">
|
728
|
-
|
774
|
+
|
775
|
+
<xsl:variable name="font_extended">
|
776
|
+
<xsl:choose>
|
777
|
+
<xsl:when test="$lang = 'zh'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
|
778
|
+
<xsl:when test="$lang = 'hk'"><xsl:value-of select="$font_regional_prefix"/> HK</xsl:when>
|
779
|
+
<xsl:when test="$lang = 'jp'"><xsl:value-of select="$font_regional_prefix"/> JP</xsl:when>
|
780
|
+
<xsl:when test="$lang = 'kr'"><xsl:value-of select="$font_regional_prefix"/> KR</xsl:when>
|
781
|
+
<xsl:when test="$lang = 'sc'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
|
782
|
+
<xsl:when test="$lang = 'tc'"><xsl:value-of select="$font_regional_prefix"/> TC</xsl:when>
|
783
|
+
</xsl:choose>
|
784
|
+
</xsl:variable>
|
785
|
+
<xsl:if test="normalize-space($font_extended) != ''">
|
786
|
+
<xsl:value-of select="$font_regional_prefix"/><xsl:text>, </xsl:text>
|
787
|
+
<xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
|
788
|
+
</xsl:if>
|
789
|
+
|
790
|
+
<xsl:value-of select="."/>
|
791
|
+
|
792
|
+
<xsl:if test="$additional_fonts != ''">
|
793
|
+
<xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
|
794
|
+
</xsl:if>
|
729
795
|
</xsl:attribute>
|
730
796
|
</xsl:when>
|
731
797
|
<xsl:otherwise>
|
732
798
|
<xsl:copy-of select="."/>
|
733
799
|
</xsl:otherwise>
|
734
800
|
</xsl:choose>
|
801
|
+
|
802
|
+
<!-- <xsl:choose>
|
803
|
+
<xsl:when test="local-name() = 'font-family'">
|
804
|
+
<xsl:attribute name="{local-name()}">
|
805
|
+
<xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
|
806
|
+
</xsl:attribute>
|
807
|
+
</xsl:when>
|
808
|
+
<xsl:otherwise>
|
809
|
+
<xsl:copy-of select="."/>
|
810
|
+
</xsl:otherwise>
|
811
|
+
</xsl:choose> -->
|
735
812
|
</xsl:for-each>
|
736
813
|
</xsl:template><xsl:attribute-set name="copyright-statement-style">
|
737
814
|
|
@@ -797,7 +874,7 @@
|
|
797
874
|
<xsl:attribute name="role">Code</xsl:attribute>
|
798
875
|
|
799
876
|
|
800
|
-
<xsl:attribute name="font-family">Source Code Pro
|
877
|
+
<xsl:attribute name="font-family">Source Code Pro, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
801
878
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
802
879
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
803
880
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
@@ -810,6 +887,7 @@
|
|
810
887
|
|
811
888
|
|
812
889
|
|
890
|
+
|
813
891
|
|
814
892
|
|
815
893
|
|
@@ -853,6 +931,7 @@
|
|
853
931
|
|
854
932
|
|
855
933
|
|
934
|
+
|
856
935
|
|
857
936
|
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
858
937
|
|
@@ -870,6 +949,7 @@
|
|
870
949
|
|
871
950
|
|
872
951
|
|
952
|
+
|
873
953
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
874
954
|
|
875
955
|
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
@@ -897,6 +977,7 @@
|
|
897
977
|
|
898
978
|
|
899
979
|
|
980
|
+
|
900
981
|
|
901
982
|
|
902
983
|
|
@@ -931,6 +1012,7 @@
|
|
931
1012
|
|
932
1013
|
</xsl:attribute-set><xsl:variable name="table-border_">
|
933
1014
|
|
1015
|
+
|
934
1016
|
</xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
|
935
1017
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
936
1018
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -953,6 +1035,7 @@
|
|
953
1035
|
|
954
1036
|
|
955
1037
|
|
1038
|
+
|
956
1039
|
|
957
1040
|
|
958
1041
|
|
@@ -982,6 +1065,7 @@
|
|
982
1065
|
|
983
1066
|
|
984
1067
|
|
1068
|
+
|
985
1069
|
|
986
1070
|
|
987
1071
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
@@ -990,6 +1074,7 @@
|
|
990
1074
|
|
991
1075
|
|
992
1076
|
|
1077
|
+
|
993
1078
|
|
994
1079
|
|
995
1080
|
|
@@ -1027,6 +1112,7 @@
|
|
1027
1112
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1028
1113
|
<xsl:attribute name="border">solid black 1pt</xsl:attribute>
|
1029
1114
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
1115
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1030
1116
|
<xsl:attribute name="display-align">center</xsl:attribute>
|
1031
1117
|
|
1032
1118
|
|
@@ -1045,6 +1131,8 @@
|
|
1045
1131
|
<xsl:attribute name="display-align">center</xsl:attribute>
|
1046
1132
|
<xsl:attribute name="border">solid black 1pt</xsl:attribute>
|
1047
1133
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
1134
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1135
|
+
|
1048
1136
|
|
1049
1137
|
|
1050
1138
|
|
@@ -1070,7 +1158,7 @@
|
|
1070
1158
|
|
1071
1159
|
|
1072
1160
|
|
1073
|
-
|
1161
|
+
|
1074
1162
|
|
1075
1163
|
|
1076
1164
|
|
@@ -1085,6 +1173,7 @@
|
|
1085
1173
|
|
1086
1174
|
|
1087
1175
|
|
1176
|
+
|
1088
1177
|
</xsl:attribute-set><xsl:attribute-set name="table-fn-style">
|
1089
1178
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1090
1179
|
|
@@ -1093,6 +1182,8 @@
|
|
1093
1182
|
|
1094
1183
|
|
1095
1184
|
|
1185
|
+
|
1186
|
+
|
1096
1187
|
</xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
|
1097
1188
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
1098
1189
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
@@ -1108,6 +1199,7 @@
|
|
1108
1199
|
|
1109
1200
|
|
1110
1201
|
|
1202
|
+
|
1111
1203
|
</xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
|
1112
1204
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1113
1205
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
@@ -1127,7 +1219,8 @@
|
|
1127
1219
|
</xsl:attribute-set><xsl:attribute-set name="dt-row-style">
|
1128
1220
|
|
1129
1221
|
|
1130
|
-
</xsl:attribute-set><xsl:attribute-set name="dt-style">
|
1222
|
+
</xsl:attribute-set><xsl:attribute-set name="dt-cell-style">
|
1223
|
+
</xsl:attribute-set><xsl:attribute-set name="dt-block-style">
|
1131
1224
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1132
1225
|
|
1133
1226
|
|
@@ -1139,6 +1232,27 @@
|
|
1139
1232
|
|
1140
1233
|
|
1141
1234
|
|
1235
|
+
|
1236
|
+
</xsl:attribute-set><xsl:attribute-set name="dl-name-style">
|
1237
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1238
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1239
|
+
|
1240
|
+
|
1241
|
+
|
1242
|
+
|
1243
|
+
|
1244
|
+
|
1245
|
+
|
1246
|
+
|
1247
|
+
|
1248
|
+
|
1249
|
+
|
1250
|
+
|
1251
|
+
|
1252
|
+
|
1253
|
+
|
1254
|
+
</xsl:attribute-set><xsl:attribute-set name="dd-cell-style">
|
1255
|
+
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
1142
1256
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1143
1257
|
|
1144
1258
|
|
@@ -1176,6 +1290,7 @@
|
|
1176
1290
|
|
1177
1291
|
|
1178
1292
|
|
1293
|
+
|
1179
1294
|
|
1180
1295
|
|
1181
1296
|
|
@@ -1242,6 +1357,8 @@
|
|
1242
1357
|
|
1243
1358
|
|
1244
1359
|
|
1360
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-p-style">
|
1361
|
+
|
1245
1362
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1246
1363
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
1247
1364
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
@@ -1300,6 +1417,7 @@
|
|
1300
1417
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1301
1418
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1302
1419
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1420
|
+
|
1303
1421
|
|
1304
1422
|
|
1305
1423
|
|
@@ -1343,6 +1461,7 @@
|
|
1343
1461
|
|
1344
1462
|
|
1345
1463
|
|
1464
|
+
|
1346
1465
|
</xsl:attribute-set><xsl:attribute-set name="formula-stem-number-style">
|
1347
1466
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
1348
1467
|
|
@@ -1361,19 +1480,19 @@
|
|
1361
1480
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
1362
1481
|
|
1363
1482
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1483
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
1484
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
1485
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
1364
1486
|
|
1365
1487
|
|
1366
|
-
<xsl:attribute name="width">100%</xsl:attribute>
|
1367
1488
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
1368
|
-
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
1369
1489
|
|
1370
1490
|
|
1371
1491
|
|
1372
|
-
|
1373
|
-
|
1492
|
+
|
1374
1493
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1375
1494
|
|
1376
|
-
<xsl:attribute name="font-family">Source Code Pro
|
1495
|
+
<xsl:attribute name="font-family">Source Code Pro, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
1377
1496
|
|
1378
1497
|
|
1379
1498
|
|
@@ -1458,6 +1577,23 @@
|
|
1458
1577
|
|
1459
1578
|
|
1460
1579
|
|
1580
|
+
|
1581
|
+
</xsl:attribute-set><xsl:attribute-set name="list-name-style">
|
1582
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1583
|
+
|
1584
|
+
|
1585
|
+
|
1586
|
+
|
1587
|
+
|
1588
|
+
|
1589
|
+
|
1590
|
+
|
1591
|
+
|
1592
|
+
|
1593
|
+
|
1594
|
+
|
1595
|
+
|
1596
|
+
|
1461
1597
|
</xsl:attribute-set><xsl:attribute-set name="list-item-style">
|
1462
1598
|
|
1463
1599
|
|
@@ -1507,6 +1643,7 @@
|
|
1507
1643
|
|
1508
1644
|
|
1509
1645
|
|
1646
|
+
|
1510
1647
|
</xsl:attribute-set><xsl:attribute-set name="fn-body-style">
|
1511
1648
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1512
1649
|
<xsl:attribute name="font-style">normal</xsl:attribute>
|
@@ -1536,6 +1673,7 @@
|
|
1536
1673
|
|
1537
1674
|
|
1538
1675
|
|
1676
|
+
|
1539
1677
|
</xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
|
1540
1678
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
1541
1679
|
|
@@ -1558,6 +1696,7 @@
|
|
1558
1696
|
|
1559
1697
|
|
1560
1698
|
|
1699
|
+
|
1561
1700
|
</xsl:attribute-set><xsl:attribute-set name="admonition-style">
|
1562
1701
|
|
1563
1702
|
<xsl:attribute name="border">0.5pt solid rgb(79, 129, 189)</xsl:attribute>
|
@@ -1579,10 +1718,11 @@
|
|
1579
1718
|
|
1580
1719
|
|
1581
1720
|
|
1721
|
+
|
1582
1722
|
</xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
|
1723
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1724
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1583
1725
|
|
1584
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1585
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1586
1726
|
<xsl:attribute name="padding">2mm</xsl:attribute>
|
1587
1727
|
<xsl:attribute name="padding-top">3mm</xsl:attribute>
|
1588
1728
|
|
@@ -1595,6 +1735,7 @@
|
|
1595
1735
|
|
1596
1736
|
|
1597
1737
|
|
1738
|
+
|
1598
1739
|
</xsl:attribute-set><xsl:attribute-set name="admonition-name-style">
|
1599
1740
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1600
1741
|
|
@@ -1630,6 +1771,7 @@
|
|
1630
1771
|
|
1631
1772
|
|
1632
1773
|
|
1774
|
+
|
1633
1775
|
</xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
|
1634
1776
|
|
1635
1777
|
|
@@ -1668,6 +1810,7 @@
|
|
1668
1810
|
|
1669
1811
|
|
1670
1812
|
|
1813
|
+
|
1671
1814
|
</xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
|
1672
1815
|
|
1673
1816
|
|
@@ -1690,6 +1833,7 @@
|
|
1690
1833
|
|
1691
1834
|
|
1692
1835
|
|
1836
|
+
|
1693
1837
|
</xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
|
1694
1838
|
|
1695
1839
|
|
@@ -1718,6 +1862,7 @@
|
|
1718
1862
|
|
1719
1863
|
|
1720
1864
|
|
1865
|
+
|
1721
1866
|
</xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
|
1722
1867
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
1723
1868
|
|
@@ -1739,6 +1884,7 @@
|
|
1739
1884
|
|
1740
1885
|
|
1741
1886
|
|
1887
|
+
|
1742
1888
|
</xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
|
1743
1889
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1744
1890
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -1757,6 +1903,7 @@
|
|
1757
1903
|
|
1758
1904
|
|
1759
1905
|
|
1906
|
+
|
1760
1907
|
</xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
|
1761
1908
|
|
1762
1909
|
|
@@ -1870,13 +2017,13 @@
|
|
1870
2017
|
|
1871
2018
|
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1872
2019
|
<xsl:variable name="nodes_preface_">
|
1873
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2020
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
1874
2021
|
<node id="{@id}"/>
|
1875
2022
|
</xsl:for-each>
|
1876
2023
|
</xsl:variable>
|
1877
2024
|
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
1878
2025
|
|
1879
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2026
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
1880
2027
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1881
2028
|
|
1882
2029
|
<!-- process Section's title -->
|
@@ -1942,7 +2089,7 @@
|
|
1942
2089
|
</xsl:for-each>
|
1943
2090
|
</figures>
|
1944
2091
|
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1945
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2092
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
1946
2093
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1947
2094
|
<xsl:apply-templates select="."/>
|
1948
2095
|
</xsl:for-each>
|
@@ -1996,7 +2143,38 @@
|
|
1996
2143
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
1997
2144
|
<xsl:value-of select="$linebreak"/>
|
1998
2145
|
</xsl:template><xsl:template match="*[local-name() = 'keep-together_within-line']">
|
1999
|
-
<
|
2146
|
+
<xsl:param name="split_keep-within-line"/>
|
2147
|
+
|
2148
|
+
<!-- <fo:inline>split_keep-within-line='<xsl:value-of select="$split_keep-within-line"/>'</fo:inline> -->
|
2149
|
+
<xsl:choose>
|
2150
|
+
|
2151
|
+
<xsl:when test="normalize-space($split_keep-within-line) = 'true'">
|
2152
|
+
<xsl:variable name="sep">_</xsl:variable>
|
2153
|
+
<xsl:variable name="items">
|
2154
|
+
<xsl:call-template name="split">
|
2155
|
+
<xsl:with-param name="pText" select="."/>
|
2156
|
+
<xsl:with-param name="sep" select="$sep"/>
|
2157
|
+
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
2158
|
+
<xsl:with-param name="keep_sep">true</xsl:with-param>
|
2159
|
+
</xsl:call-template>
|
2160
|
+
</xsl:variable>
|
2161
|
+
<xsl:for-each select="xalan:nodeset($items)/item">
|
2162
|
+
<xsl:choose>
|
2163
|
+
<xsl:when test=". = $sep">
|
2164
|
+
<xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
|
2165
|
+
</xsl:when>
|
2166
|
+
<xsl:otherwise>
|
2167
|
+
<fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
|
2168
|
+
</xsl:otherwise>
|
2169
|
+
</xsl:choose>
|
2170
|
+
</xsl:for-each>
|
2171
|
+
</xsl:when>
|
2172
|
+
|
2173
|
+
<xsl:otherwise>
|
2174
|
+
<fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
|
2175
|
+
</xsl:otherwise>
|
2176
|
+
|
2177
|
+
</xsl:choose>
|
2000
2178
|
</xsl:template><xsl:template match="*[local-name()='copyright-statement']">
|
2001
2179
|
<fo:block xsl:use-attribute-sets="copyright-statement-style">
|
2002
2180
|
<xsl:apply-templates/>
|
@@ -2088,9 +2266,14 @@
|
|
2088
2266
|
|
2089
2267
|
<xsl:variable name="table">
|
2090
2268
|
|
2091
|
-
<xsl:variable name="simple-table">
|
2092
|
-
<xsl:call-template name="getSimpleTable"
|
2269
|
+
<xsl:variable name="simple-table">
|
2270
|
+
<xsl:call-template name="getSimpleTable">
|
2271
|
+
<xsl:with-param name="id" select="@id"/>
|
2272
|
+
</xsl:call-template>
|
2093
2273
|
</xsl:variable>
|
2274
|
+
<!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
|
2275
|
+
|
2276
|
+
<!-- simple-table=<xsl:copy-of select="$simple-table"/> -->
|
2094
2277
|
|
2095
2278
|
|
2096
2279
|
<!-- Display table's name before table as standalone block -->
|
@@ -2111,7 +2294,23 @@
|
|
2111
2294
|
</xsl:call-template>
|
2112
2295
|
</xsl:if>
|
2113
2296
|
</xsl:variable>
|
2114
|
-
<!--
|
2297
|
+
<!-- <xsl:variable name="colwidths" select="xalan:nodeset($colwidths_)"/> -->
|
2298
|
+
|
2299
|
+
<!-- DEBUG -->
|
2300
|
+
<xsl:if test="$table_if_debug = 'true'">
|
2301
|
+
<fo:block font-size="60%">
|
2302
|
+
<xsl:apply-templates select="xalan:nodeset($colwidths)" mode="print_as_xml"/>
|
2303
|
+
</fo:block>
|
2304
|
+
</xsl:if>
|
2305
|
+
|
2306
|
+
|
2307
|
+
<!-- <xsl:copy-of select="$colwidths"/> -->
|
2308
|
+
|
2309
|
+
<!-- <xsl:text disable-output-escaping="yes"><!- -</xsl:text>
|
2310
|
+
DEBUG
|
2311
|
+
colwidths=<xsl:copy-of select="$colwidths"/>
|
2312
|
+
<xsl:text disable-output-escaping="yes">- -></xsl:text> -->
|
2313
|
+
|
2115
2314
|
|
2116
2315
|
|
2117
2316
|
<xsl:variable name="margin-side">
|
@@ -2136,6 +2335,8 @@
|
|
2136
2335
|
|
2137
2336
|
|
2138
2337
|
|
2338
|
+
|
2339
|
+
|
2139
2340
|
|
2140
2341
|
|
2141
2342
|
|
@@ -2175,12 +2376,22 @@
|
|
2175
2376
|
|
2176
2377
|
|
2177
2378
|
|
2379
|
+
|
2380
|
+
|
2178
2381
|
</xsl:element>
|
2179
2382
|
</xsl:variable>
|
2180
2383
|
|
2384
|
+
<xsl:if test="$isGenerateTableIF = 'true'">
|
2385
|
+
<!-- to determine start of table -->
|
2386
|
+
<fo:block id="{concat('table_if_start_',@id)}" keep-with-next="always" font-size="1pt">Start table '<xsl:value-of select="@id"/>'.</fo:block>
|
2387
|
+
</xsl:if>
|
2181
2388
|
|
2182
2389
|
<fo:table id="{@id}">
|
2183
2390
|
|
2391
|
+
<xsl:if test="$isGenerateTableIF = 'true'">
|
2392
|
+
<xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
|
2393
|
+
</xsl:if>
|
2394
|
+
|
2184
2395
|
<xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
|
2185
2396
|
<xsl:attribute name="{local-name()}">
|
2186
2397
|
<xsl:value-of select="."/>
|
@@ -2194,24 +2405,47 @@
|
|
2194
2405
|
|
2195
2406
|
|
2196
2407
|
<xsl:choose>
|
2197
|
-
<xsl:when test="
|
2198
|
-
|
2199
|
-
|
2200
|
-
|
2408
|
+
<xsl:when test="$isGenerateTableIF = 'true'">
|
2409
|
+
<!-- generate IF for table widths -->
|
2410
|
+
<!-- example:
|
2411
|
+
<tr>
|
2412
|
+
<td valign="top" align="left" id="tab-symdu_1_1">
|
2413
|
+
<p>Symbol</p>
|
2414
|
+
<word id="tab-symdu_1_1_word_1">Symbol</word>
|
2415
|
+
</td>
|
2416
|
+
<td valign="top" align="left" id="tab-symdu_1_2">
|
2417
|
+
<p>Description</p>
|
2418
|
+
<word id="tab-symdu_1_2_word_1">Description</word>
|
2419
|
+
</td>
|
2420
|
+
</tr>
|
2421
|
+
-->
|
2422
|
+
<xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
|
2423
|
+
|
2201
2424
|
</xsl:when>
|
2202
2425
|
<xsl:otherwise>
|
2203
|
-
<xsl:call-template name="insertTableColumnWidth">
|
2204
|
-
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2205
|
-
</xsl:call-template>
|
2206
|
-
</xsl:otherwise>
|
2207
|
-
</xsl:choose>
|
2208
2426
|
|
2209
|
-
|
2210
|
-
|
2211
|
-
|
2212
|
-
|
2213
|
-
|
2214
|
-
|
2427
|
+
<xsl:choose>
|
2428
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2429
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
2430
|
+
<fo:table-column column-width="{@width}"/>
|
2431
|
+
</xsl:for-each>
|
2432
|
+
</xsl:when>
|
2433
|
+
<xsl:otherwise>
|
2434
|
+
<xsl:call-template name="insertTableColumnWidth">
|
2435
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2436
|
+
</xsl:call-template>
|
2437
|
+
</xsl:otherwise>
|
2438
|
+
</xsl:choose>
|
2439
|
+
|
2440
|
+
<xsl:choose>
|
2441
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
2442
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2443
|
+
</xsl:when>
|
2444
|
+
<xsl:otherwise>
|
2445
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer and note that renders separaterely -->
|
2446
|
+
</xsl:otherwise>
|
2447
|
+
</xsl:choose>
|
2448
|
+
|
2215
2449
|
</xsl:otherwise>
|
2216
2450
|
</xsl:choose>
|
2217
2451
|
|
@@ -2289,23 +2523,29 @@
|
|
2289
2523
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
2290
2524
|
<xsl:param name="continued"/>
|
2291
2525
|
<xsl:if test="normalize-space() != ''">
|
2292
|
-
|
2293
|
-
|
2294
|
-
|
2295
|
-
|
2296
|
-
|
2526
|
+
|
2527
|
+
|
2297
2528
|
|
2298
|
-
|
2299
|
-
|
2529
|
+
<fo:block xsl:use-attribute-sets="table-name-style">
|
2530
|
+
|
2300
2531
|
|
2301
|
-
|
2302
|
-
|
2303
|
-
|
2304
|
-
|
2305
|
-
|
2306
|
-
|
2532
|
+
|
2533
|
+
|
2534
|
+
|
2535
|
+
<xsl:choose>
|
2536
|
+
<xsl:when test="$continued = 'true'">
|
2537
|
+
|
2538
|
+
</xsl:when>
|
2539
|
+
<xsl:otherwise>
|
2540
|
+
<xsl:apply-templates/>
|
2541
|
+
</xsl:otherwise>
|
2542
|
+
</xsl:choose>
|
2543
|
+
|
2544
|
+
|
2545
|
+
</fo:block>
|
2546
|
+
|
2307
2547
|
|
2308
|
-
|
2548
|
+
|
2309
2549
|
</xsl:if>
|
2310
2550
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
2311
2551
|
<xsl:param name="table-row"/>
|
@@ -2314,11 +2554,22 @@
|
|
2314
2554
|
<xsl:variable name="columns-with-colspan" select="count($table-row/*[@colspan])"/>
|
2315
2555
|
<xsl:value-of select="$columns-count + $sum-colspans - $columns-with-colspan"/>
|
2316
2556
|
</xsl:template><xsl:template name="calculate-column-widths">
|
2557
|
+
<xsl:param name="table"/>
|
2558
|
+
<xsl:param name="cols-count"/>
|
2559
|
+
|
2560
|
+
<xsl:call-template name="calculate-column-widths-proportional">
|
2561
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2562
|
+
<xsl:with-param name="table" select="$table"/>
|
2563
|
+
</xsl:call-template>
|
2564
|
+
|
2565
|
+
</xsl:template><xsl:template name="calculate-column-widths-proportional">
|
2317
2566
|
<xsl:param name="table"/>
|
2318
2567
|
<xsl:param name="cols-count"/>
|
2319
2568
|
<xsl:param name="curr-col" select="1"/>
|
2320
2569
|
<xsl:param name="width" select="0"/>
|
2321
2570
|
|
2571
|
+
<!-- table=<xsl:copy-of select="$table"/> -->
|
2572
|
+
|
2322
2573
|
<xsl:if test="$curr-col <= $cols-count">
|
2323
2574
|
<xsl:variable name="widths">
|
2324
2575
|
<xsl:choose>
|
@@ -2356,10 +2607,15 @@
|
|
2356
2607
|
</xsl:for-each>
|
2357
2608
|
</xsl:when>
|
2358
2609
|
<xsl:otherwise>
|
2359
|
-
<xsl:
|
2610
|
+
<!-- <curr_col><xsl:value-of select="$curr-col"/></curr_col> -->
|
2611
|
+
|
2612
|
+
<!-- <table><xsl:copy-of select="$table"/></table>
|
2613
|
+
-->
|
2614
|
+
<xsl:for-each select="xalan:nodeset($table)/*/*[local-name()='tr']">
|
2360
2615
|
<xsl:variable name="td_text">
|
2361
2616
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2362
2617
|
</xsl:variable>
|
2618
|
+
<!-- <td_text><xsl:value-of select="$td_text"/></td_text> -->
|
2363
2619
|
<xsl:variable name="words">
|
2364
2620
|
<xsl:variable name="string_with_added_zerospaces">
|
2365
2621
|
<xsl:call-template name="add-zero-spaces-java">
|
@@ -2374,6 +2630,7 @@
|
|
2374
2630
|
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
|
2375
2631
|
</xsl:call-template>
|
2376
2632
|
</xsl:variable>
|
2633
|
+
<!-- words=<xsl:copy-of select="$words"/> -->
|
2377
2634
|
<xsl:variable name="max_length">
|
2378
2635
|
<xsl:call-template name="max_length">
|
2379
2636
|
<xsl:with-param name="words" select="xalan:nodeset($words)"/>
|
@@ -2398,6 +2655,8 @@
|
|
2398
2655
|
</xsl:choose>
|
2399
2656
|
</xsl:variable>
|
2400
2657
|
|
2658
|
+
<!-- widths=<xsl:copy-of select="$widths"/> -->
|
2659
|
+
|
2401
2660
|
<column>
|
2402
2661
|
<xsl:for-each select="xalan:nodeset($widths)//width">
|
2403
2662
|
<xsl:sort select="." data-type="number" order="descending"/>
|
@@ -2406,33 +2665,271 @@
|
|
2406
2665
|
</xsl:if>
|
2407
2666
|
</xsl:for-each>
|
2408
2667
|
</column>
|
2409
|
-
<xsl:call-template name="calculate-column-widths">
|
2668
|
+
<xsl:call-template name="calculate-column-widths-proportional">
|
2410
2669
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2411
2670
|
<xsl:with-param name="curr-col" select="$curr-col +1"/>
|
2412
2671
|
<xsl:with-param name="table" select="$table"/>
|
2413
2672
|
</xsl:call-template>
|
2414
2673
|
</xsl:if>
|
2415
|
-
</xsl:template><xsl:template match="*[@keep-together.within-line]/text()" priority="2" mode="td_text">
|
2674
|
+
</xsl:template><xsl:template match="*[@keep-together.within-line or local-name() = 'keep-together_within-line']/text()" priority="2" mode="td_text">
|
2416
2675
|
<!-- <xsl:message>DEBUG t1=<xsl:value-of select="."/></xsl:message>
|
2417
2676
|
<xsl:message>DEBUG t2=<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'.','X')"/></xsl:message> -->
|
2418
2677
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'.','X')"/>
|
2678
|
+
|
2679
|
+
<!-- if all capitals english letters or digits -->
|
2680
|
+
<xsl:if test="normalize-space(translate(., concat($upper,'0123456789'), '')) = ''">
|
2681
|
+
<xsl:call-template name="repeat">
|
2682
|
+
<xsl:with-param name="char" select="'X'"/>
|
2683
|
+
<xsl:with-param name="count" select="string-length(normalize-space(.)) * 0.5"/>
|
2684
|
+
</xsl:call-template>
|
2685
|
+
</xsl:if>
|
2419
2686
|
</xsl:template><xsl:template match="text()" mode="td_text">
|
2420
2687
|
<xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
|
2421
2688
|
</xsl:template><xsl:template match="*[local-name()='termsource']" mode="td_text">
|
2422
2689
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
2423
2690
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
2424
2691
|
<xsl:value-of select="@target"/>
|
2425
|
-
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
2426
|
-
<xsl:
|
2427
|
-
<xsl:
|
2428
|
-
<xsl:
|
2429
|
-
<xsl:
|
2430
|
-
|
2692
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text" name="math_length">
|
2693
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
2694
|
+
<xsl:variable name="mathml_">
|
2695
|
+
<xsl:for-each select="*">
|
2696
|
+
<xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
|
2697
|
+
<xsl:copy-of select="."/>
|
2698
|
+
</xsl:if>
|
2699
|
+
</xsl:for-each>
|
2700
|
+
</xsl:variable>
|
2701
|
+
<xsl:variable name="mathml" select="xalan:nodeset($mathml_)"/>
|
2702
|
+
|
2703
|
+
<xsl:variable name="math_text">
|
2704
|
+
<xsl:value-of select="normalize-space($mathml)"/>
|
2705
|
+
<xsl:for-each select="$mathml//@open"><xsl:value-of select="."/></xsl:for-each>
|
2706
|
+
<xsl:for-each select="$mathml//@close"><xsl:value-of select="."/></xsl:for-each>
|
2707
|
+
</xsl:variable>
|
2708
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
2709
|
+
</xsl:if>
|
2710
|
+
</xsl:template><xsl:template name="calculate-column-widths-autolayout-algorithm">
|
2711
|
+
<xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
|
2712
|
+
|
2713
|
+
<!-- via intermediate format -->
|
2714
|
+
|
2715
|
+
<!-- The algorithm uses two passes through the table data and scales linearly with the size of the table -->
|
2716
|
+
|
2717
|
+
<!-- In the first pass, line wrapping is disabled, and the user agent keeps track of the minimum and maximum width of each cell. -->
|
2718
|
+
|
2719
|
+
<!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
|
2720
|
+
|
2721
|
+
<!-- get current table id -->
|
2722
|
+
<xsl:variable name="table_id" select="@id"/>
|
2723
|
+
<!-- find table by id in the file 'table_widths' -->
|
2724
|
+
<!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
|
2725
|
+
<xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
|
2726
|
+
|
2727
|
+
<!-- table='<xsl:copy-of select="$table"/>' -->
|
2728
|
+
<!-- table_id='<xsl:value-of select="$table_id"/>\ -->
|
2729
|
+
<!-- table-if='<xsl:copy-of select="$table-if"/>' -->
|
2730
|
+
<!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
|
2731
|
+
|
2732
|
+
<xsl:variable name="table_with_cell_widths_">
|
2733
|
+
<xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
|
2734
|
+
</xsl:variable>
|
2735
|
+
<xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
|
2736
|
+
|
2737
|
+
<!-- <xsl:if test="$table_if_debug = 'true'">
|
2738
|
+
<xsl:copy-of select="$table_with_cell_widths"/>
|
2739
|
+
</xsl:if> -->
|
2740
|
+
|
2741
|
+
|
2742
|
+
<!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
|
2743
|
+
|
2744
|
+
<xsl:variable name="column_widths_">
|
2745
|
+
<!-- iteration of columns -->
|
2746
|
+
<xsl:for-each select="$table_with_cell_widths//tr[1]/td">
|
2747
|
+
<xsl:variable name="pos" select="position()"/>
|
2748
|
+
<column>
|
2749
|
+
<xsl:attribute name="width_max">
|
2750
|
+
<xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
|
2751
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
2752
|
+
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
2753
|
+
</xsl:for-each>
|
2754
|
+
</xsl:attribute>
|
2755
|
+
<xsl:attribute name="width_min">
|
2756
|
+
<xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
|
2757
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
2758
|
+
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
2759
|
+
</xsl:for-each>
|
2760
|
+
</xsl:attribute>
|
2761
|
+
</column>
|
2431
2762
|
</xsl:for-each>
|
2432
2763
|
</xsl:variable>
|
2764
|
+
<xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
|
2765
|
+
|
2766
|
+
<!-- <column_widths>
|
2767
|
+
<xsl:copy-of select="$column_widths"/>
|
2768
|
+
</column_widths> -->
|
2433
2769
|
|
2434
|
-
|
2435
|
-
<xsl:
|
2770
|
+
<!-- These in turn, are used to find the minimum and maximum width for the table. -->
|
2771
|
+
<xsl:variable name="table_widths_">
|
2772
|
+
<table>
|
2773
|
+
<xsl:attribute name="width_max">
|
2774
|
+
<xsl:value-of select="sum($column_widths/column/@width_max)"/>
|
2775
|
+
</xsl:attribute>
|
2776
|
+
<xsl:attribute name="width_min">
|
2777
|
+
<xsl:value-of select="sum($column_widths/column/@width_min)"/>
|
2778
|
+
</xsl:attribute>
|
2779
|
+
</table>
|
2780
|
+
</xsl:variable>
|
2781
|
+
<xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
|
2782
|
+
|
2783
|
+
<xsl:variable name="page_width">
|
2784
|
+
<xsl:choose>
|
2785
|
+
<xsl:when test="$parent_table_page-width != ''">
|
2786
|
+
<xsl:value-of select="$parent_table_page-width"/>
|
2787
|
+
</xsl:when>
|
2788
|
+
<xsl:otherwise>
|
2789
|
+
<xsl:value-of select="@page-width"/>
|
2790
|
+
</xsl:otherwise>
|
2791
|
+
</xsl:choose>
|
2792
|
+
</xsl:variable>
|
2793
|
+
|
2794
|
+
<xsl:if test="$table_if_debug = 'true'">
|
2795
|
+
<table_width>
|
2796
|
+
<xsl:copy-of select="$table_widths"/>
|
2797
|
+
</table_width>
|
2798
|
+
<debug>$page_width=<xsl:value-of select="$page_width"/></debug>
|
2799
|
+
</xsl:if>
|
2800
|
+
|
2801
|
+
|
2802
|
+
<!-- There are three cases: -->
|
2803
|
+
<xsl:choose>
|
2804
|
+
<!-- 1. The minimum table width is equal to or wider than the available space -->
|
2805
|
+
<xsl:when test="$table_widths/table/@width_min >= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
|
2806
|
+
<!-- call old algorithm -->
|
2807
|
+
<case1/>
|
2808
|
+
<!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
|
2809
|
+
<xsl:call-template name="calculate-column-widths-proportional">
|
2810
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2811
|
+
<xsl:with-param name="table" select="$table"/>
|
2812
|
+
</xsl:call-template> -->
|
2813
|
+
</xsl:when>
|
2814
|
+
<!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
|
2815
|
+
<xsl:when test="$table_widths/table/@width_max <= $page_width">
|
2816
|
+
<case2/>
|
2817
|
+
<autolayout/>
|
2818
|
+
<xsl:for-each select="$column_widths/column/@width_max">
|
2819
|
+
<column divider="100"><xsl:value-of select="."/></column>
|
2820
|
+
</xsl:for-each>
|
2821
|
+
</xsl:when>
|
2822
|
+
<!-- 3. The maximum width of the table is greater than the available space, but the minimum table width is smaller.
|
2823
|
+
In this case, find the difference between the available space and the minimum table width, lets call it W.
|
2824
|
+
Lets also call D the difference between maximum and minimum width of the table.
|
2825
|
+
For each column, let d be the difference between maximum and minimum width of that column.
|
2826
|
+
Now set the column's width to the minimum width plus d times W over D.
|
2827
|
+
This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
|
2828
|
+
<xsl:when test="($table_widths/table/@width_max > $page_width and $table_widths/table/@width_min < $page_width) or ($table_widths/table/@width_min >= $page_width)">
|
2829
|
+
<!-- difference between the available space and the minimum table width -->
|
2830
|
+
<xsl:variable name="W" select="$page_width - $table_widths/table/@width_min"/>
|
2831
|
+
<W><xsl:value-of select="$W"/></W>
|
2832
|
+
<!-- difference between maximum and minimum width of the table -->
|
2833
|
+
<xsl:variable name="D" select="$table_widths/table/@width_max - $table_widths/table/@width_min"/>
|
2834
|
+
<D><xsl:value-of select="$D"/></D>
|
2835
|
+
<case3/>
|
2836
|
+
<autolayout/>
|
2837
|
+
<xsl:if test="$table_widths/table/@width_min >= $page_width">
|
2838
|
+
<split_keep-within-line>true</split_keep-within-line>
|
2839
|
+
</xsl:if>
|
2840
|
+
<xsl:for-each select="$column_widths/column">
|
2841
|
+
<!-- difference between maximum and minimum width of that column. -->
|
2842
|
+
<xsl:variable name="d" select="@width_max - @width_min"/>
|
2843
|
+
<d><xsl:value-of select="$d"/></d>
|
2844
|
+
<width_min><xsl:value-of select="@width_min"/></width_min>
|
2845
|
+
<e><xsl:value-of select="$d * $W div $D"/></e>
|
2846
|
+
<!-- set the column's width to the minimum width plus d times W over D. -->
|
2847
|
+
<column divider="100">
|
2848
|
+
<xsl:value-of select="round(@width_min + $d * $W div $D)"/> <!-- * 10 -->
|
2849
|
+
</column>
|
2850
|
+
</xsl:for-each>
|
2851
|
+
|
2852
|
+
</xsl:when>
|
2853
|
+
<xsl:otherwise><unknown_case/></xsl:otherwise>
|
2854
|
+
</xsl:choose>
|
2855
|
+
|
2856
|
+
</xsl:template><xsl:template name="get-calculated-column-widths-autolayout-algorithm">
|
2857
|
+
|
2858
|
+
<!-- if nested 'dl' or 'table' -->
|
2859
|
+
<xsl:variable name="parent_table_id" select="normalize-space(ancestor::*[local-name() = 'table' or local-name() = 'dl'][1]/@id)"/>
|
2860
|
+
<parent_table_id><xsl:value-of select="$parent_table_id"/></parent_table_id>
|
2861
|
+
|
2862
|
+
<parent_element><xsl:value-of select="local-name(..)"/></parent_element>
|
2863
|
+
|
2864
|
+
<xsl:variable name="parent_table_page-width_">
|
2865
|
+
<xsl:if test="$parent_table_id != ''">
|
2866
|
+
<!-- determine column number in the parent table -->
|
2867
|
+
<xsl:variable name="parent_table_column_number">
|
2868
|
+
<xsl:choose>
|
2869
|
+
<xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
|
2870
|
+
<xsl:otherwise> <!-- parent is table -->
|
2871
|
+
<xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
|
2872
|
+
</xsl:otherwise>
|
2873
|
+
</xsl:choose>
|
2874
|
+
</xsl:variable>
|
2875
|
+
<!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
|
2876
|
+
<xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
|
2877
|
+
</xsl:if>
|
2878
|
+
</xsl:variable>
|
2879
|
+
<xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
|
2880
|
+
|
2881
|
+
<!-- get current table id -->
|
2882
|
+
<xsl:variable name="table_id" select="@id"/>
|
2883
|
+
|
2884
|
+
<xsl:choose>
|
2885
|
+
<xsl:when test="$parent_table_id = '' or $parent_table_page-width = ''">
|
2886
|
+
<!-- find table by id in the file 'table_widths' and get all `<column>...</column> -->
|
2887
|
+
<xsl:copy-of select="$table_widths_from_if_calculated//table[@id = $table_id]/node()"/>
|
2888
|
+
</xsl:when>
|
2889
|
+
<xsl:otherwise>
|
2890
|
+
<!-- recalculate columns width based on parent table width -->
|
2891
|
+
<xsl:for-each select="$table_widths_from_if//table[@id = $table_id]">
|
2892
|
+
<xsl:call-template name="calculate-column-widths-autolayout-algorithm">
|
2893
|
+
<xsl:with-param name="parent_table_page-width" select="$parent_table_page-width"/> <!-- padding-left = 2mm = 50000-->
|
2894
|
+
</xsl:call-template>
|
2895
|
+
</xsl:for-each>
|
2896
|
+
</xsl:otherwise>
|
2897
|
+
</xsl:choose>
|
2898
|
+
|
2899
|
+
</xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths-if">
|
2900
|
+
<xsl:copy>
|
2901
|
+
<xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
|
2902
|
+
</xsl:copy>
|
2903
|
+
</xsl:template><xsl:template match="td | th" mode="determine_cell_widths-if">
|
2904
|
+
<xsl:copy>
|
2905
|
+
<xsl:copy-of select="@*"/>
|
2906
|
+
|
2907
|
+
<!-- The maximum width is given by the widest line. -->
|
2908
|
+
<xsl:attribute name="width_max">
|
2909
|
+
<xsl:for-each select="p_len">
|
2910
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
2911
|
+
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
2912
|
+
</xsl:for-each>
|
2913
|
+
</xsl:attribute>
|
2914
|
+
|
2915
|
+
<!-- The minimum width is given by the widest text element (word, image, etc.) -->
|
2916
|
+
<xsl:variable name="width_min">
|
2917
|
+
<xsl:for-each select="word_len">
|
2918
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
2919
|
+
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
2920
|
+
</xsl:for-each>
|
2921
|
+
</xsl:variable>
|
2922
|
+
<xsl:attribute name="width_min">
|
2923
|
+
<xsl:value-of select="$width_min"/>
|
2924
|
+
</xsl:attribute>
|
2925
|
+
|
2926
|
+
<xsl:if test="$width_min = 0">
|
2927
|
+
<xsl:attribute name="width_min">1</xsl:attribute>
|
2928
|
+
</xsl:if>
|
2929
|
+
|
2930
|
+
<xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
|
2931
|
+
|
2932
|
+
</xsl:copy>
|
2436
2933
|
</xsl:template><xsl:template match="*[local-name()='thead']">
|
2437
2934
|
<xsl:param name="cols-count"/>
|
2438
2935
|
<fo:table-header>
|
@@ -2446,12 +2943,18 @@
|
|
2446
2943
|
<fo:table-row>
|
2447
2944
|
<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">
|
2448
2945
|
|
2449
|
-
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
2450
|
-
<xsl:with-param name="continued">true</xsl:with-param>
|
2451
|
-
</xsl:apply-templates>
|
2452
2946
|
|
2453
2947
|
|
2454
2948
|
|
2949
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
2950
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
2951
|
+
</xsl:apply-templates>
|
2952
|
+
|
2953
|
+
|
2954
|
+
|
2955
|
+
|
2956
|
+
|
2957
|
+
|
2455
2958
|
</fo:table-cell>
|
2456
2959
|
</fo:table-row>
|
2457
2960
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -2517,6 +3020,7 @@
|
|
2517
3020
|
</xsl:for-each>
|
2518
3021
|
</xsl:when>
|
2519
3022
|
<xsl:otherwise>
|
3023
|
+
<!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2520
3024
|
<xsl:call-template name="insertTableColumnWidth">
|
2521
3025
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2522
3026
|
</xsl:call-template>
|
@@ -2551,7 +3055,10 @@
|
|
2551
3055
|
|
2552
3056
|
|
2553
3057
|
<!-- fn processing -->
|
2554
|
-
|
3058
|
+
|
3059
|
+
<xsl:call-template name="table_fn_display"/>
|
3060
|
+
|
3061
|
+
|
2555
3062
|
|
2556
3063
|
<!-- for PAS display Notes after footnotes -->
|
2557
3064
|
|
@@ -2561,6 +3068,9 @@
|
|
2561
3068
|
</fo:table-body>
|
2562
3069
|
|
2563
3070
|
</fo:table>
|
3071
|
+
|
3072
|
+
|
3073
|
+
|
2564
3074
|
</xsl:if>
|
2565
3075
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
2566
3076
|
|
@@ -2596,6 +3106,52 @@
|
|
2596
3106
|
|
2597
3107
|
</fo:table-body>
|
2598
3108
|
|
3109
|
+
</xsl:template><xsl:template match="/" mode="process_table-if">
|
3110
|
+
<xsl:param name="table_or_dl">table</xsl:param>
|
3111
|
+
<xsl:apply-templates mode="process_table-if">
|
3112
|
+
<xsl:with-param name="table_or_dl" select="$table_or_dl"/>
|
3113
|
+
</xsl:apply-templates>
|
3114
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="process_table-if">
|
3115
|
+
<xsl:param name="table_or_dl">table</xsl:param>
|
3116
|
+
|
3117
|
+
<fo:table-body>
|
3118
|
+
<xsl:for-each select="*[local-name() = 'tr']">
|
3119
|
+
<xsl:variable name="col_count" select="count(*)"/>
|
3120
|
+
|
3121
|
+
<!-- iteration for each tr/td -->
|
3122
|
+
|
3123
|
+
<xsl:choose>
|
3124
|
+
<xsl:when test="$table_or_dl = 'table'">
|
3125
|
+
<xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
|
3126
|
+
<fo:table-row number-columns-spanned="{$col_count}">
|
3127
|
+
<!-- <test_table><xsl:copy-of select="."/></test_table> -->
|
3128
|
+
<xsl:call-template name="td"/>
|
3129
|
+
</fo:table-row>
|
3130
|
+
</xsl:for-each>
|
3131
|
+
</xsl:when>
|
3132
|
+
<xsl:otherwise> <!-- $table_or_dl = 'dl' -->
|
3133
|
+
<xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']">
|
3134
|
+
<xsl:variable name="is_dt" select="position() = 1"/>
|
3135
|
+
|
3136
|
+
<xsl:for-each select="*">
|
3137
|
+
<!-- <test><xsl:copy-of select="."/></test> -->
|
3138
|
+
<fo:table-row number-columns-spanned="{$col_count}">
|
3139
|
+
<xsl:choose>
|
3140
|
+
<xsl:when test="$is_dt">
|
3141
|
+
<xsl:call-template name="insert_dt_cell"/>
|
3142
|
+
</xsl:when>
|
3143
|
+
<xsl:otherwise>
|
3144
|
+
<xsl:call-template name="insert_dd_cell"/>
|
3145
|
+
</xsl:otherwise>
|
3146
|
+
</xsl:choose>
|
3147
|
+
</fo:table-row>
|
3148
|
+
</xsl:for-each>
|
3149
|
+
</xsl:for-each>
|
3150
|
+
</xsl:otherwise>
|
3151
|
+
</xsl:choose>
|
3152
|
+
|
3153
|
+
</xsl:for-each>
|
3154
|
+
</fo:table-body>
|
2599
3155
|
</xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
2600
3156
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
2601
3157
|
|
@@ -2603,6 +3159,9 @@
|
|
2603
3159
|
|
2604
3160
|
|
2605
3161
|
|
3162
|
+
|
3163
|
+
|
3164
|
+
|
2606
3165
|
|
2607
3166
|
|
2608
3167
|
<xsl:call-template name="setTableRowAttributes"/>
|
@@ -2622,6 +3181,8 @@
|
|
2622
3181
|
|
2623
3182
|
|
2624
3183
|
|
3184
|
+
|
3185
|
+
|
2625
3186
|
<xsl:call-template name="setTableRowAttributes"/>
|
2626
3187
|
<xsl:apply-templates/>
|
2627
3188
|
</fo:table-row>
|
@@ -2682,7 +3243,7 @@
|
|
2682
3243
|
</xsl:choose>
|
2683
3244
|
</xsl:attribute>
|
2684
3245
|
</xsl:if>
|
2685
|
-
</xsl:template><xsl:template match="*[local-name()='td']">
|
3246
|
+
</xsl:template><xsl:template match="*[local-name()='td']" name="td">
|
2686
3247
|
<fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
|
2687
3248
|
<xsl:call-template name="setTextAlignment">
|
2688
3249
|
<xsl:with-param name="default">left</xsl:with-param>
|
@@ -2703,6 +3264,8 @@
|
|
2703
3264
|
|
2704
3265
|
|
2705
3266
|
|
3267
|
+
|
3268
|
+
|
2706
3269
|
|
2707
3270
|
|
2708
3271
|
|
@@ -2716,11 +3279,24 @@
|
|
2716
3279
|
|
2717
3280
|
<xsl:call-template name="setTableCellAttributes"/>
|
2718
3281
|
|
3282
|
+
<xsl:if test="$isGenerateTableIF = 'true'">
|
3283
|
+
<xsl:attribute name="border">1pt solid black</xsl:attribute> <!-- border is mandatory, to determine page width -->
|
3284
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
3285
|
+
</xsl:if>
|
3286
|
+
|
2719
3287
|
<fo:block>
|
2720
3288
|
|
3289
|
+
<xsl:if test="$isGenerateTableIF = 'true'">
|
3290
|
+
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
3291
|
+
</xsl:if>
|
3292
|
+
|
3293
|
+
|
2721
3294
|
|
2722
3295
|
|
2723
3296
|
<xsl:apply-templates/>
|
3297
|
+
|
3298
|
+
<xsl:if test="$isGenerateTableIF = 'true'"><fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
|
3299
|
+
|
2724
3300
|
</fo:block>
|
2725
3301
|
</fo:table-cell>
|
2726
3302
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
|
@@ -2761,7 +3337,11 @@
|
|
2761
3337
|
|
2762
3338
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
2763
3339
|
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
2764
|
-
<xsl:variable name="
|
3340
|
+
<xsl:variable name="reference_">
|
3341
|
+
<xsl:value-of select="@reference"/>
|
3342
|
+
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
3343
|
+
</xsl:variable>
|
3344
|
+
<xsl:variable name="reference" select="normalize-space($reference_)"/>
|
2765
3345
|
<!-- fn sequence number in document -->
|
2766
3346
|
<xsl:variable name="current_fn_number">
|
2767
3347
|
<xsl:choose>
|
@@ -2836,7 +3416,7 @@
|
|
2836
3416
|
<xsl:copy-of select="node()"/>
|
2837
3417
|
</fn>
|
2838
3418
|
</xsl:for-each>
|
2839
|
-
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
3419
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='boilerplate']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
2840
3420
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2841
3421
|
<xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
2842
3422
|
<!-- copy unique fn -->
|
@@ -2917,9 +3497,9 @@
|
|
2917
3497
|
<!-- current hierarchy is 'figure' element -->
|
2918
3498
|
<xsl:variable name="following_dl_colwidths">
|
2919
3499
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
2920
|
-
<xsl:variable name="
|
2921
|
-
<xsl:variable name="doc_ns">
|
2922
|
-
|
3500
|
+
<xsl:variable name="simple-table">
|
3501
|
+
<!-- <xsl:variable name="doc_ns">
|
3502
|
+
<xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
|
2923
3503
|
</xsl:variable>
|
2924
3504
|
<xsl:variable name="ns">
|
2925
3505
|
<xsl:choose>
|
@@ -2930,7 +3510,7 @@
|
|
2930
3510
|
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2931
3511
|
</xsl:otherwise>
|
2932
3512
|
</xsl:choose>
|
2933
|
-
</xsl:variable>
|
3513
|
+
</xsl:variable> -->
|
2934
3514
|
|
2935
3515
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2936
3516
|
<tbody>
|
@@ -2941,7 +3521,7 @@
|
|
2941
3521
|
|
2942
3522
|
<xsl:call-template name="calculate-column-widths">
|
2943
3523
|
<xsl:with-param name="cols-count" select="2"/>
|
2944
|
-
<xsl:with-param name="table" select="$
|
3524
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
2945
3525
|
</xsl:call-template>
|
2946
3526
|
|
2947
3527
|
</xsl:if>
|
@@ -3116,12 +3696,31 @@
|
|
3116
3696
|
|
3117
3697
|
|
3118
3698
|
|
3699
|
+
|
3700
|
+
<xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
|
3701
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
3702
|
+
</xsl:if>
|
3703
|
+
|
3119
3704
|
<fo:block>
|
3120
3705
|
|
3121
3706
|
|
3122
3707
|
|
3123
3708
|
|
3709
|
+
<xsl:apply-templates select="*[local-name() = 'name']">
|
3710
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
3711
|
+
</xsl:apply-templates>
|
3712
|
+
|
3713
|
+
<xsl:if test="$isGenerateTableIF = 'true'">
|
3714
|
+
<!-- to determine start of table -->
|
3715
|
+
<fo:block id="{concat('table_if_start_',@id)}" keep-with-next="always" font-size="1pt">Start table '<xsl:value-of select="@id"/>'.</fo:block>
|
3716
|
+
</xsl:if>
|
3717
|
+
|
3124
3718
|
<fo:table width="95%" table-layout="fixed">
|
3719
|
+
|
3720
|
+
<xsl:if test="$isGenerateTableIF = 'true'">
|
3721
|
+
<xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
|
3722
|
+
</xsl:if>
|
3723
|
+
|
3125
3724
|
|
3126
3725
|
<xsl:choose>
|
3127
3726
|
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
|
@@ -3130,69 +3729,173 @@
|
|
3130
3729
|
|
3131
3730
|
</xsl:when>
|
3132
3731
|
</xsl:choose>
|
3133
|
-
|
3134
|
-
|
3135
|
-
|
3732
|
+
|
3733
|
+
|
3734
|
+
|
3735
|
+
<xsl:choose>
|
3736
|
+
<xsl:when test="$isGenerateTableIF = 'true'">
|
3737
|
+
<!-- generate IF for table widths -->
|
3738
|
+
<!-- example:
|
3739
|
+
<tr>
|
3740
|
+
<td valign="top" align="left" id="tab-symdu_1_1">
|
3741
|
+
<p>Symbol</p>
|
3742
|
+
<word id="tab-symdu_1_1_word_1">Symbol</word>
|
3743
|
+
</td>
|
3744
|
+
<td valign="top" align="left" id="tab-symdu_1_2">
|
3745
|
+
<p>Description</p>
|
3746
|
+
<word id="tab-symdu_1_2_word_1">Description</word>
|
3747
|
+
</td>
|
3748
|
+
</tr>
|
3749
|
+
-->
|
3136
3750
|
|
3137
|
-
|
3138
|
-
|
3139
|
-
|
3140
|
-
<xsl:
|
3141
|
-
<
|
3142
|
-
|
3143
|
-
|
3144
|
-
|
3145
|
-
|
3146
|
-
|
3147
|
-
|
3148
|
-
|
3149
|
-
|
3150
|
-
|
3151
|
-
|
3152
|
-
|
3153
|
-
|
3154
|
-
|
3155
|
-
|
3156
|
-
|
3157
|
-
|
3158
|
-
|
3159
|
-
|
3160
|
-
|
3161
|
-
|
3162
|
-
|
3163
|
-
|
3164
|
-
|
3165
|
-
|
3166
|
-
|
3167
|
-
|
3168
|
-
|
3169
|
-
|
3170
|
-
|
3171
|
-
|
3172
|
-
|
3751
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
3752
|
+
<xsl:variable name="simple-table">
|
3753
|
+
|
3754
|
+
<xsl:variable name="dl_table">
|
3755
|
+
<tbody>
|
3756
|
+
<xsl:apply-templates mode="dl_if">
|
3757
|
+
<xsl:with-param name="id" select="@id"/>
|
3758
|
+
</xsl:apply-templates>
|
3759
|
+
</tbody>
|
3760
|
+
</xsl:variable>
|
3761
|
+
|
3762
|
+
<!-- dl_table='<xsl:copy-of select="$dl_table"/>' -->
|
3763
|
+
|
3764
|
+
<!-- Step: replace <br/> to <p>...</p> -->
|
3765
|
+
<xsl:variable name="table_without_br">
|
3766
|
+
<xsl:apply-templates select="xalan:nodeset($dl_table)" mode="table-without-br"/>
|
3767
|
+
</xsl:variable>
|
3768
|
+
|
3769
|
+
<!-- table_without_br='<xsl:copy-of select="$table_without_br"/>' -->
|
3770
|
+
|
3771
|
+
<!-- Step: add id to each cell -->
|
3772
|
+
<!-- add <word>...</word> for each word, image, math -->
|
3773
|
+
<xsl:variable name="simple-table-id">
|
3774
|
+
<xsl:apply-templates select="xalan:nodeset($table_without_br)" mode="simple-table-id">
|
3775
|
+
<xsl:with-param name="id" select="@id"/>
|
3776
|
+
</xsl:apply-templates>
|
3777
|
+
</xsl:variable>
|
3778
|
+
|
3779
|
+
<!-- simple-table-id='<xsl:copy-of select="$simple-table-id"/>' -->
|
3780
|
+
|
3781
|
+
<xsl:copy-of select="xalan:nodeset($simple-table-id)"/>
|
3782
|
+
|
3783
|
+
</xsl:variable>
|
3784
|
+
|
3785
|
+
<!-- DEBUG: simple-table<xsl:copy-of select="$simple-table"/> -->
|
3786
|
+
|
3787
|
+
<xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if">
|
3788
|
+
<xsl:with-param name="table_or_dl">dl</xsl:with-param>
|
3789
|
+
</xsl:apply-templates>
|
3790
|
+
|
3791
|
+
</xsl:when>
|
3792
|
+
<xsl:otherwise>
|
3173
3793
|
|
3174
|
-
|
3175
|
-
|
3176
|
-
|
3177
|
-
|
3178
|
-
|
3794
|
+
<xsl:variable name="simple-table">
|
3795
|
+
|
3796
|
+
<xsl:variable name="dl_table">
|
3797
|
+
<tbody>
|
3798
|
+
<xsl:apply-templates mode="dl">
|
3799
|
+
<xsl:with-param name="id" select="@id"/>
|
3800
|
+
</xsl:apply-templates>
|
3801
|
+
</tbody>
|
3802
|
+
</xsl:variable>
|
3803
|
+
|
3804
|
+
<xsl:copy-of select="$dl_table"/>
|
3805
|
+
</xsl:variable>
|
3806
|
+
|
3807
|
+
<xsl:variable name="colwidths">
|
3808
|
+
<xsl:call-template name="calculate-column-widths">
|
3809
|
+
<xsl:with-param name="cols-count" select="2"/>
|
3810
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
3811
|
+
</xsl:call-template>
|
3812
|
+
</xsl:variable>
|
3813
|
+
|
3814
|
+
<!-- <xsl:text disable-output-escaping="yes"><!- -</xsl:text>
|
3815
|
+
DEBUG
|
3816
|
+
colwidths=<xsl:copy-of select="$colwidths"/>
|
3817
|
+
<xsl:text disable-output-escaping="yes">- -></xsl:text> -->
|
3818
|
+
|
3819
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
3820
|
+
|
3821
|
+
<xsl:variable name="maxlength_dt">
|
3822
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
3823
|
+
</xsl:variable>
|
3824
|
+
|
3825
|
+
<xsl:variable name="isContainsKeepTogetherTag_">
|
3826
|
+
false
|
3827
|
+
</xsl:variable>
|
3828
|
+
<xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
|
3829
|
+
<!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
|
3830
|
+
|
3831
|
+
|
3832
|
+
<xsl:call-template name="setColumnWidth_dl">
|
3833
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
3834
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
3835
|
+
<xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
|
3836
|
+
</xsl:call-template>
|
3837
|
+
|
3838
|
+
<fo:table-body>
|
3839
|
+
|
3840
|
+
<!-- DEBUG -->
|
3841
|
+
<xsl:if test="$table_if_debug = 'true'">
|
3842
|
+
<fo:table-row>
|
3843
|
+
<fo:table-cell number-columns-spanned="2" font-size="60%">
|
3844
|
+
<xsl:apply-templates select="xalan:nodeset($colwidths)" mode="print_as_xml"/>
|
3845
|
+
</fo:table-cell>
|
3846
|
+
</fo:table-row>
|
3847
|
+
</xsl:if>
|
3848
|
+
|
3849
|
+
<xsl:apply-templates>
|
3850
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
3851
|
+
<xsl:with-param name="split_keep-within-line" select="xalan:nodeset($colwidths)/split_keep-within-line"/>
|
3852
|
+
</xsl:apply-templates>
|
3853
|
+
|
3854
|
+
</fo:table-body>
|
3855
|
+
</xsl:otherwise>
|
3856
|
+
</xsl:choose>
|
3179
3857
|
</fo:table>
|
3180
3858
|
</fo:block>
|
3181
3859
|
</fo:block>
|
3182
3860
|
</xsl:if> <!-- END: a few components -->
|
3183
3861
|
</fo:block-container>
|
3184
3862
|
</fo:block-container>
|
3863
|
+
|
3864
|
+
<xsl:if test="$isGenerateTableIF = 'true'"> <!-- process nested 'dl' -->
|
3865
|
+
<xsl:apply-templates select="*[local-name() = 'dd']/*[local-name() = 'dl']"/>
|
3866
|
+
</xsl:if>
|
3867
|
+
|
3868
|
+
</xsl:template><xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
|
3869
|
+
<xsl:param name="process">false</xsl:param>
|
3870
|
+
<xsl:if test="$process = 'true'">
|
3871
|
+
<fo:block xsl:use-attribute-sets="dl-name-style">
|
3872
|
+
<xsl:apply-templates/>
|
3873
|
+
</fo:block>
|
3874
|
+
</xsl:if>
|
3185
3875
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
3186
3876
|
<xsl:param name="colwidths"/>
|
3187
3877
|
<xsl:param name="maxlength_dt"/>
|
3188
3878
|
<xsl:param name="isContainsKeepTogetherTag"/>
|
3879
|
+
|
3880
|
+
<!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
|
3881
|
+
|
3189
3882
|
<xsl:choose>
|
3883
|
+
<xsl:when test="xalan:nodeset($colwidths)/autolayout">
|
3884
|
+
<xsl:call-template name="insertTableColumnWidth">
|
3885
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
3886
|
+
</xsl:call-template>
|
3887
|
+
</xsl:when>
|
3190
3888
|
<xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
|
3191
3889
|
<fo:table-column column-width="50%"/>
|
3192
3890
|
<fo:table-column column-width="50%"/>
|
3193
3891
|
</xsl:when>
|
3194
3892
|
<xsl:otherwise>
|
3195
3893
|
<xsl:choose>
|
3894
|
+
<xsl:when test="xalan:nodeset($colwidths)/autolayout">
|
3895
|
+
<xsl:call-template name="insertTableColumnWidth">
|
3896
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
3897
|
+
</xsl:call-template>
|
3898
|
+
</xsl:when>
|
3196
3899
|
<xsl:when test="$isContainsKeepTogetherTag">
|
3197
3900
|
<xsl:call-template name="insertTableColumnWidth">
|
3198
3901
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
@@ -3237,13 +3940,19 @@
|
|
3237
3940
|
</xsl:choose>
|
3238
3941
|
</xsl:template><xsl:template name="insertTableColumnWidth">
|
3239
3942
|
<xsl:param name="colwidths"/>
|
3943
|
+
|
3240
3944
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
3241
3945
|
<xsl:choose>
|
3242
3946
|
<xsl:when test=". = 1 or . = 0">
|
3243
3947
|
<fo:table-column column-width="proportional-column-width(2)"/>
|
3244
3948
|
</xsl:when>
|
3245
3949
|
<xsl:otherwise>
|
3246
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
3950
|
+
<!-- <fo:table-column column-width="proportional-column-width({.})"/> -->
|
3951
|
+
<xsl:variable name="divider">
|
3952
|
+
<xsl:value-of select="@divider"/>
|
3953
|
+
<xsl:if test="not(@divider)">1</xsl:if>
|
3954
|
+
</xsl:variable>
|
3955
|
+
<fo:table-column column-width="proportional-column-width({round(. div $divider)})"/>
|
3247
3956
|
</xsl:otherwise>
|
3248
3957
|
</xsl:choose>
|
3249
3958
|
</xsl:for-each>
|
@@ -3305,11 +4014,19 @@
|
|
3305
4014
|
</fo:table-cell>
|
3306
4015
|
</fo:table-row>
|
3307
4016
|
</xsl:template><xsl:template match="*[local-name()='dt']" mode="dl">
|
4017
|
+
<xsl:param name="id"/>
|
4018
|
+
<xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
|
3308
4019
|
<tr>
|
3309
4020
|
<td>
|
4021
|
+
<xsl:attribute name="id">
|
4022
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_1')"/>
|
4023
|
+
</xsl:attribute>
|
3310
4024
|
<xsl:apply-templates/>
|
3311
4025
|
</td>
|
3312
4026
|
<td>
|
4027
|
+
<xsl:attribute name="id">
|
4028
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_2')"/>
|
4029
|
+
</xsl:attribute>
|
3313
4030
|
|
3314
4031
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
|
3315
4032
|
<xsl:with-param name="process">true</xsl:with-param>
|
@@ -3320,50 +4037,134 @@
|
|
3320
4037
|
|
3321
4038
|
</xsl:template><xsl:template match="*[local-name()='dt']">
|
3322
4039
|
<xsl:param name="key_iso"/>
|
4040
|
+
<xsl:param name="split_keep-within-line"/>
|
3323
4041
|
|
3324
4042
|
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
3325
|
-
<
|
4043
|
+
<xsl:call-template name="insert_dt_cell">
|
4044
|
+
<xsl:with-param name="key_iso" select="$key_iso"/>
|
4045
|
+
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
4046
|
+
</xsl:call-template>
|
4047
|
+
<xsl:for-each select="following-sibling::*[local-name()='dd'][1]">
|
4048
|
+
<xsl:call-template name="insert_dd_cell">
|
4049
|
+
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
4050
|
+
</xsl:call-template>
|
4051
|
+
</xsl:for-each>
|
4052
|
+
</fo:table-row>
|
4053
|
+
</xsl:template><xsl:template name="insert_dt_cell">
|
4054
|
+
<xsl:param name="key_iso"/>
|
4055
|
+
<xsl:param name="split_keep-within-line"/>
|
4056
|
+
<fo:table-cell xsl:use-attribute-sets="dt-cell-style">
|
4057
|
+
|
4058
|
+
<xsl:if test="$isGenerateTableIF = 'true'">
|
4059
|
+
<!-- border is mandatory, to calculate real width -->
|
4060
|
+
<xsl:attribute name="border">0.1pt solid black</xsl:attribute>
|
4061
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
4062
|
+
</xsl:if>
|
4063
|
+
|
4064
|
+
|
4065
|
+
<fo:block xsl:use-attribute-sets="dt-block-style">
|
4066
|
+
<xsl:copy-of select="@id"/>
|
4067
|
+
|
4068
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
4069
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
4070
|
+
</xsl:if>
|
4071
|
+
|
4072
|
+
|
4073
|
+
|
4074
|
+
<xsl:apply-templates>
|
4075
|
+
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
4076
|
+
</xsl:apply-templates>
|
4077
|
+
|
4078
|
+
<xsl:if test="$isGenerateTableIF = 'true'"><fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
|
4079
|
+
|
4080
|
+
</fo:block>
|
4081
|
+
</fo:table-cell>
|
4082
|
+
</xsl:template><xsl:template name="insert_dd_cell">
|
4083
|
+
<xsl:param name="split_keep-within-line"/>
|
4084
|
+
<fo:table-cell xsl:use-attribute-sets="dd-cell-style">
|
4085
|
+
|
4086
|
+
<xsl:if test="$isGenerateTableIF = 'true'">
|
4087
|
+
<!-- border is mandatory, to calculate real width -->
|
4088
|
+
<xsl:attribute name="border">0.1pt solid black</xsl:attribute>
|
4089
|
+
</xsl:if>
|
4090
|
+
|
4091
|
+
<fo:block>
|
4092
|
+
|
4093
|
+
<xsl:if test="$isGenerateTableIF = 'true'">
|
4094
|
+
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
4095
|
+
</xsl:if>
|
4096
|
+
|
3326
4097
|
|
3327
|
-
<fo:block xsl:use-attribute-sets="dt-style">
|
3328
|
-
<xsl:copy-of select="@id"/>
|
3329
|
-
|
3330
|
-
<xsl:if test="normalize-space($key_iso) = 'true'">
|
3331
|
-
<xsl:attribute name="margin-top">0</xsl:attribute>
|
3332
|
-
</xsl:if>
|
3333
|
-
|
3334
|
-
|
3335
|
-
|
3336
|
-
<xsl:apply-templates/>
|
3337
|
-
</fo:block>
|
3338
|
-
</fo:table-cell>
|
3339
|
-
<fo:table-cell>
|
3340
|
-
<fo:block>
|
3341
|
-
|
3342
4098
|
|
3343
|
-
|
3344
|
-
|
3345
|
-
|
3346
|
-
|
3347
|
-
|
3348
|
-
|
4099
|
+
<xsl:choose>
|
4100
|
+
<xsl:when test="$isGenerateTableIF = 'true'">
|
4101
|
+
<xsl:apply-templates> <!-- following-sibling::*[local-name()='dd'][1] -->
|
4102
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
4103
|
+
</xsl:apply-templates>
|
4104
|
+
</xsl:when>
|
4105
|
+
<xsl:otherwise>
|
4106
|
+
<xsl:apply-templates select="."> <!-- following-sibling::*[local-name()='dd'][1] -->
|
4107
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
4108
|
+
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
4109
|
+
</xsl:apply-templates>
|
4110
|
+
</xsl:otherwise>
|
4111
|
+
|
4112
|
+
</xsl:choose>
|
4113
|
+
|
4114
|
+
<xsl:if test="$isGenerateTableIF = 'true'"><fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
|
4115
|
+
|
4116
|
+
</fo:block>
|
4117
|
+
</fo:table-cell>
|
3349
4118
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
3350
4119
|
<xsl:apply-templates/>
|
3351
4120
|
</xsl:template><xsl:template match="*[local-name()='dd']">
|
3352
4121
|
<xsl:param name="process">false</xsl:param>
|
4122
|
+
<xsl:param name="split_keep-within-line"/>
|
3353
4123
|
<xsl:if test="$process = 'true'">
|
3354
4124
|
<xsl:apply-templates select="@language"/>
|
3355
|
-
<xsl:apply-templates
|
4125
|
+
<xsl:apply-templates>
|
4126
|
+
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
4127
|
+
</xsl:apply-templates>
|
3356
4128
|
</xsl:if>
|
3357
4129
|
</xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
3358
4130
|
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
3359
|
-
</xsl:template><xsl:template match="*[local-name()='
|
4131
|
+
</xsl:template><xsl:template match="*[local-name()='dt']" mode="dl_if">
|
4132
|
+
<xsl:param name="id"/>
|
4133
|
+
<xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
|
4134
|
+
<tr>
|
4135
|
+
<td>
|
4136
|
+
<xsl:copy-of select="node()"/>
|
4137
|
+
</td>
|
4138
|
+
<td>
|
4139
|
+
|
4140
|
+
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
|
4141
|
+
|
4142
|
+
<!-- get paragraphs from nested 'dl' -->
|
4143
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
4144
|
+
|
4145
|
+
|
4146
|
+
</td>
|
4147
|
+
</tr>
|
4148
|
+
|
4149
|
+
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
|
4150
|
+
<xsl:for-each select="*[local-name() = 'dt']">
|
4151
|
+
<p>
|
4152
|
+
<xsl:copy-of select="node()"/>
|
4153
|
+
<xsl:text> </xsl:text>
|
4154
|
+
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'p']/node()"/>
|
4155
|
+
</p>
|
4156
|
+
</xsl:for-each>
|
4157
|
+
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if_nested"/><xsl:template match="*[local-name()='em']">
|
3360
4158
|
<fo:inline font-style="italic">
|
3361
4159
|
<xsl:apply-templates/>
|
3362
4160
|
</fo:inline>
|
3363
4161
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
4162
|
+
<xsl:param name="split_keep-within-line"/>
|
3364
4163
|
<fo:inline font-weight="bold">
|
3365
4164
|
|
3366
|
-
<xsl:apply-templates
|
4165
|
+
<xsl:apply-templates>
|
4166
|
+
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
4167
|
+
</xsl:apply-templates>
|
3367
4168
|
</fo:inline>
|
3368
4169
|
</xsl:template><xsl:template match="*[local-name()='padding']">
|
3369
4170
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
@@ -3384,7 +4185,7 @@
|
|
3384
4185
|
|
3385
4186
|
|
3386
4187
|
|
3387
|
-
|
4188
|
+
<!-- 10 -->
|
3388
4189
|
|
3389
4190
|
|
3390
4191
|
|
@@ -3564,6 +4365,10 @@
|
|
3564
4365
|
<xsl:param name="text"/>
|
3565
4366
|
<xsl:param name="separator" select="' '"/>
|
3566
4367
|
<xsl:choose>
|
4368
|
+
|
4369
|
+
<xsl:when test="$isGenerateTableIF = 'true' and not(contains($text, $separator))">
|
4370
|
+
<word><xsl:value-of select="normalize-space($text)"/></word>
|
4371
|
+
</xsl:when>
|
3567
4372
|
<xsl:when test="not(contains($text, $separator))">
|
3568
4373
|
<word>
|
3569
4374
|
<xsl:variable name="len_str_tmp" select="string-length(normalize-space($text))"/>
|
@@ -3608,13 +4413,66 @@
|
|
3608
4413
|
</xsl:when>
|
3609
4414
|
<xsl:otherwise>
|
3610
4415
|
<word>
|
3611
|
-
<xsl:
|
4416
|
+
<xsl:variable name="word" select="normalize-space(substring-before($text, $separator))"/>
|
4417
|
+
<xsl:choose>
|
4418
|
+
<xsl:when test="$isGenerateTableIF = 'true'">
|
4419
|
+
<xsl:value-of select="$word"/>
|
4420
|
+
</xsl:when>
|
4421
|
+
<xsl:otherwise>
|
4422
|
+
<xsl:value-of select="string-length($word)"/>
|
4423
|
+
</xsl:otherwise>
|
4424
|
+
</xsl:choose>
|
3612
4425
|
</word>
|
3613
4426
|
<xsl:call-template name="tokenize">
|
3614
4427
|
<xsl:with-param name="text" select="substring-after($text, $separator)"/>
|
3615
4428
|
</xsl:call-template>
|
3616
4429
|
</xsl:otherwise>
|
3617
4430
|
</xsl:choose>
|
4431
|
+
</xsl:template><xsl:template name="tokenize_with_tags">
|
4432
|
+
<xsl:param name="tags"/>
|
4433
|
+
<xsl:param name="text"/>
|
4434
|
+
<xsl:param name="separator" select="' '"/>
|
4435
|
+
<xsl:choose>
|
4436
|
+
|
4437
|
+
<xsl:when test="not(contains($text, $separator))">
|
4438
|
+
<word>
|
4439
|
+
<xsl:call-template name="enclose_text_in_tags">
|
4440
|
+
<xsl:with-param name="text" select="normalize-space($text)"/>
|
4441
|
+
<xsl:with-param name="tags" select="$tags"/>
|
4442
|
+
</xsl:call-template>
|
4443
|
+
</word>
|
4444
|
+
</xsl:when>
|
4445
|
+
<xsl:otherwise>
|
4446
|
+
<word>
|
4447
|
+
<xsl:call-template name="enclose_text_in_tags">
|
4448
|
+
<xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
|
4449
|
+
<xsl:with-param name="tags" select="$tags"/>
|
4450
|
+
</xsl:call-template>
|
4451
|
+
</word>
|
4452
|
+
<xsl:call-template name="tokenize_with_tags">
|
4453
|
+
<xsl:with-param name="text" select="substring-after($text, $separator)"/>
|
4454
|
+
</xsl:call-template>
|
4455
|
+
</xsl:otherwise>
|
4456
|
+
</xsl:choose>
|
4457
|
+
</xsl:template><xsl:template name="enclose_text_in_tags">
|
4458
|
+
<xsl:param name="text"/>
|
4459
|
+
<xsl:param name="tags"/>
|
4460
|
+
<xsl:param name="num">1</xsl:param> <!-- default (start) value -->
|
4461
|
+
|
4462
|
+
<xsl:variable name="tag_name" select="normalize-space(xalan:nodeset($tags)//tag[$num])"/>
|
4463
|
+
|
4464
|
+
<xsl:choose>
|
4465
|
+
<xsl:when test="$tag_name = ''"><xsl:value-of select="$text"/></xsl:when>
|
4466
|
+
<xsl:otherwise>
|
4467
|
+
<xsl:element name="{$tag_name}">
|
4468
|
+
<xsl:call-template name="enclose_text_in_tags">
|
4469
|
+
<xsl:with-param name="text" select="$text"/>
|
4470
|
+
<xsl:with-param name="tags" select="$tags"/>
|
4471
|
+
<xsl:with-param name="num" select="$num + 1"/>
|
4472
|
+
</xsl:call-template>
|
4473
|
+
</xsl:element>
|
4474
|
+
</xsl:otherwise>
|
4475
|
+
</xsl:choose>
|
3618
4476
|
</xsl:template><xsl:template name="max_length">
|
3619
4477
|
<xsl:param name="words"/>
|
3620
4478
|
<xsl:for-each select="$words//word">
|
@@ -3715,12 +4573,19 @@
|
|
3715
4573
|
</xsl:otherwise>
|
3716
4574
|
</xsl:choose>
|
3717
4575
|
</xsl:template><xsl:template name="getSimpleTable">
|
4576
|
+
<xsl:param name="id"/>
|
4577
|
+
|
3718
4578
|
<xsl:variable name="simple-table">
|
3719
4579
|
|
4580
|
+
<!-- Step 0. replace <br/> to <p>...</p> -->
|
4581
|
+
<xsl:variable name="table_without_br">
|
4582
|
+
<xsl:apply-templates mode="table-without-br"/>
|
4583
|
+
</xsl:variable>
|
4584
|
+
|
3720
4585
|
<!-- Step 1. colspan processing -->
|
3721
4586
|
<xsl:variable name="simple-table-colspan">
|
3722
4587
|
<tbody>
|
3723
|
-
<xsl:apply-templates mode="simple-table-colspan"/>
|
4588
|
+
<xsl:apply-templates select="xalan:nodeset($table_without_br)" mode="simple-table-colspan"/>
|
3724
4589
|
</tbody>
|
3725
4590
|
</xsl:variable>
|
3726
4591
|
|
@@ -3729,10 +4594,67 @@
|
|
3729
4594
|
<xsl:apply-templates select="xalan:nodeset($simple-table-colspan)" mode="simple-table-rowspan"/>
|
3730
4595
|
</xsl:variable>
|
3731
4596
|
|
3732
|
-
|
3733
|
-
|
4597
|
+
<!-- Step 3: add id to each cell -->
|
4598
|
+
<!-- add <word>...</word> for each word, image, math -->
|
4599
|
+
<xsl:variable name="simple-table-id">
|
4600
|
+
<xsl:apply-templates select="xalan:nodeset($simple-table-rowspan)" mode="simple-table-id">
|
4601
|
+
<xsl:with-param name="id" select="$id"/>
|
4602
|
+
</xsl:apply-templates>
|
4603
|
+
</xsl:variable>
|
4604
|
+
|
4605
|
+
<xsl:copy-of select="xalan:nodeset($simple-table-id)"/>
|
4606
|
+
|
3734
4607
|
</xsl:variable>
|
3735
4608
|
<xsl:copy-of select="$simple-table"/>
|
4609
|
+
</xsl:template><xsl:template match="@*|node()" mode="table-without-br">
|
4610
|
+
<xsl:copy>
|
4611
|
+
<xsl:apply-templates select="@*|node()" mode="table-without-br"/>
|
4612
|
+
</xsl:copy>
|
4613
|
+
</xsl:template><xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p'])]" mode="table-without-br">
|
4614
|
+
<xsl:copy>
|
4615
|
+
<xsl:copy-of select="@*"/>
|
4616
|
+
<p>
|
4617
|
+
<xsl:copy-of select="node()"/>
|
4618
|
+
</p>
|
4619
|
+
</xsl:copy>
|
4620
|
+
</xsl:template><xsl:template match="*[local-name()='th' or local-name()='td'][*[local-name()='br']]" mode="table-without-br">
|
4621
|
+
<xsl:copy>
|
4622
|
+
<xsl:copy-of select="@*"/>
|
4623
|
+
<xsl:for-each select="*[local-name()='br']">
|
4624
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
4625
|
+
<p>
|
4626
|
+
<xsl:for-each select="preceding-sibling::node()[following-sibling::*[local-name() = 'br'][1][generate-id() = $current_id]][not(local-name() = 'br')]">
|
4627
|
+
<xsl:copy-of select="."/>
|
4628
|
+
</xsl:for-each>
|
4629
|
+
</p>
|
4630
|
+
<xsl:if test="not(following-sibling::*[local-name() = 'br'])">
|
4631
|
+
<p>
|
4632
|
+
<xsl:for-each select="following-sibling::node()">
|
4633
|
+
<xsl:copy-of select="."/>
|
4634
|
+
</xsl:for-each>
|
4635
|
+
</p>
|
4636
|
+
</xsl:if>
|
4637
|
+
</xsl:for-each>
|
4638
|
+
</xsl:copy>
|
4639
|
+
</xsl:template><xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p'][*[local-name()='br']]" mode="table-without-br">
|
4640
|
+
<xsl:for-each select="*[local-name()='br']">
|
4641
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
4642
|
+
<p>
|
4643
|
+
<xsl:for-each select="preceding-sibling::node()[following-sibling::*[local-name() = 'br'][1][generate-id() = $current_id]][not(local-name() = 'br')]">
|
4644
|
+
<xsl:copy-of select="."/>
|
4645
|
+
</xsl:for-each>
|
4646
|
+
</p>
|
4647
|
+
<xsl:if test="not(following-sibling::*[local-name() = 'br'])">
|
4648
|
+
<p>
|
4649
|
+
<xsl:for-each select="following-sibling::node()">
|
4650
|
+
<xsl:copy-of select="."/>
|
4651
|
+
</xsl:for-each>
|
4652
|
+
</p>
|
4653
|
+
</xsl:if>
|
4654
|
+
</xsl:for-each>
|
4655
|
+
</xsl:template><xsl:template match="text()[not(ancestor::*[local-name() = 'sourcecode'])]" mode="table-without-br">
|
4656
|
+
<xsl:variable name="text" select="translate(.,'	 ','')"/>
|
4657
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),' {2,}',' ')"/>
|
3736
4658
|
</xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
|
3737
4659
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
3738
4660
|
</xsl:template><xsl:template match="*[local-name()='fn']" mode="simple-table-colspan"/><xsl:template match="*[local-name()='th'] | *[local-name()='td']" mode="simple-table-colspan">
|
@@ -3822,6 +4744,126 @@
|
|
3822
4744
|
<xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
|
3823
4745
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
3824
4746
|
</xsl:apply-templates>
|
4747
|
+
</xsl:template><xsl:template match="/" mode="simple-table-id">
|
4748
|
+
<xsl:param name="id"/>
|
4749
|
+
<xsl:variable name="id_prefixed" select="concat('table_if_',$id)"/> <!-- table id prefixed by 'table_if_' to simple search in IF -->
|
4750
|
+
<xsl:apply-templates select="@*|node()" mode="simple-table-id">
|
4751
|
+
<xsl:with-param name="id" select="$id_prefixed"/>
|
4752
|
+
</xsl:apply-templates>
|
4753
|
+
</xsl:template><xsl:template match="@*|node()" mode="simple-table-id">
|
4754
|
+
<xsl:param name="id"/>
|
4755
|
+
<xsl:copy>
|
4756
|
+
<xsl:apply-templates select="@*|node()" mode="simple-table-id">
|
4757
|
+
<xsl:with-param name="id" select="$id"/>
|
4758
|
+
</xsl:apply-templates>
|
4759
|
+
</xsl:copy>
|
4760
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="simple-table-id">
|
4761
|
+
<xsl:param name="id"/>
|
4762
|
+
<xsl:copy>
|
4763
|
+
<xsl:copy-of select="@*"/>
|
4764
|
+
<xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
|
4765
|
+
<xsl:apply-templates select="node()" mode="simple-table-id">
|
4766
|
+
<xsl:with-param name="id" select="$id"/>
|
4767
|
+
</xsl:apply-templates>
|
4768
|
+
</xsl:copy>
|
4769
|
+
</xsl:template><xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
|
4770
|
+
<xsl:param name="id"/>
|
4771
|
+
<xsl:copy>
|
4772
|
+
<xsl:copy-of select="@*"/>
|
4773
|
+
<xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
|
4774
|
+
<xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
|
4775
|
+
<xsl:attribute name="id">
|
4776
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
|
4777
|
+
</xsl:attribute>
|
4778
|
+
|
4779
|
+
<xsl:for-each select="*[local-name() = 'p']">
|
4780
|
+
<xsl:copy>
|
4781
|
+
<xsl:copy-of select="@*"/>
|
4782
|
+
<xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
|
4783
|
+
<xsl:attribute name="id">
|
4784
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
|
4785
|
+
</xsl:attribute>
|
4786
|
+
|
4787
|
+
<xsl:copy-of select="node()"/>
|
4788
|
+
</xsl:copy>
|
4789
|
+
</xsl:for-each>
|
4790
|
+
|
4791
|
+
|
4792
|
+
<xsl:if test="$isGenerateTableIF = 'true'"> <!-- split each paragraph to words, image, math -->
|
4793
|
+
|
4794
|
+
<xsl:variable name="td_text">
|
4795
|
+
<xsl:apply-templates select="." mode="td_text_with_formatting"/>
|
4796
|
+
</xsl:variable>
|
4797
|
+
|
4798
|
+
<!-- td_text='<xsl:copy-of select="$td_text"/>' -->
|
4799
|
+
|
4800
|
+
<xsl:variable name="words">
|
4801
|
+
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
|
4802
|
+
<word>
|
4803
|
+
<xsl:copy-of select="."/>
|
4804
|
+
</word>
|
4805
|
+
</xsl:for-each>
|
4806
|
+
|
4807
|
+
<xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
|
4808
|
+
<xsl:copy-of select="."/>
|
4809
|
+
</xsl:for-each>
|
4810
|
+
|
4811
|
+
</xsl:variable>
|
4812
|
+
|
4813
|
+
<xsl:for-each select="xalan:nodeset($words)/word">
|
4814
|
+
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
|
4815
|
+
<xsl:copy>
|
4816
|
+
<xsl:attribute name="id">
|
4817
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
|
4818
|
+
</xsl:attribute>
|
4819
|
+
<xsl:copy-of select="node()"/>
|
4820
|
+
</xsl:copy>
|
4821
|
+
</xsl:for-each>
|
4822
|
+
</xsl:if>
|
4823
|
+
</xsl:copy>
|
4824
|
+
|
4825
|
+
</xsl:template><xsl:template match="@*|node()" mode="td_text_with_formatting">
|
4826
|
+
<xsl:copy>
|
4827
|
+
<xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
|
4828
|
+
</xsl:copy>
|
4829
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/><xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
|
4830
|
+
<xsl:variable name="formatting_tags">
|
4831
|
+
<xsl:call-template name="getFormattingTags"/>
|
4832
|
+
</xsl:variable>
|
4833
|
+
<word>
|
4834
|
+
<xsl:call-template name="enclose_text_in_tags">
|
4835
|
+
<xsl:with-param name="text" select="normalize-space(.)"/>
|
4836
|
+
<xsl:with-param name="tags" select="$formatting_tags"/>
|
4837
|
+
</xsl:call-template>
|
4838
|
+
</word>
|
4839
|
+
</xsl:template><xsl:template match="*[local-name() != 'keep-together_within-line']/text()" mode="td_text_with_formatting">
|
4840
|
+
|
4841
|
+
<xsl:variable name="td_text" select="."/>
|
4842
|
+
|
4843
|
+
<xsl:variable name="string_with_added_zerospaces">
|
4844
|
+
<xsl:call-template name="add-zero-spaces-java">
|
4845
|
+
<xsl:with-param name="text" select="$td_text"/>
|
4846
|
+
</xsl:call-template>
|
4847
|
+
</xsl:variable>
|
4848
|
+
|
4849
|
+
<xsl:variable name="formatting_tags">
|
4850
|
+
<xsl:call-template name="getFormattingTags"/>
|
4851
|
+
</xsl:variable>
|
4852
|
+
|
4853
|
+
<!-- <word>text</word> -->
|
4854
|
+
<xsl:call-template name="tokenize_with_tags">
|
4855
|
+
<xsl:with-param name="tags" select="$formatting_tags"/>
|
4856
|
+
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
|
4857
|
+
</xsl:call-template>
|
4858
|
+
</xsl:template><xsl:template name="getFormattingTags">
|
4859
|
+
<tags>
|
4860
|
+
<xsl:if test="ancestor::*[local-name() = 'strong']"><tag>strong</tag></xsl:if>
|
4861
|
+
<xsl:if test="ancestor::*[local-name() = 'em']"><tag>em</tag></xsl:if>
|
4862
|
+
<xsl:if test="ancestor::*[local-name() = 'sub']"><tag>sub</tag></xsl:if>
|
4863
|
+
<xsl:if test="ancestor::*[local-name() = 'sup']"><tag>sup</tag></xsl:if>
|
4864
|
+
<xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
|
4865
|
+
<xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
|
4866
|
+
</tags>
|
3825
4867
|
</xsl:template><xsl:template name="getLang">
|
3826
4868
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3827
4869
|
<xsl:variable name="language">
|
@@ -4015,6 +5057,11 @@
|
|
4015
5057
|
</xsl:variable>
|
4016
5058
|
<fo:inline xsl:use-attribute-sets="link-style">
|
4017
5059
|
|
5060
|
+
<xsl:if test="starts-with(normalize-space(@target), 'mailto:')">
|
5061
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
5062
|
+
</xsl:if>
|
5063
|
+
|
5064
|
+
|
4018
5065
|
|
4019
5066
|
|
4020
5067
|
|
@@ -4279,7 +5326,19 @@
|
|
4279
5326
|
<xsl:value-of select="$suffix"/>
|
4280
5327
|
</xsl:if>
|
4281
5328
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
|
4282
|
-
<
|
5329
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
5330
|
+
<xsl:choose>
|
5331
|
+
<xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
|
5332
|
+
<fo:inline xsl:use-attribute-sets="termnote-p-style">
|
5333
|
+
<xsl:apply-templates/>
|
5334
|
+
</fo:inline>
|
5335
|
+
</xsl:when>
|
5336
|
+
<xsl:otherwise>
|
5337
|
+
<fo:block xsl:use-attribute-sets="termnote-p-style">
|
5338
|
+
<xsl:apply-templates/>
|
5339
|
+
</fo:block>
|
5340
|
+
</xsl:otherwise>
|
5341
|
+
</xsl:choose>
|
4283
5342
|
</xsl:template><xsl:template match="*[local-name() = 'terms']">
|
4284
5343
|
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
4285
5344
|
<fo:block id="{@id}">
|
@@ -5096,7 +6155,7 @@
|
|
5096
6155
|
</xsl:choose>
|
5097
6156
|
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'xref']" mode="contents">
|
5098
6157
|
<xsl:value-of select="."/>
|
5099
|
-
</xsl:template><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
6158
|
+
</xsl:template><xsl:template match="*[local-name() = 'review']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
5100
6159
|
<xsl:text> </xsl:text>
|
5101
6160
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
5102
6161
|
<xsl:copy>
|
@@ -5167,7 +6226,7 @@
|
|
5167
6226
|
|
5168
6227
|
|
5169
6228
|
|
5170
|
-
|
6229
|
+
<!-- 9 -->
|
5171
6230
|
|
5172
6231
|
|
5173
6232
|
|
@@ -5251,7 +6310,7 @@
|
|
5251
6310
|
<xsl:for-each select="xalan:nodeset($text_step4)/node()">
|
5252
6311
|
<xsl:choose>
|
5253
6312
|
<xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
|
5254
|
-
<xsl:call-template name="interspers">
|
6313
|
+
<xsl:call-template name="interspers-java">
|
5255
6314
|
<xsl:with-param name="str" select="."/>
|
5256
6315
|
</xsl:call-template>
|
5257
6316
|
</xsl:when>
|
@@ -5301,6 +6360,10 @@
|
|
5301
6360
|
<xsl:with-param name="char" select="$char"/>
|
5302
6361
|
</xsl:call-template>
|
5303
6362
|
</xsl:if>
|
6363
|
+
</xsl:template><xsl:template name="interspers-java">
|
6364
|
+
<xsl:param name="str"/>
|
6365
|
+
<xsl:param name="char" select="$zero_width_space"/>
|
6366
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($str),'([^ -.:=_—])',concat('$1', $char))"/> <!-- insert $char after each char excep space, - . : = _ etc. -->
|
5304
6367
|
</xsl:template><xsl:template match="*" mode="syntax_highlight">
|
5305
6368
|
<xsl:apply-templates mode="syntax_highlight"/>
|
5306
6369
|
</xsl:template><xsl:variable name="syntax_highlight_styles_">
|
@@ -5513,7 +6576,9 @@
|
|
5513
6576
|
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
5514
6577
|
</xsl:if>
|
5515
6578
|
<xsl:variable name="simple-table">
|
5516
|
-
<xsl:call-template name="getSimpleTable"
|
6579
|
+
<xsl:call-template name="getSimpleTable">
|
6580
|
+
<xsl:with-param name="id" select="@id"/>
|
6581
|
+
</xsl:call-template>
|
5517
6582
|
</xsl:variable>
|
5518
6583
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
5519
6584
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
@@ -5940,6 +7005,7 @@
|
|
5940
7005
|
|
5941
7006
|
|
5942
7007
|
|
7008
|
+
|
5943
7009
|
</xsl:variable>
|
5944
7010
|
|
5945
7011
|
<xsl:variable name="padding-right">
|
@@ -6249,6 +7315,11 @@
|
|
6249
7315
|
</xsl:otherwise>
|
6250
7316
|
</xsl:choose>
|
6251
7317
|
</xsl:template><xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
|
7318
|
+
|
7319
|
+
<xsl:apply-templates select="*[local-name() = 'name']">
|
7320
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
7321
|
+
</xsl:apply-templates>
|
7322
|
+
|
6252
7323
|
<fo:list-block xsl:use-attribute-sets="list-style">
|
6253
7324
|
|
6254
7325
|
|
@@ -6259,12 +7330,23 @@
|
|
6259
7330
|
|
6260
7331
|
|
6261
7332
|
|
7333
|
+
<xsl:if test="*[local-name() = 'name']">
|
7334
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
7335
|
+
</xsl:if>
|
7336
|
+
|
6262
7337
|
<xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
|
6263
7338
|
</fo:list-block>
|
6264
7339
|
<!-- <xsl:for-each select="./iho:note">
|
6265
7340
|
<xsl:call-template name="note"/>
|
6266
7341
|
</xsl:for-each> -->
|
6267
7342
|
<xsl:apply-templates select="./*[local-name() = 'note']"/>
|
7343
|
+
</xsl:template><xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
|
7344
|
+
<xsl:param name="process">false</xsl:param>
|
7345
|
+
<xsl:if test="$process = 'true'">
|
7346
|
+
<fo:block xsl:use-attribute-sets="list-name-style">
|
7347
|
+
<xsl:apply-templates/>
|
7348
|
+
</fo:block>
|
7349
|
+
</xsl:if>
|
6268
7350
|
</xsl:template><xsl:template match="*[local-name()='li']">
|
6269
7351
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
6270
7352
|
<xsl:copy-of select="@id"/>
|
@@ -6464,7 +7546,7 @@
|
|
6464
7546
|
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
6465
7547
|
<fo:inline id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:inline>
|
6466
7548
|
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
6467
|
-
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"> </xsl:if>
|
7549
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
6468
7550
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
6469
7551
|
<!-- <row>
|
6470
7552
|
<date>05-07-2013</date>
|
@@ -6536,108 +7618,52 @@
|
|
6536
7618
|
</xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
|
6537
7619
|
|
6538
7620
|
|
6539
|
-
|
6540
|
-
|
7621
|
+
<!-- start CSA bibitem processing -->
|
7622
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
|
7623
|
+
|
7624
|
+
<xsl:variable name="docidentifier">
|
6541
7625
|
<xsl:value-of select="csa:docidentifier[@type = 'metanorma-ordinal']"/>
|
6542
7626
|
<xsl:if test="not(csa:docidentifier[@type = 'metanorma-ordinal'])">
|
6543
|
-
<xsl:number format="[1]"/>
|
7627
|
+
<xsl:number format="[1]" count="*[local-name()='bibitem'][not(@hidden = 'true')]"/>
|
6544
7628
|
</xsl:if>
|
6545
|
-
</
|
6546
|
-
|
6547
|
-
<xsl:
|
6548
|
-
|
6549
|
-
|
6550
|
-
|
6551
|
-
<xsl:value-of select="."/>
|
6552
|
-
<xsl:if test="position() != last()">/</xsl:if>
|
6553
|
-
</xsl:for-each>
|
6554
|
-
<xsl:text>: </xsl:text>
|
6555
|
-
</xsl:when>
|
6556
|
-
<xsl:when test="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name">
|
6557
|
-
<xsl:value-of select="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name"/>
|
6558
|
-
<xsl:text>: </xsl:text>
|
6559
|
-
</xsl:when>
|
6560
|
-
</xsl:choose>
|
6561
|
-
|
6562
|
-
</xsl:if>
|
6563
|
-
|
6564
|
-
<xsl:if test="csa:docidentifier[not(@type = 'metanorma-ordinal')]">
|
6565
|
-
<xsl:choose>
|
6566
|
-
<xsl:when test="csa:docidentifier/@type = 'ISO' and csa:formattedref"/>
|
6567
|
-
<xsl:when test="csa:docidentifier/@type = 'OGC' and csa:formattedref"/>
|
6568
|
-
<xsl:otherwise><fo:inline>
|
6569
|
-
<!-- <xsl:if test="csa:docidentifier/@type = 'OGC'">OGC </xsl:if> -->
|
6570
|
-
<xsl:value-of select="csa:docidentifier[not(@type = 'metanorma-ordinal')]"/><xsl:apply-templates select="csa:note"/>, </fo:inline></xsl:otherwise>
|
6571
|
-
</xsl:choose>
|
6572
|
-
</xsl:if>
|
6573
|
-
|
6574
|
-
<xsl:choose>
|
6575
|
-
<xsl:when test="csa:title[@type = 'main' and @language = 'en']">
|
6576
|
-
<xsl:apply-templates select="csa:title[@type = 'main' and @language = 'en']"/>
|
6577
|
-
</xsl:when>
|
6578
|
-
<xsl:otherwise>
|
6579
|
-
<xsl:apply-templates select="csa:title"/>
|
6580
|
-
</xsl:otherwise>
|
6581
|
-
</xsl:choose>
|
6582
|
-
<xsl:if test="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name">
|
6583
|
-
<xsl:text>, </xsl:text>
|
6584
|
-
<xsl:for-each select="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name">
|
6585
|
-
<xsl:if test="position() != last()">and </xsl:if>
|
6586
|
-
<xsl:value-of select="."/>
|
6587
|
-
</xsl:for-each>
|
6588
|
-
|
6589
|
-
</xsl:if>
|
6590
|
-
<xsl:if test="csa:place">
|
6591
|
-
<xsl:text>, </xsl:text>
|
6592
|
-
<xsl:value-of select="csa:place"/>
|
6593
|
-
</xsl:if>
|
6594
|
-
<xsl:if test="csa:date[@type='published']/csa:on">
|
6595
|
-
<xsl:text> (</xsl:text><xsl:value-of select="csa:date[@type='published']/csa:on"/><xsl:text>).</xsl:text>
|
6596
|
-
</xsl:if>
|
7629
|
+
</xsl:variable>
|
7630
|
+
|
7631
|
+
<xsl:value-of select="$docidentifier"/>
|
7632
|
+
<xsl:apply-templates select="*[local-name() = 'note']"/>
|
7633
|
+
<xsl:text> </xsl:text>
|
7634
|
+
|
6597
7635
|
<xsl:apply-templates select="csa:formattedref"/>
|
6598
7636
|
|
6599
7637
|
</fo:block>
|
7638
|
+
<!-- END CSA bibitem processing -->
|
6600
7639
|
|
6601
7640
|
|
6602
7641
|
</xsl:template><xsl:template name="processBibitem">
|
6603
7642
|
|
6604
7643
|
|
6605
|
-
<!-- start
|
6606
|
-
<xsl:if test="
|
7644
|
+
<!-- start bibitem processing -->
|
7645
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
6607
7646
|
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
6608
7647
|
</xsl:if>
|
6609
|
-
|
6610
|
-
|
6611
|
-
|
6612
|
-
|
6613
|
-
|
6614
|
-
<xsl:
|
6615
|
-
|
6616
|
-
|
6617
|
-
|
6618
|
-
|
6619
|
-
|
6620
|
-
|
6621
|
-
|
6622
|
-
|
6623
|
-
|
6624
|
-
|
6625
|
-
|
6626
|
-
|
6627
|
-
|
6628
|
-
<fo:inline><xsl:apply-templates select="csa:title"/><xsl:text>. </xsl:text></fo:inline>
|
6629
|
-
</xsl:otherwise>
|
6630
|
-
</xsl:choose>
|
6631
|
-
<xsl:for-each select="csa:contributor[csa:role/@type='publisher']/csa:organization/csa:name">
|
6632
|
-
<xsl:apply-templates/>
|
6633
|
-
<xsl:if test="position() != last()">, </xsl:if>
|
6634
|
-
</xsl:for-each>
|
6635
|
-
<xsl:if test="csa:date[@type='published']/csa:on">
|
6636
|
-
<xsl:text>(</xsl:text><xsl:value-of select="csa:date[@type='published']/csa:on"/><xsl:text>)</xsl:text>
|
6637
|
-
</xsl:if>
|
6638
|
-
</xsl:otherwise>
|
6639
|
-
</xsl:choose>
|
6640
|
-
<!-- end CSA bibitem processing -->
|
7648
|
+
|
7649
|
+
<!-- display document identifier, not number [1] -->
|
7650
|
+
<xsl:variable name="docidentifier">
|
7651
|
+
<xsl:choose>
|
7652
|
+
<xsl:when test="*[local-name() = 'docidentifier']/@type = 'metanorma'"/>
|
7653
|
+
<xsl:otherwise><xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma-ordinal')]"/></xsl:otherwise>
|
7654
|
+
</xsl:choose>
|
7655
|
+
</xsl:variable>
|
7656
|
+
<xsl:value-of select="$docidentifier"/>
|
7657
|
+
|
7658
|
+
<xsl:apply-templates select="*[local-name() = 'note']"/>
|
7659
|
+
|
7660
|
+
<xsl:if test="normalize-space($docidentifier) != '' and *[local-name() = 'formattedref']">
|
7661
|
+
|
7662
|
+
<xsl:text> </xsl:text>
|
7663
|
+
</xsl:if>
|
7664
|
+
|
7665
|
+
<xsl:apply-templates select="*[local-name() = 'formattedref']"/>
|
7666
|
+
<!-- end bibitem processing -->
|
6641
7667
|
|
6642
7668
|
</xsl:template><xsl:template name="processBibitemDocId">
|
6643
7669
|
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
@@ -6946,12 +7972,16 @@
|
|
6946
7972
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
6947
7973
|
|
6948
7974
|
|
7975
|
+
|
7976
|
+
|
6949
7977
|
|
6950
7978
|
|
6951
7979
|
|
6952
7980
|
<fo:block-container xsl:use-attribute-sets="admonition-container-style">
|
6953
7981
|
|
6954
7982
|
|
7983
|
+
|
7984
|
+
|
6955
7985
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
6956
7986
|
<fo:block>
|
6957
7987
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -6963,25 +7993,32 @@
|
|
6963
7993
|
</fo:block-container>
|
6964
7994
|
|
6965
7995
|
</xsl:template><xsl:template name="displayAdmonitionName">
|
6966
|
-
|
7996
|
+
<xsl:param name="sep"/> <!-- Example: ' - ' -->
|
7997
|
+
<!-- <xsl:choose>
|
7998
|
+
<xsl:when test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
7999
|
+
<xsl:choose>
|
8000
|
+
<xsl:when test="@type='important'"><xsl:apply-templates select="@type"/></xsl:when>
|
8001
|
+
<xsl:otherwise>
|
8002
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
8003
|
+
</xsl:otherwise>
|
8004
|
+
</xsl:choose>
|
8005
|
+
</xsl:when>
|
8006
|
+
<xsl:otherwise>
|
6967
8007
|
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
6968
8008
|
<xsl:if test="not(*[local-name() = 'name'])">
|
6969
8009
|
<xsl:apply-templates select="@type"/>
|
6970
8010
|
</xsl:if>
|
6971
|
-
|
6972
|
-
|
6973
|
-
<xsl:
|
6974
|
-
|
6975
|
-
<xsl:variable name="admonition_type_">
|
6976
|
-
<xsl:call-template name="getLocalizedString">
|
6977
|
-
<xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
|
6978
|
-
</xsl:call-template>
|
8011
|
+
</xsl:otherwise>
|
8012
|
+
</xsl:choose> -->
|
8013
|
+
<xsl:variable name="name">
|
8014
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
6979
8015
|
</xsl:variable>
|
6980
|
-
<xsl:
|
6981
|
-
<xsl:
|
6982
|
-
|
6983
|
-
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
|
8016
|
+
<xsl:copy-of select="$name"/>
|
8017
|
+
<xsl:if test="normalize-space($name) != ''">
|
8018
|
+
<xsl:value-of select="$sep"/>
|
6984
8019
|
</xsl:if>
|
8020
|
+
</xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
|
8021
|
+
<xsl:apply-templates/>
|
6985
8022
|
</xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
|
6986
8023
|
<!-- processing for admonition/p found in the template for 'p' -->
|
6987
8024
|
<xsl:call-template name="paragraph"/>
|
@@ -7147,6 +8184,8 @@
|
|
7147
8184
|
</xsl:when>
|
7148
8185
|
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
|
7149
8186
|
</xsl:choose>
|
8187
|
+
</xsl:template><xsl:template match="*[local-name() = 'lang_none']">
|
8188
|
+
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
7150
8189
|
</xsl:template><xsl:template name="printEdition">
|
7151
8190
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
7152
8191
|
<xsl:text> </xsl:text>
|
@@ -7253,6 +8292,27 @@
|
|
7253
8292
|
</xsl:when>
|
7254
8293
|
<xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
|
7255
8294
|
</xsl:choose>
|
8295
|
+
</xsl:template><xsl:template name="getMonthLocalizedByNum">
|
8296
|
+
<xsl:param name="num"/>
|
8297
|
+
<xsl:variable name="monthStr">
|
8298
|
+
<xsl:choose>
|
8299
|
+
<xsl:when test="$num = '01'">january</xsl:when>
|
8300
|
+
<xsl:when test="$num = '02'">february</xsl:when>
|
8301
|
+
<xsl:when test="$num = '03'">march</xsl:when>
|
8302
|
+
<xsl:when test="$num = '04'">april</xsl:when>
|
8303
|
+
<xsl:when test="$num = '05'">may</xsl:when>
|
8304
|
+
<xsl:when test="$num = '06'">june</xsl:when>
|
8305
|
+
<xsl:when test="$num = '07'">july</xsl:when>
|
8306
|
+
<xsl:when test="$num = '08'">august</xsl:when>
|
8307
|
+
<xsl:when test="$num = '09'">september</xsl:when>
|
8308
|
+
<xsl:when test="$num = '10'">october</xsl:when>
|
8309
|
+
<xsl:when test="$num = '11'">november</xsl:when>
|
8310
|
+
<xsl:when test="$num = '12'">december</xsl:when>
|
8311
|
+
</xsl:choose>
|
8312
|
+
</xsl:variable>
|
8313
|
+
<xsl:call-template name="getLocalizedString">
|
8314
|
+
<xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param>
|
8315
|
+
</xsl:call-template>
|
7256
8316
|
</xsl:template><xsl:template name="insertKeywords">
|
7257
8317
|
<xsl:param name="sorting" select="'true'"/>
|
7258
8318
|
<xsl:param name="charAtEnd" select="'.'"/>
|
@@ -7450,6 +8510,7 @@
|
|
7450
8510
|
|
7451
8511
|
|
7452
8512
|
|
8513
|
+
|
7453
8514
|
<xsl:value-of select="document('')//*/namespace::csa"/>
|
7454
8515
|
|
7455
8516
|
|
@@ -7859,4 +8920,40 @@
|
|
7859
8920
|
<xsl:value-of select="$value"/>
|
7860
8921
|
</xsl:otherwise>
|
7861
8922
|
</xsl:choose>
|
8923
|
+
</xsl:template><xsl:template match="*" mode="print_as_xml">
|
8924
|
+
<xsl:param name="level">0</xsl:param>
|
8925
|
+
|
8926
|
+
<fo:block margin-left="{2*$level}mm">
|
8927
|
+
<xsl:text>
|
8928
|
+
<</xsl:text>
|
8929
|
+
<xsl:value-of select="local-name()"/>
|
8930
|
+
<xsl:for-each select="@*">
|
8931
|
+
<xsl:text> </xsl:text>
|
8932
|
+
<xsl:value-of select="local-name()"/>
|
8933
|
+
<xsl:text>="</xsl:text>
|
8934
|
+
<xsl:value-of select="."/>
|
8935
|
+
<xsl:text>"</xsl:text>
|
8936
|
+
</xsl:for-each>
|
8937
|
+
<xsl:text>></xsl:text>
|
8938
|
+
|
8939
|
+
<xsl:if test="not(*)">
|
8940
|
+
<fo:inline font-weight="bold"><xsl:value-of select="."/></fo:inline>
|
8941
|
+
<xsl:text></</xsl:text>
|
8942
|
+
<xsl:value-of select="local-name()"/>
|
8943
|
+
<xsl:text>></xsl:text>
|
8944
|
+
</xsl:if>
|
8945
|
+
</fo:block>
|
8946
|
+
|
8947
|
+
<xsl:if test="*">
|
8948
|
+
<fo:block>
|
8949
|
+
<xsl:apply-templates mode="print_as_xml">
|
8950
|
+
<xsl:with-param name="level" select="$level + 1"/>
|
8951
|
+
</xsl:apply-templates>
|
8952
|
+
</fo:block>
|
8953
|
+
<fo:block margin-left="{2*$level}mm">
|
8954
|
+
<xsl:text></</xsl:text>
|
8955
|
+
<xsl:value-of select="local-name()"/>
|
8956
|
+
<xsl:text>></xsl:text>
|
8957
|
+
</fo:block>
|
8958
|
+
</xsl:if>
|
7862
8959
|
</xsl:template></xsl:stylesheet>
|