metanorma-csa 2.2.8 → 2.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/csa/csa.standard.xsl +495 -102
- data/lib/metanorma/csa/isodoc.rng +5 -1
- data/lib/metanorma/csa/version.rb +1 -1
- metadata +2 -2
@@ -188,69 +188,10 @@
|
|
188
188
|
|
189
189
|
<fo:block break-after="page"/>
|
190
190
|
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
</xsl:call-template>
|
196
|
-
</xsl:variable>
|
197
|
-
<fo:block font-size="26pt" color="black" margin-top="2pt" margin-bottom="30pt" role="H1"><xsl:value-of select="$title-toc"/></fo:block>
|
198
|
-
|
199
|
-
<fo:block margin-left="-3mm" role="TOC">
|
200
|
-
<xsl:for-each select="$contents//item[@display = 'true']">
|
201
|
-
<fo:block role="TOCI">
|
202
|
-
<fo:list-block>
|
203
|
-
<xsl:attribute name="provisional-distance-between-starts">
|
204
|
-
<xsl:choose>
|
205
|
-
<xsl:when test="@level >= 2"><xsl:value-of select="(@level - 1) * 10"/>mm</xsl:when>
|
206
|
-
<xsl:otherwise>3mm</xsl:otherwise>
|
207
|
-
</xsl:choose>
|
208
|
-
</xsl:attribute>
|
209
|
-
<fo:list-item>
|
210
|
-
<fo:list-item-label end-indent="label-end()">
|
211
|
-
<fo:block font-size="1pt"> </fo:block>
|
212
|
-
</fo:list-item-label>
|
213
|
-
<fo:list-item-body start-indent="body-start()">
|
214
|
-
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
215
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
216
|
-
<fo:inline padding-right="2mm"><xsl:value-of select="@section"/></fo:inline>
|
217
|
-
<xsl:apply-templates select="title"/>
|
218
|
-
<fo:inline keep-together.within-line="always">
|
219
|
-
<fo:leader leader-pattern="dots"/>
|
220
|
-
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
221
|
-
</fo:inline>
|
222
|
-
</fo:basic-link>
|
223
|
-
</fo:block>
|
224
|
-
</fo:list-item-body>
|
225
|
-
</fo:list-item>
|
226
|
-
</fo:list-block>
|
227
|
-
</fo:block>
|
228
|
-
</xsl:for-each>
|
229
|
-
|
230
|
-
<!-- List of Tables -->
|
231
|
-
<xsl:if test="$contents//tables/table">
|
232
|
-
<xsl:call-template name="insertListOf_Title">
|
233
|
-
<xsl:with-param name="title" select="$title-list-tables"/>
|
234
|
-
</xsl:call-template>
|
235
|
-
<xsl:for-each select="$contents//tables/table">
|
236
|
-
<xsl:call-template name="insertListOf_Item"/>
|
237
|
-
</xsl:for-each>
|
238
|
-
</xsl:if>
|
239
|
-
|
240
|
-
<!-- List of Figures -->
|
241
|
-
<xsl:if test="$contents//figures/figure">
|
242
|
-
<xsl:call-template name="insertListOf_Title">
|
243
|
-
<xsl:with-param name="title" select="$title-list-figures"/>
|
244
|
-
</xsl:call-template>
|
245
|
-
<xsl:for-each select="$contents//figures/figure">
|
246
|
-
<xsl:call-template name="insertListOf_Item"/>
|
247
|
-
</xsl:for-each>
|
248
|
-
</xsl:if>
|
249
|
-
|
250
|
-
</fo:block>
|
251
|
-
</fo:block-container>
|
252
|
-
|
253
|
-
<fo:block break-after="page"/>
|
191
|
+
<!-- Table of Contents -->
|
192
|
+
<xsl:apply-templates select="/*/csa:preface/csa:clause[@type = 'toc']">
|
193
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
194
|
+
</xsl:apply-templates>
|
254
195
|
|
255
196
|
<fo:block line-height="145%">
|
256
197
|
<xsl:call-template name="processPrefaceSectionsDefault"/>
|
@@ -308,6 +249,82 @@
|
|
308
249
|
</fo:block>
|
309
250
|
</xsl:template>
|
310
251
|
|
252
|
+
<xsl:template match="csa:preface/csa:clause[@type = 'toc']" priority="3">
|
253
|
+
<xsl:param name="process">false</xsl:param>
|
254
|
+
<xsl:if test="$process = 'true'">
|
255
|
+
<fo:block-container font-size="12pt" line-height="170%" color="rgb(7, 72, 156)">
|
256
|
+
|
257
|
+
<xsl:apply-templates/>
|
258
|
+
|
259
|
+
<xsl:if test="count(*) = 1 and *[local-name() = 'title']"> <!-- if there isn't user ToC -->
|
260
|
+
<fo:block margin-left="-3mm" role="TOC">
|
261
|
+
<xsl:for-each select="$contents//item[@display = 'true']">
|
262
|
+
<fo:block role="TOCI">
|
263
|
+
<fo:list-block>
|
264
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
265
|
+
<xsl:choose>
|
266
|
+
<xsl:when test="@level >= 2"><xsl:value-of select="(@level - 1) * 10"/>mm</xsl:when>
|
267
|
+
<xsl:otherwise>3mm</xsl:otherwise>
|
268
|
+
</xsl:choose>
|
269
|
+
</xsl:attribute>
|
270
|
+
<fo:list-item>
|
271
|
+
<fo:list-item-label end-indent="label-end()">
|
272
|
+
<fo:block font-size="1pt"> </fo:block>
|
273
|
+
</fo:list-item-label>
|
274
|
+
<fo:list-item-body start-indent="body-start()">
|
275
|
+
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
276
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
277
|
+
<fo:inline padding-right="2mm"><xsl:value-of select="@section"/></fo:inline>
|
278
|
+
<xsl:apply-templates select="title"/>
|
279
|
+
<fo:inline keep-together.within-line="always">
|
280
|
+
<fo:leader leader-pattern="dots"/>
|
281
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
282
|
+
</fo:inline>
|
283
|
+
</fo:basic-link>
|
284
|
+
</fo:block>
|
285
|
+
</fo:list-item-body>
|
286
|
+
</fo:list-item>
|
287
|
+
</fo:list-block>
|
288
|
+
</fo:block>
|
289
|
+
</xsl:for-each>
|
290
|
+
|
291
|
+
<!-- List of Tables -->
|
292
|
+
<xsl:if test="$contents//tables/table">
|
293
|
+
<xsl:call-template name="insertListOf_Title">
|
294
|
+
<xsl:with-param name="title" select="$title-list-tables"/>
|
295
|
+
</xsl:call-template>
|
296
|
+
<xsl:for-each select="$contents//tables/table">
|
297
|
+
<xsl:call-template name="insertListOf_Item"/>
|
298
|
+
</xsl:for-each>
|
299
|
+
</xsl:if>
|
300
|
+
|
301
|
+
<!-- List of Figures -->
|
302
|
+
<xsl:if test="$contents//figures/figure">
|
303
|
+
<xsl:call-template name="insertListOf_Title">
|
304
|
+
<xsl:with-param name="title" select="$title-list-figures"/>
|
305
|
+
</xsl:call-template>
|
306
|
+
<xsl:for-each select="$contents//figures/figure">
|
307
|
+
<xsl:call-template name="insertListOf_Item"/>
|
308
|
+
</xsl:for-each>
|
309
|
+
</xsl:if>
|
310
|
+
|
311
|
+
</fo:block>
|
312
|
+
</xsl:if>
|
313
|
+
</fo:block-container>
|
314
|
+
|
315
|
+
<fo:block break-after="page"/>
|
316
|
+
</xsl:if>
|
317
|
+
</xsl:template>
|
318
|
+
|
319
|
+
<xsl:template match="csa:preface/csa:clause[@type = 'toc']/csa:title" priority="3">
|
320
|
+
<xsl:variable name="title-toc">
|
321
|
+
<xsl:call-template name="getTitle">
|
322
|
+
<xsl:with-param name="name" select="'title-toc'"/>
|
323
|
+
</xsl:call-template>
|
324
|
+
</xsl:variable>
|
325
|
+
<fo:block font-size="26pt" color="black" margin-top="2pt" margin-bottom="30pt" role="H1"><xsl:value-of select="$title-toc"/></fo:block>
|
326
|
+
</xsl:template>
|
327
|
+
|
311
328
|
<xsl:template match="node()">
|
312
329
|
<xsl:apply-templates/>
|
313
330
|
</xsl:template>
|
@@ -333,6 +350,7 @@
|
|
333
350
|
|
334
351
|
<xsl:variable name="skip">
|
335
352
|
<xsl:choose>
|
353
|
+
<xsl:when test="@type = 'toc'">true</xsl:when>
|
336
354
|
<xsl:when test="ancestor-or-self::csa:bibitem">true</xsl:when>
|
337
355
|
<xsl:when test="ancestor-or-self::csa:term">true</xsl:when>
|
338
356
|
<xsl:otherwise>false</xsl:otherwise>
|
@@ -965,6 +983,10 @@
|
|
965
983
|
|
966
984
|
</xsl:attribute-set>
|
967
985
|
|
986
|
+
<xsl:template name="refine_link-style">
|
987
|
+
|
988
|
+
</xsl:template> <!-- refine_link-style -->
|
989
|
+
|
968
990
|
<xsl:attribute-set name="sourcecode-container-style">
|
969
991
|
|
970
992
|
</xsl:attribute-set>
|
@@ -981,6 +1003,10 @@
|
|
981
1003
|
|
982
1004
|
</xsl:attribute-set>
|
983
1005
|
|
1006
|
+
<xsl:template name="refine_sourcecode-style">
|
1007
|
+
|
1008
|
+
</xsl:template> <!-- refine_sourcecode-style -->
|
1009
|
+
|
984
1010
|
<xsl:attribute-set name="pre-style">
|
985
1011
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
986
1012
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -1064,6 +1090,10 @@
|
|
1064
1090
|
|
1065
1091
|
</xsl:attribute-set> <!-- example-style -->
|
1066
1092
|
|
1093
|
+
<xsl:template name="refine_example-style">
|
1094
|
+
|
1095
|
+
</xsl:template> <!-- refine_example-style -->
|
1096
|
+
|
1067
1097
|
<xsl:attribute-set name="example-body-style">
|
1068
1098
|
|
1069
1099
|
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
@@ -1086,6 +1116,10 @@
|
|
1086
1116
|
|
1087
1117
|
</xsl:attribute-set> <!-- example-p-style -->
|
1088
1118
|
|
1119
|
+
<xsl:template name="refine_example-p-style">
|
1120
|
+
|
1121
|
+
</xsl:template> <!-- refine_example-p-style -->
|
1122
|
+
|
1089
1123
|
<xsl:attribute-set name="termexample-name-style">
|
1090
1124
|
|
1091
1125
|
<xsl:attribute name="padding-right">10mm</xsl:attribute>
|
@@ -1111,17 +1145,43 @@
|
|
1111
1145
|
|
1112
1146
|
</xsl:attribute-set> <!-- table-container-style -->
|
1113
1147
|
|
1148
|
+
<xsl:template name="refine_table-container-style">
|
1149
|
+
<xsl:param name="margin-side"/>
|
1150
|
+
|
1151
|
+
<xsl:attribute name="margin-left"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
|
1152
|
+
<xsl:attribute name="margin-right"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
|
1153
|
+
|
1154
|
+
<!-- end table block-container attributes -->
|
1155
|
+
</xsl:template> <!-- refine_table-container-style -->
|
1156
|
+
|
1114
1157
|
<xsl:attribute-set name="table-style">
|
1115
1158
|
<xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
|
1116
1159
|
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
1117
1160
|
|
1118
1161
|
</xsl:attribute-set><!-- table-style -->
|
1119
1162
|
|
1163
|
+
<xsl:template name="refine_table-style">
|
1164
|
+
<xsl:param name="margin-side"/>
|
1165
|
+
|
1166
|
+
<xsl:if test="$margin-side != 0">
|
1167
|
+
<xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
|
1168
|
+
<xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
|
1169
|
+
</xsl:if>
|
1170
|
+
|
1171
|
+
<xsl:call-template name="setBordersTableArray"/>
|
1172
|
+
|
1173
|
+
</xsl:template> <!-- refine_table-style -->
|
1174
|
+
|
1120
1175
|
<xsl:attribute-set name="table-name-style">
|
1121
1176
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1122
1177
|
|
1123
1178
|
</xsl:attribute-set> <!-- table-name-style -->
|
1124
1179
|
|
1180
|
+
<xsl:template name="refine_table-name-style">
|
1181
|
+
<xsl:param name="continued"/>
|
1182
|
+
|
1183
|
+
</xsl:template> <!-- refine_table-name-style -->
|
1184
|
+
|
1125
1185
|
<xsl:attribute-set name="table-row-style">
|
1126
1186
|
<xsl:attribute name="min-height">4mm</xsl:attribute>
|
1127
1187
|
|
@@ -1132,14 +1192,30 @@
|
|
1132
1192
|
|
1133
1193
|
</xsl:attribute-set>
|
1134
1194
|
|
1195
|
+
<xsl:template name="refine_table-header-row-style">
|
1196
|
+
|
1197
|
+
<xsl:call-template name="setBordersTableArray"/>
|
1198
|
+
|
1199
|
+
</xsl:template> <!-- refine_table-header-row-style -->
|
1200
|
+
|
1135
1201
|
<xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
|
1136
1202
|
|
1137
1203
|
</xsl:attribute-set>
|
1138
1204
|
|
1205
|
+
<xsl:template name="refine_table-footer-row-style">
|
1206
|
+
|
1207
|
+
</xsl:template> <!-- refine_table-footer-row-style -->
|
1208
|
+
|
1139
1209
|
<xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
|
1140
1210
|
|
1141
1211
|
</xsl:attribute-set>
|
1142
1212
|
|
1213
|
+
<xsl:template name="refine_table-body-row-style">
|
1214
|
+
|
1215
|
+
<xsl:call-template name="setBordersTableArray"/>
|
1216
|
+
|
1217
|
+
</xsl:template> <!-- refine_table-body-row-style -->
|
1218
|
+
|
1143
1219
|
<xsl:attribute-set name="table-header-cell-style">
|
1144
1220
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1145
1221
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
@@ -1148,6 +1224,18 @@
|
|
1148
1224
|
|
1149
1225
|
</xsl:attribute-set> <!-- table-header-cell-style -->
|
1150
1226
|
|
1227
|
+
<xsl:template name="refine_table-header-cell-style">
|
1228
|
+
|
1229
|
+
<xsl:call-template name="setBordersTableArray"/>
|
1230
|
+
|
1231
|
+
<xsl:if test="$lang = 'ar'">
|
1232
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1233
|
+
</xsl:if>
|
1234
|
+
|
1235
|
+
<xsl:call-template name="setTableCellAttributes"/>
|
1236
|
+
|
1237
|
+
</xsl:template> <!-- refine_table-header-cell-style -->
|
1238
|
+
|
1151
1239
|
<xsl:attribute-set name="table-cell-style">
|
1152
1240
|
<xsl:attribute name="display-align">center</xsl:attribute>
|
1153
1241
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
@@ -1155,6 +1243,18 @@
|
|
1155
1243
|
|
1156
1244
|
</xsl:attribute-set> <!-- table-cell-style -->
|
1157
1245
|
|
1246
|
+
<xsl:template name="refine_table-cell-style">
|
1247
|
+
|
1248
|
+
<xsl:if test="$lang = 'ar'">
|
1249
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1250
|
+
</xsl:if>
|
1251
|
+
|
1252
|
+
<!-- bsi -->
|
1253
|
+
|
1254
|
+
<xsl:call-template name="setBordersTableArray"/>
|
1255
|
+
|
1256
|
+
</xsl:template> <!-- refine_table-cell-style -->
|
1257
|
+
|
1158
1258
|
<xsl:attribute-set name="table-footer-cell-style">
|
1159
1259
|
<xsl:attribute name="border">solid black 1pt</xsl:attribute>
|
1160
1260
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
@@ -1163,12 +1263,20 @@
|
|
1163
1263
|
|
1164
1264
|
</xsl:attribute-set> <!-- table-footer-cell-style -->
|
1165
1265
|
|
1266
|
+
<xsl:template name="refine_table-footer-cell-style">
|
1267
|
+
|
1268
|
+
</xsl:template> <!-- refine_table-footer-cell-style -->
|
1269
|
+
|
1166
1270
|
<xsl:attribute-set name="table-note-style">
|
1167
1271
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1168
1272
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1169
1273
|
|
1170
1274
|
</xsl:attribute-set><!-- table-note-style -->
|
1171
1275
|
|
1276
|
+
<xsl:template name="refine_table-note-style">
|
1277
|
+
|
1278
|
+
</xsl:template> <!-- refine_table-note-style -->
|
1279
|
+
|
1172
1280
|
<xsl:attribute-set name="table-fn-style">
|
1173
1281
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1174
1282
|
|
@@ -1222,11 +1330,19 @@
|
|
1222
1330
|
|
1223
1331
|
</xsl:attribute-set>
|
1224
1332
|
|
1333
|
+
<xsl:template name="refine_dt-cell-style">
|
1334
|
+
|
1335
|
+
</xsl:template> <!-- refine_dt-cell-style -->
|
1336
|
+
|
1225
1337
|
<xsl:attribute-set name="dt-block-style">
|
1226
1338
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
1227
1339
|
|
1228
1340
|
</xsl:attribute-set>
|
1229
1341
|
|
1342
|
+
<xsl:template name="refine_dt-block-style">
|
1343
|
+
|
1344
|
+
</xsl:template> <!-- refine_dt-block-style -->
|
1345
|
+
|
1230
1346
|
<xsl:attribute-set name="dl-name-style">
|
1231
1347
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1232
1348
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -1238,6 +1354,10 @@
|
|
1238
1354
|
|
1239
1355
|
</xsl:attribute-set>
|
1240
1356
|
|
1357
|
+
<xsl:template name="refine_dd-cell-style">
|
1358
|
+
|
1359
|
+
</xsl:template> <!-- refine_dd-cell-style -->
|
1360
|
+
|
1241
1361
|
<!-- ========================== -->
|
1242
1362
|
<!-- END Definition's list styles -->
|
1243
1363
|
<!-- ========================== -->
|
@@ -1251,7 +1371,6 @@
|
|
1251
1371
|
</xsl:attribute-set>
|
1252
1372
|
|
1253
1373
|
<xsl:attribute-set name="xref-style">
|
1254
|
-
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
1255
1374
|
|
1256
1375
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1257
1376
|
|
@@ -1264,6 +1383,12 @@
|
|
1264
1383
|
|
1265
1384
|
</xsl:attribute-set>
|
1266
1385
|
|
1386
|
+
<xsl:template name="refine_eref-style">
|
1387
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
1388
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
1389
|
+
|
1390
|
+
</xsl:template> <!-- refine_eref-style -->
|
1391
|
+
|
1267
1392
|
<xsl:attribute-set name="note-style">
|
1268
1393
|
|
1269
1394
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
@@ -1273,6 +1398,10 @@
|
|
1273
1398
|
|
1274
1399
|
</xsl:attribute-set>
|
1275
1400
|
|
1401
|
+
<xsl:template name="refine_note-style">
|
1402
|
+
|
1403
|
+
</xsl:template>
|
1404
|
+
|
1276
1405
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
1277
1406
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
1278
1407
|
|
@@ -1282,11 +1411,19 @@
|
|
1282
1411
|
|
1283
1412
|
</xsl:attribute-set>
|
1284
1413
|
|
1414
|
+
<xsl:template name="refine_note-name-style">
|
1415
|
+
|
1416
|
+
</xsl:template> <!-- refine_note-name-style -->
|
1417
|
+
|
1285
1418
|
<xsl:attribute-set name="table-note-name-style">
|
1286
1419
|
<xsl:attribute name="padding-right">2mm</xsl:attribute>
|
1287
1420
|
|
1288
1421
|
</xsl:attribute-set>
|
1289
1422
|
|
1423
|
+
<xsl:template name="refine_table-note-name-style">
|
1424
|
+
|
1425
|
+
</xsl:template> <!-- refine_table-note-name-style -->
|
1426
|
+
|
1290
1427
|
<xsl:attribute-set name="note-p-style">
|
1291
1428
|
|
1292
1429
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1301,10 +1438,18 @@
|
|
1301
1438
|
|
1302
1439
|
</xsl:attribute-set>
|
1303
1440
|
|
1441
|
+
<xsl:template name="refine_termnote-style">
|
1442
|
+
|
1443
|
+
</xsl:template> <!-- refine_termnote-style -->
|
1444
|
+
|
1304
1445
|
<xsl:attribute-set name="termnote-name-style">
|
1305
1446
|
|
1306
1447
|
</xsl:attribute-set>
|
1307
1448
|
|
1449
|
+
<xsl:template name="refine_termnote-name-style">
|
1450
|
+
|
1451
|
+
</xsl:template>
|
1452
|
+
|
1308
1453
|
<xsl:attribute-set name="termnote-p-style">
|
1309
1454
|
|
1310
1455
|
</xsl:attribute-set>
|
@@ -1318,6 +1463,10 @@
|
|
1318
1463
|
|
1319
1464
|
</xsl:attribute-set>
|
1320
1465
|
|
1466
|
+
<xsl:template name="refine_quote-style">
|
1467
|
+
|
1468
|
+
</xsl:template>
|
1469
|
+
|
1321
1470
|
<xsl:attribute-set name="quote-source-style">
|
1322
1471
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
1323
1472
|
|
@@ -1332,6 +1481,10 @@
|
|
1332
1481
|
|
1333
1482
|
</xsl:attribute-set>
|
1334
1483
|
|
1484
|
+
<xsl:template name="refine_termsource-style">
|
1485
|
+
|
1486
|
+
</xsl:template> <!-- refine_termsource-style -->
|
1487
|
+
|
1335
1488
|
<xsl:attribute-set name="termsource-text-style">
|
1336
1489
|
|
1337
1490
|
</xsl:attribute-set>
|
@@ -1374,6 +1527,10 @@
|
|
1374
1527
|
|
1375
1528
|
</xsl:attribute-set>
|
1376
1529
|
|
1530
|
+
<xsl:template name="refine_figure-name-style">
|
1531
|
+
|
1532
|
+
</xsl:template> <!-- refine_figure-name-style -->
|
1533
|
+
|
1377
1534
|
<xsl:attribute-set name="figure-source-style">
|
1378
1535
|
|
1379
1536
|
</xsl:attribute-set>
|
@@ -1393,6 +1550,10 @@
|
|
1393
1550
|
|
1394
1551
|
</xsl:attribute-set> <!-- formula-stem-block-style -->
|
1395
1552
|
|
1553
|
+
<xsl:template name="refine_formula-stem-block-style">
|
1554
|
+
|
1555
|
+
</xsl:template> <!-- refine_formula-stem-block-style -->
|
1556
|
+
|
1396
1557
|
<xsl:attribute-set name="formula-stem-number-style">
|
1397
1558
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
1398
1559
|
|
@@ -1404,6 +1565,10 @@
|
|
1404
1565
|
|
1405
1566
|
</xsl:attribute-set>
|
1406
1567
|
|
1568
|
+
<xsl:template name="refine_image-style">
|
1569
|
+
|
1570
|
+
</xsl:template>
|
1571
|
+
|
1407
1572
|
<xsl:attribute-set name="figure-pseudocode-p-style">
|
1408
1573
|
|
1409
1574
|
</xsl:attribute-set>
|
@@ -1496,6 +1661,10 @@
|
|
1496
1661
|
|
1497
1662
|
</xsl:attribute-set>
|
1498
1663
|
|
1664
|
+
<xsl:template name="refine_mathml-style">
|
1665
|
+
|
1666
|
+
</xsl:template>
|
1667
|
+
|
1499
1668
|
<xsl:attribute-set name="list-style">
|
1500
1669
|
|
1501
1670
|
<xsl:attribute name="provisional-distance-between-starts">6.5mm</xsl:attribute>
|
@@ -1503,6 +1672,10 @@
|
|
1503
1672
|
|
1504
1673
|
</xsl:attribute-set> <!-- list-style -->
|
1505
1674
|
|
1675
|
+
<xsl:template name="refine_list-style">
|
1676
|
+
|
1677
|
+
</xsl:template> <!-- refine_list-style -->
|
1678
|
+
|
1506
1679
|
<xsl:attribute-set name="list-name-style">
|
1507
1680
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1508
1681
|
|
@@ -1512,16 +1685,28 @@
|
|
1512
1685
|
|
1513
1686
|
</xsl:attribute-set>
|
1514
1687
|
|
1688
|
+
<xsl:template name="refine_list-item-style">
|
1689
|
+
|
1690
|
+
</xsl:template> <!-- refine_list-item-style -->
|
1691
|
+
|
1515
1692
|
<xsl:attribute-set name="list-item-label-style">
|
1516
1693
|
|
1517
1694
|
</xsl:attribute-set>
|
1518
1695
|
|
1696
|
+
<xsl:template name="refine_list-item-label-style">
|
1697
|
+
|
1698
|
+
</xsl:template> <!-- refine_list-item-label-style -->
|
1699
|
+
|
1519
1700
|
<xsl:attribute-set name="list-item-body-style">
|
1520
1701
|
|
1521
1702
|
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
1522
1703
|
|
1523
1704
|
</xsl:attribute-set>
|
1524
1705
|
|
1706
|
+
<xsl:template name="refine_list-item-body-style">
|
1707
|
+
|
1708
|
+
</xsl:template> <!-- refine_list-item-body-style -->
|
1709
|
+
|
1525
1710
|
<xsl:attribute-set name="toc-style">
|
1526
1711
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1527
1712
|
</xsl:attribute-set>
|
@@ -1532,6 +1717,10 @@
|
|
1532
1717
|
|
1533
1718
|
</xsl:attribute-set>
|
1534
1719
|
|
1720
|
+
<xsl:template name="refine_fn-reference-style">
|
1721
|
+
|
1722
|
+
</xsl:template> <!-- refine_fn-reference-style -->
|
1723
|
+
|
1535
1724
|
<xsl:attribute-set name="fn-style">
|
1536
1725
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1537
1726
|
</xsl:attribute-set>
|
@@ -1558,6 +1747,10 @@
|
|
1558
1747
|
|
1559
1748
|
</xsl:attribute-set>
|
1560
1749
|
|
1750
|
+
<xsl:template name="refine_fn-body-style">
|
1751
|
+
|
1752
|
+
</xsl:template> <!-- refine_fn-body-style -->
|
1753
|
+
|
1561
1754
|
<xsl:attribute-set name="fn-body-num-style">
|
1562
1755
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
1563
1756
|
|
@@ -1566,6 +1759,10 @@
|
|
1566
1759
|
|
1567
1760
|
</xsl:attribute-set> <!-- fn-body-num-style -->
|
1568
1761
|
|
1762
|
+
<xsl:template name="refine_fn-body-num-style">
|
1763
|
+
|
1764
|
+
</xsl:template> <!-- refine_fn-body-num-style -->
|
1765
|
+
|
1569
1766
|
<!-- admonition -->
|
1570
1767
|
<xsl:attribute-set name="admonition-style">
|
1571
1768
|
|
@@ -2223,10 +2420,9 @@
|
|
2223
2420
|
|
2224
2421
|
<fo:block-container xsl:use-attribute-sets="table-container-style">
|
2225
2422
|
|
2226
|
-
|
2227
|
-
<xsl:
|
2228
|
-
|
2229
|
-
<!-- end table block-container attributes -->
|
2423
|
+
<xsl:call-template name="refine_table-container-style">
|
2424
|
+
<xsl:with-param name="margin-side" select="$margin-side"/>
|
2425
|
+
</xsl:call-template>
|
2230
2426
|
|
2231
2427
|
<!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
|
2232
2428
|
|
@@ -2247,12 +2443,9 @@
|
|
2247
2443
|
|
2248
2444
|
<xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
|
2249
2445
|
|
2250
|
-
|
2251
|
-
|
2252
|
-
|
2253
|
-
</xsl:if>
|
2254
|
-
|
2255
|
-
<xsl:call-template name="setBordersTableArray"/>
|
2446
|
+
<xsl:call-template name="refine_table-style">
|
2447
|
+
<xsl:with-param name="margin-side" select="$margin-side"/>
|
2448
|
+
</xsl:call-template>
|
2256
2449
|
|
2257
2450
|
</xsl:element>
|
2258
2451
|
</xsl:variable>
|
@@ -2318,7 +2511,7 @@
|
|
2318
2511
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2319
2512
|
</xsl:when>
|
2320
2513
|
<xsl:otherwise>
|
2321
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
2514
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
2322
2515
|
</xsl:otherwise>
|
2323
2516
|
</xsl:choose>
|
2324
2517
|
|
@@ -2408,6 +2601,10 @@
|
|
2408
2601
|
|
2409
2602
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2410
2603
|
|
2604
|
+
<xsl:call-template name="refine_table-name-style">
|
2605
|
+
<xsl:with-param name="continued" select="$continued"/>
|
2606
|
+
</xsl:call-template>
|
2607
|
+
|
2411
2608
|
<xsl:choose>
|
2412
2609
|
<xsl:when test="$continued = 'true'">
|
2413
2610
|
|
@@ -2790,6 +2987,8 @@
|
|
2790
2987
|
<fo:table-row>
|
2791
2988
|
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
2792
2989
|
|
2990
|
+
<xsl:call-template name="refine_table-header-title-style"/>
|
2991
|
+
|
2793
2992
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
2794
2993
|
<xsl:with-param name="continued">true</xsl:with-param>
|
2795
2994
|
</xsl:apply-templates>
|
@@ -2802,6 +3001,10 @@
|
|
2802
3001
|
</fo:table-row>
|
2803
3002
|
</xsl:template> <!-- table-header-title -->
|
2804
3003
|
|
3004
|
+
<xsl:template name="refine_table-header-title-style">
|
3005
|
+
|
3006
|
+
</xsl:template> <!-- refine_table-header-title-style -->
|
3007
|
+
|
2805
3008
|
<xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
2806
3009
|
<fo:table-body>
|
2807
3010
|
<xsl:apply-templates/>
|
@@ -2826,7 +3029,7 @@
|
|
2826
3029
|
<xsl:param name="colwidths"/>
|
2827
3030
|
<xsl:param name="colgroup"/>
|
2828
3031
|
|
2829
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source']"/>
|
3032
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
2830
3033
|
|
2831
3034
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
2832
3035
|
|
@@ -2886,6 +3089,8 @@
|
|
2886
3089
|
<fo:table-row>
|
2887
3090
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
2888
3091
|
|
3092
|
+
<xsl:call-template name="refine_table-footer-cell-style"/>
|
3093
|
+
|
2889
3094
|
<xsl:call-template name="setBordersTableArray"/>
|
2890
3095
|
|
2891
3096
|
<!-- fn will be processed inside 'note' processing -->
|
@@ -2894,6 +3099,7 @@
|
|
2894
3099
|
|
2895
3100
|
<!-- except gb and bsi -->
|
2896
3101
|
|
3102
|
+
<xsl:apply-templates select="../*[local-name()='p']"/>
|
2897
3103
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
2898
3104
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
2899
3105
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
@@ -3025,7 +3231,7 @@
|
|
3025
3231
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
3026
3232
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
3027
3233
|
|
3028
|
-
<xsl:call-template name="
|
3234
|
+
<xsl:call-template name="refine_table-header-row-style"/>
|
3029
3235
|
|
3030
3236
|
<xsl:call-template name="setTableRowAttributes"/>
|
3031
3237
|
|
@@ -3059,6 +3265,8 @@
|
|
3059
3265
|
<xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
|
3060
3266
|
<fo:table-row xsl:use-attribute-sets="table-footer-row-style">
|
3061
3267
|
|
3268
|
+
<xsl:call-template name="refine_table-footer-row-style"/>
|
3269
|
+
|
3062
3270
|
<xsl:call-template name="setTableRowAttributes"/>
|
3063
3271
|
<xsl:apply-templates/>
|
3064
3272
|
</fo:table-row>
|
@@ -3072,9 +3280,10 @@
|
|
3072
3280
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3073
3281
|
</xsl:if>
|
3074
3282
|
|
3075
|
-
<xsl:call-template name="
|
3283
|
+
<xsl:call-template name="refine_table-body-row-style"/>
|
3076
3284
|
|
3077
3285
|
<xsl:call-template name="setTableRowAttributes"/>
|
3286
|
+
|
3078
3287
|
<xsl:apply-templates/>
|
3079
3288
|
</fo:table-row>
|
3080
3289
|
</xsl:template>
|
@@ -3093,13 +3302,7 @@
|
|
3093
3302
|
<xsl:with-param name="default">center</xsl:with-param>
|
3094
3303
|
</xsl:call-template>
|
3095
3304
|
|
3096
|
-
<xsl:call-template name="
|
3097
|
-
|
3098
|
-
<xsl:if test="$lang = 'ar'">
|
3099
|
-
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3100
|
-
</xsl:if>
|
3101
|
-
|
3102
|
-
<xsl:call-template name="setTableCellAttributes"/>
|
3305
|
+
<xsl:call-template name="refine_table-header-cell-style"/>
|
3103
3306
|
|
3104
3307
|
<fo:block>
|
3105
3308
|
<xsl:apply-templates/>
|
@@ -3141,13 +3344,7 @@
|
|
3141
3344
|
<xsl:with-param name="default">left</xsl:with-param>
|
3142
3345
|
</xsl:call-template>
|
3143
3346
|
|
3144
|
-
<xsl:
|
3145
|
-
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3146
|
-
</xsl:if>
|
3147
|
-
|
3148
|
-
<!-- bsi -->
|
3149
|
-
|
3150
|
-
<xsl:call-template name="setBordersTableArray"/>
|
3347
|
+
<xsl:call-template name="refine_table-cell-style"/>
|
3151
3348
|
|
3152
3349
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
3153
3350
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
@@ -3178,9 +3375,13 @@
|
|
3178
3375
|
|
3179
3376
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
3180
3377
|
|
3378
|
+
<xsl:call-template name="refine_table-note-style"/>
|
3379
|
+
|
3181
3380
|
<!-- Table's note name (NOTE, for example) -->
|
3182
3381
|
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
3183
3382
|
|
3383
|
+
<xsl:call-template name="refine_table-note-name-style"/>
|
3384
|
+
|
3184
3385
|
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
3185
3386
|
|
3186
3387
|
</fo:inline>
|
@@ -3208,6 +3409,14 @@
|
|
3208
3409
|
<!-- list of footnotes to calculate actual footnotes number -->
|
3209
3410
|
<xsl:variable name="p_fn_">
|
3210
3411
|
<xsl:call-template name="get_fn_list"/>
|
3412
|
+
<!-- <xsl:choose>
|
3413
|
+
<xsl:when test="$namespace = 'jis'">
|
3414
|
+
<xsl:call-template name="get_fn_list_for_element"/>
|
3415
|
+
</xsl:when>
|
3416
|
+
<xsl:otherwise>
|
3417
|
+
<xsl:call-template name="get_fn_list"/>
|
3418
|
+
</xsl:otherwise>
|
3419
|
+
</xsl:choose> -->
|
3211
3420
|
</xsl:variable>
|
3212
3421
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
3213
3422
|
|
@@ -3232,7 +3441,14 @@
|
|
3232
3441
|
|
3233
3442
|
</xsl:variable>
|
3234
3443
|
|
3235
|
-
<xsl:variable name="ref_id"
|
3444
|
+
<xsl:variable name="ref_id">
|
3445
|
+
<xsl:choose>
|
3446
|
+
<xsl:when test="normalize-space(@ref_id) != ''"><xsl:value-of select="@ref_id"/></xsl:when>
|
3447
|
+
<xsl:otherwise>
|
3448
|
+
<xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
3449
|
+
</xsl:otherwise>
|
3450
|
+
</xsl:choose>
|
3451
|
+
</xsl:variable>
|
3236
3452
|
<xsl:variable name="footnote_inline">
|
3237
3453
|
<fo:inline>
|
3238
3454
|
|
@@ -3258,7 +3474,7 @@
|
|
3258
3474
|
<xsl:call-template name="insert_basic_link">
|
3259
3475
|
<xsl:with-param name="element">
|
3260
3476
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
3261
|
-
<xsl:
|
3477
|
+
<xsl:copy-of select="$current_fn_number_text"/>
|
3262
3478
|
</fo:basic-link>
|
3263
3479
|
</xsl:with-param>
|
3264
3480
|
</xsl:call-template>
|
@@ -3278,8 +3494,12 @@
|
|
3278
3494
|
|
3279
3495
|
<fo:block xsl:use-attribute-sets="fn-body-style">
|
3280
3496
|
|
3497
|
+
<xsl:call-template name="refine_fn-body-style"/>
|
3498
|
+
|
3281
3499
|
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
3282
3500
|
|
3501
|
+
<xsl:call-template name="refine_fn-body-num-style"/>
|
3502
|
+
|
3283
3503
|
<xsl:value-of select="$current_fn_number_text"/>
|
3284
3504
|
</fo:inline>
|
3285
3505
|
<xsl:apply-templates/>
|
@@ -3331,6 +3551,28 @@
|
|
3331
3551
|
</xsl:choose>
|
3332
3552
|
</xsl:template>
|
3333
3553
|
|
3554
|
+
<xsl:template name="get_fn_list_for_element">
|
3555
|
+
<xsl:choose>
|
3556
|
+
<xsl:when test="@current_fn_number"> <!-- footnote reference number calculated already -->
|
3557
|
+
<fn gen_id="{generate-id(.)}">
|
3558
|
+
<xsl:copy-of select="@*"/>
|
3559
|
+
<xsl:copy-of select="node()"/>
|
3560
|
+
</fn>
|
3561
|
+
</xsl:when>
|
3562
|
+
<xsl:otherwise>
|
3563
|
+
<xsl:for-each select="ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1]">
|
3564
|
+
<xsl:variable name="element_id" select="@id"/>
|
3565
|
+
<xsl:for-each select=".//*[local-name() = 'fn'][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
3566
|
+
<!-- copy unique fn -->
|
3567
|
+
<fn gen_id="{generate-id(.)}">
|
3568
|
+
<xsl:copy-of select="@*"/>
|
3569
|
+
<xsl:copy-of select="node()"/>
|
3570
|
+
</fn>
|
3571
|
+
</xsl:for-each>
|
3572
|
+
</xsl:for-each>
|
3573
|
+
</xsl:otherwise>
|
3574
|
+
</xsl:choose>
|
3575
|
+
</xsl:template>
|
3334
3576
|
<!-- ============================ -->
|
3335
3577
|
<!-- table's footnotes rendering -->
|
3336
3578
|
<!-- ============================ -->
|
@@ -3505,6 +3747,8 @@
|
|
3505
3747
|
<xsl:template match="*[local-name()='fn']">
|
3506
3748
|
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
3507
3749
|
|
3750
|
+
<xsl:call-template name="refine_fn-reference-style"/>
|
3751
|
+
|
3508
3752
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
3509
3753
|
|
3510
3754
|
<xsl:value-of select="@reference"/>
|
@@ -3604,6 +3848,8 @@
|
|
3604
3848
|
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
3605
3849
|
<fo:block margin-bottom="12pt" text-align="left">
|
3606
3850
|
|
3851
|
+
<xsl:call-template name="refine_dl_formula_where_style"/>
|
3852
|
+
|
3607
3853
|
<!-- <xsl:variable name="title-where">
|
3608
3854
|
<xsl:call-template name="getLocalizedString">
|
3609
3855
|
<xsl:with-param name="key">where</xsl:with-param>
|
@@ -3617,6 +3863,8 @@
|
|
3617
3863
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
|
3618
3864
|
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
3619
3865
|
|
3866
|
+
<xsl:call-template name="refine_figure_key_style"/>
|
3867
|
+
|
3620
3868
|
<xsl:variable name="title-key">
|
3621
3869
|
<xsl:call-template name="getLocalizedString">
|
3622
3870
|
<xsl:with-param name="key">key</xsl:with-param>
|
@@ -3631,12 +3879,16 @@
|
|
3631
3879
|
<xsl:if test="$onlyOneComponent = 'false'">
|
3632
3880
|
<fo:block>
|
3633
3881
|
|
3882
|
+
<xsl:call-template name="refine_multicomponent_style"/>
|
3883
|
+
|
3634
3884
|
<xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
|
3635
3885
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
3636
3886
|
</xsl:if>
|
3637
3887
|
|
3638
3888
|
<fo:block>
|
3639
3889
|
|
3890
|
+
<xsl:call-template name="refine_multicomponent_block_style"/>
|
3891
|
+
|
3640
3892
|
<xsl:apply-templates select="*[local-name() = 'name']">
|
3641
3893
|
<xsl:with-param name="process">true</xsl:with-param>
|
3642
3894
|
</xsl:apply-templates>
|
@@ -3794,6 +4046,24 @@
|
|
3794
4046
|
|
3795
4047
|
</xsl:template> <!-- END: dl -->
|
3796
4048
|
|
4049
|
+
<xsl:template name="refine_dl_formula_where_style">
|
4050
|
+
|
4051
|
+
</xsl:template> <!-- refine_dl_formula_where_style -->
|
4052
|
+
|
4053
|
+
<xsl:template name="refine_figure_key_style">
|
4054
|
+
|
4055
|
+
</xsl:template> <!-- refine_figure_key_style -->
|
4056
|
+
|
4057
|
+
<xsl:template name="refine_multicomponent_style">
|
4058
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
4059
|
+
|
4060
|
+
</xsl:template> <!-- refine_multicomponent_style -->
|
4061
|
+
|
4062
|
+
<xsl:template name="refine_multicomponent_block_style">
|
4063
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
4064
|
+
|
4065
|
+
</xsl:template> <!-- refine_multicomponent_block_style -->
|
4066
|
+
|
3797
4067
|
<!-- ignore 'p' with 'where' in formula, before 'dl' -->
|
3798
4068
|
<xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
|
3799
4069
|
|
@@ -4013,6 +4283,8 @@
|
|
4013
4283
|
|
4014
4284
|
</xsl:if>
|
4015
4285
|
|
4286
|
+
<xsl:call-template name="refine_dt-cell-style"/>
|
4287
|
+
|
4016
4288
|
<fo:block xsl:use-attribute-sets="dt-block-style">
|
4017
4289
|
<xsl:copy-of select="@id"/>
|
4018
4290
|
|
@@ -4020,6 +4292,8 @@
|
|
4020
4292
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
4021
4293
|
</xsl:if>
|
4022
4294
|
|
4295
|
+
<xsl:call-template name="refine_dt-block-style"/>
|
4296
|
+
|
4023
4297
|
<xsl:apply-templates>
|
4024
4298
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
4025
4299
|
</xsl:apply-templates>
|
@@ -4039,6 +4313,8 @@
|
|
4039
4313
|
<xsl:attribute name="border">0.1pt solid black</xsl:attribute>
|
4040
4314
|
</xsl:if>
|
4041
4315
|
|
4316
|
+
<xsl:call-template name="refine_dd-cell-style"/>
|
4317
|
+
|
4042
4318
|
<fo:block>
|
4043
4319
|
|
4044
4320
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
@@ -4189,12 +4465,18 @@
|
|
4189
4465
|
<xsl:param name="split_keep-within-line"/>
|
4190
4466
|
<fo:inline font-weight="bold">
|
4191
4467
|
|
4468
|
+
<xsl:call-template name="refine_strong_style"/>
|
4469
|
+
|
4192
4470
|
<xsl:apply-templates>
|
4193
4471
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
4194
4472
|
</xsl:apply-templates>
|
4195
4473
|
</fo:inline>
|
4196
4474
|
</xsl:template>
|
4197
4475
|
|
4476
|
+
<xsl:template name="refine_strong_style">
|
4477
|
+
|
4478
|
+
</xsl:template>
|
4479
|
+
|
4198
4480
|
<xsl:template match="*[local-name()='padding']">
|
4199
4481
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
4200
4482
|
</xsl:template>
|
@@ -5338,6 +5620,11 @@
|
|
5338
5620
|
|
5339
5621
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
5340
5622
|
|
5623
|
+
<!-- DEBUG -->
|
5624
|
+
<!-- <xsl:copy-of select="ancestor::*[local-name() = 'stem']/@font-family"/> -->
|
5625
|
+
|
5626
|
+
<xsl:call-template name="refine_mathml-style"/>
|
5627
|
+
|
5341
5628
|
<xsl:if test="$isGenerateTableIF = 'true' and ancestor::*[local-name() = 'td' or local-name() = 'th' or local-name() = 'dl'] and not(following-sibling::node()[not(self::comment())][normalize-space() != ''])"> <!-- math in table cell, and math is last element -->
|
5342
5629
|
<!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
|
5343
5630
|
</xsl:if>
|
@@ -5442,6 +5729,8 @@
|
|
5442
5729
|
|
5443
5730
|
<fo:instream-foreign-object fox:alt-text="Math">
|
5444
5731
|
|
5732
|
+
<xsl:call-template name="refine_mathml_insteam_object_style"/>
|
5733
|
+
|
5445
5734
|
<!-- put MathML in Actual Text -->
|
5446
5735
|
<!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
|
5447
5736
|
<xsl:attribute name="fox:actual-text">
|
@@ -5462,6 +5751,10 @@
|
|
5462
5751
|
</fo:instream-foreign-object>
|
5463
5752
|
</xsl:template>
|
5464
5753
|
|
5754
|
+
<xsl:template name="refine_mathml_insteam_object_style">
|
5755
|
+
|
5756
|
+
</xsl:template> <!-- refine_mathml_insteam_object_style -->
|
5757
|
+
|
5465
5758
|
<xsl:template match="mathml:*" mode="mathml_actual_text">
|
5466
5759
|
<!-- <xsl:text>a+b</xsl:text> -->
|
5467
5760
|
<xsl:text><</xsl:text>
|
@@ -5606,6 +5899,8 @@
|
|
5606
5899
|
<xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
|
5607
5900
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
5608
5901
|
|
5902
|
+
<xsl:call-template name="refine_mathml-style"/>
|
5903
|
+
|
5609
5904
|
<xsl:choose>
|
5610
5905
|
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5611
5906
|
<xsl:otherwise>
|
@@ -5650,6 +5945,8 @@
|
|
5650
5945
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
5651
5946
|
</xsl:if>
|
5652
5947
|
|
5948
|
+
<xsl:call-template name="refine_link-style"/>
|
5949
|
+
|
5653
5950
|
<xsl:choose>
|
5654
5951
|
<xsl:when test="$target_text = ''">
|
5655
5952
|
<xsl:apply-templates/>
|
@@ -5737,6 +6034,9 @@
|
|
5737
6034
|
<xsl:call-template name="insert_basic_link">
|
5738
6035
|
<xsl:with-param name="element">
|
5739
6036
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
6037
|
+
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://'))">
|
6038
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
6039
|
+
</xsl:if>
|
5740
6040
|
<xsl:if test="parent::*[local-name() = 'add']">
|
5741
6041
|
<xsl:call-template name="append_add-style"/>
|
5742
6042
|
</xsl:if>
|
@@ -5798,6 +6098,8 @@
|
|
5798
6098
|
<fo:table-cell display-align="center">
|
5799
6099
|
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
5800
6100
|
|
6101
|
+
<xsl:call-template name="refine_formula-stem-block-style"/>
|
6102
|
+
|
5801
6103
|
<xsl:apply-templates/>
|
5802
6104
|
</fo:block>
|
5803
6105
|
</fo:table-cell>
|
@@ -5839,6 +6141,8 @@
|
|
5839
6141
|
|
5840
6142
|
<xsl:call-template name="setBlockSpanAll"/>
|
5841
6143
|
|
6144
|
+
<xsl:call-template name="refine_note-style"/>
|
6145
|
+
|
5842
6146
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
5843
6147
|
|
5844
6148
|
<xsl:if test="ancestor::csa:ul or ancestor::csa:ol and not(ancestor::csa:note[1]/following-sibling::*)">
|
@@ -5847,8 +6151,12 @@
|
|
5847
6151
|
|
5848
6152
|
<fo:block>
|
5849
6153
|
|
6154
|
+
<xsl:call-template name="refine_note_block_style"/>
|
6155
|
+
|
5850
6156
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
5851
6157
|
|
6158
|
+
<xsl:call-template name="refine_note-name-style"/>
|
6159
|
+
|
5852
6160
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
5853
6161
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
5854
6162
|
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
@@ -5874,6 +6182,10 @@
|
|
5874
6182
|
|
5875
6183
|
</xsl:template>
|
5876
6184
|
|
6185
|
+
<xsl:template name="refine_note_block_style">
|
6186
|
+
|
6187
|
+
</xsl:template>
|
6188
|
+
|
5877
6189
|
<xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
5878
6190
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
5879
6191
|
<xsl:choose>
|
@@ -5895,12 +6207,16 @@
|
|
5895
6207
|
|
5896
6208
|
<xsl:call-template name="setBlockSpanAll"/>
|
5897
6209
|
|
6210
|
+
<xsl:call-template name="refine_termnote-style"/>
|
6211
|
+
|
5898
6212
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
5899
6213
|
|
5900
6214
|
<xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
|
5901
6215
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
5902
6216
|
</xsl:if>
|
5903
6217
|
|
6218
|
+
<xsl:call-template name="refine_termnote-name-style"/>
|
6219
|
+
|
5904
6220
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
5905
6221
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
5906
6222
|
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
@@ -6070,6 +6386,8 @@
|
|
6070
6386
|
<xsl:otherwise>
|
6071
6387
|
<fo:block xsl:use-attribute-sets="image-style">
|
6072
6388
|
|
6389
|
+
<xsl:call-template name="refine_image-style"/>
|
6390
|
+
|
6073
6391
|
<xsl:variable name="src">
|
6074
6392
|
<xsl:call-template name="image_src"/>
|
6075
6393
|
</xsl:variable>
|
@@ -6919,6 +7237,8 @@
|
|
6919
7237
|
<xsl:if test="normalize-space() != ''">
|
6920
7238
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
6921
7239
|
|
7240
|
+
<xsl:call-template name="refine_figure-name-style"/>
|
7241
|
+
|
6922
7242
|
<xsl:apply-templates/>
|
6923
7243
|
</fo:block>
|
6924
7244
|
</xsl:if>
|
@@ -7184,6 +7504,8 @@
|
|
7184
7504
|
</xsl:attribute>
|
7185
7505
|
</xsl:for-each>
|
7186
7506
|
|
7507
|
+
<xsl:call-template name="refine_sourcecode-style"/>
|
7508
|
+
|
7187
7509
|
<!-- remove margin between rows in the table with sourcecode line numbers -->
|
7188
7510
|
<xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
|
7189
7511
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
@@ -7888,6 +8210,8 @@
|
|
7888
8210
|
|
7889
8211
|
<xsl:call-template name="setBlockSpanAll"/>
|
7890
8212
|
|
8213
|
+
<xsl:call-template name="refine_example-style"/>
|
8214
|
+
|
7891
8215
|
<xsl:variable name="fo_element">
|
7892
8216
|
<xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
|
7893
8217
|
block
|
@@ -8015,6 +8339,8 @@
|
|
8015
8339
|
</xsl:if>
|
8016
8340
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
8017
8341
|
|
8342
|
+
<xsl:call-template name="refine_example-p-style"/>
|
8343
|
+
|
8018
8344
|
<xsl:apply-templates/>
|
8019
8345
|
</fo:block>
|
8020
8346
|
</fo:block-container>
|
@@ -8031,6 +8357,7 @@
|
|
8031
8357
|
</xsl:otherwise>
|
8032
8358
|
</xsl:choose>
|
8033
8359
|
</xsl:template> <!-- example/p -->
|
8360
|
+
|
8034
8361
|
<!-- ====== -->
|
8035
8362
|
<!-- ====== -->
|
8036
8363
|
|
@@ -8042,6 +8369,8 @@
|
|
8042
8369
|
<xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
8043
8370
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
8044
8371
|
|
8372
|
+
<xsl:call-template name="refine_termsource-style"/>
|
8373
|
+
|
8045
8374
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
8046
8375
|
<xsl:variable name="termsource_text">
|
8047
8376
|
<xsl:apply-templates/>
|
@@ -8157,6 +8486,8 @@
|
|
8157
8486
|
<fo:block-container margin-left="0mm">
|
8158
8487
|
<fo:block-container xsl:use-attribute-sets="quote-style">
|
8159
8488
|
|
8489
|
+
<xsl:call-template name="refine_quote-style"/>
|
8490
|
+
|
8160
8491
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
8161
8492
|
<fo:block role="BlockQuote">
|
8162
8493
|
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
@@ -8231,8 +8562,7 @@
|
|
8231
8562
|
|
8232
8563
|
</xsl:if>
|
8233
8564
|
|
8234
|
-
<xsl:
|
8235
|
-
<xsl:variable name="text" select="normalize-space()"/>
|
8565
|
+
<xsl:call-template name="refine_eref-style"/>
|
8236
8566
|
|
8237
8567
|
<xsl:call-template name="insert_basic_link">
|
8238
8568
|
<xsl:with-param name="element">
|
@@ -8242,6 +8572,8 @@
|
|
8242
8572
|
</xsl:if>
|
8243
8573
|
<xsl:if test="@type = 'inline'">
|
8244
8574
|
|
8575
|
+
<xsl:call-template name="refine_basic_link_style"/>
|
8576
|
+
|
8245
8577
|
</xsl:if>
|
8246
8578
|
|
8247
8579
|
<xsl:choose>
|
@@ -8274,6 +8606,11 @@
|
|
8274
8606
|
</xsl:otherwise>
|
8275
8607
|
</xsl:choose>
|
8276
8608
|
</xsl:template>
|
8609
|
+
|
8610
|
+
<xsl:template name="refine_basic_link_style">
|
8611
|
+
|
8612
|
+
</xsl:template> <!-- refine_basic_link_style -->
|
8613
|
+
|
8277
8614
|
<!-- ====== -->
|
8278
8615
|
<!-- END eref -->
|
8279
8616
|
<!-- ====== -->
|
@@ -8418,16 +8755,22 @@
|
|
8418
8755
|
<fo:block>
|
8419
8756
|
<xsl:call-template name="setId"/>
|
8420
8757
|
|
8421
|
-
|
8422
|
-
<xsl:if test="$pos >= 2">
|
8423
|
-
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
8424
|
-
</xsl:if>
|
8758
|
+
<xsl:call-template name="sections_element_style"/>
|
8425
8759
|
|
8426
8760
|
<xsl:apply-templates/>
|
8427
8761
|
</fo:block>
|
8428
8762
|
|
8429
8763
|
</xsl:template>
|
8430
8764
|
|
8765
|
+
<xsl:template name="sections_element_style">
|
8766
|
+
|
8767
|
+
<xsl:variable name="pos"><xsl:number count="csa:sections/csa:clause[not(@type='scope') and not(@type='conformance')]"/></xsl:variable>
|
8768
|
+
<xsl:if test="$pos >= 2">
|
8769
|
+
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
8770
|
+
</xsl:if>
|
8771
|
+
|
8772
|
+
</xsl:template> <!-- sections_element_style -->
|
8773
|
+
|
8431
8774
|
<xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
8432
8775
|
<fo:block break-after="page"/>
|
8433
8776
|
<fo:block>
|
@@ -8442,10 +8785,16 @@
|
|
8442
8785
|
|
8443
8786
|
<xsl:call-template name="setBlockSpanAll"/>
|
8444
8787
|
|
8788
|
+
<xsl:call-template name="refine_clause_style"/>
|
8789
|
+
|
8445
8790
|
<xsl:apply-templates/>
|
8446
8791
|
</fo:block>
|
8447
8792
|
</xsl:template>
|
8448
8793
|
|
8794
|
+
<xsl:template name="refine_clause_style">
|
8795
|
+
|
8796
|
+
</xsl:template> <!-- refine_clause_style -->
|
8797
|
+
|
8449
8798
|
<xsl:template match="*[local-name() = 'definitions']">
|
8450
8799
|
<fo:block id="{@id}">
|
8451
8800
|
<xsl:apply-templates/>
|
@@ -8458,10 +8807,16 @@
|
|
8458
8807
|
|
8459
8808
|
<xsl:call-template name="setBlockSpanAll"/>
|
8460
8809
|
|
8810
|
+
<xsl:call-template name="refine_annex_style"/>
|
8811
|
+
|
8461
8812
|
</fo:block>
|
8462
8813
|
<xsl:apply-templates/>
|
8463
8814
|
</xsl:template>
|
8464
8815
|
|
8816
|
+
<xsl:template name="refine_annex_style">
|
8817
|
+
|
8818
|
+
</xsl:template>
|
8819
|
+
|
8465
8820
|
<xsl:template match="*[local-name() = 'review']"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
8466
8821
|
<!-- comment 2019-11-29 -->
|
8467
8822
|
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
@@ -8628,6 +8983,8 @@
|
|
8628
8983
|
</xsl:choose>
|
8629
8984
|
</xsl:attribute>
|
8630
8985
|
|
8986
|
+
<xsl:call-template name="refine_list_container_style"/>
|
8987
|
+
|
8631
8988
|
<fo:block-container margin-left="0mm">
|
8632
8989
|
<fo:block>
|
8633
8990
|
<xsl:apply-templates select="." mode="list"/>
|
@@ -8645,6 +9002,10 @@
|
|
8645
9002
|
</xsl:choose>
|
8646
9003
|
</xsl:template>
|
8647
9004
|
|
9005
|
+
<xsl:template name="refine_list_container_style">
|
9006
|
+
|
9007
|
+
</xsl:template> <!-- refine_list_container_style -->
|
9008
|
+
|
8648
9009
|
<xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
|
8649
9010
|
|
8650
9011
|
<xsl:apply-templates select="*[local-name() = 'name']">
|
@@ -8655,7 +9016,7 @@
|
|
8655
9016
|
|
8656
9017
|
<xsl:variable name="provisional_distance_between_starts_">
|
8657
9018
|
<attributes xsl:use-attribute-sets="list-style">
|
8658
|
-
|
9019
|
+
<xsl:call-template name="refine_list-style_provisional-distance-between-starts"/>
|
8659
9020
|
</attributes>
|
8660
9021
|
</xsl:variable>
|
8661
9022
|
<xsl:variable name="provisional_distance_between_starts" select="normalize-space(xalan:nodeset($provisional_distance_between_starts_)/attributes/@provisional-distance-between-starts)"/>
|
@@ -8691,6 +9052,8 @@
|
|
8691
9052
|
<addon><xsl:value-of select="$addon"/></addon> -->
|
8692
9053
|
</xsl:if>
|
8693
9054
|
|
9055
|
+
<xsl:call-template name="refine_list-style"/>
|
9056
|
+
|
8694
9057
|
<xsl:if test="*[local-name() = 'name']">
|
8695
9058
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
8696
9059
|
</xsl:if>
|
@@ -8703,6 +9066,10 @@
|
|
8703
9066
|
<xsl:apply-templates select="./*[local-name() = 'note']"/>
|
8704
9067
|
</xsl:template>
|
8705
9068
|
|
9069
|
+
<xsl:template name="refine_list-style_provisional-distance-between-starts">
|
9070
|
+
|
9071
|
+
</xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
|
9072
|
+
|
8706
9073
|
<xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
|
8707
9074
|
<xsl:param name="process">false</xsl:param>
|
8708
9075
|
<xsl:if test="$process = 'true'">
|
@@ -8716,20 +9083,27 @@
|
|
8716
9083
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
8717
9084
|
<xsl:copy-of select="@id"/>
|
8718
9085
|
|
9086
|
+
<xsl:call-template name="refine_list-item-style"/>
|
9087
|
+
|
8719
9088
|
<fo:list-item-label end-indent="label-end()">
|
8720
9089
|
<fo:block xsl:use-attribute-sets="list-item-label-style">
|
8721
9090
|
|
9091
|
+
<xsl:call-template name="refine_list-item-label-style"/>
|
9092
|
+
|
8722
9093
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
8723
9094
|
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
8724
9095
|
<xsl:call-template name="append_add-style"/>
|
8725
9096
|
</xsl:if>
|
8726
9097
|
|
8727
9098
|
<xsl:call-template name="getListItemFormat"/>
|
9099
|
+
|
8728
9100
|
</fo:block>
|
8729
9101
|
</fo:list-item-label>
|
8730
9102
|
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
8731
9103
|
<fo:block>
|
8732
9104
|
|
9105
|
+
<xsl:call-template name="refine_list-item-body-style"/>
|
9106
|
+
|
8733
9107
|
<xsl:apply-templates/>
|
8734
9108
|
|
8735
9109
|
<!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
|
@@ -9047,6 +9421,7 @@
|
|
9047
9421
|
|
9048
9422
|
<fo:block id="{@id}">
|
9049
9423
|
<xsl:apply-templates/>
|
9424
|
+
|
9050
9425
|
</fo:block>
|
9051
9426
|
</xsl:template>
|
9052
9427
|
|
@@ -9066,6 +9441,7 @@
|
|
9066
9441
|
|
9067
9442
|
<fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
|
9068
9443
|
<xsl:apply-templates/>
|
9444
|
+
|
9069
9445
|
</fo:block>
|
9070
9446
|
|
9071
9447
|
</xsl:template> <!-- references -->
|
@@ -9622,6 +9998,9 @@
|
|
9622
9998
|
</xsl:copy>
|
9623
9999
|
</xsl:template>
|
9624
10000
|
|
10001
|
+
<!-- prevent empty thead processing in XSL-FO, remove it -->
|
10002
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'thead'][count(*) = 0]" mode="update_xml_step1"/>
|
10003
|
+
|
9625
10004
|
<xsl:template name="add_id">
|
9626
10005
|
<xsl:if test="not(@id)">
|
9627
10006
|
<!-- add @id - first element with @id plus '_element_name' -->
|
@@ -9906,6 +10285,14 @@
|
|
9906
10285
|
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" mode="linear_xml" name="linear_xml_fn">
|
9907
10286
|
<xsl:variable name="p_fn_">
|
9908
10287
|
<xsl:call-template name="get_fn_list"/>
|
10288
|
+
<!-- <xsl:choose>
|
10289
|
+
<xsl:when test="$namespace = 'jis'">
|
10290
|
+
<xsl:call-template name="get_fn_list_for_element"/>
|
10291
|
+
</xsl:when>
|
10292
|
+
<xsl:otherwise>
|
10293
|
+
<xsl:call-template name="get_fn_list"/>
|
10294
|
+
</xsl:otherwise>
|
10295
|
+
</xsl:choose> -->
|
9909
10296
|
</xsl:variable>
|
9910
10297
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
9911
10298
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
@@ -9920,8 +10307,14 @@
|
|
9920
10307
|
<xsl:attribute name="current_fn_number">
|
9921
10308
|
<xsl:value-of select="$current_fn_number"/>
|
9922
10309
|
</xsl:attribute>
|
10310
|
+
<xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
|
9923
10311
|
<xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
|
9924
|
-
|
10312
|
+
|
10313
|
+
<xsl:value-of select="$skip_footnote_body_"/>
|
10314
|
+
|
10315
|
+
</xsl:attribute>
|
10316
|
+
<xsl:attribute name="ref_id">
|
10317
|
+
<xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
9925
10318
|
</xsl:attribute>
|
9926
10319
|
<xsl:apply-templates select="node()" mode="linear_xml"/>
|
9927
10320
|
</xsl:copy>
|