metanorma-ogc 2.7.6 → 2.7.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:ogc="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:redirect="http://xml.apache.org/xalan/redirect" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java redirect" 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:ogc="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:redirect="http://xml.apache.org/xalan/redirect" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java redirect" 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
 
@@ -68,7 +68,7 @@
68
68
  </xsl:attribute-set>
69
69
 
70
70
  <xsl:variable name="contents_">
71
- <contents>
71
+ <mn:contents>
72
72
  <!-- Abstract, Keywords, Preface, Submitting Organizations, Submitters -->
73
73
  <xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
74
74
 
@@ -76,12 +76,11 @@
76
76
  <xsl:apply-templates select="//ogc:indexsect" mode="contents"/>
77
77
 
78
78
  <xsl:call-template name="processTablesFigures_Contents"/>
79
- </contents>
79
+ </mn:contents>
80
80
  </xsl:variable>
81
81
  <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
82
82
 
83
83
  <xsl:template match="/">
84
- <xsl:call-template name="namespaceCheck"/>
85
84
 
86
85
  <fo:root xml:lang="{$lang}">
87
86
  <xsl:variable name="root-style">
@@ -382,13 +381,13 @@
382
381
  <xsl:if test="count(*) = 1 and *[local-name() = 'title']"> <!-- if there isn't user ToC -->
383
382
 
384
383
  <xsl:variable name="margin-left">3.9</xsl:variable>
385
- <xsl:for-each select="$contents//item[@display = 'true']">
384
+ <xsl:for-each select="$contents//mn:item[@display = 'true']">
386
385
  <fo:block margin-top="8pt" margin-bottom="5pt" margin-left="{(@level - 1) * $margin-left}mm" text-align-last="justify" role="TOCI">
387
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
386
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{mn:title}">
388
387
  <xsl:if test="@section != ''">
389
388
  <xsl:value-of select="@section"/><xsl:text> </xsl:text>
390
389
  </xsl:if>
391
- <xsl:apply-templates select="title"/>
390
+ <xsl:apply-templates select="mn:title"/>
392
391
  <fo:inline keep-together.within-line="always">
393
392
  <fo:leader leader-pattern="dots"/>
394
393
  <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
@@ -494,12 +493,12 @@
494
493
  <xsl:value-of select="local-name()"/>
495
494
  </xsl:variable>
496
495
 
497
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
498
- <title>
496
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
497
+ <mn:title>
499
498
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
500
- </title>
499
+ </mn:title>
501
500
  <xsl:apply-templates mode="contents"/>
502
- </item>
501
+ </mn:item>
503
502
  </xsl:if>
504
503
 
505
504
  </xsl:template>
@@ -767,34 +766,25 @@
767
766
  </xsl:choose>
768
767
  </xsl:template>
769
768
 
770
- <!-- <xsl:strip-space elements="ogc:xref"/> -->
769
+ <!-- https://www.metanorma.org/ns/standoc -->
770
+ <xsl:variable name="namespace_full" select="namespace-uri(//*[local-name() = 'metanorma'][1])"/>
771
771
 
772
- <xsl:variable name="namespace_full_">
773
- <xsl:choose>
774
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
775
- <xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
776
- </xsl:choose>
777
- </xsl:variable>
778
- <xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
772
+ <!-- https://www.metanorma.org/ns/xsl -->
773
+ <xsl:variable name="namespace_mn_xsl">https://www.metanorma.org/ns/xslt</xsl:variable>
779
774
 
780
- <xsl:variable name="root_element_">
781
- <xsl:choose>
782
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
783
- <xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
784
- </xsl:choose>
785
- </xsl:variable>
786
- <xsl:variable name="root_element" select="normalize-space($root_element_)"/>
775
+ <xsl:variable name="root_element">metanorma</xsl:variable>
787
776
 
777
+ <!---examples: 2013, 2024 -->
788
778
  <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'])"/>
789
779
 
790
780
  <!-- external parameters -->
791
-
792
781
  <xsl:param name="svg_images"/> <!-- svg images array -->
793
782
  <xsl:variable name="images" select="document($svg_images)"/>
794
783
  <xsl:param name="basepath"/> <!-- base path for images -->
795
784
  <xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
796
785
  <xsl:param name="inputxml_filename"/> <!-- input xml file name -->
797
786
  <xsl:param name="output_path"/> <!-- output PDF file name -->
787
+ <xsl:param name="outputpdf_basepath"/> <!-- output PDF folder -->
798
788
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
799
789
  <xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
800
790
  <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 -->
@@ -841,20 +831,13 @@
841
831
 
842
832
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
843
833
 
844
- <xsl:variable name="isApplyAutolayoutAlgorithm_">
845
- true
834
+ <!-- don't remove and rename this variable, it's using in mn2pdf tool -->
835
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">true
846
836
  </xsl:variable>
847
837
  <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
848
838
 
849
- <xsl:variable name="isGenerateTableIF_">
850
- <xsl:choose>
851
- <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
852
- <xsl:value-of select="normalize-space($table_if) = 'true'"/>
853
- </xsl:when>
854
- <xsl:otherwise>false</xsl:otherwise>
855
- </xsl:choose>
856
- </xsl:variable>
857
- <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
839
+ <xsl:variable name="isGenerateTableIF"><xsl:value-of select="$table_if"/></xsl:variable>
840
+ <!-- <xsl:variable name="isGenerateTableIF" select="normalize-space(normalize-space($table_if) = 'true' and 1 = 1)"/> -->
858
841
 
859
842
  <xsl:variable name="lang">
860
843
  <xsl:call-template name="getLang"/>
@@ -906,8 +889,7 @@
906
889
  <xsl:variable name="pageWidth_">
907
890
  <xsl:choose>
908
891
  <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
909
- <xsl:otherwise>
910
- 215.9
892
+ <xsl:otherwise>215.9
911
893
  </xsl:otherwise>
912
894
  </xsl:choose>
913
895
  </xsl:variable>
@@ -917,8 +899,7 @@
917
899
  <xsl:variable name="pageHeight_">
918
900
  <xsl:choose>
919
901
  <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
920
- <xsl:otherwise>
921
- 279.4
902
+ <xsl:otherwise>279.4
922
903
  </xsl:otherwise>
923
904
  </xsl:choose>
924
905
  </xsl:variable>
@@ -927,23 +908,19 @@
927
908
  <!-- Page margins in mm (just digits, without 'mm')-->
928
909
  <!-- marginLeftRight1 and marginLeftRight2 - is left or right margin depends on odd/even page,
929
910
  for example, left margin on odd page and right margin on even page -->
930
- <xsl:variable name="marginLeftRight1_">
931
- 25.4
911
+ <xsl:variable name="marginLeftRight1_">25.4
932
912
  </xsl:variable>
933
913
  <xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/>
934
914
 
935
- <xsl:variable name="marginLeftRight2_">
936
- 25.4
915
+ <xsl:variable name="marginLeftRight2_">25.4
937
916
  </xsl:variable>
938
917
  <xsl:variable name="marginLeftRight2" select="normalize-space($marginLeftRight2_)"/>
939
918
 
940
- <xsl:variable name="marginTop_">
941
- 25.4
919
+ <xsl:variable name="marginTop_">25.4
942
920
  </xsl:variable>
943
921
  <xsl:variable name="marginTop" select="normalize-space($marginTop_)"/>
944
922
 
945
- <xsl:variable name="marginBottom_">
946
- 25.4
923
+ <xsl:variable name="marginBottom_">25.4
947
924
  </xsl:variable>
948
925
  <xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
949
926
 
@@ -992,13 +969,10 @@
992
969
  <title-toc lang="zh">目次</title-toc>
993
970
 
994
971
  <title-part lang="en">
995
-
996
972
  </title-part>
997
973
  <title-part lang="fr">
998
-
999
974
  </title-part>
1000
975
  <title-part lang="ru">
1001
-
1002
976
  </title-part>
1003
977
  <title-part lang="zh">第 # 部分:</title-part>
1004
978
 
@@ -1052,6 +1026,7 @@
1052
1026
  <xsl:variable name="hair_space"> </xsl:variable>
1053
1027
  <xsl:variable name="en_dash">–</xsl:variable>
1054
1028
  <xsl:variable name="em_dash">—</xsl:variable>
1029
+ <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
1055
1030
  <xsl:variable name="cr">&#13;</xsl:variable>
1056
1031
  <xsl:variable name="lf">
1057
1032
  </xsl:variable>
@@ -1093,11 +1068,9 @@
1093
1068
  <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>
1094
1069
  <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>
1095
1070
  <xsl:attribute-set name="root-style">
1096
-
1097
- <xsl:attribute name="font-family">Roboto, STIX Two Math, <xsl:value-of select="$font_noto_sans"/></xsl:attribute>
1098
- <xsl:attribute name="font-family-generic">Sans</xsl:attribute>
1099
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1100
-
1071
+ <xsl:attribute name="font-family">Roboto, STIX Two Math, <xsl:value-of select="$font_noto_sans"/></xsl:attribute>
1072
+ <xsl:attribute name="font-family-generic">Sans</xsl:attribute>
1073
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1101
1074
  </xsl:attribute-set> <!-- root-style -->
1102
1075
 
1103
1076
  <xsl:template name="insertRootStyle">
@@ -1185,43 +1158,33 @@
1185
1158
 
1186
1159
  <!-- Preface sections styles -->
1187
1160
  <xsl:attribute-set name="copyright-statement-style">
1188
-
1189
1161
  </xsl:attribute-set> <!-- copyright-statement-style -->
1190
1162
 
1191
1163
  <xsl:attribute-set name="copyright-statement-title-style">
1192
-
1193
- <xsl:attribute name="font-family">Lato</xsl:attribute>
1194
- <xsl:attribute name="text-align">center</xsl:attribute>
1195
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1196
-
1164
+ <xsl:attribute name="font-family">Lato</xsl:attribute>
1165
+ <xsl:attribute name="text-align">center</xsl:attribute>
1166
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1197
1167
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
1198
1168
 
1199
1169
  <xsl:attribute-set name="copyright-statement-p-style">
1200
-
1201
- <xsl:attribute name="text-align">left</xsl:attribute>
1202
-
1170
+ <xsl:attribute name="text-align">left</xsl:attribute>
1203
1171
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
1204
1172
 
1205
1173
  <xsl:attribute-set name="license-statement-style">
1206
-
1207
1174
  </xsl:attribute-set>
1208
1175
 
1209
1176
  <xsl:attribute-set name="license-statement-title-style">
1210
1177
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1211
-
1212
- <xsl:attribute name="font-family">Lato</xsl:attribute>
1213
- <xsl:attribute name="text-align">center</xsl:attribute>
1214
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1215
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
1216
-
1178
+ <xsl:attribute name="font-family">Lato</xsl:attribute>
1179
+ <xsl:attribute name="text-align">center</xsl:attribute>
1180
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1181
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
1217
1182
  </xsl:attribute-set> <!-- license-statement-title-style -->
1218
1183
 
1219
1184
  <xsl:attribute-set name="license-statement-p-style">
1220
-
1221
- <xsl:attribute name="font-size">8pt</xsl:attribute>
1222
- <xsl:attribute name="margin-top">14pt</xsl:attribute>
1223
- <xsl:attribute name="line-height">135%</xsl:attribute>
1224
-
1185
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
1186
+ <xsl:attribute name="margin-top">14pt</xsl:attribute>
1187
+ <xsl:attribute name="line-height">135%</xsl:attribute>
1225
1188
  </xsl:attribute-set> <!-- license-statement-p-style -->
1226
1189
 
1227
1190
  <xsl:attribute-set name="legal-statement-style">
@@ -1230,121 +1193,93 @@
1230
1193
 
1231
1194
  <xsl:attribute-set name="legal-statement-title-style">
1232
1195
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1233
-
1234
- <xsl:attribute name="font-family">Lato</xsl:attribute>
1235
- <xsl:attribute name="text-align">center</xsl:attribute>
1236
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1237
-
1196
+ <xsl:attribute name="font-family">Lato</xsl:attribute>
1197
+ <xsl:attribute name="text-align">center</xsl:attribute>
1198
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1238
1199
  </xsl:attribute-set> <!-- legal-statement-title-style -->
1239
1200
 
1240
1201
  <xsl:attribute-set name="legal-statement-p-style">
1241
-
1242
- <xsl:attribute name="text-align">left</xsl:attribute>
1243
-
1202
+ <xsl:attribute name="text-align">left</xsl:attribute>
1244
1203
  </xsl:attribute-set> <!-- legal-statement-p-style -->
1245
1204
 
1246
1205
  <xsl:attribute-set name="feedback-statement-style">
1247
-
1248
1206
  </xsl:attribute-set> <!-- feedback-statement-style -->
1249
1207
 
1250
1208
  <xsl:attribute-set name="feedback-statement-title-style">
1251
1209
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1252
-
1253
1210
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
1254
1211
 
1255
1212
  <xsl:attribute-set name="feedback-statement-p-style">
1256
-
1257
1213
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
1258
1214
 
1259
1215
  <!-- End Preface sections styles -->
1260
1216
 
1261
1217
  <xsl:attribute-set name="link-style">
1262
-
1263
- <xsl:attribute name="color">blue</xsl:attribute>
1264
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1265
-
1218
+ <xsl:attribute name="color">blue</xsl:attribute>
1219
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1266
1220
  </xsl:attribute-set>
1267
1221
 
1268
1222
  <xsl:template name="refine_link-style">
1269
-
1270
1223
  </xsl:template> <!-- refine_link-style -->
1271
1224
 
1272
1225
  <xsl:attribute-set name="sourcecode-container-style">
1273
-
1274
1226
  </xsl:attribute-set>
1275
1227
 
1276
1228
  <xsl:attribute-set name="sourcecode-style">
1277
1229
  <xsl:attribute name="white-space">pre</xsl:attribute>
1278
1230
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
1279
1231
  <xsl:attribute name="role">Code</xsl:attribute>
1280
-
1281
- <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1282
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1283
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1284
- <xsl:attribute name="line-height">113%</xsl:attribute>
1285
-
1232
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1233
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1234
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1235
+ <xsl:attribute name="line-height">113%</xsl:attribute>
1286
1236
  </xsl:attribute-set>
1287
1237
 
1288
1238
  <xsl:template name="refine_sourcecode-style">
1289
-
1290
1239
  </xsl:template> <!-- refine_sourcecode-style -->
1291
1240
 
1292
1241
  <xsl:attribute-set name="pre-style">
1293
1242
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1294
1243
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1295
-
1296
- <xsl:attribute name="line-height">113%</xsl:attribute>
1297
-
1244
+ <xsl:attribute name="line-height">113%</xsl:attribute>
1298
1245
  </xsl:attribute-set>
1299
1246
 
1300
1247
  <xsl:attribute-set name="permission-style">
1301
-
1302
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
1303
-
1248
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1304
1249
  </xsl:attribute-set>
1305
1250
 
1306
1251
  <xsl:attribute-set name="permission-name-style">
1307
-
1308
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1309
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1310
- <xsl:attribute name="text-align">center</xsl:attribute>
1311
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
1312
- <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
1313
- <xsl:attribute name="margin-bottom">1mm</xsl:attribute>
1314
- <xsl:attribute name="background-color">rgb(165,165,165)</xsl:attribute>
1315
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1316
-
1252
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1253
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1254
+ <xsl:attribute name="text-align">center</xsl:attribute>
1255
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
1256
+ <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
1257
+ <xsl:attribute name="margin-bottom">1mm</xsl:attribute>
1258
+ <xsl:attribute name="background-color">rgb(165,165,165)</xsl:attribute>
1259
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1317
1260
  </xsl:attribute-set>
1318
1261
 
1319
1262
  <xsl:attribute-set name="permission-label-style">
1320
-
1321
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1322
-
1263
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1323
1264
  </xsl:attribute-set>
1324
1265
 
1325
1266
  <xsl:attribute-set name="requirement-style">
1326
-
1327
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
1328
-
1267
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1329
1268
  </xsl:attribute-set>
1330
1269
 
1331
1270
  <xsl:attribute-set name="requirement-name-style">
1332
1271
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1333
-
1334
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1335
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1336
- <xsl:attribute name="text-align">center</xsl:attribute>
1337
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
1338
- <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
1339
- <xsl:attribute name="margin-bottom">1mm</xsl:attribute>
1340
- <xsl:attribute name="background-color">rgb(165,165,165)</xsl:attribute>
1341
-
1272
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1273
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1274
+ <xsl:attribute name="text-align">center</xsl:attribute>
1275
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
1276
+ <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
1277
+ <xsl:attribute name="margin-bottom">1mm</xsl:attribute>
1278
+ <xsl:attribute name="background-color">rgb(165,165,165)</xsl:attribute>
1342
1279
  </xsl:attribute-set>
1343
1280
 
1344
1281
  <xsl:attribute-set name="requirement-label-style">
1345
-
1346
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1347
-
1282
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1348
1283
  </xsl:attribute-set>
1349
1284
 
1350
1285
  <xsl:attribute-set name="subject-style">
@@ -1372,145 +1307,115 @@
1372
1307
  </xsl:attribute-set>
1373
1308
 
1374
1309
  <xsl:attribute-set name="recommendation-style">
1375
-
1376
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
1377
-
1310
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1378
1311
  </xsl:attribute-set>
1379
1312
 
1380
1313
  <xsl:attribute-set name="recommendation-name-style">
1381
-
1382
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1383
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1384
- <xsl:attribute name="text-align">center</xsl:attribute>
1385
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
1386
- <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
1387
- <xsl:attribute name="margin-bottom">1mm</xsl:attribute>
1388
- <xsl:attribute name="background-color">rgb(165,165,165)</xsl:attribute>
1389
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1390
-
1314
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1315
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1316
+ <xsl:attribute name="text-align">center</xsl:attribute>
1317
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
1318
+ <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
1319
+ <xsl:attribute name="margin-bottom">1mm</xsl:attribute>
1320
+ <xsl:attribute name="background-color">rgb(165,165,165)</xsl:attribute>
1321
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1391
1322
  </xsl:attribute-set>
1392
1323
 
1393
1324
  <xsl:attribute-set name="recommendation-label-style">
1394
-
1395
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1396
-
1325
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1397
1326
  </xsl:attribute-set>
1398
1327
 
1399
1328
  <xsl:attribute-set name="termexample-style">
1400
-
1401
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1402
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1403
-
1329
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1330
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1404
1331
  </xsl:attribute-set>
1405
1332
 
1406
1333
  <xsl:template name="refine_termexample-style">
1407
-
1408
1334
  </xsl:template>
1409
1335
 
1410
1336
  <xsl:attribute-set name="example-style">
1411
-
1412
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1413
- <xsl:attribute name="margin-left">12.5mm</xsl:attribute>
1414
- <xsl:attribute name="margin-right">12.5mm</xsl:attribute>
1415
-
1337
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1338
+ <xsl:attribute name="margin-left">12.5mm</xsl:attribute>
1339
+ <xsl:attribute name="margin-right">12.5mm</xsl:attribute>
1416
1340
  </xsl:attribute-set> <!-- example-style -->
1417
1341
 
1418
1342
  <xsl:template name="refine_example-style">
1419
-
1420
1343
  </xsl:template> <!-- refine_example-style -->
1421
1344
 
1422
1345
  <xsl:attribute-set name="example-body-style">
1423
-
1424
1346
  </xsl:attribute-set> <!-- example-body-style -->
1425
1347
 
1426
1348
  <xsl:attribute-set name="example-name-style">
1427
-
1428
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1429
- <xsl:attribute name="text-align">center</xsl:attribute>
1430
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1431
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1432
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1433
-
1349
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1350
+ <xsl:attribute name="text-align">center</xsl:attribute>
1351
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1352
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1353
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1434
1354
  </xsl:attribute-set> <!-- example-name-style -->
1435
1355
 
1436
1356
  <xsl:template name="refine_example-name-style">
1437
-
1438
1357
  </xsl:template>
1439
1358
 
1440
1359
  <xsl:attribute-set name="example-p-style">
1441
-
1442
- <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1360
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1443
1361
 
1444
1362
  </xsl:attribute-set> <!-- example-p-style -->
1445
1363
 
1446
1364
  <xsl:template name="refine_example-p-style">
1447
-
1448
1365
  </xsl:template> <!-- refine_example-p-style -->
1449
1366
 
1450
1367
  <xsl:attribute-set name="termexample-name-style">
1451
-
1452
- <xsl:attribute name="padding-right">10mm</xsl:attribute>
1453
-
1368
+ <xsl:attribute name="padding-right">10mm</xsl:attribute>
1454
1369
  </xsl:attribute-set> <!-- termexample-name-style -->
1455
1370
 
1456
1371
  <xsl:template name="refine_termexample-name-style">
1457
-
1458
1372
  </xsl:template>
1459
1373
 
1460
1374
  <!-- ========================== -->
1461
1375
  <!-- Table styles -->
1462
1376
  <!-- ========================== -->
1463
1377
  <xsl:variable name="table-border_">
1464
-
1465
1378
  </xsl:variable>
1466
1379
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
1467
1380
 
1468
1381
  <xsl:variable name="table-cell-border_">
1469
-
1470
1382
  </xsl:variable>
1471
1383
  <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
1472
1384
 
1473
1385
  <xsl:attribute-set name="table-container-style">
1474
1386
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
1475
1387
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
1476
-
1477
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1478
- <xsl:attribute name="space-after">12pt</xsl:attribute>
1479
-
1388
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1389
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
1480
1390
  </xsl:attribute-set> <!-- table-container-style -->
1481
1391
 
1482
1392
  <xsl:template name="refine_table-container-style">
1483
1393
  <xsl:param name="margin-side"/>
1484
-
1485
1394
  <!-- end table block-container attributes -->
1486
1395
  </xsl:template> <!-- refine_table-container-style -->
1487
1396
 
1488
1397
  <xsl:attribute-set name="table-style">
1489
1398
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
1490
1399
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
1491
-
1492
1400
  </xsl:attribute-set><!-- table-style -->
1493
1401
 
1494
1402
  <xsl:template name="refine_table-style">
1495
1403
  <xsl:param name="margin-side"/>
1496
1404
 
1497
1405
  <xsl:call-template name="setBordersTableArray"/>
1498
-
1499
1406
  </xsl:template> <!-- refine_table-style -->
1500
1407
 
1501
1408
  <xsl:attribute-set name="table-name-style">
1502
1409
  <xsl:attribute name="role">Caption</xsl:attribute>
1503
1410
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1504
-
1505
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1506
- <xsl:attribute name="text-align">left</xsl:attribute>
1507
- <xsl:attribute name="color">rgb(68, 84, 106)</xsl:attribute>
1508
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1509
- <xsl:attribute name="font-style">italic</xsl:attribute>
1510
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
1511
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1512
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1513
-
1411
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1412
+ <xsl:attribute name="text-align">left</xsl:attribute>
1413
+ <xsl:attribute name="color">rgb(68, 84, 106)</xsl:attribute>
1414
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1415
+ <xsl:attribute name="font-style">italic</xsl:attribute>
1416
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
1417
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1418
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1514
1419
  </xsl:attribute-set> <!-- table-name-style -->
1515
1420
 
1516
1421
  <xsl:template name="refine_table-name-style">
@@ -1518,31 +1423,25 @@
1518
1423
  <xsl:if test="$continued = 'true'">
1519
1424
  <xsl:attribute name="role">SKIP</xsl:attribute>
1520
1425
  </xsl:if>
1521
-
1522
1426
  </xsl:template> <!-- refine_table-name-style -->
1523
1427
 
1524
1428
  <xsl:attribute-set name="table-row-style">
1525
1429
  <xsl:attribute name="min-height">4mm</xsl:attribute>
1526
-
1527
1430
  </xsl:attribute-set>
1528
1431
 
1529
1432
  <xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
1530
1433
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1531
-
1532
1434
  </xsl:attribute-set>
1533
1435
 
1534
1436
  <xsl:template name="refine_table-header-row-style">
1535
1437
 
1536
1438
  <xsl:call-template name="setBordersTableArray"/>
1537
-
1538
1439
  </xsl:template> <!-- refine_table-header-row-style -->
1539
1440
 
1540
1441
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
1541
-
1542
1442
  </xsl:attribute-set>
1543
1443
 
1544
1444
  <xsl:template name="refine_table-footer-row-style">
1545
-
1546
1445
  </xsl:template> <!-- refine_table-footer-row-style -->
1547
1446
 
1548
1447
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
@@ -1552,7 +1451,6 @@
1552
1451
  <xsl:template name="refine_table-body-row-style">
1553
1452
 
1554
1453
  <xsl:call-template name="setBordersTableArray"/>
1555
-
1556
1454
  </xsl:template> <!-- refine_table-body-row-style -->
1557
1455
 
1558
1456
  <xsl:attribute-set name="table-header-cell-style">
@@ -1560,13 +1458,11 @@
1560
1458
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1561
1459
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1562
1460
  <xsl:attribute name="display-align">center</xsl:attribute>
1563
-
1564
- <xsl:attribute name="padding">1mm</xsl:attribute>
1565
- <xsl:attribute name="background-color">rgb(0, 51, 102)</xsl:attribute>
1566
- <xsl:attribute name="color">white</xsl:attribute>
1567
- <xsl:attribute name="border">solid 0.5pt rgb(153, 153, 153)</xsl:attribute>
1568
- <xsl:attribute name="height">5mm</xsl:attribute>
1569
-
1461
+ <xsl:attribute name="padding">1mm</xsl:attribute>
1462
+ <xsl:attribute name="background-color">rgb(0, 51, 102)</xsl:attribute>
1463
+ <xsl:attribute name="color">white</xsl:attribute>
1464
+ <xsl:attribute name="border">solid 0.5pt rgb(153, 153, 153)</xsl:attribute>
1465
+ <xsl:attribute name="height">5mm</xsl:attribute>
1570
1466
  </xsl:attribute-set> <!-- table-header-cell-style -->
1571
1467
 
1572
1468
  <xsl:template name="refine_table-header-cell-style">
@@ -1578,18 +1474,15 @@
1578
1474
  </xsl:if>
1579
1475
 
1580
1476
  <xsl:call-template name="setTableCellAttributes"/>
1581
-
1582
1477
  </xsl:template> <!-- refine_table-header-cell-style -->
1583
1478
 
1584
1479
  <xsl:attribute-set name="table-cell-style">
1585
1480
  <xsl:attribute name="display-align">center</xsl:attribute>
1586
1481
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1587
1482
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1588
-
1589
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
1590
- <xsl:attribute name="border">solid 0.5pt rgb(153, 153, 153)</xsl:attribute>
1591
- <xsl:attribute name="height">5mm</xsl:attribute>
1592
-
1483
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1484
+ <xsl:attribute name="border">solid 0.5pt rgb(153, 153, 153)</xsl:attribute>
1485
+ <xsl:attribute name="height">5mm</xsl:attribute>
1593
1486
  </xsl:attribute-set> <!-- table-cell-style -->
1594
1487
 
1595
1488
  <xsl:template name="refine_table-cell-style">
@@ -1598,8 +1491,6 @@
1598
1491
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1599
1492
  </xsl:if>
1600
1493
 
1601
- <!-- bsi -->
1602
-
1603
1494
  <xsl:call-template name="setBordersTableArray"/>
1604
1495
 
1605
1496
  </xsl:template> <!-- refine_table-cell-style -->
@@ -1609,56 +1500,44 @@
1609
1500
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1610
1501
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1611
1502
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
1612
-
1613
1503
  </xsl:attribute-set> <!-- table-footer-cell-style -->
1614
1504
 
1615
1505
  <xsl:template name="refine_table-footer-cell-style">
1616
-
1617
1506
  </xsl:template> <!-- refine_table-footer-cell-style -->
1618
1507
 
1619
1508
  <xsl:attribute-set name="table-note-style">
1620
1509
  <xsl:attribute name="font-size">10pt</xsl:attribute>
1621
1510
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1622
-
1623
1511
  </xsl:attribute-set><!-- table-note-style -->
1624
1512
 
1625
1513
  <xsl:template name="refine_table-note-style">
1626
-
1627
1514
  </xsl:template> <!-- refine_table-note-style -->
1628
1515
 
1629
1516
  <xsl:attribute-set name="table-fn-style">
1630
1517
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1631
-
1632
1518
  </xsl:attribute-set> <!-- table-fn-style -->
1633
1519
 
1634
1520
  <xsl:template name="refine_table-fn-style">
1635
-
1636
1521
  </xsl:template>
1637
1522
 
1638
1523
  <xsl:attribute-set name="table-fn-number-style">
1639
1524
  <!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
1640
-
1641
1525
  </xsl:attribute-set> <!-- table-fn-number-style -->
1642
1526
 
1643
1527
  <xsl:attribute-set name="table-fmt-fn-label-style">
1644
1528
  <xsl:attribute name="font-size">80%</xsl:attribute>
1645
-
1646
- <xsl:attribute name="vertical-align">super</xsl:attribute>
1647
-
1529
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1648
1530
  </xsl:attribute-set> <!-- table-fmt-fn-label-style -->
1649
1531
 
1650
1532
  <xsl:template name="refine_table-fmt-fn-label-style">
1651
-
1652
1533
  </xsl:template>
1653
1534
 
1654
1535
  <xsl:attribute-set name="fn-container-body-style">
1655
1536
  <xsl:attribute name="text-indent">0</xsl:attribute>
1656
1537
  <xsl:attribute name="start-indent">0</xsl:attribute>
1657
-
1658
1538
  </xsl:attribute-set>
1659
1539
 
1660
1540
  <xsl:attribute-set name="table-fn-body-style">
1661
-
1662
1541
  </xsl:attribute-set>
1663
1542
 
1664
1543
  <xsl:attribute-set name="figure-fn-number-style">
@@ -1668,17 +1547,14 @@
1668
1547
  <xsl:attribute-set name="figure-fmt-fn-label-style">
1669
1548
  <xsl:attribute name="font-size">80%</xsl:attribute>
1670
1549
  <xsl:attribute name="vertical-align">super</xsl:attribute>
1671
-
1672
1550
  </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
1673
1551
 
1674
1552
  <xsl:template name="refine_figure-fmt-fn-label-style">
1675
-
1676
1553
  </xsl:template>
1677
1554
 
1678
1555
  <xsl:attribute-set name="figure-fn-body-style">
1679
1556
  <xsl:attribute name="text-align">justify</xsl:attribute>
1680
1557
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1681
-
1682
1558
  </xsl:attribute-set>
1683
1559
  <!-- ========================== -->
1684
1560
  <!-- END Table styles -->
@@ -1689,48 +1565,37 @@
1689
1565
  <!-- ========================== -->
1690
1566
 
1691
1567
  <xsl:attribute-set name="dl-block-style">
1692
-
1693
1568
  </xsl:attribute-set>
1694
1569
 
1695
1570
  <xsl:attribute-set name="dt-row-style">
1696
-
1697
1571
  </xsl:attribute-set>
1698
1572
 
1699
1573
  <xsl:attribute-set name="dt-cell-style">
1700
-
1701
1574
  </xsl:attribute-set>
1702
1575
 
1703
1576
  <xsl:template name="refine_dt-cell-style">
1704
-
1705
1577
  </xsl:template> <!-- refine_dt-cell-style -->
1706
1578
 
1707
1579
  <xsl:attribute-set name="dt-block-style">
1708
1580
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
1709
-
1710
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1711
-
1581
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1712
1582
  </xsl:attribute-set>
1713
1583
 
1714
1584
  <xsl:template name="refine_dt-block-style">
1715
-
1716
1585
  </xsl:template> <!-- refine_dt-block-style -->
1717
1586
 
1718
1587
  <xsl:attribute-set name="dl-name-style">
1719
1588
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1720
1589
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1721
-
1722
- <xsl:attribute name="color">rgb(68, 84, 106)</xsl:attribute>
1723
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1724
-
1590
+ <xsl:attribute name="color">rgb(68, 84, 106)</xsl:attribute>
1591
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1725
1592
  </xsl:attribute-set> <!-- dl-name-style -->
1726
1593
 
1727
1594
  <xsl:attribute-set name="dd-cell-style">
1728
1595
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
1729
-
1730
1596
  </xsl:attribute-set>
1731
1597
 
1732
1598
  <xsl:template name="refine_dd-cell-style">
1733
-
1734
1599
  </xsl:template> <!-- refine_dd-cell-style -->
1735
1600
 
1736
1601
  <!-- ========================== -->
@@ -1738,265 +1603,199 @@
1738
1603
  <!-- ========================== -->
1739
1604
 
1740
1605
  <xsl:attribute-set name="appendix-style">
1741
-
1742
- <xsl:attribute name="font-size">12pt</xsl:attribute>
1743
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1744
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1745
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1746
-
1606
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
1607
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1608
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1609
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1747
1610
  </xsl:attribute-set>
1748
1611
 
1749
1612
  <xsl:attribute-set name="appendix-example-style">
1750
-
1751
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1752
- <xsl:attribute name="margin-top">8pt</xsl:attribute>
1753
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1754
-
1613
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1614
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
1615
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
1755
1616
  </xsl:attribute-set>
1756
1617
 
1757
1618
  <xsl:attribute-set name="xref-style">
1758
-
1759
- <xsl:attribute name="color">blue</xsl:attribute>
1760
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1761
-
1619
+ <xsl:attribute name="color">blue</xsl:attribute>
1620
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1762
1621
  </xsl:attribute-set>
1763
1622
 
1764
1623
  <xsl:attribute-set name="eref-style">
1765
-
1766
- <xsl:attribute name="color">blue</xsl:attribute>
1767
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1768
-
1624
+ <xsl:attribute name="color">blue</xsl:attribute>
1625
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1769
1626
  </xsl:attribute-set>
1770
1627
 
1771
1628
  <xsl:template name="refine_eref-style">
1772
1629
  <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
1773
1630
  <xsl:variable name="text" select="normalize-space()"/>
1774
-
1775
1631
  </xsl:template> <!-- refine_eref-style -->
1776
1632
 
1777
1633
  <xsl:attribute-set name="note-style">
1778
-
1779
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1780
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1781
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1782
- <xsl:attribute name="line-height">115%</xsl:attribute>
1783
-
1634
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1635
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1636
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1637
+ <xsl:attribute name="line-height">115%</xsl:attribute>
1784
1638
  </xsl:attribute-set>
1785
1639
 
1786
1640
  <xsl:template name="refine_note-style">
1787
-
1788
- <xsl:if test="ancestor::ogc:ul or ancestor::ogc:ol and not(ancestor::ogc:note[1]/following-sibling::*)">
1789
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
1790
- </xsl:if>
1791
-
1641
+ <xsl:if test="ancestor::ogc:ul or ancestor::ogc:ol and not(ancestor::ogc:note[1]/following-sibling::*)">
1642
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
1643
+ </xsl:if>
1792
1644
  </xsl:template>
1793
1645
 
1794
1646
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
1795
1647
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
1796
1648
 
1797
1649
  <xsl:attribute-set name="note-name-style">
1798
-
1799
- <!-- <xsl:attribute name="padding-right">4mm</xsl:attribute> -->
1800
-
1650
+ <!-- <xsl:attribute name="padding-right">4mm</xsl:attribute> -->
1801
1651
  </xsl:attribute-set>
1802
1652
 
1803
1653
  <xsl:template name="refine_note-name-style">
1804
-
1805
1654
  </xsl:template> <!-- refine_note-name-style -->
1806
1655
 
1807
1656
  <xsl:attribute-set name="table-note-name-style">
1808
1657
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
1809
-
1810
1658
  </xsl:attribute-set>
1811
1659
 
1812
1660
  <xsl:template name="refine_table-note-name-style">
1813
-
1814
1661
  </xsl:template> <!-- refine_table-note-name-style -->
1815
1662
 
1816
1663
  <xsl:attribute-set name="note-p-style">
1817
-
1818
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1819
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1820
-
1664
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1665
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1821
1666
  </xsl:attribute-set>
1822
1667
 
1823
1668
  <xsl:attribute-set name="termnote-style">
1824
-
1825
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1826
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1827
-
1669
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1670
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1828
1671
  </xsl:attribute-set>
1829
1672
 
1830
1673
  <xsl:template name="refine_termnote-style">
1831
-
1832
1674
  </xsl:template> <!-- refine_termnote-style -->
1833
1675
 
1834
1676
  <xsl:attribute-set name="termnote-name-style">
1835
-
1836
1677
  </xsl:attribute-set>
1837
1678
 
1838
1679
  <xsl:template name="refine_termnote-name-style">
1839
-
1840
- <!-- <xsl:if test="$namespace = 'ieee'">
1841
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
1842
- </xsl:if> -->
1843
-
1844
1680
  </xsl:template>
1845
1681
 
1846
1682
  <xsl:attribute-set name="termnote-p-style">
1847
-
1848
- <xsl:attribute name="space-before">4pt</xsl:attribute>
1849
-
1683
+ <xsl:attribute name="space-before">4pt</xsl:attribute>
1850
1684
  </xsl:attribute-set>
1851
1685
 
1852
1686
  <xsl:attribute-set name="quote-style">
1853
1687
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
1854
1688
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
1855
-
1856
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1857
- <xsl:attribute name="margin-left">13mm</xsl:attribute>
1858
-
1689
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1690
+ <xsl:attribute name="margin-left">13mm</xsl:attribute>
1859
1691
  </xsl:attribute-set>
1860
1692
 
1861
1693
  <xsl:template name="refine_quote-style">
1862
-
1863
1694
  </xsl:template>
1864
1695
 
1865
1696
  <xsl:attribute-set name="quote-source-style">
1866
1697
  <xsl:attribute name="text-align">right</xsl:attribute>
1867
-
1868
- <xsl:attribute name="margin-right">25mm</xsl:attribute>
1869
-
1698
+ <xsl:attribute name="margin-right">25mm</xsl:attribute>
1870
1699
  </xsl:attribute-set>
1871
1700
 
1872
1701
  <xsl:attribute-set name="termsource-style">
1873
-
1874
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1875
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1876
-
1702
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1703
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1877
1704
  </xsl:attribute-set>
1878
1705
 
1879
1706
  <xsl:template name="refine_termsource-style">
1880
-
1881
1707
  </xsl:template> <!-- refine_termsource-style -->
1882
1708
 
1883
1709
  <xsl:attribute-set name="termsource-text-style">
1884
-
1885
1710
  </xsl:attribute-set>
1886
1711
 
1887
1712
  <xsl:attribute-set name="origin-style">
1888
-
1889
- <xsl:attribute name="color">blue</xsl:attribute>
1890
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1891
-
1713
+ <xsl:attribute name="color">blue</xsl:attribute>
1714
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1892
1715
  </xsl:attribute-set>
1893
1716
 
1894
1717
  <xsl:attribute-set name="term-style">
1895
-
1896
1718
  </xsl:attribute-set>
1897
1719
 
1898
1720
  <xsl:attribute-set name="term-name-style">
1899
1721
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1900
1722
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1901
-
1902
1723
  </xsl:attribute-set>
1903
1724
 
1904
1725
  <xsl:attribute-set name="figure-block-style">
1905
1726
  <xsl:attribute name="role">SKIP</xsl:attribute>
1906
-
1907
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1908
-
1727
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1909
1728
  </xsl:attribute-set>
1910
1729
 
1911
1730
  <xsl:template name="refine_figure-block-style">
1912
-
1913
1731
  </xsl:template>
1914
1732
 
1915
1733
  <xsl:attribute-set name="figure-style">
1916
-
1917
1734
  </xsl:attribute-set>
1918
1735
 
1919
1736
  <xsl:attribute-set name="figure-name-style">
1920
1737
  <xsl:attribute name="role">Caption</xsl:attribute>
1921
-
1922
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1923
- <xsl:attribute name="text-align">left</xsl:attribute>
1924
- <xsl:attribute name="color">rgb(68, 84, 106)</xsl:attribute>
1925
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1926
- <xsl:attribute name="font-style">italic</xsl:attribute>
1927
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
1928
- <xsl:attribute name="space-after">6pt</xsl:attribute>
1929
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1930
-
1738
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1739
+ <xsl:attribute name="text-align">left</xsl:attribute>
1740
+ <xsl:attribute name="color">rgb(68, 84, 106)</xsl:attribute>
1741
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1742
+ <xsl:attribute name="font-style">italic</xsl:attribute>
1743
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
1744
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
1745
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1931
1746
  </xsl:attribute-set>
1932
1747
 
1933
1748
  <xsl:template name="refine_figure-name-style">
1934
-
1935
1749
  </xsl:template> <!-- refine_figure-name-style -->
1936
1750
 
1937
1751
  <xsl:attribute-set name="figure-source-style">
1938
-
1939
1752
  </xsl:attribute-set>
1940
1753
 
1941
1754
  <!-- Formula's styles -->
1942
1755
  <xsl:attribute-set name="formula-style">
1943
1756
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
1944
1757
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1945
-
1946
1758
  </xsl:attribute-set> <!-- formula-style -->
1947
1759
 
1948
1760
  <xsl:attribute-set name="formula-stem-block-style">
1949
1761
  <xsl:attribute name="text-align">center</xsl:attribute>
1950
-
1951
- <xsl:attribute name="text-align">left</xsl:attribute>
1952
- <xsl:attribute name="margin-left">5mm</xsl:attribute>
1953
-
1762
+ <xsl:attribute name="text-align">left</xsl:attribute>
1763
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
1954
1764
  </xsl:attribute-set> <!-- formula-stem-block-style -->
1955
1765
 
1956
1766
  <xsl:template name="refine_formula-stem-block-style">
1957
-
1958
1767
  </xsl:template> <!-- refine_formula-stem-block-style -->
1959
1768
 
1960
1769
  <xsl:attribute-set name="formula-stem-number-style">
1961
1770
  <xsl:attribute name="text-align">right</xsl:attribute>
1962
-
1963
1771
  </xsl:attribute-set> <!-- formula-stem-number-style -->
1964
1772
  <!-- End Formula's styles -->
1965
1773
 
1966
1774
  <xsl:template name="refine_formula-stem-number-style">
1967
-
1968
1775
  </xsl:template>
1969
1776
 
1970
1777
  <xsl:attribute-set name="image-style">
1971
1778
  <xsl:attribute name="role">SKIP</xsl:attribute>
1972
1779
  <xsl:attribute name="text-align">center</xsl:attribute>
1973
-
1974
- <xsl:attribute name="space-before">12pt</xsl:attribute>
1975
- <xsl:attribute name="space-after">0pt</xsl:attribute>
1976
-
1780
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
1781
+ <xsl:attribute name="space-after">0pt</xsl:attribute>
1977
1782
  </xsl:attribute-set>
1978
1783
 
1979
1784
  <xsl:template name="refine_image-style">
1980
-
1981
1785
  </xsl:template>
1982
1786
 
1983
1787
  <xsl:attribute-set name="figure-pseudocode-p-style">
1984
-
1985
1788
  </xsl:attribute-set>
1986
1789
 
1987
1790
  <xsl:attribute-set name="image-graphic-style">
1988
1791
  <xsl:attribute name="width">100%</xsl:attribute>
1989
1792
  <xsl:attribute name="content-height">100%</xsl:attribute>
1990
1793
  <xsl:attribute name="scaling">uniform</xsl:attribute>
1991
-
1992
- <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
1993
-
1794
+ <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
1994
1795
  </xsl:attribute-set>
1995
1796
 
1996
1797
  <xsl:attribute-set name="tt-style">
1997
-
1998
- <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1999
-
1798
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
2000
1799
  </xsl:attribute-set>
2001
1800
 
2002
1801
  <xsl:attribute-set name="sourcecode-name-style">
@@ -2005,56 +1804,44 @@
2005
1804
  <xsl:attribute name="text-align">center</xsl:attribute>
2006
1805
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2007
1806
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2008
-
2009
1807
  </xsl:attribute-set>
2010
1808
 
2011
1809
  <xsl:attribute-set name="preferred-block-style">
2012
-
2013
1810
  </xsl:attribute-set>
2014
1811
 
2015
1812
  <xsl:attribute-set name="preferred-term-style">
2016
1813
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2017
1814
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2018
-
2019
- <xsl:attribute name="line-height">1</xsl:attribute>
2020
-
1815
+ <xsl:attribute name="line-height">1</xsl:attribute>
2021
1816
  </xsl:attribute-set>
2022
1817
 
2023
1818
  <xsl:attribute-set name="domain-style">
2024
-
2025
1819
  </xsl:attribute-set>
2026
1820
 
2027
1821
  <xsl:attribute-set name="admitted-style">
2028
-
2029
- <xsl:attribute name="font-size">11pt</xsl:attribute>
2030
-
1822
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
2031
1823
  </xsl:attribute-set>
2032
1824
 
2033
1825
  <xsl:attribute-set name="deprecates-style">
2034
-
2035
1826
  </xsl:attribute-set>
2036
1827
 
2037
1828
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
2038
1829
  </xsl:attribute-set>
2039
1830
 
2040
1831
  <xsl:attribute-set name="definition-style">
2041
-
2042
- <xsl:attribute name="space-after">6pt</xsl:attribute>
2043
-
1832
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
2044
1833
  </xsl:attribute-set>
2045
1834
 
2046
1835
  <xsl:variable name="color-added-text">
2047
1836
  <xsl:text>rgb(0, 255, 0)</xsl:text>
2048
1837
  </xsl:variable>
2049
1838
  <xsl:attribute-set name="add-style">
2050
-
2051
- <xsl:attribute name="color">red</xsl:attribute>
2052
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
2053
- <!-- <xsl:attribute name="color">black</xsl:attribute>
1839
+ <xsl:attribute name="color">red</xsl:attribute>
1840
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1841
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
2054
1842
  <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
2055
1843
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
2056
1844
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
2057
-
2058
1845
  </xsl:attribute-set>
2059
1846
 
2060
1847
  <xsl:variable name="add-style">
@@ -2074,57 +1861,43 @@
2074
1861
 
2075
1862
  <xsl:attribute-set name="mathml-style">
2076
1863
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
2077
-
2078
1864
  </xsl:attribute-set>
2079
1865
 
2080
1866
  <xsl:template name="refine_mathml-style">
2081
-
2082
1867
  </xsl:template>
2083
1868
 
2084
1869
  <xsl:attribute-set name="list-style">
2085
-
2086
- <xsl:attribute name="provisional-distance-between-starts">6.5mm</xsl:attribute>
2087
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2088
- <xsl:attribute name="line-height">115%</xsl:attribute>
2089
-
1870
+ <xsl:attribute name="provisional-distance-between-starts">6.5mm</xsl:attribute>
1871
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1872
+ <xsl:attribute name="line-height">115%</xsl:attribute>
2090
1873
  </xsl:attribute-set> <!-- list-style -->
2091
1874
 
2092
1875
  <xsl:template name="refine_list-style">
2093
-
2094
1876
  </xsl:template> <!-- refine_list-style -->
2095
1877
 
2096
1878
  <xsl:attribute-set name="list-name-style">
2097
1879
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2098
-
2099
- <xsl:attribute name="color">rgb(68, 84, 106)</xsl:attribute>
2100
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2101
-
1880
+ <xsl:attribute name="color">rgb(68, 84, 106)</xsl:attribute>
1881
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2102
1882
  </xsl:attribute-set> <!-- list-name-style -->
2103
1883
 
2104
1884
  <xsl:attribute-set name="list-item-style">
2105
-
2106
1885
  </xsl:attribute-set>
2107
1886
 
2108
1887
  <xsl:template name="refine_list-item-style">
2109
-
2110
1888
  </xsl:template> <!-- refine_list-item-style -->
2111
1889
 
2112
1890
  <xsl:attribute-set name="list-item-label-style">
2113
-
2114
1891
  </xsl:attribute-set>
2115
1892
 
2116
1893
  <xsl:template name="refine_list-item-label-style">
2117
-
2118
1894
  </xsl:template> <!-- refine_list-item-label-style -->
2119
1895
 
2120
1896
  <xsl:attribute-set name="list-item-body-style">
2121
-
2122
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
2123
-
1897
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
2124
1898
  </xsl:attribute-set>
2125
1899
 
2126
1900
  <xsl:template name="refine_list-item-body-style">
2127
-
2128
1901
  </xsl:template> <!-- refine_list-item-body-style -->
2129
1902
 
2130
1903
  <xsl:attribute-set name="toc-style">
@@ -2134,15 +1907,13 @@
2134
1907
  <xsl:attribute-set name="fn-reference-style">
2135
1908
  <xsl:attribute name="font-size">80%</xsl:attribute>
2136
1909
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2137
-
2138
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2139
- <xsl:attribute name="color">blue</xsl:attribute>
2140
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1910
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1911
+ <xsl:attribute name="color">blue</xsl:attribute>
1912
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2141
1913
 
2142
1914
  </xsl:attribute-set>
2143
1915
 
2144
1916
  <xsl:template name="refine_fn-reference-style">
2145
-
2146
1917
  </xsl:template> <!-- refine_fn-reference-style -->
2147
1918
 
2148
1919
  <xsl:attribute-set name="fn-style">
@@ -2151,10 +1922,8 @@
2151
1922
 
2152
1923
  <xsl:attribute-set name="fn-num-style">
2153
1924
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2154
-
2155
- <xsl:attribute name="font-size">65%</xsl:attribute>
2156
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2157
-
1925
+ <xsl:attribute name="font-size">65%</xsl:attribute>
1926
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2158
1927
  </xsl:attribute-set>
2159
1928
 
2160
1929
  <xsl:attribute-set name="fn-body-style">
@@ -2162,131 +1931,100 @@
2162
1931
  <xsl:attribute name="font-style">normal</xsl:attribute>
2163
1932
  <xsl:attribute name="text-indent">0</xsl:attribute>
2164
1933
  <xsl:attribute name="start-indent">0</xsl:attribute>
2165
-
2166
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2167
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2168
- <xsl:attribute name="color">black</xsl:attribute>
2169
- <xsl:attribute name="text-align">justify</xsl:attribute>
2170
-
1934
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1935
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1936
+ <xsl:attribute name="color">black</xsl:attribute>
1937
+ <xsl:attribute name="text-align">justify</xsl:attribute>
2171
1938
  </xsl:attribute-set>
2172
1939
 
2173
1940
  <xsl:template name="refine_fn-body-style">
2174
-
2175
1941
  </xsl:template> <!-- refine_fn-body-style -->
2176
1942
 
2177
1943
  <xsl:attribute-set name="fn-body-num-style">
2178
1944
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
2179
-
2180
- <xsl:attribute name="font-size">60%</xsl:attribute>
2181
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2182
-
1945
+ <xsl:attribute name="font-size">60%</xsl:attribute>
1946
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2183
1947
  </xsl:attribute-set> <!-- fn-body-num-style -->
2184
1948
 
2185
1949
  <xsl:template name="refine_fn-body-num-style">
2186
-
2187
1950
  </xsl:template> <!-- refine_fn-body-num-style -->
2188
1951
 
2189
1952
  <!-- admonition -->
2190
1953
  <xsl:attribute-set name="admonition-style">
2191
-
2192
- <xsl:attribute name="border">0.5pt solid rgb(79, 129, 189)</xsl:attribute>
2193
- <xsl:attribute name="color">rgb(79, 129, 189)</xsl:attribute>
2194
- <xsl:attribute name="margin-left">16mm</xsl:attribute>
2195
- <xsl:attribute name="margin-right">16mm</xsl:attribute>
2196
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2197
-
1954
+ <xsl:attribute name="border">0.5pt solid rgb(79, 129, 189)</xsl:attribute>
1955
+ <xsl:attribute name="color">rgb(79, 129, 189)</xsl:attribute>
1956
+ <xsl:attribute name="margin-left">16mm</xsl:attribute>
1957
+ <xsl:attribute name="margin-right">16mm</xsl:attribute>
1958
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2198
1959
  </xsl:attribute-set> <!-- admonition-style -->
2199
1960
 
2200
1961
  <xsl:attribute-set name="admonition-container-style">
2201
1962
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2202
1963
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
2203
-
2204
- <xsl:attribute name="padding">2mm</xsl:attribute>
2205
- <xsl:attribute name="padding-top">3mm</xsl:attribute>
2206
-
1964
+ <xsl:attribute name="padding">2mm</xsl:attribute>
1965
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
2207
1966
  </xsl:attribute-set> <!-- admonition-container-style -->
2208
1967
 
2209
1968
  <xsl:attribute-set name="admonition-name-style">
2210
1969
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2211
-
2212
- <xsl:attribute name="font-size">11pt</xsl:attribute>
2213
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2214
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2215
- <xsl:attribute name="font-style">italic</xsl:attribute>
2216
- <xsl:attribute name="text-align">center</xsl:attribute>
2217
-
1970
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1971
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1972
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1973
+ <xsl:attribute name="font-style">italic</xsl:attribute>
1974
+ <xsl:attribute name="text-align">center</xsl:attribute>
2218
1975
  </xsl:attribute-set> <!-- admonition-name-style -->
2219
1976
 
2220
1977
  <xsl:attribute-set name="admonition-p-style">
2221
-
2222
- <xsl:attribute name="font-style">italic</xsl:attribute>
2223
-
1978
+ <xsl:attribute name="font-style">italic</xsl:attribute>
2224
1979
  </xsl:attribute-set> <!-- admonition-p-style -->
2225
1980
  <!-- end admonition -->
2226
1981
 
2227
1982
  <!-- bibitem in Normative References (references/@normative="true") -->
2228
1983
  <xsl:attribute-set name="bibitem-normative-style">
2229
-
2230
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2231
- <xsl:attribute name="start-indent">12mm</xsl:attribute>
2232
- <xsl:attribute name="text-indent">-12mm</xsl:attribute>
2233
- <xsl:attribute name="line-height">115%</xsl:attribute>
2234
-
1984
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1985
+ <xsl:attribute name="start-indent">12mm</xsl:attribute>
1986
+ <xsl:attribute name="text-indent">-12mm</xsl:attribute>
1987
+ <xsl:attribute name="line-height">115%</xsl:attribute>
2235
1988
  </xsl:attribute-set> <!-- bibitem-normative-style -->
2236
1989
 
2237
1990
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
2238
1991
  <xsl:attribute-set name="bibitem-normative-list-style">
2239
1992
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
2240
1993
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2241
-
2242
- <!-- <xsl:if test="$namespace = 'ieee'">
2243
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2244
- <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
2245
- </xsl:if> -->
2246
-
2247
1994
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
2248
1995
 
2249
1996
  <xsl:attribute-set name="bibitem-non-normative-style">
2250
-
2251
1997
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
2252
1998
 
2253
1999
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
2254
2000
  <xsl:attribute-set name="bibitem-non-normative-list-style">
2255
2001
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
2256
2002
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2257
-
2258
2003
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
2259
2004
 
2260
2005
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
2261
2006
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2262
-
2263
2007
  </xsl:attribute-set>
2264
2008
 
2265
2009
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
2266
2010
  <xsl:attribute-set name="bibitem-normative-list-body-style">
2267
-
2268
2011
  </xsl:attribute-set>
2269
2012
 
2270
2013
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
2271
-
2272
2014
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
2273
2015
 
2274
2016
  <!-- footnote reference number for bibitem, in the text -->
2275
2017
  <xsl:attribute-set name="bibitem-note-fn-style">
2276
2018
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2277
2019
  <xsl:attribute name="font-size">65%</xsl:attribute>
2278
-
2279
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2280
-
2020
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2281
2021
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
2282
2022
 
2283
2023
  <!-- footnote number on the page bottom -->
2284
2024
  <xsl:attribute-set name="bibitem-note-fn-number-style">
2285
2025
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
2286
-
2287
- <xsl:attribute name="font-size">60%</xsl:attribute>
2288
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2289
-
2026
+ <xsl:attribute name="font-size">60%</xsl:attribute>
2027
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2290
2028
  </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
2291
2029
 
2292
2030
  <!-- footnote body (text) on the page bottom -->
@@ -2294,13 +2032,10 @@
2294
2032
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2295
2033
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2296
2034
  <xsl:attribute name="start-indent">0pt</xsl:attribute>
2297
-
2298
2035
  </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
2299
2036
 
2300
2037
  <xsl:attribute-set name="references-non-normative-style">
2301
-
2302
- <xsl:attribute name="line-height">120%</xsl:attribute>
2303
-
2038
+ <xsl:attribute name="line-height">120%</xsl:attribute>
2304
2039
  </xsl:attribute-set> <!-- references-non-normative-style -->
2305
2040
 
2306
2041
  <!-- Highlight.js syntax GitHub styles -->
@@ -2460,12 +2195,10 @@
2460
2195
  <!-- Index section styles -->
2461
2196
  <xsl:attribute-set name="indexsect-title-style">
2462
2197
  <xsl:attribute name="role">H1</xsl:attribute>
2463
-
2464
2198
  </xsl:attribute-set>
2465
2199
 
2466
2200
  <xsl:attribute-set name="indexsect-clause-title-style">
2467
2201
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2468
-
2469
2202
  </xsl:attribute-set>
2470
2203
 
2471
2204
  <!-- End Index section styles -->
@@ -2542,47 +2275,47 @@
2542
2275
  </xsl:template>
2543
2276
 
2544
2277
  <xsl:template name="processTables_Contents">
2545
- <tables>
2278
+ <mn:tables>
2546
2279
  <xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
2547
2280
  <xsl:choose>
2548
2281
  <xsl:when test="*[local-name() = 'fmt-name']">
2549
2282
  <xsl:variable name="fmt_name">
2550
2283
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
2551
2284
  </xsl:variable>
2552
- <table id="{@id}" alt-text="{normalize-space($fmt_name)}">
2285
+ <mn:table id="{@id}" alt-text="{normalize-space($fmt_name)}">
2553
2286
  <xsl:copy-of select="$fmt_name"/>
2554
- </table>
2287
+ </mn:table>
2555
2288
  </xsl:when>
2556
2289
  <xsl:otherwise>
2557
- <table id="{@id}" alt-text="{*[local-name() = 'name']}">
2290
+ <mn:table id="{@id}" alt-text="{*[local-name() = 'name']}">
2558
2291
  <xsl:copy-of select="*[local-name() = 'name']"/>
2559
- </table>
2292
+ </mn:table>
2560
2293
  </xsl:otherwise>
2561
2294
  </xsl:choose>
2562
2295
  </xsl:for-each>
2563
- </tables>
2296
+ </mn:tables>
2564
2297
  </xsl:template>
2565
2298
 
2566
2299
  <xsl:template name="processFigures_Contents">
2567
- <figures>
2300
+ <mn:figures>
2568
2301
  <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) != '']">
2569
2302
  <xsl:choose>
2570
2303
  <xsl:when test="*[local-name() = 'fmt-name']">
2571
2304
  <xsl:variable name="fmt_name">
2572
2305
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
2573
2306
  </xsl:variable>
2574
- <figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
2307
+ <mn:figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
2575
2308
  <xsl:copy-of select="$fmt_name"/>
2576
- </figure>
2309
+ </mn:figure>
2577
2310
  </xsl:when>
2578
2311
  <xsl:otherwise>
2579
- <figure id="{@id}" alt-text="{*[local-name() = 'name']}">
2312
+ <mn:figure id="{@id}" alt-text="{*[local-name() = 'name']}">
2580
2313
  <xsl:copy-of select="*[local-name() = 'name']"/>
2581
- </figure>
2314
+ </mn:figure>
2582
2315
  </xsl:otherwise>
2583
2316
  </xsl:choose>
2584
2317
  </xsl:for-each>
2585
- </figures>
2318
+ </mn:figures>
2586
2319
  </xsl:template>
2587
2320
 
2588
2321
  <xsl:template name="processPrefaceSectionsDefault">
@@ -2601,7 +2334,6 @@
2601
2334
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2602
2335
  <xsl:sort select="@displayorder" data-type="number"/>
2603
2336
  <xsl:apply-templates select="."/>
2604
-
2605
2337
  </xsl:for-each>
2606
2338
 
2607
2339
  <xsl:for-each select="/*/*[local-name()='annex']">
@@ -2708,7 +2440,6 @@
2708
2440
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2709
2441
  <xsl:sort select="@displayorder" data-type="number"/>
2710
2442
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2711
-
2712
2443
  </xsl:for-each>
2713
2444
  </xsl:element>
2714
2445
  </xsl:element>
@@ -2842,7 +2573,6 @@
2842
2573
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak">
2843
2574
  <xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
2844
2575
  </xsl:apply-templates>
2845
-
2846
2576
  </xsl:for-each>
2847
2577
  </xsl:element>
2848
2578
 
@@ -2882,19 +2612,17 @@
2882
2612
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
2883
2613
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
2884
2614
  <xsl:template match="text()" name="text">
2885
-
2886
- <xsl:choose>
2887
- <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
2888
- <xsl:otherwise>
2889
- <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))"/>
2890
- <xsl:call-template name="replace_fo_inline_tags">
2891
- <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
2892
- <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
2893
- <xsl:with-param name="text" select="$text"/>
2894
- </xsl:call-template>
2895
- </xsl:otherwise>
2896
- </xsl:choose>
2897
-
2615
+ <xsl:choose>
2616
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
2617
+ <xsl:otherwise>
2618
+ <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))"/>
2619
+ <xsl:call-template name="replace_fo_inline_tags">
2620
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
2621
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
2622
+ <xsl:with-param name="text" select="$text"/>
2623
+ </xsl:call-template>
2624
+ </xsl:otherwise>
2625
+ </xsl:choose>
2898
2626
  </xsl:template>
2899
2627
 
2900
2628
  <xsl:template name="replace_fo_inline_tags">
@@ -2948,7 +2676,7 @@
2948
2676
  <xsl:with-param name="keep_sep">true</xsl:with-param>
2949
2677
  </xsl:call-template>
2950
2678
  </xsl:variable>
2951
- <xsl:for-each select="xalan:nodeset($items)/item">
2679
+ <xsl:for-each select="xalan:nodeset($items)/mn:item">
2952
2680
  <xsl:choose>
2953
2681
  <xsl:when test=". = $sep">
2954
2682
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
@@ -2977,28 +2705,25 @@
2977
2705
  </xsl:template> <!-- copyright-statement -->
2978
2706
 
2979
2707
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
2980
-
2981
- <xsl:variable name="level">
2982
- <xsl:call-template name="getLevel"/>
2983
- </xsl:variable>
2984
- <fo:block role="H{$level}" xsl:use-attribute-sets="copyright-statement-title-style">
2985
- <xsl:apply-templates/>
2986
- </fo:block>
2708
+ <xsl:variable name="level">
2709
+ <xsl:call-template name="getLevel"/>
2710
+ </xsl:variable>
2711
+ <fo:block role="H{$level}" xsl:use-attribute-sets="copyright-statement-title-style">
2712
+ <xsl:apply-templates/>
2713
+ </fo:block>
2987
2714
 
2988
2715
  </xsl:template> <!-- copyright-statement//title -->
2989
2716
 
2990
2717
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
2718
+ <fo:block xsl:use-attribute-sets="copyright-statement-p-style">
2719
+ <xsl:if test="@align">
2720
+ <xsl:attribute name="text-align">
2721
+ <xsl:value-of select="@align"/>
2722
+ </xsl:attribute>
2723
+ </xsl:if>
2991
2724
 
2992
- <fo:block xsl:use-attribute-sets="copyright-statement-p-style">
2993
-
2994
- <xsl:if test="@align">
2995
- <xsl:attribute name="text-align">
2996
- <xsl:value-of select="@align"/>
2997
- </xsl:attribute>
2998
- </xsl:if>
2999
-
3000
- <xsl:apply-templates/>
3001
- </fo:block>
2725
+ <xsl:apply-templates/>
2726
+ </fo:block>
3002
2727
 
3003
2728
  </xsl:template> <!-- copyright-statement//p -->
3004
2729
 
@@ -3009,63 +2734,57 @@
3009
2734
  </xsl:template> <!-- license-statement -->
3010
2735
 
3011
2736
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
3012
-
3013
- <xsl:variable name="level">
3014
- <xsl:call-template name="getLevel"/>
3015
- </xsl:variable>
3016
- <fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
3017
- <xsl:apply-templates/>
3018
- </fo:block>
2737
+ <xsl:variable name="level">
2738
+ <xsl:call-template name="getLevel"/>
2739
+ </xsl:variable>
2740
+ <fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
2741
+ <xsl:apply-templates/>
2742
+ </fo:block>
3019
2743
 
3020
2744
  </xsl:template> <!-- license-statement/title -->
3021
2745
 
3022
2746
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
2747
+ <fo:block xsl:use-attribute-sets="license-statement-p-style">
2748
+ <xsl:if test="following-sibling::*[local-name() = 'p']">
2749
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
2750
+ </xsl:if>
3023
2751
 
3024
- <fo:block xsl:use-attribute-sets="license-statement-p-style">
3025
-
3026
- <xsl:if test="following-sibling::*[local-name() = 'p']">
3027
- <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
3028
- </xsl:if>
3029
-
3030
- <xsl:apply-templates/>
3031
- </fo:block>
2752
+ <xsl:apply-templates/>
2753
+ </fo:block>
3032
2754
 
3033
2755
  </xsl:template> <!-- license-statement/p -->
3034
2756
 
3035
2757
  <xsl:template match="*[local-name()='legal-statement']">
3036
2758
  <xsl:param name="isLegacy">false</xsl:param>
3037
2759
  <fo:block xsl:use-attribute-sets="legal-statement-style">
3038
-
3039
2760
  <xsl:apply-templates/>
3040
2761
  </fo:block>
3041
2762
  </xsl:template> <!-- legal-statement -->
3042
2763
 
3043
2764
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
3044
-
3045
- <!-- ogc-white-paper rsd -->
3046
- <xsl:variable name="level">
3047
- <xsl:call-template name="getLevel"/>
3048
- </xsl:variable>
3049
- <fo:block role="H{$level}" xsl:use-attribute-sets="legal-statement-title-style">
3050
- <xsl:apply-templates/>
3051
- </fo:block>
2765
+ <!-- ogc-white-paper rsd -->
2766
+ <xsl:variable name="level">
2767
+ <xsl:call-template name="getLevel"/>
2768
+ </xsl:variable>
2769
+ <fo:block role="H{$level}" xsl:use-attribute-sets="legal-statement-title-style">
2770
+ <xsl:apply-templates/>
2771
+ </fo:block>
3052
2772
 
3053
2773
  </xsl:template> <!-- legal-statement/title -->
3054
2774
 
3055
2775
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
3056
2776
  <xsl:param name="margin"/>
2777
+ <!-- csa -->
2778
+ <fo:block xsl:use-attribute-sets="legal-statement-p-style">
3057
2779
 
3058
- <!-- csa -->
3059
- <fo:block xsl:use-attribute-sets="legal-statement-p-style">
3060
-
3061
- <xsl:if test="@align">
3062
- <xsl:attribute name="text-align">
3063
- <xsl:value-of select="@align"/>
3064
- </xsl:attribute>
3065
- </xsl:if>
2780
+ <xsl:if test="@align">
2781
+ <xsl:attribute name="text-align">
2782
+ <xsl:value-of select="@align"/>
2783
+ </xsl:attribute>
2784
+ </xsl:if>
3066
2785
 
3067
- <xsl:apply-templates/>
3068
- </fo:block>
2786
+ <xsl:apply-templates/>
2787
+ </fo:block>
3069
2788
 
3070
2789
  </xsl:template> <!-- legal-statement/p -->
3071
2790
 
@@ -3076,20 +2795,16 @@
3076
2795
  </xsl:template> <!-- feedback-statement -->
3077
2796
 
3078
2797
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
3079
-
3080
- <!-- process in the template 'title' -->
3081
- <xsl:call-template name="title"/>
3082
-
2798
+ <!-- process in the template 'title' -->
2799
+ <xsl:call-template name="title"/>
3083
2800
  </xsl:template>
3084
2801
 
3085
2802
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
3086
2803
  <xsl:param name="margin"/>
3087
-
3088
- <!-- process in the template 'paragraph' -->
3089
- <xsl:call-template name="paragraph">
3090
- <xsl:with-param name="margin" select="$margin"/>
3091
- </xsl:call-template>
3092
-
2804
+ <!-- process in the template 'paragraph' -->
2805
+ <xsl:call-template name="paragraph">
2806
+ <xsl:with-param name="margin" select="$margin"/>
2807
+ </xsl:call-template>
3093
2808
  </xsl:template>
3094
2809
 
3095
2810
  <!-- ================================= -->
@@ -3142,7 +2857,6 @@
3142
2857
  <xsl:template match="*[local-name()='table']" name="table">
3143
2858
 
3144
2859
  <xsl:variable name="table-preamble">
3145
-
3146
2860
  </xsl:variable>
3147
2861
 
3148
2862
  <xsl:variable name="table">
@@ -3160,8 +2874,7 @@
3160
2874
 
3161
2875
  <!-- Display table's name before table as standalone block -->
3162
2876
  <!-- $namespace = 'iso' or -->
3163
-
3164
- <xsl:call-template name="table_name_fn_display"/>
2877
+ <xsl:call-template name="table_name_fn_display"/>
3165
2878
 
3166
2879
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
3167
2880
 
@@ -3215,12 +2928,11 @@
3215
2928
  <xsl:variable name="table_width_default">100%</xsl:variable>
3216
2929
  <xsl:variable name="table_width">
3217
2930
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
3218
-
3219
- <xsl:choose>
3220
- <xsl:when test="@width = 'full-page-width' or @width = 'text-width'">100%</xsl:when>
3221
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
3222
- <xsl:otherwise><xsl:value-of select="$table_width_default"/></xsl:otherwise>
3223
- </xsl:choose>
2931
+ <xsl:choose>
2932
+ <xsl:when test="@width = 'full-page-width' or @width = 'text-width'">100%</xsl:when>
2933
+ <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
2934
+ <xsl:otherwise><xsl:value-of select="$table_width_default"/></xsl:otherwise>
2935
+ </xsl:choose>
3224
2936
 
3225
2937
  </xsl:variable>
3226
2938
 
@@ -3334,8 +3046,7 @@
3334
3046
  <xsl:with-param name="colgroup" select="$colgroup"/>
3335
3047
  </xsl:call-template>
3336
3048
  </xsl:for-each>
3337
-
3338
- <xsl:apply-templates select="*[local-name()='name']"/>
3049
+ <xsl:apply-templates select="*[local-name()='name']"/>
3339
3050
 
3340
3051
  <!-- https://github.com/metanorma/metanorma-plateau/issues/171
3341
3052
  <xsl:if test="$namespace = 'plateau'">
@@ -3366,23 +3077,22 @@
3366
3077
  <xsl:when test="@width and @width != 'full-page-width' and @width != 'text-width'">
3367
3078
 
3368
3079
  <!-- centered table when table name is centered (see table-name-style) -->
3369
-
3370
- <xsl:choose>
3371
- <xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
3372
- <xsl:copy-of select="$table-preamble"/>
3373
- <fo:block>
3374
- <xsl:call-template name="setTrackChangesStyles">
3375
- <xsl:with-param name="isAdded" select="$isAdded"/>
3376
- <xsl:with-param name="isDeleted" select="$isDeleted"/>
3377
- </xsl:call-template>
3378
- <xsl:copy-of select="$table"/>
3379
- </fo:block>
3380
- </xsl:when>
3381
- <xsl:otherwise>
3382
- <xsl:copy-of select="$table-preamble"/>
3080
+ <xsl:choose>
3081
+ <xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
3082
+ <xsl:copy-of select="$table-preamble"/>
3083
+ <fo:block>
3084
+ <xsl:call-template name="setTrackChangesStyles">
3085
+ <xsl:with-param name="isAdded" select="$isAdded"/>
3086
+ <xsl:with-param name="isDeleted" select="$isDeleted"/>
3087
+ </xsl:call-template>
3383
3088
  <xsl:copy-of select="$table"/>
3384
- </xsl:otherwise>
3385
- </xsl:choose>
3089
+ </fo:block>
3090
+ </xsl:when>
3091
+ <xsl:otherwise>
3092
+ <xsl:copy-of select="$table-preamble"/>
3093
+ <xsl:copy-of select="$table"/>
3094
+ </xsl:otherwise>
3095
+ </xsl:choose>
3386
3096
 
3387
3097
  </xsl:when>
3388
3098
  <xsl:otherwise>
@@ -3408,7 +3118,6 @@
3408
3118
  </xsl:template>
3409
3119
 
3410
3120
  <xsl:template name="setBordersTableArray">
3411
-
3412
3121
  </xsl:template>
3413
3122
 
3414
3123
  <!-- table/name-->
@@ -3417,51 +3126,50 @@
3417
3126
  <xsl:param name="cols-count"/>
3418
3127
  <xsl:if test="normalize-space() != ''">
3419
3128
 
3420
- <fo:block xsl:use-attribute-sets="table-name-style">
3129
+ <fo:block xsl:use-attribute-sets="table-name-style">
3421
3130
 
3422
- <xsl:call-template name="refine_table-name-style">
3423
- <xsl:with-param name="continued" select="$continued"/>
3424
- </xsl:call-template>
3425
-
3426
- <xsl:choose>
3427
- <xsl:when test="$continued = 'true'">
3131
+ <xsl:call-template name="refine_table-name-style">
3132
+ <xsl:with-param name="continued" select="$continued"/>
3133
+ </xsl:call-template>
3428
3134
 
3429
- </xsl:when>
3430
- <xsl:otherwise>
3431
- <xsl:apply-templates/>
3432
- </xsl:otherwise>
3433
- </xsl:choose>
3135
+ <xsl:choose>
3136
+ <xsl:when test="$continued = 'true'">
3137
+ </xsl:when>
3138
+ <xsl:otherwise>
3139
+ <xsl:apply-templates/>
3140
+ </xsl:otherwise>
3141
+ </xsl:choose>
3434
3142
 
3435
- </fo:block>
3143
+ </fo:block>
3436
3144
 
3437
- <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
3438
- <xsl:if test="$continued = 'true'">
3145
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
3146
+ <xsl:if test="$continued = 'true'">
3439
3147
 
3440
- <!-- to prevent the error 'THead element may contain only TR elements' -->
3148
+ <!-- to prevent the error 'THead element may contain only TR elements' -->
3441
3149
 
3442
- <xsl:choose>
3443
- <xsl:when test="string(number($cols-count)) != 'NaN'">
3444
- <fo:table width="100%" table-layout="fixed" role="SKIP">
3445
- <fo:table-body role="SKIP">
3446
- <fo:table-row>
3447
- <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
3448
- <fo:block text-align="right" role="SKIP">
3449
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
3450
- </fo:block>
3451
- </fo:table-cell>
3452
- </fo:table-row>
3453
- </fo:table-body>
3454
- </fo:table>
3455
- </xsl:when>
3456
- <xsl:otherwise>
3457
- <fo:block text-align="right">
3458
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
3459
- </fo:block>
3460
- </xsl:otherwise>
3461
- </xsl:choose>
3150
+ <xsl:choose>
3151
+ <xsl:when test="string(number($cols-count)) != 'NaN'">
3152
+ <fo:table width="100%" table-layout="fixed" role="SKIP">
3153
+ <fo:table-body role="SKIP">
3154
+ <fo:table-row>
3155
+ <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
3156
+ <fo:block text-align="right" role="SKIP">
3157
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
3158
+ </fo:block>
3159
+ </fo:table-cell>
3160
+ </fo:table-row>
3161
+ </fo:table-body>
3162
+ </fo:table>
3163
+ </xsl:when>
3164
+ <xsl:otherwise>
3165
+ <fo:block text-align="right">
3166
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
3167
+ </fo:block>
3168
+ </xsl:otherwise>
3169
+ </xsl:choose>
3462
3170
 
3463
- </xsl:if>
3464
- <!-- </xsl:if> -->
3171
+ </xsl:if>
3172
+ <!-- </xsl:if> -->
3465
3173
 
3466
3174
  </xsl:if>
3467
3175
  </xsl:template> <!-- table/name -->
@@ -3836,7 +3544,6 @@
3836
3544
  <xsl:template match="*[local-name()='thead']">
3837
3545
  <xsl:param name="cols-count"/>
3838
3546
  <fo:table-header>
3839
-
3840
3547
  <xsl:apply-templates/>
3841
3548
  </fo:table-header>
3842
3549
  </xsl:template> <!-- thead -->
@@ -3850,21 +3557,20 @@
3850
3557
 
3851
3558
  <xsl:call-template name="refine_table-header-title-style"/>
3852
3559
 
3853
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
3854
- <xsl:with-param name="continued">true</xsl:with-param>
3855
- <xsl:with-param name="cols-count" select="$cols-count"/>
3856
- </xsl:apply-templates>
3560
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
3561
+ <xsl:with-param name="continued">true</xsl:with-param>
3562
+ <xsl:with-param name="cols-count" select="$cols-count"/>
3563
+ </xsl:apply-templates>
3857
3564
 
3858
- <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
3859
- <fo:block role="SKIP"/>
3860
- </xsl:if>
3565
+ <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
3566
+ <fo:block role="SKIP"/>
3567
+ </xsl:if>
3861
3568
 
3862
3569
  </fo:table-cell>
3863
3570
  </fo:table-row>
3864
3571
  </xsl:template> <!-- table-header-title -->
3865
3572
 
3866
3573
  <xsl:template name="refine_table-header-title-style">
3867
-
3868
3574
  </xsl:template> <!-- refine_table-header-title-style -->
3869
3575
 
3870
3576
  <xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -3894,7 +3600,6 @@
3894
3600
  <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']"/>
3895
3601
 
3896
3602
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
3897
-
3898
3603
  </xsl:variable>
3899
3604
 
3900
3605
  <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
@@ -3956,26 +3661,19 @@
3956
3661
  <xsl:call-template name="setBordersTableArray"/>
3957
3662
 
3958
3663
  <!-- fn will be processed inside 'note' processing -->
3959
-
3960
- <!-- for BSI (not PAS) display Notes before footnotes -->
3961
-
3962
- <!-- except gb and bsi -->
3963
-
3964
- <xsl:apply-templates select="../*[local-name()='p']"/>
3965
- <xsl:apply-templates select="../*[local-name()='dl']"/>
3966
- <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
3967
- <xsl:apply-templates select="../*[local-name()='example']"/>
3968
- <xsl:apply-templates select="../*[local-name()='source']"/>
3664
+ <xsl:apply-templates select="../*[local-name()='p']"/>
3665
+ <xsl:apply-templates select="../*[local-name()='dl']"/>
3666
+ <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
3667
+ <xsl:apply-templates select="../*[local-name()='example']"/>
3668
+ <xsl:apply-templates select="../*[local-name()='source']"/>
3969
3669
 
3970
3670
  <xsl:variable name="isDisplayRowSeparator">
3971
-
3972
3671
  </xsl:variable>
3973
3672
 
3974
3673
  <!-- horizontal row separator -->
3975
3674
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
3976
3675
  <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
3977
3676
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
3978
-
3979
3677
  <xsl:call-template name="setBordersTableArray"/>
3980
3678
  <fo:block font-size="1pt"> </fo:block>
3981
3679
  </fo:block-container>
@@ -3983,11 +3681,8 @@
3983
3681
  </xsl:if>
3984
3682
 
3985
3683
  <!-- fn processing -->
3986
-
3987
- <!-- <xsl:call-template name="table_fn_display" /> -->
3988
- <xsl:copy-of select="$table_fn_block"/>
3989
-
3990
- <!-- for PAS display Notes after footnotes -->
3684
+ <!-- <xsl:call-template name="table_fn_display" /> -->
3685
+ <xsl:copy-of select="$table_fn_block"/>
3991
3686
 
3992
3687
  </fo:table-cell>
3993
3688
  </fo:table-row>
@@ -4114,7 +3809,7 @@
4114
3809
  <xsl:with-param name="pText" select="$border_under_row_"/>
4115
3810
  </xsl:call-template>
4116
3811
  </xsl:variable>
4117
- <xsl:if test="xalan:nodeset($border_under_row)/item[. = normalize-space($row_num)]">
3812
+ <xsl:if test="xalan:nodeset($border_under_row)/mn:item[. = normalize-space($row_num)]">
4118
3813
  <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
4119
3814
  </xsl:if>
4120
3815
  </xsl:when>
@@ -4231,7 +3926,7 @@
4231
3926
  </xsl:variable>
4232
3927
  <xsl:variable name="quot">"</xsl:variable>
4233
3928
  <xsl:variable name="styles_">
4234
- <xsl:for-each select="xalan:nodeset($styles__)/item">
3929
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
4235
3930
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
4236
3931
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
4237
3932
  <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'">
@@ -4281,9 +3976,7 @@
4281
3976
  <fo:block role="SKIP">
4282
3977
 
4283
3978
  <xsl:if test="$isGenerateTableIF = 'true'">
4284
-
4285
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
4286
-
3979
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
4287
3980
  </xsl:if>
4288
3981
 
4289
3982
  <xsl:apply-templates/>
@@ -4298,25 +3991,23 @@
4298
3991
 
4299
3992
  <!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
4300
3993
  <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">
3994
+ <xsl:call-template name="setNamedDestination"/>
3995
+ <fo:block xsl:use-attribute-sets="table-note-style">
3996
+ <xsl:copy-of select="@id"/>
4301
3997
 
4302
- <xsl:call-template name="setNamedDestination"/>
4303
- <fo:block xsl:use-attribute-sets="table-note-style">
4304
- <xsl:copy-of select="@id"/>
4305
-
4306
- <xsl:call-template name="refine_table-note-style"/>
4307
-
4308
- <!-- Table's note/example name (NOTE, for example) -->
4309
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
3998
+ <xsl:call-template name="refine_table-note-style"/>
4310
3999
 
4311
- <xsl:call-template name="refine_table-note-name-style"/>
4000
+ <!-- Table's note/example name (NOTE, for example) -->
4001
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
4312
4002
 
4313
- <xsl:apply-templates select="*[local-name() = 'name']"/>
4003
+ <xsl:call-template name="refine_table-note-name-style"/>
4314
4004
 
4315
- </fo:inline>
4005
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4316
4006
 
4317
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4318
- </fo:block>
4007
+ </fo:inline>
4319
4008
 
4009
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4010
+ </fo:block>
4320
4011
  </xsl:template> <!-- table/note -->
4321
4012
 
4322
4013
  <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">
@@ -4361,9 +4052,7 @@
4361
4052
  <xsl:variable name="current_fn_number" select="@reference"/>
4362
4053
 
4363
4054
  <xsl:variable name="current_fn_number_text">
4364
-
4365
- <xsl:value-of select="$current_fn_number"/>
4366
-
4055
+ <xsl:value-of select="$current_fn_number"/>
4367
4056
  </xsl:variable>
4368
4057
 
4369
4058
  <xsl:variable name="ref_id" select="@target"/>
@@ -4375,12 +4064,10 @@
4375
4064
  <xsl:choose>
4376
4065
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
4377
4066
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
4378
-
4379
4067
  </fn_styles>
4380
4068
  </xsl:when>
4381
4069
  <xsl:otherwise>
4382
4070
  <fn_styles xsl:use-attribute-sets="fn-num-style">
4383
-
4384
4071
  </fn_styles>
4385
4072
  </xsl:otherwise>
4386
4073
  </xsl:choose>
@@ -4398,7 +4085,6 @@
4398
4085
  <xsl:with-param name="element">
4399
4086
  <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 -->
4400
4087
  <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
4401
-
4402
4088
  <xsl:copy-of select="$current_fn_number_text"/>
4403
4089
 
4404
4090
  </fo:inline>
@@ -4436,10 +4122,9 @@
4436
4122
  <here><xsl:copy-of select="$footnotes"/></here> -->
4437
4123
  <xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
4438
4124
  </xsl:variable>
4439
-
4440
- <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
4441
- <xsl:copy-of select="$fn_block"/>
4442
- </fo:block>
4125
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
4126
+ <xsl:copy-of select="$fn_block"/>
4127
+ </fo:block>
4443
4128
 
4444
4129
  </fo:block-container>
4445
4130
  </fo:footnote-body>
@@ -4516,21 +4201,20 @@
4516
4201
  <xsl:variable name="reference" select="@reference"/>
4517
4202
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
4518
4203
  <xsl:for-each select="..//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
4204
+ <fo:block xsl:use-attribute-sets="table-fn-style">
4205
+ <xsl:copy-of select="@id"/>
4206
+ <xsl:call-template name="refine_table-fn-style"/>
4519
4207
 
4520
- <fo:block xsl:use-attribute-sets="table-fn-style">
4521
- <xsl:copy-of select="@id"/>
4522
- <xsl:call-template name="refine_table-fn-style"/>
4523
-
4524
- <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
4525
- <xsl:with-param name="process">true</xsl:with-param>
4526
- </xsl:apply-templates>
4208
+ <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
4209
+ <xsl:with-param name="process">true</xsl:with-param>
4210
+ </xsl:apply-templates>
4527
4211
 
4528
- <fo:inline xsl:use-attribute-sets="table-fn-body-style">
4529
- <!-- <xsl:copy-of select="./node()"/> -->
4530
- <xsl:apply-templates/>
4531
- </fo:inline>
4212
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
4213
+ <!-- <xsl:copy-of select="./node()"/> -->
4214
+ <xsl:apply-templates/>
4215
+ </fo:inline>
4532
4216
 
4533
- </fo:block>
4217
+ </fo:block>
4534
4218
 
4535
4219
  <!-- </xsl:if> -->
4536
4220
  </xsl:for-each>
@@ -4583,7 +4267,6 @@
4583
4267
  <xsl:param name="process">false</xsl:param>
4584
4268
  <xsl:if test="$process = 'true'">
4585
4269
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
4586
-
4587
4270
  </xsl:if>
4588
4271
  </xsl:template>
4589
4272
 
@@ -4667,7 +4350,6 @@
4667
4350
  <xsl:if test="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
4668
4351
 
4669
4352
  <xsl:variable name="key_iso">
4670
-
4671
4353
  </xsl:variable>
4672
4354
 
4673
4355
  <fo:block>
@@ -4713,7 +4395,6 @@
4713
4395
  <fo:table width="95%" table-layout="fixed">
4714
4396
  <xsl:if test="normalize-space($key_iso) = 'true'">
4715
4397
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4716
-
4717
4398
  </xsl:if>
4718
4399
  <xsl:choose>
4719
4400
  <!-- if there 'dl', then set same columns width -->
@@ -4737,23 +4418,19 @@
4737
4418
  <fo:table-row>
4738
4419
  <fo:table-cell>
4739
4420
  <fo:block>
4740
-
4741
- <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
4742
- <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
4743
- <!-- <xsl:value-of select="@reference"/> -->
4744
- <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
4745
- </fo:inline>
4421
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
4422
+ <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
4423
+ <!-- <xsl:value-of select="@reference"/> -->
4424
+ <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
4425
+ </fo:inline>
4746
4426
 
4747
4427
  </fo:block>
4748
4428
  </fo:table-cell>
4749
4429
  <fo:table-cell>
4750
4430
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
4751
4431
  <xsl:if test="normalize-space($key_iso) = 'true'">
4752
-
4753
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
4754
-
4432
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
4755
4433
  </xsl:if>
4756
-
4757
4434
  <!-- <xsl:copy-of select="./node()"/> -->
4758
4435
  <xsl:apply-templates/>
4759
4436
  </fo:block>
@@ -4803,11 +4480,9 @@
4803
4480
  <!-- figure/dl[@key = 'true']/dt/p/sup -->
4804
4481
  <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">
4805
4482
  <xsl:variable name="key_iso">
4806
-
4807
4483
  </xsl:variable>
4808
4484
  <xsl:if test="normalize-space($key_iso) = 'true'">
4809
4485
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4810
-
4811
4486
  </xsl:if>
4812
4487
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
4813
4488
  <!-- <xsl:value-of select="@reference"/> -->
@@ -4853,8 +4528,7 @@
4853
4528
  <xsl:text>※</xsl:text>
4854
4529
  </xsl:if> -->
4855
4530
  <!-- <xsl:value-of select="@reference"/> -->
4856
-
4857
- <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
4531
+ <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
4858
4532
 
4859
4533
  <!-- <xsl:if test="$namespace = 'bsi'">
4860
4534
  <xsl:text>)</xsl:text>
@@ -4926,10 +4600,9 @@
4926
4600
  </xsl:if>
4927
4601
 
4928
4602
  <xsl:call-template name="setBlockSpanAll"/>
4929
-
4930
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
4931
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
4932
- </xsl:if>
4603
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
4604
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
4605
+ </xsl:if>
4933
4606
 
4934
4607
  <xsl:if test="ancestor::*[local-name() = 'sourcecode']">
4935
4608
  <!-- set font-size as sourcecode font-size -->
@@ -4950,7 +4623,6 @@
4950
4623
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
4951
4624
  </xsl:choose>
4952
4625
  </xsl:attribute>
4953
-
4954
4626
  </xsl:if>
4955
4627
 
4956
4628
  <xsl:call-template name="setTrackChangesStyles">
@@ -4959,37 +4631,32 @@
4959
4631
  </xsl:call-template>
4960
4632
 
4961
4633
  <fo:block-container margin-left="0mm" role="SKIP">
4962
-
4963
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
4634
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
4964
4635
 
4965
4636
  <xsl:variable name="parent" select="local-name(..)"/>
4966
4637
 
4967
- <xsl:variable name="key_iso">
4968
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
4638
+ <xsl:variable name="key_iso"> <!-- and (not(../@class) or ../@class !='pseudocode') -->
4969
4639
  </xsl:variable>
4970
4640
 
4971
4641
  <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(*[local-name()='dt']) = 1)"/>
4972
4642
 
4973
4643
  <xsl:choose>
4974
4644
  <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
4975
-
4976
- <fo:block margin-bottom="12pt" text-align="left">
4977
-
4978
- <!-- <xsl:variable name="title-where">
4645
+ <fo:block margin-bottom="12pt" text-align="left">
4646
+ <!-- <xsl:variable name="title-where">
4979
4647
  <xsl:call-template name="getLocalizedString">
4980
4648
  <xsl:with-param name="key">where</xsl:with-param>
4981
4649
  </xsl:call-template>
4982
4650
  </xsl:variable>
4983
4651
  <xsl:value-of select="$title-where"/> -->
4984
- <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
4985
- <xsl:text> </xsl:text>
4986
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
4987
- <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
4988
- <xsl:text> </xsl:text>
4989
- </xsl:if>
4990
- <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
4991
- </fo:block>
4992
-
4652
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
4653
+ <xsl:text> </xsl:text>
4654
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
4655
+ <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
4656
+ <xsl:text> </xsl:text>
4657
+ </xsl:if>
4658
+ <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
4659
+ </fo:block>
4993
4660
  </xsl:when> <!-- END: only one component -->
4994
4661
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
4995
4662
  <fo:block margin-bottom="12pt" text-align="left">
@@ -5009,19 +4676,17 @@
5009
4676
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
5010
4677
  <!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
5011
4678
  <xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
4679
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
5012
4680
 
5013
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
5014
-
5015
- <xsl:call-template name="refine_figure_key_style"/>
5016
-
5017
- <xsl:variable name="title-key">
5018
- <xsl:call-template name="getLocalizedString">
5019
- <xsl:with-param name="key">key</xsl:with-param>
5020
- </xsl:call-template>
5021
- </xsl:variable>
5022
- <xsl:value-of select="$title-key"/>
5023
- </fo:block>
4681
+ <xsl:call-template name="refine_figure_key_style"/>
5024
4682
 
4683
+ <xsl:variable name="title-key">
4684
+ <xsl:call-template name="getLocalizedString">
4685
+ <xsl:with-param name="key">key</xsl:with-param>
4686
+ </xsl:call-template>
4687
+ </xsl:variable>
4688
+ <xsl:value-of select="$title-key"/>
4689
+ </fo:block>
5025
4690
  </xsl:if>
5026
4691
  </xsl:when> <!-- END: definition list in a figure -->
5027
4692
  </xsl:choose>
@@ -5054,12 +4719,10 @@
5054
4719
  <xsl:if test="$isGenerateTableIF = 'true'">
5055
4720
  <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
5056
4721
  </xsl:if>
5057
-
5058
4722
  <xsl:choose>
5059
4723
  <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
5060
4724
  <xsl:when test="normalize-space($key_iso) = 'true'">
5061
4725
  <xsl:attribute name="font-size">10pt</xsl:attribute>
5062
-
5063
4726
  </xsl:when>
5064
4727
  </xsl:choose>
5065
4728
 
@@ -5164,17 +4827,15 @@
5164
4827
  <xsl:call-template name="getMaxLength_dt"/>
5165
4828
  </xsl:variable>
5166
4829
 
5167
- <xsl:variable name="isContainsKeepTogetherTag_">
5168
- false
4830
+ <xsl:variable name="isContainsKeepTogetherTag_">false
5169
4831
  </xsl:variable>
5170
4832
  <xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
5171
4833
  <!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
5172
-
5173
- <xsl:call-template name="setColumnWidth_dl">
5174
- <xsl:with-param name="colwidths" select="$colwidths"/>
5175
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
5176
- <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
5177
- </xsl:call-template>
4834
+ <xsl:call-template name="setColumnWidth_dl">
4835
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4836
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
4837
+ <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
4838
+ </xsl:call-template>
5178
4839
 
5179
4840
  <fo:table-body>
5180
4841
 
@@ -5225,21 +4886,17 @@
5225
4886
  </xsl:template>
5226
4887
 
5227
4888
  <xsl:template name="refine_dl_formula_where_style">
5228
-
5229
4889
  </xsl:template> <!-- refine_dl_formula_where_style -->
5230
4890
 
5231
4891
  <xsl:template name="refine_figure_key_style">
5232
-
5233
4892
  </xsl:template> <!-- refine_figure_key_style -->
5234
4893
 
5235
4894
  <xsl:template name="refine_multicomponent_style">
5236
4895
  <xsl:variable name="parent" select="local-name(..)"/>
5237
-
5238
4896
  </xsl:template> <!-- refine_multicomponent_style -->
5239
4897
 
5240
4898
  <xsl:template name="refine_multicomponent_block_style">
5241
4899
  <xsl:variable name="parent" select="local-name(..)"/>
5242
-
5243
4900
  </xsl:template> <!-- refine_multicomponent_block_style -->
5244
4901
 
5245
4902
  <!-- ignore 'p' with 'where' in formula, before 'dl' -->
@@ -5426,14 +5083,11 @@
5426
5083
  <xsl:attribute name="id">
5427
5084
  <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
5428
5085
  </xsl:attribute>
5429
-
5430
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
5431
- <xsl:with-param name="process">true</xsl:with-param>
5432
- </xsl:apply-templates>
5433
-
5086
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
5087
+ <xsl:with-param name="process">true</xsl:with-param>
5088
+ </xsl:apply-templates>
5434
5089
  </td>
5435
5090
  </tr>
5436
-
5437
5091
  </xsl:template>
5438
5092
 
5439
5093
  <!-- Definition's term -->
@@ -5442,7 +5096,6 @@
5442
5096
  <xsl:param name="split_keep-within-line"/>
5443
5097
 
5444
5098
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
5445
-
5446
5099
  <xsl:call-template name="insert_dt_cell">
5447
5100
  <xsl:with-param name="key_iso" select="$key_iso"/>
5448
5101
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -5464,7 +5117,6 @@
5464
5117
  <!-- border is mandatory, to calculate real width -->
5465
5118
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
5466
5119
  <xsl:attribute name="text-align">left</xsl:attribute>
5467
-
5468
5120
  </xsl:if>
5469
5121
 
5470
5122
  <xsl:call-template name="refine_dt-cell-style"/>
@@ -5474,9 +5126,7 @@
5474
5126
 
5475
5127
  <xsl:choose>
5476
5128
  <xsl:when test="$isGenerateTableIF = 'true'">
5477
-
5478
- <xsl:copy-of select="@id"/>
5479
-
5129
+ <xsl:copy-of select="@id"/>
5480
5130
  </xsl:when>
5481
5131
  <xsl:otherwise>
5482
5132
  <xsl:copy-of select="@id"/>
@@ -5513,9 +5163,7 @@
5513
5163
  <fo:block role="SKIP">
5514
5164
 
5515
5165
  <xsl:if test="$isGenerateTableIF = 'true'">
5516
-
5517
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
5518
-
5166
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
5519
5167
  </xsl:if>
5520
5168
 
5521
5169
  <xsl:choose>
@@ -5663,7 +5311,6 @@
5663
5311
  </xsl:template>
5664
5312
 
5665
5313
  <xsl:template name="refine_italic_style">
5666
-
5667
5314
  </xsl:template>
5668
5315
 
5669
5316
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
@@ -5679,7 +5326,6 @@
5679
5326
  </xsl:template>
5680
5327
 
5681
5328
  <xsl:template name="refine_strong_style">
5682
-
5683
5329
  <xsl:if test="ancestor::*['preferred']">
5684
5330
  <xsl:attribute name="role">SKIP</xsl:attribute>
5685
5331
  </xsl:if>
@@ -5704,15 +5350,11 @@
5704
5350
  <xsl:template match="*[local-name()='tt']">
5705
5351
  <fo:inline xsl:use-attribute-sets="tt-style">
5706
5352
 
5707
- <xsl:variable name="_font-size">
5708
-
5709
- <!-- inherit -->
5710
-
5711
- <xsl:choose>
5712
- <xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
5713
- <xsl:otherwise>9.5</xsl:otherwise>
5714
- </xsl:choose>
5715
-
5353
+ <xsl:variable name="_font-size"> <!-- inherit -->
5354
+ <xsl:choose>
5355
+ <xsl:when test="ancestor::*[local-name() = 'table']">8.5</xsl:when>
5356
+ <xsl:otherwise>9.5</xsl:otherwise>
5357
+ </xsl:choose>
5716
5358
  </xsl:variable>
5717
5359
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
5718
5360
  <xsl:if test="$font-size != ''">
@@ -5928,8 +5570,7 @@
5928
5570
  </xsl:otherwise>
5929
5571
  </xsl:choose>
5930
5572
  </xsl:variable>
5931
- <xsl:variable name="ratio_">
5932
- 0.75
5573
+ <xsl:variable name="ratio_">0.75
5933
5574
  </xsl:variable>
5934
5575
  <xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
5935
5576
  <fo:inline font-size="{$ratio * 100}%" role="SKIP">
@@ -6019,7 +5660,7 @@
6019
5660
 
6020
5661
  <xsl:variable name="quot">"</xsl:variable>
6021
5662
  <xsl:variable name="styles_">
6022
- <xsl:for-each select="xalan:nodeset($styles__)/item">
5663
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
6023
5664
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
6024
5665
  <xsl:variable name="value_" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
6025
5666
  <xsl:variable name="value">
@@ -6031,7 +5672,7 @@
6031
5672
  </xsl:otherwise>
6032
5673
  </xsl:choose>
6033
5674
  </xsl:variable>
6034
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
5675
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
6035
5676
  <style name="{$key}"><xsl:value-of select="$value"/></style>
6036
5677
  </xsl:if>
6037
5678
  <xsl:if test="$key = 'text-indent'">
@@ -6045,7 +5686,6 @@
6045
5686
  <fo:inline>
6046
5687
  <xsl:for-each select="$styles/style">
6047
5688
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
6048
-
6049
5689
  </xsl:for-each>
6050
5690
  <xsl:apply-templates/>
6051
5691
  </fo:inline>
@@ -7032,10 +6672,9 @@
7032
6672
  <xsl:variable name="mathml_content">
7033
6673
  <xsl:apply-templates select="." mode="mathml_actual_text"/>
7034
6674
  </xsl:variable>
7035
-
7036
- <xsl:call-template name="mathml_instream_object">
7037
- <xsl:with-param name="mathml_content" select="$mathml_content"/>
7038
- </xsl:call-template>
6675
+ <xsl:call-template name="mathml_instream_object">
6676
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
6677
+ </xsl:call-template>
7039
6678
 
7040
6679
  </fo:inline>
7041
6680
  </xsl:template>
@@ -7069,7 +6708,6 @@
7069
6708
  <xsl:template name="getMathml_asciimath_text">
7070
6709
  <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
7071
6710
  <xsl:variable name="latexmath">
7072
-
7073
6711
  </xsl:variable>
7074
6712
  <xsl:variable name="asciimath_text_following">
7075
6713
  <xsl:choose>
@@ -7142,7 +6780,6 @@
7142
6780
  </xsl:template>
7143
6781
 
7144
6782
  <xsl:template name="refine_mathml_insteam_object_style">
7145
-
7146
6783
  </xsl:template> <!-- refine_mathml_insteam_object_style -->
7147
6784
 
7148
6785
  <xsl:template match="mathml:*" mode="mathml_actual_text">
@@ -7540,7 +7177,6 @@
7540
7177
  <xsl:variable name="annotation-id" select="@id"/>
7541
7178
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
7542
7179
  <fo:block id="{$annotation-id}" white-space="nowrap">
7543
-
7544
7180
  <fo:inline>
7545
7181
  <xsl:apply-templates>
7546
7182
  <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
@@ -7569,7 +7205,6 @@
7569
7205
  <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'])">
7570
7206
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7571
7207
  </xsl:if>
7572
-
7573
7208
  <xsl:if test="parent::*[local-name() = 'add']">
7574
7209
  <xsl:call-template name="append_add-style"/>
7575
7210
  </xsl:if>
@@ -7580,8 +7215,7 @@
7580
7215
  </xsl:template>
7581
7216
 
7582
7217
  <!-- command between two xref points to non-standard bibitem -->
7583
- <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']]]">
7584
- <xsl:value-of select="."/>
7218
+ <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="."/>
7585
7219
  </xsl:template>
7586
7220
 
7587
7221
  <!-- ====== -->
@@ -7596,7 +7230,6 @@
7596
7230
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
7597
7231
  </xsl:choose>
7598
7232
  </xsl:attribute>
7599
-
7600
7233
  </xsl:if>
7601
7234
  <fo:block-container margin-left="0mm" role="SKIP">
7602
7235
  <xsl:call-template name="setNamedDestination"/>
@@ -7686,53 +7319,49 @@
7686
7319
 
7687
7320
  <xsl:template match="*[local-name() = 'note']" name="note">
7688
7321
 
7689
- <xsl:call-template name="setNamedDestination"/>
7690
-
7691
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7692
-
7693
- <xsl:call-template name="setBlockSpanAll"/>
7694
-
7695
- <xsl:call-template name="refine_note-style"/>
7322
+ <xsl:call-template name="setNamedDestination"/>
7696
7323
 
7697
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7324
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7698
7325
 
7699
- <fo:block>
7326
+ <xsl:call-template name="setBlockSpanAll"/>
7700
7327
 
7701
- <xsl:call-template name="refine_note_block_style"/>
7328
+ <xsl:call-template name="refine_note-style"/>
7702
7329
 
7703
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7330
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7331
+ <fo:block>
7704
7332
 
7705
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
7333
+ <xsl:call-template name="refine_note_block_style"/>
7706
7334
 
7707
- <xsl:call-template name="refine_note-name-style"/>
7335
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7708
7336
 
7709
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7710
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7711
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
7712
- <xsl:call-template name="append_add-style"/>
7713
- </xsl:if>
7337
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
7714
7338
 
7715
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
7716
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7717
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7718
- <xsl:with-param name="skip">false</xsl:with-param>
7719
- </xsl:apply-templates>
7720
- </xsl:if>
7339
+ <xsl:call-template name="refine_note-name-style"/>
7721
7340
 
7722
- <xsl:apply-templates select="*[local-name() = 'name']"/>
7341
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7342
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7343
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
7344
+ <xsl:call-template name="append_add-style"/>
7345
+ </xsl:if>
7723
7346
 
7724
- </fo:inline>
7347
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
7348
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7349
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7350
+ <xsl:with-param name="skip">false</xsl:with-param>
7351
+ </xsl:apply-templates>
7352
+ </xsl:if>
7725
7353
 
7726
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7727
- </fo:block>
7354
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
7728
7355
 
7729
- </fo:block-container>
7730
- </fo:block-container>
7356
+ </fo:inline>
7731
7357
 
7358
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7359
+ </fo:block>
7360
+ </fo:block-container>
7361
+ </fo:block-container>
7732
7362
  </xsl:template>
7733
7363
 
7734
7364
  <xsl:template name="refine_note_block_style">
7735
-
7736
7365
  </xsl:template> <!-- refine_note_block_style -->
7737
7366
 
7738
7367
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
@@ -7785,7 +7414,6 @@
7785
7414
  <xsl:value-of select="$sfx"/>
7786
7415
  </xsl:when>
7787
7416
  <xsl:otherwise>
7788
-
7789
7417
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
7790
7418
  <!-- <xsl:if test="$namespace = 'ieee'">
7791
7419
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -7793,7 +7421,6 @@
7793
7421
  <!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
7794
7422
  <xsl:text>:</xsl:text>
7795
7423
  </xsl:if> -->
7796
-
7797
7424
  <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
7798
7425
  <xsl:text> – </xsl:text> en dash &#x2013;
7799
7426
  </xsl:if> -->
@@ -7814,7 +7441,6 @@
7814
7441
  <xsl:value-of select="$sfx"/>
7815
7442
  </xsl:when>
7816
7443
  <xsl:otherwise>
7817
-
7818
7444
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
7819
7445
  <!-- <xsl:if test="$namespace = 'ieee'">
7820
7446
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -7870,7 +7496,6 @@
7870
7496
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
7871
7497
 
7872
7498
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
7873
-
7874
7499
  </xsl:if>
7875
7500
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7876
7501
  </fo:block>
@@ -7910,8 +7535,7 @@
7910
7535
  <!-- Example: Dimensions in millimeters -->
7911
7536
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
7912
7537
 
7913
- <xsl:variable name="show_figure_key_in_block_container">
7914
- true
7538
+ <xsl:variable name="show_figure_key_in_block_container">true
7915
7539
  </xsl:variable>
7916
7540
 
7917
7541
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
@@ -7926,11 +7550,9 @@
7926
7550
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
7927
7551
  <xsl:call-template name="showFigureKey"/>
7928
7552
  </xsl:if>
7929
-
7930
- <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
7553
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
7931
7554
 
7932
7555
  </fo:block-container>
7933
-
7934
7556
  </xsl:template>
7935
7557
 
7936
7558
  <xsl:template name="showFigureKey">
@@ -7968,13 +7590,12 @@
7968
7590
  <!-- SOURCE: ... -->
7969
7591
  <!-- figure/source -->
7970
7592
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
7971
-
7972
- <xsl:call-template name="termsource"/>
7973
-
7593
+ <xsl:call-template name="termsource"/>
7974
7594
  </xsl:template>
7975
7595
 
7976
7596
  <xsl:template match="*[local-name() = 'image']">
7977
7597
  <xsl:param name="indent">0</xsl:param>
7598
+ <xsl:param name="logo_width"/>
7978
7599
  <xsl:variable name="isAdded" select="../@added"/>
7979
7600
  <xsl:variable name="isDeleted" select="../@deleted"/>
7980
7601
  <xsl:choose>
@@ -7996,9 +7617,18 @@
7996
7617
 
7997
7618
  <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
7998
7619
 
7999
- <!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
8000
7620
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
8001
7621
 
7622
+ <xsl:if test="parent::*[local-name() = 'logo']"> <!-- publisher's logo -->
7623
+ <xsl:attribute name="width">100%</xsl:attribute>
7624
+ <xsl:if test="normalize-space($logo_width) != ''">
7625
+ <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
7626
+ </xsl:if>
7627
+ <xsl:attribute name="content-height">100%</xsl:attribute>
7628
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7629
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
7630
+ </xsl:if>
7631
+
8002
7632
  <xsl:variable name="width">
8003
7633
  <xsl:call-template name="setImageWidth"/>
8004
7634
  </xsl:variable>
@@ -8076,8 +7706,7 @@
8076
7706
  </xsl:call-template>
8077
7707
  </xsl:variable>
8078
7708
 
8079
- <xsl:variable name="scaleRatio">
8080
- 1
7709
+ <xsl:variable name="scaleRatio">1
8081
7710
  </xsl:variable>
8082
7711
 
8083
7712
  <xsl:if test="number($scale) &lt; 100">
@@ -8188,18 +7817,14 @@
8188
7817
  </xsl:variable>
8189
7818
 
8190
7819
  <xsl:variable name="image_width_effective">
8191
-
8192
- <xsl:value-of select="$width_effective - number($indent_left)"/>
8193
-
7820
+ <xsl:value-of select="$width_effective - number($indent_left)"/>
8194
7821
  </xsl:variable>
8195
7822
  <xsl:variable name="image_height_effective" select="$height_effective - number($indent_left)"/>
8196
7823
  <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
8197
7824
  <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
8198
7825
  <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
8199
7826
  <xsl:variable name="scale">
8200
-
8201
- <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
8202
-
7827
+ <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
8203
7828
  </xsl:variable>
8204
7829
  <xsl:value-of select="$scale"/>
8205
7830
  </xsl:template>
@@ -8220,7 +7845,8 @@
8220
7845
  </xsl:when>
8221
7846
  <xsl:when test="not(starts-with(@src, 'data:'))">
8222
7847
  <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
8223
- <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
7848
+ <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>
7849
+ <xsl:value-of select="concat('url(', $file_protocol, $src_external, ')')"/>
8224
7850
  </xsl:when>
8225
7851
  <xsl:otherwise>
8226
7852
  <xsl:value-of select="@src"/>
@@ -8516,8 +8142,8 @@
8516
8142
  </xsl:call-template>
8517
8143
  </xsl:variable>
8518
8144
  <xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
8519
- <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
8520
- <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
8145
+ <xsl:variable name="width" select="normalize-space($viewbox//mn:item[3])"/>
8146
+ <xsl:variable name="height" select="normalize-space($viewbox//mn:item[4])"/>
8521
8147
 
8522
8148
  <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
8523
8149
  <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
@@ -8589,8 +8215,8 @@
8589
8215
  </xsl:variable>
8590
8216
  <xsl:variable name="components" select="xalan:nodeset($components_)"/>
8591
8217
  <xsl:variable name="att_name" select="local-name()"/>
8592
- <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
8593
- <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
8218
+ <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>
8219
+ <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/mn:item[4]"/></xsl:attribute>
8594
8220
  </xsl:template>
8595
8221
 
8596
8222
  <!-- ============== -->
@@ -8663,13 +8289,13 @@
8663
8289
  </xsl:call-template>
8664
8290
  </xsl:variable>
8665
8291
  <xsl:variable name="x_coords">
8666
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
8292
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 1]">
8667
8293
  <xsl:sort select="." data-type="number"/>
8668
8294
  <x><xsl:value-of select="."/></x>
8669
8295
  </xsl:for-each>
8670
8296
  </xsl:variable>
8671
8297
  <xsl:variable name="y_coords">
8672
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
8298
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 0]">
8673
8299
  <xsl:sort select="." data-type="number"/>
8674
8300
  <y><xsl:value-of select="."/></y>
8675
8301
  </xsl:for-each>
@@ -8874,11 +8500,11 @@
8874
8500
  <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
8875
8501
  </xsl:variable>
8876
8502
 
8877
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
8878
- <title>
8503
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
8504
+ <mn:title>
8879
8505
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
8880
- </title>
8881
- </item>
8506
+ </mn:title>
8507
+ </mn:item>
8882
8508
  </xsl:if>
8883
8509
  </xsl:template>
8884
8510
 
@@ -8949,12 +8575,12 @@
8949
8575
  <xsl:param name="contents"/>
8950
8576
  <xsl:param name="contents_addon"/>
8951
8577
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
8952
- <xsl:if test="$contents_nodes//item">
8578
+ <xsl:if test="$contents_nodes//mn:item">
8953
8579
  <fo:bookmark-tree>
8954
8580
  <xsl:choose>
8955
- <xsl:when test="$contents_nodes/doc">
8581
+ <xsl:when test="$contents_nodes/mn:doc">
8956
8582
  <xsl:choose>
8957
- <xsl:when test="count($contents_nodes/doc) &gt; 1">
8583
+ <xsl:when test="count($contents_nodes/mn:doc) &gt; 1">
8958
8584
 
8959
8585
  <xsl:if test="$contents_nodes/collection">
8960
8586
  <fo:bookmark internal-destination="{$contents/collection/@firstpage_id}">
@@ -8962,8 +8588,8 @@
8962
8588
  </fo:bookmark>
8963
8589
  </xsl:if>
8964
8590
 
8965
- <xsl:for-each select="$contents_nodes/doc">
8966
- <fo:bookmark internal-destination="{contents/item[@display = 'true'][1]/@id}" starting-state="hide">
8591
+ <xsl:for-each select="$contents_nodes/mn:doc">
8592
+ <fo:bookmark internal-destination="{contents/mn:item[@display = 'true'][1]/@id}" starting-state="hide">
8967
8593
  <xsl:if test="@bundle = 'true'">
8968
8594
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
8969
8595
  </xsl:if>
@@ -8997,14 +8623,14 @@
8997
8623
  </xsl:choose>
8998
8624
  </fo:bookmark-title>
8999
8625
 
9000
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
8626
+ <xsl:apply-templates select="contents/mn:item" mode="bookmark"/>
9001
8627
 
9002
8628
  <xsl:call-template name="insertFigureBookmarks">
9003
- <xsl:with-param name="contents" select="contents"/>
8629
+ <xsl:with-param name="contents" select="mn:contents"/>
9004
8630
  </xsl:call-template>
9005
8631
 
9006
8632
  <xsl:call-template name="insertTableBookmarks">
9007
- <xsl:with-param name="contents" select="contents"/>
8633
+ <xsl:with-param name="contents" select="mn:contents"/>
9008
8634
  <xsl:with-param name="lang" select="@lang"/>
9009
8635
  </xsl:call-template>
9010
8636
 
@@ -9013,16 +8639,16 @@
9013
8639
  </xsl:for-each>
9014
8640
  </xsl:when>
9015
8641
  <xsl:otherwise>
9016
- <xsl:for-each select="$contents_nodes/doc">
8642
+ <xsl:for-each select="$contents_nodes/mn:doc">
9017
8643
 
9018
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
8644
+ <xsl:apply-templates select="mn:contents/mn:item" mode="bookmark"/>
9019
8645
 
9020
8646
  <xsl:call-template name="insertFigureBookmarks">
9021
- <xsl:with-param name="contents" select="contents"/>
8647
+ <xsl:with-param name="contents" select="mn:contents"/>
9022
8648
  </xsl:call-template>
9023
8649
 
9024
8650
  <xsl:call-template name="insertTableBookmarks">
9025
- <xsl:with-param name="contents" select="contents"/>
8651
+ <xsl:with-param name="contents" select="mn:contents"/>
9026
8652
  <xsl:with-param name="lang" select="@lang"/>
9027
8653
  </xsl:call-template>
9028
8654
 
@@ -9031,14 +8657,14 @@
9031
8657
  </xsl:choose>
9032
8658
  </xsl:when>
9033
8659
  <xsl:otherwise>
9034
- <xsl:apply-templates select="$contents_nodes/contents/item" mode="bookmark"/>
8660
+ <xsl:apply-templates select="$contents_nodes/mn:contents/mn:item" mode="bookmark"/>
9035
8661
 
9036
8662
  <xsl:call-template name="insertFigureBookmarks">
9037
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
8663
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
9038
8664
  </xsl:call-template>
9039
8665
 
9040
8666
  <xsl:call-template name="insertTableBookmarks">
9041
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
8667
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
9042
8668
  <xsl:with-param name="lang" select="@lang"/>
9043
8669
  </xsl:call-template>
9044
8670
 
@@ -9055,45 +8681,41 @@
9055
8681
  <xsl:template name="insertFigureBookmarks">
9056
8682
  <xsl:param name="contents"/>
9057
8683
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
9058
- <xsl:if test="$contents_nodes/figure">
9059
- <fo:bookmark internal-destination="{$contents_nodes/figure[1]/@id}" starting-state="hide">
8684
+ <xsl:if test="$contents_nodes/mn:figure">
8685
+ <fo:bookmark internal-destination="{$contents_nodes/mn:figure[1]/@id}" starting-state="hide">
9060
8686
  <fo:bookmark-title>Figures</fo:bookmark-title>
9061
- <xsl:for-each select="$contents_nodes/figure">
8687
+ <xsl:for-each select="$contents_nodes/mn:figure">
9062
8688
  <fo:bookmark internal-destination="{@id}">
9063
8689
  <fo:bookmark-title>
9064
- <xsl:value-of select="normalize-space(title)"/>
8690
+ <xsl:value-of select="normalize-space(mn:title)"/>
9065
8691
  </fo:bookmark-title>
9066
8692
  </fo:bookmark>
9067
8693
  </xsl:for-each>
9068
8694
  </fo:bookmark>
9069
- </xsl:if>
9070
-
9071
- <!-- see template addBookmarks -->
8695
+ </xsl:if><!-- see template addBookmarks -->
9072
8696
  </xsl:template> <!-- insertFigureBookmarks -->
9073
8697
 
9074
8698
  <xsl:template name="insertTableBookmarks">
9075
8699
  <xsl:param name="contents"/>
9076
8700
  <xsl:param name="lang"/>
9077
8701
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
9078
- <xsl:if test="$contents_nodes/table">
9079
- <fo:bookmark internal-destination="{$contents_nodes/table[1]/@id}" starting-state="hide">
8702
+ <xsl:if test="$contents_nodes/mn:table">
8703
+ <fo:bookmark internal-destination="{$contents_nodes/mn:table[1]/@id}" starting-state="hide">
9080
8704
  <fo:bookmark-title>
9081
8705
  <xsl:choose>
9082
8706
  <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
9083
8707
  <xsl:otherwise>Tables</xsl:otherwise>
9084
8708
  </xsl:choose>
9085
8709
  </fo:bookmark-title>
9086
- <xsl:for-each select="$contents_nodes/table">
8710
+ <xsl:for-each select="$contents_nodes/mn:table">
9087
8711
  <fo:bookmark internal-destination="{@id}">
9088
8712
  <fo:bookmark-title>
9089
- <xsl:value-of select="normalize-space(title)"/>
8713
+ <xsl:value-of select="normalize-space(mn:title)"/>
9090
8714
  </fo:bookmark-title>
9091
8715
  </fo:bookmark>
9092
8716
  </xsl:for-each>
9093
8717
  </fo:bookmark>
9094
- </xsl:if>
9095
-
9096
- <!-- see template addBookmarks -->
8718
+ </xsl:if><!-- see template addBookmarks -->
9097
8719
  </xsl:template> <!-- insertTableBookmarks -->
9098
8720
  <!-- End Bookmarks -->
9099
8721
 
@@ -9123,17 +8745,15 @@
9123
8745
  <xsl:param name="title" select="''"/>
9124
8746
  <xsl:choose>
9125
8747
  <xsl:when test="$lang = 'en'">
9126
-
9127
8748
  </xsl:when>
9128
8749
  <xsl:when test="$lang = 'fr'">
9129
-
9130
8750
  </xsl:when>
9131
8751
  <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
9132
8752
  <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
9133
8753
  </xsl:choose>
9134
8754
  </xsl:template>
9135
8755
 
9136
- <xsl:template match="item" mode="bookmark">
8756
+ <xsl:template match="mn:item" mode="bookmark">
9137
8757
  <xsl:choose>
9138
8758
  <xsl:when test="@id != ''">
9139
8759
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
@@ -9143,7 +8763,7 @@
9143
8763
  <xsl:text> </xsl:text>
9144
8764
  </xsl:if>
9145
8765
  <xsl:variable name="title">
9146
- <xsl:for-each select="title/node()">
8766
+ <xsl:for-each select="mn:title/node()">
9147
8767
  <xsl:choose>
9148
8768
  <xsl:when test="local-name() = 'add' and starts-with(., $ace_tag)"><!-- skip --></xsl:when>
9149
8769
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
@@ -9161,7 +8781,7 @@
9161
8781
  </xsl:choose>
9162
8782
  </xsl:template>
9163
8783
 
9164
- <xsl:template match="title" mode="bookmark"/>
8784
+ <xsl:template match="mn:title" mode="bookmark"/>
9165
8785
  <xsl:template match="text()" mode="bookmark"/>
9166
8786
 
9167
8787
  <!-- figure/name -->
@@ -9390,9 +9010,9 @@
9390
9010
  <xsl:template match="text()" mode="contents_item">
9391
9011
  <xsl:variable name="text">
9392
9012
  <!-- to split by '_' and other chars -->
9393
- <text><xsl:call-template name="add-zero-spaces-java"/></text>
9013
+ <mn:text><xsl:call-template name="add-zero-spaces-java"/></mn:text>
9394
9014
  </xsl:variable>
9395
- <xsl:for-each select="xalan:nodeset($text)/text/text()">
9015
+ <xsl:for-each select="xalan:nodeset($text)/mn:text/text()">
9396
9016
  <xsl:call-template name="keep_together_standard_number"/>
9397
9017
  </xsl:for-each>
9398
9018
  </xsl:template>
@@ -9425,19 +9045,11 @@
9425
9045
 
9426
9046
  <xsl:template name="get_sourcecode_attributes">
9427
9047
  <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
9428
- <xsl:variable name="_font-size">
9429
-
9430
- <!-- inherit -->
9431
-
9432
- <!-- <xsl:if test="$namespace = 'ieee'">
9433
- <xsl:if test="$current_template = 'standard'">8</xsl:if>
9434
- </xsl:if> -->
9435
-
9436
- <xsl:choose>
9437
- <xsl:when test="ancestor::*[local-name() = 'table'][not(parent::*[local-name() = 'sourcecode'][@linenums = 'true'])]">8.5</xsl:when>
9438
- <xsl:otherwise>9.5</xsl:otherwise>
9439
- </xsl:choose>
9440
-
9048
+ <xsl:variable name="_font-size"><!-- inherit -->
9049
+ <xsl:choose>
9050
+ <xsl:when test="ancestor::*[local-name() = 'table'][not(parent::*[local-name() = 'sourcecode'][@linenums = 'true'])]">8.5</xsl:when>
9051
+ <xsl:otherwise>9.5</xsl:otherwise>
9052
+ </xsl:choose>
9441
9053
  </xsl:variable>
9442
9054
 
9443
9055
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -9493,7 +9105,6 @@
9493
9105
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
9494
9106
  </xsl:choose>
9495
9107
  </xsl:attribute>
9496
-
9497
9108
  </xsl:if>
9498
9109
  <fo:block-container margin-left="0mm" role="SKIP">
9499
9110
 
@@ -9517,8 +9128,7 @@
9517
9128
  </fo:block>
9518
9129
 
9519
9130
  <xsl:apply-templates select="*[local-name() = 'dl']"/> <!-- Key table -->
9520
-
9521
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
9131
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
9522
9132
 
9523
9133
  </fo:block-container>
9524
9134
  </fo:block-container>
@@ -9695,25 +9305,6 @@
9695
9305
  </xsl:choose>
9696
9306
  </xsl:template>
9697
9307
 
9698
- <!-- insert 'char' between each character in the string -->
9699
- <xsl:template name="interspers">
9700
- <xsl:param name="str"/>
9701
- <xsl:param name="char" select="$zero_width_space"/>
9702
- <xsl:if test="$str != ''">
9703
- <xsl:value-of select="substring($str, 1, 1)"/>
9704
-
9705
- <xsl:variable name="next_char" select="substring($str, 2, 1)"/>
9706
- <xsl:if test="not(contains(concat(' -.:=_— ', $char), $next_char))">
9707
- <xsl:value-of select="$char"/>
9708
- </xsl:if>
9709
-
9710
- <xsl:call-template name="interspers">
9711
- <xsl:with-param name="str" select="substring($str, 2)"/>
9712
- <xsl:with-param name="char" select="$char"/>
9713
- </xsl:call-template>
9714
- </xsl:if>
9715
- </xsl:template>
9716
-
9717
9308
  <xsl:template name="interspers-java">
9718
9309
  <xsl:param name="str"/>
9719
9310
  <xsl:param name="char" select="$zero_width_space"/>
@@ -9810,7 +9401,7 @@
9810
9401
  </xsl:variable>
9811
9402
  <xsl:variable name="classes" select="xalan:nodeset($classes_)"/>
9812
9403
 
9813
- <xsl:for-each select="$classes/item">
9404
+ <xsl:for-each select="$classes/*[local-name() = 'item']">
9814
9405
  <xsl:variable name="class_name" select="."/>
9815
9406
  <xsl:for-each select="$syntax_highlight_styles/style[@class = $class_name]/@*[not(local-name() = 'class')]">
9816
9407
  <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
@@ -9893,14 +9484,10 @@
9893
9484
 
9894
9485
  <xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
9895
9486
  <xsl:if test="normalize-space() != ''">
9896
-
9897
- <fo:block xsl:use-attribute-sets="permission-name-style">
9898
- <xsl:apply-templates/>
9899
-
9900
- <xsl:text>:</xsl:text>
9901
-
9902
- </fo:block>
9903
-
9487
+ <fo:block xsl:use-attribute-sets="permission-name-style">
9488
+ <xsl:apply-templates/>
9489
+ <xsl:text>:</xsl:text>
9490
+ </fo:block>
9904
9491
  </xsl:if>
9905
9492
  </xsl:template>
9906
9493
 
@@ -9929,18 +9516,13 @@
9929
9516
  <xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
9930
9517
  <xsl:if test="normalize-space() != ''">
9931
9518
 
9932
- <fo:block xsl:use-attribute-sets="requirement-name-style">
9933
-
9934
- <xsl:if test="../@type = 'class'">
9935
- <xsl:attribute name="background-color">white</xsl:attribute>
9936
- </xsl:if>
9937
-
9938
- <xsl:apply-templates/>
9939
-
9940
- <xsl:text>:</xsl:text>
9941
-
9942
- </fo:block>
9943
-
9519
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
9520
+ <xsl:if test="../@type = 'class'">
9521
+ <xsl:attribute name="background-color">white</xsl:attribute>
9522
+ </xsl:if>
9523
+ <xsl:apply-templates/>
9524
+ <xsl:text>:</xsl:text>
9525
+ </fo:block>
9944
9526
  </xsl:if>
9945
9527
  </xsl:template>
9946
9528
 
@@ -9979,11 +9561,9 @@
9979
9561
  <xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
9980
9562
  <xsl:if test="normalize-space() != ''">
9981
9563
 
9982
- <fo:block xsl:use-attribute-sets="recommendation-name-style">
9983
- <xsl:apply-templates/>
9984
-
9985
- </fo:block>
9986
-
9564
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
9565
+ <xsl:apply-templates/>
9566
+ </fo:block>
9987
9567
  </xsl:if>
9988
9568
  </xsl:template>
9989
9569
 
@@ -10109,18 +9689,16 @@
10109
9689
 
10110
9690
  <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 ')">
10111
9691
  <xsl:attribute name="font-weight">bold</xsl:attribute>
10112
-
10113
- <xsl:attribute name="font-weight">normal</xsl:attribute>
10114
- <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
10115
- <xsl:attribute name="background-color"><xsl:value-of select="$color_table_header_row"/></xsl:attribute>
10116
- </xsl:if>
10117
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
10118
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
10119
- </xsl:if>
10120
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
10121
- <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
10122
- </xsl:if>
10123
-
9692
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
9693
+ <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
9694
+ <xsl:attribute name="background-color"><xsl:value-of select="$color_table_header_row"/></xsl:attribute>
9695
+ </xsl:if>
9696
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
9697
+ <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
9698
+ </xsl:if>
9699
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
9700
+ <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
9701
+ </xsl:if>
10124
9702
  </xsl:if>
10125
9703
 
10126
9704
  <xsl:apply-templates mode="requirement"/>
@@ -10165,10 +9743,8 @@
10165
9743
 
10166
9744
  <xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
10167
9745
  <fo:block font-size="11pt">
10168
-
10169
- <!-- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute> -->
10170
- <xsl:attribute name="color">white</xsl:attribute>
10171
-
9746
+ <!-- <xsl:attribute name="color"><xsl:value-of select="$color_design"/></xsl:attribute> -->
9747
+ <xsl:attribute name="color">white</xsl:attribute>
10172
9748
  <xsl:apply-templates/>
10173
9749
  </fo:block>
10174
9750
  </xsl:template>
@@ -10208,7 +9784,6 @@
10208
9784
  <xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
10209
9785
  <xsl:variable name="element">inline
10210
9786
 
10211
-
10212
9787
  </xsl:variable>
10213
9788
  <xsl:choose>
10214
9789
  <xsl:when test="contains($element, 'block')">
@@ -10240,110 +9815,105 @@
10240
9815
  text line 2
10241
9816
  -->
10242
9817
  <xsl:template match="*[local-name() = 'example']" name="example">
9818
+ <xsl:call-template name="setNamedDestination"/>
9819
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
10243
9820
 
10244
- <xsl:call-template name="setNamedDestination"/>
10245
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
9821
+ <xsl:call-template name="setBlockSpanAll"/>
10246
9822
 
10247
- <xsl:call-template name="setBlockSpanAll"/>
9823
+ <xsl:call-template name="refine_example-style"/>
10248
9824
 
10249
- <xsl:call-template name="refine_example-style"/>
9825
+ <xsl:variable name="fo_element">
9826
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>block
9827
+ </xsl:variable>
10250
9828
 
10251
- <xsl:variable name="fo_element">
10252
- <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
10253
- block
10254
- </xsl:variable>
9829
+ <fo:block-container margin-left="0mm" role="SKIP">
10255
9830
 
10256
- <fo:block-container margin-left="0mm" role="SKIP">
9831
+ <xsl:choose>
10257
9832
 
10258
- <xsl:choose>
9833
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
10259
9834
 
10260
- <xsl:when test="contains(normalize-space($fo_element), 'block')">
9835
+ <!-- display name 'EXAMPLE' in a separate block -->
9836
+ <fo:block>
9837
+ <xsl:apply-templates select="*[local-name()='name']">
9838
+ <xsl:with-param name="fo_element" select="$fo_element"/>
9839
+ </xsl:apply-templates>
9840
+ </fo:block>
10261
9841
 
10262
- <!-- display name 'EXAMPLE' in a separate block -->
10263
- <fo:block>
10264
- <xsl:apply-templates select="*[local-name()='name']">
9842
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9843
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9844
+ <xsl:variable name="example_body">
9845
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
10265
9846
  <xsl:with-param name="fo_element" select="$fo_element"/>
10266
9847
  </xsl:apply-templates>
10267
- </fo:block>
10268
-
10269
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
10270
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10271
- <xsl:variable name="example_body">
10272
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
10273
- <xsl:with-param name="fo_element" select="$fo_element"/>
10274
- </xsl:apply-templates>
10275
- </xsl:variable>
10276
- <xsl:choose>
10277
- <xsl:when test="xalan:nodeset($example_body)/*">
10278
- <xsl:copy-of select="$example_body"/>
10279
- </xsl:when>
10280
- <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
10281
- </xsl:choose>
10282
- </fo:block-container>
10283
- </fo:block-container>
10284
- </xsl:when> <!-- end block -->
10285
-
10286
- <xsl:when test="contains(normalize-space($fo_element), 'list')">
10287
-
10288
- <xsl:variable name="provisional_distance_between_starts_">
10289
- 7
10290
- </xsl:variable>
10291
- <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
10292
- <xsl:variable name="indent_">
10293
- 0
10294
9848
  </xsl:variable>
10295
- <xsl:variable name="indent" select="normalize-space($indent_)"/>
10296
-
10297
- <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
10298
- <fo:list-item>
10299
- <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
10300
- <fo:block>
10301
- <xsl:apply-templates select="*[local-name()='name']">
10302
- <xsl:with-param name="fo_element">block</xsl:with-param>
10303
- </xsl:apply-templates>
10304
- </fo:block>
10305
- </fo:list-item-label>
10306
- <fo:list-item-body start-indent="body-start()">
10307
- <fo:block>
10308
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
10309
- <xsl:with-param name="fo_element" select="$fo_element"/>
10310
- </xsl:apply-templates>
10311
- </fo:block>
10312
- </fo:list-item-body>
10313
- </fo:list-item>
10314
- </fo:list-block>
10315
- </xsl:when> <!-- end list -->
9849
+ <xsl:choose>
9850
+ <xsl:when test="xalan:nodeset($example_body)/*">
9851
+ <xsl:copy-of select="$example_body"/>
9852
+ </xsl:when>
9853
+ <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
9854
+ </xsl:choose>
9855
+ </fo:block-container>
9856
+ </fo:block-container>
9857
+ </xsl:when> <!-- end block -->
10316
9858
 
10317
- <xsl:otherwise> <!-- inline -->
9859
+ <xsl:when test="contains(normalize-space($fo_element), 'list')">
10318
9860
 
10319
- <!-- display 'EXAMPLE' and first element in the same line -->
10320
- <fo:block>
10321
- <xsl:apply-templates select="*[local-name()='name']">
10322
- <xsl:with-param name="fo_element" select="$fo_element"/>
10323
- </xsl:apply-templates>
10324
- <fo:inline>
10325
- <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
9861
+ <xsl:variable name="provisional_distance_between_starts_">7
9862
+ </xsl:variable>
9863
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
9864
+ <xsl:variable name="indent_">0
9865
+ </xsl:variable>
9866
+ <xsl:variable name="indent" select="normalize-space($indent_)"/>
9867
+
9868
+ <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
9869
+ <fo:list-item>
9870
+ <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
9871
+ <fo:block>
9872
+ <xsl:apply-templates select="*[local-name()='name']">
9873
+ <xsl:with-param name="fo_element">block</xsl:with-param>
9874
+ </xsl:apply-templates>
9875
+ </fo:block>
9876
+ </fo:list-item-label>
9877
+ <fo:list-item-body start-indent="body-start()">
9878
+ <fo:block>
9879
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
10326
9880
  <xsl:with-param name="fo_element" select="$fo_element"/>
10327
9881
  </xsl:apply-templates>
10328
- </fo:inline>
10329
- </fo:block>
9882
+ </fo:block>
9883
+ </fo:list-item-body>
9884
+ </fo:list-item>
9885
+ </fo:list-block>
9886
+ </xsl:when> <!-- end list -->
10330
9887
 
10331
- <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
10332
- <!-- display further elements in blocks -->
10333
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
10334
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10335
- <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
10336
- <xsl:with-param name="fo_element" select="'block'"/>
10337
- </xsl:apply-templates>
10338
- </fo:block-container>
10339
- </fo:block-container>
10340
- </xsl:if>
10341
- </xsl:otherwise> <!-- end inline -->
9888
+ <xsl:otherwise> <!-- inline -->
10342
9889
 
10343
- </xsl:choose>
10344
- </fo:block-container>
10345
- </fo:block-container>
9890
+ <!-- display 'EXAMPLE' and first element in the same line -->
9891
+ <fo:block>
9892
+ <xsl:apply-templates select="*[local-name()='name']">
9893
+ <xsl:with-param name="fo_element" select="$fo_element"/>
9894
+ </xsl:apply-templates>
9895
+ <fo:inline>
9896
+ <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
9897
+ <xsl:with-param name="fo_element" select="$fo_element"/>
9898
+ </xsl:apply-templates>
9899
+ </fo:inline>
9900
+ </fo:block>
9901
+
9902
+ <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
9903
+ <!-- display further elements in blocks -->
9904
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9905
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9906
+ <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
9907
+ <xsl:with-param name="fo_element" select="'block'"/>
9908
+ </xsl:apply-templates>
9909
+ </fo:block-container>
9910
+ </fo:block-container>
9911
+ </xsl:if>
9912
+ </xsl:otherwise> <!-- end inline -->
10346
9913
 
9914
+ </xsl:choose>
9915
+ </fo:block-container>
9916
+ </fo:block-container>
10347
9917
  </xsl:template>
10348
9918
 
10349
9919
  <!-- example/name -->
@@ -10358,7 +9928,6 @@
10358
9928
  </xsl:when>
10359
9929
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
10360
9930
  <fo:block xsl:use-attribute-sets="example-name-style">
10361
-
10362
9931
  <xsl:apply-templates/>
10363
9932
  </fo:block>
10364
9933
  </xsl:when>
@@ -10375,7 +9944,6 @@
10375
9944
  <!-- table/example/name, table/tfoot//example/name -->
10376
9945
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'example']/*[local-name() = 'name']">
10377
9946
  <fo:inline xsl:use-attribute-sets="example-name-style">
10378
-
10379
9947
  <xsl:apply-templates/>
10380
9948
  </fo:inline>
10381
9949
  </xsl:template>
@@ -10385,7 +9953,6 @@
10385
9953
 
10386
9954
  <xsl:variable name="num"><xsl:number/></xsl:variable>
10387
9955
  <xsl:variable name="element">
10388
-
10389
9956
  <xsl:value-of select="$fo_element"/>
10390
9957
  </xsl:variable>
10391
9958
  <xsl:choose>
@@ -10503,7 +10070,7 @@
10503
10070
  </xsl:call-template>
10504
10071
  </xsl:variable>
10505
10072
 
10506
- <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
10073
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
10507
10074
  <xsl:choose>
10508
10075
  <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>
10509
10076
  <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>
@@ -10540,7 +10107,6 @@
10540
10107
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
10541
10108
  </xsl:if>
10542
10109
  </xsl:if>
10543
-
10544
10110
  <fo:block-container margin-left="0mm" role="SKIP">
10545
10111
  <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
10546
10112
 
@@ -10623,7 +10189,6 @@
10623
10189
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
10624
10190
  <xsl:attribute name="vertical-align">super</xsl:attribute>
10625
10191
  <xsl:attribute name="font-size">80%</xsl:attribute>
10626
-
10627
10192
  </xsl:if>
10628
10193
 
10629
10194
  <xsl:call-template name="refine_eref-style"/>
@@ -10672,10 +10237,8 @@
10672
10237
  </xsl:template>
10673
10238
 
10674
10239
  <xsl:template name="refine_basic_link_style">
10675
-
10676
- <xsl:attribute name="color">blue</xsl:attribute>
10677
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
10678
-
10240
+ <xsl:attribute name="color">blue</xsl:attribute>
10241
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
10679
10242
  </xsl:template> <!-- refine_basic_link_style -->
10680
10243
 
10681
10244
  <!-- ====== -->
@@ -10692,17 +10255,15 @@
10692
10255
  </xsl:variable>
10693
10256
 
10694
10257
  <xsl:variable name="padding">
10695
-
10696
- <xsl:choose>
10697
- <xsl:when test="ancestor::*[local-name() = 'note'] and ancestor::*[local-name() = 'name']">4</xsl:when>
10698
- <xsl:when test="$depth &gt;= 5"/>
10699
- <xsl:when test="$depth &gt;= 4">5</xsl:when>
10700
- <xsl:when test="$depth &gt;= 3 and ancestor::ogc:terms">3</xsl:when>
10701
- <xsl:when test="$depth &gt;= 2">4</xsl:when>
10702
- <xsl:when test="$depth = 1">4</xsl:when>
10703
- <xsl:otherwise>2</xsl:otherwise>
10704
- </xsl:choose>
10705
-
10258
+ <xsl:choose>
10259
+ <xsl:when test="ancestor::*[local-name() = 'note'] and ancestor::*[local-name() = 'name']">4</xsl:when>
10260
+ <xsl:when test="$depth &gt;= 5"/>
10261
+ <xsl:when test="$depth &gt;= 4">5</xsl:when>
10262
+ <xsl:when test="$depth &gt;= 3 and ancestor::ogc:terms">3</xsl:when>
10263
+ <xsl:when test="$depth &gt;= 2">4</xsl:when>
10264
+ <xsl:when test="$depth = 1">4</xsl:when>
10265
+ <xsl:otherwise>2</xsl:otherwise>
10266
+ </xsl:choose>
10706
10267
  </xsl:variable>
10707
10268
 
10708
10269
  <xsl:variable name="padding-right">
@@ -10713,7 +10274,6 @@
10713
10274
  </xsl:otherwise>
10714
10275
  </xsl:choose>
10715
10276
  </xsl:variable>
10716
-
10717
10277
  <xsl:choose>
10718
10278
  <xsl:when test="$lang = 'zh'">
10719
10279
  <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -10737,9 +10297,7 @@
10737
10297
  <xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']/*[local-name() = 'tab']" priority="2"/>
10738
10298
 
10739
10299
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab">
10740
-
10741
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
10742
-
10300
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
10743
10301
  </xsl:template>
10744
10302
 
10745
10303
  <xsl:template name="insertNonBreakSpaces">
@@ -10758,11 +10316,10 @@
10758
10316
  <xsl:call-template name="getLevel"/>
10759
10317
  </xsl:variable>
10760
10318
  <xsl:variable name="font-size">
10761
-
10762
- <xsl:choose>
10763
- <xsl:when test="$level &gt;= 2">11pt</xsl:when>
10764
- <xsl:otherwise>12pt</xsl:otherwise>
10765
- </xsl:choose>
10319
+ <xsl:choose>
10320
+ <xsl:when test="$level &gt;= 2">11pt</xsl:when>
10321
+ <xsl:otherwise>12pt</xsl:otherwise>
10322
+ </xsl:choose>
10766
10323
 
10767
10324
  </xsl:variable>
10768
10325
  <xsl:variable name="levelTerm">
@@ -10815,11 +10372,9 @@
10815
10372
  </xsl:template>
10816
10373
 
10817
10374
  <xsl:template name="setStyle_preferred">
10818
-
10819
- <xsl:if test="*[local-name() = 'strong']">
10820
- <xsl:attribute name="font-weight">normal</xsl:attribute>
10821
- </xsl:if>
10822
-
10375
+ <xsl:if test="*[local-name() = 'strong']">
10376
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
10377
+ </xsl:if>
10823
10378
  </xsl:template>
10824
10379
 
10825
10380
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
@@ -10896,7 +10451,6 @@
10896
10451
 
10897
10452
  <!-- main sections -->
10898
10453
  <xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
10899
-
10900
10454
  <xsl:call-template name="setNamedDestination"/>
10901
10455
  <fo:block>
10902
10456
  <xsl:call-template name="setId"/>
@@ -10931,18 +10485,14 @@
10931
10485
  </xsl:template>
10932
10486
 
10933
10487
  <xsl:template name="sections_element_style">
10934
-
10935
- <xsl:variable name="pos"><xsl:number count="ogc:sections/*/ogc:clause[not(@type='scope') and not(@type='conformance')]"/></xsl:variable> <!-- | ogc:sections/ogc:terms -->
10936
- <xsl:if test="$pos &gt;= 2">
10937
- <xsl:attribute name="space-before">18pt</xsl:attribute>
10938
- </xsl:if>
10939
-
10488
+ <xsl:variable name="pos"><xsl:number count="ogc:sections/*/ogc:clause[not(@type='scope') and not(@type='conformance')]"/></xsl:variable> <!-- | ogc:sections/ogc:terms -->
10489
+ <xsl:if test="$pos &gt;= 2">
10490
+ <xsl:attribute name="space-before">18pt</xsl:attribute>
10491
+ </xsl:if>
10940
10492
  </xsl:template> <!-- sections_element_style -->
10941
10493
 
10942
10494
  <xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
10943
-
10944
- <fo:block break-after="page"/>
10945
-
10495
+ <fo:block break-after="page"/>
10946
10496
  <xsl:call-template name="setNamedDestination"/>
10947
10497
  <fo:block>
10948
10498
  <xsl:call-template name="setId"/>
@@ -10991,7 +10541,6 @@
10991
10541
  </xsl:template>
10992
10542
 
10993
10543
  <xsl:template name="refine_clause_style">
10994
-
10995
10544
  </xsl:template> <!-- refine_clause_style -->
10996
10545
 
10997
10546
  <xsl:template match="*[local-name() = 'definitions']">
@@ -11031,7 +10580,6 @@
11031
10580
  </xsl:template>
11032
10581
 
11033
10582
  <xsl:template name="refine_annex_style">
11034
-
11035
10583
  </xsl:template>
11036
10584
 
11037
10585
  <!-- document text (not figures, or tables) footnotes -->
@@ -11135,15 +10683,13 @@
11135
10683
  <!-- Lists processing -->
11136
10684
  <!-- ===================================== -->
11137
10685
  <xsl:variable name="ul_labels_">
11138
-
11139
- <label>—</label> <!-- em dash -->
10686
+ <label>—</label> <!-- em dash -->
11140
10687
 
11141
10688
  </xsl:variable>
11142
10689
  <xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
11143
10690
 
11144
10691
  <xsl:template name="setULLabel">
11145
- <xsl:variable name="list_level__">
11146
- <xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
10692
+ <xsl:variable name="list_level__"><xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
11147
10693
  </xsl:variable>
11148
10694
  <xsl:variable name="list_level_" select="number($list_level__)"/>
11149
10695
  <xsl:variable name="list_level">
@@ -11200,28 +10746,22 @@
11200
10746
  <xsl:variable name="label">
11201
10747
 
11202
10748
  <xsl:variable name="style_prefix_">
11203
- <xsl:if test="$type = 'roman'">
11204
- <!-- Example: (i) -->
10749
+ <xsl:if test="$type = 'roman'"> <!-- Example: (i) -->
11205
10750
  </xsl:if>
11206
10751
  <xsl:if test="$type = 'alphabet'">
11207
-
11208
10752
  </xsl:if>
11209
10753
  </xsl:variable>
11210
10754
  <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
11211
10755
 
11212
10756
  <xsl:variable name="style_suffix_">
11213
10757
  <xsl:choose>
11214
- <xsl:when test="$type = 'arabic'">
11215
- )
10758
+ <xsl:when test="$type = 'arabic'">)
11216
10759
  </xsl:when>
11217
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
11218
- )
10760
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">)
11219
10761
  </xsl:when>
11220
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
11221
- )
10762
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">)
11222
10763
  </xsl:when>
11223
- <xsl:when test="$type = 'roman'">
11224
- )
10764
+ <xsl:when test="$type = 'roman'">)
11225
10765
  </xsl:when>
11226
10766
  <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
11227
10767
  </xsl:choose>
@@ -11238,8 +10778,7 @@
11238
10778
  <xsl:value-of select="$style_suffix"/>
11239
10779
  </xsl:if>
11240
10780
  </xsl:variable>
11241
-
11242
- <xsl:value-of select="normalize-space($label)"/>
10781
+ <xsl:value-of select="normalize-space($label)"/>
11243
10782
 
11244
10783
  </xsl:when>
11245
10784
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
@@ -11296,17 +10835,13 @@
11296
10835
 
11297
10836
  <xsl:variable name="format">
11298
10837
  <xsl:choose>
11299
- <xsl:when test="$type = 'arabic'">
11300
- 1)
10838
+ <xsl:when test="$type = 'arabic'">1)
11301
10839
  </xsl:when>
11302
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
11303
- a)
10840
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">a)
11304
10841
  </xsl:when>
11305
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
11306
- A)
10842
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">A)
11307
10843
  </xsl:when>
11308
- <xsl:when test="$type = 'roman'">
11309
- i)
10844
+ <xsl:when test="$type = 'roman'">i)
11310
10845
  </xsl:when>
11311
10846
  <xsl:when test="$type = 'roman_upper'">I.</xsl:when>
11312
10847
  <xsl:otherwise>1.</xsl:otherwise> <!-- for any case, if $type has non-determined value, not using -->
@@ -11343,19 +10878,16 @@
11343
10878
  </fo:block-container>
11344
10879
  </xsl:when>
11345
10880
  <xsl:otherwise>
11346
-
11347
- <fo:block role="SKIP">
11348
- <xsl:apply-templates select="." mode="list">
11349
- <xsl:with-param name="indent" select="$indent"/>
11350
- </xsl:apply-templates>
11351
- </fo:block>
11352
-
10881
+ <fo:block role="SKIP">
10882
+ <xsl:apply-templates select="." mode="list">
10883
+ <xsl:with-param name="indent" select="$indent"/>
10884
+ </xsl:apply-templates>
10885
+ </fo:block>
11353
10886
  </xsl:otherwise>
11354
10887
  </xsl:choose>
11355
10888
  </xsl:template>
11356
10889
 
11357
10890
  <xsl:template name="refine_list_container_style">
11358
-
11359
10891
  </xsl:template> <!-- refine_list_container_style -->
11360
10892
 
11361
10893
  <xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
@@ -11419,7 +10951,6 @@
11419
10951
  </xsl:template>
11420
10952
 
11421
10953
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
11422
-
11423
10954
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
11424
10955
 
11425
10956
  <xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
@@ -11704,7 +11235,6 @@
11704
11235
  <xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
11705
11236
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
11706
11237
  <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
11707
-
11708
11238
  <xsl:apply-templates/>
11709
11239
  </fo:block>
11710
11240
  </xsl:template>
@@ -11756,7 +11286,6 @@
11756
11286
  <fo:table-column column-width="15mm"/>
11757
11287
  <fo:table-body>
11758
11288
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
11759
-
11760
11289
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
11761
11290
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
11762
11291
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
@@ -11792,7 +11321,6 @@
11792
11321
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
11793
11322
  <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
11794
11323
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
11795
-
11796
11324
  </xsl:template>
11797
11325
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
11798
11326
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
@@ -11803,16 +11331,13 @@
11803
11331
  <xsl:call-template name="setNamedDestination"/>
11804
11332
  <fo:block id="{@id}">
11805
11333
  <xsl:apply-templates/>
11806
-
11807
11334
  </fo:block>
11808
11335
  </xsl:template>
11809
11336
 
11810
11337
  <!-- Bibliography (non-normative references) -->
11811
11338
  <xsl:template match="*[local-name() = 'references']">
11812
11339
  <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
11813
-
11814
- <fo:block break-after="page"/>
11815
-
11340
+ <fo:block break-after="page"/>
11816
11341
  </xsl:if>
11817
11342
 
11818
11343
  <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
@@ -11828,9 +11353,7 @@
11828
11353
 
11829
11354
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
11830
11355
  <xsl:apply-templates select="node()[not(local-name() = 'title' and @columns = 1)]"/>
11831
-
11832
11356
  </fo:block>
11833
-
11834
11357
  </xsl:template> <!-- references -->
11835
11358
 
11836
11359
  <xsl:template match="*[local-name() = 'bibitem']">
@@ -11840,44 +11363,39 @@
11840
11363
  <!-- Normative references -->
11841
11364
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
11842
11365
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
11843
-
11844
- <xsl:call-template name="setNamedDestination"/>
11845
- <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
11846
-
11847
- <xsl:call-template name="processBibitem"/>
11848
- </fo:block>
11366
+ <xsl:call-template name="setNamedDestination"/>
11367
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
11368
+ <xsl:call-template name="processBibitem"/>
11369
+ </fo:block>
11849
11370
 
11850
11371
  </xsl:template> <!-- bibitem -->
11851
11372
 
11852
11373
  <!-- Bibliography (non-normative references) -->
11853
11374
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
11854
- <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
11855
- <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
11375
+ <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
11856
11376
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
11857
- <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
11858
- <xsl:call-template name="setNamedDestination"/>
11859
- <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
11860
-
11861
- <fo:list-item>
11862
- <fo:list-item-label end-indent="label-end()">
11863
- <fo:block role="SKIP">
11864
- <fo:inline role="SKIP">
11865
-
11866
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11867
- <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
11868
- </xsl:apply-templates>
11869
- </fo:inline>
11870
- </fo:block>
11871
- </fo:list-item-label>
11872
- <fo:list-item-body start-indent="body-start()">
11873
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
11874
- <xsl:call-template name="processBibitem">
11875
- <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11876
- </xsl:call-template>
11877
- </fo:block>
11878
- </fo:list-item-body>
11879
- </fo:list-item>
11880
- </fo:list-block>
11377
+ <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
11378
+ <xsl:call-template name="setNamedDestination"/>
11379
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
11380
+ <fo:list-item>
11381
+ <fo:list-item-label end-indent="label-end()">
11382
+ <fo:block role="SKIP">
11383
+ <fo:inline role="SKIP">
11384
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11385
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
11386
+ </xsl:apply-templates>
11387
+ </fo:inline>
11388
+ </fo:block>
11389
+ </fo:list-item-label>
11390
+ <fo:list-item-body start-indent="body-start()">
11391
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
11392
+ <xsl:call-template name="processBibitem">
11393
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11394
+ </xsl:call-template>
11395
+ </fo:block>
11396
+ </fo:list-item-body>
11397
+ </fo:list-item>
11398
+ </fo:list-block>
11881
11399
 
11882
11400
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
11883
11401
 
@@ -11887,7 +11405,6 @@
11887
11405
  <xsl:otherwise>
11888
11406
  <xsl:call-template name="setNamedDestination"/>
11889
11407
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
11890
-
11891
11408
  <fo:list-item-label end-indent="label-end()">
11892
11409
  <fo:block role="SKIP">
11893
11410
  <fo:inline role="SKIP">
@@ -11914,18 +11431,16 @@
11914
11431
 
11915
11432
  <xsl:template name="processBibitem">
11916
11433
  <xsl:param name="biblio_tag_part">both</xsl:param>
11434
+ <!-- start bibitem processing -->
11435
+ <xsl:if test=".//*[local-name() = 'fn']">
11436
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
11437
+ </xsl:if>
11917
11438
 
11918
- <!-- start bibitem processing -->
11919
- <xsl:if test=".//*[local-name() = 'fn']">
11920
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
11921
- </xsl:if>
11922
-
11923
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11924
- <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
11925
- </xsl:apply-templates>
11926
- <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
11927
- <!-- end bibitem processing -->
11928
-
11439
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11440
+ <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
11441
+ </xsl:apply-templates>
11442
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
11443
+ <!-- end bibitem processing -->
11929
11444
  </xsl:template> <!-- processBibitem (bibitem) -->
11930
11445
 
11931
11446
  <xsl:template match="*[local-name() = 'title']" mode="title">
@@ -12068,8 +11583,7 @@
12068
11583
  <xsl:choose>
12069
11584
  <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
12070
11585
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
12071
- <xsl:otherwise><!-- default value -->
12072
- 3
11586
+ <xsl:otherwise><!-- default value -->3
12073
11587
  </xsl:otherwise>
12074
11588
  </xsl:choose>
12075
11589
  </xsl:variable>
@@ -12277,33 +11791,26 @@
12277
11791
  <!-- ================ -->
12278
11792
  <!-- Admonition -->
12279
11793
  <!-- ================ -->
12280
- <xsl:template match="*[local-name() = 'admonition']">
12281
-
12282
- <!-- text in the box -->
12283
- <xsl:call-template name="setNamedDestination"/>
12284
- <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
12285
-
12286
- <xsl:call-template name="setBlockSpanAll"/>
12287
-
12288
- <xsl:variable name="admonition_color" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = concat('color-admonition-', @type)]/ogc:value)"/>
12289
- <xsl:if test="$admonition_color != ''">
12290
- <xsl:attribute name="border">0.5pt solid <xsl:value-of select="$admonition_color"/></xsl:attribute>
12291
- <xsl:attribute name="color"><xsl:value-of select="$admonition_color"/></xsl:attribute>
12292
- </xsl:if>
12293
-
12294
- <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
12295
-
12296
- <fo:block xsl:use-attribute-sets="admonition-name-style">
12297
- <xsl:call-template name="displayAdmonitionName"/>
12298
- </fo:block>
12299
- <fo:block xsl:use-attribute-sets="admonition-p-style">
12300
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
12301
- </fo:block>
12302
-
12303
- </fo:block-container>
11794
+ <xsl:template match="*[local-name() = 'admonition']"> <!-- text in the box -->
11795
+ <xsl:call-template name="setNamedDestination"/>
11796
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
12304
11797
 
12305
- </fo:block-container>
11798
+ <xsl:call-template name="setBlockSpanAll"/>
11799
+ <xsl:variable name="admonition_color" select="normalize-space(/ogc:metanorma/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = concat('color-admonition-', @type)]/ogc:value)"/>
11800
+ <xsl:if test="$admonition_color != ''">
11801
+ <xsl:attribute name="border">0.5pt solid <xsl:value-of select="$admonition_color"/></xsl:attribute>
11802
+ <xsl:attribute name="color"><xsl:value-of select="$admonition_color"/></xsl:attribute>
11803
+ </xsl:if>
11804
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
11805
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
11806
+ <xsl:call-template name="displayAdmonitionName"/>
11807
+ </fo:block>
11808
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
11809
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
11810
+ </fo:block>
12306
11811
 
11812
+ </fo:block-container>
11813
+ </fo:block-container>
12307
11814
  </xsl:template>
12308
11815
 
12309
11816
  <xsl:template name="displayAdmonitionName">
@@ -12351,12 +11858,10 @@
12351
11858
  </xsl:template> -->
12352
11859
 
12353
11860
  <xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
11861
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
12354
11862
 
12355
- <fo:block xsl:use-attribute-sets="admonition-p-style">
12356
-
12357
- <xsl:apply-templates/>
12358
- </fo:block>
12359
-
11863
+ <xsl:apply-templates/>
11864
+ </fo:block>
12360
11865
  </xsl:template>
12361
11866
 
12362
11867
  <!-- ================ -->
@@ -12392,11 +11897,9 @@
12392
11897
 
12393
11898
  <!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
12394
11899
  <xsl:variable name="updated_xml_step2">
12395
-
12396
- <xsl:if test="$table_if = 'false'">
12397
- <xsl:copy-of select="$updated_xml_step1"/>
12398
- </xsl:if>
12399
-
11900
+ <xsl:if test="$table_if = 'false'">
11901
+ <xsl:copy-of select="$updated_xml_step1"/>
11902
+ </xsl:if>
12400
11903
  </xsl:variable>
12401
11904
 
12402
11905
  <xsl:variable name="endTime2" select="java:getTime(java:java.util.Date.new())"/>
@@ -12871,7 +12374,6 @@
12871
12374
  </xsl:template>
12872
12375
 
12873
12376
  <xsl:template name="addNamedDestinationAttribute">
12874
-
12875
12377
  </xsl:template>
12876
12378
 
12877
12379
  <xsl:template match="*[local-name() = 'fmt-name']"/>
@@ -13366,7 +12868,6 @@
13366
12868
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
13367
12869
  <xsl:if test="not(ancestor::*[local-name() = 'table'])"><regex><xsl:value-of select="$regex_standard_reference"/></regex></xsl:if>
13368
12870
  <!-- if EXPRESS reference -->
13369
-
13370
12871
  <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
13371
12872
  <regex><xsl:value-of select="$regex_solidus_units"/></regex>
13372
12873
  <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
@@ -13420,8 +12921,7 @@
13420
12921
 
13421
12922
  <xsl:variable name="text2">
13422
12923
  <xsl:element name="text" namespace="{$namespace_full}">
13423
- <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()">
13424
- <xsl:copy-of select="."/>
12924
+ <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()"><xsl:copy-of select="."/>
13425
12925
  </xsl:for-each>
13426
12926
  </xsl:element>
13427
12927
  </xsl:variable>
@@ -13713,9 +13213,7 @@
13713
13213
  </xsl:attribute>
13714
13214
  <xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
13715
13215
  <xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
13716
-
13717
- <xsl:value-of select="$skip_footnote_body_"/>
13718
-
13216
+ <xsl:value-of select="$skip_footnote_body_"/>
13719
13217
  </xsl:attribute>
13720
13218
  <xsl:attribute name="ref_id">
13721
13219
  <xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
@@ -13804,7 +13302,6 @@
13804
13302
 
13805
13303
  <xsl:template name="printEdition">
13806
13304
  <xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
13807
-
13808
13305
  <xsl:choose>
13809
13306
  <xsl:when test="$edition_i18n != ''">
13810
13307
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -14033,8 +13530,7 @@
14033
13530
  <dc:title>
14034
13531
  <xsl:variable name="title">
14035
13532
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
14036
-
14037
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
13533
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
14038
13534
 
14039
13535
  </xsl:for-each>
14040
13536
  </xsl:variable>
@@ -14053,16 +13549,14 @@
14053
13549
  </dc:title>
14054
13550
  <xsl:variable name="dc_creator">
14055
13551
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
14056
-
14057
- <rdf:Seq>
14058
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
14059
- <rdf:li>
14060
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
14061
- </rdf:li>
14062
- <!-- <xsl:if test="position() != last()">; </xsl:if> -->
14063
- </xsl:for-each>
14064
- </rdf:Seq>
14065
-
13552
+ <rdf:Seq>
13553
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role'][not(*[local-name() = 'description'])]/@type='author']">
13554
+ <rdf:li>
13555
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
13556
+ </rdf:li>
13557
+ <!-- <xsl:if test="position() != last()">; </xsl:if> -->
13558
+ </xsl:for-each>
13559
+ </rdf:Seq>
14066
13560
  </xsl:for-each>
14067
13561
  </xsl:variable>
14068
13562
  <xsl:if test="normalize-space($dc_creator) != ''">
@@ -14073,9 +13567,7 @@
14073
13567
 
14074
13568
  <xsl:variable name="dc_description">
14075
13569
  <xsl:variable name="abstract">
14076
-
14077
- <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'])]"/>
14078
-
13570
+ <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'])]"/>
14079
13571
  </xsl:variable>
14080
13572
  <rdf:Alt>
14081
13573
  <rdf:li xml:lang="x-default">
@@ -14140,7 +13632,9 @@
14140
13632
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
14141
13633
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
14142
13634
  <xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
14143
- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
13635
+ <!-- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/> -->
13636
+ <!-- See https://github.com/metanorma/metanorma-iso/issues/1369 -->
13637
+ <xsl:variable name="url" select="concat('url(file:///',$outputpdf_basepath, $attachment_path, ')')"/>
14144
13638
  <xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
14145
13639
  <!-- Todo: need update -->
14146
13640
  <xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
@@ -14305,7 +13799,7 @@
14305
13799
  <xsl:param name="normalize-space" select="'true'"/>
14306
13800
  <xsl:param name="keep_sep" select="'false'"/>
14307
13801
  <xsl:if test="string-length($pText) &gt;0">
14308
- <item>
13802
+ <xsl:element name="item" namespace="{$namespace_mn_xsl}">
14309
13803
  <xsl:choose>
14310
13804
  <xsl:when test="$normalize-space = 'true'">
14311
13805
  <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
@@ -14314,8 +13808,8 @@
14314
13808
  <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
14315
13809
  </xsl:otherwise>
14316
13810
  </xsl:choose>
14317
- </item>
14318
- <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><item><xsl:value-of select="$sep"/></item></xsl:if>
13811
+ </xsl:element>
13812
+ <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>
14319
13813
  <xsl:call-template name="split">
14320
13814
  <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
14321
13815
  <xsl:with-param name="sep" select="$sep"/>
@@ -14333,30 +13827,6 @@
14333
13827
  <xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
14334
13828
  </xsl:template>
14335
13829
 
14336
- <xsl:template name="namespaceCheck">
14337
- <xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
14338
- <xsl:variable name="XSLNS">
14339
-
14340
- <xsl:value-of select="document('')//*/namespace::ogc"/>
14341
-
14342
- </xsl:variable>
14343
- <!-- <xsl:if test="$documentNS != $XSLNS">
14344
- <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
14345
- </xsl:if> -->
14346
- </xsl:template> <!-- namespaceCheck -->
14347
-
14348
- <xsl:template name="getLanguage">
14349
- <xsl:param name="lang"/>
14350
- <xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
14351
- <xsl:choose>
14352
- <xsl:when test="$language = 'en'">English</xsl:when>
14353
- <xsl:when test="$language = 'fr'">French</xsl:when>
14354
- <xsl:when test="$language = 'de'">Deutsch</xsl:when>
14355
- <xsl:when test="$language = 'cn'">Chinese</xsl:when>
14356
- <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
14357
- </xsl:choose>
14358
- </xsl:template>
14359
-
14360
13830
  <xsl:template name="setId">
14361
13831
  <xsl:param name="prefix"/>
14362
13832
  <xsl:attribute name="id">