metanorma-un 0.9.1 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,7 @@
14
14
  <contents>
15
15
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
16
16
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
17
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
17
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements' and local-name() != 'note' and local-name() != 'admonition']" mode="contents"/>
18
18
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
19
19
 
20
20
  <xsl:apply-templates select="/un:un-standard/un:sections/*" mode="contents"/>
@@ -289,10 +289,10 @@
289
289
  </xsl:if>
290
290
 
291
291
  <!-- Preface Pages (except Abstract, that showed in Summary on cover page`) -->
292
- <xsl:if test="/un:un-standard/un:preface/*[not(local-name() = 'abstract')]">
292
+ <xsl:if test="/un:un-standard/un:preface/*[not(local-name() = 'abstract' or local-name() != 'note' or local-name() != 'admonition')]">
293
293
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
294
294
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
295
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
295
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements' and local-name() != 'note' and local-name() != 'admonition']"/>
296
296
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
297
297
  <fo:block break-after="page"/>
298
298
  </xsl:if>
@@ -682,86 +682,8 @@
682
682
  </fo:block-container>
683
683
  </xsl:template>
684
684
 
685
- <!-- Examples:
686
- [b-ASM] b-ASM, http://www.eecs.umich.edu/gasm/ (accessed 20 March 2018).
687
- [b-Börger & Stärk] b-Börger & Stärk, Börger, E., and Stärk, R. S. (2003), Abstract State Machines: A Method for High-Level System Design and Analysis, Springer-Verlag.
688
- -->
689
- <xsl:template match="un:annex//un:bibitem">
690
- <fo:block id="{@id}" margin-top="6pt" margin-left="12mm" text-indent="-12mm">
691
- <xsl:if test="un:formattedref">
692
- <xsl:choose>
693
- <xsl:when test="un:docidentifier[@type = 'metanorma']">
694
- <xsl:attribute name="margin-left">0</xsl:attribute>
695
- <xsl:attribute name="text-indent">0</xsl:attribute>
696
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
697
- <!-- create list -->
698
- <fo:list-block>
699
- <fo:list-item>
700
- <fo:list-item-label end-indent="label-end()">
701
- <fo:block>
702
- <xsl:apply-templates select="un:docidentifier[@type = 'metanorma']" mode="process"/>
703
- </fo:block>
704
- </fo:list-item-label>
705
- <fo:list-item-body start-indent="body-start()">
706
- <fo:block margin-left="3mm">
707
- <xsl:apply-templates select="un:formattedref"/>
708
- </fo:block>
709
- </fo:list-item-body>
710
- </fo:list-item>
711
- </fo:list-block>
712
- </xsl:when>
713
- <xsl:otherwise>
714
- <xsl:apply-templates select="un:formattedref"/>
715
- <xsl:apply-templates select="un:docidentifier[(@type != 'metanorma' and @type != 'metanorma-ordinal') or not(@type)]" mode="process"/>
716
- </xsl:otherwise>
717
- </xsl:choose>
718
- </xsl:if>
719
- <xsl:if test="un:title">
720
- <xsl:for-each select="un:contributor">
721
- <xsl:value-of select="un:organization/un:name"/>
722
- <xsl:if test="position() != last()">, </xsl:if>
723
- </xsl:for-each>
724
- <xsl:text> (</xsl:text>
725
- <xsl:variable name="date">
726
- <xsl:choose>
727
- <xsl:when test="un:date[@type='issued']">
728
- <xsl:value-of select="un:date[@type='issued']/un:on"/>
729
- </xsl:when>
730
- <xsl:otherwise>
731
- <xsl:value-of select="un:date/un:on"/>
732
- </xsl:otherwise>
733
- </xsl:choose>
734
- </xsl:variable>
735
- <xsl:value-of select="$date"/>
736
- <xsl:text>) </xsl:text>
737
- <fo:inline font-style="italic"><xsl:value-of select="un:title"/></fo:inline>
738
- <xsl:if test="un:contributor[un:role/@type='publisher']/un:organization/un:name">
739
- <xsl:text> (</xsl:text><xsl:value-of select="un:contributor[un:role/@type='publisher']/un:organization/un:name"/><xsl:text>)</xsl:text>
740
- </xsl:if>
741
- <xsl:text>, </xsl:text>
742
- <xsl:value-of select="$date"/>
743
- <xsl:text>. </xsl:text>
744
- <xsl:value-of select="un:docidentifier"/>
745
- <xsl:value-of select="$linebreak"/>
746
- <xsl:value-of select="un:uri"/>
747
- </xsl:if>
748
- </fo:block>
749
- </xsl:template>
750
-
751
- <xsl:template match="un:annex//un:bibitem//un:formattedref">
752
- <xsl:apply-templates/>
753
- </xsl:template>
754
-
755
- <xsl:template match="un:docidentifier[@type = 'metanorma' or @type = 'metanorma-ordinal']" mode="process">
756
- <xsl:apply-templates/>
757
- </xsl:template>
758
- <xsl:template match="un:docidentifier[(@type != 'metanorma' and @type != 'metanorma-ordinal') or not(@type)]" mode="process">
759
- <xsl:text> [</xsl:text><xsl:apply-templates/><xsl:text>]</xsl:text>
760
- </xsl:template>
761
- <xsl:template match="un:docidentifier"/>
762
685
 
763
686
 
764
-
765
687
  <xsl:template match="un:dl" priority="2">
766
688
  <fo:block-container margin-left="0mm">
767
689
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -836,14 +758,41 @@
836
758
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAJkAAAAmCAYAAADXwDkaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA+lpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5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7xSqrdd135+AIqVLd+k6ICjZETxZhgY8HLnv3VGvTZa/+9kz/qlzuHctP4A89UE73L1sCJO8nXeWcqW3QOHeLyryF/Q4L3BoEhzW+fOO0A12vewbTZxj6/yWeCqz4J31WY1ny3/F6UYkeY68LIzhtsxa8myZailU1K6HlxN/x9kjcPp+HcBBgAS2JZd+kqHSQAAAABJRU5ErkJggg==</xsl:text>
837
759
  </xsl:variable>
838
760
 
839
- <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:param name="table_if_debug">false</xsl:param><xsl:variable name="isGenerateTableIF_">
761
+ <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_">
762
+ <xsl:for-each select="$table_widths_from_if//table">
763
+ <xsl:copy>
764
+ <xsl:copy-of select="@*"/>
765
+ <xsl:call-template name="calculate-column-widths-autolayout-algorithm"/>
766
+ </xsl:copy>
767
+ </xsl:for-each>
768
+ </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_">
840
769
  false
841
770
  </xsl:variable><xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/><xsl:variable name="lang">
842
771
  <xsl:call-template name="getLang"/>
843
- </xsl:variable><xsl:variable name="pageWidth_">
844
- 210
772
+ </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_">
773
+ <xsl:choose>
774
+ <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
775
+ <xsl:when test="$papersize = 'a4'">210</xsl:when>
776
+ </xsl:choose>
777
+ </xsl:variable><xsl:variable name="papersize_width" select="normalize-space($papersize_width_)"/><xsl:variable name="papersize_height_">
778
+ <xsl:choose>
779
+ <xsl:when test="$papersize = 'letter'">279.4</xsl:when>
780
+ <xsl:when test="$papersize = 'a4'">297</xsl:when>
781
+ </xsl:choose>
782
+ </xsl:variable><xsl:variable name="papersize_height" select="normalize-space($papersize_height_)"/><xsl:variable name="pageWidth_">
783
+ <xsl:choose>
784
+ <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
785
+ <xsl:otherwise>
786
+ 210
787
+ </xsl:otherwise>
788
+ </xsl:choose>
845
789
  </xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
846
- 297
790
+ <xsl:choose>
791
+ <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
792
+ <xsl:otherwise>
793
+ 297
794
+ </xsl:otherwise>
795
+ </xsl:choose>
847
796
  </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="marginLeftRight1_">
848
797
  40
849
798
  </xsl:variable><xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/><xsl:variable name="marginLeftRight2_">
@@ -955,7 +904,8 @@
955
904
  <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
956
905
  </xsl:otherwise>
957
906
  </xsl:choose>
958
- </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">
907
+ </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">
908
+
959
909
 
960
910
 
961
911
 
@@ -972,7 +922,8 @@
972
922
 
973
923
 
974
924
 
975
- <xsl:attribute name="font-family">Times New Roman, STIX Two Math, Source Han Sans</xsl:attribute>
925
+ <xsl:attribute name="font-family">Times New Roman, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
926
+ <xsl:attribute name="font-family-generic">Serif</xsl:attribute>
976
927
  <xsl:attribute name="font-size">10pt</xsl:attribute>
977
928
 
978
929
  </xsl:attribute-set><xsl:template name="insertRootStyle">
@@ -986,17 +937,60 @@
986
937
  </xsl:variable>
987
938
  <xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
988
939
 
940
+ <xsl:variable name="font_family_generic" select="$root-style_/root-style/@font-family-generic"/>
941
+
989
942
  <xsl:for-each select="$root-style_/root-style/@*">
943
+
990
944
  <xsl:choose>
991
- <xsl:when test="local-name() = 'font-family' and $additional_fonts != ''">
945
+ <xsl:when test="local-name() = 'font-family-generic'"><!-- skip, it's using for determine 'sans' or 'serif' --></xsl:when>
946
+ <xsl:when test="local-name() = 'font-family'">
947
+
948
+ <xsl:variable name="font_regional_prefix">
949
+ <xsl:choose>
950
+ <xsl:when test="$font_family_generic = 'Sans'">Noto Sans</xsl:when>
951
+ <xsl:otherwise>Noto Serif</xsl:otherwise>
952
+ </xsl:choose>
953
+ </xsl:variable>
954
+
992
955
  <xsl:attribute name="{local-name()}">
993
- <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
956
+
957
+ <xsl:variable name="font_extended">
958
+ <xsl:choose>
959
+ <xsl:when test="$lang = 'zh'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
960
+ <xsl:when test="$lang = 'hk'"><xsl:value-of select="$font_regional_prefix"/> HK</xsl:when>
961
+ <xsl:when test="$lang = 'jp'"><xsl:value-of select="$font_regional_prefix"/> JP</xsl:when>
962
+ <xsl:when test="$lang = 'kr'"><xsl:value-of select="$font_regional_prefix"/> KR</xsl:when>
963
+ <xsl:when test="$lang = 'sc'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
964
+ <xsl:when test="$lang = 'tc'"><xsl:value-of select="$font_regional_prefix"/> TC</xsl:when>
965
+ </xsl:choose>
966
+ </xsl:variable>
967
+ <xsl:if test="normalize-space($font_extended) != ''">
968
+ <xsl:value-of select="$font_regional_prefix"/><xsl:text>, </xsl:text>
969
+ <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
970
+ </xsl:if>
971
+
972
+ <xsl:value-of select="."/>
973
+
974
+ <xsl:if test="$additional_fonts != ''">
975
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
976
+ </xsl:if>
994
977
  </xsl:attribute>
995
978
  </xsl:when>
996
979
  <xsl:otherwise>
997
980
  <xsl:copy-of select="."/>
998
981
  </xsl:otherwise>
999
982
  </xsl:choose>
983
+
984
+ <!-- <xsl:choose>
985
+ <xsl:when test="local-name() = 'font-family'">
986
+ <xsl:attribute name="{local-name()}">
987
+ <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
988
+ </xsl:attribute>
989
+ </xsl:when>
990
+ <xsl:otherwise>
991
+ <xsl:copy-of select="."/>
992
+ </xsl:otherwise>
993
+ </xsl:choose> -->
1000
994
  </xsl:for-each>
1001
995
  </xsl:template><xsl:attribute-set name="copyright-statement-style">
1002
996
 
@@ -1067,13 +1061,14 @@
1067
1061
 
1068
1062
 
1069
1063
 
1064
+
1070
1065
 
1071
1066
 
1072
1067
 
1073
1068
 
1074
1069
 
1075
1070
 
1076
- <xsl:attribute name="font-family">Courier New</xsl:attribute>
1071
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1077
1072
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
1078
1073
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1079
1074
 
@@ -1085,7 +1080,10 @@
1085
1080
 
1086
1081
  </xsl:attribute-set><xsl:attribute-set name="requirement-style">
1087
1082
 
1083
+
1088
1084
  </xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
1085
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1086
+
1089
1087
 
1090
1088
  </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
1091
1089
 
@@ -1111,6 +1109,7 @@
1111
1109
 
1112
1110
 
1113
1111
 
1112
+
1114
1113
 
1115
1114
  </xsl:attribute-set><xsl:attribute-set name="example-style">
1116
1115
 
@@ -1126,6 +1125,7 @@
1126
1125
 
1127
1126
 
1128
1127
 
1128
+
1129
1129
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1130
1130
 
1131
1131
 
@@ -1145,6 +1145,7 @@
1145
1145
 
1146
1146
 
1147
1147
 
1148
+
1148
1149
 
1149
1150
 
1150
1151
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -1181,10 +1182,12 @@
1181
1182
 
1182
1183
 
1183
1184
 
1185
+
1184
1186
 
1185
1187
 
1186
1188
  </xsl:attribute-set><xsl:variable name="table-border_">
1187
1189
 
1190
+
1188
1191
  </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
1189
1192
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
1190
1193
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -1207,6 +1210,7 @@
1207
1210
 
1208
1211
 
1209
1212
 
1213
+
1210
1214
  <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
1211
1215
  <xsl:attribute name="font-size">8pt</xsl:attribute>
1212
1216
 
@@ -1236,6 +1240,7 @@
1236
1240
 
1237
1241
 
1238
1242
 
1243
+
1239
1244
  <xsl:attribute name="border-top">0.5pt solid black</xsl:attribute>
1240
1245
 
1241
1246
 
@@ -1245,6 +1250,7 @@
1245
1250
 
1246
1251
 
1247
1252
 
1253
+
1248
1254
 
1249
1255
 
1250
1256
 
@@ -1331,6 +1337,7 @@
1331
1337
 
1332
1338
 
1333
1339
 
1340
+
1334
1341
  <xsl:attribute name="display-align">before</xsl:attribute>
1335
1342
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
1336
1343
  <xsl:attribute name="padding-top">2mm</xsl:attribute>
@@ -1352,7 +1359,7 @@
1352
1359
 
1353
1360
 
1354
1361
 
1355
-
1362
+
1356
1363
 
1357
1364
 
1358
1365
 
@@ -1367,6 +1374,7 @@
1367
1374
 
1368
1375
 
1369
1376
 
1377
+
1370
1378
  </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
1371
1379
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1372
1380
 
@@ -1375,6 +1383,8 @@
1375
1383
 
1376
1384
 
1377
1385
 
1386
+
1387
+
1378
1388
  </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
1379
1389
  <xsl:attribute name="font-size">80%</xsl:attribute>
1380
1390
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
@@ -1390,6 +1400,7 @@
1390
1400
 
1391
1401
 
1392
1402
 
1403
+
1393
1404
  <xsl:attribute name="vertical-align">super</xsl:attribute>
1394
1405
 
1395
1406
  </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
@@ -1426,6 +1437,27 @@
1426
1437
 
1427
1438
 
1428
1439
 
1440
+
1441
+ </xsl:attribute-set><xsl:attribute-set name="dl-name-style">
1442
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1443
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1444
+
1445
+
1446
+
1447
+
1448
+
1449
+
1450
+
1451
+
1452
+
1453
+
1454
+
1455
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1456
+
1457
+
1458
+
1459
+
1460
+
1429
1461
  </xsl:attribute-set><xsl:attribute-set name="dd-cell-style">
1430
1462
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
1431
1463
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
@@ -1457,6 +1489,7 @@
1457
1489
 
1458
1490
 
1459
1491
 
1492
+
1460
1493
 
1461
1494
 
1462
1495
 
@@ -1496,7 +1529,8 @@
1496
1529
 
1497
1530
 
1498
1531
 
1499
-
1532
+
1533
+
1500
1534
 
1501
1535
 
1502
1536
 
@@ -1512,6 +1546,7 @@
1512
1546
  </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1513
1547
 
1514
1548
 
1549
+
1515
1550
 
1516
1551
 
1517
1552
 
@@ -1524,6 +1559,8 @@
1524
1559
 
1525
1560
 
1526
1561
 
1562
+ </xsl:attribute-set><xsl:attribute-set name="termnote-p-style">
1563
+
1527
1564
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1528
1565
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
1529
1566
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
@@ -1564,6 +1601,7 @@
1564
1601
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1565
1602
 
1566
1603
 
1604
+
1567
1605
 
1568
1606
 
1569
1607
 
@@ -1608,6 +1646,7 @@
1608
1646
 
1609
1647
 
1610
1648
 
1649
+
1611
1650
  </xsl:attribute-set><xsl:attribute-set name="formula-stem-number-style">
1612
1651
  <xsl:attribute name="text-align">right</xsl:attribute>
1613
1652
 
@@ -1630,17 +1669,16 @@
1630
1669
  </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1631
1670
 
1632
1671
  </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1672
+ <xsl:attribute name="width">100%</xsl:attribute>
1673
+ <xsl:attribute name="content-height">100%</xsl:attribute>
1674
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
1633
1675
 
1634
1676
 
1635
1677
 
1636
- <xsl:attribute name="width">100%</xsl:attribute>
1637
- <xsl:attribute name="content-height">100%</xsl:attribute>
1638
1678
  <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
1639
- <xsl:attribute name="scaling">uniform</xsl:attribute>
1640
1679
 
1641
1680
 
1642
-
1643
-
1681
+
1644
1682
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
1645
1683
 
1646
1684
 
@@ -1718,10 +1756,29 @@
1718
1756
 
1719
1757
 
1720
1758
 
1759
+
1721
1760
  <xsl:attribute name="provisional-distance-between-starts">4mm</xsl:attribute>
1722
1761
  <xsl:attribute name="margin-left">-8mm</xsl:attribute>
1723
1762
 
1724
1763
 
1764
+ </xsl:attribute-set><xsl:attribute-set name="list-name-style">
1765
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1766
+
1767
+
1768
+
1769
+
1770
+
1771
+
1772
+
1773
+
1774
+
1775
+
1776
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1777
+
1778
+
1779
+
1780
+
1781
+
1725
1782
  </xsl:attribute-set><xsl:attribute-set name="list-item-style">
1726
1783
 
1727
1784
 
@@ -1765,6 +1822,7 @@
1765
1822
 
1766
1823
 
1767
1824
 
1825
+
1768
1826
  <xsl:attribute name="font-size">60%</xsl:attribute>
1769
1827
  <xsl:attribute name="vertical-align">super</xsl:attribute>
1770
1828
 
@@ -1791,6 +1849,7 @@
1791
1849
 
1792
1850
 
1793
1851
 
1852
+
1794
1853
  <xsl:attribute name="font-size">9pt</xsl:attribute>
1795
1854
  <xsl:attribute name="text-align">justify</xsl:attribute>
1796
1855
  <xsl:attribute name="line-height">125%</xsl:attribute>
@@ -1815,6 +1874,7 @@
1815
1874
 
1816
1875
 
1817
1876
 
1877
+
1818
1878
  <xsl:attribute name="font-size">60%</xsl:attribute>
1819
1879
  <xsl:attribute name="vertical-align">super</xsl:attribute>
1820
1880
  <xsl:attribute name="padding-right">8mm</xsl:attribute>
@@ -1834,6 +1894,7 @@
1834
1894
 
1835
1895
 
1836
1896
 
1897
+
1837
1898
  <xsl:attribute name="border">0.25pt solid black</xsl:attribute>
1838
1899
  <xsl:attribute name="margin-left">-3mm</xsl:attribute>
1839
1900
  <xsl:attribute name="margin-right">-3mm</xsl:attribute>
@@ -1842,6 +1903,9 @@
1842
1903
 
1843
1904
 
1844
1905
  </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
1906
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1907
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1908
+
1845
1909
 
1846
1910
 
1847
1911
 
@@ -1886,6 +1950,7 @@
1886
1950
 
1887
1951
 
1888
1952
 
1953
+
1889
1954
  <xsl:attribute name="text-align">justify</xsl:attribute>
1890
1955
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1891
1956
  <xsl:attribute name="line-height">122%</xsl:attribute>
@@ -1921,6 +1986,10 @@
1921
1986
 
1922
1987
 
1923
1988
 
1989
+ <!-- <xsl:if test="$namespace = 'ieee'">
1990
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1991
+ <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
1992
+ </xsl:if> -->
1924
1993
 
1925
1994
 
1926
1995
 
@@ -1947,6 +2016,7 @@
1947
2016
 
1948
2017
 
1949
2018
 
2019
+
1950
2020
  </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
1951
2021
 
1952
2022
 
@@ -1973,6 +2043,7 @@
1973
2043
 
1974
2044
 
1975
2045
 
2046
+
1976
2047
  <xsl:attribute name="vertical-align">super</xsl:attribute>
1977
2048
 
1978
2049
  </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
@@ -1993,6 +2064,7 @@
1993
2064
 
1994
2065
 
1995
2066
 
2067
+
1996
2068
  <xsl:attribute name="font-size">60%</xsl:attribute>
1997
2069
  <xsl:attribute name="vertical-align">super</xsl:attribute>
1998
2070
 
@@ -2011,6 +2083,7 @@
2011
2083
 
2012
2084
 
2013
2085
 
2086
+
2014
2087
  </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
2015
2088
 
2016
2089
 
@@ -2122,13 +2195,13 @@
2122
2195
 
2123
2196
  </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">
2124
2197
  <xsl:variable name="nodes_preface_">
2125
- <xsl:for-each select="/*/*[local-name()='preface']/*">
2198
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2126
2199
  <node id="{@id}"/>
2127
2200
  </xsl:for-each>
2128
2201
  </xsl:variable>
2129
2202
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
2130
2203
 
2131
- <xsl:for-each select="/*/*[local-name()='preface']/*">
2204
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2132
2205
  <xsl:sort select="@displayorder" data-type="number"/>
2133
2206
 
2134
2207
  <!-- process Section's title -->
@@ -2194,7 +2267,7 @@
2194
2267
  </xsl:for-each>
2195
2268
  </figures>
2196
2269
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2197
- <xsl:for-each select="/*/*[local-name()='preface']/*">
2270
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2198
2271
  <xsl:sort select="@displayorder" data-type="number"/>
2199
2272
  <xsl:apply-templates select="."/>
2200
2273
  </xsl:for-each>
@@ -2442,6 +2515,8 @@
2442
2515
 
2443
2516
 
2444
2517
 
2518
+
2519
+
2445
2520
 
2446
2521
 
2447
2522
 
@@ -2486,6 +2561,8 @@
2486
2561
 
2487
2562
 
2488
2563
 
2564
+
2565
+
2489
2566
  </xsl:element>
2490
2567
  </xsl:variable>
2491
2568
 
@@ -2628,23 +2705,29 @@
2628
2705
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
2629
2706
  <xsl:param name="continued"/>
2630
2707
  <xsl:if test="normalize-space() != ''">
2631
- <fo:block xsl:use-attribute-sets="table-name-style">
2632
-
2633
-
2634
-
2635
-
2708
+
2709
+
2636
2710
 
2637
- <xsl:choose>
2638
- <xsl:when test="$continued = 'true'">
2711
+ <fo:block xsl:use-attribute-sets="table-name-style">
2712
+
2639
2713
 
2640
- </xsl:when>
2641
- <xsl:otherwise>
2642
- <xsl:apply-templates/>
2643
- </xsl:otherwise>
2644
- </xsl:choose>
2645
-
2714
+
2715
+
2716
+
2717
+ <xsl:choose>
2718
+ <xsl:when test="$continued = 'true'">
2719
+
2720
+ </xsl:when>
2721
+ <xsl:otherwise>
2722
+ <xsl:apply-templates/>
2723
+ </xsl:otherwise>
2724
+ </xsl:choose>
2725
+
2726
+
2727
+ </fo:block>
2728
+
2646
2729
 
2647
- </fo:block>
2730
+
2648
2731
  </xsl:if>
2649
2732
  </xsl:template><xsl:template name="calculate-columns-numbers">
2650
2733
  <xsl:param name="table-row"/>
@@ -2807,8 +2890,9 @@
2807
2890
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2808
2891
  </xsl:if>
2809
2892
  </xsl:template><xsl:template name="calculate-column-widths-autolayout-algorithm">
2810
- <xsl:param name="table"/>
2811
- <xsl:param name="if">false</xsl:param> <!-- via intermediate format -->
2893
+ <xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
2894
+
2895
+ <!-- via intermediate format -->
2812
2896
 
2813
2897
  <!-- The algorithm uses two passes through the table data and scales linearly with the size of the table -->
2814
2898
 
@@ -2819,9 +2903,8 @@
2819
2903
  <!-- get current table id -->
2820
2904
  <xsl:variable name="table_id" select="@id"/>
2821
2905
  <!-- find table by id in the file 'table_widths' -->
2822
- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
2823
- <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/>
2824
-
2906
+ <!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
2907
+ <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
2825
2908
 
2826
2909
  <!-- table='<xsl:copy-of select="$table"/>' -->
2827
2910
  <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
@@ -2829,24 +2912,13 @@
2829
2912
  <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
2830
2913
 
2831
2914
  <xsl:variable name="table_with_cell_widths_">
2832
- <xsl:choose>
2833
- <xsl:when test="$if = 'true' and normalize-space($table-if) != ''"> <!-- if we read column's width from IF and there is table in IF -->
2834
-
2835
- <!-- Example: <column>10</column>
2836
- <column>11</column>
2837
- -->
2838
- <xsl:apply-templates select="$table-if" mode="determine_cell_widths-if"/>
2839
- </xsl:when>
2840
- <xsl:otherwise>
2841
- <xsl:apply-templates select="xalan:nodeset($table)" mode="determine_cell_widths"/>
2842
- </xsl:otherwise>
2843
- </xsl:choose>
2915
+ <xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
2844
2916
  </xsl:variable>
2845
2917
  <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
2846
2918
 
2847
- <xsl:if test="$table_if_debug = 'true'">
2919
+ <!-- <xsl:if test="$table_if_debug = 'true'">
2848
2920
  <xsl:copy-of select="$table_with_cell_widths"/>
2849
- </xsl:if>
2921
+ </xsl:if> -->
2850
2922
 
2851
2923
 
2852
2924
  <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
@@ -2892,8 +2964,12 @@
2892
2964
 
2893
2965
  <xsl:variable name="page_width">
2894
2966
  <xsl:choose>
2895
- <xsl:when test="$if = 'true'"><xsl:value-of select="$table-if/@page-width"/></xsl:when>
2896
- <xsl:otherwise>75</xsl:otherwise>
2967
+ <xsl:when test="$parent_table_page-width != ''">
2968
+ <xsl:value-of select="$parent_table_page-width"/>
2969
+ </xsl:when>
2970
+ <xsl:otherwise>
2971
+ <xsl:value-of select="@page-width"/>
2972
+ </xsl:otherwise>
2897
2973
  </xsl:choose>
2898
2974
  </xsl:variable>
2899
2975
 
@@ -2901,9 +2977,6 @@
2901
2977
  <table_width>
2902
2978
  <xsl:copy-of select="$table_widths"/>
2903
2979
  </table_width>
2904
- <!-- <debug>$table_widths/@width_min=<xsl:value-of select="$table_widths/table/@width_min"/></debug>
2905
- <debug>$table_widths/@width_max=<xsl:value-of select="$table_widths/table/@width_max"/></debug>
2906
- -->
2907
2980
  <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
2908
2981
  </xsl:if>
2909
2982
 
@@ -2914,11 +2987,11 @@
2914
2987
  <xsl:when test="$table_widths/table/@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
2915
2988
  <!-- call old algorithm -->
2916
2989
  <case1/>
2917
- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
2990
+ <!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
2918
2991
  <xsl:call-template name="calculate-column-widths-proportional">
2919
2992
  <xsl:with-param name="cols-count" select="$cols-count"/>
2920
2993
  <xsl:with-param name="table" select="$table"/>
2921
- </xsl:call-template>
2994
+ </xsl:call-template> -->
2922
2995
  </xsl:when>
2923
2996
  <!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
2924
2997
  <xsl:when test="$table_widths/table/@width_max &lt;= $page_width">
@@ -2962,95 +3035,49 @@
2962
3035
  <xsl:otherwise><unknown_case/></xsl:otherwise>
2963
3036
  </xsl:choose>
2964
3037
 
3038
+ </xsl:template><xsl:template name="get-calculated-column-widths-autolayout-algorithm">
2965
3039
 
2966
- </xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths">
2967
- <xsl:copy>
2968
- <xsl:apply-templates select="@*|node()" mode="determine_cell_widths"/>
2969
- </xsl:copy>
2970
- </xsl:template><xsl:template match="td | th" mode="determine_cell_widths">
2971
- <xsl:copy>
2972
- <xsl:copy-of select="@*"/>
3040
+ <!-- if nested 'dl' or 'table' -->
3041
+ <xsl:variable name="parent_table_id" select="normalize-space(ancestor::*[local-name() = 'table' or local-name() = 'dl'][1]/@id)"/>
3042
+ <parent_table_id><xsl:value-of select="$parent_table_id"/></parent_table_id>
2973
3043
 
2974
- <!-- The maximum width is given by the widest line. -->
2975
- <xsl:variable name="widths_max">
2976
- <xsl:for-each select=".//*[local-name() = 'p']">
2977
- <xsl:call-template name="add_width"/>
2978
- </xsl:for-each>
2979
- <xsl:if test="not(*[local-name() = 'p'])">
2980
- <xsl:call-template name="add_width"/>
2981
- </xsl:if>
2982
- </xsl:variable>
2983
- <xsl:variable name="width_max">
2984
- <xsl:for-each select="xalan:nodeset($widths_max)//width">
2985
- <xsl:sort select="." data-type="number" order="descending"/>
2986
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
2987
- </xsl:for-each>
2988
- </xsl:variable>
2989
- <xsl:attribute name="width_max">
2990
- <xsl:value-of select="$width_max"/>
2991
- </xsl:attribute>
3044
+ <parent_element><xsl:value-of select="local-name(..)"/></parent_element>
2992
3045
 
2993
- <!-- The minimum width is given by the widest text element (word, image, etc.) -->
2994
- <!-- To do: image width -->
2995
- <xsl:variable name="td_text">
2996
- <xsl:apply-templates select="." mode="td_text"/>
2997
- </xsl:variable>
2998
- <xsl:variable name="words">
2999
- <xsl:variable name="string_with_added_zerospaces">
3000
- <xsl:call-template name="add-zero-spaces-java">
3001
- <xsl:with-param name="text" select="$td_text"/>
3002
- </xsl:call-template>
3046
+ <xsl:variable name="parent_table_page-width_">
3047
+ <xsl:if test="$parent_table_id != ''">
3048
+ <!-- determine column number in the parent table -->
3049
+ <xsl:variable name="parent_table_column_number">
3050
+ <xsl:choose>
3051
+ <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
3052
+ <xsl:otherwise> <!-- parent is table -->
3053
+ <xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
3054
+ </xsl:otherwise>
3055
+ </xsl:choose>
3003
3056
  </xsl:variable>
3004
- <xsl:call-template name="tokenize">
3005
- <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
3006
- </xsl:call-template>
3007
- </xsl:variable>
3008
-
3009
- <xsl:variable name="max_word_length">
3010
- <xsl:call-template name="max_length">
3011
- <xsl:with-param name="words" select="xalan:nodeset($words)"/>
3012
- </xsl:call-template>
3013
- </xsl:variable>
3014
- <xsl:variable name="width_min">
3015
- <xsl:value-of select="$max_word_length"/>
3016
- </xsl:variable>
3017
- <xsl:attribute name="width_min">
3018
- <xsl:value-of select="$width_min"/>
3019
- </xsl:attribute>
3020
- <!-- width_max="1" width_min="1.5"> --> <!-- see 'tokenize' template, multiply 1.5 for all latin capitals -->
3021
- <xsl:if test="$width_min &gt; $width_max">
3022
- <xsl:attribute name="width_max">
3023
- <xsl:value-of select="$width_min"/>
3024
- </xsl:attribute>
3057
+ <!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
3058
+ <xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
3025
3059
  </xsl:if>
3026
- <xsl:if test="$width_min = 0">
3027
- <xsl:attribute name="width_min">1</xsl:attribute>
3028
- </xsl:if>
3029
-
3030
- <xsl:apply-templates select="node()" mode="determine_cell_widths"/>
3031
-
3032
- </xsl:copy>
3033
- </xsl:template><xsl:template name="add_width">
3034
- <xsl:variable name="p_text"><xsl:apply-templates select="." mode="td_text"/></xsl:variable>
3035
- <xsl:variable name="p_text_len_" select="string-length(normalize-space($p_text))"/>
3036
-
3037
- <xsl:variable name="p_text_len">
3038
- <xsl:choose>
3039
- <xsl:when test="normalize-space(translate($p_text, concat($upper,'0123456789'), '')) = ''"> <!-- english word in CAPITAL letters -->
3040
- <xsl:value-of select="$p_text_len_ * 1.5"/>
3041
- </xsl:when>
3042
- <xsl:otherwise><xsl:value-of select="$p_text_len_"/></xsl:otherwise>
3043
- </xsl:choose>
3044
3060
  </xsl:variable>
3061
+ <xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
3045
3062
 
3046
- <xsl:variable name="math_addon_text">
3047
- <xsl:for-each select=".//*[local-name() = 'math']">
3048
- <xsl:apply-templates mode="td_text"/>
3049
- </xsl:for-each>
3050
- </xsl:variable>
3051
- <xsl:variable name="math_addon_length" select="string-length(normalize-space($math_addon_text)) * 0.2"/> <!-- plus 20% -->
3063
+ <!-- get current table id -->
3064
+ <xsl:variable name="table_id" select="@id"/>
3065
+
3066
+ <xsl:choose>
3067
+ <xsl:when test="$parent_table_id = '' or $parent_table_page-width = ''">
3068
+ <!-- find table by id in the file 'table_widths' and get all `<column>...</column> -->
3069
+ <xsl:copy-of select="$table_widths_from_if_calculated//table[@id = $table_id]/node()"/>
3070
+ </xsl:when>
3071
+ <xsl:otherwise>
3072
+ <!-- recalculate columns width based on parent table width -->
3073
+ <xsl:for-each select="$table_widths_from_if//table[@id = $table_id]">
3074
+ <xsl:call-template name="calculate-column-widths-autolayout-algorithm">
3075
+ <xsl:with-param name="parent_table_page-width" select="$parent_table_page-width"/> <!-- padding-left = 2mm = 50000-->
3076
+ </xsl:call-template>
3077
+ </xsl:for-each>
3078
+ </xsl:otherwise>
3079
+ </xsl:choose>
3052
3080
 
3053
- <width><xsl:value-of select="$p_text_len + $math_addon_length"/></width>
3054
3081
  </xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths-if">
3055
3082
  <xsl:copy>
3056
3083
  <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
@@ -3098,12 +3125,18 @@
3098
3125
  <fo:table-row>
3099
3126
  <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">
3100
3127
 
3101
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
3102
- <xsl:with-param name="continued">true</xsl:with-param>
3103
- </xsl:apply-templates>
3104
3128
 
3105
3129
 
3106
3130
 
3131
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
3132
+ <xsl:with-param name="continued">true</xsl:with-param>
3133
+ </xsl:apply-templates>
3134
+
3135
+
3136
+
3137
+
3138
+
3139
+
3107
3140
  </fo:table-cell>
3108
3141
  </fo:table-row>
3109
3142
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -3143,77 +3176,91 @@
3143
3176
  </xsl:choose>
3144
3177
  </xsl:variable>
3145
3178
 
3146
- <fo:table keep-with-previous="always">
3147
- <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
3148
- <xsl:variable name="name" select="local-name()"/>
3179
+
3180
+ <xsl:variable name="tableWithNotesAndFootnotes">
3181
+
3182
+ <fo:table keep-with-previous="always">
3183
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
3184
+ <xsl:variable name="name" select="local-name()"/>
3185
+ <xsl:choose>
3186
+ <xsl:when test="$name = 'border-top'">
3187
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
3188
+ </xsl:when>
3189
+ <xsl:when test="$name = 'border'">
3190
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3191
+ <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
3192
+ </xsl:when>
3193
+ <xsl:otherwise>
3194
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3195
+ </xsl:otherwise>
3196
+ </xsl:choose>
3197
+ </xsl:for-each>
3198
+
3199
+
3200
+
3149
3201
  <xsl:choose>
3150
- <xsl:when test="$name = 'border-top'">
3151
- <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
3152
- </xsl:when>
3153
- <xsl:when test="$name = 'border'">
3154
- <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3155
- <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
3202
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
3203
+ <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
3204
+ <fo:table-column column-width="{@width}"/>
3205
+ </xsl:for-each>
3156
3206
  </xsl:when>
3157
3207
  <xsl:otherwise>
3158
- <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3208
+ <!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
3209
+ <xsl:call-template name="insertTableColumnWidth">
3210
+ <xsl:with-param name="colwidths" select="$colwidths"/>
3211
+ </xsl:call-template>
3159
3212
  </xsl:otherwise>
3160
3213
  </xsl:choose>
3161
- </xsl:for-each>
3162
-
3163
-
3164
-
3165
- <xsl:choose>
3166
- <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
3167
- <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
3168
- <fo:table-column column-width="{@width}"/>
3169
- </xsl:for-each>
3170
- </xsl:when>
3171
- <xsl:otherwise>
3172
- <!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
3173
- <xsl:call-template name="insertTableColumnWidth">
3174
- <xsl:with-param name="colwidths" select="$colwidths"/>
3175
- </xsl:call-template>
3176
- </xsl:otherwise>
3177
- </xsl:choose>
3178
-
3179
- <fo:table-body>
3180
- <fo:table-row>
3181
- <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
3182
-
3183
-
3214
+
3215
+ <fo:table-body>
3216
+ <fo:table-row>
3217
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
3218
+
3219
+
3184
3220
 
3185
-
3186
-
3187
- <!-- fn will be processed inside 'note' processing -->
3188
-
3189
-
3190
-
3191
-
3192
-
3193
-
3194
- <!-- for BSI (not PAS) display Notes before footnotes -->
3195
-
3196
-
3197
- <!-- except gb and bsi -->
3198
-
3199
- <xsl:apply-templates select="../*[local-name()='note']"/>
3200
3221
 
3201
-
3202
-
3203
- <!-- horizontal row separator -->
3204
-
3205
-
3206
- <!-- fn processing -->
3207
- <xsl:call-template name="table_fn_display"/>
3208
-
3209
- <!-- for PAS display Notes after footnotes -->
3210
-
3211
-
3212
- </fo:table-cell>
3213
- </fo:table-row>
3214
- </fo:table-body>
3215
-
3216
- </fo:table>
3222
+
3223
+ <!-- fn will be processed inside 'note' processing -->
3224
+
3225
+
3226
+
3227
+
3228
+
3229
+
3230
+ <!-- for BSI (not PAS) display Notes before footnotes -->
3231
+
3232
+
3233
+ <!-- except gb and bsi -->
3234
+
3235
+ <xsl:apply-templates select="../*[local-name()='note']"/>
3236
+
3237
+
3238
+
3239
+ <!-- horizontal row separator -->
3240
+
3241
+
3242
+ <!-- fn processing -->
3243
+
3244
+ <xsl:call-template name="table_fn_display"/>
3245
+
3246
+
3247
+
3248
+ <!-- for PAS display Notes after footnotes -->
3249
+
3250
+
3251
+ </fo:table-cell>
3252
+ </fo:table-row>
3253
+ </fo:table-body>
3254
+
3255
+ </fo:table>
3256
+ </xsl:variable>
3257
+
3258
+ <xsl:if test="normalize-space($tableWithNotesAndFootnotes) != ''">
3259
+ <xsl:copy-of select="$tableWithNotesAndFootnotes"/>
3260
+ </xsl:if>
3261
+
3262
+
3263
+
3217
3264
  </xsl:if>
3218
3265
  </xsl:template><xsl:template match="*[local-name()='tbody']">
3219
3266
 
@@ -3302,6 +3349,9 @@
3302
3349
 
3303
3350
 
3304
3351
 
3352
+
3353
+
3354
+
3305
3355
 
3306
3356
 
3307
3357
  <xsl:call-template name="setTableRowAttributes"/>
@@ -3321,6 +3371,8 @@
3321
3371
 
3322
3372
 
3323
3373
 
3374
+
3375
+
3324
3376
  <xsl:call-template name="setTableRowAttributes"/>
3325
3377
  <xsl:apply-templates/>
3326
3378
  </fo:table-row>
@@ -3406,6 +3458,8 @@
3406
3458
 
3407
3459
 
3408
3460
 
3461
+
3462
+
3409
3463
 
3410
3464
 
3411
3465
 
@@ -3481,7 +3535,11 @@
3481
3535
 
3482
3536
  <xsl:variable name="gen_id" select="generate-id(.)"/>
3483
3537
  <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
3484
- <xsl:variable name="reference" select="@reference"/>
3538
+ <xsl:variable name="reference_">
3539
+ <xsl:value-of select="@reference"/>
3540
+ <xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
3541
+ </xsl:variable>
3542
+ <xsl:variable name="reference" select="normalize-space($reference_)"/>
3485
3543
  <!-- fn sequence number in document -->
3486
3544
  <xsl:variable name="current_fn_number">
3487
3545
  <xsl:choose>
@@ -3501,6 +3559,7 @@
3501
3559
  <xsl:variable name="footnote_inline">
3502
3560
  <fo:inline xsl:use-attribute-sets="fn-num-style">
3503
3561
 
3562
+
3504
3563
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
3505
3564
  <xsl:value-of select="$current_fn_number_text"/>
3506
3565
  </fo:basic-link>
@@ -3522,8 +3581,12 @@
3522
3581
  <fo:block xsl:use-attribute-sets="fn-body-style">
3523
3582
 
3524
3583
 
3584
+
3525
3585
  <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
3526
3586
 
3587
+
3588
+
3589
+
3527
3590
  <xsl:value-of select="$current_fn_number_text"/>
3528
3591
  </fo:inline>
3529
3592
  <xsl:apply-templates/>
@@ -3556,7 +3619,7 @@
3556
3619
  <xsl:copy-of select="node()"/>
3557
3620
  </fn>
3558
3621
  </xsl:for-each>
3559
- <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']/*">
3622
+ <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']/*">
3560
3623
  <xsl:sort select="@displayorder" data-type="number"/>
3561
3624
  <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])]">
3562
3625
  <!-- copy unique fn -->
@@ -3836,11 +3899,19 @@
3836
3899
 
3837
3900
 
3838
3901
 
3902
+
3903
+ <xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
3904
+ <xsl:attribute name="margin-top">0</xsl:attribute>
3905
+ </xsl:if>
3906
+
3839
3907
  <fo:block>
3840
3908
 
3841
3909
 
3842
3910
 
3843
3911
 
3912
+ <xsl:apply-templates select="*[local-name() = 'name']">
3913
+ <xsl:with-param name="process">true</xsl:with-param>
3914
+ </xsl:apply-templates>
3844
3915
 
3845
3916
  <xsl:if test="$isGenerateTableIF = 'true'">
3846
3917
  <!-- to determine start of table -->
@@ -3863,6 +3934,7 @@
3863
3934
  </xsl:choose>
3864
3935
 
3865
3936
 
3937
+
3866
3938
  <xsl:choose>
3867
3939
  <xsl:when test="$isGenerateTableIF = 'true'">
3868
3940
  <!-- generate IF for table widths -->
@@ -3991,6 +4063,18 @@
3991
4063
  </xsl:if> <!-- END: a few components -->
3992
4064
  </fo:block-container>
3993
4065
  </fo:block-container>
4066
+
4067
+ <xsl:if test="$isGenerateTableIF = 'true'"> <!-- process nested 'dl' -->
4068
+ <xsl:apply-templates select="*[local-name() = 'dd']/*[local-name() = 'dl']"/>
4069
+ </xsl:if>
4070
+
4071
+ </xsl:template><xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
4072
+ <xsl:param name="process">false</xsl:param>
4073
+ <xsl:if test="$process = 'true'">
4074
+ <fo:block xsl:use-attribute-sets="dl-name-style">
4075
+ <xsl:apply-templates/>
4076
+ </fo:block>
4077
+ </xsl:if>
3994
4078
  </xsl:template><xsl:template name="setColumnWidth_dl">
3995
4079
  <xsl:param name="colwidths"/>
3996
4080
  <xsl:param name="maxlength_dt"/>
@@ -3999,6 +4083,11 @@
3999
4083
  <!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
4000
4084
 
4001
4085
  <xsl:choose>
4086
+ <xsl:when test="xalan:nodeset($colwidths)/autolayout">
4087
+ <xsl:call-template name="insertTableColumnWidth">
4088
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4089
+ </xsl:call-template>
4090
+ </xsl:when>
4002
4091
  <xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
4003
4092
  <fo:table-column column-width="50%"/>
4004
4093
  <fo:table-column column-width="50%"/>
@@ -4251,12 +4340,24 @@
4251
4340
  </td>
4252
4341
  <td>
4253
4342
 
4254
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()"/>
4343
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
4344
+
4345
+ <!-- get paragraphs from nested 'dl' -->
4346
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
4347
+
4255
4348
 
4256
4349
  </td>
4257
4350
  </tr>
4258
4351
 
4259
- </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='em']">
4352
+ </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
4353
+ <xsl:for-each select="*[local-name() = 'dt']">
4354
+ <p>
4355
+ <xsl:copy-of select="node()"/>
4356
+ <xsl:text> </xsl:text>
4357
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'p']/node()"/>
4358
+ </p>
4359
+ </xsl:for-each>
4360
+ </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if_nested"/><xsl:template match="*[local-name()='em']">
4260
4361
  <fo:inline font-style="italic">
4261
4362
  <xsl:apply-templates/>
4262
4363
  </fo:inline>
@@ -4287,7 +4388,7 @@
4287
4388
 
4288
4389
 
4289
4390
 
4290
-
4391
+ <!-- 10 -->
4291
4392
 
4292
4393
 
4293
4394
 
@@ -5159,6 +5260,13 @@
5159
5260
  </xsl:variable>
5160
5261
  <fo:inline xsl:use-attribute-sets="link-style">
5161
5262
 
5263
+ <xsl:if test="starts-with(normalize-space(@target), 'mailto:')">
5264
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5265
+ </xsl:if>
5266
+
5267
+
5268
+
5269
+
5162
5270
 
5163
5271
 
5164
5272
 
@@ -5386,6 +5494,7 @@
5386
5494
 
5387
5495
 
5388
5496
 
5497
+
5389
5498
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
5390
5499
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
5391
5500
  <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
@@ -5407,6 +5516,7 @@
5407
5516
  </xsl:when>
5408
5517
  <xsl:otherwise>
5409
5518
 
5519
+
5410
5520
  <xsl:text>:</xsl:text>
5411
5521
 
5412
5522
 
@@ -5426,6 +5536,7 @@
5426
5536
  </xsl:when>
5427
5537
  <xsl:otherwise>
5428
5538
 
5539
+
5429
5540
 
5430
5541
  <xsl:text> – </xsl:text>
5431
5542
 
@@ -5437,7 +5548,19 @@
5437
5548
  <xsl:value-of select="$suffix"/>
5438
5549
  </xsl:if>
5439
5550
  </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
5440
- <fo:inline><xsl:apply-templates/></fo:inline>
5551
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
5552
+ <xsl:choose>
5553
+ <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
5554
+ <fo:inline xsl:use-attribute-sets="termnote-p-style">
5555
+ <xsl:apply-templates/>
5556
+ </fo:inline>
5557
+ </xsl:when>
5558
+ <xsl:otherwise>
5559
+ <fo:block xsl:use-attribute-sets="termnote-p-style">
5560
+ <xsl:apply-templates/>
5561
+ </fo:block>
5562
+ </xsl:otherwise>
5563
+ </xsl:choose>
5441
5564
  </xsl:template><xsl:template match="*[local-name() = 'terms']">
5442
5565
  <!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
5443
5566
  <fo:block id="{@id}">
@@ -6192,6 +6315,9 @@
6192
6315
  <fo:block xsl:use-attribute-sets="figure-name-style">
6193
6316
 
6194
6317
 
6318
+
6319
+
6320
+
6195
6321
  <xsl:apply-templates/>
6196
6322
  </fo:block>
6197
6323
  </xsl:if>
@@ -6252,9 +6378,9 @@
6252
6378
  <xsl:apply-templates/>
6253
6379
  </xsl:otherwise>
6254
6380
  </xsl:choose>
6255
- </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">
6381
+ </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">
6256
6382
  <xsl:value-of select="."/>
6257
- </xsl:template><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
6383
+ </xsl:template><xsl:template match="*[local-name() = 'review']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
6258
6384
  <xsl:text> </xsl:text>
6259
6385
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
6260
6386
  <xsl:copy>
@@ -6325,9 +6451,12 @@
6325
6451
 
6326
6452
 
6327
6453
 
6454
+ <!-- 9 -->
6328
6455
 
6329
6456
 
6330
-
6457
+ <!-- <xsl:if test="$namespace = 'ieee'">
6458
+ <xsl:if test="$doctype = 'standard' and $stage = 'published'">8</xsl:if>
6459
+ </xsl:if> -->
6331
6460
 
6332
6461
 
6333
6462
 
@@ -6409,7 +6538,7 @@
6409
6538
  <xsl:for-each select="xalan:nodeset($text_step4)/node()">
6410
6539
  <xsl:choose>
6411
6540
  <xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
6412
- <xsl:call-template name="interspers">
6541
+ <xsl:call-template name="interspers-java">
6413
6542
  <xsl:with-param name="str" select="."/>
6414
6543
  </xsl:call-template>
6415
6544
  </xsl:when>
@@ -6459,6 +6588,10 @@
6459
6588
  <xsl:with-param name="char" select="$char"/>
6460
6589
  </xsl:call-template>
6461
6590
  </xsl:if>
6591
+ </xsl:template><xsl:template name="interspers-java">
6592
+ <xsl:param name="str"/>
6593
+ <xsl:param name="char" select="$zero_width_space"/>
6594
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($str),'([^ -.:=_—])',concat('$1', $char))"/> <!-- insert $char after each char excep space, - . : = _ etc. -->
6462
6595
  </xsl:template><xsl:template match="*" mode="syntax_highlight">
6463
6596
  <xsl:apply-templates mode="syntax_highlight"/>
6464
6597
  </xsl:template><xsl:variable name="syntax_highlight_styles_">
@@ -6768,10 +6901,14 @@
6768
6901
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
6769
6902
  <xsl:variable name="element">inline
6770
6903
 
6904
+
6771
6905
  </xsl:variable>
6772
6906
  <xsl:choose>
6773
6907
  <xsl:when test="contains($element, 'block')">
6774
6908
  <fo:block xsl:use-attribute-sets="example-p-style">
6909
+
6910
+
6911
+
6775
6912
  <xsl:apply-templates/>
6776
6913
  </fo:block>
6777
6914
  </xsl:when>
@@ -6879,6 +7016,7 @@
6879
7016
  </xsl:if>
6880
7017
  <fo:block xsl:use-attribute-sets="example-p-style">
6881
7018
 
7019
+
6882
7020
  <xsl:if test="$num = 1">
6883
7021
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
6884
7022
  </xsl:if>
@@ -7039,6 +7177,8 @@
7039
7177
 
7040
7178
 
7041
7179
 
7180
+
7181
+
7042
7182
  <fo:basic-link fox:alt-text="{@citeas}">
7043
7183
  <xsl:if test="normalize-space(@citeas) = ''">
7044
7184
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
@@ -7103,6 +7243,7 @@
7103
7243
 
7104
7244
 
7105
7245
 
7246
+
7106
7247
  <xsl:choose>
7107
7248
  <xsl:when test="ancestor::un:sections and $depth = 1">12</xsl:when>
7108
7249
  <xsl:when test="ancestor::un:sections">8</xsl:when>
@@ -7418,6 +7559,11 @@
7418
7559
  </xsl:otherwise>
7419
7560
  </xsl:choose>
7420
7561
  </xsl:template><xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
7562
+
7563
+ <xsl:apply-templates select="*[local-name() = 'name']">
7564
+ <xsl:with-param name="process">true</xsl:with-param>
7565
+ </xsl:apply-templates>
7566
+
7421
7567
  <fo:list-block xsl:use-attribute-sets="list-style">
7422
7568
 
7423
7569
 
@@ -7428,12 +7574,23 @@
7428
7574
 
7429
7575
 
7430
7576
 
7577
+ <xsl:if test="*[local-name() = 'name']">
7578
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
7579
+ </xsl:if>
7580
+
7431
7581
  <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
7432
7582
  </fo:list-block>
7433
7583
  <!-- <xsl:for-each select="./iho:note">
7434
7584
  <xsl:call-template name="note"/>
7435
7585
  </xsl:for-each> -->
7436
7586
  <xsl:apply-templates select="./*[local-name() = 'note']"/>
7587
+ </xsl:template><xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
7588
+ <xsl:param name="process">false</xsl:param>
7589
+ <xsl:if test="$process = 'true'">
7590
+ <fo:block xsl:use-attribute-sets="list-name-style">
7591
+ <xsl:apply-templates/>
7592
+ </fo:block>
7593
+ </xsl:if>
7437
7594
  </xsl:template><xsl:template match="*[local-name()='li']">
7438
7595
  <fo:list-item xsl:use-attribute-sets="list-item-style">
7439
7596
  <xsl:copy-of select="@id"/>
@@ -7445,6 +7602,8 @@
7445
7602
 
7446
7603
 
7447
7604
 
7605
+
7606
+
7448
7607
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7449
7608
  <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
7450
7609
  <xsl:call-template name="append_add-style"/>
@@ -7700,7 +7859,7 @@
7700
7859
  </fo:block>
7701
7860
 
7702
7861
 
7703
- </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
7862
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
7704
7863
 
7705
7864
 
7706
7865
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
@@ -7711,22 +7870,11 @@
7711
7870
  </xsl:template><xsl:template name="processBibitem">
7712
7871
 
7713
7872
 
7873
+ <!-- start UNECE bibitem processing -->
7714
7874
  <fo:inline padding-right="5mm">[<xsl:value-of select="un:docidentifier"/>]</fo:inline><xsl:value-of select="un:docidentifier"/>
7715
- <xsl:if test="un:title">
7716
- <fo:inline font-style="italic">
7717
- <xsl:text>, </xsl:text>
7718
- <xsl:choose>
7719
- <xsl:when test="un:title[@type = 'main' and @language = 'en']">
7720
- <xsl:apply-templates select="un:title[@type = 'main' and @language = 'en']"/>
7721
- </xsl:when>
7722
- <xsl:otherwise>
7723
- <xsl:apply-templates select="un:title"/>
7724
- </xsl:otherwise>
7725
- </xsl:choose>
7726
- </fo:inline>
7727
- </xsl:if>
7875
+ <xsl:text> </xsl:text>
7728
7876
  <xsl:apply-templates select="un:formattedref"/>
7729
-
7877
+ <!-- END UNECE bibitem processing -->
7730
7878
 
7731
7879
  </xsl:template><xsl:template name="processBibitemDocId">
7732
7880
  <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')]"/>
@@ -8034,12 +8182,16 @@
8034
8182
  <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
8035
8183
 
8036
8184
 
8185
+
8186
+
8037
8187
 
8038
8188
 
8039
8189
 
8040
8190
  <fo:block-container xsl:use-attribute-sets="admonition-container-style">
8041
8191
 
8042
8192
 
8193
+
8194
+
8043
8195
  <fo:block-container margin-left="0mm" margin-right="0mm">
8044
8196
  <fo:block>
8045
8197
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
@@ -8051,25 +8203,32 @@
8051
8203
  </fo:block-container>
8052
8204
 
8053
8205
  </xsl:template><xsl:template name="displayAdmonitionName">
8054
-
8206
+ <xsl:param name="sep"/> <!-- Example: ' - ' -->
8207
+ <!-- <xsl:choose>
8208
+ <xsl:when test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
8209
+ <xsl:choose>
8210
+ <xsl:when test="@type='important'"><xsl:apply-templates select="@type"/></xsl:when>
8211
+ <xsl:otherwise>
8212
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8213
+ </xsl:otherwise>
8214
+ </xsl:choose>
8215
+ </xsl:when>
8216
+ <xsl:otherwise>
8055
8217
  <xsl:apply-templates select="*[local-name() = 'name']"/>
8056
8218
  <xsl:if test="not(*[local-name() = 'name'])">
8057
8219
  <xsl:apply-templates select="@type"/>
8058
8220
  </xsl:if>
8059
-
8060
- </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
8061
- <xsl:apply-templates/>
8062
- </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
8063
- <xsl:variable name="admonition_type_">
8064
- <xsl:call-template name="getLocalizedString">
8065
- <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
8066
- </xsl:call-template>
8221
+ </xsl:otherwise>
8222
+ </xsl:choose> -->
8223
+ <xsl:variable name="name">
8224
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8067
8225
  </xsl:variable>
8068
- <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
8069
- <xsl:value-of select="$admonition_type"/>
8070
- <xsl:if test="$admonition_type = ''">
8071
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
8226
+ <xsl:copy-of select="$name"/>
8227
+ <xsl:if test="normalize-space($name) != ''">
8228
+ <xsl:value-of select="$sep"/>
8072
8229
  </xsl:if>
8230
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
8231
+ <xsl:apply-templates/>
8073
8232
  </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
8074
8233
 
8075
8234
  <fo:block xsl:use-attribute-sets="admonition-p-style">
@@ -8240,6 +8399,8 @@
8240
8399
  </xsl:when>
8241
8400
  <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
8242
8401
  </xsl:choose>
8402
+ </xsl:template><xsl:template match="*[local-name() = 'lang_none']">
8403
+ <fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
8243
8404
  </xsl:template><xsl:template name="printEdition">
8244
8405
  <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
8245
8406
  <xsl:text> </xsl:text>
@@ -8346,6 +8507,27 @@
8346
8507
  </xsl:when>
8347
8508
  <xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
8348
8509
  </xsl:choose>
8510
+ </xsl:template><xsl:template name="getMonthLocalizedByNum">
8511
+ <xsl:param name="num"/>
8512
+ <xsl:variable name="monthStr">
8513
+ <xsl:choose>
8514
+ <xsl:when test="$num = '01'">january</xsl:when>
8515
+ <xsl:when test="$num = '02'">february</xsl:when>
8516
+ <xsl:when test="$num = '03'">march</xsl:when>
8517
+ <xsl:when test="$num = '04'">april</xsl:when>
8518
+ <xsl:when test="$num = '05'">may</xsl:when>
8519
+ <xsl:when test="$num = '06'">june</xsl:when>
8520
+ <xsl:when test="$num = '07'">july</xsl:when>
8521
+ <xsl:when test="$num = '08'">august</xsl:when>
8522
+ <xsl:when test="$num = '09'">september</xsl:when>
8523
+ <xsl:when test="$num = '10'">october</xsl:when>
8524
+ <xsl:when test="$num = '11'">november</xsl:when>
8525
+ <xsl:when test="$num = '12'">december</xsl:when>
8526
+ </xsl:choose>
8527
+ </xsl:variable>
8528
+ <xsl:call-template name="getLocalizedString">
8529
+ <xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param>
8530
+ </xsl:call-template>
8349
8531
  </xsl:template><xsl:template name="insertKeywords">
8350
8532
  <xsl:param name="sorting" select="'true'"/>
8351
8533
  <xsl:param name="charAtEnd" select="'.'"/>
@@ -8417,7 +8599,7 @@
8417
8599
  <dc:description>
8418
8600
  <xsl:variable name="abstract">
8419
8601
 
8420
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
8602
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
8421
8603
 
8422
8604
  </xsl:variable>
8423
8605
  <xsl:value-of select="normalize-space($abstract)"/>
@@ -8539,6 +8721,7 @@
8539
8721
 
8540
8722
 
8541
8723
 
8724
+
8542
8725
  <xsl:value-of select="document('')//*/namespace::un"/>
8543
8726
 
8544
8727