metanorma-cc 2.1.1 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/cc/cc.standard.xsl +530 -249
- data/lib/isodoc/cc/html/cc.css +18 -11
- data/lib/isodoc/cc/html/cc.scss +16 -8
- data/lib/isodoc/cc/html/htmlstyle.css +6 -0
- data/lib/isodoc/cc/html/htmlstyle.scss +1 -0
- data/lib/isodoc/cc/presentation_xml_convert.rb +4 -5
- data/lib/metanorma/cc/biblio.rng +134 -39
- data/lib/metanorma/cc/isodoc.rng +32 -0
- data/lib/metanorma/cc/version.rb +1 -1
- metadata +3 -5
- data/docs/navigation.adoc +0 -8
- data/docs/quickstart.adoc +0 -368
@@ -569,14 +569,41 @@
|
|
569
569
|
</xsl:template>
|
570
570
|
|
571
571
|
|
572
|
-
<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:
|
572
|
+
<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_">
|
573
|
+
<xsl:for-each select="$table_widths_from_if//table">
|
574
|
+
<xsl:copy>
|
575
|
+
<xsl:copy-of select="@*"/>
|
576
|
+
<xsl:call-template name="calculate-column-widths-autolayout-algorithm"/>
|
577
|
+
</xsl:copy>
|
578
|
+
</xsl:for-each>
|
579
|
+
</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_">
|
573
580
|
false
|
574
581
|
</xsl:variable><xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/><xsl:variable name="lang">
|
575
582
|
<xsl:call-template name="getLang"/>
|
576
|
-
</xsl:variable><xsl:variable name="
|
577
|
-
|
583
|
+
</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_">
|
584
|
+
<xsl:choose>
|
585
|
+
<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
|
586
|
+
<xsl:when test="$papersize = 'a4'">210</xsl:when>
|
587
|
+
</xsl:choose>
|
588
|
+
</xsl:variable><xsl:variable name="papersize_width" select="normalize-space($papersize_width_)"/><xsl:variable name="papersize_height_">
|
589
|
+
<xsl:choose>
|
590
|
+
<xsl:when test="$papersize = 'letter'">279.4</xsl:when>
|
591
|
+
<xsl:when test="$papersize = 'a4'">297</xsl:when>
|
592
|
+
</xsl:choose>
|
593
|
+
</xsl:variable><xsl:variable name="papersize_height" select="normalize-space($papersize_height_)"/><xsl:variable name="pageWidth_">
|
594
|
+
<xsl:choose>
|
595
|
+
<xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
|
596
|
+
<xsl:otherwise>
|
597
|
+
210
|
598
|
+
</xsl:otherwise>
|
599
|
+
</xsl:choose>
|
578
600
|
</xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
|
579
|
-
|
601
|
+
<xsl:choose>
|
602
|
+
<xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
|
603
|
+
<xsl:otherwise>
|
604
|
+
297
|
605
|
+
</xsl:otherwise>
|
606
|
+
</xsl:choose>
|
580
607
|
</xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="marginLeftRight1_">
|
581
608
|
19
|
582
609
|
</xsl:variable><xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/><xsl:variable name="marginLeftRight2_">
|
@@ -690,12 +717,13 @@
|
|
690
717
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
691
718
|
</xsl:otherwise>
|
692
719
|
</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">
|
720
|
+
</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
721
|
|
695
722
|
|
696
723
|
|
697
724
|
|
698
|
-
<xsl:attribute name="font-family">Source Sans Pro, STIX Two Math,
|
725
|
+
<xsl:attribute name="font-family">Source Sans Pro, STIX Two Math, <xsl:value-of select="$font_noto_sans"/></xsl:attribute>
|
726
|
+
<xsl:attribute name="font-family-generic">Sans</xsl:attribute>
|
699
727
|
<xsl:attribute name="font-size">10.5pt</xsl:attribute>
|
700
728
|
|
701
729
|
|
@@ -710,6 +738,7 @@
|
|
710
738
|
|
711
739
|
|
712
740
|
|
741
|
+
|
713
742
|
</xsl:attribute-set><xsl:template name="insertRootStyle">
|
714
743
|
<xsl:param name="root-style"/>
|
715
744
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
@@ -721,17 +750,60 @@
|
|
721
750
|
</xsl:variable>
|
722
751
|
<xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
|
723
752
|
|
753
|
+
<xsl:variable name="font_family_generic" select="$root-style_/root-style/@font-family-generic"/>
|
754
|
+
|
724
755
|
<xsl:for-each select="$root-style_/root-style/@*">
|
756
|
+
|
725
757
|
<xsl:choose>
|
726
|
-
<xsl:when test="local-name() = 'font-family'
|
758
|
+
<xsl:when test="local-name() = 'font-family-generic'"><!-- skip, it's using for determine 'sans' or 'serif' --></xsl:when>
|
759
|
+
<xsl:when test="local-name() = 'font-family'">
|
760
|
+
|
761
|
+
<xsl:variable name="font_regional_prefix">
|
762
|
+
<xsl:choose>
|
763
|
+
<xsl:when test="$font_family_generic = 'Sans'">Noto Sans</xsl:when>
|
764
|
+
<xsl:otherwise>Noto Serif</xsl:otherwise>
|
765
|
+
</xsl:choose>
|
766
|
+
</xsl:variable>
|
767
|
+
|
727
768
|
<xsl:attribute name="{local-name()}">
|
728
|
-
|
769
|
+
|
770
|
+
<xsl:variable name="font_extended">
|
771
|
+
<xsl:choose>
|
772
|
+
<xsl:when test="$lang = 'zh'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
|
773
|
+
<xsl:when test="$lang = 'hk'"><xsl:value-of select="$font_regional_prefix"/> HK</xsl:when>
|
774
|
+
<xsl:when test="$lang = 'jp'"><xsl:value-of select="$font_regional_prefix"/> JP</xsl:when>
|
775
|
+
<xsl:when test="$lang = 'kr'"><xsl:value-of select="$font_regional_prefix"/> KR</xsl:when>
|
776
|
+
<xsl:when test="$lang = 'sc'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
|
777
|
+
<xsl:when test="$lang = 'tc'"><xsl:value-of select="$font_regional_prefix"/> TC</xsl:when>
|
778
|
+
</xsl:choose>
|
779
|
+
</xsl:variable>
|
780
|
+
<xsl:if test="normalize-space($font_extended) != ''">
|
781
|
+
<xsl:value-of select="$font_regional_prefix"/><xsl:text>, </xsl:text>
|
782
|
+
<xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
|
783
|
+
</xsl:if>
|
784
|
+
|
785
|
+
<xsl:value-of select="."/>
|
786
|
+
|
787
|
+
<xsl:if test="$additional_fonts != ''">
|
788
|
+
<xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
|
789
|
+
</xsl:if>
|
729
790
|
</xsl:attribute>
|
730
791
|
</xsl:when>
|
731
792
|
<xsl:otherwise>
|
732
793
|
<xsl:copy-of select="."/>
|
733
794
|
</xsl:otherwise>
|
734
795
|
</xsl:choose>
|
796
|
+
|
797
|
+
<!-- <xsl:choose>
|
798
|
+
<xsl:when test="local-name() = 'font-family'">
|
799
|
+
<xsl:attribute name="{local-name()}">
|
800
|
+
<xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
|
801
|
+
</xsl:attribute>
|
802
|
+
</xsl:when>
|
803
|
+
<xsl:otherwise>
|
804
|
+
<xsl:copy-of select="."/>
|
805
|
+
</xsl:otherwise>
|
806
|
+
</xsl:choose> -->
|
735
807
|
</xsl:for-each>
|
736
808
|
</xsl:template><xsl:attribute-set name="copyright-statement-style">
|
737
809
|
|
@@ -798,7 +870,7 @@
|
|
798
870
|
|
799
871
|
|
800
872
|
|
801
|
-
<xsl:attribute name="font-family">Source Code Pro
|
873
|
+
<xsl:attribute name="font-family">Source Code Pro, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
802
874
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
803
875
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
804
876
|
|
@@ -809,6 +881,7 @@
|
|
809
881
|
|
810
882
|
|
811
883
|
|
884
|
+
|
812
885
|
|
813
886
|
|
814
887
|
|
@@ -823,7 +896,10 @@
|
|
823
896
|
|
824
897
|
</xsl:attribute-set><xsl:attribute-set name="requirement-style">
|
825
898
|
|
899
|
+
|
826
900
|
</xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
|
901
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
902
|
+
|
827
903
|
|
828
904
|
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
829
905
|
|
@@ -852,6 +928,7 @@
|
|
852
928
|
|
853
929
|
|
854
930
|
|
931
|
+
|
855
932
|
|
856
933
|
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
857
934
|
|
@@ -869,6 +946,7 @@
|
|
869
946
|
|
870
947
|
|
871
948
|
|
949
|
+
|
872
950
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
873
951
|
|
874
952
|
|
@@ -894,6 +972,7 @@
|
|
894
972
|
|
895
973
|
|
896
974
|
|
975
|
+
|
897
976
|
|
898
977
|
|
899
978
|
|
@@ -924,10 +1003,12 @@
|
|
924
1003
|
|
925
1004
|
|
926
1005
|
|
1006
|
+
|
927
1007
|
|
928
1008
|
|
929
1009
|
</xsl:attribute-set><xsl:variable name="table-border_">
|
930
1010
|
|
1011
|
+
|
931
1012
|
</xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
|
932
1013
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
933
1014
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -951,6 +1032,7 @@
|
|
951
1032
|
|
952
1033
|
|
953
1034
|
|
1035
|
+
|
954
1036
|
|
955
1037
|
|
956
1038
|
|
@@ -979,6 +1061,7 @@
|
|
979
1061
|
|
980
1062
|
|
981
1063
|
|
1064
|
+
|
982
1065
|
|
983
1066
|
|
984
1067
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
@@ -991,6 +1074,7 @@
|
|
991
1074
|
|
992
1075
|
|
993
1076
|
|
1077
|
+
|
994
1078
|
|
995
1079
|
|
996
1080
|
|
@@ -1061,6 +1145,7 @@
|
|
1061
1145
|
|
1062
1146
|
|
1063
1147
|
|
1148
|
+
|
1064
1149
|
</xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
|
1065
1150
|
<xsl:attribute name="border">solid black 1pt</xsl:attribute>
|
1066
1151
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
@@ -1073,7 +1158,7 @@
|
|
1073
1158
|
|
1074
1159
|
|
1075
1160
|
|
1076
|
-
|
1161
|
+
|
1077
1162
|
|
1078
1163
|
|
1079
1164
|
|
@@ -1088,6 +1173,7 @@
|
|
1088
1173
|
|
1089
1174
|
|
1090
1175
|
|
1176
|
+
|
1091
1177
|
</xsl:attribute-set><xsl:attribute-set name="table-fn-style">
|
1092
1178
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1093
1179
|
|
@@ -1096,6 +1182,8 @@
|
|
1096
1182
|
|
1097
1183
|
|
1098
1184
|
|
1185
|
+
|
1186
|
+
|
1099
1187
|
</xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
|
1100
1188
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
1101
1189
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
@@ -1113,6 +1201,7 @@
|
|
1113
1201
|
|
1114
1202
|
|
1115
1203
|
|
1204
|
+
|
1116
1205
|
</xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
|
1117
1206
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1118
1207
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
@@ -1147,6 +1236,27 @@
|
|
1147
1236
|
|
1148
1237
|
|
1149
1238
|
|
1239
|
+
|
1240
|
+
</xsl:attribute-set><xsl:attribute-set name="dl-name-style">
|
1241
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1242
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1243
|
+
|
1244
|
+
|
1245
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1246
|
+
|
1247
|
+
|
1248
|
+
|
1249
|
+
|
1250
|
+
|
1251
|
+
|
1252
|
+
|
1253
|
+
|
1254
|
+
|
1255
|
+
|
1256
|
+
|
1257
|
+
|
1258
|
+
|
1259
|
+
|
1150
1260
|
</xsl:attribute-set><xsl:attribute-set name="dd-cell-style">
|
1151
1261
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
1152
1262
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
@@ -1191,6 +1301,7 @@
|
|
1191
1301
|
|
1192
1302
|
|
1193
1303
|
|
1304
|
+
|
1194
1305
|
|
1195
1306
|
|
1196
1307
|
|
@@ -1230,7 +1341,8 @@
|
|
1230
1341
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1231
1342
|
|
1232
1343
|
|
1233
|
-
|
1344
|
+
|
1345
|
+
|
1234
1346
|
|
1235
1347
|
|
1236
1348
|
|
@@ -1246,6 +1358,7 @@
|
|
1246
1358
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1247
1359
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1248
1360
|
|
1361
|
+
|
1249
1362
|
|
1250
1363
|
|
1251
1364
|
|
@@ -1256,6 +1369,8 @@
|
|
1256
1369
|
|
1257
1370
|
|
1258
1371
|
|
1372
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-p-style">
|
1373
|
+
|
1259
1374
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1260
1375
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
1261
1376
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
@@ -1301,6 +1416,7 @@
|
|
1301
1416
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1302
1417
|
|
1303
1418
|
|
1419
|
+
|
1304
1420
|
|
1305
1421
|
|
1306
1422
|
|
@@ -1350,6 +1466,7 @@
|
|
1350
1466
|
|
1351
1467
|
|
1352
1468
|
|
1469
|
+
|
1353
1470
|
</xsl:attribute-set><xsl:attribute-set name="formula-stem-number-style">
|
1354
1471
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
1355
1472
|
|
@@ -1368,19 +1485,19 @@
|
|
1368
1485
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
1369
1486
|
|
1370
1487
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1488
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
1489
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
1490
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
1371
1491
|
|
1372
1492
|
|
1373
|
-
<xsl:attribute name="width">100%</xsl:attribute>
|
1374
1493
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
1375
|
-
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
1376
1494
|
|
1377
1495
|
|
1378
1496
|
|
1379
|
-
|
1380
|
-
|
1497
|
+
|
1381
1498
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1382
1499
|
|
1383
|
-
<xsl:attribute name="font-family">Source Code Pro
|
1500
|
+
<xsl:attribute name="font-family">Source Code Pro, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
1384
1501
|
|
1385
1502
|
|
1386
1503
|
|
@@ -1465,6 +1582,25 @@
|
|
1465
1582
|
|
1466
1583
|
|
1467
1584
|
|
1585
|
+
|
1586
|
+
</xsl:attribute-set><xsl:attribute-set name="list-name-style">
|
1587
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1588
|
+
|
1589
|
+
|
1590
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1591
|
+
|
1592
|
+
|
1593
|
+
|
1594
|
+
|
1595
|
+
|
1596
|
+
|
1597
|
+
|
1598
|
+
|
1599
|
+
|
1600
|
+
|
1601
|
+
|
1602
|
+
|
1603
|
+
|
1468
1604
|
</xsl:attribute-set><xsl:attribute-set name="list-item-style">
|
1469
1605
|
|
1470
1606
|
|
@@ -1512,6 +1648,7 @@
|
|
1512
1648
|
|
1513
1649
|
|
1514
1650
|
|
1651
|
+
|
1515
1652
|
</xsl:attribute-set><xsl:attribute-set name="fn-body-style">
|
1516
1653
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1517
1654
|
<xsl:attribute name="font-style">normal</xsl:attribute>
|
@@ -1538,6 +1675,7 @@
|
|
1538
1675
|
|
1539
1676
|
|
1540
1677
|
|
1678
|
+
|
1541
1679
|
</xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
|
1542
1680
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
1543
1681
|
|
@@ -1560,6 +1698,7 @@
|
|
1560
1698
|
|
1561
1699
|
|
1562
1700
|
|
1701
|
+
|
1563
1702
|
</xsl:attribute-set><xsl:attribute-set name="admonition-style">
|
1564
1703
|
|
1565
1704
|
|
@@ -1578,7 +1717,11 @@
|
|
1578
1717
|
|
1579
1718
|
|
1580
1719
|
|
1720
|
+
|
1581
1721
|
</xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
|
1722
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1723
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1724
|
+
|
1582
1725
|
|
1583
1726
|
|
1584
1727
|
|
@@ -1616,6 +1759,7 @@
|
|
1616
1759
|
|
1617
1760
|
|
1618
1761
|
|
1762
|
+
|
1619
1763
|
</xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
|
1620
1764
|
|
1621
1765
|
|
@@ -1646,6 +1790,10 @@
|
|
1646
1790
|
|
1647
1791
|
|
1648
1792
|
|
1793
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
1794
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1795
|
+
<xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
|
1796
|
+
</xsl:if> -->
|
1649
1797
|
|
1650
1798
|
|
1651
1799
|
|
@@ -1674,6 +1822,7 @@
|
|
1674
1822
|
|
1675
1823
|
|
1676
1824
|
|
1825
|
+
|
1677
1826
|
</xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
|
1678
1827
|
|
1679
1828
|
|
@@ -1702,6 +1851,7 @@
|
|
1702
1851
|
|
1703
1852
|
|
1704
1853
|
|
1854
|
+
|
1705
1855
|
</xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
|
1706
1856
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
1707
1857
|
|
@@ -1723,6 +1873,7 @@
|
|
1723
1873
|
|
1724
1874
|
|
1725
1875
|
|
1876
|
+
|
1726
1877
|
</xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
|
1727
1878
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1728
1879
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -1738,6 +1889,7 @@
|
|
1738
1889
|
|
1739
1890
|
|
1740
1891
|
|
1892
|
+
|
1741
1893
|
</xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
|
1742
1894
|
|
1743
1895
|
|
@@ -1849,13 +2001,13 @@
|
|
1849
2001
|
|
1850
2002
|
</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">
|
1851
2003
|
<xsl:variable name="nodes_preface_">
|
1852
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2004
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
1853
2005
|
<node id="{@id}"/>
|
1854
2006
|
</xsl:for-each>
|
1855
2007
|
</xsl:variable>
|
1856
2008
|
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
1857
2009
|
|
1858
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2010
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
1859
2011
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1860
2012
|
|
1861
2013
|
<!-- process Section's title -->
|
@@ -1921,7 +2073,7 @@
|
|
1921
2073
|
</xsl:for-each>
|
1922
2074
|
</figures>
|
1923
2075
|
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1924
|
-
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2076
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
|
1925
2077
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1926
2078
|
<xsl:apply-templates select="."/>
|
1927
2079
|
</xsl:for-each>
|
@@ -2169,6 +2321,8 @@
|
|
2169
2321
|
|
2170
2322
|
|
2171
2323
|
|
2324
|
+
|
2325
|
+
|
2172
2326
|
|
2173
2327
|
|
2174
2328
|
|
@@ -2208,6 +2362,8 @@
|
|
2208
2362
|
|
2209
2363
|
|
2210
2364
|
|
2365
|
+
|
2366
|
+
|
2211
2367
|
</xsl:element>
|
2212
2368
|
</xsl:variable>
|
2213
2369
|
|
@@ -2353,23 +2509,29 @@
|
|
2353
2509
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
2354
2510
|
<xsl:param name="continued"/>
|
2355
2511
|
<xsl:if test="normalize-space() != ''">
|
2356
|
-
|
2357
|
-
|
2358
|
-
|
2359
|
-
|
2360
|
-
|
2512
|
+
|
2513
|
+
|
2361
2514
|
|
2362
|
-
|
2363
|
-
|
2515
|
+
<fo:block xsl:use-attribute-sets="table-name-style">
|
2516
|
+
|
2364
2517
|
|
2365
|
-
|
2366
|
-
|
2367
|
-
|
2368
|
-
|
2369
|
-
|
2370
|
-
|
2518
|
+
|
2519
|
+
|
2520
|
+
|
2521
|
+
<xsl:choose>
|
2522
|
+
<xsl:when test="$continued = 'true'">
|
2523
|
+
|
2524
|
+
</xsl:when>
|
2525
|
+
<xsl:otherwise>
|
2526
|
+
<xsl:apply-templates/>
|
2527
|
+
</xsl:otherwise>
|
2528
|
+
</xsl:choose>
|
2529
|
+
|
2530
|
+
|
2531
|
+
</fo:block>
|
2532
|
+
|
2371
2533
|
|
2372
|
-
|
2534
|
+
|
2373
2535
|
</xsl:if>
|
2374
2536
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
2375
2537
|
<xsl:param name="table-row"/>
|
@@ -2532,8 +2694,9 @@
|
|
2532
2694
|
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
2533
2695
|
</xsl:if>
|
2534
2696
|
</xsl:template><xsl:template name="calculate-column-widths-autolayout-algorithm">
|
2535
|
-
<xsl:param name="
|
2536
|
-
|
2697
|
+
<xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
|
2698
|
+
|
2699
|
+
<!-- via intermediate format -->
|
2537
2700
|
|
2538
2701
|
<!-- The algorithm uses two passes through the table data and scales linearly with the size of the table -->
|
2539
2702
|
|
@@ -2544,9 +2707,8 @@
|
|
2544
2707
|
<!-- get current table id -->
|
2545
2708
|
<xsl:variable name="table_id" select="@id"/>
|
2546
2709
|
<!-- find table by id in the file 'table_widths' -->
|
2547
|
-
|
2548
|
-
<xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/>
|
2549
|
-
|
2710
|
+
<!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
|
2711
|
+
<xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
|
2550
2712
|
|
2551
2713
|
<!-- table='<xsl:copy-of select="$table"/>' -->
|
2552
2714
|
<!-- table_id='<xsl:value-of select="$table_id"/>\ -->
|
@@ -2554,24 +2716,13 @@
|
|
2554
2716
|
<!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
|
2555
2717
|
|
2556
2718
|
<xsl:variable name="table_with_cell_widths_">
|
2557
|
-
<xsl:
|
2558
|
-
<xsl:when test="$if = 'true' and normalize-space($table-if) != ''"> <!-- if we read column's width from IF and there is table in IF -->
|
2559
|
-
|
2560
|
-
<!-- Example: <column>10</column>
|
2561
|
-
<column>11</column>
|
2562
|
-
-->
|
2563
|
-
<xsl:apply-templates select="$table-if" mode="determine_cell_widths-if"/>
|
2564
|
-
</xsl:when>
|
2565
|
-
<xsl:otherwise>
|
2566
|
-
<xsl:apply-templates select="xalan:nodeset($table)" mode="determine_cell_widths"/>
|
2567
|
-
</xsl:otherwise>
|
2568
|
-
</xsl:choose>
|
2719
|
+
<xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
|
2569
2720
|
</xsl:variable>
|
2570
2721
|
<xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
|
2571
2722
|
|
2572
|
-
<xsl:if test="$table_if_debug = 'true'">
|
2723
|
+
<!-- <xsl:if test="$table_if_debug = 'true'">
|
2573
2724
|
<xsl:copy-of select="$table_with_cell_widths"/>
|
2574
|
-
</xsl:if>
|
2725
|
+
</xsl:if> -->
|
2575
2726
|
|
2576
2727
|
|
2577
2728
|
<!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
|
@@ -2617,8 +2768,12 @@
|
|
2617
2768
|
|
2618
2769
|
<xsl:variable name="page_width">
|
2619
2770
|
<xsl:choose>
|
2620
|
-
<xsl:when test="$
|
2621
|
-
|
2771
|
+
<xsl:when test="$parent_table_page-width != ''">
|
2772
|
+
<xsl:value-of select="$parent_table_page-width"/>
|
2773
|
+
</xsl:when>
|
2774
|
+
<xsl:otherwise>
|
2775
|
+
<xsl:value-of select="@page-width"/>
|
2776
|
+
</xsl:otherwise>
|
2622
2777
|
</xsl:choose>
|
2623
2778
|
</xsl:variable>
|
2624
2779
|
|
@@ -2626,9 +2781,6 @@
|
|
2626
2781
|
<table_width>
|
2627
2782
|
<xsl:copy-of select="$table_widths"/>
|
2628
2783
|
</table_width>
|
2629
|
-
<!-- <debug>$table_widths/@width_min=<xsl:value-of select="$table_widths/table/@width_min"/></debug>
|
2630
|
-
<debug>$table_widths/@width_max=<xsl:value-of select="$table_widths/table/@width_max"/></debug>
|
2631
|
-
-->
|
2632
2784
|
<debug>$page_width=<xsl:value-of select="$page_width"/></debug>
|
2633
2785
|
</xsl:if>
|
2634
2786
|
|
@@ -2639,11 +2791,11 @@
|
|
2639
2791
|
<xsl:when test="$table_widths/table/@width_min >= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
|
2640
2792
|
<!-- call old algorithm -->
|
2641
2793
|
<case1/>
|
2642
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
|
2794
|
+
<!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
|
2643
2795
|
<xsl:call-template name="calculate-column-widths-proportional">
|
2644
2796
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2645
2797
|
<xsl:with-param name="table" select="$table"/>
|
2646
|
-
</xsl:call-template>
|
2798
|
+
</xsl:call-template> -->
|
2647
2799
|
</xsl:when>
|
2648
2800
|
<!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
|
2649
2801
|
<xsl:when test="$table_widths/table/@width_max <= $page_width">
|
@@ -2687,95 +2839,49 @@
|
|
2687
2839
|
<xsl:otherwise><unknown_case/></xsl:otherwise>
|
2688
2840
|
</xsl:choose>
|
2689
2841
|
|
2842
|
+
</xsl:template><xsl:template name="get-calculated-column-widths-autolayout-algorithm">
|
2690
2843
|
|
2691
|
-
|
2692
|
-
<xsl:
|
2693
|
-
|
2694
|
-
</xsl:copy>
|
2695
|
-
</xsl:template><xsl:template match="td | th" mode="determine_cell_widths">
|
2696
|
-
<xsl:copy>
|
2697
|
-
<xsl:copy-of select="@*"/>
|
2844
|
+
<!-- if nested 'dl' or 'table' -->
|
2845
|
+
<xsl:variable name="parent_table_id" select="normalize-space(ancestor::*[local-name() = 'table' or local-name() = 'dl'][1]/@id)"/>
|
2846
|
+
<parent_table_id><xsl:value-of select="$parent_table_id"/></parent_table_id>
|
2698
2847
|
|
2699
|
-
|
2700
|
-
<xsl:variable name="widths_max">
|
2701
|
-
<xsl:for-each select=".//*[local-name() = 'p']">
|
2702
|
-
<xsl:call-template name="add_width"/>
|
2703
|
-
</xsl:for-each>
|
2704
|
-
<xsl:if test="not(*[local-name() = 'p'])">
|
2705
|
-
<xsl:call-template name="add_width"/>
|
2706
|
-
</xsl:if>
|
2707
|
-
</xsl:variable>
|
2708
|
-
<xsl:variable name="width_max">
|
2709
|
-
<xsl:for-each select="xalan:nodeset($widths_max)//width">
|
2710
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
2711
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
2712
|
-
</xsl:for-each>
|
2713
|
-
</xsl:variable>
|
2714
|
-
<xsl:attribute name="width_max">
|
2715
|
-
<xsl:value-of select="$width_max"/>
|
2716
|
-
</xsl:attribute>
|
2848
|
+
<parent_element><xsl:value-of select="local-name(..)"/></parent_element>
|
2717
2849
|
|
2718
|
-
|
2719
|
-
|
2720
|
-
|
2721
|
-
<xsl:
|
2722
|
-
|
2723
|
-
|
2724
|
-
|
2725
|
-
|
2726
|
-
|
2727
|
-
</xsl:
|
2850
|
+
<xsl:variable name="parent_table_page-width_">
|
2851
|
+
<xsl:if test="$parent_table_id != ''">
|
2852
|
+
<!-- determine column number in the parent table -->
|
2853
|
+
<xsl:variable name="parent_table_column_number">
|
2854
|
+
<xsl:choose>
|
2855
|
+
<xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
|
2856
|
+
<xsl:otherwise> <!-- parent is table -->
|
2857
|
+
<xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
|
2858
|
+
</xsl:otherwise>
|
2859
|
+
</xsl:choose>
|
2728
2860
|
</xsl:variable>
|
2729
|
-
|
2730
|
-
|
2731
|
-
</xsl:call-template>
|
2732
|
-
</xsl:variable>
|
2733
|
-
|
2734
|
-
<xsl:variable name="max_word_length">
|
2735
|
-
<xsl:call-template name="max_length">
|
2736
|
-
<xsl:with-param name="words" select="xalan:nodeset($words)"/>
|
2737
|
-
</xsl:call-template>
|
2738
|
-
</xsl:variable>
|
2739
|
-
<xsl:variable name="width_min">
|
2740
|
-
<xsl:value-of select="$max_word_length"/>
|
2741
|
-
</xsl:variable>
|
2742
|
-
<xsl:attribute name="width_min">
|
2743
|
-
<xsl:value-of select="$width_min"/>
|
2744
|
-
</xsl:attribute>
|
2745
|
-
<!-- width_max="1" width_min="1.5"> --> <!-- see 'tokenize' template, multiply 1.5 for all latin capitals -->
|
2746
|
-
<xsl:if test="$width_min > $width_max">
|
2747
|
-
<xsl:attribute name="width_max">
|
2748
|
-
<xsl:value-of select="$width_min"/>
|
2749
|
-
</xsl:attribute>
|
2861
|
+
<!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
|
2862
|
+
<xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
|
2750
2863
|
</xsl:if>
|
2751
|
-
<xsl:if test="$width_min = 0">
|
2752
|
-
<xsl:attribute name="width_min">1</xsl:attribute>
|
2753
|
-
</xsl:if>
|
2754
|
-
|
2755
|
-
<xsl:apply-templates select="node()" mode="determine_cell_widths"/>
|
2756
|
-
|
2757
|
-
</xsl:copy>
|
2758
|
-
</xsl:template><xsl:template name="add_width">
|
2759
|
-
<xsl:variable name="p_text"><xsl:apply-templates select="." mode="td_text"/></xsl:variable>
|
2760
|
-
<xsl:variable name="p_text_len_" select="string-length(normalize-space($p_text))"/>
|
2761
|
-
|
2762
|
-
<xsl:variable name="p_text_len">
|
2763
|
-
<xsl:choose>
|
2764
|
-
<xsl:when test="normalize-space(translate($p_text, concat($upper,'0123456789'), '')) = ''"> <!-- english word in CAPITAL letters -->
|
2765
|
-
<xsl:value-of select="$p_text_len_ * 1.5"/>
|
2766
|
-
</xsl:when>
|
2767
|
-
<xsl:otherwise><xsl:value-of select="$p_text_len_"/></xsl:otherwise>
|
2768
|
-
</xsl:choose>
|
2769
2864
|
</xsl:variable>
|
2865
|
+
<xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
|
2770
2866
|
|
2771
|
-
|
2772
|
-
|
2773
|
-
|
2774
|
-
|
2775
|
-
|
2776
|
-
|
2867
|
+
<!-- get current table id -->
|
2868
|
+
<xsl:variable name="table_id" select="@id"/>
|
2869
|
+
|
2870
|
+
<xsl:choose>
|
2871
|
+
<xsl:when test="$parent_table_id = '' or $parent_table_page-width = ''">
|
2872
|
+
<!-- find table by id in the file 'table_widths' and get all `<column>...</column> -->
|
2873
|
+
<xsl:copy-of select="$table_widths_from_if_calculated//table[@id = $table_id]/node()"/>
|
2874
|
+
</xsl:when>
|
2875
|
+
<xsl:otherwise>
|
2876
|
+
<!-- recalculate columns width based on parent table width -->
|
2877
|
+
<xsl:for-each select="$table_widths_from_if//table[@id = $table_id]">
|
2878
|
+
<xsl:call-template name="calculate-column-widths-autolayout-algorithm">
|
2879
|
+
<xsl:with-param name="parent_table_page-width" select="$parent_table_page-width"/> <!-- padding-left = 2mm = 50000-->
|
2880
|
+
</xsl:call-template>
|
2881
|
+
</xsl:for-each>
|
2882
|
+
</xsl:otherwise>
|
2883
|
+
</xsl:choose>
|
2777
2884
|
|
2778
|
-
<width><xsl:value-of select="$p_text_len + $math_addon_length"/></width>
|
2779
2885
|
</xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths-if">
|
2780
2886
|
<xsl:copy>
|
2781
2887
|
<xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
|
@@ -2823,12 +2929,18 @@
|
|
2823
2929
|
<fo:table-row>
|
2824
2930
|
<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">
|
2825
2931
|
|
2826
|
-
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
2827
|
-
<xsl:with-param name="continued">true</xsl:with-param>
|
2828
|
-
</xsl:apply-templates>
|
2829
2932
|
|
2830
2933
|
|
2831
2934
|
|
2935
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
2936
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
2937
|
+
</xsl:apply-templates>
|
2938
|
+
|
2939
|
+
|
2940
|
+
|
2941
|
+
|
2942
|
+
|
2943
|
+
|
2832
2944
|
</fo:table-cell>
|
2833
2945
|
</fo:table-row>
|
2834
2946
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -2868,77 +2980,91 @@
|
|
2868
2980
|
</xsl:choose>
|
2869
2981
|
</xsl:variable>
|
2870
2982
|
|
2871
|
-
|
2872
|
-
|
2873
|
-
|
2983
|
+
|
2984
|
+
<xsl:variable name="tableWithNotesAndFootnotes">
|
2985
|
+
|
2986
|
+
<fo:table keep-with-previous="always">
|
2987
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
|
2988
|
+
<xsl:variable name="name" select="local-name()"/>
|
2989
|
+
<xsl:choose>
|
2990
|
+
<xsl:when test="$name = 'border-top'">
|
2991
|
+
<xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
|
2992
|
+
</xsl:when>
|
2993
|
+
<xsl:when test="$name = 'border'">
|
2994
|
+
<xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
|
2995
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
2996
|
+
</xsl:when>
|
2997
|
+
<xsl:otherwise>
|
2998
|
+
<xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
|
2999
|
+
</xsl:otherwise>
|
3000
|
+
</xsl:choose>
|
3001
|
+
</xsl:for-each>
|
3002
|
+
|
3003
|
+
|
3004
|
+
|
2874
3005
|
<xsl:choose>
|
2875
|
-
<xsl:when test="$name
|
2876
|
-
<xsl:
|
2877
|
-
|
2878
|
-
|
2879
|
-
<xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
|
2880
|
-
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
3006
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
3007
|
+
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
3008
|
+
<fo:table-column column-width="{@width}"/>
|
3009
|
+
</xsl:for-each>
|
2881
3010
|
</xsl:when>
|
2882
3011
|
<xsl:otherwise>
|
2883
|
-
|
3012
|
+
<!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
|
3013
|
+
<xsl:call-template name="insertTableColumnWidth">
|
3014
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
3015
|
+
</xsl:call-template>
|
2884
3016
|
</xsl:otherwise>
|
2885
3017
|
</xsl:choose>
|
2886
|
-
|
2887
|
-
|
2888
|
-
|
2889
|
-
|
2890
|
-
|
2891
|
-
|
2892
|
-
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2893
|
-
<fo:table-column column-width="{@width}"/>
|
2894
|
-
</xsl:for-each>
|
2895
|
-
</xsl:when>
|
2896
|
-
<xsl:otherwise>
|
2897
|
-
<!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2898
|
-
<xsl:call-template name="insertTableColumnWidth">
|
2899
|
-
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2900
|
-
</xsl:call-template>
|
2901
|
-
</xsl:otherwise>
|
2902
|
-
</xsl:choose>
|
2903
|
-
|
2904
|
-
<fo:table-body>
|
2905
|
-
<fo:table-row>
|
2906
|
-
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
2907
|
-
|
2908
|
-
|
3018
|
+
|
3019
|
+
<fo:table-body>
|
3020
|
+
<fo:table-row>
|
3021
|
+
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
3022
|
+
|
3023
|
+
|
2909
3024
|
|
2910
|
-
|
2911
|
-
|
2912
|
-
<!-- fn will be processed inside 'note' processing -->
|
2913
|
-
|
2914
|
-
|
2915
|
-
|
2916
|
-
|
2917
|
-
|
2918
|
-
|
2919
|
-
<!-- for BSI (not PAS) display Notes before footnotes -->
|
2920
|
-
|
2921
|
-
|
2922
|
-
<!-- except gb and bsi -->
|
2923
|
-
|
2924
|
-
<xsl:apply-templates select="../*[local-name()='note']"/>
|
2925
3025
|
|
2926
|
-
|
2927
|
-
|
2928
|
-
|
2929
|
-
|
2930
|
-
|
2931
|
-
|
2932
|
-
|
2933
|
-
|
2934
|
-
|
2935
|
-
|
2936
|
-
|
2937
|
-
|
2938
|
-
|
2939
|
-
|
2940
|
-
|
2941
|
-
|
3026
|
+
|
3027
|
+
<!-- fn will be processed inside 'note' processing -->
|
3028
|
+
|
3029
|
+
|
3030
|
+
|
3031
|
+
|
3032
|
+
|
3033
|
+
|
3034
|
+
<!-- for BSI (not PAS) display Notes before footnotes -->
|
3035
|
+
|
3036
|
+
|
3037
|
+
<!-- except gb and bsi -->
|
3038
|
+
|
3039
|
+
<xsl:apply-templates select="../*[local-name()='note']"/>
|
3040
|
+
|
3041
|
+
|
3042
|
+
|
3043
|
+
<!-- horizontal row separator -->
|
3044
|
+
|
3045
|
+
|
3046
|
+
<!-- fn processing -->
|
3047
|
+
|
3048
|
+
<xsl:call-template name="table_fn_display"/>
|
3049
|
+
|
3050
|
+
|
3051
|
+
|
3052
|
+
<!-- for PAS display Notes after footnotes -->
|
3053
|
+
|
3054
|
+
|
3055
|
+
</fo:table-cell>
|
3056
|
+
</fo:table-row>
|
3057
|
+
</fo:table-body>
|
3058
|
+
|
3059
|
+
</fo:table>
|
3060
|
+
</xsl:variable>
|
3061
|
+
|
3062
|
+
<xsl:if test="normalize-space($tableWithNotesAndFootnotes) != ''">
|
3063
|
+
<xsl:copy-of select="$tableWithNotesAndFootnotes"/>
|
3064
|
+
</xsl:if>
|
3065
|
+
|
3066
|
+
|
3067
|
+
|
2942
3068
|
</xsl:if>
|
2943
3069
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
2944
3070
|
|
@@ -3027,6 +3153,9 @@
|
|
3027
3153
|
|
3028
3154
|
|
3029
3155
|
|
3156
|
+
|
3157
|
+
|
3158
|
+
|
3030
3159
|
|
3031
3160
|
|
3032
3161
|
<xsl:call-template name="setTableRowAttributes"/>
|
@@ -3046,6 +3175,8 @@
|
|
3046
3175
|
|
3047
3176
|
|
3048
3177
|
|
3178
|
+
|
3179
|
+
|
3049
3180
|
<xsl:call-template name="setTableRowAttributes"/>
|
3050
3181
|
<xsl:apply-templates/>
|
3051
3182
|
</fo:table-row>
|
@@ -3127,6 +3258,8 @@
|
|
3127
3258
|
|
3128
3259
|
|
3129
3260
|
|
3261
|
+
|
3262
|
+
|
3130
3263
|
|
3131
3264
|
|
3132
3265
|
|
@@ -3198,7 +3331,11 @@
|
|
3198
3331
|
|
3199
3332
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
3200
3333
|
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
3201
|
-
<xsl:variable name="
|
3334
|
+
<xsl:variable name="reference_">
|
3335
|
+
<xsl:value-of select="@reference"/>
|
3336
|
+
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
3337
|
+
</xsl:variable>
|
3338
|
+
<xsl:variable name="reference" select="normalize-space($reference_)"/>
|
3202
3339
|
<!-- fn sequence number in document -->
|
3203
3340
|
<xsl:variable name="current_fn_number">
|
3204
3341
|
<xsl:choose>
|
@@ -3218,6 +3355,7 @@
|
|
3218
3355
|
<xsl:variable name="footnote_inline">
|
3219
3356
|
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
3220
3357
|
|
3358
|
+
|
3221
3359
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
3222
3360
|
<xsl:value-of select="$current_fn_number_text"/>
|
3223
3361
|
</fo:basic-link>
|
@@ -3239,8 +3377,12 @@
|
|
3239
3377
|
<fo:block xsl:use-attribute-sets="fn-body-style">
|
3240
3378
|
|
3241
3379
|
|
3380
|
+
|
3242
3381
|
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
3243
3382
|
|
3383
|
+
|
3384
|
+
|
3385
|
+
|
3244
3386
|
<xsl:value-of select="$current_fn_number_text"/>
|
3245
3387
|
</fo:inline>
|
3246
3388
|
<xsl:apply-templates/>
|
@@ -3273,7 +3415,7 @@
|
|
3273
3415
|
<xsl:copy-of select="node()"/>
|
3274
3416
|
</fn>
|
3275
3417
|
</xsl:for-each>
|
3276
|
-
<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']/*">
|
3418
|
+
<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']/*">
|
3277
3419
|
<xsl:sort select="@displayorder" data-type="number"/>
|
3278
3420
|
<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])]">
|
3279
3421
|
<!-- copy unique fn -->
|
@@ -3553,11 +3695,19 @@
|
|
3553
3695
|
|
3554
3696
|
|
3555
3697
|
|
3698
|
+
|
3699
|
+
<xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
|
3700
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
3701
|
+
</xsl:if>
|
3702
|
+
|
3556
3703
|
<fo:block>
|
3557
3704
|
|
3558
3705
|
|
3559
3706
|
|
3560
3707
|
|
3708
|
+
<xsl:apply-templates select="*[local-name() = 'name']">
|
3709
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
3710
|
+
</xsl:apply-templates>
|
3561
3711
|
|
3562
3712
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
3563
3713
|
<!-- to determine start of table -->
|
@@ -3580,6 +3730,7 @@
|
|
3580
3730
|
</xsl:choose>
|
3581
3731
|
|
3582
3732
|
|
3733
|
+
|
3583
3734
|
<xsl:choose>
|
3584
3735
|
<xsl:when test="$isGenerateTableIF = 'true'">
|
3585
3736
|
<!-- generate IF for table widths -->
|
@@ -3708,6 +3859,18 @@
|
|
3708
3859
|
</xsl:if> <!-- END: a few components -->
|
3709
3860
|
</fo:block-container>
|
3710
3861
|
</fo:block-container>
|
3862
|
+
|
3863
|
+
<xsl:if test="$isGenerateTableIF = 'true'"> <!-- process nested 'dl' -->
|
3864
|
+
<xsl:apply-templates select="*[local-name() = 'dd']/*[local-name() = 'dl']"/>
|
3865
|
+
</xsl:if>
|
3866
|
+
|
3867
|
+
</xsl:template><xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
|
3868
|
+
<xsl:param name="process">false</xsl:param>
|
3869
|
+
<xsl:if test="$process = 'true'">
|
3870
|
+
<fo:block xsl:use-attribute-sets="dl-name-style">
|
3871
|
+
<xsl:apply-templates/>
|
3872
|
+
</fo:block>
|
3873
|
+
</xsl:if>
|
3711
3874
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
3712
3875
|
<xsl:param name="colwidths"/>
|
3713
3876
|
<xsl:param name="maxlength_dt"/>
|
@@ -3716,6 +3879,11 @@
|
|
3716
3879
|
<!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
|
3717
3880
|
|
3718
3881
|
<xsl:choose>
|
3882
|
+
<xsl:when test="xalan:nodeset($colwidths)/autolayout">
|
3883
|
+
<xsl:call-template name="insertTableColumnWidth">
|
3884
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
3885
|
+
</xsl:call-template>
|
3886
|
+
</xsl:when>
|
3719
3887
|
<xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
|
3720
3888
|
<fo:table-column column-width="50%"/>
|
3721
3889
|
<fo:table-column column-width="50%"/>
|
@@ -3968,12 +4136,24 @@
|
|
3968
4136
|
</td>
|
3969
4137
|
<td>
|
3970
4138
|
|
3971
|
-
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()"/>
|
4139
|
+
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
|
4140
|
+
|
4141
|
+
<!-- get paragraphs from nested 'dl' -->
|
4142
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
4143
|
+
|
3972
4144
|
|
3973
4145
|
</td>
|
3974
4146
|
</tr>
|
3975
4147
|
|
3976
|
-
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='
|
4148
|
+
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
|
4149
|
+
<xsl:for-each select="*[local-name() = 'dt']">
|
4150
|
+
<p>
|
4151
|
+
<xsl:copy-of select="node()"/>
|
4152
|
+
<xsl:text> </xsl:text>
|
4153
|
+
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'p']/node()"/>
|
4154
|
+
</p>
|
4155
|
+
</xsl:for-each>
|
4156
|
+
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if_nested"/><xsl:template match="*[local-name()='em']">
|
3977
4157
|
<fo:inline font-style="italic">
|
3978
4158
|
<xsl:apply-templates/>
|
3979
4159
|
</fo:inline>
|
@@ -4004,7 +4184,7 @@
|
|
4004
4184
|
|
4005
4185
|
|
4006
4186
|
|
4007
|
-
|
4187
|
+
<!-- 10 -->
|
4008
4188
|
|
4009
4189
|
|
4010
4190
|
|
@@ -4876,6 +5056,13 @@
|
|
4876
5056
|
</xsl:variable>
|
4877
5057
|
<fo:inline xsl:use-attribute-sets="link-style">
|
4878
5058
|
|
5059
|
+
<xsl:if test="starts-with(normalize-space(@target), 'mailto:')">
|
5060
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
5061
|
+
</xsl:if>
|
5062
|
+
|
5063
|
+
|
5064
|
+
|
5065
|
+
|
4879
5066
|
|
4880
5067
|
|
4881
5068
|
|
@@ -5089,6 +5276,7 @@
|
|
5089
5276
|
|
5090
5277
|
|
5091
5278
|
|
5279
|
+
|
5092
5280
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
5093
5281
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
5094
5282
|
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
@@ -5111,6 +5299,7 @@
|
|
5111
5299
|
<xsl:otherwise>
|
5112
5300
|
|
5113
5301
|
|
5302
|
+
|
5114
5303
|
</xsl:otherwise>
|
5115
5304
|
</xsl:choose>
|
5116
5305
|
</xsl:variable>
|
@@ -5128,6 +5317,7 @@
|
|
5128
5317
|
<xsl:otherwise>
|
5129
5318
|
|
5130
5319
|
|
5320
|
+
|
5131
5321
|
</xsl:otherwise>
|
5132
5322
|
</xsl:choose>
|
5133
5323
|
</xsl:variable>
|
@@ -5136,7 +5326,19 @@
|
|
5136
5326
|
<xsl:value-of select="$suffix"/>
|
5137
5327
|
</xsl:if>
|
5138
5328
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
|
5139
|
-
<
|
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>
|
5140
5342
|
</xsl:template><xsl:template match="*[local-name() = 'terms']">
|
5141
5343
|
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
5142
5344
|
<fo:block id="{@id}">
|
@@ -5891,6 +6093,9 @@
|
|
5891
6093
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
5892
6094
|
|
5893
6095
|
|
6096
|
+
|
6097
|
+
|
6098
|
+
|
5894
6099
|
<xsl:apply-templates/>
|
5895
6100
|
</fo:block>
|
5896
6101
|
</xsl:if>
|
@@ -5951,9 +6156,9 @@
|
|
5951
6156
|
<xsl:apply-templates/>
|
5952
6157
|
</xsl:otherwise>
|
5953
6158
|
</xsl:choose>
|
5954
|
-
</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">
|
6159
|
+
</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'] | *[local-name() = 'eref']" mode="contents">
|
5955
6160
|
<xsl:value-of select="."/>
|
5956
|
-
</xsl:template><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
6161
|
+
</xsl:template><xsl:template match="*[local-name() = 'review']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
5957
6162
|
<xsl:text> </xsl:text>
|
5958
6163
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
5959
6164
|
<xsl:copy>
|
@@ -6024,9 +6229,12 @@
|
|
6024
6229
|
|
6025
6230
|
|
6026
6231
|
|
6232
|
+
<!-- 9 -->
|
6027
6233
|
|
6028
6234
|
|
6029
|
-
|
6235
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
6236
|
+
<xsl:if test="$doctype = 'standard' and $stage = 'published'">8</xsl:if>
|
6237
|
+
</xsl:if> -->
|
6030
6238
|
|
6031
6239
|
|
6032
6240
|
|
@@ -6108,7 +6316,7 @@
|
|
6108
6316
|
<xsl:for-each select="xalan:nodeset($text_step4)/node()">
|
6109
6317
|
<xsl:choose>
|
6110
6318
|
<xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
|
6111
|
-
<xsl:call-template name="interspers">
|
6319
|
+
<xsl:call-template name="interspers-java">
|
6112
6320
|
<xsl:with-param name="str" select="."/>
|
6113
6321
|
</xsl:call-template>
|
6114
6322
|
</xsl:when>
|
@@ -6158,6 +6366,10 @@
|
|
6158
6366
|
<xsl:with-param name="char" select="$char"/>
|
6159
6367
|
</xsl:call-template>
|
6160
6368
|
</xsl:if>
|
6369
|
+
</xsl:template><xsl:template name="interspers-java">
|
6370
|
+
<xsl:param name="str"/>
|
6371
|
+
<xsl:param name="char" select="$zero_width_space"/>
|
6372
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($str),'([^ -.:=_—])',concat('$1', $char))"/> <!-- insert $char after each char excep space, - . : = _ etc. -->
|
6161
6373
|
</xsl:template><xsl:template match="*" mode="syntax_highlight">
|
6162
6374
|
<xsl:apply-templates mode="syntax_highlight"/>
|
6163
6375
|
</xsl:template><xsl:variable name="syntax_highlight_styles_">
|
@@ -6467,10 +6679,14 @@
|
|
6467
6679
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
6468
6680
|
<xsl:variable name="element">inline
|
6469
6681
|
|
6682
|
+
|
6470
6683
|
</xsl:variable>
|
6471
6684
|
<xsl:choose>
|
6472
6685
|
<xsl:when test="contains($element, 'block')">
|
6473
6686
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
6687
|
+
|
6688
|
+
|
6689
|
+
|
6474
6690
|
<xsl:apply-templates/>
|
6475
6691
|
</fo:block>
|
6476
6692
|
</xsl:when>
|
@@ -6578,6 +6794,7 @@
|
|
6578
6794
|
</xsl:if>
|
6579
6795
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
6580
6796
|
|
6797
|
+
|
6581
6798
|
<xsl:apply-templates/>
|
6582
6799
|
</fo:block>
|
6583
6800
|
</fo:block-container>
|
@@ -6734,6 +6951,8 @@
|
|
6734
6951
|
|
6735
6952
|
|
6736
6953
|
|
6954
|
+
|
6955
|
+
|
6737
6956
|
<fo:basic-link fox:alt-text="{@citeas}">
|
6738
6957
|
<xsl:if test="normalize-space(@citeas) = ''">
|
6739
6958
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
@@ -6808,6 +7027,7 @@
|
|
6808
7027
|
|
6809
7028
|
|
6810
7029
|
|
7030
|
+
|
6811
7031
|
</xsl:variable>
|
6812
7032
|
|
6813
7033
|
<xsl:variable name="padding-right">
|
@@ -7115,6 +7335,11 @@
|
|
7115
7335
|
</xsl:otherwise>
|
7116
7336
|
</xsl:choose>
|
7117
7337
|
</xsl:template><xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
|
7338
|
+
|
7339
|
+
<xsl:apply-templates select="*[local-name() = 'name']">
|
7340
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
7341
|
+
</xsl:apply-templates>
|
7342
|
+
|
7118
7343
|
<fo:list-block xsl:use-attribute-sets="list-style">
|
7119
7344
|
|
7120
7345
|
|
@@ -7129,12 +7354,23 @@
|
|
7129
7354
|
|
7130
7355
|
|
7131
7356
|
|
7357
|
+
<xsl:if test="*[local-name() = 'name']">
|
7358
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
7359
|
+
</xsl:if>
|
7360
|
+
|
7132
7361
|
<xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
|
7133
7362
|
</fo:list-block>
|
7134
7363
|
<!-- <xsl:for-each select="./iho:note">
|
7135
7364
|
<xsl:call-template name="note"/>
|
7136
7365
|
</xsl:for-each> -->
|
7137
7366
|
<xsl:apply-templates select="./*[local-name() = 'note']"/>
|
7367
|
+
</xsl:template><xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
|
7368
|
+
<xsl:param name="process">false</xsl:param>
|
7369
|
+
<xsl:if test="$process = 'true'">
|
7370
|
+
<fo:block xsl:use-attribute-sets="list-name-style">
|
7371
|
+
<xsl:apply-templates/>
|
7372
|
+
</fo:block>
|
7373
|
+
</xsl:if>
|
7138
7374
|
</xsl:template><xsl:template match="*[local-name()='li']">
|
7139
7375
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
7140
7376
|
<xsl:copy-of select="@id"/>
|
@@ -7146,6 +7382,8 @@
|
|
7146
7382
|
|
7147
7383
|
|
7148
7384
|
|
7385
|
+
|
7386
|
+
|
7149
7387
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
7150
7388
|
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
7151
7389
|
<xsl:call-template name="append_add-style"/>
|
@@ -7403,9 +7641,9 @@
|
|
7403
7641
|
</fo:block>
|
7404
7642
|
|
7405
7643
|
|
7406
|
-
</xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
|
7644
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
|
7407
7645
|
|
7408
|
-
<!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
7646
|
+
<!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
7409
7647
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
7410
7648
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
7411
7649
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
@@ -7416,7 +7654,7 @@
|
|
7416
7654
|
|
7417
7655
|
<xsl:value-of select="*[local-name()='docidentifier'][@type = 'metanorma-ordinal']"/>
|
7418
7656
|
<xsl:if test="not(*[local-name()='docidentifier'][@type = 'metanorma-ordinal'])">
|
7419
|
-
<xsl:number format="[1]"/>
|
7657
|
+
<xsl:number format="[1]" count="*[local-name()='bibitem'][not(@hidden = 'true')]"/>
|
7420
7658
|
</xsl:if>
|
7421
7659
|
|
7422
7660
|
</fo:inline>
|
@@ -7438,26 +7676,23 @@
|
|
7438
7676
|
<xsl:if test=".//*[local-name() = 'fn']">
|
7439
7677
|
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
7440
7678
|
</xsl:if>
|
7679
|
+
|
7680
|
+
<!-- display document identifier, not number [1] -->
|
7441
7681
|
<xsl:variable name="docidentifier">
|
7442
7682
|
<xsl:choose>
|
7443
7683
|
<xsl:when test="*[local-name() = 'docidentifier']/@type = 'metanorma'"/>
|
7444
7684
|
<xsl:otherwise><xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma-ordinal')]"/></xsl:otherwise>
|
7445
7685
|
</xsl:choose>
|
7446
7686
|
</xsl:variable>
|
7447
|
-
<
|
7687
|
+
<xsl:value-of select="$docidentifier"/>
|
7688
|
+
|
7448
7689
|
<xsl:apply-templates select="*[local-name() = 'note']"/>
|
7449
|
-
|
7450
|
-
<xsl:
|
7451
|
-
<xsl:
|
7452
|
-
|
7453
|
-
|
7454
|
-
|
7455
|
-
<xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = 'en']"/>
|
7456
|
-
</xsl:when>
|
7457
|
-
<xsl:otherwise>
|
7458
|
-
<xsl:apply-templates select="*[local-name() = 'title']"/>
|
7459
|
-
</xsl:otherwise>
|
7460
|
-
</xsl:choose>
|
7690
|
+
|
7691
|
+
<xsl:if test="normalize-space($docidentifier) != '' and *[local-name() = 'formattedref']">
|
7692
|
+
<xsl:text>,</xsl:text>
|
7693
|
+
<xsl:text> </xsl:text>
|
7694
|
+
</xsl:if>
|
7695
|
+
|
7461
7696
|
<xsl:apply-templates select="*[local-name() = 'formattedref']"/>
|
7462
7697
|
<!-- end bibitem processing -->
|
7463
7698
|
|
@@ -7769,36 +8004,58 @@
|
|
7769
8004
|
|
7770
8005
|
|
7771
8006
|
|
8007
|
+
<xsl:if test="@type = 'editorial'">
|
8008
|
+
<xsl:attribute name="color">green</xsl:attribute>
|
8009
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
8010
|
+
|
8011
|
+
<!-- <xsl:variable name="note-style">
|
8012
|
+
<style xsl:use-attribute-sets="note-style"></style>
|
8013
|
+
</xsl:variable>
|
8014
|
+
<xsl:for-each select="xalan:nodeset($note-style)//style/@*">
|
8015
|
+
<xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
|
8016
|
+
</xsl:for-each> -->
|
8017
|
+
</xsl:if>
|
7772
8018
|
|
7773
8019
|
|
7774
8020
|
|
7775
|
-
|
7776
|
-
|
8021
|
+
|
8022
|
+
|
8023
|
+
|
8024
|
+
<xsl:call-template name="displayAdmonitionName">
|
8025
|
+
<xsl:with-param name="sep"> — </xsl:with-param>
|
8026
|
+
</xsl:call-template>
|
7777
8027
|
|
7778
8028
|
|
7779
8029
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
7780
8030
|
</fo:block>
|
7781
8031
|
|
7782
8032
|
</xsl:template><xsl:template name="displayAdmonitionName">
|
7783
|
-
|
8033
|
+
<xsl:param name="sep"/> <!-- Example: ' - ' -->
|
8034
|
+
<!-- <xsl:choose>
|
8035
|
+
<xsl:when test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
8036
|
+
<xsl:choose>
|
8037
|
+
<xsl:when test="@type='important'"><xsl:apply-templates select="@type"/></xsl:when>
|
8038
|
+
<xsl:otherwise>
|
8039
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
8040
|
+
</xsl:otherwise>
|
8041
|
+
</xsl:choose>
|
8042
|
+
</xsl:when>
|
8043
|
+
<xsl:otherwise>
|
7784
8044
|
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
7785
8045
|
<xsl:if test="not(*[local-name() = 'name'])">
|
7786
8046
|
<xsl:apply-templates select="@type"/>
|
7787
8047
|
</xsl:if>
|
7788
|
-
|
7789
|
-
|
7790
|
-
<xsl:
|
7791
|
-
|
7792
|
-
<xsl:variable name="admonition_type_">
|
7793
|
-
<xsl:call-template name="getLocalizedString">
|
7794
|
-
<xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
|
7795
|
-
</xsl:call-template>
|
8048
|
+
</xsl:otherwise>
|
8049
|
+
</xsl:choose> -->
|
8050
|
+
<xsl:variable name="name">
|
8051
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
7796
8052
|
</xsl:variable>
|
7797
|
-
<xsl:
|
7798
|
-
<xsl:
|
7799
|
-
|
7800
|
-
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
|
8053
|
+
<xsl:copy-of select="$name"/>
|
8054
|
+
<xsl:if test="normalize-space($name) != ''">
|
8055
|
+
<xsl:value-of select="$sep"/>
|
7801
8056
|
</xsl:if>
|
8057
|
+
</xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
|
8058
|
+
<xsl:apply-templates/>
|
7802
8059
|
</xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
|
7803
8060
|
|
7804
8061
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
@@ -7969,6 +8226,8 @@
|
|
7969
8226
|
</xsl:when>
|
7970
8227
|
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
|
7971
8228
|
</xsl:choose>
|
8229
|
+
</xsl:template><xsl:template match="*[local-name() = 'lang_none']">
|
8230
|
+
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
7972
8231
|
</xsl:template><xsl:template name="printEdition">
|
7973
8232
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
7974
8233
|
<xsl:text> </xsl:text>
|
@@ -8075,6 +8334,27 @@
|
|
8075
8334
|
</xsl:when>
|
8076
8335
|
<xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
|
8077
8336
|
</xsl:choose>
|
8337
|
+
</xsl:template><xsl:template name="getMonthLocalizedByNum">
|
8338
|
+
<xsl:param name="num"/>
|
8339
|
+
<xsl:variable name="monthStr">
|
8340
|
+
<xsl:choose>
|
8341
|
+
<xsl:when test="$num = '01'">january</xsl:when>
|
8342
|
+
<xsl:when test="$num = '02'">february</xsl:when>
|
8343
|
+
<xsl:when test="$num = '03'">march</xsl:when>
|
8344
|
+
<xsl:when test="$num = '04'">april</xsl:when>
|
8345
|
+
<xsl:when test="$num = '05'">may</xsl:when>
|
8346
|
+
<xsl:when test="$num = '06'">june</xsl:when>
|
8347
|
+
<xsl:when test="$num = '07'">july</xsl:when>
|
8348
|
+
<xsl:when test="$num = '08'">august</xsl:when>
|
8349
|
+
<xsl:when test="$num = '09'">september</xsl:when>
|
8350
|
+
<xsl:when test="$num = '10'">october</xsl:when>
|
8351
|
+
<xsl:when test="$num = '11'">november</xsl:when>
|
8352
|
+
<xsl:when test="$num = '12'">december</xsl:when>
|
8353
|
+
</xsl:choose>
|
8354
|
+
</xsl:variable>
|
8355
|
+
<xsl:call-template name="getLocalizedString">
|
8356
|
+
<xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param>
|
8357
|
+
</xsl:call-template>
|
8078
8358
|
</xsl:template><xsl:template name="insertKeywords">
|
8079
8359
|
<xsl:param name="sorting" select="'true'"/>
|
8080
8360
|
<xsl:param name="charAtEnd" select="'.'"/>
|
@@ -8146,7 +8426,7 @@
|
|
8146
8426
|
<dc:description>
|
8147
8427
|
<xsl:variable name="abstract">
|
8148
8428
|
|
8149
|
-
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
8429
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
|
8150
8430
|
|
8151
8431
|
</xsl:variable>
|
8152
8432
|
<xsl:value-of select="normalize-space($abstract)"/>
|
@@ -8273,6 +8553,7 @@
|
|
8273
8553
|
|
8274
8554
|
|
8275
8555
|
|
8556
|
+
|
8276
8557
|
<xsl:value-of select="document('')//*/namespace::csd"/>
|
8277
8558
|
|
8278
8559
|
|