metanorma-cc 2.6.7 → 2.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:csd="https://www.metanorma.org/ns/standoc" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:java="http://xml.apache.org/xalan/java" xmlns:redirect="http://xml.apache.org/xalan/redirect" exclude-result-prefixes="java xalan" extension-element-prefixes="redirect" version="1.0">
1
+ <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:csd="https://www.metanorma.org/ns/standoc" xmlns:mn="https://www.metanorma.org/ns/xslt" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:java="http://xml.apache.org/xalan/java" xmlns:redirect="http://xml.apache.org/xalan/redirect" exclude-result-prefixes="java xalan" extension-element-prefixes="redirect" version="1.0">
2
2
 
3
3
  <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
4
4
 
@@ -20,16 +20,15 @@
20
20
  <xsl:variable name="header" select="/csd:metanorma/csd:bibdata/csd:docidentifier[@type = 'CalConnect']"/>
21
21
 
22
22
  <xsl:variable name="contents_">
23
- <contents>
23
+ <mn:contents>
24
24
  <xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
25
25
  <xsl:call-template name="processMainSectionsDefault_Contents"/>
26
26
  <xsl:call-template name="processTablesFigures_Contents"/>
27
- </contents>
27
+ </mn:contents>
28
28
  </xsl:variable>
29
29
  <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
30
30
 
31
31
  <xsl:template match="/">
32
- <xsl:call-template name="namespaceCheck"/>
33
32
  <fo:root xml:lang="{$lang}">
34
33
  <xsl:variable name="root-style">
35
34
  <root-style xsl:use-attribute-sets="root-style"/>
@@ -379,14 +378,14 @@
379
378
 
380
379
  <xsl:if test="count(*) = 1 and *[local-name() = 'title']"> <!-- if there isn't user ToC -->
381
380
 
382
- <xsl:for-each select="$contents//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
381
+ <xsl:for-each select="$contents//mn:item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
383
382
 
384
383
  <fo:block role="TOCI">
385
384
  <xsl:if test="@level = 1">
386
385
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
387
386
  </xsl:if>
388
387
 
389
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{@section} {title}"> <!-- link at this level needs for PDF structure tags -->
388
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{@section} {mn:title}"> <!-- link at this level needs for PDF structure tags -->
390
389
  <fo:list-block role="SKIP">
391
390
  <xsl:attribute name="provisional-distance-between-starts">
392
391
  <xsl:choose>
@@ -403,8 +402,8 @@
403
402
  </fo:list-item-label>
404
403
  <fo:list-item-body start-indent="body-start()" role="SKIP">
405
404
  <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm" role="SKIP">
406
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}" role="SKIP">
407
- <xsl:apply-templates select="title"/>
405
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{mn:title}" role="SKIP">
406
+ <xsl:apply-templates select="mn:title"/>
408
407
  <fo:inline keep-together.within-line="always" role="SKIP">
409
408
  <fo:leader leader-pattern="dots"/>
410
409
  <fo:inline role="SKIP"><fo:wrapper role="artifact"><fo:page-number-citation ref-id="{@id}"/></fo:wrapper></fo:inline>
@@ -419,21 +418,21 @@
419
418
  </xsl:for-each>
420
419
 
421
420
  <!-- List of Tables -->
422
- <xsl:if test="$contents//tables/table">
421
+ <xsl:if test="$contents//mn:tables/mn:table">
423
422
  <xsl:call-template name="insertListOf_Title">
424
423
  <xsl:with-param name="title" select="$title-list-tables"/>
425
424
  </xsl:call-template>
426
- <xsl:for-each select="$contents//tables/table">
425
+ <xsl:for-each select="$contents//mn:tables/mn:table">
427
426
  <xsl:call-template name="insertListOf_Item"/>
428
427
  </xsl:for-each>
429
428
  </xsl:if>
430
429
 
431
430
  <!-- List of Figures -->
432
- <xsl:if test="$contents//figures/figure">
431
+ <xsl:if test="$contents//mn:figures/mn:figure">
433
432
  <xsl:call-template name="insertListOf_Title">
434
433
  <xsl:with-param name="title" select="$title-list-figures"/>
435
434
  </xsl:call-template>
436
- <xsl:for-each select="$contents//figures/figure">
435
+ <xsl:for-each select="$contents//mn:figures/mn:figure">
437
436
  <xsl:call-template name="insertListOf_Item"/>
438
437
  </xsl:for-each>
439
438
  </xsl:if>
@@ -496,12 +495,12 @@
496
495
  <xsl:call-template name="getName"/>
497
496
  </xsl:variable>
498
497
 
499
- <item id="{@id}" level="{$level}" section="{$section}" display="{$display}">
500
- <title>
498
+ <mn:item id="{@id}" level="{$level}" section="{$section}" display="{$display}">
499
+ <mn:title>
501
500
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
502
- </title>
501
+ </mn:title>
503
502
  <xsl:apply-templates mode="contents"/>
504
- </item>
503
+ </mn:item>
505
504
  </xsl:if>
506
505
 
507
506
  </xsl:template>
@@ -663,34 +662,25 @@
663
662
  </fo:static-content>
664
663
  </xsl:template>
665
664
 
666
- <!-- <xsl:strip-space elements="csd:xref"/> -->
665
+ <!-- https://www.metanorma.org/ns/standoc -->
666
+ <xsl:variable name="namespace_full" select="namespace-uri(//*[local-name() = 'metanorma'][1])"/>
667
667
 
668
- <xsl:variable name="namespace_full_">
669
- <xsl:choose>
670
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
671
- <xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
672
- </xsl:choose>
673
- </xsl:variable>
674
- <xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
668
+ <!-- https://www.metanorma.org/ns/xsl -->
669
+ <xsl:variable name="namespace_mn_xsl">https://www.metanorma.org/ns/xslt</xsl:variable>
675
670
 
676
- <xsl:variable name="root_element_">
677
- <xsl:choose>
678
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
679
- <xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
680
- </xsl:choose>
681
- </xsl:variable>
682
- <xsl:variable name="root_element" select="normalize-space($root_element_)"/>
671
+ <xsl:variable name="root_element">metanorma</xsl:variable>
683
672
 
673
+ <!---examples: 2013, 2024 -->
684
674
  <xsl:variable name="document_scheme" select="normalize-space(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
685
675
 
686
676
  <!-- external parameters -->
687
-
688
677
  <xsl:param name="svg_images"/> <!-- svg images array -->
689
678
  <xsl:variable name="images" select="document($svg_images)"/>
690
679
  <xsl:param name="basepath"/> <!-- base path for images -->
691
680
  <xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
692
681
  <xsl:param name="inputxml_filename"/> <!-- input xml file name -->
693
682
  <xsl:param name="output_path"/> <!-- output PDF file name -->
683
+ <xsl:param name="outputpdf_basepath"/> <!-- output PDF folder -->
694
684
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
695
685
  <xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
696
686
  <xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
@@ -737,20 +727,13 @@
737
727
 
738
728
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
739
729
 
740
- <xsl:variable name="isApplyAutolayoutAlgorithm_">
741
- true
730
+ <!-- don't remove and rename this variable, it's using in mn2pdf tool -->
731
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">true
742
732
  </xsl:variable>
743
733
  <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
744
734
 
745
- <xsl:variable name="isGenerateTableIF_">
746
- <xsl:choose>
747
- <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
748
- <xsl:value-of select="normalize-space($table_if) = 'true'"/>
749
- </xsl:when>
750
- <xsl:otherwise>false</xsl:otherwise>
751
- </xsl:choose>
752
- </xsl:variable>
753
- <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
735
+ <xsl:variable name="isGenerateTableIF"><xsl:value-of select="$table_if"/></xsl:variable>
736
+ <!-- <xsl:variable name="isGenerateTableIF" select="normalize-space(normalize-space($table_if) = 'true' and 1 = 1)"/> -->
754
737
 
755
738
  <xsl:variable name="lang">
756
739
  <xsl:call-template name="getLang"/>
@@ -802,8 +785,7 @@
802
785
  <xsl:variable name="pageWidth_">
803
786
  <xsl:choose>
804
787
  <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
805
- <xsl:otherwise>
806
- 210
788
+ <xsl:otherwise>210
807
789
  </xsl:otherwise>
808
790
  </xsl:choose>
809
791
  </xsl:variable>
@@ -813,8 +795,7 @@
813
795
  <xsl:variable name="pageHeight_">
814
796
  <xsl:choose>
815
797
  <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
816
- <xsl:otherwise>
817
- 297
798
+ <xsl:otherwise>297
818
799
  </xsl:otherwise>
819
800
  </xsl:choose>
820
801
  </xsl:variable>
@@ -823,23 +804,19 @@
823
804
  <!-- Page margins in mm (just digits, without 'mm')-->
824
805
  <!-- marginLeftRight1 and marginLeftRight2 - is left or right margin depends on odd/even page,
825
806
  for example, left margin on odd page and right margin on even page -->
826
- <xsl:variable name="marginLeftRight1_">
827
- 19
807
+ <xsl:variable name="marginLeftRight1_">19
828
808
  </xsl:variable>
829
809
  <xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/>
830
810
 
831
- <xsl:variable name="marginLeftRight2_">
832
- 19
811
+ <xsl:variable name="marginLeftRight2_">19
833
812
  </xsl:variable>
834
813
  <xsl:variable name="marginLeftRight2" select="normalize-space($marginLeftRight2_)"/>
835
814
 
836
- <xsl:variable name="marginTop_">
837
- 20.2
815
+ <xsl:variable name="marginTop_">20.2
838
816
  </xsl:variable>
839
817
  <xsl:variable name="marginTop" select="normalize-space($marginTop_)"/>
840
818
 
841
- <xsl:variable name="marginBottom_">
842
- 20.3
819
+ <xsl:variable name="marginBottom_">20.3
843
820
  </xsl:variable>
844
821
  <xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
845
822
 
@@ -888,13 +865,10 @@
888
865
  <title-toc lang="zh">目次</title-toc>
889
866
 
890
867
  <title-part lang="en">
891
-
892
868
  </title-part>
893
869
  <title-part lang="fr">
894
-
895
870
  </title-part>
896
871
  <title-part lang="ru">
897
-
898
872
  </title-part>
899
873
  <title-part lang="zh">第 # 部分:</title-part>
900
874
 
@@ -990,11 +964,9 @@
990
964
  <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>
991
965
  <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>
992
966
  <xsl:attribute-set name="root-style">
993
-
994
- <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans"/>, STIX Two Math</xsl:attribute>
995
- <xsl:attribute name="font-family-generic">Sans</xsl:attribute>
996
- <xsl:attribute name="font-size">10.5pt</xsl:attribute>
997
-
967
+ <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans"/>, STIX Two Math</xsl:attribute>
968
+ <xsl:attribute name="font-family-generic">Sans</xsl:attribute>
969
+ <xsl:attribute name="font-size">10.5pt</xsl:attribute>
998
970
  </xsl:attribute-set> <!-- root-style -->
999
971
 
1000
972
  <xsl:template name="insertRootStyle">
@@ -1082,28 +1054,22 @@
1082
1054
 
1083
1055
  <!-- Preface sections styles -->
1084
1056
  <xsl:attribute-set name="copyright-statement-style">
1085
-
1086
1057
  </xsl:attribute-set> <!-- copyright-statement-style -->
1087
1058
 
1088
1059
  <xsl:attribute-set name="copyright-statement-title-style">
1089
-
1090
1060
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
1091
1061
 
1092
1062
  <xsl:attribute-set name="copyright-statement-p-style">
1093
-
1094
1063
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
1095
1064
 
1096
1065
  <xsl:attribute-set name="license-statement-style">
1097
-
1098
1066
  </xsl:attribute-set>
1099
1067
 
1100
1068
  <xsl:attribute-set name="license-statement-title-style">
1101
1069
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1102
-
1103
1070
  </xsl:attribute-set> <!-- license-statement-title-style -->
1104
1071
 
1105
1072
  <xsl:attribute-set name="license-statement-p-style">
1106
-
1107
1073
  </xsl:attribute-set> <!-- license-statement-p-style -->
1108
1074
 
1109
1075
  <xsl:attribute-set name="legal-statement-style">
@@ -1112,89 +1078,69 @@
1112
1078
 
1113
1079
  <xsl:attribute-set name="legal-statement-title-style">
1114
1080
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1115
-
1116
1081
  </xsl:attribute-set> <!-- legal-statement-title-style -->
1117
1082
 
1118
1083
  <xsl:attribute-set name="legal-statement-p-style">
1119
-
1120
1084
  </xsl:attribute-set> <!-- legal-statement-p-style -->
1121
1085
 
1122
1086
  <xsl:attribute-set name="feedback-statement-style">
1123
-
1124
1087
  </xsl:attribute-set> <!-- feedback-statement-style -->
1125
1088
 
1126
1089
  <xsl:attribute-set name="feedback-statement-title-style">
1127
1090
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1128
-
1129
1091
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
1130
1092
 
1131
1093
  <xsl:attribute-set name="feedback-statement-p-style">
1132
-
1133
1094
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
1134
1095
 
1135
1096
  <!-- End Preface sections styles -->
1136
1097
 
1137
1098
  <xsl:attribute-set name="link-style">
1138
-
1139
- <xsl:attribute name="color">blue</xsl:attribute>
1140
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1141
-
1099
+ <xsl:attribute name="color">blue</xsl:attribute>
1100
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1142
1101
  </xsl:attribute-set>
1143
1102
 
1144
1103
  <xsl:template name="refine_link-style">
1145
-
1146
1104
  </xsl:template> <!-- refine_link-style -->
1147
1105
 
1148
1106
  <xsl:attribute-set name="sourcecode-container-style">
1149
-
1150
1107
  </xsl:attribute-set>
1151
1108
 
1152
1109
  <xsl:attribute-set name="sourcecode-style">
1153
1110
  <xsl:attribute name="white-space">pre</xsl:attribute>
1154
1111
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
1155
1112
  <xsl:attribute name="role">Code</xsl:attribute>
1156
-
1157
- <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1158
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1159
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1160
-
1113
+ <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1114
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1115
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1161
1116
  </xsl:attribute-set>
1162
1117
 
1163
1118
  <xsl:template name="refine_sourcecode-style">
1164
-
1165
1119
  </xsl:template> <!-- refine_sourcecode-style -->
1166
1120
 
1167
1121
  <xsl:attribute-set name="pre-style">
1168
1122
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1169
1123
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1170
-
1171
- <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1172
-
1124
+ <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1173
1125
  </xsl:attribute-set>
1174
1126
 
1175
1127
  <xsl:attribute-set name="permission-style">
1176
-
1177
1128
  </xsl:attribute-set>
1178
1129
 
1179
1130
  <xsl:attribute-set name="permission-name-style">
1180
-
1181
1131
  </xsl:attribute-set>
1182
1132
 
1183
1133
  <xsl:attribute-set name="permission-label-style">
1184
-
1185
1134
  </xsl:attribute-set>
1186
1135
 
1187
1136
  <xsl:attribute-set name="requirement-style">
1188
-
1189
1137
  </xsl:attribute-set>
1190
1138
 
1191
1139
  <xsl:attribute-set name="requirement-name-style">
1192
1140
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1193
-
1194
1141
  </xsl:attribute-set>
1195
1142
 
1196
1143
  <xsl:attribute-set name="requirement-label-style">
1197
-
1198
1144
  </xsl:attribute-set>
1199
1145
 
1200
1146
  <xsl:attribute-set name="subject-style">
@@ -1222,132 +1168,102 @@
1222
1168
  </xsl:attribute-set>
1223
1169
 
1224
1170
  <xsl:attribute-set name="recommendation-style">
1225
-
1226
1171
  </xsl:attribute-set>
1227
1172
 
1228
1173
  <xsl:attribute-set name="recommendation-name-style">
1229
-
1230
1174
  </xsl:attribute-set>
1231
1175
 
1232
1176
  <xsl:attribute-set name="recommendation-label-style">
1233
-
1234
1177
  </xsl:attribute-set>
1235
1178
 
1236
1179
  <xsl:attribute-set name="termexample-style">
1237
-
1238
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1239
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1240
-
1180
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1181
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1241
1182
  </xsl:attribute-set>
1242
1183
 
1243
1184
  <xsl:template name="refine_termexample-style">
1244
-
1245
1185
  </xsl:template>
1246
1186
 
1247
1187
  <xsl:attribute-set name="example-style">
1248
-
1249
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1250
-
1188
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1251
1189
  </xsl:attribute-set> <!-- example-style -->
1252
1190
 
1253
1191
  <xsl:template name="refine_example-style">
1254
-
1255
1192
  </xsl:template> <!-- refine_example-style -->
1256
1193
 
1257
1194
  <xsl:attribute-set name="example-body-style">
1258
-
1259
- <xsl:attribute name="margin-left">12.5mm</xsl:attribute>
1260
-
1195
+ <xsl:attribute name="margin-left">12.5mm</xsl:attribute>
1261
1196
  </xsl:attribute-set> <!-- example-body-style -->
1262
1197
 
1263
1198
  <xsl:attribute-set name="example-name-style">
1264
-
1265
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1266
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1267
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1268
-
1199
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1200
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1201
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1269
1202
  </xsl:attribute-set> <!-- example-name-style -->
1270
1203
 
1271
1204
  <xsl:template name="refine_example-name-style">
1272
-
1273
1205
  </xsl:template>
1274
1206
 
1275
1207
  <xsl:attribute-set name="example-p-style">
1276
-
1277
- <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1208
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1278
1209
 
1279
1210
  </xsl:attribute-set> <!-- example-p-style -->
1280
1211
 
1281
1212
  <xsl:template name="refine_example-p-style">
1282
-
1283
1213
  </xsl:template> <!-- refine_example-p-style -->
1284
1214
 
1285
1215
  <xsl:attribute-set name="termexample-name-style">
1286
-
1287
- <xsl:attribute name="padding-right">10mm</xsl:attribute>
1288
-
1216
+ <xsl:attribute name="padding-right">10mm</xsl:attribute>
1289
1217
  </xsl:attribute-set> <!-- termexample-name-style -->
1290
1218
 
1291
1219
  <xsl:template name="refine_termexample-name-style">
1292
-
1293
1220
  </xsl:template>
1294
1221
 
1295
1222
  <!-- ========================== -->
1296
1223
  <!-- Table styles -->
1297
1224
  <!-- ========================== -->
1298
1225
  <xsl:variable name="table-border_">
1299
-
1300
1226
  </xsl:variable>
1301
1227
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
1302
1228
 
1303
1229
  <xsl:variable name="table-cell-border_">
1304
-
1305
1230
  </xsl:variable>
1306
1231
  <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
1307
1232
 
1308
1233
  <xsl:attribute-set name="table-container-style">
1309
1234
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
1310
1235
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
1311
-
1312
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1313
-
1236
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1314
1237
  </xsl:attribute-set> <!-- table-container-style -->
1315
1238
 
1316
1239
  <xsl:template name="refine_table-container-style">
1317
1240
  <xsl:param name="margin-side"/>
1318
-
1319
- <xsl:attribute name="margin-left"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
1320
- <xsl:attribute name="margin-right"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
1321
-
1241
+ <xsl:attribute name="margin-left"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
1242
+ <xsl:attribute name="margin-right"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
1322
1243
  <!-- end table block-container attributes -->
1323
1244
  </xsl:template> <!-- refine_table-container-style -->
1324
1245
 
1325
1246
  <xsl:attribute-set name="table-style">
1326
1247
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
1327
1248
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
1328
-
1329
1249
  </xsl:attribute-set><!-- table-style -->
1330
1250
 
1331
1251
  <xsl:template name="refine_table-style">
1332
1252
  <xsl:param name="margin-side"/>
1333
-
1334
- <xsl:if test="$margin-side != 0">
1335
- <xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
1336
- <xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
1337
- </xsl:if>
1253
+ <xsl:if test="$margin-side != 0">
1254
+ <xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
1255
+ <xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
1256
+ </xsl:if>
1338
1257
 
1339
1258
  <xsl:call-template name="setBordersTableArray"/>
1340
-
1341
1259
  </xsl:template> <!-- refine_table-style -->
1342
1260
 
1343
1261
  <xsl:attribute-set name="table-name-style">
1344
1262
  <xsl:attribute name="role">Caption</xsl:attribute>
1345
1263
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1346
-
1347
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1348
- <xsl:attribute name="text-align">center</xsl:attribute>
1349
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1350
-
1264
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1265
+ <xsl:attribute name="text-align">center</xsl:attribute>
1266
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1351
1267
  </xsl:attribute-set> <!-- table-name-style -->
1352
1268
 
1353
1269
  <xsl:template name="refine_table-name-style">
@@ -1355,31 +1271,25 @@
1355
1271
  <xsl:if test="$continued = 'true'">
1356
1272
  <xsl:attribute name="role">SKIP</xsl:attribute>
1357
1273
  </xsl:if>
1358
-
1359
1274
  </xsl:template> <!-- refine_table-name-style -->
1360
1275
 
1361
1276
  <xsl:attribute-set name="table-row-style">
1362
1277
  <xsl:attribute name="min-height">4mm</xsl:attribute>
1363
-
1364
1278
  </xsl:attribute-set>
1365
1279
 
1366
1280
  <xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
1367
1281
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1368
-
1369
1282
  </xsl:attribute-set>
1370
1283
 
1371
1284
  <xsl:template name="refine_table-header-row-style">
1372
1285
 
1373
1286
  <xsl:call-template name="setBordersTableArray"/>
1374
-
1375
1287
  </xsl:template> <!-- refine_table-header-row-style -->
1376
1288
 
1377
1289
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
1378
-
1379
1290
  </xsl:attribute-set>
1380
1291
 
1381
1292
  <xsl:template name="refine_table-footer-row-style">
1382
-
1383
1293
  </xsl:template> <!-- refine_table-footer-row-style -->
1384
1294
 
1385
1295
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
@@ -1389,7 +1299,6 @@
1389
1299
  <xsl:template name="refine_table-body-row-style">
1390
1300
 
1391
1301
  <xsl:call-template name="setBordersTableArray"/>
1392
-
1393
1302
  </xsl:template> <!-- refine_table-body-row-style -->
1394
1303
 
1395
1304
  <xsl:attribute-set name="table-header-cell-style">
@@ -1397,7 +1306,6 @@
1397
1306
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1398
1307
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1399
1308
  <xsl:attribute name="display-align">center</xsl:attribute>
1400
-
1401
1309
  </xsl:attribute-set> <!-- table-header-cell-style -->
1402
1310
 
1403
1311
  <xsl:template name="refine_table-header-cell-style">
@@ -1409,14 +1317,12 @@
1409
1317
  </xsl:if>
1410
1318
 
1411
1319
  <xsl:call-template name="setTableCellAttributes"/>
1412
-
1413
1320
  </xsl:template> <!-- refine_table-header-cell-style -->
1414
1321
 
1415
1322
  <xsl:attribute-set name="table-cell-style">
1416
1323
  <xsl:attribute name="display-align">center</xsl:attribute>
1417
1324
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1418
1325
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1419
-
1420
1326
  </xsl:attribute-set> <!-- table-cell-style -->
1421
1327
 
1422
1328
  <xsl:template name="refine_table-cell-style">
@@ -1425,8 +1331,6 @@
1425
1331
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1426
1332
  </xsl:if>
1427
1333
 
1428
- <!-- bsi -->
1429
-
1430
1334
  <xsl:call-template name="setBordersTableArray"/>
1431
1335
 
1432
1336
  </xsl:template> <!-- refine_table-cell-style -->
@@ -1436,56 +1340,44 @@
1436
1340
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1437
1341
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1438
1342
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
1439
-
1440
1343
  </xsl:attribute-set> <!-- table-footer-cell-style -->
1441
1344
 
1442
1345
  <xsl:template name="refine_table-footer-cell-style">
1443
-
1444
1346
  </xsl:template> <!-- refine_table-footer-cell-style -->
1445
1347
 
1446
1348
  <xsl:attribute-set name="table-note-style">
1447
1349
  <xsl:attribute name="font-size">10pt</xsl:attribute>
1448
1350
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1449
-
1450
1351
  </xsl:attribute-set><!-- table-note-style -->
1451
1352
 
1452
1353
  <xsl:template name="refine_table-note-style">
1453
-
1454
1354
  </xsl:template> <!-- refine_table-note-style -->
1455
1355
 
1456
1356
  <xsl:attribute-set name="table-fn-style">
1457
1357
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1458
-
1459
1358
  </xsl:attribute-set> <!-- table-fn-style -->
1460
1359
 
1461
1360
  <xsl:template name="refine_table-fn-style">
1462
-
1463
1361
  </xsl:template>
1464
1362
 
1465
1363
  <xsl:attribute-set name="table-fn-number-style">
1466
1364
  <!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
1467
-
1468
1365
  </xsl:attribute-set> <!-- table-fn-number-style -->
1469
1366
 
1470
1367
  <xsl:attribute-set name="table-fmt-fn-label-style">
1471
1368
  <xsl:attribute name="font-size">80%</xsl:attribute>
1472
-
1473
- <xsl:attribute name="vertical-align">super</xsl:attribute>
1474
-
1369
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1475
1370
  </xsl:attribute-set> <!-- table-fmt-fn-label-style -->
1476
1371
 
1477
1372
  <xsl:template name="refine_table-fmt-fn-label-style">
1478
-
1479
1373
  </xsl:template>
1480
1374
 
1481
1375
  <xsl:attribute-set name="fn-container-body-style">
1482
1376
  <xsl:attribute name="text-indent">0</xsl:attribute>
1483
1377
  <xsl:attribute name="start-indent">0</xsl:attribute>
1484
-
1485
1378
  </xsl:attribute-set>
1486
1379
 
1487
1380
  <xsl:attribute-set name="table-fn-body-style">
1488
-
1489
1381
  </xsl:attribute-set>
1490
1382
 
1491
1383
  <xsl:attribute-set name="figure-fn-number-style">
@@ -1495,17 +1387,14 @@
1495
1387
  <xsl:attribute-set name="figure-fmt-fn-label-style">
1496
1388
  <xsl:attribute name="font-size">80%</xsl:attribute>
1497
1389
  <xsl:attribute name="vertical-align">super</xsl:attribute>
1498
-
1499
1390
  </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
1500
1391
 
1501
1392
  <xsl:template name="refine_figure-fmt-fn-label-style">
1502
-
1503
1393
  </xsl:template>
1504
1394
 
1505
1395
  <xsl:attribute-set name="figure-fn-body-style">
1506
1396
  <xsl:attribute name="text-align">justify</xsl:attribute>
1507
1397
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1508
-
1509
1398
  </xsl:attribute-set>
1510
1399
  <!-- ========================== -->
1511
1400
  <!-- END Table styles -->
@@ -1516,47 +1405,36 @@
1516
1405
  <!-- ========================== -->
1517
1406
 
1518
1407
  <xsl:attribute-set name="dl-block-style">
1519
-
1520
1408
  </xsl:attribute-set>
1521
1409
 
1522
1410
  <xsl:attribute-set name="dt-row-style">
1523
-
1524
1411
  </xsl:attribute-set>
1525
1412
 
1526
1413
  <xsl:attribute-set name="dt-cell-style">
1527
-
1528
1414
  </xsl:attribute-set>
1529
1415
 
1530
1416
  <xsl:template name="refine_dt-cell-style">
1531
-
1532
1417
  </xsl:template> <!-- refine_dt-cell-style -->
1533
1418
 
1534
1419
  <xsl:attribute-set name="dt-block-style">
1535
1420
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
1536
-
1537
- <xsl:attribute name="margin-left">7mm</xsl:attribute>
1538
-
1421
+ <xsl:attribute name="margin-left">7mm</xsl:attribute>
1539
1422
  </xsl:attribute-set>
1540
1423
 
1541
1424
  <xsl:template name="refine_dt-block-style">
1542
-
1543
1425
  </xsl:template> <!-- refine_dt-block-style -->
1544
1426
 
1545
1427
  <xsl:attribute-set name="dl-name-style">
1546
1428
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1547
1429
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1548
-
1549
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1550
-
1430
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1551
1431
  </xsl:attribute-set> <!-- dl-name-style -->
1552
1432
 
1553
1433
  <xsl:attribute-set name="dd-cell-style">
1554
1434
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
1555
-
1556
1435
  </xsl:attribute-set>
1557
1436
 
1558
1437
  <xsl:template name="refine_dd-cell-style">
1559
-
1560
1438
  </xsl:template> <!-- refine_dd-cell-style -->
1561
1439
 
1562
1440
  <!-- ========================== -->
@@ -1564,241 +1442,181 @@
1564
1442
  <!-- ========================== -->
1565
1443
 
1566
1444
  <xsl:attribute-set name="appendix-style">
1567
-
1568
- <xsl:attribute name="font-size">12pt</xsl:attribute>
1569
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1570
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1571
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1572
-
1445
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
1446
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1447
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1448
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1573
1449
  </xsl:attribute-set>
1574
1450
 
1575
1451
  <xsl:attribute-set name="appendix-example-style">
1576
-
1577
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1578
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
1579
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1580
-
1452
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1453
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1454
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1581
1455
  </xsl:attribute-set>
1582
1456
 
1583
1457
  <xsl:attribute-set name="xref-style">
1584
-
1585
1458
  </xsl:attribute-set>
1586
1459
 
1587
1460
  <xsl:attribute-set name="eref-style">
1588
-
1589
- <xsl:attribute name="color">blue</xsl:attribute>
1590
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1591
-
1461
+ <xsl:attribute name="color">blue</xsl:attribute>
1462
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1592
1463
  </xsl:attribute-set>
1593
1464
 
1594
1465
  <xsl:template name="refine_eref-style">
1595
1466
  <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
1596
1467
  <xsl:variable name="text" select="normalize-space()"/>
1597
-
1598
1468
  </xsl:template> <!-- refine_eref-style -->
1599
1469
 
1600
1470
  <xsl:attribute-set name="note-style">
1601
-
1602
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1603
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1604
-
1471
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1472
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1605
1473
  </xsl:attribute-set>
1606
1474
 
1607
1475
  <xsl:template name="refine_note-style">
1608
-
1609
1476
  </xsl:template>
1610
1477
 
1611
1478
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
1612
1479
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
1613
1480
 
1614
1481
  <xsl:attribute-set name="note-name-style">
1615
-
1616
- <xsl:attribute name="padding-right">6mm</xsl:attribute>
1617
-
1482
+ <xsl:attribute name="padding-right">6mm</xsl:attribute>
1618
1483
  </xsl:attribute-set>
1619
1484
 
1620
1485
  <xsl:template name="refine_note-name-style">
1621
-
1622
1486
  </xsl:template> <!-- refine_note-name-style -->
1623
1487
 
1624
1488
  <xsl:attribute-set name="table-note-name-style">
1625
1489
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
1626
-
1627
1490
  </xsl:attribute-set>
1628
1491
 
1629
1492
  <xsl:template name="refine_table-note-name-style">
1630
-
1631
1493
  </xsl:template> <!-- refine_table-note-name-style -->
1632
1494
 
1633
1495
  <xsl:attribute-set name="note-p-style">
1634
-
1635
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1636
-
1496
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1637
1497
  </xsl:attribute-set>
1638
1498
 
1639
1499
  <xsl:attribute-set name="termnote-style">
1640
-
1641
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1642
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1643
-
1500
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1501
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1644
1502
  </xsl:attribute-set>
1645
1503
 
1646
1504
  <xsl:template name="refine_termnote-style">
1647
-
1648
1505
  </xsl:template> <!-- refine_termnote-style -->
1649
1506
 
1650
1507
  <xsl:attribute-set name="termnote-name-style">
1651
-
1652
1508
  </xsl:attribute-set>
1653
1509
 
1654
1510
  <xsl:template name="refine_termnote-name-style">
1655
-
1656
- <!-- <xsl:if test="$namespace = 'ieee'">
1657
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
1658
- </xsl:if> -->
1659
-
1660
1511
  </xsl:template>
1661
1512
 
1662
1513
  <xsl:attribute-set name="termnote-p-style">
1663
-
1664
1514
  </xsl:attribute-set>
1665
1515
 
1666
1516
  <xsl:attribute-set name="quote-style">
1667
1517
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
1668
1518
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
1669
-
1670
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1671
-
1519
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1672
1520
  </xsl:attribute-set>
1673
1521
 
1674
1522
  <xsl:template name="refine_quote-style">
1675
-
1676
1523
  </xsl:template>
1677
1524
 
1678
1525
  <xsl:attribute-set name="quote-source-style">
1679
1526
  <xsl:attribute name="text-align">right</xsl:attribute>
1680
-
1681
1527
  </xsl:attribute-set>
1682
1528
 
1683
1529
  <xsl:attribute-set name="termsource-style">
1684
-
1685
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1686
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1687
-
1530
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1531
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1688
1532
  </xsl:attribute-set>
1689
1533
 
1690
1534
  <xsl:template name="refine_termsource-style">
1691
-
1692
1535
  </xsl:template> <!-- refine_termsource-style -->
1693
1536
 
1694
1537
  <xsl:attribute-set name="termsource-text-style">
1695
-
1696
1538
  </xsl:attribute-set>
1697
1539
 
1698
1540
  <xsl:attribute-set name="origin-style">
1699
-
1700
1541
  </xsl:attribute-set>
1701
1542
 
1702
1543
  <xsl:attribute-set name="term-style">
1703
-
1704
1544
  </xsl:attribute-set>
1705
1545
 
1706
1546
  <xsl:attribute-set name="term-name-style">
1707
1547
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1708
1548
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1709
-
1710
1549
  </xsl:attribute-set>
1711
1550
 
1712
1551
  <xsl:attribute-set name="figure-block-style">
1713
1552
  <xsl:attribute name="role">SKIP</xsl:attribute>
1714
-
1715
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1716
-
1553
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1717
1554
  </xsl:attribute-set>
1718
1555
 
1719
1556
  <xsl:template name="refine_figure-block-style">
1720
-
1721
1557
  </xsl:template>
1722
1558
 
1723
1559
  <xsl:attribute-set name="figure-style">
1724
-
1725
1560
  </xsl:attribute-set>
1726
1561
 
1727
1562
  <xsl:attribute-set name="figure-name-style">
1728
1563
  <xsl:attribute name="role">Caption</xsl:attribute>
1729
-
1730
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1731
- <xsl:attribute name="text-align">center</xsl:attribute>
1732
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1733
- <xsl:attribute name="space-after">12pt</xsl:attribute>
1734
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1735
-
1564
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1565
+ <xsl:attribute name="text-align">center</xsl:attribute>
1566
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1567
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
1568
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1736
1569
  </xsl:attribute-set>
1737
1570
 
1738
1571
  <xsl:template name="refine_figure-name-style">
1739
-
1740
1572
  </xsl:template> <!-- refine_figure-name-style -->
1741
1573
 
1742
1574
  <xsl:attribute-set name="figure-source-style">
1743
-
1744
1575
  </xsl:attribute-set>
1745
1576
 
1746
1577
  <!-- Formula's styles -->
1747
1578
  <xsl:attribute-set name="formula-style">
1748
1579
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
1749
1580
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1750
-
1751
1581
  </xsl:attribute-set> <!-- formula-style -->
1752
1582
 
1753
1583
  <xsl:attribute-set name="formula-stem-block-style">
1754
1584
  <xsl:attribute name="text-align">center</xsl:attribute>
1755
-
1756
- <xsl:attribute name="text-align">left</xsl:attribute>
1757
- <xsl:attribute name="margin-left">5mm</xsl:attribute>
1758
-
1585
+ <xsl:attribute name="text-align">left</xsl:attribute>
1586
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
1759
1587
  </xsl:attribute-set> <!-- formula-stem-block-style -->
1760
1588
 
1761
1589
  <xsl:template name="refine_formula-stem-block-style">
1762
-
1763
1590
  </xsl:template> <!-- refine_formula-stem-block-style -->
1764
1591
 
1765
1592
  <xsl:attribute-set name="formula-stem-number-style">
1766
1593
  <xsl:attribute name="text-align">right</xsl:attribute>
1767
-
1768
1594
  </xsl:attribute-set> <!-- formula-stem-number-style -->
1769
1595
  <!-- End Formula's styles -->
1770
1596
 
1771
1597
  <xsl:template name="refine_formula-stem-number-style">
1772
-
1773
1598
  </xsl:template>
1774
1599
 
1775
1600
  <xsl:attribute-set name="image-style">
1776
1601
  <xsl:attribute name="role">SKIP</xsl:attribute>
1777
1602
  <xsl:attribute name="text-align">center</xsl:attribute>
1778
-
1779
1603
  </xsl:attribute-set>
1780
1604
 
1781
1605
  <xsl:template name="refine_image-style">
1782
-
1783
1606
  </xsl:template>
1784
1607
 
1785
1608
  <xsl:attribute-set name="figure-pseudocode-p-style">
1786
-
1787
1609
  </xsl:attribute-set>
1788
1610
 
1789
1611
  <xsl:attribute-set name="image-graphic-style">
1790
1612
  <xsl:attribute name="width">100%</xsl:attribute>
1791
1613
  <xsl:attribute name="content-height">100%</xsl:attribute>
1792
1614
  <xsl:attribute name="scaling">uniform</xsl:attribute>
1793
-
1794
- <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
1795
-
1615
+ <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
1796
1616
  </xsl:attribute-set>
1797
1617
 
1798
1618
  <xsl:attribute-set name="tt-style">
1799
-
1800
- <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1801
-
1619
+ <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1802
1620
  </xsl:attribute-set>
1803
1621
 
1804
1622
  <xsl:attribute-set name="sourcecode-name-style">
@@ -1807,54 +1625,43 @@
1807
1625
  <xsl:attribute name="text-align">center</xsl:attribute>
1808
1626
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1809
1627
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1810
-
1811
1628
  </xsl:attribute-set>
1812
1629
 
1813
1630
  <xsl:attribute-set name="preferred-block-style">
1814
-
1815
- <xsl:attribute name="line-height">1.1</xsl:attribute>
1816
-
1631
+ <xsl:attribute name="line-height">1.1</xsl:attribute>
1817
1632
  </xsl:attribute-set>
1818
1633
 
1819
1634
  <xsl:attribute-set name="preferred-term-style">
1820
1635
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1821
1636
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1822
-
1823
1637
  </xsl:attribute-set>
1824
1638
 
1825
1639
  <xsl:attribute-set name="domain-style">
1826
-
1827
1640
  </xsl:attribute-set>
1828
1641
 
1829
1642
  <xsl:attribute-set name="admitted-style">
1830
-
1831
1643
  </xsl:attribute-set>
1832
1644
 
1833
1645
  <xsl:attribute-set name="deprecates-style">
1834
-
1835
1646
  </xsl:attribute-set>
1836
1647
 
1837
1648
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
1838
1649
  </xsl:attribute-set>
1839
1650
 
1840
1651
  <xsl:attribute-set name="definition-style">
1841
-
1842
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1843
-
1652
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1844
1653
  </xsl:attribute-set>
1845
1654
 
1846
1655
  <xsl:variable name="color-added-text">
1847
1656
  <xsl:text>rgb(0, 255, 0)</xsl:text>
1848
1657
  </xsl:variable>
1849
1658
  <xsl:attribute-set name="add-style">
1850
-
1851
- <xsl:attribute name="color">red</xsl:attribute>
1852
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1853
- <!-- <xsl:attribute name="color">black</xsl:attribute>
1659
+ <xsl:attribute name="color">red</xsl:attribute>
1660
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1661
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
1854
1662
  <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1855
1663
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
1856
1664
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1857
-
1858
1665
  </xsl:attribute-set>
1859
1666
 
1860
1667
  <xsl:variable name="add-style">
@@ -1874,57 +1681,43 @@
1874
1681
 
1875
1682
  <xsl:attribute-set name="mathml-style">
1876
1683
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
1877
-
1878
1684
  </xsl:attribute-set>
1879
1685
 
1880
1686
  <xsl:template name="refine_mathml-style">
1881
-
1882
1687
  </xsl:template>
1883
1688
 
1884
1689
  <xsl:attribute-set name="list-style">
1885
-
1886
- <xsl:attribute name="provisional-distance-between-starts">6.5mm</xsl:attribute>
1887
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1888
-
1690
+ <xsl:attribute name="provisional-distance-between-starts">6.5mm</xsl:attribute>
1691
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1889
1692
  </xsl:attribute-set> <!-- list-style -->
1890
1693
 
1891
1694
  <xsl:template name="refine_list-style">
1892
-
1893
- <xsl:if test="ancestor::csd:ol">
1894
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
1895
- </xsl:if>
1896
-
1695
+ <xsl:if test="ancestor::csd:ol">
1696
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
1697
+ </xsl:if>
1897
1698
  </xsl:template> <!-- refine_list-style -->
1898
1699
 
1899
1700
  <xsl:attribute-set name="list-name-style">
1900
1701
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1901
-
1902
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1903
-
1702
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1904
1703
  </xsl:attribute-set> <!-- list-name-style -->
1905
1704
 
1906
1705
  <xsl:attribute-set name="list-item-style">
1907
-
1908
1706
  </xsl:attribute-set>
1909
1707
 
1910
1708
  <xsl:template name="refine_list-item-style">
1911
-
1912
1709
  </xsl:template> <!-- refine_list-item-style -->
1913
1710
 
1914
1711
  <xsl:attribute-set name="list-item-label-style">
1915
-
1916
1712
  </xsl:attribute-set>
1917
1713
 
1918
1714
  <xsl:template name="refine_list-item-label-style">
1919
-
1920
1715
  </xsl:template> <!-- refine_list-item-label-style -->
1921
1716
 
1922
1717
  <xsl:attribute-set name="list-item-body-style">
1923
-
1924
1718
  </xsl:attribute-set>
1925
1719
 
1926
1720
  <xsl:template name="refine_list-item-body-style">
1927
-
1928
1721
  </xsl:template> <!-- refine_list-item-body-style -->
1929
1722
 
1930
1723
  <xsl:attribute-set name="toc-style">
@@ -1938,7 +1731,6 @@
1938
1731
  </xsl:attribute-set>
1939
1732
 
1940
1733
  <xsl:template name="refine_fn-reference-style">
1941
-
1942
1734
  </xsl:template> <!-- refine_fn-reference-style -->
1943
1735
 
1944
1736
  <xsl:attribute-set name="fn-style">
@@ -1947,10 +1739,8 @@
1947
1739
 
1948
1740
  <xsl:attribute-set name="fn-num-style">
1949
1741
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1950
-
1951
- <xsl:attribute name="font-size">65%</xsl:attribute>
1952
- <xsl:attribute name="vertical-align">super</xsl:attribute>
1953
-
1742
+ <xsl:attribute name="font-size">65%</xsl:attribute>
1743
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1954
1744
  </xsl:attribute-set>
1955
1745
 
1956
1746
  <xsl:attribute-set name="fn-body-style">
@@ -1958,112 +1748,84 @@
1958
1748
  <xsl:attribute name="font-style">normal</xsl:attribute>
1959
1749
  <xsl:attribute name="text-indent">0</xsl:attribute>
1960
1750
  <xsl:attribute name="start-indent">0</xsl:attribute>
1961
-
1962
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1963
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1964
-
1751
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1752
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1965
1753
  </xsl:attribute-set>
1966
1754
 
1967
1755
  <xsl:template name="refine_fn-body-style">
1968
-
1969
1756
  </xsl:template> <!-- refine_fn-body-style -->
1970
1757
 
1971
1758
  <xsl:attribute-set name="fn-body-num-style">
1972
1759
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
1973
-
1974
- <xsl:attribute name="font-size">60%</xsl:attribute>
1975
- <xsl:attribute name="vertical-align">super</xsl:attribute>
1976
-
1760
+ <xsl:attribute name="font-size">60%</xsl:attribute>
1761
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1977
1762
  </xsl:attribute-set> <!-- fn-body-num-style -->
1978
1763
 
1979
1764
  <xsl:template name="refine_fn-body-num-style">
1980
-
1981
1765
  </xsl:template> <!-- refine_fn-body-num-style -->
1982
1766
 
1983
1767
  <!-- admonition -->
1984
1768
  <xsl:attribute-set name="admonition-style">
1985
-
1986
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1987
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1988
-
1769
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1770
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1989
1771
  </xsl:attribute-set> <!-- admonition-style -->
1990
1772
 
1991
1773
  <xsl:attribute-set name="admonition-container-style">
1992
1774
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
1993
1775
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
1994
-
1995
1776
  </xsl:attribute-set> <!-- admonition-container-style -->
1996
1777
 
1997
1778
  <xsl:attribute-set name="admonition-name-style">
1998
1779
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1999
-
2000
1780
  </xsl:attribute-set> <!-- admonition-name-style -->
2001
1781
 
2002
1782
  <xsl:attribute-set name="admonition-p-style">
2003
-
2004
1783
  </xsl:attribute-set> <!-- admonition-p-style -->
2005
1784
  <!-- end admonition -->
2006
1785
 
2007
1786
  <!-- bibitem in Normative References (references/@normative="true") -->
2008
1787
  <xsl:attribute-set name="bibitem-normative-style">
2009
-
2010
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2011
-
1788
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2012
1789
  </xsl:attribute-set> <!-- bibitem-normative-style -->
2013
1790
 
2014
1791
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
2015
1792
  <xsl:attribute-set name="bibitem-normative-list-style">
2016
1793
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
2017
1794
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2018
-
2019
- <!-- <xsl:if test="$namespace = 'ieee'">
2020
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2021
- <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
2022
- </xsl:if> -->
2023
-
2024
1795
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
2025
1796
 
2026
1797
  <xsl:attribute-set name="bibitem-non-normative-style">
2027
-
2028
1798
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
2029
1799
 
2030
1800
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
2031
1801
  <xsl:attribute-set name="bibitem-non-normative-list-style">
2032
1802
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
2033
1803
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2034
-
2035
1804
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
2036
1805
 
2037
1806
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
2038
1807
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2039
-
2040
1808
  </xsl:attribute-set>
2041
1809
 
2042
1810
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
2043
1811
  <xsl:attribute-set name="bibitem-normative-list-body-style">
2044
-
2045
1812
  </xsl:attribute-set>
2046
1813
 
2047
1814
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
2048
-
2049
1815
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
2050
1816
 
2051
1817
  <!-- footnote reference number for bibitem, in the text -->
2052
1818
  <xsl:attribute-set name="bibitem-note-fn-style">
2053
1819
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2054
1820
  <xsl:attribute name="font-size">65%</xsl:attribute>
2055
-
2056
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2057
-
1821
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2058
1822
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
2059
1823
 
2060
1824
  <!-- footnote number on the page bottom -->
2061
1825
  <xsl:attribute-set name="bibitem-note-fn-number-style">
2062
1826
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
2063
-
2064
- <xsl:attribute name="font-size">60%</xsl:attribute>
2065
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2066
-
1827
+ <xsl:attribute name="font-size">60%</xsl:attribute>
1828
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2067
1829
  </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
2068
1830
 
2069
1831
  <!-- footnote body (text) on the page bottom -->
@@ -2071,11 +1833,9 @@
2071
1833
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2072
1834
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2073
1835
  <xsl:attribute name="start-indent">0pt</xsl:attribute>
2074
-
2075
1836
  </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
2076
1837
 
2077
1838
  <xsl:attribute-set name="references-non-normative-style">
2078
-
2079
1839
  </xsl:attribute-set> <!-- references-non-normative-style -->
2080
1840
 
2081
1841
  <!-- Highlight.js syntax GitHub styles -->
@@ -2235,12 +1995,10 @@
2235
1995
  <!-- Index section styles -->
2236
1996
  <xsl:attribute-set name="indexsect-title-style">
2237
1997
  <xsl:attribute name="role">H1</xsl:attribute>
2238
-
2239
1998
  </xsl:attribute-set>
2240
1999
 
2241
2000
  <xsl:attribute-set name="indexsect-clause-title-style">
2242
2001
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2243
-
2244
2002
  </xsl:attribute-set>
2245
2003
 
2246
2004
  <!-- End Index section styles -->
@@ -2317,47 +2075,47 @@
2317
2075
  </xsl:template>
2318
2076
 
2319
2077
  <xsl:template name="processTables_Contents">
2320
- <tables>
2078
+ <mn:tables>
2321
2079
  <xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
2322
2080
  <xsl:choose>
2323
2081
  <xsl:when test="*[local-name() = 'fmt-name']">
2324
2082
  <xsl:variable name="fmt_name">
2325
2083
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
2326
2084
  </xsl:variable>
2327
- <table id="{@id}" alt-text="{normalize-space($fmt_name)}">
2085
+ <mn:table id="{@id}" alt-text="{normalize-space($fmt_name)}">
2328
2086
  <xsl:copy-of select="$fmt_name"/>
2329
- </table>
2087
+ </mn:table>
2330
2088
  </xsl:when>
2331
2089
  <xsl:otherwise>
2332
- <table id="{@id}" alt-text="{*[local-name() = 'name']}">
2090
+ <mn:table id="{@id}" alt-text="{*[local-name() = 'name']}">
2333
2091
  <xsl:copy-of select="*[local-name() = 'name']"/>
2334
- </table>
2092
+ </mn:table>
2335
2093
  </xsl:otherwise>
2336
2094
  </xsl:choose>
2337
2095
  </xsl:for-each>
2338
- </tables>
2096
+ </mn:tables>
2339
2097
  </xsl:template>
2340
2098
 
2341
2099
  <xsl:template name="processFigures_Contents">
2342
- <figures>
2100
+ <mn:figures>
2343
2101
  <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(*[local-name() = 'name'], 'Figure ') and normalize-space(@id) != '']">
2344
2102
  <xsl:choose>
2345
2103
  <xsl:when test="*[local-name() = 'fmt-name']">
2346
2104
  <xsl:variable name="fmt_name">
2347
2105
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
2348
2106
  </xsl:variable>
2349
- <figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
2107
+ <mn:figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
2350
2108
  <xsl:copy-of select="$fmt_name"/>
2351
- </figure>
2109
+ </mn:figure>
2352
2110
  </xsl:when>
2353
2111
  <xsl:otherwise>
2354
- <figure id="{@id}" alt-text="{*[local-name() = 'name']}">
2112
+ <mn:figure id="{@id}" alt-text="{*[local-name() = 'name']}">
2355
2113
  <xsl:copy-of select="*[local-name() = 'name']"/>
2356
- </figure>
2114
+ </mn:figure>
2357
2115
  </xsl:otherwise>
2358
2116
  </xsl:choose>
2359
2117
  </xsl:for-each>
2360
- </figures>
2118
+ </mn:figures>
2361
2119
  </xsl:template>
2362
2120
 
2363
2121
  <xsl:template name="processPrefaceSectionsDefault">
@@ -2376,7 +2134,6 @@
2376
2134
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2377
2135
  <xsl:sort select="@displayorder" data-type="number"/>
2378
2136
  <xsl:apply-templates select="."/>
2379
-
2380
2137
  </xsl:for-each>
2381
2138
 
2382
2139
  <xsl:for-each select="/*/*[local-name()='annex']">
@@ -2483,7 +2240,6 @@
2483
2240
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2484
2241
  <xsl:sort select="@displayorder" data-type="number"/>
2485
2242
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2486
-
2487
2243
  </xsl:for-each>
2488
2244
  </xsl:element>
2489
2245
  </xsl:element>
@@ -2617,7 +2373,6 @@
2617
2373
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak">
2618
2374
  <xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
2619
2375
  </xsl:apply-templates>
2620
-
2621
2376
  </xsl:for-each>
2622
2377
  </xsl:element>
2623
2378
 
@@ -2657,19 +2412,17 @@
2657
2412
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
2658
2413
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
2659
2414
  <xsl:template match="text()" name="text">
2660
-
2661
- <xsl:choose>
2662
- <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
2663
- <xsl:otherwise>
2664
- <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
2665
- <xsl:call-template name="replace_fo_inline_tags">
2666
- <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
2667
- <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
2668
- <xsl:with-param name="text" select="$text"/>
2669
- </xsl:call-template>
2670
- </xsl:otherwise>
2671
- </xsl:choose>
2672
-
2415
+ <xsl:choose>
2416
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
2417
+ <xsl:otherwise>
2418
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
2419
+ <xsl:call-template name="replace_fo_inline_tags">
2420
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
2421
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
2422
+ <xsl:with-param name="text" select="$text"/>
2423
+ </xsl:call-template>
2424
+ </xsl:otherwise>
2425
+ </xsl:choose>
2673
2426
  </xsl:template>
2674
2427
 
2675
2428
  <xsl:template name="replace_fo_inline_tags">
@@ -2723,7 +2476,7 @@
2723
2476
  <xsl:with-param name="keep_sep">true</xsl:with-param>
2724
2477
  </xsl:call-template>
2725
2478
  </xsl:variable>
2726
- <xsl:for-each select="xalan:nodeset($items)/item">
2479
+ <xsl:for-each select="xalan:nodeset($items)/mn:item">
2727
2480
  <xsl:choose>
2728
2481
  <xsl:when test=". = $sep">
2729
2482
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
@@ -2752,17 +2505,13 @@
2752
2505
  </xsl:template> <!-- copyright-statement -->
2753
2506
 
2754
2507
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
2755
-
2756
- <!-- process in the template 'title' -->
2757
- <xsl:call-template name="title"/>
2758
-
2508
+ <!-- process in the template 'title' -->
2509
+ <xsl:call-template name="title"/>
2759
2510
  </xsl:template> <!-- copyright-statement//title -->
2760
2511
 
2761
2512
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
2762
-
2763
- <!-- process in the template 'paragraph' -->
2764
- <xsl:call-template name="paragraph"/>
2765
-
2513
+ <!-- process in the template 'paragraph' -->
2514
+ <xsl:call-template name="paragraph"/>
2766
2515
  </xsl:template> <!-- copyright-statement//p -->
2767
2516
 
2768
2517
  <xsl:template match="*[local-name()='license-statement']">
@@ -2772,42 +2521,34 @@
2772
2521
  </xsl:template> <!-- license-statement -->
2773
2522
 
2774
2523
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
2775
-
2776
- <!-- process in the template 'title' -->
2777
- <xsl:call-template name="title"/>
2778
-
2524
+ <!-- process in the template 'title' -->
2525
+ <xsl:call-template name="title"/>
2779
2526
  </xsl:template> <!-- license-statement/title -->
2780
2527
 
2781
2528
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
2782
-
2783
- <!-- process in the template 'paragraph' -->
2784
- <xsl:call-template name="paragraph"/>
2785
-
2529
+ <!-- process in the template 'paragraph' -->
2530
+ <xsl:call-template name="paragraph"/>
2786
2531
  </xsl:template> <!-- license-statement/p -->
2787
2532
 
2788
2533
  <xsl:template match="*[local-name()='legal-statement']">
2789
2534
  <xsl:param name="isLegacy">false</xsl:param>
2790
2535
  <fo:block xsl:use-attribute-sets="legal-statement-style">
2791
-
2792
2536
  <xsl:apply-templates/>
2793
2537
  </fo:block>
2794
2538
  </xsl:template> <!-- legal-statement -->
2795
2539
 
2796
2540
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
2797
-
2798
- <!-- process in the template 'title' -->
2799
- <xsl:call-template name="title"/>
2541
+ <!-- process in the template 'title' -->
2542
+ <xsl:call-template name="title"/>
2800
2543
 
2801
2544
  </xsl:template> <!-- legal-statement/title -->
2802
2545
 
2803
2546
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
2804
2547
  <xsl:param name="margin"/>
2805
-
2806
- <!-- process in the template 'paragraph' -->
2807
- <xsl:call-template name="paragraph">
2808
- <xsl:with-param name="margin" select="$margin"/>
2809
- </xsl:call-template>
2810
-
2548
+ <!-- process in the template 'paragraph' -->
2549
+ <xsl:call-template name="paragraph">
2550
+ <xsl:with-param name="margin" select="$margin"/>
2551
+ </xsl:call-template>
2811
2552
  </xsl:template> <!-- legal-statement/p -->
2812
2553
 
2813
2554
  <xsl:template match="*[local-name()='feedback-statement']">
@@ -2817,20 +2558,16 @@
2817
2558
  </xsl:template> <!-- feedback-statement -->
2818
2559
 
2819
2560
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
2820
-
2821
- <!-- process in the template 'title' -->
2822
- <xsl:call-template name="title"/>
2823
-
2561
+ <!-- process in the template 'title' -->
2562
+ <xsl:call-template name="title"/>
2824
2563
  </xsl:template>
2825
2564
 
2826
2565
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
2827
2566
  <xsl:param name="margin"/>
2828
-
2829
- <!-- process in the template 'paragraph' -->
2830
- <xsl:call-template name="paragraph">
2831
- <xsl:with-param name="margin" select="$margin"/>
2832
- </xsl:call-template>
2833
-
2567
+ <!-- process in the template 'paragraph' -->
2568
+ <xsl:call-template name="paragraph">
2569
+ <xsl:with-param name="margin" select="$margin"/>
2570
+ </xsl:call-template>
2834
2571
  </xsl:template>
2835
2572
 
2836
2573
  <!-- ================================= -->
@@ -2883,7 +2620,6 @@
2883
2620
  <xsl:template match="*[local-name()='table']" name="table">
2884
2621
 
2885
2622
  <xsl:variable name="table-preamble">
2886
-
2887
2623
  </xsl:variable>
2888
2624
 
2889
2625
  <xsl:variable name="table">
@@ -2901,10 +2637,8 @@
2901
2637
 
2902
2638
  <!-- Display table's name before table as standalone block -->
2903
2639
  <!-- $namespace = 'iso' or -->
2904
-
2905
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
2906
-
2907
- <xsl:call-template name="table_name_fn_display"/>
2640
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
2641
+ <xsl:call-template name="table_name_fn_display"/>
2908
2642
 
2909
2643
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
2910
2644
 
@@ -2957,8 +2691,7 @@
2957
2691
 
2958
2692
  <xsl:variable name="table_width_default">100%</xsl:variable>
2959
2693
  <xsl:variable name="table_width">
2960
- <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
2961
- <xsl:value-of select="$table_width_default"/>
2694
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) --><xsl:value-of select="$table_width_default"/>
2962
2695
  </xsl:variable>
2963
2696
 
2964
2697
  <xsl:variable name="table_attributes">
@@ -3098,30 +2831,28 @@
3098
2831
  <xsl:variable name="isDeleted" select="@deleted"/>
3099
2832
 
3100
2833
  <xsl:choose>
3101
- <xsl:when test="@width and @width != 'full-page-width' and @width != 'text-width'">
3102
-
3103
- <!-- centered table when table name is centered (see table-name-style) -->
3104
-
3105
- <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
3106
-
3107
- <fo:table-column column-width="proportional-column-width(1)"/>
3108
- <fo:table-column column-width="{@width}"/>
3109
- <fo:table-column column-width="proportional-column-width(1)"/>
3110
- <fo:table-body role="SKIP">
3111
- <fo:table-row role="SKIP">
3112
- <fo:table-cell column-number="2" role="SKIP">
3113
- <xsl:copy-of select="$table-preamble"/>
3114
- <fo:block role="SKIP">
3115
- <xsl:call-template name="setTrackChangesStyles">
3116
- <xsl:with-param name="isAdded" select="$isAdded"/>
3117
- <xsl:with-param name="isDeleted" select="$isDeleted"/>
3118
- </xsl:call-template>
3119
- <xsl:copy-of select="$table"/>
3120
- </fo:block>
3121
- </fo:table-cell>
3122
- </fo:table-row>
3123
- </fo:table-body>
3124
- </fo:table>
2834
+ <xsl:when test="@width and @width != 'full-page-width' and @width != 'text-width'">
2835
+
2836
+ <!-- centered table when table name is centered (see table-name-style) -->
2837
+ <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
2838
+ <fo:table-column column-width="proportional-column-width(1)"/>
2839
+ <fo:table-column column-width="{@width}"/>
2840
+ <fo:table-column column-width="proportional-column-width(1)"/>
2841
+ <fo:table-body role="SKIP">
2842
+ <fo:table-row role="SKIP">
2843
+ <fo:table-cell column-number="2" role="SKIP">
2844
+ <xsl:copy-of select="$table-preamble"/>
2845
+ <fo:block role="SKIP">
2846
+ <xsl:call-template name="setTrackChangesStyles">
2847
+ <xsl:with-param name="isAdded" select="$isAdded"/>
2848
+ <xsl:with-param name="isDeleted" select="$isDeleted"/>
2849
+ </xsl:call-template>
2850
+ <xsl:copy-of select="$table"/>
2851
+ </fo:block>
2852
+ </fo:table-cell>
2853
+ </fo:table-row>
2854
+ </fo:table-body>
2855
+ </fo:table>
3125
2856
 
3126
2857
  </xsl:when>
3127
2858
  <xsl:otherwise>
@@ -3147,7 +2878,6 @@
3147
2878
  </xsl:template>
3148
2879
 
3149
2880
  <xsl:template name="setBordersTableArray">
3150
-
3151
2881
  </xsl:template>
3152
2882
 
3153
2883
  <!-- table/name-->
@@ -3156,51 +2886,50 @@
3156
2886
  <xsl:param name="cols-count"/>
3157
2887
  <xsl:if test="normalize-space() != ''">
3158
2888
 
3159
- <fo:block xsl:use-attribute-sets="table-name-style">
2889
+ <fo:block xsl:use-attribute-sets="table-name-style">
3160
2890
 
3161
- <xsl:call-template name="refine_table-name-style">
3162
- <xsl:with-param name="continued" select="$continued"/>
3163
- </xsl:call-template>
3164
-
3165
- <xsl:choose>
3166
- <xsl:when test="$continued = 'true'">
2891
+ <xsl:call-template name="refine_table-name-style">
2892
+ <xsl:with-param name="continued" select="$continued"/>
2893
+ </xsl:call-template>
3167
2894
 
3168
- </xsl:when>
3169
- <xsl:otherwise>
3170
- <xsl:apply-templates/>
3171
- </xsl:otherwise>
3172
- </xsl:choose>
2895
+ <xsl:choose>
2896
+ <xsl:when test="$continued = 'true'">
2897
+ </xsl:when>
2898
+ <xsl:otherwise>
2899
+ <xsl:apply-templates/>
2900
+ </xsl:otherwise>
2901
+ </xsl:choose>
3173
2902
 
3174
- </fo:block>
2903
+ </fo:block>
3175
2904
 
3176
- <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
3177
- <xsl:if test="$continued = 'true'">
2905
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
2906
+ <xsl:if test="$continued = 'true'">
3178
2907
 
3179
- <!-- to prevent the error 'THead element may contain only TR elements' -->
2908
+ <!-- to prevent the error 'THead element may contain only TR elements' -->
3180
2909
 
3181
- <xsl:choose>
3182
- <xsl:when test="string(number($cols-count)) != 'NaN'">
3183
- <fo:table width="100%" table-layout="fixed" role="SKIP">
3184
- <fo:table-body role="SKIP">
3185
- <fo:table-row>
3186
- <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
3187
- <fo:block text-align="right" role="SKIP">
3188
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
3189
- </fo:block>
3190
- </fo:table-cell>
3191
- </fo:table-row>
3192
- </fo:table-body>
3193
- </fo:table>
3194
- </xsl:when>
3195
- <xsl:otherwise>
3196
- <fo:block text-align="right">
3197
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
3198
- </fo:block>
3199
- </xsl:otherwise>
3200
- </xsl:choose>
2910
+ <xsl:choose>
2911
+ <xsl:when test="string(number($cols-count)) != 'NaN'">
2912
+ <fo:table width="100%" table-layout="fixed" role="SKIP">
2913
+ <fo:table-body role="SKIP">
2914
+ <fo:table-row>
2915
+ <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
2916
+ <fo:block text-align="right" role="SKIP">
2917
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
2918
+ </fo:block>
2919
+ </fo:table-cell>
2920
+ </fo:table-row>
2921
+ </fo:table-body>
2922
+ </fo:table>
2923
+ </xsl:when>
2924
+ <xsl:otherwise>
2925
+ <fo:block text-align="right">
2926
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
2927
+ </fo:block>
2928
+ </xsl:otherwise>
2929
+ </xsl:choose>
3201
2930
 
3202
- </xsl:if>
3203
- <!-- </xsl:if> -->
2931
+ </xsl:if>
2932
+ <!-- </xsl:if> -->
3204
2933
 
3205
2934
  </xsl:if>
3206
2935
  </xsl:template> <!-- table/name -->
@@ -3575,7 +3304,6 @@
3575
3304
  <xsl:template match="*[local-name()='thead']">
3576
3305
  <xsl:param name="cols-count"/>
3577
3306
  <fo:table-header>
3578
-
3579
3307
  <xsl:apply-templates/>
3580
3308
  </fo:table-header>
3581
3309
  </xsl:template> <!-- thead -->
@@ -3589,21 +3317,20 @@
3589
3317
 
3590
3318
  <xsl:call-template name="refine_table-header-title-style"/>
3591
3319
 
3592
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
3593
- <xsl:with-param name="continued">true</xsl:with-param>
3594
- <xsl:with-param name="cols-count" select="$cols-count"/>
3595
- </xsl:apply-templates>
3320
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
3321
+ <xsl:with-param name="continued">true</xsl:with-param>
3322
+ <xsl:with-param name="cols-count" select="$cols-count"/>
3323
+ </xsl:apply-templates>
3596
3324
 
3597
- <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
3598
- <fo:block role="SKIP"/>
3599
- </xsl:if>
3325
+ <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
3326
+ <fo:block role="SKIP"/>
3327
+ </xsl:if>
3600
3328
 
3601
3329
  </fo:table-cell>
3602
3330
  </fo:table-row>
3603
3331
  </xsl:template> <!-- table-header-title -->
3604
3332
 
3605
3333
  <xsl:template name="refine_table-header-title-style">
3606
-
3607
3334
  </xsl:template> <!-- refine_table-header-title-style -->
3608
3335
 
3609
3336
  <xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -3633,7 +3360,6 @@
3633
3360
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3634
3361
 
3635
3362
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
3636
-
3637
3363
  </xsl:variable>
3638
3364
 
3639
3365
  <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
@@ -3695,26 +3421,19 @@
3695
3421
  <xsl:call-template name="setBordersTableArray"/>
3696
3422
 
3697
3423
  <!-- fn will be processed inside 'note' processing -->
3698
-
3699
- <!-- for BSI (not PAS) display Notes before footnotes -->
3700
-
3701
- <!-- except gb and bsi -->
3702
-
3703
- <xsl:apply-templates select="../*[local-name()='p']"/>
3704
- <xsl:apply-templates select="../*[local-name()='dl']"/>
3705
- <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
3706
- <xsl:apply-templates select="../*[local-name()='example']"/>
3707
- <xsl:apply-templates select="../*[local-name()='source']"/>
3424
+ <xsl:apply-templates select="../*[local-name()='p']"/>
3425
+ <xsl:apply-templates select="../*[local-name()='dl']"/>
3426
+ <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
3427
+ <xsl:apply-templates select="../*[local-name()='example']"/>
3428
+ <xsl:apply-templates select="../*[local-name()='source']"/>
3708
3429
 
3709
3430
  <xsl:variable name="isDisplayRowSeparator">
3710
-
3711
3431
  </xsl:variable>
3712
3432
 
3713
3433
  <!-- horizontal row separator -->
3714
3434
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
3715
3435
  <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
3716
3436
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
3717
-
3718
3437
  <xsl:call-template name="setBordersTableArray"/>
3719
3438
  <fo:block font-size="1pt"> </fo:block>
3720
3439
  </fo:block-container>
@@ -3722,11 +3441,8 @@
3722
3441
  </xsl:if>
3723
3442
 
3724
3443
  <!-- fn processing -->
3725
-
3726
- <!-- <xsl:call-template name="table_fn_display" /> -->
3727
- <xsl:copy-of select="$table_fn_block"/>
3728
-
3729
- <!-- for PAS display Notes after footnotes -->
3444
+ <!-- <xsl:call-template name="table_fn_display" /> -->
3445
+ <xsl:copy-of select="$table_fn_block"/>
3730
3446
 
3731
3447
  </fo:table-cell>
3732
3448
  </fo:table-row>
@@ -3853,7 +3569,7 @@
3853
3569
  <xsl:with-param name="pText" select="$border_under_row_"/>
3854
3570
  </xsl:call-template>
3855
3571
  </xsl:variable>
3856
- <xsl:if test="xalan:nodeset($border_under_row)/item[. = normalize-space($row_num)]">
3572
+ <xsl:if test="xalan:nodeset($border_under_row)/mn:item[. = normalize-space($row_num)]">
3857
3573
  <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
3858
3574
  </xsl:if>
3859
3575
  </xsl:when>
@@ -3970,7 +3686,7 @@
3970
3686
  </xsl:variable>
3971
3687
  <xsl:variable name="quot">"</xsl:variable>
3972
3688
  <xsl:variable name="styles_">
3973
- <xsl:for-each select="xalan:nodeset($styles__)/item">
3689
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
3974
3690
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
3975
3691
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
3976
3692
  <xsl:if test="$key = 'color' or $key = 'background-color' or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
@@ -4020,9 +3736,7 @@
4020
3736
  <fo:block role="SKIP">
4021
3737
 
4022
3738
  <xsl:if test="$isGenerateTableIF = 'true'">
4023
-
4024
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
4025
-
3739
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
4026
3740
  </xsl:if>
4027
3741
 
4028
3742
  <xsl:apply-templates/>
@@ -4037,25 +3751,23 @@
4037
3751
 
4038
3752
  <!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
4039
3753
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name() = 'example']" priority="2">
3754
+ <xsl:call-template name="setNamedDestination"/>
3755
+ <fo:block xsl:use-attribute-sets="table-note-style">
3756
+ <xsl:copy-of select="@id"/>
4040
3757
 
4041
- <xsl:call-template name="setNamedDestination"/>
4042
- <fo:block xsl:use-attribute-sets="table-note-style">
4043
- <xsl:copy-of select="@id"/>
4044
-
4045
- <xsl:call-template name="refine_table-note-style"/>
4046
-
4047
- <!-- Table's note/example name (NOTE, for example) -->
4048
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
3758
+ <xsl:call-template name="refine_table-note-style"/>
4049
3759
 
4050
- <xsl:call-template name="refine_table-note-name-style"/>
3760
+ <!-- Table's note/example name (NOTE, for example) -->
3761
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
4051
3762
 
4052
- <xsl:apply-templates select="*[local-name() = 'name']"/>
3763
+ <xsl:call-template name="refine_table-note-name-style"/>
4053
3764
 
4054
- </fo:inline>
3765
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4055
3766
 
4056
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4057
- </fo:block>
3767
+ </fo:inline>
4058
3768
 
3769
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3770
+ </fo:block>
4059
3771
  </xsl:template> <!-- table/note -->
4060
3772
 
4061
3773
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
@@ -4100,9 +3812,7 @@
4100
3812
  <xsl:variable name="current_fn_number" select="@reference"/>
4101
3813
 
4102
3814
  <xsl:variable name="current_fn_number_text">
4103
-
4104
- <xsl:value-of select="$current_fn_number"/>
4105
-
3815
+ <xsl:value-of select="$current_fn_number"/>
4106
3816
  </xsl:variable>
4107
3817
 
4108
3818
  <xsl:variable name="ref_id" select="@target"/>
@@ -4114,12 +3824,10 @@
4114
3824
  <xsl:choose>
4115
3825
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
4116
3826
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
4117
-
4118
3827
  </fn_styles>
4119
3828
  </xsl:when>
4120
3829
  <xsl:otherwise>
4121
3830
  <fn_styles xsl:use-attribute-sets="fn-num-style">
4122
-
4123
3831
  </fn_styles>
4124
3832
  </xsl:otherwise>
4125
3833
  </xsl:choose>
@@ -4137,7 +3845,6 @@
4137
3845
  <xsl:with-param name="element">
4138
3846
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
4139
3847
  <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
4140
-
4141
3848
  <xsl:copy-of select="$current_fn_number_text"/>
4142
3849
 
4143
3850
  </fo:inline>
@@ -4175,10 +3882,9 @@
4175
3882
  <here><xsl:copy-of select="$footnotes"/></here> -->
4176
3883
  <xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
4177
3884
  </xsl:variable>
4178
-
4179
- <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
4180
- <xsl:copy-of select="$fn_block"/>
4181
- </fo:block>
3885
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
3886
+ <xsl:copy-of select="$fn_block"/>
3887
+ </fo:block>
4182
3888
 
4183
3889
  </fo:block-container>
4184
3890
  </fo:footnote-body>
@@ -4255,21 +3961,20 @@
4255
3961
  <xsl:variable name="reference" select="@reference"/>
4256
3962
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
4257
3963
  <xsl:for-each select="..//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
3964
+ <fo:block xsl:use-attribute-sets="table-fn-style">
3965
+ <xsl:copy-of select="@id"/>
3966
+ <xsl:call-template name="refine_table-fn-style"/>
4258
3967
 
4259
- <fo:block xsl:use-attribute-sets="table-fn-style">
4260
- <xsl:copy-of select="@id"/>
4261
- <xsl:call-template name="refine_table-fn-style"/>
4262
-
4263
- <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
4264
- <xsl:with-param name="process">true</xsl:with-param>
4265
- </xsl:apply-templates>
3968
+ <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
3969
+ <xsl:with-param name="process">true</xsl:with-param>
3970
+ </xsl:apply-templates>
4266
3971
 
4267
- <fo:inline xsl:use-attribute-sets="table-fn-body-style">
4268
- <!-- <xsl:copy-of select="./node()"/> -->
4269
- <xsl:apply-templates/>
4270
- </fo:inline>
3972
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
3973
+ <!-- <xsl:copy-of select="./node()"/> -->
3974
+ <xsl:apply-templates/>
3975
+ </fo:inline>
4271
3976
 
4272
- </fo:block>
3977
+ </fo:block>
4273
3978
 
4274
3979
  <!-- </xsl:if> -->
4275
3980
  </xsl:for-each>
@@ -4322,7 +4027,6 @@
4322
4027
  <xsl:param name="process">false</xsl:param>
4323
4028
  <xsl:if test="$process = 'true'">
4324
4029
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
4325
-
4326
4030
  </xsl:if>
4327
4031
  </xsl:template>
4328
4032
 
@@ -4406,7 +4110,6 @@
4406
4110
  <xsl:if test="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
4407
4111
 
4408
4112
  <xsl:variable name="key_iso">
4409
-
4410
4113
  </xsl:variable>
4411
4114
 
4412
4115
  <fo:block>
@@ -4452,7 +4155,6 @@
4452
4155
  <fo:table width="95%" table-layout="fixed">
4453
4156
  <xsl:if test="normalize-space($key_iso) = 'true'">
4454
4157
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4455
-
4456
4158
  </xsl:if>
4457
4159
  <xsl:choose>
4458
4160
  <!-- if there 'dl', then set same columns width -->
@@ -4476,23 +4178,19 @@
4476
4178
  <fo:table-row>
4477
4179
  <fo:table-cell>
4478
4180
  <fo:block>
4479
-
4480
- <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
4481
- <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
4482
- <!-- <xsl:value-of select="@reference"/> -->
4483
- <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
4484
- </fo:inline>
4181
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
4182
+ <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
4183
+ <!-- <xsl:value-of select="@reference"/> -->
4184
+ <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
4185
+ </fo:inline>
4485
4186
 
4486
4187
  </fo:block>
4487
4188
  </fo:table-cell>
4488
4189
  <fo:table-cell>
4489
4190
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
4490
4191
  <xsl:if test="normalize-space($key_iso) = 'true'">
4491
-
4492
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
4493
-
4192
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
4494
4193
  </xsl:if>
4495
-
4496
4194
  <!-- <xsl:copy-of select="./node()"/> -->
4497
4195
  <xsl:apply-templates/>
4498
4196
  </fo:block>
@@ -4542,11 +4240,9 @@
4542
4240
  <!-- figure/dl[@key = 'true']/dt/p/sup -->
4543
4241
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'dl'][@key = 'true']/*[local-name() = 'dt']/ *[local-name() = 'p'][count(node()[normalize-space() != '']) = 1]/*[local-name() = 'sup']" priority="3">
4544
4242
  <xsl:variable name="key_iso">
4545
-
4546
4243
  </xsl:variable>
4547
4244
  <xsl:if test="normalize-space($key_iso) = 'true'">
4548
4245
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4549
-
4550
4246
  </xsl:if>
4551
4247
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
4552
4248
  <!-- <xsl:value-of select="@reference"/> -->
@@ -4592,8 +4288,7 @@
4592
4288
  <xsl:text>※</xsl:text>
4593
4289
  </xsl:if> -->
4594
4290
  <!-- <xsl:value-of select="@reference"/> -->
4595
-
4596
- <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
4291
+ <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
4597
4292
 
4598
4293
  <!-- <xsl:if test="$namespace = 'bsi'">
4599
4294
  <xsl:text>)</xsl:text>
@@ -4665,10 +4360,9 @@
4665
4360
  </xsl:if>
4666
4361
 
4667
4362
  <xsl:call-template name="setBlockSpanAll"/>
4668
-
4669
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
4670
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
4671
- </xsl:if>
4363
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
4364
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
4365
+ </xsl:if>
4672
4366
 
4673
4367
  <xsl:if test="ancestor::*[local-name() = 'sourcecode']">
4674
4368
  <!-- set font-size as sourcecode font-size -->
@@ -4689,7 +4383,6 @@
4689
4383
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
4690
4384
  </xsl:choose>
4691
4385
  </xsl:attribute>
4692
-
4693
4386
  </xsl:if>
4694
4387
 
4695
4388
  <xsl:call-template name="setTrackChangesStyles">
@@ -4698,37 +4391,32 @@
4698
4391
  </xsl:call-template>
4699
4392
 
4700
4393
  <fo:block-container margin-left="0mm" role="SKIP">
4701
-
4702
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
4394
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
4703
4395
 
4704
4396
  <xsl:variable name="parent" select="local-name(..)"/>
4705
4397
 
4706
- <xsl:variable name="key_iso">
4707
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
4398
+ <xsl:variable name="key_iso"> <!-- and (not(../@class) or ../@class !='pseudocode') -->
4708
4399
  </xsl:variable>
4709
4400
 
4710
4401
  <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(*[local-name()='dt']) = 1)"/>
4711
4402
 
4712
4403
  <xsl:choose>
4713
4404
  <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
4714
-
4715
- <fo:block margin-bottom="12pt" text-align="left">
4716
-
4717
- <!-- <xsl:variable name="title-where">
4405
+ <fo:block margin-bottom="12pt" text-align="left">
4406
+ <!-- <xsl:variable name="title-where">
4718
4407
  <xsl:call-template name="getLocalizedString">
4719
4408
  <xsl:with-param name="key">where</xsl:with-param>
4720
4409
  </xsl:call-template>
4721
4410
  </xsl:variable>
4722
4411
  <xsl:value-of select="$title-where"/> -->
4723
- <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
4724
- <xsl:text> </xsl:text>
4725
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
4726
- <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
4727
- <xsl:text> </xsl:text>
4728
- </xsl:if>
4729
- <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
4730
- </fo:block>
4731
-
4412
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
4413
+ <xsl:text> </xsl:text>
4414
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
4415
+ <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
4416
+ <xsl:text> </xsl:text>
4417
+ </xsl:if>
4418
+ <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
4419
+ </fo:block>
4732
4420
  </xsl:when> <!-- END: only one component -->
4733
4421
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
4734
4422
  <fo:block margin-bottom="12pt" text-align="left">
@@ -4748,19 +4436,17 @@
4748
4436
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
4749
4437
  <!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
4750
4438
  <xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
4439
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
4751
4440
 
4752
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
4753
-
4754
- <xsl:call-template name="refine_figure_key_style"/>
4755
-
4756
- <xsl:variable name="title-key">
4757
- <xsl:call-template name="getLocalizedString">
4758
- <xsl:with-param name="key">key</xsl:with-param>
4759
- </xsl:call-template>
4760
- </xsl:variable>
4761
- <xsl:value-of select="$title-key"/>
4762
- </fo:block>
4441
+ <xsl:call-template name="refine_figure_key_style"/>
4763
4442
 
4443
+ <xsl:variable name="title-key">
4444
+ <xsl:call-template name="getLocalizedString">
4445
+ <xsl:with-param name="key">key</xsl:with-param>
4446
+ </xsl:call-template>
4447
+ </xsl:variable>
4448
+ <xsl:value-of select="$title-key"/>
4449
+ </fo:block>
4764
4450
  </xsl:if>
4765
4451
  </xsl:when> <!-- END: definition list in a figure -->
4766
4452
  </xsl:choose>
@@ -4793,12 +4479,10 @@
4793
4479
  <xsl:if test="$isGenerateTableIF = 'true'">
4794
4480
  <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
4795
4481
  </xsl:if>
4796
-
4797
4482
  <xsl:choose>
4798
4483
  <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
4799
4484
  <xsl:when test="normalize-space($key_iso) = 'true'">
4800
4485
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4801
-
4802
4486
  </xsl:when>
4803
4487
  </xsl:choose>
4804
4488
 
@@ -4903,17 +4587,15 @@
4903
4587
  <xsl:call-template name="getMaxLength_dt"/>
4904
4588
  </xsl:variable>
4905
4589
 
4906
- <xsl:variable name="isContainsKeepTogetherTag_">
4907
- false
4590
+ <xsl:variable name="isContainsKeepTogetherTag_">false
4908
4591
  </xsl:variable>
4909
4592
  <xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
4910
4593
  <!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
4911
-
4912
- <xsl:call-template name="setColumnWidth_dl">
4913
- <xsl:with-param name="colwidths" select="$colwidths"/>
4914
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
4915
- <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
4916
- </xsl:call-template>
4594
+ <xsl:call-template name="setColumnWidth_dl">
4595
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4596
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
4597
+ <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
4598
+ </xsl:call-template>
4917
4599
 
4918
4600
  <fo:table-body>
4919
4601
 
@@ -4964,21 +4646,17 @@
4964
4646
  </xsl:template>
4965
4647
 
4966
4648
  <xsl:template name="refine_dl_formula_where_style">
4967
-
4968
4649
  </xsl:template> <!-- refine_dl_formula_where_style -->
4969
4650
 
4970
4651
  <xsl:template name="refine_figure_key_style">
4971
-
4972
4652
  </xsl:template> <!-- refine_figure_key_style -->
4973
4653
 
4974
4654
  <xsl:template name="refine_multicomponent_style">
4975
4655
  <xsl:variable name="parent" select="local-name(..)"/>
4976
-
4977
4656
  </xsl:template> <!-- refine_multicomponent_style -->
4978
4657
 
4979
4658
  <xsl:template name="refine_multicomponent_block_style">
4980
4659
  <xsl:variable name="parent" select="local-name(..)"/>
4981
-
4982
4660
  </xsl:template> <!-- refine_multicomponent_block_style -->
4983
4661
 
4984
4662
  <!-- ignore 'p' with 'where' in formula, before 'dl' -->
@@ -5165,14 +4843,11 @@
5165
4843
  <xsl:attribute name="id">
5166
4844
  <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
5167
4845
  </xsl:attribute>
5168
-
5169
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
5170
- <xsl:with-param name="process">true</xsl:with-param>
5171
- </xsl:apply-templates>
5172
-
4846
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
4847
+ <xsl:with-param name="process">true</xsl:with-param>
4848
+ </xsl:apply-templates>
5173
4849
  </td>
5174
4850
  </tr>
5175
-
5176
4851
  </xsl:template>
5177
4852
 
5178
4853
  <!-- Definition's term -->
@@ -5181,7 +4856,6 @@
5181
4856
  <xsl:param name="split_keep-within-line"/>
5182
4857
 
5183
4858
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
5184
-
5185
4859
  <xsl:call-template name="insert_dt_cell">
5186
4860
  <xsl:with-param name="key_iso" select="$key_iso"/>
5187
4861
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -5203,7 +4877,6 @@
5203
4877
  <!-- border is mandatory, to calculate real width -->
5204
4878
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
5205
4879
  <xsl:attribute name="text-align">left</xsl:attribute>
5206
-
5207
4880
  </xsl:if>
5208
4881
 
5209
4882
  <xsl:call-template name="refine_dt-cell-style"/>
@@ -5213,9 +4886,7 @@
5213
4886
 
5214
4887
  <xsl:choose>
5215
4888
  <xsl:when test="$isGenerateTableIF = 'true'">
5216
-
5217
- <xsl:copy-of select="@id"/>
5218
-
4889
+ <xsl:copy-of select="@id"/>
5219
4890
  </xsl:when>
5220
4891
  <xsl:otherwise>
5221
4892
  <xsl:copy-of select="@id"/>
@@ -5252,9 +4923,7 @@
5252
4923
  <fo:block role="SKIP">
5253
4924
 
5254
4925
  <xsl:if test="$isGenerateTableIF = 'true'">
5255
-
5256
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
5257
-
4926
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
5258
4927
  </xsl:if>
5259
4928
 
5260
4929
  <xsl:choose>
@@ -5402,7 +5071,6 @@
5402
5071
  </xsl:template>
5403
5072
 
5404
5073
  <xsl:template name="refine_italic_style">
5405
-
5406
5074
  </xsl:template>
5407
5075
 
5408
5076
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
@@ -5418,7 +5086,6 @@
5418
5086
  </xsl:template>
5419
5087
 
5420
5088
  <xsl:template name="refine_strong_style">
5421
-
5422
5089
  <xsl:if test="ancestor::*['preferred']">
5423
5090
  <xsl:attribute name="role">SKIP</xsl:attribute>
5424
5091
  </xsl:if>
@@ -5443,13 +5110,7 @@
5443
5110
  <xsl:template match="*[local-name()='tt']">
5444
5111
  <fo:inline xsl:use-attribute-sets="tt-style">
5445
5112
 
5446
- <xsl:variable name="_font-size">
5447
-
5448
- 10
5449
-
5450
-
5451
- <!-- inherit -->
5452
-
5113
+ <xsl:variable name="_font-size">10 <!-- inherit -->
5453
5114
  </xsl:variable>
5454
5115
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
5455
5116
  <xsl:if test="$font-size != ''">
@@ -5665,8 +5326,7 @@
5665
5326
  </xsl:otherwise>
5666
5327
  </xsl:choose>
5667
5328
  </xsl:variable>
5668
- <xsl:variable name="ratio_">
5669
- 0.75
5329
+ <xsl:variable name="ratio_">0.75
5670
5330
  </xsl:variable>
5671
5331
  <xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
5672
5332
  <fo:inline font-size="{$ratio * 100}%" role="SKIP">
@@ -5756,7 +5416,7 @@
5756
5416
 
5757
5417
  <xsl:variable name="quot">"</xsl:variable>
5758
5418
  <xsl:variable name="styles_">
5759
- <xsl:for-each select="xalan:nodeset($styles__)/item">
5419
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
5760
5420
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
5761
5421
  <xsl:variable name="value_" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
5762
5422
  <xsl:variable name="value">
@@ -5768,7 +5428,7 @@
5768
5428
  </xsl:otherwise>
5769
5429
  </xsl:choose>
5770
5430
  </xsl:variable>
5771
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
5431
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
5772
5432
  <style name="{$key}"><xsl:value-of select="$value"/></style>
5773
5433
  </xsl:if>
5774
5434
  <xsl:if test="$key = 'text-indent'">
@@ -5782,7 +5442,6 @@
5782
5442
  <fo:inline>
5783
5443
  <xsl:for-each select="$styles/style">
5784
5444
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
5785
-
5786
5445
  </xsl:for-each>
5787
5446
  <xsl:apply-templates/>
5788
5447
  </fo:inline>
@@ -6769,10 +6428,9 @@
6769
6428
  <xsl:variable name="mathml_content">
6770
6429
  <xsl:apply-templates select="." mode="mathml_actual_text"/>
6771
6430
  </xsl:variable>
6772
-
6773
- <xsl:call-template name="mathml_instream_object">
6774
- <xsl:with-param name="mathml_content" select="$mathml_content"/>
6775
- </xsl:call-template>
6431
+ <xsl:call-template name="mathml_instream_object">
6432
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
6433
+ </xsl:call-template>
6776
6434
 
6777
6435
  </fo:inline>
6778
6436
  </xsl:template>
@@ -6806,7 +6464,6 @@
6806
6464
  <xsl:template name="getMathml_asciimath_text">
6807
6465
  <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
6808
6466
  <xsl:variable name="latexmath">
6809
-
6810
6467
  </xsl:variable>
6811
6468
  <xsl:variable name="asciimath_text_following">
6812
6469
  <xsl:choose>
@@ -6879,7 +6536,6 @@
6879
6536
  </xsl:template>
6880
6537
 
6881
6538
  <xsl:template name="refine_mathml_insteam_object_style">
6882
-
6883
6539
  </xsl:template> <!-- refine_mathml_insteam_object_style -->
6884
6540
 
6885
6541
  <xsl:template match="mathml:*" mode="mathml_actual_text">
@@ -7277,7 +6933,6 @@
7277
6933
  <xsl:variable name="annotation-id" select="@id"/>
7278
6934
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
7279
6935
  <fo:block id="{$annotation-id}" white-space="nowrap">
7280
-
7281
6936
  <fo:inline>
7282
6937
  <xsl:apply-templates>
7283
6938
  <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
@@ -7306,7 +6961,6 @@
7306
6961
  <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
7307
6962
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7308
6963
  </xsl:if>
7309
-
7310
6964
  <xsl:if test="parent::*[local-name() = 'add']">
7311
6965
  <xsl:call-template name="append_add-style"/>
7312
6966
  </xsl:if>
@@ -7317,8 +6971,7 @@
7317
6971
  </xsl:template>
7318
6972
 
7319
6973
  <!-- command between two xref points to non-standard bibitem -->
7320
- <xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]">
7321
- <xsl:value-of select="."/>
6974
+ <xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]"><xsl:value-of select="."/>
7322
6975
  </xsl:template>
7323
6976
 
7324
6977
  <!-- ====== -->
@@ -7333,7 +6986,6 @@
7333
6986
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
7334
6987
  </xsl:choose>
7335
6988
  </xsl:attribute>
7336
-
7337
6989
  </xsl:if>
7338
6990
  <fo:block-container margin-left="0mm" role="SKIP">
7339
6991
  <xsl:call-template name="setNamedDestination"/>
@@ -7423,53 +7075,49 @@
7423
7075
 
7424
7076
  <xsl:template match="*[local-name() = 'note']" name="note">
7425
7077
 
7426
- <xsl:call-template name="setNamedDestination"/>
7427
-
7428
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7429
-
7430
- <xsl:call-template name="setBlockSpanAll"/>
7431
-
7432
- <xsl:call-template name="refine_note-style"/>
7078
+ <xsl:call-template name="setNamedDestination"/>
7433
7079
 
7434
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7080
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7435
7081
 
7436
- <fo:block>
7082
+ <xsl:call-template name="setBlockSpanAll"/>
7437
7083
 
7438
- <xsl:call-template name="refine_note_block_style"/>
7084
+ <xsl:call-template name="refine_note-style"/>
7439
7085
 
7440
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7086
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7087
+ <fo:block>
7441
7088
 
7442
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
7089
+ <xsl:call-template name="refine_note_block_style"/>
7443
7090
 
7444
- <xsl:call-template name="refine_note-name-style"/>
7091
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7445
7092
 
7446
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7447
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7448
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
7449
- <xsl:call-template name="append_add-style"/>
7450
- </xsl:if>
7093
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
7451
7094
 
7452
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
7453
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7454
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7455
- <xsl:with-param name="skip">false</xsl:with-param>
7456
- </xsl:apply-templates>
7457
- </xsl:if>
7095
+ <xsl:call-template name="refine_note-name-style"/>
7458
7096
 
7459
- <xsl:apply-templates select="*[local-name() = 'name']"/>
7097
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7098
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7099
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
7100
+ <xsl:call-template name="append_add-style"/>
7101
+ </xsl:if>
7460
7102
 
7461
- </fo:inline>
7103
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
7104
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7105
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7106
+ <xsl:with-param name="skip">false</xsl:with-param>
7107
+ </xsl:apply-templates>
7108
+ </xsl:if>
7462
7109
 
7463
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7464
- </fo:block>
7110
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
7465
7111
 
7466
- </fo:block-container>
7467
- </fo:block-container>
7112
+ </fo:inline>
7468
7113
 
7114
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7115
+ </fo:block>
7116
+ </fo:block-container>
7117
+ </fo:block-container>
7469
7118
  </xsl:template>
7470
7119
 
7471
7120
  <xsl:template name="refine_note_block_style">
7472
-
7473
7121
  </xsl:template> <!-- refine_note_block_style -->
7474
7122
 
7475
7123
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
@@ -7522,7 +7170,6 @@
7522
7170
  <xsl:value-of select="$sfx"/>
7523
7171
  </xsl:when>
7524
7172
  <xsl:otherwise>
7525
-
7526
7173
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
7527
7174
  <!-- <xsl:if test="$namespace = 'ieee'">
7528
7175
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -7530,7 +7177,6 @@
7530
7177
  <!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
7531
7178
  <xsl:text>:</xsl:text>
7532
7179
  </xsl:if> -->
7533
-
7534
7180
  <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
7535
7181
  <xsl:text> – </xsl:text> en dash &#x2013;
7536
7182
  </xsl:if> -->
@@ -7551,7 +7197,6 @@
7551
7197
  <xsl:value-of select="$sfx"/>
7552
7198
  </xsl:when>
7553
7199
  <xsl:otherwise>
7554
-
7555
7200
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
7556
7201
  <!-- <xsl:if test="$namespace = 'ieee'">
7557
7202
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -7607,7 +7252,6 @@
7607
7252
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
7608
7253
 
7609
7254
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
7610
-
7611
7255
  </xsl:if>
7612
7256
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7613
7257
  </fo:block>
@@ -7647,8 +7291,7 @@
7647
7291
  <!-- Example: Dimensions in millimeters -->
7648
7292
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
7649
7293
 
7650
- <xsl:variable name="show_figure_key_in_block_container">
7651
- true
7294
+ <xsl:variable name="show_figure_key_in_block_container">true
7652
7295
  </xsl:variable>
7653
7296
 
7654
7297
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
@@ -7663,11 +7306,9 @@
7663
7306
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
7664
7307
  <xsl:call-template name="showFigureKey"/>
7665
7308
  </xsl:if>
7666
-
7667
- <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
7309
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
7668
7310
 
7669
7311
  </fo:block-container>
7670
-
7671
7312
  </xsl:template>
7672
7313
 
7673
7314
  <xsl:template name="showFigureKey">
@@ -7705,13 +7346,12 @@
7705
7346
  <!-- SOURCE: ... -->
7706
7347
  <!-- figure/source -->
7707
7348
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
7708
-
7709
- <xsl:call-template name="termsource"/>
7710
-
7349
+ <xsl:call-template name="termsource"/>
7711
7350
  </xsl:template>
7712
7351
 
7713
7352
  <xsl:template match="*[local-name() = 'image']">
7714
7353
  <xsl:param name="indent">0</xsl:param>
7354
+ <xsl:param name="logo_width"/>
7715
7355
  <xsl:variable name="isAdded" select="../@added"/>
7716
7356
  <xsl:variable name="isDeleted" select="../@deleted"/>
7717
7357
  <xsl:choose>
@@ -7733,9 +7373,18 @@
7733
7373
 
7734
7374
  <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
7735
7375
 
7736
- <!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
7737
7376
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
7738
7377
 
7378
+ <xsl:if test="parent::*[local-name() = 'logo']"> <!-- publisher's logo -->
7379
+ <xsl:attribute name="width">100%</xsl:attribute>
7380
+ <xsl:if test="normalize-space($logo_width) != ''">
7381
+ <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
7382
+ </xsl:if>
7383
+ <xsl:attribute name="content-height">100%</xsl:attribute>
7384
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7385
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
7386
+ </xsl:if>
7387
+
7739
7388
  <xsl:variable name="width">
7740
7389
  <xsl:call-template name="setImageWidth"/>
7741
7390
  </xsl:variable>
@@ -7813,8 +7462,7 @@
7813
7462
  </xsl:call-template>
7814
7463
  </xsl:variable>
7815
7464
 
7816
- <xsl:variable name="scaleRatio">
7817
- 1
7465
+ <xsl:variable name="scaleRatio">1
7818
7466
  </xsl:variable>
7819
7467
 
7820
7468
  <xsl:if test="number($scale) &lt; 100">
@@ -7925,18 +7573,14 @@
7925
7573
  </xsl:variable>
7926
7574
 
7927
7575
  <xsl:variable name="image_width_effective">
7928
-
7929
- <xsl:value-of select="$width_effective - number($indent_left)"/>
7930
-
7576
+ <xsl:value-of select="$width_effective - number($indent_left)"/>
7931
7577
  </xsl:variable>
7932
7578
  <xsl:variable name="image_height_effective" select="$height_effective - number($indent_left)"/>
7933
7579
  <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
7934
7580
  <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
7935
7581
  <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
7936
7582
  <xsl:variable name="scale">
7937
-
7938
- <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
7939
-
7583
+ <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
7940
7584
  </xsl:variable>
7941
7585
  <xsl:value-of select="$scale"/>
7942
7586
  </xsl:template>
@@ -7957,7 +7601,8 @@
7957
7601
  </xsl:when>
7958
7602
  <xsl:when test="not(starts-with(@src, 'data:'))">
7959
7603
  <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
7960
- <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
7604
+ <xsl:variable name="file_protocol"><xsl:if test="not(starts-with($src_external, 'http:')) and not(starts-with($src_external, 'https:')) and not(starts-with($src_external, 'www.'))">file:///</xsl:if></xsl:variable>
7605
+ <xsl:value-of select="concat('url(', $file_protocol, $src_external, ')')"/>
7961
7606
  </xsl:when>
7962
7607
  <xsl:otherwise>
7963
7608
  <xsl:value-of select="@src"/>
@@ -8253,8 +7898,8 @@
8253
7898
  </xsl:call-template>
8254
7899
  </xsl:variable>
8255
7900
  <xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
8256
- <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
8257
- <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
7901
+ <xsl:variable name="width" select="normalize-space($viewbox//mn:item[3])"/>
7902
+ <xsl:variable name="height" select="normalize-space($viewbox//mn:item[4])"/>
8258
7903
 
8259
7904
  <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
8260
7905
  <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
@@ -8326,8 +7971,8 @@
8326
7971
  </xsl:variable>
8327
7972
  <xsl:variable name="components" select="xalan:nodeset($components_)"/>
8328
7973
  <xsl:variable name="att_name" select="local-name()"/>
8329
- <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
8330
- <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
7974
+ <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/mn:item[1], ',', $components/mn:item[2], ',', $components/mn:item[3], ')')"/></xsl:attribute>
7975
+ <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/mn:item[4]"/></xsl:attribute>
8331
7976
  </xsl:template>
8332
7977
 
8333
7978
  <!-- ============== -->
@@ -8400,13 +8045,13 @@
8400
8045
  </xsl:call-template>
8401
8046
  </xsl:variable>
8402
8047
  <xsl:variable name="x_coords">
8403
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
8048
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 1]">
8404
8049
  <xsl:sort select="." data-type="number"/>
8405
8050
  <x><xsl:value-of select="."/></x>
8406
8051
  </xsl:for-each>
8407
8052
  </xsl:variable>
8408
8053
  <xsl:variable name="y_coords">
8409
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
8054
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 0]">
8410
8055
  <xsl:sort select="." data-type="number"/>
8411
8056
  <y><xsl:value-of select="."/></y>
8412
8057
  </xsl:for-each>
@@ -8611,11 +8256,11 @@
8611
8256
  <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
8612
8257
  </xsl:variable>
8613
8258
 
8614
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
8615
- <title>
8259
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
8260
+ <mn:title>
8616
8261
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
8617
- </title>
8618
- </item>
8262
+ </mn:title>
8263
+ </mn:item>
8619
8264
  </xsl:if>
8620
8265
  </xsl:template>
8621
8266
 
@@ -8686,12 +8331,12 @@
8686
8331
  <xsl:param name="contents"/>
8687
8332
  <xsl:param name="contents_addon"/>
8688
8333
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
8689
- <xsl:if test="$contents_nodes//item">
8334
+ <xsl:if test="$contents_nodes//mn:item">
8690
8335
  <fo:bookmark-tree>
8691
8336
  <xsl:choose>
8692
- <xsl:when test="$contents_nodes/doc">
8337
+ <xsl:when test="$contents_nodes/mn:doc">
8693
8338
  <xsl:choose>
8694
- <xsl:when test="count($contents_nodes/doc) &gt; 1">
8339
+ <xsl:when test="count($contents_nodes/mn:doc) &gt; 1">
8695
8340
 
8696
8341
  <xsl:if test="$contents_nodes/collection">
8697
8342
  <fo:bookmark internal-destination="{$contents/collection/@firstpage_id}">
@@ -8699,8 +8344,8 @@
8699
8344
  </fo:bookmark>
8700
8345
  </xsl:if>
8701
8346
 
8702
- <xsl:for-each select="$contents_nodes/doc">
8703
- <fo:bookmark internal-destination="{contents/item[@display = 'true'][1]/@id}" starting-state="hide">
8347
+ <xsl:for-each select="$contents_nodes/mn:doc">
8348
+ <fo:bookmark internal-destination="{contents/mn:item[@display = 'true'][1]/@id}" starting-state="hide">
8704
8349
  <xsl:if test="@bundle = 'true'">
8705
8350
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
8706
8351
  </xsl:if>
@@ -8734,14 +8379,14 @@
8734
8379
  </xsl:choose>
8735
8380
  </fo:bookmark-title>
8736
8381
 
8737
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
8382
+ <xsl:apply-templates select="contents/mn:item" mode="bookmark"/>
8738
8383
 
8739
8384
  <xsl:call-template name="insertFigureBookmarks">
8740
- <xsl:with-param name="contents" select="contents"/>
8385
+ <xsl:with-param name="contents" select="mn:contents"/>
8741
8386
  </xsl:call-template>
8742
8387
 
8743
8388
  <xsl:call-template name="insertTableBookmarks">
8744
- <xsl:with-param name="contents" select="contents"/>
8389
+ <xsl:with-param name="contents" select="mn:contents"/>
8745
8390
  <xsl:with-param name="lang" select="@lang"/>
8746
8391
  </xsl:call-template>
8747
8392
 
@@ -8750,16 +8395,16 @@
8750
8395
  </xsl:for-each>
8751
8396
  </xsl:when>
8752
8397
  <xsl:otherwise>
8753
- <xsl:for-each select="$contents_nodes/doc">
8398
+ <xsl:for-each select="$contents_nodes/mn:doc">
8754
8399
 
8755
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
8400
+ <xsl:apply-templates select="mn:contents/mn:item" mode="bookmark"/>
8756
8401
 
8757
8402
  <xsl:call-template name="insertFigureBookmarks">
8758
- <xsl:with-param name="contents" select="contents"/>
8403
+ <xsl:with-param name="contents" select="mn:contents"/>
8759
8404
  </xsl:call-template>
8760
8405
 
8761
8406
  <xsl:call-template name="insertTableBookmarks">
8762
- <xsl:with-param name="contents" select="contents"/>
8407
+ <xsl:with-param name="contents" select="mn:contents"/>
8763
8408
  <xsl:with-param name="lang" select="@lang"/>
8764
8409
  </xsl:call-template>
8765
8410
 
@@ -8768,14 +8413,14 @@
8768
8413
  </xsl:choose>
8769
8414
  </xsl:when>
8770
8415
  <xsl:otherwise>
8771
- <xsl:apply-templates select="$contents_nodes/contents/item" mode="bookmark"/>
8416
+ <xsl:apply-templates select="$contents_nodes/mn:contents/mn:item" mode="bookmark"/>
8772
8417
 
8773
8418
  <xsl:call-template name="insertFigureBookmarks">
8774
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
8419
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
8775
8420
  </xsl:call-template>
8776
8421
 
8777
8422
  <xsl:call-template name="insertTableBookmarks">
8778
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
8423
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
8779
8424
  <xsl:with-param name="lang" select="@lang"/>
8780
8425
  </xsl:call-template>
8781
8426
 
@@ -8792,80 +8437,72 @@
8792
8437
  <xsl:template name="insertFigureBookmarks">
8793
8438
  <xsl:param name="contents"/>
8794
8439
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
8795
- <xsl:if test="$contents_nodes/figure">
8796
- <fo:bookmark internal-destination="{$contents_nodes/figure[1]/@id}" starting-state="hide">
8440
+ <xsl:if test="$contents_nodes/mn:figure">
8441
+ <fo:bookmark internal-destination="{$contents_nodes/mn:figure[1]/@id}" starting-state="hide">
8797
8442
  <fo:bookmark-title>Figures</fo:bookmark-title>
8798
- <xsl:for-each select="$contents_nodes/figure">
8443
+ <xsl:for-each select="$contents_nodes/mn:figure">
8799
8444
  <fo:bookmark internal-destination="{@id}">
8800
8445
  <fo:bookmark-title>
8801
- <xsl:value-of select="normalize-space(title)"/>
8446
+ <xsl:value-of select="normalize-space(mn:title)"/>
8802
8447
  </fo:bookmark-title>
8803
8448
  </fo:bookmark>
8804
8449
  </xsl:for-each>
8805
8450
  </fo:bookmark>
8806
8451
  </xsl:if>
8452
+ <xsl:if test="$contents_nodes//mn:figures/mn:figure">
8453
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
8807
8454
 
8808
- <xsl:if test="$contents_nodes//figures/figure">
8809
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
8810
-
8811
- <xsl:variable name="bookmark-title">
8812
-
8813
- <xsl:value-of select="$title-list-figures"/>
8814
-
8815
- </xsl:variable>
8816
- <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
8817
- <xsl:for-each select="$contents_nodes//figures/figure">
8818
- <fo:bookmark internal-destination="{@id}">
8819
- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
8820
- </fo:bookmark>
8821
- </xsl:for-each>
8455
+ <xsl:variable name="bookmark-title">
8456
+ <xsl:value-of select="$title-list-figures"/>
8457
+ </xsl:variable>
8458
+ <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
8459
+ <xsl:for-each select="$contents_nodes//mn:figures/mn:figure">
8460
+ <fo:bookmark internal-destination="{@id}">
8461
+ <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
8822
8462
  </fo:bookmark>
8823
- </xsl:if>
8824
-
8463
+ </xsl:for-each>
8464
+ </fo:bookmark>
8465
+ </xsl:if>
8825
8466
  </xsl:template> <!-- insertFigureBookmarks -->
8826
8467
 
8827
8468
  <xsl:template name="insertTableBookmarks">
8828
8469
  <xsl:param name="contents"/>
8829
8470
  <xsl:param name="lang"/>
8830
8471
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
8831
- <xsl:if test="$contents_nodes/table">
8832
- <fo:bookmark internal-destination="{$contents_nodes/table[1]/@id}" starting-state="hide">
8472
+ <xsl:if test="$contents_nodes/mn:table">
8473
+ <fo:bookmark internal-destination="{$contents_nodes/mn:table[1]/@id}" starting-state="hide">
8833
8474
  <fo:bookmark-title>
8834
8475
  <xsl:choose>
8835
8476
  <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
8836
8477
  <xsl:otherwise>Tables</xsl:otherwise>
8837
8478
  </xsl:choose>
8838
8479
  </fo:bookmark-title>
8839
- <xsl:for-each select="$contents_nodes/table">
8480
+ <xsl:for-each select="$contents_nodes/mn:table">
8840
8481
  <fo:bookmark internal-destination="{@id}">
8841
8482
  <fo:bookmark-title>
8842
- <xsl:value-of select="normalize-space(title)"/>
8483
+ <xsl:value-of select="normalize-space(mn:title)"/>
8843
8484
  </fo:bookmark-title>
8844
8485
  </fo:bookmark>
8845
8486
  </xsl:for-each>
8846
8487
  </fo:bookmark>
8847
8488
  </xsl:if>
8489
+ <xsl:if test="$contents_nodes//mn:tables/mn:table">
8490
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
8848
8491
 
8849
- <xsl:if test="$contents_nodes//tables/table">
8850
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
8851
-
8852
- <xsl:variable name="bookmark-title">
8853
-
8854
- <xsl:value-of select="$title-list-tables"/>
8855
-
8856
- </xsl:variable>
8492
+ <xsl:variable name="bookmark-title">
8493
+ <xsl:value-of select="$title-list-tables"/>
8494
+ </xsl:variable>
8857
8495
 
8858
- <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
8496
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
8859
8497
 
8860
- <xsl:for-each select="$contents_nodes//tables/table">
8861
- <fo:bookmark internal-destination="{@id}">
8862
- <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
8863
- <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
8864
- </fo:bookmark>
8865
- </xsl:for-each>
8498
+ <xsl:for-each select="$contents_nodes//mn:tables/mn:table">
8499
+ <fo:bookmark internal-destination="{@id}">
8500
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
8501
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
8866
8502
  </fo:bookmark>
8867
- </xsl:if>
8868
-
8503
+ </xsl:for-each>
8504
+ </fo:bookmark>
8505
+ </xsl:if>
8869
8506
  </xsl:template> <!-- insertTableBookmarks -->
8870
8507
  <!-- End Bookmarks -->
8871
8508
 
@@ -8895,17 +8532,15 @@
8895
8532
  <xsl:param name="title" select="''"/>
8896
8533
  <xsl:choose>
8897
8534
  <xsl:when test="$lang = 'en'">
8898
-
8899
8535
  </xsl:when>
8900
8536
  <xsl:when test="$lang = 'fr'">
8901
-
8902
8537
  </xsl:when>
8903
8538
  <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
8904
8539
  <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
8905
8540
  </xsl:choose>
8906
8541
  </xsl:template>
8907
8542
 
8908
- <xsl:template match="item" mode="bookmark">
8543
+ <xsl:template match="mn:item" mode="bookmark">
8909
8544
  <xsl:choose>
8910
8545
  <xsl:when test="@id != ''">
8911
8546
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
@@ -8915,7 +8550,7 @@
8915
8550
  <xsl:text> </xsl:text>
8916
8551
  </xsl:if>
8917
8552
  <xsl:variable name="title">
8918
- <xsl:for-each select="title/node()">
8553
+ <xsl:for-each select="mn:title/node()">
8919
8554
  <xsl:choose>
8920
8555
  <xsl:when test="local-name() = 'add' and starts-with(., $ace_tag)"><!-- skip --></xsl:when>
8921
8556
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
@@ -8933,7 +8568,7 @@
8933
8568
  </xsl:choose>
8934
8569
  </xsl:template>
8935
8570
 
8936
- <xsl:template match="title" mode="bookmark"/>
8571
+ <xsl:template match="mn:title" mode="bookmark"/>
8937
8572
  <xsl:template match="text()" mode="bookmark"/>
8938
8573
 
8939
8574
  <!-- figure/name -->
@@ -9162,9 +8797,9 @@
9162
8797
  <xsl:template match="text()" mode="contents_item">
9163
8798
  <xsl:variable name="text">
9164
8799
  <!-- to split by '_' and other chars -->
9165
- <text><xsl:call-template name="add-zero-spaces-java"/></text>
8800
+ <mn:text><xsl:call-template name="add-zero-spaces-java"/></mn:text>
9166
8801
  </xsl:variable>
9167
- <xsl:for-each select="xalan:nodeset($text)/text/text()">
8802
+ <xsl:for-each select="xalan:nodeset($text)/mn:text/text()">
9168
8803
  <xsl:call-template name="keep_together_standard_number"/>
9169
8804
  </xsl:for-each>
9170
8805
  </xsl:template>
@@ -9191,23 +8826,13 @@
9191
8826
 
9192
8827
  <xsl:template match="*[local-name() = 'property']" mode="css">
9193
8828
  <xsl:attribute name="{@name}">
9194
- <xsl:value-of select="@value"/>
9195
- </xsl:attribute>
9196
- </xsl:template>
9197
-
9198
- <xsl:template name="get_sourcecode_attributes">
9199
- <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
9200
- <xsl:variable name="_font-size">
9201
-
9202
- 10
9203
-
9204
-
9205
- <!-- inherit -->
9206
-
9207
- <!-- <xsl:if test="$namespace = 'ieee'">
9208
- <xsl:if test="$current_template = 'standard'">8</xsl:if>
9209
- </xsl:if> -->
8829
+ <xsl:value-of select="@value"/>
8830
+ </xsl:attribute>
8831
+ </xsl:template>
9210
8832
 
8833
+ <xsl:template name="get_sourcecode_attributes">
8834
+ <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
8835
+ <xsl:variable name="_font-size">10<!-- inherit -->
9211
8836
  </xsl:variable>
9212
8837
 
9213
8838
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -9263,7 +8888,6 @@
9263
8888
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
9264
8889
  </xsl:choose>
9265
8890
  </xsl:attribute>
9266
-
9267
8891
  </xsl:if>
9268
8892
  <fo:block-container margin-left="0mm" role="SKIP">
9269
8893
 
@@ -9287,8 +8911,7 @@
9287
8911
  </fo:block>
9288
8912
 
9289
8913
  <xsl:apply-templates select="*[local-name() = 'dl']"/> <!-- Key table -->
9290
-
9291
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
8914
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
9292
8915
 
9293
8916
  </fo:block-container>
9294
8917
  </fo:block-container>
@@ -9465,25 +9088,6 @@
9465
9088
  </xsl:choose>
9466
9089
  </xsl:template>
9467
9090
 
9468
- <!-- insert 'char' between each character in the string -->
9469
- <xsl:template name="interspers">
9470
- <xsl:param name="str"/>
9471
- <xsl:param name="char" select="$zero_width_space"/>
9472
- <xsl:if test="$str != ''">
9473
- <xsl:value-of select="substring($str, 1, 1)"/>
9474
-
9475
- <xsl:variable name="next_char" select="substring($str, 2, 1)"/>
9476
- <xsl:if test="not(contains(concat(' -.:=_— ', $char), $next_char))">
9477
- <xsl:value-of select="$char"/>
9478
- </xsl:if>
9479
-
9480
- <xsl:call-template name="interspers">
9481
- <xsl:with-param name="str" select="substring($str, 2)"/>
9482
- <xsl:with-param name="char" select="$char"/>
9483
- </xsl:call-template>
9484
- </xsl:if>
9485
- </xsl:template>
9486
-
9487
9091
  <xsl:template name="interspers-java">
9488
9092
  <xsl:param name="str"/>
9489
9093
  <xsl:param name="char" select="$zero_width_space"/>
@@ -9580,7 +9184,7 @@
9580
9184
  </xsl:variable>
9581
9185
  <xsl:variable name="classes" select="xalan:nodeset($classes_)"/>
9582
9186
 
9583
- <xsl:for-each select="$classes/item">
9187
+ <xsl:for-each select="$classes/*[local-name() = 'item']">
9584
9188
  <xsl:variable name="class_name" select="."/>
9585
9189
  <xsl:for-each select="$syntax_highlight_styles/style[@class = $class_name]/@*[not(local-name() = 'class')]">
9586
9190
  <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
@@ -9663,12 +9267,9 @@
9663
9267
 
9664
9268
  <xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
9665
9269
  <xsl:if test="normalize-space() != ''">
9666
-
9667
- <fo:block xsl:use-attribute-sets="permission-name-style">
9668
- <xsl:apply-templates/>
9669
-
9670
- </fo:block>
9671
-
9270
+ <fo:block xsl:use-attribute-sets="permission-name-style">
9271
+ <xsl:apply-templates/>
9272
+ </fo:block>
9672
9273
  </xsl:if>
9673
9274
  </xsl:template>
9674
9275
 
@@ -9697,12 +9298,9 @@
9697
9298
  <xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
9698
9299
  <xsl:if test="normalize-space() != ''">
9699
9300
 
9700
- <fo:block xsl:use-attribute-sets="requirement-name-style">
9701
-
9702
- <xsl:apply-templates/>
9703
-
9704
- </fo:block>
9705
-
9301
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
9302
+ <xsl:apply-templates/>
9303
+ </fo:block>
9706
9304
  </xsl:if>
9707
9305
  </xsl:template>
9708
9306
 
@@ -9741,11 +9339,9 @@
9741
9339
  <xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
9742
9340
  <xsl:if test="normalize-space() != ''">
9743
9341
 
9744
- <fo:block xsl:use-attribute-sets="recommendation-name-style">
9745
- <xsl:apply-templates/>
9746
-
9747
- </fo:block>
9748
-
9342
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
9343
+ <xsl:apply-templates/>
9344
+ </fo:block>
9749
9345
  </xsl:if>
9750
9346
  </xsl:template>
9751
9347
 
@@ -9871,7 +9467,6 @@
9871
9467
 
9872
9468
  <xsl:if test="parent::*[local-name()='thead'] or starts-with(*[local-name()='td' or local-name()='th'][1], 'Requirement ') or starts-with(*[local-name()='td' or local-name()='th'][1], 'Recommendation ')">
9873
9469
  <xsl:attribute name="font-weight">bold</xsl:attribute>
9874
-
9875
9470
  </xsl:if>
9876
9471
 
9877
9472
  <xsl:apply-templates mode="requirement"/>
@@ -9916,7 +9511,6 @@
9916
9511
 
9917
9512
  <xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
9918
9513
  <fo:block font-size="11pt">
9919
-
9920
9514
  <xsl:apply-templates/>
9921
9515
  </fo:block>
9922
9516
  </xsl:template>
@@ -9956,7 +9550,6 @@
9956
9550
  <xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
9957
9551
  <xsl:variable name="element">inline
9958
9552
 
9959
-
9960
9553
  </xsl:variable>
9961
9554
  <xsl:choose>
9962
9555
  <xsl:when test="contains($element, 'block')">
@@ -9988,110 +9581,105 @@
9988
9581
  text line 2
9989
9582
  -->
9990
9583
  <xsl:template match="*[local-name() = 'example']" name="example">
9584
+ <xsl:call-template name="setNamedDestination"/>
9585
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
9991
9586
 
9992
- <xsl:call-template name="setNamedDestination"/>
9993
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
9587
+ <xsl:call-template name="setBlockSpanAll"/>
9994
9588
 
9995
- <xsl:call-template name="setBlockSpanAll"/>
9589
+ <xsl:call-template name="refine_example-style"/>
9996
9590
 
9997
- <xsl:call-template name="refine_example-style"/>
9591
+ <xsl:variable name="fo_element">
9592
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>block
9593
+ </xsl:variable>
9998
9594
 
9999
- <xsl:variable name="fo_element">
10000
- <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
10001
- block
10002
- </xsl:variable>
9595
+ <fo:block-container margin-left="0mm" role="SKIP">
10003
9596
 
10004
- <fo:block-container margin-left="0mm" role="SKIP">
9597
+ <xsl:choose>
10005
9598
 
10006
- <xsl:choose>
9599
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
10007
9600
 
10008
- <xsl:when test="contains(normalize-space($fo_element), 'block')">
9601
+ <!-- display name 'EXAMPLE' in a separate block -->
9602
+ <fo:block>
9603
+ <xsl:apply-templates select="*[local-name()='name']">
9604
+ <xsl:with-param name="fo_element" select="$fo_element"/>
9605
+ </xsl:apply-templates>
9606
+ </fo:block>
10009
9607
 
10010
- <!-- display name 'EXAMPLE' in a separate block -->
10011
- <fo:block>
10012
- <xsl:apply-templates select="*[local-name()='name']">
9608
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9609
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9610
+ <xsl:variable name="example_body">
9611
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
10013
9612
  <xsl:with-param name="fo_element" select="$fo_element"/>
10014
9613
  </xsl:apply-templates>
10015
- </fo:block>
10016
-
10017
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
10018
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10019
- <xsl:variable name="example_body">
10020
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
10021
- <xsl:with-param name="fo_element" select="$fo_element"/>
10022
- </xsl:apply-templates>
10023
- </xsl:variable>
10024
- <xsl:choose>
10025
- <xsl:when test="xalan:nodeset($example_body)/*">
10026
- <xsl:copy-of select="$example_body"/>
10027
- </xsl:when>
10028
- <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
10029
- </xsl:choose>
10030
- </fo:block-container>
10031
- </fo:block-container>
10032
- </xsl:when> <!-- end block -->
10033
-
10034
- <xsl:when test="contains(normalize-space($fo_element), 'list')">
10035
-
10036
- <xsl:variable name="provisional_distance_between_starts_">
10037
- 7
10038
- </xsl:variable>
10039
- <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
10040
- <xsl:variable name="indent_">
10041
- 0
10042
9614
  </xsl:variable>
10043
- <xsl:variable name="indent" select="normalize-space($indent_)"/>
10044
-
10045
- <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
10046
- <fo:list-item>
10047
- <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
10048
- <fo:block>
10049
- <xsl:apply-templates select="*[local-name()='name']">
10050
- <xsl:with-param name="fo_element">block</xsl:with-param>
10051
- </xsl:apply-templates>
10052
- </fo:block>
10053
- </fo:list-item-label>
10054
- <fo:list-item-body start-indent="body-start()">
10055
- <fo:block>
10056
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
10057
- <xsl:with-param name="fo_element" select="$fo_element"/>
10058
- </xsl:apply-templates>
10059
- </fo:block>
10060
- </fo:list-item-body>
10061
- </fo:list-item>
10062
- </fo:list-block>
10063
- </xsl:when> <!-- end list -->
9615
+ <xsl:choose>
9616
+ <xsl:when test="xalan:nodeset($example_body)/*">
9617
+ <xsl:copy-of select="$example_body"/>
9618
+ </xsl:when>
9619
+ <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
9620
+ </xsl:choose>
9621
+ </fo:block-container>
9622
+ </fo:block-container>
9623
+ </xsl:when> <!-- end block -->
10064
9624
 
10065
- <xsl:otherwise> <!-- inline -->
9625
+ <xsl:when test="contains(normalize-space($fo_element), 'list')">
10066
9626
 
10067
- <!-- display 'EXAMPLE' and first element in the same line -->
10068
- <fo:block>
10069
- <xsl:apply-templates select="*[local-name()='name']">
10070
- <xsl:with-param name="fo_element" select="$fo_element"/>
10071
- </xsl:apply-templates>
10072
- <fo:inline>
10073
- <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
9627
+ <xsl:variable name="provisional_distance_between_starts_">7
9628
+ </xsl:variable>
9629
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
9630
+ <xsl:variable name="indent_">0
9631
+ </xsl:variable>
9632
+ <xsl:variable name="indent" select="normalize-space($indent_)"/>
9633
+
9634
+ <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
9635
+ <fo:list-item>
9636
+ <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
9637
+ <fo:block>
9638
+ <xsl:apply-templates select="*[local-name()='name']">
9639
+ <xsl:with-param name="fo_element">block</xsl:with-param>
9640
+ </xsl:apply-templates>
9641
+ </fo:block>
9642
+ </fo:list-item-label>
9643
+ <fo:list-item-body start-indent="body-start()">
9644
+ <fo:block>
9645
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
10074
9646
  <xsl:with-param name="fo_element" select="$fo_element"/>
10075
9647
  </xsl:apply-templates>
10076
- </fo:inline>
10077
- </fo:block>
9648
+ </fo:block>
9649
+ </fo:list-item-body>
9650
+ </fo:list-item>
9651
+ </fo:list-block>
9652
+ </xsl:when> <!-- end list -->
10078
9653
 
10079
- <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
10080
- <!-- display further elements in blocks -->
10081
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
10082
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10083
- <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
10084
- <xsl:with-param name="fo_element" select="'block'"/>
10085
- </xsl:apply-templates>
10086
- </fo:block-container>
10087
- </fo:block-container>
10088
- </xsl:if>
10089
- </xsl:otherwise> <!-- end inline -->
9654
+ <xsl:otherwise> <!-- inline -->
10090
9655
 
10091
- </xsl:choose>
10092
- </fo:block-container>
10093
- </fo:block-container>
9656
+ <!-- display 'EXAMPLE' and first element in the same line -->
9657
+ <fo:block>
9658
+ <xsl:apply-templates select="*[local-name()='name']">
9659
+ <xsl:with-param name="fo_element" select="$fo_element"/>
9660
+ </xsl:apply-templates>
9661
+ <fo:inline>
9662
+ <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
9663
+ <xsl:with-param name="fo_element" select="$fo_element"/>
9664
+ </xsl:apply-templates>
9665
+ </fo:inline>
9666
+ </fo:block>
9667
+
9668
+ <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
9669
+ <!-- display further elements in blocks -->
9670
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9671
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9672
+ <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
9673
+ <xsl:with-param name="fo_element" select="'block'"/>
9674
+ </xsl:apply-templates>
9675
+ </fo:block-container>
9676
+ </fo:block-container>
9677
+ </xsl:if>
9678
+ </xsl:otherwise> <!-- end inline -->
10094
9679
 
9680
+ </xsl:choose>
9681
+ </fo:block-container>
9682
+ </fo:block-container>
10095
9683
  </xsl:template>
10096
9684
 
10097
9685
  <!-- example/name -->
@@ -10106,7 +9694,6 @@
10106
9694
  </xsl:when>
10107
9695
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
10108
9696
  <fo:block xsl:use-attribute-sets="example-name-style">
10109
-
10110
9697
  <xsl:apply-templates/>
10111
9698
  </fo:block>
10112
9699
  </xsl:when>
@@ -10123,7 +9710,6 @@
10123
9710
  <!-- table/example/name, table/tfoot//example/name -->
10124
9711
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'example']/*[local-name() = 'name']">
10125
9712
  <fo:inline xsl:use-attribute-sets="example-name-style">
10126
-
10127
9713
  <xsl:apply-templates/>
10128
9714
  </fo:inline>
10129
9715
  </xsl:template>
@@ -10133,7 +9719,6 @@
10133
9719
 
10134
9720
  <xsl:variable name="num"><xsl:number/></xsl:variable>
10135
9721
  <xsl:variable name="element">
10136
-
10137
9722
  <xsl:value-of select="$fo_element"/>
10138
9723
  </xsl:variable>
10139
9724
  <xsl:choose>
@@ -10251,7 +9836,7 @@
10251
9836
  </xsl:call-template>
10252
9837
  </xsl:variable>
10253
9838
 
10254
- <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
9839
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
10255
9840
  <xsl:choose>
10256
9841
  <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
10257
9842
  <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
@@ -10288,7 +9873,6 @@
10288
9873
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
10289
9874
  </xsl:if>
10290
9875
  </xsl:if>
10291
-
10292
9876
  <fo:block-container margin-left="0mm" role="SKIP">
10293
9877
  <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
10294
9878
 
@@ -10371,7 +9955,6 @@
10371
9955
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
10372
9956
  <xsl:attribute name="vertical-align">super</xsl:attribute>
10373
9957
  <xsl:attribute name="font-size">80%</xsl:attribute>
10374
-
10375
9958
  </xsl:if>
10376
9959
 
10377
9960
  <xsl:call-template name="refine_eref-style"/>
@@ -10420,10 +10003,8 @@
10420
10003
  </xsl:template>
10421
10004
 
10422
10005
  <xsl:template name="refine_basic_link_style">
10423
-
10424
- <xsl:attribute name="color">blue</xsl:attribute>
10425
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
10426
-
10006
+ <xsl:attribute name="color">blue</xsl:attribute>
10007
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
10427
10008
  </xsl:template> <!-- refine_basic_link_style -->
10428
10009
 
10429
10010
  <!-- ====== -->
@@ -10440,13 +10021,11 @@
10440
10021
  </xsl:variable>
10441
10022
 
10442
10023
  <xsl:variable name="padding">
10443
-
10444
- <xsl:choose>
10445
- <xsl:when test="$depth &gt;= 3">3</xsl:when>
10446
- <xsl:when test="$depth = 1">3</xsl:when>
10447
- <xsl:otherwise>2</xsl:otherwise>
10448
- </xsl:choose>
10449
-
10024
+ <xsl:choose>
10025
+ <xsl:when test="$depth &gt;= 3">3</xsl:when>
10026
+ <xsl:when test="$depth = 1">3</xsl:when>
10027
+ <xsl:otherwise>2</xsl:otherwise>
10028
+ </xsl:choose>
10450
10029
  </xsl:variable>
10451
10030
 
10452
10031
  <xsl:variable name="padding-right">
@@ -10457,7 +10036,6 @@
10457
10036
  </xsl:otherwise>
10458
10037
  </xsl:choose>
10459
10038
  </xsl:variable>
10460
-
10461
10039
  <xsl:choose>
10462
10040
  <xsl:when test="$lang = 'zh'">
10463
10041
  <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -10481,9 +10059,7 @@
10481
10059
  <xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']/*[local-name() = 'tab']" priority="2"/>
10482
10060
 
10483
10061
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab">
10484
-
10485
- <xsl:attribute name="padding-right">6mm</xsl:attribute>
10486
-
10062
+ <xsl:attribute name="padding-right">6mm</xsl:attribute>
10487
10063
  </xsl:template>
10488
10064
 
10489
10065
  <xsl:template name="insertNonBreakSpaces">
@@ -10502,11 +10078,10 @@
10502
10078
  <xsl:call-template name="getLevel"/>
10503
10079
  </xsl:variable>
10504
10080
  <xsl:variable name="font-size">
10505
-
10506
- <xsl:choose>
10507
- <xsl:when test="$level &gt;= 3">11pt</xsl:when>
10508
- <xsl:otherwise>12pt</xsl:otherwise>
10509
- </xsl:choose>
10081
+ <xsl:choose>
10082
+ <xsl:when test="$level &gt;= 3">11pt</xsl:when>
10083
+ <xsl:otherwise>12pt</xsl:otherwise>
10084
+ </xsl:choose>
10510
10085
 
10511
10086
  </xsl:variable>
10512
10087
  <xsl:variable name="levelTerm">
@@ -10559,11 +10134,9 @@
10559
10134
  </xsl:template>
10560
10135
 
10561
10136
  <xsl:template name="setStyle_preferred">
10562
-
10563
- <xsl:if test="*[local-name() = 'strong']">
10564
- <xsl:attribute name="font-weight">normal</xsl:attribute>
10565
- </xsl:if>
10566
-
10137
+ <xsl:if test="*[local-name() = 'strong']">
10138
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
10139
+ </xsl:if>
10567
10140
  </xsl:template>
10568
10141
 
10569
10142
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
@@ -10640,7 +10213,6 @@
10640
10213
 
10641
10214
  <!-- main sections -->
10642
10215
  <xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
10643
-
10644
10216
  <xsl:call-template name="setNamedDestination"/>
10645
10217
  <fo:block>
10646
10218
  <xsl:call-template name="setId"/>
@@ -10675,18 +10247,14 @@
10675
10247
  </xsl:template>
10676
10248
 
10677
10249
  <xsl:template name="sections_element_style">
10678
-
10679
- <xsl:variable name="pos"><xsl:number count="csd:sections/*/csd:clause | csd:sections/*/csd:terms"/></xsl:variable>
10680
- <xsl:if test="$pos &gt;= 2">
10681
- <xsl:attribute name="space-before">18pt</xsl:attribute>
10682
- </xsl:if>
10683
-
10250
+ <xsl:variable name="pos"><xsl:number count="csd:sections/*/csd:clause | csd:sections/*/csd:terms"/></xsl:variable>
10251
+ <xsl:if test="$pos &gt;= 2">
10252
+ <xsl:attribute name="space-before">18pt</xsl:attribute>
10253
+ </xsl:if>
10684
10254
  </xsl:template> <!-- sections_element_style -->
10685
10255
 
10686
10256
  <xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
10687
-
10688
- <fo:block break-after="page"/>
10689
-
10257
+ <fo:block break-after="page"/>
10690
10258
  <xsl:call-template name="setNamedDestination"/>
10691
10259
  <fo:block>
10692
10260
  <xsl:call-template name="setId"/>
@@ -10735,7 +10303,6 @@
10735
10303
  </xsl:template>
10736
10304
 
10737
10305
  <xsl:template name="refine_clause_style">
10738
-
10739
10306
  </xsl:template> <!-- refine_clause_style -->
10740
10307
 
10741
10308
  <xsl:template match="*[local-name() = 'definitions']">
@@ -10775,7 +10342,6 @@
10775
10342
  </xsl:template>
10776
10343
 
10777
10344
  <xsl:template name="refine_annex_style">
10778
-
10779
10345
  </xsl:template>
10780
10346
 
10781
10347
  <!-- document text (not figures, or tables) footnotes -->
@@ -10879,15 +10445,13 @@
10879
10445
  <!-- Lists processing -->
10880
10446
  <!-- ===================================== -->
10881
10447
  <xsl:variable name="ul_labels_">
10882
-
10883
- <label>—</label> <!-- em dash -->
10448
+ <label>—</label> <!-- em dash -->
10884
10449
 
10885
10450
  </xsl:variable>
10886
10451
  <xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
10887
10452
 
10888
10453
  <xsl:template name="setULLabel">
10889
- <xsl:variable name="list_level__">
10890
- <xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
10454
+ <xsl:variable name="list_level__"><xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
10891
10455
  </xsl:variable>
10892
10456
  <xsl:variable name="list_level_" select="number($list_level__)"/>
10893
10457
  <xsl:variable name="list_level">
@@ -10944,28 +10508,22 @@
10944
10508
  <xsl:variable name="label">
10945
10509
 
10946
10510
  <xsl:variable name="style_prefix_">
10947
- <xsl:if test="$type = 'roman'">
10948
- <!-- Example: (i) -->
10511
+ <xsl:if test="$type = 'roman'"> <!-- Example: (i) -->
10949
10512
  </xsl:if>
10950
10513
  <xsl:if test="$type = 'alphabet'">
10951
-
10952
10514
  </xsl:if>
10953
10515
  </xsl:variable>
10954
10516
  <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
10955
10517
 
10956
10518
  <xsl:variable name="style_suffix_">
10957
10519
  <xsl:choose>
10958
- <xsl:when test="$type = 'arabic'">
10959
- )
10520
+ <xsl:when test="$type = 'arabic'">)
10960
10521
  </xsl:when>
10961
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
10962
- )
10522
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">)
10963
10523
  </xsl:when>
10964
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
10965
- .
10524
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">.
10966
10525
  </xsl:when>
10967
- <xsl:when test="$type = 'roman'">
10968
- )
10526
+ <xsl:when test="$type = 'roman'">)
10969
10527
  </xsl:when>
10970
10528
  <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
10971
10529
  </xsl:choose>
@@ -10982,8 +10540,7 @@
10982
10540
  <xsl:value-of select="$style_suffix"/>
10983
10541
  </xsl:if>
10984
10542
  </xsl:variable>
10985
-
10986
- <xsl:value-of select="normalize-space($label)"/>
10543
+ <xsl:value-of select="normalize-space($label)"/>
10987
10544
 
10988
10545
  </xsl:when>
10989
10546
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
@@ -11040,17 +10597,13 @@
11040
10597
 
11041
10598
  <xsl:variable name="format">
11042
10599
  <xsl:choose>
11043
- <xsl:when test="$type = 'arabic'">
11044
- 1)
10600
+ <xsl:when test="$type = 'arabic'">1)
11045
10601
  </xsl:when>
11046
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
11047
- a)
10602
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">a)
11048
10603
  </xsl:when>
11049
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
11050
- A.
10604
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">A.
11051
10605
  </xsl:when>
11052
- <xsl:when test="$type = 'roman'">
11053
- i)
10606
+ <xsl:when test="$type = 'roman'">i)
11054
10607
  </xsl:when>
11055
10608
  <xsl:when test="$type = 'roman_upper'">I.</xsl:when>
11056
10609
  <xsl:otherwise>1.</xsl:otherwise> <!-- for any case, if $type has non-determined value, not using -->
@@ -11087,19 +10640,16 @@
11087
10640
  </fo:block-container>
11088
10641
  </xsl:when>
11089
10642
  <xsl:otherwise>
11090
-
11091
- <fo:block role="SKIP">
11092
- <xsl:apply-templates select="." mode="list">
11093
- <xsl:with-param name="indent" select="$indent"/>
11094
- </xsl:apply-templates>
11095
- </fo:block>
11096
-
10643
+ <fo:block role="SKIP">
10644
+ <xsl:apply-templates select="." mode="list">
10645
+ <xsl:with-param name="indent" select="$indent"/>
10646
+ </xsl:apply-templates>
10647
+ </fo:block>
11097
10648
  </xsl:otherwise>
11098
10649
  </xsl:choose>
11099
10650
  </xsl:template>
11100
10651
 
11101
10652
  <xsl:template name="refine_list_container_style">
11102
-
11103
10653
  </xsl:template> <!-- refine_list_container_style -->
11104
10654
 
11105
10655
  <xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
@@ -11163,7 +10713,6 @@
11163
10713
  </xsl:template>
11164
10714
 
11165
10715
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
11166
-
11167
10716
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
11168
10717
 
11169
10718
  <xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
@@ -11448,7 +10997,6 @@
11448
10997
  <xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
11449
10998
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
11450
10999
  <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
11451
-
11452
11000
  <xsl:apply-templates/>
11453
11001
  </fo:block>
11454
11002
  </xsl:template>
@@ -11500,7 +11048,6 @@
11500
11048
  <fo:table-column column-width="15mm"/>
11501
11049
  <fo:table-body>
11502
11050
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
11503
-
11504
11051
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
11505
11052
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
11506
11053
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
@@ -11536,7 +11083,6 @@
11536
11083
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
11537
11084
  <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
11538
11085
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
11539
-
11540
11086
  </xsl:template>
11541
11087
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
11542
11088
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
@@ -11547,16 +11093,13 @@
11547
11093
  <xsl:call-template name="setNamedDestination"/>
11548
11094
  <fo:block id="{@id}">
11549
11095
  <xsl:apply-templates/>
11550
-
11551
11096
  </fo:block>
11552
11097
  </xsl:template>
11553
11098
 
11554
11099
  <!-- Bibliography (non-normative references) -->
11555
11100
  <xsl:template match="*[local-name() = 'references']">
11556
11101
  <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
11557
-
11558
- <fo:block break-after="page"/>
11559
-
11102
+ <fo:block break-after="page"/>
11560
11103
  </xsl:if>
11561
11104
 
11562
11105
  <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
@@ -11572,9 +11115,7 @@
11572
11115
 
11573
11116
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
11574
11117
  <xsl:apply-templates select="node()[not(local-name() = 'title' and @columns = 1)]"/>
11575
-
11576
11118
  </fo:block>
11577
-
11578
11119
  </xsl:template> <!-- references -->
11579
11120
 
11580
11121
  <xsl:template match="*[local-name() = 'bibitem']">
@@ -11584,44 +11125,39 @@
11584
11125
  <!-- Normative references -->
11585
11126
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
11586
11127
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
11587
-
11588
- <xsl:call-template name="setNamedDestination"/>
11589
- <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
11590
-
11591
- <xsl:call-template name="processBibitem"/>
11592
- </fo:block>
11128
+ <xsl:call-template name="setNamedDestination"/>
11129
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
11130
+ <xsl:call-template name="processBibitem"/>
11131
+ </fo:block>
11593
11132
 
11594
11133
  </xsl:template> <!-- bibitem -->
11595
11134
 
11596
11135
  <!-- Bibliography (non-normative references) -->
11597
11136
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
11598
- <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
11599
- <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
11137
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
11600
11138
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
11601
- <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
11602
- <xsl:call-template name="setNamedDestination"/>
11603
- <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
11604
-
11605
- <fo:list-item>
11606
- <fo:list-item-label end-indent="label-end()">
11607
- <fo:block role="SKIP">
11608
- <fo:inline role="SKIP">
11609
-
11610
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11611
- <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
11612
- </xsl:apply-templates>
11613
- </fo:inline>
11614
- </fo:block>
11615
- </fo:list-item-label>
11616
- <fo:list-item-body start-indent="body-start()">
11617
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
11618
- <xsl:call-template name="processBibitem">
11619
- <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11620
- </xsl:call-template>
11621
- </fo:block>
11622
- </fo:list-item-body>
11623
- </fo:list-item>
11624
- </fo:list-block>
11139
+ <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
11140
+ <xsl:call-template name="setNamedDestination"/>
11141
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
11142
+ <fo:list-item>
11143
+ <fo:list-item-label end-indent="label-end()">
11144
+ <fo:block role="SKIP">
11145
+ <fo:inline role="SKIP">
11146
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11147
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
11148
+ </xsl:apply-templates>
11149
+ </fo:inline>
11150
+ </fo:block>
11151
+ </fo:list-item-label>
11152
+ <fo:list-item-body start-indent="body-start()">
11153
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
11154
+ <xsl:call-template name="processBibitem">
11155
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11156
+ </xsl:call-template>
11157
+ </fo:block>
11158
+ </fo:list-item-body>
11159
+ </fo:list-item>
11160
+ </fo:list-block>
11625
11161
 
11626
11162
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
11627
11163
 
@@ -11631,7 +11167,6 @@
11631
11167
  <xsl:otherwise>
11632
11168
  <xsl:call-template name="setNamedDestination"/>
11633
11169
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
11634
-
11635
11170
  <fo:list-item-label end-indent="label-end()">
11636
11171
  <fo:block role="SKIP">
11637
11172
  <fo:inline role="SKIP">
@@ -11658,18 +11193,16 @@
11658
11193
 
11659
11194
  <xsl:template name="processBibitem">
11660
11195
  <xsl:param name="biblio_tag_part">both</xsl:param>
11196
+ <!-- start bibitem processing -->
11197
+ <xsl:if test=".//*[local-name() = 'fn']">
11198
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
11199
+ </xsl:if>
11661
11200
 
11662
- <!-- start bibitem processing -->
11663
- <xsl:if test=".//*[local-name() = 'fn']">
11664
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
11665
- </xsl:if>
11666
-
11667
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11668
- <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
11669
- </xsl:apply-templates>
11670
- <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
11671
- <!-- end bibitem processing -->
11672
-
11201
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11202
+ <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
11203
+ </xsl:apply-templates>
11204
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
11205
+ <!-- end bibitem processing -->
11673
11206
  </xsl:template> <!-- processBibitem (bibitem) -->
11674
11207
 
11675
11208
  <xsl:template match="*[local-name() = 'title']" mode="title">
@@ -11812,8 +11345,7 @@
11812
11345
  <xsl:choose>
11813
11346
  <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
11814
11347
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
11815
- <xsl:otherwise><!-- default value -->
11816
- 2
11348
+ <xsl:otherwise><!-- default value -->2
11817
11349
  </xsl:otherwise>
11818
11350
  </xsl:choose>
11819
11351
  </xsl:variable>
@@ -12022,28 +11554,26 @@
12022
11554
  <!-- Admonition -->
12023
11555
  <!-- ================ -->
12024
11556
  <xsl:template match="*[local-name() = 'admonition']">
11557
+ <fo:block xsl:use-attribute-sets="admonition-style">
12025
11558
 
12026
- <fo:block xsl:use-attribute-sets="admonition-style">
12027
-
12028
- <xsl:call-template name="setBlockSpanAll"/>
11559
+ <xsl:call-template name="setBlockSpanAll"/>
12029
11560
 
12030
- <xsl:if test="@type = 'editorial'">
12031
- <xsl:attribute name="color">green</xsl:attribute>
12032
- <xsl:attribute name="font-weight">normal</xsl:attribute>
12033
- <!-- <xsl:variable name="note-style">
11561
+ <xsl:if test="@type = 'editorial'">
11562
+ <xsl:attribute name="color">green</xsl:attribute>
11563
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
11564
+ <!-- <xsl:variable name="note-style">
12034
11565
  <style xsl:use-attribute-sets="note-style"></style>
12035
11566
  </xsl:variable>
12036
11567
  <xsl:for-each select="xalan:nodeset($note-style)//style/@*">
12037
11568
  <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
12038
11569
  </xsl:for-each> -->
12039
- </xsl:if>
12040
-
12041
- <xsl:call-template name="displayAdmonitionName">
12042
- <xsl:with-param name="sep"> — </xsl:with-param>
12043
- </xsl:call-template>
11570
+ </xsl:if>
11571
+ <xsl:call-template name="displayAdmonitionName">
11572
+ <xsl:with-param name="sep"> — </xsl:with-param>
11573
+ </xsl:call-template>
12044
11574
 
12045
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
12046
- </fo:block>
11575
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
11576
+ </fo:block>
12047
11577
 
12048
11578
  </xsl:template>
12049
11579
 
@@ -12092,12 +11622,10 @@
12092
11622
  </xsl:template> -->
12093
11623
 
12094
11624
  <xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
11625
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
12095
11626
 
12096
- <fo:block xsl:use-attribute-sets="admonition-p-style">
12097
-
12098
- <xsl:apply-templates/>
12099
- </fo:block>
12100
-
11627
+ <xsl:apply-templates/>
11628
+ </fo:block>
12101
11629
  </xsl:template>
12102
11630
 
12103
11631
  <!-- ================ -->
@@ -12133,11 +11661,9 @@
12133
11661
 
12134
11662
  <!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
12135
11663
  <xsl:variable name="updated_xml_step2">
12136
-
12137
- <xsl:if test="$table_if = 'false'">
12138
- <xsl:copy-of select="$updated_xml_step1"/>
12139
- </xsl:if>
12140
-
11664
+ <xsl:if test="$table_if = 'false'">
11665
+ <xsl:copy-of select="$updated_xml_step1"/>
11666
+ </xsl:if>
12141
11667
  </xsl:variable>
12142
11668
 
12143
11669
  <xsl:variable name="endTime2" select="java:getTime(java:java.util.Date.new())"/>
@@ -12612,7 +12138,6 @@
12612
12138
  </xsl:template>
12613
12139
 
12614
12140
  <xsl:template name="addNamedDestinationAttribute">
12615
-
12616
12141
  </xsl:template>
12617
12142
 
12618
12143
  <xsl:template match="*[local-name() = 'fmt-name']"/>
@@ -13107,7 +12632,6 @@
13107
12632
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
13108
12633
  <xsl:if test="not(ancestor::*[local-name() = 'table'])"><regex><xsl:value-of select="$regex_standard_reference"/></regex></xsl:if>
13109
12634
  <!-- if EXPRESS reference -->
13110
-
13111
12635
  <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
13112
12636
  <regex><xsl:value-of select="$regex_solidus_units"/></regex>
13113
12637
  <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
@@ -13161,8 +12685,7 @@
13161
12685
 
13162
12686
  <xsl:variable name="text2">
13163
12687
  <xsl:element name="text" namespace="{$namespace_full}">
13164
- <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()">
13165
- <xsl:copy-of select="."/>
12688
+ <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()"><xsl:copy-of select="."/>
13166
12689
  </xsl:for-each>
13167
12690
  </xsl:element>
13168
12691
  </xsl:variable>
@@ -13454,9 +12977,7 @@
13454
12977
  </xsl:attribute>
13455
12978
  <xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
13456
12979
  <xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
13457
-
13458
- <xsl:value-of select="$skip_footnote_body_"/>
13459
-
12980
+ <xsl:value-of select="$skip_footnote_body_"/>
13460
12981
  </xsl:attribute>
13461
12982
  <xsl:attribute name="ref_id">
13462
12983
  <xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
@@ -13545,7 +13066,6 @@
13545
13066
 
13546
13067
  <xsl:template name="printEdition">
13547
13068
  <xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
13548
-
13549
13069
  <xsl:choose>
13550
13070
  <xsl:when test="$edition_i18n != ''">
13551
13071
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -13774,8 +13294,7 @@
13774
13294
  <dc:title>
13775
13295
  <xsl:variable name="title">
13776
13296
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
13777
-
13778
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
13297
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
13779
13298
 
13780
13299
  </xsl:for-each>
13781
13300
  </xsl:variable>
@@ -13794,16 +13313,14 @@
13794
13313
  </dc:title>
13795
13314
  <xsl:variable name="dc_creator">
13796
13315
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
13797
-
13798
- <rdf:Seq>
13799
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
13800
- <rdf:li>
13801
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
13802
- </rdf:li>
13803
- <!-- <xsl:if test="position() != last()">; </xsl:if> -->
13804
- </xsl:for-each>
13805
- </rdf:Seq>
13806
-
13316
+ <rdf:Seq>
13317
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role'][not(*[local-name() = 'description'])]/@type='author']">
13318
+ <rdf:li>
13319
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
13320
+ </rdf:li>
13321
+ <!-- <xsl:if test="position() != last()">; </xsl:if> -->
13322
+ </xsl:for-each>
13323
+ </rdf:Seq>
13807
13324
  </xsl:for-each>
13808
13325
  </xsl:variable>
13809
13326
  <xsl:if test="normalize-space($dc_creator) != ''">
@@ -13814,9 +13331,7 @@
13814
13331
 
13815
13332
  <xsl:variable name="dc_description">
13816
13333
  <xsl:variable name="abstract">
13817
-
13818
- <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
13819
-
13334
+ <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
13820
13335
  </xsl:variable>
13821
13336
  <rdf:Alt>
13822
13337
  <rdf:li xml:lang="x-default">
@@ -13881,7 +13396,9 @@
13881
13396
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
13882
13397
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
13883
13398
  <xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
13884
- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
13399
+ <!-- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/> -->
13400
+ <!-- See https://github.com/metanorma/metanorma-iso/issues/1369 -->
13401
+ <xsl:variable name="url" select="concat('url(file:///',$outputpdf_basepath, $attachment_path, ')')"/>
13885
13402
  <xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
13886
13403
  <!-- Todo: need update -->
13887
13404
  <xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
@@ -14046,7 +13563,7 @@
14046
13563
  <xsl:param name="normalize-space" select="'true'"/>
14047
13564
  <xsl:param name="keep_sep" select="'false'"/>
14048
13565
  <xsl:if test="string-length($pText) &gt;0">
14049
- <item>
13566
+ <xsl:element name="item" namespace="{$namespace_mn_xsl}">
14050
13567
  <xsl:choose>
14051
13568
  <xsl:when test="$normalize-space = 'true'">
14052
13569
  <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
@@ -14055,8 +13572,8 @@
14055
13572
  <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
14056
13573
  </xsl:otherwise>
14057
13574
  </xsl:choose>
14058
- </item>
14059
- <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><item><xsl:value-of select="$sep"/></item></xsl:if>
13575
+ </xsl:element>
13576
+ <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><xsl:element name="item" namespace="{$namespace_mn_xsl}"><xsl:value-of select="$sep"/></xsl:element></xsl:if>
14060
13577
  <xsl:call-template name="split">
14061
13578
  <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
14062
13579
  <xsl:with-param name="sep" select="$sep"/>
@@ -14074,30 +13591,6 @@
14074
13591
  <xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
14075
13592
  </xsl:template>
14076
13593
 
14077
- <xsl:template name="namespaceCheck">
14078
- <xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
14079
- <xsl:variable name="XSLNS">
14080
-
14081
- <xsl:value-of select="document('')//*/namespace::csd"/>
14082
-
14083
- </xsl:variable>
14084
- <!-- <xsl:if test="$documentNS != $XSLNS">
14085
- <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
14086
- </xsl:if> -->
14087
- </xsl:template> <!-- namespaceCheck -->
14088
-
14089
- <xsl:template name="getLanguage">
14090
- <xsl:param name="lang"/>
14091
- <xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
14092
- <xsl:choose>
14093
- <xsl:when test="$language = 'en'">English</xsl:when>
14094
- <xsl:when test="$language = 'fr'">French</xsl:when>
14095
- <xsl:when test="$language = 'de'">Deutsch</xsl:when>
14096
- <xsl:when test="$language = 'cn'">Chinese</xsl:when>
14097
- <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
14098
- </xsl:choose>
14099
- </xsl:template>
14100
-
14101
13594
  <xsl:template name="setId">
14102
13595
  <xsl:param name="prefix"/>
14103
13596
  <xsl:attribute name="id">