metanorma-csa 2.6.9 → 2.7.0

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="yes"/>
4
4
 
5
- <xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:name))]" use="@reference"/>
5
+ <xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:fmt-name))]" use="@reference"/>
6
6
 
7
7
  <xsl:variable name="debug">false</xsl:variable>
8
8
 
@@ -23,6 +23,34 @@
23
23
  </xsl:variable>
24
24
  <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
25
25
 
26
+ <xsl:template name="layout-master-set">
27
+ <fo:layout-master-set>
28
+ <!-- Cover page -->
29
+ <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
30
+ <fo:region-body margin-top="21mm" margin-bottom="21mm" margin-left="25mm" margin-right="25mm"/>
31
+ <fo:region-before region-name="cover-page-header" extent="21mm" precedence="true"/>
32
+ <fo:region-after region-name="footer" extent="21mm"/>
33
+ </fo:simple-page-master>
34
+
35
+ <fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
36
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
37
+ <fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
38
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
39
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
40
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
41
+ </fo:simple-page-master>
42
+
43
+ <fo:simple-page-master master-name="document-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
44
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
45
+ <fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
46
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
47
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
48
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
49
+ </fo:simple-page-master>
50
+
51
+ </fo:layout-master-set>
52
+ </xsl:template> <!-- END: layout-master-set -->
53
+
26
54
  <xsl:template match="/">
27
55
  <fo:root xml:lang="{$lang}">
28
56
  <xsl:variable name="root-style">
@@ -31,31 +59,8 @@
31
59
  <xsl:call-template name="insertRootStyle">
32
60
  <xsl:with-param name="root-style" select="$root-style"/>
33
61
  </xsl:call-template>
34
- <fo:layout-master-set>
35
- <!-- Cover page -->
36
- <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
37
- <fo:region-body margin-top="21mm" margin-bottom="21mm" margin-left="25mm" margin-right="25mm"/>
38
- <fo:region-before region-name="cover-page-header" extent="21mm" precedence="true"/>
39
- <fo:region-after region-name="footer" extent="21mm"/>
40
- </fo:simple-page-master>
41
-
42
- <fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
43
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
44
- <fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
45
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
46
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
47
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
48
- </fo:simple-page-master>
49
-
50
- <fo:simple-page-master master-name="document-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
51
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
52
- <fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
53
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
54
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
55
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
56
- </fo:simple-page-master>
57
-
58
- </fo:layout-master-set>
62
+
63
+ <xsl:call-template name="layout-master-set"/>
59
64
 
60
65
  <fo:declarations>
61
66
  <xsl:call-template name="addPDFUAmeta"/>
@@ -65,42 +70,7 @@
65
70
  <xsl:with-param name="contents" select="$contents"/>
66
71
  </xsl:call-template>
67
72
 
68
- <!-- Cover Page -->
69
- <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
70
- <xsl:call-template name="insertFootnoteSeparatorCommon"/>
71
- <fo:static-content flow-name="cover-page-header">
72
- <fo:block-container height="2.5mm" background-color="rgb(55, 243, 244)">
73
- <fo:block font-size="1pt"> </fo:block>
74
- </fo:block-container>
75
- <fo:block-container position="absolute" top="2.5mm" height="{279.4 - 2.5}mm" width="100%" background-color="rgb(80, 203, 205)">
76
- <fo:block> </fo:block>
77
- </fo:block-container>
78
- </fo:static-content>
79
-
80
- <fo:flow flow-name="xsl-region-body">
81
-
82
- <fo:block-container width="136mm" margin-bottom="12pt">
83
- <fo:block font-size="36pt" font-weight="bold" color="rgb(54, 59, 74)" role="H1">
84
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en']"/>
85
- </fo:block>
86
- </fo:block-container>
87
-
88
- <fo:block font-size="26pt" color="rgb(55, 60, 75)" role="H2">
89
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en' and @type = 'subtitle']"/>
90
- </fo:block>
91
-
92
- <fo:block-container absolute-position="fixed" left="11mm" top="245mm">
93
- <fo:block>
94
- <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo))}" width="42mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/> -->
95
- <fo:instream-foreign-object content-width="42mm" fox:alt-text="CSA Logo">
96
- <xsl:copy-of select="$Image-Logo-SVG"/>
97
- </fo:instream-foreign-object>
98
- </fo:block>
99
- </fo:block-container>
100
-
101
- </fo:flow>
102
- </fo:page-sequence>
103
- <!-- End Cover Page -->
73
+ <xsl:call-template name="cover-page"/>
104
74
 
105
75
  <!-- Copyright, Content, Foreword, etc. pages -->
106
76
  <fo:page-sequence master-reference="document" initial-page-number="2" format="1" force-page-count="no-force">
@@ -251,10 +221,48 @@
251
221
  </fo:root>
252
222
  </xsl:template>
253
223
 
224
+ <xsl:template name="cover-page">
225
+ <!-- Cover Page -->
226
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
227
+ <xsl:call-template name="insertFootnoteSeparatorCommon"/>
228
+ <fo:static-content flow-name="cover-page-header">
229
+ <fo:block-container height="2.5mm" background-color="rgb(55, 243, 244)">
230
+ <fo:block font-size="1pt"> </fo:block>
231
+ </fo:block-container>
232
+ <fo:block-container position="absolute" top="2.5mm" height="{279.4 - 2.5}mm" width="100%" background-color="rgb(80, 203, 205)">
233
+ <fo:block> </fo:block>
234
+ </fo:block-container>
235
+ </fo:static-content>
236
+
237
+ <fo:flow flow-name="xsl-region-body">
238
+
239
+ <fo:block-container width="136mm" margin-bottom="12pt">
240
+ <fo:block font-size="36pt" font-weight="bold" color="rgb(54, 59, 74)" role="H1">
241
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en']"/>
242
+ </fo:block>
243
+ </fo:block-container>
244
+
245
+ <fo:block font-size="26pt" color="rgb(55, 60, 75)" role="H2">
246
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en' and @type = 'subtitle']"/>
247
+ </fo:block>
248
+
249
+ <fo:block-container absolute-position="fixed" left="11mm" top="245mm">
250
+ <fo:block>
251
+ <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo))}" width="42mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/> -->
252
+ <fo:instream-foreign-object content-width="42mm" fox:alt-text="CSA Logo">
253
+ <xsl:copy-of select="$Image-Logo-SVG"/>
254
+ </fo:instream-foreign-object>
255
+ </fo:block>
256
+ </fo:block-container>
257
+
258
+ </fo:flow>
259
+ </fo:page-sequence>
260
+ </xsl:template> <!-- END: cover-page -->
261
+
254
262
  <xsl:template name="insertListOf_Title">
255
263
  <xsl:param name="title"/>
256
264
  <fo:block role="TOCI" keep-with-next="always">
257
- <fo:list-block provisional-distance-between-starts="3mm">
265
+ <fo:list-block xsl:use-attribute-sets="toc-listof-title-style">
258
266
  <fo:list-item>
259
267
  <fo:list-item-label end-indent="label-end()">
260
268
  <fo:block font-size="1pt"> </fo:block>
@@ -271,20 +279,20 @@
271
279
 
272
280
  <xsl:template name="insertListOf_Item">
273
281
  <fo:block role="TOCI">
274
- <fo:list-block provisional-distance-between-starts="10mm">
282
+ <fo:list-block xsl:use-attribute-sets="toc-listof-item-block-style">
275
283
  <fo:list-item>
276
284
  <fo:list-item-label end-indent="label-end()">
277
285
  <fo:block font-size="1pt"> </fo:block>
278
286
  </fo:list-item-label>
279
287
  <fo:list-item-body start-indent="body-start()">
280
- <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
288
+ <fo:block xsl:use-attribute-sets="toc-listof-item-style">
281
289
  <fo:basic-link internal-destination="{@id}">
282
290
  <xsl:call-template name="setAltText">
283
291
  <xsl:with-param name="value" select="@alt-text"/>
284
292
  </xsl:call-template>
285
293
  <xsl:apply-templates select="." mode="contents"/>
286
294
  <fo:inline keep-together.within-line="always">
287
- <fo:leader leader-pattern="dots"/>
295
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
288
296
  <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
289
297
  </fo:inline>
290
298
  </fo:basic-link>
@@ -295,35 +303,30 @@
295
303
  </fo:block>
296
304
  </xsl:template>
297
305
 
298
- <xsl:template match="mn:preface//mn:clause[@type = 'toc']" priority="3">
306
+ <xsl:template match="mn:preface//mn:clause[@type = 'toc']" name="toc" priority="3">
299
307
  <xsl:param name="process">false</xsl:param>
300
308
  <xsl:if test="$process = 'true'">
301
- <fo:block-container font-size="12pt" line-height="170%" color="rgb(7, 72, 156)">
309
+ <fo:block-container xsl:use-attribute-sets="toc-style">
302
310
 
303
311
  <xsl:apply-templates/>
304
312
 
305
- <xsl:if test="count(*) = 1 and mn:title"> <!-- if there isn't user ToC -->
313
+ <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
306
314
  <fo:block margin-left="-3mm" role="TOC">
307
315
  <xsl:for-each select="$contents//mnx:item[@display = 'true']">
308
316
  <fo:block role="TOCI">
309
- <fo:list-block>
310
- <xsl:attribute name="provisional-distance-between-starts">
311
- <xsl:choose>
312
- <xsl:when test="@level &gt;= 2"><xsl:value-of select="(@level - 1) * 10"/>mm</xsl:when>
313
- <xsl:otherwise>3mm</xsl:otherwise>
314
- </xsl:choose>
315
- </xsl:attribute>
317
+ <fo:list-block xsl:use-attribute-sets="toc-item-block-style">
318
+ <xsl:call-template name="refine_toc-item-block-style"/>
316
319
  <fo:list-item>
317
320
  <fo:list-item-label end-indent="label-end()">
318
321
  <fo:block font-size="1pt"> </fo:block>
319
322
  </fo:list-item-label>
320
323
  <fo:list-item-body start-indent="body-start()">
321
- <fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
324
+ <fo:block xsl:use-attribute-sets="toc-item-style">
322
325
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}">
323
326
  <fo:inline padding-right="2mm"><xsl:value-of select="@section"/></fo:inline>
324
327
  <xsl:apply-templates select="mnx:title"/>
325
328
  <fo:inline keep-together.within-line="always">
326
- <fo:leader leader-pattern="dots"/>
329
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
327
330
  <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
328
331
  </fo:inline>
329
332
  </fo:basic-link>
@@ -335,24 +338,24 @@
335
338
  </xsl:for-each>
336
339
 
337
340
  <!-- List of Tables -->
338
- <xsl:if test="$contents//mnx:tables/mnx:table">
339
- <xsl:call-template name="insertListOf_Title">
340
- <xsl:with-param name="title" select="$title-list-tables"/>
341
- </xsl:call-template>
342
- <xsl:for-each select="$contents//mnx:tables/mnx:table">
343
- <xsl:call-template name="insertListOf_Item"/>
344
- </xsl:for-each>
345
- </xsl:if>
341
+ <xsl:for-each select="$contents//mnx:tables/mnx:table">
342
+ <xsl:if test="position() = 1">
343
+ <xsl:call-template name="insertListOf_Title">
344
+ <xsl:with-param name="title" select="$title-list-tables"/>
345
+ </xsl:call-template>
346
+ </xsl:if>
347
+ <xsl:call-template name="insertListOf_Item"/>
348
+ </xsl:for-each>
346
349
 
347
350
  <!-- List of Figures -->
348
- <xsl:if test="$contents//mnx:figures/mnx:figure">
349
- <xsl:call-template name="insertListOf_Title">
350
- <xsl:with-param name="title" select="$title-list-figures"/>
351
- </xsl:call-template>
352
- <xsl:for-each select="$contents//mnx:figures/mnx:figure">
353
- <xsl:call-template name="insertListOf_Item"/>
354
- </xsl:for-each>
355
- </xsl:if>
351
+ <xsl:for-each select="$contents//mnx:figures/mnx:figure">
352
+ <xsl:if test="position() = 1">
353
+ <xsl:call-template name="insertListOf_Title">
354
+ <xsl:with-param name="title" select="$title-list-figures"/>
355
+ </xsl:call-template>
356
+ </xsl:if>
357
+ <xsl:call-template name="insertListOf_Item"/>
358
+ </xsl:for-each>
356
359
 
357
360
  </fo:block>
358
361
  </xsl:if>
@@ -362,8 +365,8 @@
362
365
  </xsl:if>
363
366
  </xsl:template>
364
367
 
365
- <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:title" priority="3">
366
- <fo:block font-size="26pt" color="black" margin-top="2pt" margin-bottom="30pt" role="H1">
368
+ <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
369
+ <fo:block xsl:use-attribute-sets="toc-title-style">
367
370
  <xsl:apply-templates/>
368
371
  </fo:block>
369
372
  </xsl:template>
@@ -424,7 +427,7 @@
424
427
  <!-- ====== -->
425
428
  <!-- title -->
426
429
  <!-- ====== -->
427
- <xsl:template match="mn:annex/mn:title">
430
+ <xsl:template match="mn:annex/mn:fmt-title">
428
431
  <xsl:variable name="level">
429
432
  <xsl:call-template name="getLevel"/>
430
433
  </xsl:variable>
@@ -440,7 +443,7 @@
440
443
  </fo:block>
441
444
  </xsl:template>
442
445
 
443
- <xsl:template match="mn:title" name="title">
446
+ <xsl:template match="mn:fmt-title" name="title">
444
447
 
445
448
  <xsl:variable name="level">
446
449
  <xsl:call-template name="getLevel"/>
@@ -511,7 +514,7 @@
511
514
  <xsl:variable name="element-name">
512
515
  <xsl:choose>
513
516
  <xsl:when test="$inline = 'true'">fo:inline</xsl:when>
514
- <xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
517
+ <xsl:when test="../@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
515
518
  <xsl:when test="parent::mn:admonition">fo:inline</xsl:when>
516
519
  <xsl:otherwise>fo:block</xsl:otherwise>
517
520
  </xsl:choose>
@@ -581,8 +584,8 @@
581
584
  <fo:list-item-label><fo:block/></fo:list-item-label>
582
585
  <fo:list-item-body>
583
586
  <fo:block>
584
- <xsl:apply-templates select="mn:name"/>
585
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
587
+ <xsl:apply-templates select="mn:fmt-name"/>
588
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
586
589
  </fo:block>
587
590
  </fo:list-item-body>
588
591
  </fo:list-item>
@@ -791,10 +794,6 @@
791
794
  <title-part lang="ru">
792
795
  </title-part>
793
796
  <title-part lang="zh">第 # 部分:</title-part>
794
-
795
- <title-subpart lang="en">Sub-part #</title-subpart>
796
- <title-subpart lang="fr">Partie de sub #</title-subpart>
797
-
798
797
  </xsl:variable>
799
798
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
800
799
 
@@ -1247,7 +1246,8 @@
1247
1246
  <xsl:template match="mn:stem" mode="update_xml_step1"/>
1248
1247
 
1249
1248
  <xsl:template match="mn:fmt-stem" mode="update_xml_step1">
1250
- <xsl:element name="stem" namespace="{$namespace_full}">
1249
+ <!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
1250
+ <xsl:copy>
1251
1251
  <xsl:copy-of select="@*"/>
1252
1252
  <xsl:choose>
1253
1253
  <xsl:when test="mn:semx and count(node()) = 1">
@@ -1271,7 +1271,8 @@
1271
1271
  </xsl:choose>
1272
1272
  </xsl:otherwise>
1273
1273
  </xsl:choose>
1274
- </xsl:element>
1274
+ </xsl:copy>
1275
+ <!-- </xsl:element> -->
1275
1276
  </xsl:template>
1276
1277
 
1277
1278
  <xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
@@ -1433,12 +1434,14 @@
1433
1434
  </xsl:template>
1434
1435
 
1435
1436
  <xsl:template match="mn:fmt-title" mode="update_xml_step1">
1436
- <xsl:element name="title" namespace="{$namespace_full}">
1437
+ <!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
1438
+ <xsl:copy>
1437
1439
  <xsl:copy-of select="@*"/>
1438
1440
  <xsl:call-template name="addNamedDestinationAttribute"/>
1439
1441
 
1440
1442
  <xsl:apply-templates mode="update_xml_step1"/>
1441
- </xsl:element>
1443
+ </xsl:copy>
1444
+ <!-- </xsl:element> -->
1442
1445
  </xsl:template>
1443
1446
 
1444
1447
  <xsl:template name="addNamedDestinationAttribute">
@@ -1450,12 +1453,14 @@
1450
1453
  <xsl:apply-templates mode="update_xml_step1"/>
1451
1454
  </xsl:when>
1452
1455
  <xsl:otherwise>
1453
- <xsl:element name="name" namespace="{$namespace_full}">
1456
+ <!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
1457
+ <xsl:copy>
1454
1458
  <xsl:copy-of select="@*"/>
1455
1459
  <xsl:call-template name="addNamedDestinationAttribute"/>
1456
1460
 
1457
1461
  <xsl:apply-templates mode="update_xml_step1"/>
1458
- </xsl:element>
1462
+ </xsl:copy>
1463
+ <!-- </xsl:element> -->
1459
1464
  </xsl:otherwise>
1460
1465
  </xsl:choose>
1461
1466
  </xsl:template>
@@ -1470,7 +1475,7 @@
1470
1475
  <xsl:apply-templates mode="update_xml_step1"/>
1471
1476
  </xsl:template>
1472
1477
  <xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="update_xml_step1">
1473
- <xsl:element name="preferred" namespace="{$namespace_full}">
1478
+ <xsl:element name="fmt-preferred" namespace="{$namespace_full}">
1474
1479
  <xsl:copy-of select="@*"/>
1475
1480
  <xsl:apply-templates mode="update_xml_step1"/>
1476
1481
  </xsl:element>
@@ -1480,7 +1485,7 @@
1480
1485
  <xsl:apply-templates mode="update_xml_step1"/>
1481
1486
  </xsl:template>
1482
1487
  <xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="update_xml_step1">
1483
- <xsl:element name="admitted" namespace="{$namespace_full}">
1488
+ <xsl:element name="fmt-admitted" namespace="{$namespace_full}">
1484
1489
  <xsl:copy-of select="@*"/>
1485
1490
  <xsl:apply-templates mode="update_xml_step1"/>
1486
1491
  </xsl:element>
@@ -1490,32 +1495,32 @@
1490
1495
  <xsl:apply-templates mode="update_xml_step1"/>
1491
1496
  </xsl:template>
1492
1497
  <xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="update_xml_step1">
1493
- <xsl:element name="deprecates" namespace="{$namespace_full}">
1498
+ <xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
1494
1499
  <xsl:copy-of select="@*"/>
1495
1500
  <xsl:apply-templates mode="update_xml_step1"/>
1496
1501
  </xsl:element>
1497
1502
  </xsl:template>
1498
1503
 
1499
- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
1504
+ <!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
1500
1505
  <xsl:element name="definition" namespace="{$namespace_full}">
1501
1506
  <xsl:copy-of select="@*"/>
1502
1507
  <xsl:apply-templates mode="update_xml_step1"/>
1503
1508
  </xsl:element>
1504
1509
  </xsl:template>
1505
-
1510
+
1506
1511
  <xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
1507
1512
  <xsl:element name="termsource" namespace="{$namespace_full}">
1508
1513
  <xsl:copy-of select="@*"/>
1509
1514
  <xsl:apply-templates mode="update_xml_step1"/>
1510
1515
  </xsl:element>
1511
1516
  </xsl:template>
1512
-
1517
+
1513
1518
  <xsl:template match="mn:fmt-source" mode="update_xml_step1">
1514
1519
  <xsl:element name="source" namespace="{$namespace_full}">
1515
1520
  <xsl:copy-of select="@*"/>
1516
1521
  <xsl:apply-templates mode="update_xml_step1"/>
1517
1522
  </xsl:element>
1518
- </xsl:template>
1523
+ </xsl:template> -->
1519
1524
 
1520
1525
  <xsl:template match="mn:span[ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
1521
1526
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -1538,12 +1543,12 @@
1538
1543
  </xsl:template>
1539
1544
 
1540
1545
  <xsl:template match="mn:identifier" mode="update_xml_step1"/>
1541
- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
1546
+ <!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
1542
1547
  <xsl:element name="identifier" namespace="{$namespace_full}">
1543
1548
  <xsl:copy-of select="@*"/>
1544
1549
  <xsl:apply-templates mode="update_xml_step1"/>
1545
1550
  </xsl:element>
1546
- </xsl:template>
1551
+ </xsl:template> -->
1547
1552
 
1548
1553
  <xsl:template match="mn:concept" mode="update_xml_step1"/>
1549
1554
 
@@ -1553,51 +1558,53 @@
1553
1558
 
1554
1559
  <xsl:template match="mn:eref" mode="update_xml_step1"/>
1555
1560
 
1556
- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
1561
+ <!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
1557
1562
  <xsl:element name="eref" namespace="{$namespace_full}">
1558
1563
  <xsl:copy-of select="@*"/>
1559
1564
  <xsl:apply-templates mode="update_xml_step1"/>
1560
1565
  </xsl:element>
1561
- </xsl:template>
1566
+ </xsl:template> -->
1562
1567
 
1563
1568
  <xsl:template match="mn:xref" mode="update_xml_step1"/>
1564
1569
 
1565
- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
1570
+ <!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
1566
1571
  <xsl:element name="xref" namespace="{$namespace_full}">
1567
1572
  <xsl:copy-of select="@*"/>
1568
1573
  <xsl:apply-templates mode="update_xml_step1"/>
1569
1574
  </xsl:element>
1570
- </xsl:template>
1575
+ </xsl:template> -->
1571
1576
 
1572
1577
  <xsl:template match="mn:link" mode="update_xml_step1"/>
1573
1578
 
1574
- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
1579
+ <!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
1575
1580
  <xsl:element name="link" namespace="{$namespace_full}">
1576
1581
  <xsl:copy-of select="@*"/>
1577
1582
  <xsl:apply-templates mode="update_xml_step1"/>
1578
1583
  </xsl:element>
1579
- </xsl:template>
1584
+ </xsl:template> -->
1580
1585
 
1581
1586
  <xsl:template match="mn:origin" mode="update_xml_step1"/>
1582
1587
 
1583
- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
1588
+ <!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
1584
1589
  <xsl:element name="origin" namespace="{$namespace_full}">
1585
1590
  <xsl:copy-of select="@*"/>
1586
1591
  <xsl:apply-templates mode="update_xml_step1"/>
1587
1592
  </xsl:element>
1588
- </xsl:template>
1593
+ </xsl:template> -->
1589
1594
 
1590
1595
  <xsl:template match="mn:erefstack" mode="update_xml_step1"/>
1591
1596
 
1592
1597
  <xsl:template match="mn:svgmap" mode="update_xml_step1"/>
1593
1598
 
1594
- <xsl:template match="mn:review-container" mode="update_xml_step1"/>
1599
+ <xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
1595
1600
 
1596
- <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
1597
- <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
1598
- <xsl:value-of select="."/>
1599
- </xsl:element>
1600
- </xsl:template>
1601
+ <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
1602
+ <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
1603
+ <xsl:value-of select="."/>
1604
+ </xsl:element>
1605
+ </xsl:template>
1606
+
1607
+ <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
1601
1608
 
1602
1609
  <!-- END: update new Presentation XML -->
1603
1610
 
@@ -1793,7 +1800,7 @@
1793
1800
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
1794
1801
  <xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
1795
1802
 
1796
- <xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:link[not(contains(.,' '))] or ancestor::mn:sourcecode or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
1803
+ <xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
1797
1804
 
1798
1805
  <xsl:variable name="parent" select="local-name(..)"/>
1799
1806
 
@@ -1912,7 +1919,7 @@
1912
1919
  </xsl:if>
1913
1920
  </xsl:template>
1914
1921
 
1915
- <xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
1922
+ <xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
1916
1923
  <xsl:copy-of select="."/>
1917
1924
  </xsl:template>
1918
1925
 
@@ -2239,7 +2246,7 @@
2239
2246
  </fo:block>
2240
2247
  </xsl:template> <!-- copyright-statement -->
2241
2248
 
2242
- <xsl:template match="mn:copyright-statement//mn:title">
2249
+ <xsl:template match="mn:copyright-statement//mn:fmt-title">
2243
2250
  <!-- process in the template 'title' -->
2244
2251
  <xsl:call-template name="title"/>
2245
2252
  </xsl:template> <!-- copyright-statement//title -->
@@ -2255,7 +2262,7 @@
2255
2262
  </fo:block>
2256
2263
  </xsl:template> <!-- license-statement -->
2257
2264
 
2258
- <xsl:template match="mn:license-statement//mn:title">
2265
+ <xsl:template match="mn:license-statement//mn:fmt-title">
2259
2266
  <!-- process in the template 'title' -->
2260
2267
  <xsl:call-template name="title"/>
2261
2268
  </xsl:template> <!-- license-statement/title -->
@@ -2272,7 +2279,7 @@
2272
2279
  </fo:block>
2273
2280
  </xsl:template> <!-- legal-statement -->
2274
2281
 
2275
- <xsl:template match="mn:legal-statement//mn:title">
2282
+ <xsl:template match="mn:legal-statement//mn:fmt-title">
2276
2283
  <!-- process in the template 'title' -->
2277
2284
  <xsl:call-template name="title"/>
2278
2285
 
@@ -2292,7 +2299,7 @@
2292
2299
  </fo:block>
2293
2300
  </xsl:template> <!-- feedback-statement -->
2294
2301
 
2295
- <xsl:template match="mn:feedback-statement//mn:title">
2302
+ <xsl:template match="mn:feedback-statement//mn:fmt-title">
2296
2303
  <!-- process in the template 'title' -->
2297
2304
  <xsl:call-template name="title"/>
2298
2305
  </xsl:template>
@@ -2317,7 +2324,7 @@
2317
2324
  <xsl:template name="refine_link-style">
2318
2325
  </xsl:template> <!-- refine_link-style -->
2319
2326
 
2320
- <xsl:template match="mn:link" name="link">
2327
+ <xsl:template match="mn:fmt-link" name="link">
2321
2328
  <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
2322
2329
  <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
2323
2330
  <xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
@@ -2539,7 +2546,7 @@
2539
2546
  <xsl:value-of select="."/>
2540
2547
  </xsl:attribute>
2541
2548
  </xsl:for-each>
2542
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
2549
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
2543
2550
  </xsl:when>
2544
2551
 
2545
2552
  <xsl:otherwise>
@@ -2581,11 +2588,11 @@
2581
2588
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
2582
2589
  </xsl:if>
2583
2590
 
2584
- <xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
2591
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
2585
2592
  </fo:block>
2586
2593
 
2587
2594
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
2588
- <xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name AFTER content -->
2595
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
2589
2596
 
2590
2597
  </fo:block-container>
2591
2598
  </fo:block-container>
@@ -2886,7 +2893,7 @@
2886
2893
 
2887
2894
  <!-- end mode="syntax_highlight" -->
2888
2895
 
2889
- <xsl:template match="mn:sourcecode/mn:name">
2896
+ <xsl:template match="mn:sourcecode/mn:fmt-name">
2890
2897
  <xsl:if test="normalize-space() != ''">
2891
2898
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
2892
2899
  <xsl:apply-templates/>
@@ -2904,7 +2911,7 @@
2904
2911
  </xsl:choose>
2905
2912
  </xsl:template>
2906
2913
 
2907
- <xsl:template match="mn:annotation">
2914
+ <xsl:template match="mn:callout-annotation">
2908
2915
  <xsl:variable name="annotation-id" select="@id"/>
2909
2916
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
2910
2917
  <fo:block id="{$annotation-id}" white-space="nowrap">
@@ -2916,7 +2923,7 @@
2916
2923
  </fo:block>
2917
2924
  </xsl:template>
2918
2925
 
2919
- <xsl:template match="mn:annotation/mn:p">
2926
+ <xsl:template match="mn:callout-annotation/mn:p">
2920
2927
  <xsl:param name="callout"/>
2921
2928
  <fo:inline id="{@id}">
2922
2929
  <xsl:call-template name="setNamedDestination"/>
@@ -3069,7 +3076,7 @@
3069
3076
  <xsl:when test="starts-with(., $ace_tag) or self::mn:change-open-tag or self::mn:change-close-tag"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
3070
3077
  <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
3071
3078
  <xsl:choose>
3072
- <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][self::mn:tab]) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][self::mn:add][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
3079
+ <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (parent::mn:fmt-title and preceding-sibling::node()[1][self::mn:tab]) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][self::mn:add][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
3073
3080
  <xsl:otherwise>
3074
3081
  <xsl:variable name="tag">
3075
3082
  <xsl:call-template name="insertTag">
@@ -3470,12 +3477,12 @@
3470
3477
  <xsl:template match="mn:permission">
3471
3478
  <xsl:call-template name="setNamedDestination"/>
3472
3479
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
3473
- <xsl:apply-templates select="mn:name"/>
3474
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
3480
+ <xsl:apply-templates select="mn:fmt-name"/>
3481
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3475
3482
  </fo:block>
3476
3483
  </xsl:template>
3477
3484
 
3478
- <xsl:template match="mn:permission/mn:name">
3485
+ <xsl:template match="mn:permission/mn:fmt-name">
3479
3486
  <xsl:if test="normalize-space() != ''">
3480
3487
  <fo:block xsl:use-attribute-sets="permission-name-style">
3481
3488
  <xsl:apply-templates/>
@@ -3497,15 +3504,15 @@
3497
3504
  <xsl:template match="mn:requirement">
3498
3505
  <xsl:call-template name="setNamedDestination"/>
3499
3506
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
3500
- <xsl:apply-templates select="mn:name"/>
3507
+ <xsl:apply-templates select="mn:fmt-name"/>
3501
3508
  <xsl:apply-templates select="mn:label"/>
3502
3509
  <xsl:apply-templates select="@obligation"/>
3503
3510
  <xsl:apply-templates select="mn:subject"/>
3504
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:label) and not(self::mn:subject)]"/>
3511
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
3505
3512
  </fo:block>
3506
3513
  </xsl:template>
3507
3514
 
3508
- <xsl:template match="mn:requirement/mn:name">
3515
+ <xsl:template match="mn:requirement/mn:fmt-name">
3509
3516
  <xsl:if test="normalize-space() != ''">
3510
3517
 
3511
3518
  <fo:block xsl:use-attribute-sets="requirement-name-style">
@@ -3541,12 +3548,12 @@
3541
3548
  <xsl:template match="mn:recommendation">
3542
3549
  <xsl:call-template name="setNamedDestination"/>
3543
3550
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
3544
- <xsl:apply-templates select="mn:name"/>
3545
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
3551
+ <xsl:apply-templates select="mn:fmt-name"/>
3552
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3546
3553
  </fo:block>
3547
3554
  </xsl:template>
3548
3555
 
3549
- <xsl:template match="mn:recommendation/mn:name">
3556
+ <xsl:template match="mn:recommendation/mn:fmt-name">
3550
3557
  <xsl:if test="normalize-space() != ''">
3551
3558
 
3552
3559
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
@@ -3801,11 +3808,11 @@
3801
3808
 
3802
3809
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
3803
3810
  </xsl:if>
3804
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
3811
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3805
3812
  </fo:block>
3806
3813
  </xsl:template>
3807
3814
 
3808
- <xsl:template match="mn:term/mn:name">
3815
+ <xsl:template match="mn:term/mn:fmt-name">
3809
3816
  <xsl:if test="normalize-space() != ''">
3810
3817
  <!-- <xsl:variable name="level">
3811
3818
  <xsl:call-template name="getLevelTermName"/>
@@ -3824,7 +3831,7 @@
3824
3831
  <!-- origin -->
3825
3832
  <!-- modification -->
3826
3833
  <!-- ====== -->
3827
- <xsl:template match="mn:termsource" name="termsource">
3834
+ <xsl:template match="mn:fmt-termsource" name="termsource">
3828
3835
  <fo:block xsl:use-attribute-sets="termsource-style">
3829
3836
 
3830
3837
  <xsl:call-template name="refine_termsource-style"/>
@@ -3863,24 +3870,24 @@
3863
3870
  </fo:block>
3864
3871
  </xsl:template>
3865
3872
 
3866
- <xsl:template match="mn:termsource/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
3873
+ <xsl:template match="mn:fmt-termsource/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
3867
3874
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
3868
3875
  </xsl:template>
3869
3876
 
3870
- <xsl:template match="mn:termsource/text()">
3877
+ <xsl:template match="mn:fmt-termsource/text()">
3871
3878
  <xsl:if test="normalize-space() != ''">
3872
3879
  <xsl:value-of select="."/>
3873
3880
  </xsl:if>
3874
3881
  </xsl:template>
3875
3882
 
3876
3883
  <!-- text SOURCE: -->
3877
- <xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
3884
+ <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
3878
3885
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
3879
3886
  <xsl:value-of select="."/>
3880
3887
  </fo:inline>
3881
3888
  </xsl:template>
3882
3889
 
3883
- <xsl:template match="mn:origin">
3890
+ <xsl:template match="mn:fmt-origin">
3884
3891
  <xsl:call-template name="insert_basic_link">
3885
3892
  <xsl:with-param name="element">
3886
3893
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -3926,7 +3933,7 @@
3926
3933
  <!-- ====== -->
3927
3934
 
3928
3935
  <!-- Preferred, admitted, deprecated -->
3929
- <xsl:template match="mn:preferred">
3936
+ <xsl:template match="mn:fmt-preferred">
3930
3937
  <xsl:variable name="level">
3931
3938
  <xsl:call-template name="getLevel"/>
3932
3939
  </xsl:variable>
@@ -3942,15 +3949,15 @@
3942
3949
  </xsl:variable>
3943
3950
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
3944
3951
 
3945
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
3952
+ <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
3946
3953
 
3947
3954
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
3948
3955
 
3949
- <xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
3956
+ <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
3950
3957
  <xsl:call-template name="setIDforNamedDestination"/>
3951
3958
  </xsl:for-each>
3952
3959
 
3953
- <xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
3960
+ <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
3954
3961
  </fo:block>
3955
3962
  </xsl:if>
3956
3963
 
@@ -3974,13 +3981,13 @@
3974
3981
  <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
3975
3982
  <xsl:template match="mn:domain"/>
3976
3983
 
3977
- <xsl:template match="mn:admitted">
3984
+ <xsl:template match="mn:fmt-admitted">
3978
3985
  <fo:block xsl:use-attribute-sets="admitted-style">
3979
3986
  <xsl:apply-templates/>
3980
3987
  </fo:block>
3981
3988
  </xsl:template>
3982
3989
 
3983
- <xsl:template match="mn:deprecates">
3990
+ <xsl:template match="mn:fmt-deprecates">
3984
3991
  <fo:block xsl:use-attribute-sets="deprecates-style">
3985
3992
  <xsl:apply-templates/>
3986
3993
  </fo:block>
@@ -3994,7 +4001,7 @@
3994
4001
 
3995
4002
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
3996
4003
  <!-- in metanorma xml preferred terms delimited by semicolons -->
3997
- <xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
4004
+ <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
3998
4005
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
3999
4006
  </xsl:template>
4000
4007
  <!-- End Preferred, admitted, deprecated -->
@@ -4013,16 +4020,16 @@
4013
4020
  <!-- ========== -->
4014
4021
  <!-- definition -->
4015
4022
  <!-- ========== -->
4016
- <xsl:template match="mn:definition">
4023
+ <xsl:template match="mn:fmt-definition">
4017
4024
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
4018
4025
  <xsl:apply-templates/>
4019
4026
  </fo:block>
4020
4027
  </xsl:template>
4021
4028
 
4022
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]">
4029
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
4023
4030
  <xsl:apply-templates/>
4024
4031
  </xsl:template>
4025
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
4032
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
4026
4033
  <fo:inline> <xsl:apply-templates/></fo:inline>
4027
4034
  <fo:block/>
4028
4035
  </xsl:template>
@@ -4091,12 +4098,12 @@
4091
4098
  <xsl:call-template name="refine_termexample-style"/>
4092
4099
  <xsl:call-template name="setBlockSpanAll"/>
4093
4100
 
4094
- <xsl:apply-templates select="mn:name"/>
4095
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4101
+ <xsl:apply-templates select="mn:fmt-name"/>
4102
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4096
4103
  </fo:block>
4097
4104
  </xsl:template>
4098
4105
 
4099
- <xsl:template match="mn:termexample/mn:name">
4106
+ <xsl:template match="mn:termexample/mn:fmt-name">
4100
4107
  <xsl:if test="normalize-space() != ''">
4101
4108
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
4102
4109
  <xsl:call-template name="refine_termexample-name-style"/>
@@ -4147,7 +4154,7 @@
4147
4154
  <xsl:call-template name="refine_example-style"/>
4148
4155
 
4149
4156
  <xsl:variable name="fo_element">
4150
- <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:name)][1][self::mn:sourcecode]">block</xsl:if>block
4157
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>block
4151
4158
  </xsl:variable>
4152
4159
 
4153
4160
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -4158,7 +4165,7 @@
4158
4165
 
4159
4166
  <!-- display name 'EXAMPLE' in a separate block -->
4160
4167
  <fo:block>
4161
- <xsl:apply-templates select="mn:name">
4168
+ <xsl:apply-templates select="mn:fmt-name">
4162
4169
  <xsl:with-param name="fo_element" select="$fo_element"/>
4163
4170
  </xsl:apply-templates>
4164
4171
  </fo:block>
@@ -4166,7 +4173,7 @@
4166
4173
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4167
4174
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4168
4175
  <xsl:variable name="example_body">
4169
- <xsl:apply-templates select="node()[not(self::mn:name)]">
4176
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
4170
4177
  <xsl:with-param name="fo_element" select="$fo_element"/>
4171
4178
  </xsl:apply-templates>
4172
4179
  </xsl:variable>
@@ -4193,14 +4200,14 @@
4193
4200
  <fo:list-item>
4194
4201
  <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
4195
4202
  <fo:block>
4196
- <xsl:apply-templates select="mn:name">
4203
+ <xsl:apply-templates select="mn:fmt-name">
4197
4204
  <xsl:with-param name="fo_element">block</xsl:with-param>
4198
4205
  </xsl:apply-templates>
4199
4206
  </fo:block>
4200
4207
  </fo:list-item-label>
4201
4208
  <fo:list-item-body start-indent="body-start()">
4202
4209
  <fo:block>
4203
- <xsl:apply-templates select="node()[not(self::mn:name)]">
4210
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
4204
4211
  <xsl:with-param name="fo_element" select="$fo_element"/>
4205
4212
  </xsl:apply-templates>
4206
4213
  </fo:block>
@@ -4213,21 +4220,21 @@
4213
4220
 
4214
4221
  <!-- display 'EXAMPLE' and first element in the same line -->
4215
4222
  <fo:block>
4216
- <xsl:apply-templates select="mn:name">
4223
+ <xsl:apply-templates select="mn:fmt-name">
4217
4224
  <xsl:with-param name="fo_element" select="$fo_element"/>
4218
4225
  </xsl:apply-templates>
4219
4226
  <fo:inline>
4220
- <xsl:apply-templates select="*[not(self::mn:name)][1]">
4227
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
4221
4228
  <xsl:with-param name="fo_element" select="$fo_element"/>
4222
4229
  </xsl:apply-templates>
4223
4230
  </fo:inline>
4224
4231
  </fo:block>
4225
4232
 
4226
- <xsl:if test="*[not(self::mn:name)][position() &gt; 1]">
4233
+ <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
4227
4234
  <!-- display further elements in blocks -->
4228
4235
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4229
4236
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4230
- <xsl:apply-templates select="*[not(self::mn:name)][position() &gt; 1]">
4237
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
4231
4238
  <xsl:with-param name="fo_element" select="'block'"/>
4232
4239
  </xsl:apply-templates>
4233
4240
  </fo:block-container>
@@ -4241,7 +4248,7 @@
4241
4248
  </xsl:template>
4242
4249
 
4243
4250
  <!-- example/name -->
4244
- <xsl:template match="mn:example/mn:name">
4251
+ <xsl:template match="mn:example/mn:fmt-name">
4245
4252
  <xsl:param name="fo_element">block</xsl:param>
4246
4253
 
4247
4254
  <xsl:choose>
@@ -4266,7 +4273,7 @@
4266
4273
  </xsl:template>
4267
4274
 
4268
4275
  <!-- table/example/name, table/tfoot//example/name -->
4269
- <xsl:template match="mn:table/mn:example/mn:name | mn:table/mn:tfoot//mn:example/mn:name">
4276
+ <xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
4270
4277
  <fo:inline xsl:use-attribute-sets="example-name-style">
4271
4278
  <xsl:apply-templates/>
4272
4279
  </fo:inline>
@@ -4528,7 +4535,7 @@
4528
4535
 
4529
4536
  <!-- Display table's name before table as standalone block -->
4530
4537
  <!-- $namespace = 'iso' or -->
4531
- <xsl:apply-templates select="mn:name"/> <!-- table's title rendered before table -->
4538
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
4532
4539
 
4533
4540
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
4534
4541
 
@@ -4569,7 +4576,7 @@
4569
4576
 
4570
4577
  <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
4571
4578
 
4572
- <xsl:for-each select="mn:name">
4579
+ <xsl:for-each select="mn:fmt-name">
4573
4580
  <xsl:call-template name="setIDforNamedDestination"/>
4574
4581
  </xsl:for-each>
4575
4582
 
@@ -4599,6 +4606,10 @@
4599
4606
  <xsl:with-param name="margin-side" select="$margin-side"/>
4600
4607
  </xsl:call-template>
4601
4608
 
4609
+ <xsl:call-template name="setTableStyles">
4610
+ <xsl:with-param name="scope">table</xsl:with-param>
4611
+ </xsl:call-template>
4612
+
4602
4613
  </xsl:element>
4603
4614
  </xsl:variable>
4604
4615
 
@@ -4619,7 +4630,7 @@
4619
4630
  </xsl:attribute>
4620
4631
  </xsl:for-each>
4621
4632
 
4622
- <xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[local-name(..) != 'name'] or ./mn:source"/>
4633
+ <xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[not(parent::mn:fmt-name)] or ./mn:fmt-source"/>
4623
4634
  <xsl:if test="$isNoteOrFnExist = 'true'">
4624
4635
  <!-- <xsl:choose>
4625
4636
  <xsl:when test="$namespace = 'plateau'"></xsl:when>
@@ -4675,7 +4686,7 @@
4675
4686
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
4676
4687
  </xsl:when>
4677
4688
  <xsl:otherwise>
4678
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note) and not(self::mn:example) and not(self::mn:dl) and not(self::mn:source) and not(self::mn:p) and not(self::mn:thead) and not(self::mn:tfoot) and not(self::mn:fmt-footnote-container)]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
4689
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note) and not(self::mn:example) and not(self::mn:dl) and not(self::mn:fmt-source) and not(self::mn:p) and not(self::mn:thead) and not(self::mn:tfoot) and not(self::mn:fmt-footnote-container)]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
4679
4690
  </xsl:otherwise>
4680
4691
  </xsl:choose>
4681
4692
 
@@ -4772,7 +4783,7 @@
4772
4783
  </xsl:template>
4773
4784
 
4774
4785
  <!-- table/name-->
4775
- <xsl:template match="*[local-name()='table']/mn:name">
4786
+ <xsl:template match="*[local-name()='table']/mn:fmt-name">
4776
4787
  <xsl:param name="continued"/>
4777
4788
  <xsl:param name="cols-count"/>
4778
4789
  <xsl:if test="normalize-space() != ''">
@@ -4837,7 +4848,7 @@
4837
4848
  </xsl:template>
4838
4849
 
4839
4850
  <!-- SOURCE: ... -->
4840
- <xsl:template match="*[local-name()='table']/mn:source" priority="2">
4851
+ <xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
4841
4852
  <xsl:call-template name="termsource"/>
4842
4853
  </xsl:template>
4843
4854
 
@@ -5002,11 +5013,11 @@
5002
5013
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
5003
5014
  </xsl:template>
5004
5015
 
5005
- <xsl:template match="mn:termsource" mode="td_text">
5006
- <xsl:value-of select="*[local-name()='origin']/@citeas"/>
5016
+ <xsl:template match="mn:fmt-termsource" mode="td_text">
5017
+ <xsl:value-of select="mn:fmt-origin/@citeas"/>
5007
5018
  </xsl:template>
5008
5019
 
5009
- <xsl:template match="mn:link" mode="td_text">
5020
+ <xsl:template match="mn:fmt-link" mode="td_text">
5010
5021
  <xsl:value-of select="@target"/>
5011
5022
  </xsl:template>
5012
5023
 
@@ -5208,12 +5219,12 @@
5208
5219
 
5209
5220
  <xsl:call-template name="refine_table-header-title-style"/>
5210
5221
 
5211
- <xsl:apply-templates select="ancestor::mn:table/mn:name">
5222
+ <xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
5212
5223
  <xsl:with-param name="continued">true</xsl:with-param>
5213
5224
  <xsl:with-param name="cols-count" select="$cols-count"/>
5214
5225
  </xsl:apply-templates>
5215
5226
 
5216
- <xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5227
+ <xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5217
5228
  <fo:block role="SKIP"/>
5218
5229
  </xsl:if>
5219
5230
 
@@ -5248,7 +5259,7 @@
5248
5259
  <xsl:param name="colwidths"/>
5249
5260
  <xsl:param name="colgroup"/>
5250
5261
 
5251
- <xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ..//mn:fn[local-name(..) != 'name'] or ../mn:source or ../mn:p"/>
5262
+ <xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ..//mn:fn[not(parent::mn:fmt-name)] or ../mn:fmt-source or ../mn:p"/>
5252
5263
 
5253
5264
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
5254
5265
  </xsl:variable>
@@ -5289,6 +5300,12 @@
5289
5300
  </xsl:choose>
5290
5301
  </xsl:for-each>
5291
5302
 
5303
+ <xsl:for-each select="ancestor::mn:table[1]">
5304
+ <xsl:call-template name="setTableStyles">
5305
+ <xsl:with-param name="scope">table</xsl:with-param>
5306
+ </xsl:call-template>
5307
+ </xsl:for-each>
5308
+
5292
5309
  <xsl:choose>
5293
5310
  <xsl:when test="xalan:nodeset($colgroup)//mn:col">
5294
5311
  <xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
@@ -5305,10 +5322,22 @@
5305
5322
 
5306
5323
  <fo:table-body role="SKIP">
5307
5324
  <fo:table-row role="SKIP">
5325
+ <xsl:for-each select="ancestor::mn:table[1]">
5326
+ <xsl:call-template name="setTableStyles">
5327
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
5328
+ </xsl:call-template>
5329
+ </xsl:for-each>
5330
+
5308
5331
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
5309
5332
 
5310
5333
  <xsl:call-template name="refine_table-footer-cell-style"/>
5311
5334
 
5335
+ <xsl:for-each select="ancestor::mn:table[1]">
5336
+ <xsl:call-template name="setTableStyles">
5337
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
5338
+ </xsl:call-template>
5339
+ </xsl:for-each>
5340
+
5312
5341
  <xsl:call-template name="setBordersTableArray"/>
5313
5342
 
5314
5343
  <!-- fn will be processed inside 'note' processing -->
@@ -5316,7 +5345,7 @@
5316
5345
  <xsl:apply-templates select="../mn:dl"/>
5317
5346
  <xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
5318
5347
  <xsl:apply-templates select="../mn:example"/>
5319
- <xsl:apply-templates select="../mn:source"/>
5348
+ <xsl:apply-templates select="../mn:fmt-source"/>
5320
5349
 
5321
5350
  <xsl:variable name="isDisplayRowSeparator">
5322
5351
  </xsl:variable>
@@ -5505,7 +5534,12 @@
5505
5534
 
5506
5535
  <xsl:template name="setTableRowAttributes">
5507
5536
 
5508
- <xsl:call-template name="setColors"/>
5537
+ <xsl:for-each select="ancestor::mn:table[1]">
5538
+ <xsl:call-template name="setTableStyles">
5539
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
5540
+ </xsl:call-template>
5541
+ </xsl:for-each>
5542
+ <xsl:call-template name="setTableStyles"/>
5509
5543
 
5510
5544
  </xsl:template> <!-- setTableRowAttributes -->
5511
5545
  <!-- ===================== -->
@@ -5558,7 +5592,13 @@
5558
5592
  </xsl:attribute>
5559
5593
  </xsl:if>
5560
5594
  <xsl:call-template name="display-align"/>
5561
- <xsl:call-template name="setColors"/>
5595
+
5596
+ <xsl:for-each select="ancestor::mn:table[1]">
5597
+ <xsl:call-template name="setTableStyles">
5598
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
5599
+ </xsl:call-template>
5600
+ </xsl:for-each>
5601
+ <xsl:call-template name="setTableStyles"/>
5562
5602
  </xsl:template>
5563
5603
 
5564
5604
  <xsl:template name="display-align">
@@ -5574,7 +5614,8 @@
5574
5614
  </xsl:if>
5575
5615
  </xsl:template>
5576
5616
 
5577
- <xsl:template name="setColors">
5617
+ <xsl:template name="setTableStyles">
5618
+ <xsl:param name="scope">cell</xsl:param>
5578
5619
  <xsl:variable name="styles__">
5579
5620
  <xsl:call-template name="split">
5580
5621
  <xsl:with-param name="pText" select="concat(@style,';')"/>
@@ -5583,19 +5624,35 @@
5583
5624
  </xsl:variable>
5584
5625
  <xsl:variable name="quot">"</xsl:variable>
5585
5626
  <xsl:variable name="styles_">
5627
+ <!-- PDF: Borderless tables https://github.com/metanorma/metanorma-jis/issues/344 -->
5628
+ <xsl:if test="@plain = 'true' or ancestor::mn:table/@plain = 'true'">
5629
+ <style name="border-top">none</style>
5630
+ <style name="border-right">none</style>
5631
+ <style name="border-left">none</style>
5632
+ <style name="border-bottom">none</style>
5633
+ <style name="color">inherit</style>
5634
+ <style name="background-color">transparent</style>
5635
+ </xsl:if>
5636
+
5586
5637
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
5587
5638
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
5588
5639
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
5589
- <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'">
5640
+ <xsl:if test="($key = 'color' and ($scope = 'cell' or $scope = 'table')) or ($key = 'background-color' and ($scope = 'cell' or $scope = 'ancestor_table')) 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'">
5590
5641
  <style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
5591
5642
  </xsl:if>
5643
+ <xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
5644
+ <style name="{$key}-top"><xsl:value-of select="$value"/></style>
5645
+ <style name="{$key}-right"><xsl:value-of select="$value"/></style>
5646
+ <style name="{$key}-left"><xsl:value-of select="$value"/></style>
5647
+ <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
5648
+ </xsl:if>
5592
5649
  </xsl:for-each>
5593
5650
  </xsl:variable>
5594
5651
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
5595
5652
  <xsl:for-each select="$styles/style">
5596
5653
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
5597
5654
  </xsl:for-each>
5598
- </xsl:template> <!-- setColors -->
5655
+ </xsl:template> <!-- setTableStyles -->
5599
5656
 
5600
5657
  <!-- cell in table body, footer -->
5601
5658
  <xsl:template match="*[local-name()='td']" name="td">
@@ -5659,11 +5716,11 @@
5659
5716
 
5660
5717
  <xsl:call-template name="refine_table-note-name-style"/>
5661
5718
 
5662
- <xsl:apply-templates select="mn:name"/>
5719
+ <xsl:apply-templates select="mn:fmt-name"/>
5663
5720
 
5664
5721
  </fo:inline>
5665
5722
 
5666
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5723
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5667
5724
  </fo:block>
5668
5725
  </xsl:template> <!-- table/note -->
5669
5726
 
@@ -5802,7 +5859,7 @@
5802
5859
 
5803
5860
  <!-- footnotes for table's name rendering -->
5804
5861
  <xsl:template name="table_name_fn_display">
5805
- <xsl:for-each select="mn:name//mn:fn">
5862
+ <xsl:for-each select="mn:fmt-name//mn:fn">
5806
5863
  <xsl:variable name="reference" select="@reference"/>
5807
5864
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
5808
5865
  <fo:block margin-bottom="12pt">
@@ -6459,7 +6516,7 @@
6459
6516
  </xsl:if> -->
6460
6517
 
6461
6518
  <xsl:variable name="words">
6462
- <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
6519
+ <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
6463
6520
  <word>
6464
6521
  <xsl:copy-of select="."/>
6465
6522
  </word>
@@ -6518,7 +6575,7 @@
6518
6575
  </xsl:copy>
6519
6576
  </xsl:template>
6520
6577
 
6521
- <xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
6578
+ <xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
6522
6579
 
6523
6580
  <xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
6524
6581
  <xsl:variable name="formatting_tags">
@@ -6553,7 +6610,7 @@
6553
6610
  </xsl:call-template>
6554
6611
  </xsl:template>
6555
6612
 
6556
- <xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
6613
+ <xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
6557
6614
  <xsl:variable name="link">
6558
6615
  <link_updated>
6559
6616
  <xsl:variable name="target_text">
@@ -6766,7 +6823,7 @@
6766
6823
 
6767
6824
  <xsl:call-template name="refine_multicomponent_block_style"/>
6768
6825
 
6769
- <xsl:apply-templates select="mn:name">
6826
+ <xsl:apply-templates select="mn:fmt-name">
6770
6827
  <xsl:with-param name="process">true</xsl:with-param>
6771
6828
  </xsl:apply-templates>
6772
6829
 
@@ -6949,7 +7006,7 @@
6949
7006
  </xsl:template> <!-- refine_multicomponent_block_style -->
6950
7007
 
6951
7008
  <!-- dl/name -->
6952
- <xsl:template match="mn:dl/mn:name">
7009
+ <xsl:template match="mn:dl/mn:fmt-name">
6953
7010
  <xsl:param name="process">false</xsl:param>
6954
7011
  <xsl:if test="$process = 'true'">
6955
7012
  <fo:block xsl:use-attribute-sets="dl-name-style">
@@ -7360,12 +7417,12 @@
7360
7417
  <xsl:template match="mn:appendix">
7361
7418
  <xsl:call-template name="setNamedDestination"/>
7362
7419
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
7363
- <xsl:apply-templates select="mn:title"/>
7420
+ <xsl:apply-templates select="mn:fmt-title"/>
7364
7421
  </fo:block>
7365
- <xsl:apply-templates select="node()[not(local-name()='title')]"/>
7422
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
7366
7423
  </xsl:template>
7367
7424
 
7368
- <xsl:template match="mn:appendix/mn:title" priority="2">
7425
+ <xsl:template match="mn:appendix/mn:fmt-title" priority="2">
7369
7426
  <xsl:variable name="level">
7370
7427
  <xsl:call-template name="getLevel"/>
7371
7428
  </xsl:variable>
@@ -7378,16 +7435,16 @@
7378
7435
  <xsl:template match="mn:appendix//mn:example" priority="2">
7379
7436
  <xsl:call-template name="setNamedDestination"/>
7380
7437
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
7381
- <xsl:apply-templates select="mn:name"/>
7438
+ <xsl:apply-templates select="mn:fmt-name"/>
7382
7439
  </fo:block>
7383
- <xsl:apply-templates select="node()[not(local-name()='name')]"/>
7440
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7384
7441
  </xsl:template>
7385
7442
 
7386
7443
  <xsl:attribute-set name="xref-style">
7387
7444
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
7388
7445
  </xsl:attribute-set>
7389
7446
 
7390
- <xsl:template match="mn:xref">
7447
+ <xsl:template match="mn:fmt-xref">
7391
7448
  <xsl:call-template name="insert_basic_link">
7392
7449
  <xsl:with-param name="element">
7393
7450
  <xsl:variable name="alt_text">
@@ -7407,7 +7464,7 @@
7407
7464
  </xsl:template> <!-- xref -->
7408
7465
 
7409
7466
  <!-- command between two xref points to non-standard bibitem -->
7410
- <xsl:template match="text()[. = ','][preceding-sibling::node()[1][self::mn:sup][mn:xref[@type = 'footnote']] and following-sibling::node()[1][self::mn:sup][mn:xref[@type = 'footnote']]]"><xsl:value-of select="."/>
7467
+ <xsl:template match="text()[. = ','][preceding-sibling::node()[1][self::mn:sup][mn:fmt-xref[@type = 'footnote']] and following-sibling::node()[1][self::mn:sup][mn:fmt-xref[@type = 'footnote']]]"><xsl:value-of select="."/>
7411
7468
  </xsl:template>
7412
7469
 
7413
7470
  <xsl:attribute-set name="eref-style">
@@ -7440,7 +7497,7 @@
7440
7497
  <!-- ====== -->
7441
7498
  <!-- eref -->
7442
7499
  <!-- ====== -->
7443
- <xsl:template match="mn:eref" name="eref">
7500
+ <xsl:template match="mn:fmt-eref" name="eref">
7444
7501
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
7445
7502
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
7446
7503
  <xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
@@ -7565,7 +7622,10 @@
7565
7622
 
7566
7623
  <xsl:call-template name="setNamedDestination"/>
7567
7624
 
7568
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7625
+ <fo:block-container xsl:use-attribute-sets="note-style" role="SKIP">
7626
+ <xsl:if test="not(parent::mn:references)">
7627
+ <xsl:copy-of select="@id"/>
7628
+ </xsl:if>
7569
7629
 
7570
7630
  <xsl:call-template name="setBlockSpanAll"/>
7571
7631
 
@@ -7581,28 +7641,28 @@
7581
7641
 
7582
7642
  <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7583
7643
 
7584
- <xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
7644
+ <xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
7585
7645
 
7586
7646
  <xsl:call-template name="refine_note-name-style"/>
7587
7647
 
7588
7648
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7589
7649
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7590
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7650
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7591
7651
  <xsl:call-template name="append_add-style"/>
7592
7652
  </xsl:if>
7593
7653
 
7594
7654
  <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
7595
- <xsl:if test="count(*[not(self::mn:name)]) = 1 and *[not(self::mn:name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
7596
- <xsl:apply-templates select="*[not(self::mn:name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
7655
+ <xsl:if test="count(*[not(self::mn:fmt-name)]) = 1 and *[not(self::mn:fmt-name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
7656
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
7597
7657
  <xsl:with-param name="skip">false</xsl:with-param>
7598
7658
  </xsl:apply-templates>
7599
7659
  </xsl:if>
7600
7660
 
7601
- <xsl:apply-templates select="mn:name"/>
7661
+ <xsl:apply-templates select="mn:fmt-name"/>
7602
7662
 
7603
7663
  </fo:inline>
7604
7664
 
7605
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7665
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7606
7666
  </fo:block>
7607
7667
  </fo:block-container>
7608
7668
  </fo:block-container>
@@ -7641,19 +7701,19 @@
7641
7701
 
7642
7702
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7643
7703
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7644
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7704
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7645
7705
  <xsl:call-template name="append_add-style"/>
7646
7706
  </xsl:if>
7647
7707
 
7648
- <xsl:apply-templates select="mn:name"/>
7708
+ <xsl:apply-templates select="mn:fmt-name"/>
7649
7709
 
7650
7710
  </fo:inline>
7651
7711
 
7652
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7712
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7653
7713
  </fo:block>
7654
7714
  </xsl:template>
7655
7715
 
7656
- <xsl:template match="mn:note/mn:name">
7716
+ <xsl:template match="mn:note/mn:fmt-name">
7657
7717
  <xsl:param name="sfx"/>
7658
7718
  <xsl:variable name="suffix">
7659
7719
  <xsl:choose>
@@ -7680,7 +7740,7 @@
7680
7740
  </xsl:if>
7681
7741
  </xsl:template>
7682
7742
 
7683
- <xsl:template match="mn:termnote/mn:name">
7743
+ <xsl:template match="mn:termnote/mn:fmt-name">
7684
7744
  <xsl:param name="sfx"/>
7685
7745
  <xsl:variable name="suffix">
7686
7746
  <xsl:choose>
@@ -7763,15 +7823,15 @@
7763
7823
 
7764
7824
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7765
7825
  <fo:block role="BlockQuote">
7766
- <xsl:apply-templates select="./node()[not(self::mn:author) and not(self::mn:source) and not(self::mn:attribution)]"/> <!-- process all nested nodes, except author and source -->
7826
+ <xsl:apply-templates select="./node()[not(self::mn:author) and not(self::mn:fmt-source) and not(self::mn:attribution)]"/> <!-- process all nested nodes, except author and source -->
7767
7827
  </fo:block>
7768
7828
  </fo:block-container>
7769
7829
  </fo:block-container>
7770
- <xsl:if test="mn:author or mn:source or mn:attribution">
7830
+ <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
7771
7831
  <fo:block xsl:use-attribute-sets="quote-source-style">
7772
7832
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
7773
7833
  <xsl:apply-templates select="mn:author"/>
7774
- <xsl:apply-templates select="mn:source"/>
7834
+ <xsl:apply-templates select="mn:fmt-source"/>
7775
7835
  <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
7776
7836
  <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
7777
7837
  </fo:block>
@@ -7781,17 +7841,32 @@
7781
7841
  </fo:block-container>
7782
7842
  </xsl:template>
7783
7843
 
7784
- <xsl:template match="mn:source">
7844
+ <xsl:template match="mn:fmt-source">
7785
7845
  <xsl:if test="../mn:author">
7786
7846
  <xsl:text>, </xsl:text>
7787
7847
  </xsl:if>
7788
- <xsl:call-template name="insert_basic_link">
7789
- <xsl:with-param name="element">
7790
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
7791
- <xsl:apply-templates/>
7792
- </fo:basic-link>
7793
- </xsl:with-param>
7794
- </xsl:call-template>
7848
+ <xsl:choose>
7849
+ <xsl:when test="not(parent::quote)">
7850
+ <fo:block>
7851
+ <xsl:call-template name="insert_basic_link">
7852
+ <xsl:with-param name="element">
7853
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
7854
+ <xsl:apply-templates/>
7855
+ </fo:basic-link>
7856
+ </xsl:with-param>
7857
+ </xsl:call-template>
7858
+ </fo:block>
7859
+ </xsl:when>
7860
+ <xsl:otherwise>
7861
+ <xsl:call-template name="insert_basic_link">
7862
+ <xsl:with-param name="element">
7863
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
7864
+ <xsl:apply-templates/>
7865
+ </fo:basic-link>
7866
+ </xsl:with-param>
7867
+ </xsl:call-template>
7868
+ </xsl:otherwise>
7869
+ </xsl:choose>
7795
7870
  </xsl:template>
7796
7871
 
7797
7872
  <xsl:template match="mn:author">
@@ -7868,7 +7943,7 @@
7868
7943
  <ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
7869
7944
  <xsl:choose>
7870
7945
  <!-- skip figure/name/fn -->
7871
- <xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
7946
+ <xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
7872
7947
  <xsl:otherwise>
7873
7948
  <xsl:element name="figure" namespace="{$namespace_full}">
7874
7949
  <xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
@@ -8064,17 +8139,17 @@
8064
8139
 
8065
8140
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
8066
8141
 
8067
- <xsl:for-each select="mn:name"> <!-- set context -->
8142
+ <xsl:for-each select="mn:fmt-name"> <!-- set context -->
8068
8143
  <xsl:call-template name="setIDforNamedDestination"/>
8069
8144
  </xsl:for-each>
8070
8145
 
8071
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
8146
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
8072
8147
  </fo:block>
8073
8148
 
8074
8149
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
8075
8150
  <xsl:call-template name="showFigureKey"/>
8076
8151
  </xsl:if>
8077
- <xsl:apply-templates select="mn:name"/> <!-- show figure's name AFTER image -->
8152
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
8078
8153
 
8079
8154
  </fo:block-container>
8080
8155
  </xsl:template>
@@ -8100,9 +8175,9 @@
8100
8175
  <xsl:template match="mn:figure[@class = 'pseudocode']">
8101
8176
  <xsl:call-template name="setNamedDestination"/>
8102
8177
  <fo:block id="{@id}">
8103
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
8178
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8104
8179
  </fo:block>
8105
- <xsl:apply-templates select="mn:name"/>
8180
+ <xsl:apply-templates select="mn:fmt-name"/>
8106
8181
  </xsl:template>
8107
8182
 
8108
8183
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
@@ -8113,7 +8188,7 @@
8113
8188
 
8114
8189
  <!-- SOURCE: ... -->
8115
8190
  <!-- figure/source -->
8116
- <xsl:template match="mn:figure/mn:source" priority="2">
8191
+ <xsl:template match="mn:figure/mn:fmt-source" priority="2">
8117
8192
  <xsl:call-template name="termsource"/>
8118
8193
  </xsl:template>
8119
8194
 
@@ -8123,7 +8198,7 @@
8123
8198
  <xsl:variable name="isAdded" select="../@added"/>
8124
8199
  <xsl:variable name="isDeleted" select="../@deleted"/>
8125
8200
  <xsl:choose>
8126
- <xsl:when test="ancestor::mn:title or not(parent::mn:figure) or parent::mn:p"> <!-- inline image ( 'image:path' in adoc, with one colon after image) -->
8201
+ <xsl:when test="ancestor::mn:fmt-title or not(parent::mn:figure) or parent::mn:p"> <!-- inline image ( 'image:path' in adoc, with one colon after image) -->
8127
8202
  <fo:inline padding-left="1mm" padding-right="1mm">
8128
8203
  <xsl:if test="not(parent::mn:figure) or parent::mn:p">
8129
8204
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -8144,13 +8219,26 @@
8144
8219
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
8145
8220
 
8146
8221
  <xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
8147
- <xsl:attribute name="width">100%</xsl:attribute>
8222
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
8223
+ <xsl:choose>
8224
+ <xsl:when test="@width and not(@height)">
8225
+ <xsl:attribute name="width">100%</xsl:attribute>
8226
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8227
+ </xsl:when>
8228
+ <xsl:when test="@height and not(@width)">
8229
+ <xsl:attribute name="height">100%</xsl:attribute>
8230
+ <xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
8231
+ </xsl:when>
8232
+ <xsl:when test="not(@width) and not(@height)">
8233
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8234
+ </xsl:when>
8235
+ </xsl:choose>
8236
+
8148
8237
  <xsl:if test="normalize-space($logo_width) != ''">
8149
8238
  <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
8150
8239
  </xsl:if>
8151
- <xsl:attribute name="content-height">100%</xsl:attribute>
8152
8240
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8153
- <xsl:attribute name="scaling">uniform</xsl:attribute>
8241
+ <xsl:attribute name="vertical-align">top</xsl:attribute>
8154
8242
  </xsl:if>
8155
8243
 
8156
8244
  <xsl:variable name="width">
@@ -8439,7 +8527,7 @@
8439
8527
  <xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
8440
8528
  <xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
8441
8529
 
8442
- <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
8530
+ <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
8443
8531
  <xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
8444
8532
  <xsl:param name="name"/>
8445
8533
 
@@ -8449,8 +8537,8 @@
8449
8537
 
8450
8538
  <xsl:variable name="alt-text">
8451
8539
  <xsl:choose>
8452
- <xsl:when test="normalize-space(../mn:name) != ''">
8453
- <xsl:value-of select="../mn:name"/>
8540
+ <xsl:when test="normalize-space(../mn:fmt-name) != ''">
8541
+ <xsl:value-of select="../mn:fmt-name"/>
8454
8542
  </xsl:when>
8455
8543
  <xsl:when test="normalize-space($name) != ''">
8456
8544
  <xsl:value-of select="$name"/>
@@ -8459,7 +8547,7 @@
8459
8547
  </xsl:choose>
8460
8548
  </xsl:variable>
8461
8549
 
8462
- <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
8550
+ <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
8463
8551
 
8464
8552
  <xsl:choose>
8465
8553
  <xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
@@ -8508,9 +8596,9 @@
8508
8596
  <fo:table-cell column-number="2">
8509
8597
  <fo:block>
8510
8598
  <fo:block-container width="{$width_scale}px" height="{$height_scale}px">
8511
- <xsl:if test="../mn:name/mn:bookmark">
8599
+ <xsl:if test="../mn:fmt-name/mn:bookmark">
8512
8600
  <fo:block line-height="0" font-size="0">
8513
- <xsl:for-each select="../mn:name/mn:bookmark">
8601
+ <xsl:for-each select="../mn:fmt-name/mn:bookmark">
8514
8602
  <xsl:call-template name="bookmark"/>
8515
8603
  </xsl:for-each>
8516
8604
  </fo:block>
@@ -8750,7 +8838,7 @@
8750
8838
 
8751
8839
  <!-- image with svg and emf -->
8752
8840
  <xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
8753
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
8841
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
8754
8842
  <xsl:for-each select="*[local-name() = 'svg']">
8755
8843
  <xsl:call-template name="image_svg">
8756
8844
  <xsl:with-param name="name" select="$name"/>
@@ -8767,7 +8855,7 @@
8767
8855
 
8768
8856
  <xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
8769
8857
  <xsl:variable name="svg_content" select="document(@src)"/>
8770
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
8858
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
8771
8859
  <xsl:for-each select="xalan:nodeset($svg_content)/node()">
8772
8860
  <xsl:call-template name="image_svg">
8773
8861
  <xsl:with-param name="name" select="$name"/>
@@ -8890,7 +8978,7 @@
8890
8978
  <xsl:template match="mn:emf"/>
8891
8979
 
8892
8980
  <!-- figure/name -->
8893
- <xsl:template match="mn:figure/mn:name | mn:image/mn:name">
8981
+ <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
8894
8982
  <xsl:if test="normalize-space() != ''">
8895
8983
  <fo:block xsl:use-attribute-sets="figure-name-style">
8896
8984
 
@@ -8962,25 +9050,25 @@
8962
9050
  <fo:block-container margin-left="0mm" role="SKIP">
8963
9051
  <xsl:call-template name="setNamedDestination"/>
8964
9052
  <fo:block id="{@id}">
8965
- <xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
9053
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
8966
9054
  </fo:block>
8967
9055
  </fo:block-container>
8968
9056
  </fo:block-container>
8969
9057
  </xsl:template>
8970
9058
 
8971
- <xsl:template match="mn:formula/mn:dt/mn:stem">
9059
+ <xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
8972
9060
  <fo:inline>
8973
9061
  <xsl:apply-templates/>
8974
9062
  </fo:inline>
8975
9063
  </xsl:template>
8976
9064
 
8977
- <xsl:template match="mn:admitted/mn:stem">
9065
+ <xsl:template match="mn:fmt-admitted/mn:fmt-stem">
8978
9066
  <fo:inline>
8979
9067
  <xsl:apply-templates/>
8980
9068
  </fo:inline>
8981
9069
  </xsl:template>
8982
9070
 
8983
- <xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
9071
+ <xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
8984
9072
  <!-- https://github.com/metanorma/isodoc/issues/607
8985
9073
  <xsl:if test="normalize-space() != ''">
8986
9074
  <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
@@ -8989,7 +9077,7 @@
8989
9077
  </xsl:template>
8990
9078
 
8991
9079
  <!-- stem inside formula with name (with formula's number) -->
8992
- <xsl:template match="mn:formula[mn:name]/mn:stem">
9080
+ <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
8993
9081
  <fo:block xsl:use-attribute-sets="formula-style">
8994
9082
 
8995
9083
  <fo:table table-layout="fixed" width="100%">
@@ -9009,13 +9097,13 @@
9009
9097
 
9010
9098
  <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
9011
9099
 
9012
- <xsl:for-each select="../mn:name">
9100
+ <xsl:for-each select="../mn:fmt-name">
9013
9101
  <xsl:call-template name="setIDforNamedDestination"/>
9014
9102
  </xsl:for-each>
9015
9103
 
9016
9104
  <xsl:call-template name="refine_formula-stem-number-style"/>
9017
9105
 
9018
- <xsl:apply-templates select="../mn:name"/>
9106
+ <xsl:apply-templates select="../mn:fmt-name"/>
9019
9107
  </fo:block>
9020
9108
  </fo:table-cell>
9021
9109
  </fo:table-row>
@@ -9025,7 +9113,7 @@
9025
9113
  </xsl:template>
9026
9114
 
9027
9115
  <!-- stem inside formula without name (without formula's number) -->
9028
- <xsl:template match="mn:formula[not(mn:name)]/mn:stem">
9116
+ <xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
9029
9117
  <fo:block xsl:use-attribute-sets="formula-style">
9030
9118
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
9031
9119
  <xsl:apply-templates/>
@@ -9379,7 +9467,7 @@
9379
9467
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
9380
9468
  <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
9381
9469
  -->
9382
- <xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
9470
+ <xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
9383
9471
  <fo:inline xsl:use-attribute-sets="mathml-style">
9384
9472
 
9385
9473
  <xsl:call-template name="refine_mathml-style"/>
@@ -9645,7 +9733,7 @@
9645
9733
 
9646
9734
  <xsl:template match="mn:ul | mn:ol" mode="list" name="list">
9647
9735
 
9648
- <xsl:apply-templates select="mn:name">
9736
+ <xsl:apply-templates select="mn:fmt-name">
9649
9737
  <xsl:with-param name="process">true</xsl:with-param>
9650
9738
  </xsl:apply-templates>
9651
9739
 
@@ -9691,7 +9779,7 @@
9691
9779
 
9692
9780
  <xsl:call-template name="refine_list-style"/>
9693
9781
 
9694
- <xsl:if test="mn:name">
9782
+ <xsl:if test="mn:fmt-name">
9695
9783
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
9696
9784
  </xsl:if>
9697
9785
 
@@ -9706,7 +9794,7 @@
9706
9794
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
9707
9795
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
9708
9796
 
9709
- <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
9797
+ <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
9710
9798
  <xsl:param name="process">false</xsl:param>
9711
9799
  <xsl:if test="$process = 'true'">
9712
9800
  <fo:block xsl:use-attribute-sets="list-name-style">
@@ -9836,7 +9924,7 @@
9836
9924
  -->
9837
9925
  <!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
9838
9926
  <!-- fn in text -->
9839
- <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))]" priority="2" name="fn">
9927
+ <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))]" priority="2" name="fn">
9840
9928
  <xsl:param name="footnote_body_from_table">false</xsl:param>
9841
9929
 
9842
9930
  <!-- list of unique footnotes -->
@@ -9960,7 +10048,7 @@
9960
10048
  <!-- commented:
9961
10049
  .//mn:bibitem[ancestor::mn:references]/mn:note |
9962
10050
  because 'fn' there is in biblio-tag -->
9963
- <xsl:for-each select=".//mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
10051
+ <xsl:for-each select=".//mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
9964
10052
  <!-- copy unique fn -->
9965
10053
  <fn gen_id="{generate-id(.)}">
9966
10054
  <xsl:copy-of select="@*"/>
@@ -10038,7 +10126,7 @@
10038
10126
  <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
10039
10127
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10040
10128
  <fo:block>
10041
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
10129
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
10042
10130
  </fo:block>
10043
10131
  </fo:block-container>
10044
10132
  </fo:block-container>
@@ -10064,7 +10152,7 @@
10064
10152
  </xsl:otherwise>
10065
10153
  </xsl:choose> -->
10066
10154
  <xsl:variable name="name">
10067
- <xsl:apply-templates select="mn:name"/>
10155
+ <xsl:apply-templates select="mn:fmt-name"/>
10068
10156
  </xsl:variable>
10069
10157
  <xsl:copy-of select="$name"/>
10070
10158
  <xsl:if test="normalize-space($name) != ''">
@@ -10072,7 +10160,7 @@
10072
10160
  </xsl:if>
10073
10161
  </xsl:template>
10074
10162
 
10075
- <xsl:template match="mn:admonition/mn:name">
10163
+ <xsl:template match="mn:admonition/mn:fmt-name">
10076
10164
  <xsl:apply-templates/>
10077
10165
  </xsl:template>
10078
10166
 
@@ -10199,10 +10287,10 @@
10199
10287
  <xsl:call-template name="setNamedDestination"/>
10200
10288
  <fo:block id="{@id}"/>
10201
10289
 
10202
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
10290
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
10203
10291
 
10204
10292
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
10205
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
10293
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
10206
10294
  </fo:block>
10207
10295
  </xsl:template> <!-- references -->
10208
10296
 
@@ -10221,13 +10309,14 @@
10221
10309
  </xsl:template> <!-- bibitem -->
10222
10310
 
10223
10311
  <!-- Bibliography (non-normative references) -->
10224
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
10225
- <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
10312
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
10313
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
10226
10314
  <!-- start CSA bibitem processing -->
10227
10315
  <xsl:call-template name="setNamedDestination"/>
10228
10316
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
10229
10317
  <xsl:apply-templates select="mn:biblio-tag"/>
10230
10318
  <xsl:apply-templates select="mn:formattedref"/>
10319
+ <xsl:call-template name="processBibliographyNote"/>
10231
10320
  </fo:block>
10232
10321
  <!-- END CSA bibitem processing -->
10233
10322
 
@@ -10258,7 +10347,7 @@
10258
10347
  </fo:list-item>
10259
10348
  </xsl:otherwise>
10260
10349
  </xsl:choose>
10261
- <xsl:apply-templates select="following-sibling::*[1][self::mn:bibitem]">
10350
+ <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
10262
10351
  <xsl:with-param name="skip">false</xsl:with-param>
10263
10352
  </xsl:apply-templates>
10264
10353
  </xsl:template>
@@ -10275,8 +10364,26 @@
10275
10364
  </xsl:apply-templates>
10276
10365
  <xsl:apply-templates select="mn:formattedref"/>
10277
10366
  <!-- end bibitem processing -->
10367
+
10368
+ <xsl:call-template name="processBibliographyNote"/>
10278
10369
  </xsl:template> <!-- processBibitem (bibitem) -->
10279
10370
 
10371
+ <xsl:template name="processBibliographyNote">
10372
+ <xsl:if test="self::mn:note">
10373
+ <xsl:variable name="note_node">
10374
+ <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
10375
+ <xsl:copy> <!-- skip @id -->
10376
+ <xsl:copy-of select="node()"/>
10377
+ </xsl:copy>
10378
+ </xsl:element>
10379
+ </xsl:variable>
10380
+ <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
10381
+ <xsl:call-template name="note"/>
10382
+ </xsl:for-each> -->
10383
+ <xsl:call-template name="note"/>
10384
+ </xsl:if>
10385
+ </xsl:template>
10386
+
10280
10387
  <xsl:template match="mn:title" mode="title">
10281
10388
  <fo:inline><xsl:apply-templates/></fo:inline>
10282
10389
  </xsl:template>
@@ -10502,7 +10609,8 @@
10502
10609
  </xsl:copy>
10503
10610
  </xsl:template>
10504
10611
 
10505
- <xsl:template match="mn:xref" mode="index_add_id">
10612
+ <xsl:template match="mn:xref" mode="index_add_id"/>
10613
+ <xsl:template match="mn:fmt-xref" mode="index_add_id">
10506
10614
  <xsl:param name="docid"/>
10507
10615
  <xsl:variable name="id">
10508
10616
  <xsl:call-template name="generateIndexXrefId">
@@ -10544,7 +10652,7 @@
10544
10652
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
10545
10653
  <xsl:copy>
10546
10654
  <xsl:apply-templates select="@*" mode="index_update"/>
10547
- <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
10655
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
10548
10656
  </xsl:copy>
10549
10657
  </xsl:template>
10550
10658
 
@@ -10565,11 +10673,11 @@
10565
10673
  <xsl:value-of select="."/>
10566
10674
  <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
10567
10675
  </xsl:when>
10568
- <xsl:when test="self::* and local-name(.) = 'xref'">
10676
+ <xsl:when test="self::* and local-name(.) = 'fmt-xref'">
10569
10677
  <xsl:variable name="id" select="@id"/>
10570
10678
 
10571
- <xsl:variable name="id_next" select="following-sibling::mn:xref[1]/@id"/>
10572
- <xsl:variable name="id_prev" select="preceding-sibling::mn:xref[1]/@id"/>
10679
+ <xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
10680
+ <xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
10573
10681
 
10574
10682
  <xsl:variable name="pages_">
10575
10683
  <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
@@ -10665,18 +10773,18 @@
10665
10773
  <xsl:variable name="item_number">
10666
10774
  <xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
10667
10775
  </xsl:variable>
10668
- <xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
10776
+ <xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
10669
10777
  <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
10670
10778
  </xsl:template>
10671
10779
 
10672
- <xsl:template match="mn:indexsect/mn:title" priority="4">
10780
+ <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
10673
10781
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
10674
10782
  <!-- Index -->
10675
10783
  <xsl:apply-templates/>
10676
10784
  </fo:block>
10677
10785
  </xsl:template>
10678
10786
 
10679
- <xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
10787
+ <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
10680
10788
  <!-- Letter A, B, C, ... -->
10681
10789
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
10682
10790
  <xsl:apply-templates/>
@@ -10717,12 +10825,12 @@
10717
10825
  <fmt-review-start id="_7ef81cf7-3f6c-4ed4-9c1f-1ba092052bbd" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" end="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/>
10718
10826
  <bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
10719
10827
  <fmt-review-end id="_f336a8d0-08a8-4b7f-a1aa-b04688ed40c1" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" start="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/> -->
10720
- <xsl:when test="1 = 2 and preceding-sibling::node()[self::mn:fmt-review-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-review-end][@source = $bookmark_id]">
10828
+ <xsl:when test="1 = 2 and preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]">
10721
10829
  <!-- skip here, see the template 'fmt-review-start' -->
10722
10830
  </xsl:when>
10723
10831
  <xsl:otherwise>
10724
10832
  <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
10725
- <fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-review-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-review-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
10833
+ <fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
10726
10834
  <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
10727
10835
  <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
10728
10836
  </xsl:otherwise>
@@ -10821,6 +10929,70 @@
10821
10929
  <!-- End Form's elements processing -->
10822
10930
  <!-- =================== -->
10823
10931
 
10932
+ <xsl:attribute-set name="toc-style">
10933
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
10934
+ <xsl:attribute name="line-height">170%</xsl:attribute>
10935
+ <xsl:attribute name="color">rgb(7, 72, 156)</xsl:attribute>
10936
+ </xsl:attribute-set>
10937
+
10938
+ <xsl:template name="refine_toc-style">
10939
+ </xsl:template>
10940
+
10941
+ <xsl:attribute-set name="toc-title-style">
10942
+ <xsl:attribute name="font-size">26pt</xsl:attribute>
10943
+ <xsl:attribute name="color">black</xsl:attribute>
10944
+ <xsl:attribute name="margin-top">2pt</xsl:attribute>
10945
+ <xsl:attribute name="margin-bottom">30pt</xsl:attribute>
10946
+ <xsl:attribute name="role">H1</xsl:attribute>
10947
+ </xsl:attribute-set>
10948
+
10949
+ <xsl:attribute-set name="toc-title-page-style">
10950
+ </xsl:attribute-set> <!-- toc-title-page-style -->
10951
+
10952
+ <xsl:attribute-set name="toc-item-block-style">
10953
+ <xsl:attribute name="provisional-distance-between-starts">3mm</xsl:attribute>
10954
+ </xsl:attribute-set>
10955
+
10956
+ <xsl:template name="refine_toc-item-block-style">
10957
+ <xsl:if test="@level &gt;= 2">
10958
+ <xsl:attribute name="provisional-distance-between-starts"><xsl:value-of select="(@level - 1) * 10"/>mm</xsl:attribute>
10959
+ </xsl:if>
10960
+ </xsl:template>
10961
+
10962
+ <xsl:attribute-set name="toc-item-style">
10963
+ <xsl:attribute name="role">TOCI</xsl:attribute>
10964
+ <xsl:attribute name="text-align-last">justify</xsl:attribute>
10965
+ <xsl:attribute name="margin-left">12mm</xsl:attribute>
10966
+ <xsl:attribute name="text-indent">-12mm</xsl:attribute>
10967
+ <xsl:attribute name="role">SKIP</xsl:attribute>
10968
+ </xsl:attribute-set> <!-- END: toc-item-style -->
10969
+
10970
+ <xsl:template name="refine_toc-item-style">
10971
+ </xsl:template> <!-- END: refine_toc-item-style -->
10972
+
10973
+ <xsl:attribute-set name="toc-leader-style">
10974
+ <xsl:attribute name="leader-pattern">dots</xsl:attribute>
10975
+ </xsl:attribute-set> <!-- END: toc-leader-style -->
10976
+
10977
+ <xsl:attribute-set name="toc-pagenumber-style">
10978
+ </xsl:attribute-set>
10979
+
10980
+ <!-- List of Figures, Tables -->
10981
+ <xsl:attribute-set name="toc-listof-title-style">
10982
+ <xsl:attribute name="provisional-distance-between-starts">3mm</xsl:attribute>
10983
+ </xsl:attribute-set>
10984
+
10985
+ <xsl:attribute-set name="toc-listof-item-block-style">
10986
+ <xsl:attribute name="provisional-distance-between-starts">10mm</xsl:attribute>
10987
+ </xsl:attribute-set>
10988
+
10989
+ <xsl:attribute-set name="toc-listof-item-style">
10990
+ <xsl:attribute name="role">TOCI</xsl:attribute>
10991
+ <xsl:attribute name="text-align-last">justify</xsl:attribute>
10992
+ <xsl:attribute name="margin-left">12mm</xsl:attribute>
10993
+ <xsl:attribute name="text-indent">-12mm</xsl:attribute>
10994
+ </xsl:attribute-set>
10995
+
10824
10996
  <xsl:template name="processPrefaceSectionsDefault_Contents">
10825
10997
  <xsl:variable name="nodes_preface_">
10826
10998
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -10886,7 +11058,7 @@
10886
11058
 
10887
11059
  <xsl:template name="processTables_Contents">
10888
11060
  <mnx:tables>
10889
- <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
11061
+ <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
10890
11062
  <xsl:choose>
10891
11063
  <xsl:when test="mn:fmt-name">
10892
11064
  <xsl:variable name="fmt_name">
@@ -10908,7 +11080,7 @@
10908
11080
 
10909
11081
  <xsl:template name="processFigures_Contents">
10910
11082
  <mnx:figures>
10911
- <xsl:for-each select="//mn:figure[@id and mn:name and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(mn:name, 'Figure ') and normalize-space(@id) != '']">
11083
+ <xsl:for-each select="//mn:figure[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(mn:name, 'Figure ') and normalize-space(@id) != '']">
10912
11084
  <xsl:choose>
10913
11085
  <xsl:when test="mn:fmt-name">
10914
11086
  <xsl:variable name="fmt_name">
@@ -10937,7 +11109,7 @@
10937
11109
 
10938
11110
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
10939
11111
 
10940
- <xsl:template match="mn:figure/mn:fmt-name | mn:table/mn:fmt-name | mn:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name" mode="contents">
11112
+ <xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name" mode="contents">
10941
11113
  <xsl:apply-templates mode="contents"/>
10942
11114
  <xsl:text> </xsl:text>
10943
11115
  </xsl:template>
@@ -10949,7 +11121,7 @@
10949
11121
  </xsl:if>
10950
11122
  </xsl:template>
10951
11123
 
10952
- <xsl:template match="mn:figure/mn:fmt-name | mn:table/mn:fmt-name | mn:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name" mode="bookmarks">
11124
+ <xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name | mnx:sourcecode/mn:fmt-name" mode="bookmarks">
10953
11125
  <xsl:apply-templates mode="bookmarks"/>
10954
11126
  <xsl:text> </xsl:text>
10955
11127
  </xsl:template>
@@ -10960,7 +11132,7 @@
10960
11132
  </xsl:if>
10961
11133
  </xsl:template>
10962
11134
 
10963
- <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
11135
+ <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
10964
11136
  <xsl:value-of select="."/>
10965
11137
  </xsl:template>
10966
11138
 
@@ -10970,7 +11142,7 @@
10970
11142
  </xsl:if>
10971
11143
  </xsl:template>
10972
11144
 
10973
- <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
11145
+ <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
10974
11146
  <xsl:value-of select="."/>
10975
11147
  </xsl:template>
10976
11148
 
@@ -11431,7 +11603,7 @@
11431
11603
  <xsl:value-of select="."/>
11432
11604
  </xsl:template>
11433
11605
 
11434
- <xsl:template match="mn:review" mode="contents_item"/>
11606
+ <xsl:template match="mn:annotation" mode="contents_item"/>
11435
11607
 
11436
11608
  <xsl:template match="mn:tab" mode="contents_item">
11437
11609
  <xsl:text> </xsl:text>
@@ -11586,7 +11758,7 @@
11586
11758
  <xsl:apply-templates/>
11587
11759
  </xsl:template>
11588
11760
 
11589
- <xsl:template match="mn:toc//mn:xref" priority="3">
11761
+ <xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
11590
11762
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11591
11763
  <!-- New format: one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11592
11764
  <!-- <test><xsl:copy-of select="."/></test> -->
@@ -11654,8 +11826,8 @@
11654
11826
  <xsl:apply-templates mode="toc_table_width"/>
11655
11827
  </xsl:template>
11656
11828
 
11657
- <xsl:template match="mn:clause[@type = 'toc']/mn:title" mode="toc_table_width"/>
11658
- <xsl:template match="mn:clause[not(@type = 'toc')]/mn:title" mode="toc_table_width"/>
11829
+ <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
11830
+ <xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
11659
11831
 
11660
11832
  <xsl:template match="mn:li" mode="toc_table_width">
11661
11833
  <mn:tr>
@@ -11663,7 +11835,7 @@
11663
11835
  </mn:tr>
11664
11836
  </xsl:template>
11665
11837
 
11666
- <xsl:template match="mn:xref" mode="toc_table_width">
11838
+ <xsl:template match="mn:fmt-xref" mode="toc_table_width">
11667
11839
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11668
11840
  <!-- New format - one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11669
11841
  <xsl:for-each select="mn:tab">
@@ -11737,10 +11909,10 @@
11737
11909
 
11738
11910
  </xsl:template> <!-- tab -->
11739
11911
 
11740
- <xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
11741
- <xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
11912
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
11913
+ <xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
11742
11914
 
11743
- <xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
11915
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
11744
11916
  <xsl:attribute name="padding-right">4mm</xsl:attribute>
11745
11917
  </xsl:template>
11746
11918
 
@@ -11755,13 +11927,13 @@
11755
11927
  </xsl:template>
11756
11928
 
11757
11929
  <xsl:variable name="reviews_">
11758
- <xsl:for-each select="//mn:review[not(parent::mn:review-container)][@from]">
11930
+ <xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
11759
11931
  <xsl:copy>
11760
11932
  <xsl:copy-of select="@from"/>
11761
11933
  <xsl:copy-of select="@id"/>
11762
11934
  </xsl:copy>
11763
11935
  </xsl:for-each>
11764
- <xsl:for-each select="//mn:fmt-review-start[@source]">
11936
+ <xsl:for-each select="//mn:fmt-annotation-start[@source]">
11765
11937
  <xsl:copy>
11766
11938
  <xsl:copy-of select="@source"/>
11767
11939
  <xsl:copy-of select="@id"/>
@@ -11775,7 +11947,7 @@
11775
11947
  <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
11776
11948
  <xsl:variable name="curr_id" select="@id"/>
11777
11949
  <!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
11778
- <xsl:for-each select="$reviews//mn:review[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
11950
+ <xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
11779
11951
  <xsl:variable name="review_id" select="normalize-space(@id)"/>
11780
11952
  <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
11781
11953
  <fo:block keep-with-next="always" line-height="0.1" id="{$review_id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$review_id}" fox:alt-text="Annot___{$review_id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
@@ -11790,7 +11962,7 @@
11790
11962
 
11791
11963
  <!-- document text (not figures, or tables) footnotes -->
11792
11964
  <xsl:variable name="reviews_container_">
11793
- <xsl:for-each select="//mn:review-container/mn:fmt-review-body">
11965
+ <xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
11794
11966
  <xsl:variable name="update_xml_step1">
11795
11967
  <xsl:apply-templates select="." mode="update_xml_step1"/>
11796
11968
  </xsl:variable>
@@ -11799,10 +11971,10 @@
11799
11971
  </xsl:variable>
11800
11972
  <xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
11801
11973
 
11802
- <xsl:template match="mn:review-container"/>
11974
+ <xsl:template match="mn:annotation-container"/>
11803
11975
 
11804
11976
  <!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
11805
- <xsl:template match="mn:review[not(parent::mn:review-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
11977
+ <xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
11806
11978
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
11807
11979
  <xsl:if test="$isGenerateTableIF = 'false'">
11808
11980
  <xsl:choose>
@@ -11822,7 +11994,7 @@
11822
11994
  </xsl:template>
11823
11995
 
11824
11996
  <!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
11825
- <xsl:template match="mn:fmt-review-start" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
11997
+ <xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
11826
11998
  <!-- comment 2019-11-29 -->
11827
11999
  <!-- <fo:block font-weight="bold">Review:</fo:block>
11828
12000
  <xsl:apply-templates /> -->
@@ -11878,7 +12050,7 @@
11878
12050
  </xsl:template>
11879
12051
 
11880
12052
  <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
11881
- <xsl:template match="mn:review[@type = 'other']"/>
12053
+ <xsl:template match="mn:annotation[@type = 'other']"/>
11882
12054
 
11883
12055
  <!-- ============ -->
11884
12056
  <!-- errata -->
@@ -12271,9 +12443,12 @@
12271
12443
  <xsl:choose>
12272
12444
  <xsl:when test="mn:fmt-title">
12273
12445
  <xsl:variable name="fmt_title_section">
12274
- <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:review)]"/>
12446
+ <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
12275
12447
  </xsl:variable>
12276
12448
  <xsl:value-of select="normalize-space($fmt_title_section)"/>
12449
+ <xsl:if test="normalize-space($fmt_title_section) = ''">
12450
+ <xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
12451
+ </xsl:if>
12277
12452
  </xsl:when>
12278
12453
  <xsl:otherwise>
12279
12454
  <xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
@@ -12286,6 +12461,9 @@
12286
12461
  <xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
12287
12462
  <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
12288
12463
  </xsl:when>
12464
+ <xsl:when test="mn:fmt-title/mn:tab">
12465
+ <xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
12466
+ </xsl:when>
12289
12467
  <xsl:when test="mn:fmt-title">
12290
12468
  <xsl:copy-of select="mn:fmt-title/node()"/>
12291
12469
  </xsl:when>
@@ -12427,10 +12605,10 @@
12427
12605
 
12428
12606
  </fo:block>
12429
12607
 
12430
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
12608
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
12431
12609
 
12432
12610
  <fo:block>
12433
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
12611
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
12434
12612
  </fo:block>
12435
12613
  </xsl:otherwise>
12436
12614
  </xsl:choose>
@@ -12439,7 +12617,7 @@
12439
12617
  <xsl:template name="refine_annex_style">
12440
12618
  </xsl:template>
12441
12619
 
12442
- <xsl:template match="mn:name/text()">
12620
+ <xsl:template match="mn:name/text() | mn:fmt-name/text()">
12443
12621
  <!-- 0xA0 to space replacement -->
12444
12622
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
12445
12623
  </xsl:template>
@@ -12495,28 +12673,28 @@
12495
12673
  <xsl:template match="mn:amend"/>
12496
12674
 
12497
12675
  <!-- fmt-title renamed to title in update_xml_step1 -->
12498
- <xsl:template match="mn:fmt-title"/>
12676
+ <!-- <xsl:template match="mn:fmt-title" /> -->
12499
12677
 
12500
12678
  <!-- fmt-name renamed to name in update_xml_step1 -->
12501
- <xsl:template match="mn:fmt-name"/>
12679
+ <!-- <xsl:template match="mn:fmt-name" /> -->
12502
12680
 
12503
12681
  <!-- fmt-preferred renamed to preferred in update_xml_step1 -->
12504
- <xsl:template match="mn:fmt-preferred"/>
12682
+ <!-- <xsl:template match="mn:fmt-preferred" /> -->
12505
12683
 
12506
12684
  <!-- fmt-admitted renamed to admitted in update_xml_step1 -->
12507
- <xsl:template match="mn:fmt-admitted"/>
12685
+ <!-- <xsl:template match="mn:fmt-admitted" /> -->
12508
12686
 
12509
12687
  <!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
12510
- <xsl:template match="mn:fmt-deprecates"/>
12688
+ <!-- <xsl:template match="mn:fmt-deprecates" /> -->
12511
12689
 
12512
12690
  <!-- fmt-definition renamed to definition in update_xml_step1 -->
12513
- <xsl:template match="mn:fmt-definition"/>
12691
+ <!-- <xsl:template match="mn:fmt-definition" /> -->
12514
12692
 
12515
12693
  <!-- fmt-termsource renamed to termsource in update_xml_step1 -->
12516
- <xsl:template match="mn:fmt-termsource"/>
12694
+ <!-- <xsl:template match="mn:fmt-termsource" /> -->
12517
12695
 
12518
12696
  <!-- fmt-source renamed to source in update_xml_step1 -->
12519
- <xsl:template match="mn:fmt-source"/>
12697
+ <!-- <xsl:template match="mn:fmt-source" /> -->
12520
12698
 
12521
12699
  <xsl:template match="mn:semx">
12522
12700
  <xsl:apply-templates/>
@@ -12961,12 +13139,12 @@
12961
13139
  <xsl:when test="ancestor::mn:preface">
12962
13140
  <xsl:value-of select="$level_total - 2"/>
12963
13141
  </xsl:when>
12964
- <xsl:when test="ancestor::mn:sections and self::mn:title">
13142
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
12965
13143
  <!-- determine 'depth' depends on upper clause with title/@depth -->
12966
13144
  <!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
12967
- <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:title/@depth][1]/mn:title/@depth"/>
13145
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
12968
13146
  <!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
12969
- <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:title/@depth][1]/ancestor::*)"/>
13147
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
12970
13148
  <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
12971
13149
  <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
12972
13150
  <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
@@ -12982,8 +13160,8 @@
12982
13160
  </xsl:otherwise>
12983
13161
  </xsl:choose>
12984
13162
  </xsl:when>
12985
- <xsl:when test="ancestor::mn:sections and self::mn:name and parent::mn:term">
12986
- <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:title/@depth)"/>
13163
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
13164
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
12987
13165
  <xsl:choose>
12988
13166
  <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
12989
13167
  <xsl:value-of select="number($upper_terms_depth + 1)"/>
@@ -12994,7 +13172,7 @@
12994
13172
  </xsl:choose>
12995
13173
  </xsl:when>
12996
13174
  <xsl:when test="ancestor::mn:sections">
12997
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:title/@depth)"/>
13175
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
12998
13176
  <xsl:choose>
12999
13177
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13000
13178
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -13010,8 +13188,8 @@
13010
13188
  <xsl:when test="parent::mn:annex">
13011
13189
  <xsl:value-of select="$level_total - 1"/>
13012
13190
  </xsl:when>
13013
- <xsl:when test="ancestor::mn:annex and self::mn:title">
13014
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:title/@depth)"/>
13191
+ <xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
13192
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
13015
13193
  <xsl:choose>
13016
13194
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13017
13195
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -13044,7 +13222,7 @@
13044
13222
  </xsl:when>
13045
13223
  <xsl:otherwise>
13046
13224
  <xsl:variable name="title_level_">
13047
- <xsl:for-each select="../preceding-sibling::mn:title[1]">
13225
+ <xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
13048
13226
  <xsl:call-template name="getLevel"/>
13049
13227
  </xsl:for-each>
13050
13228
  </xsl:variable>
@@ -13121,15 +13299,17 @@
13121
13299
  </xsl:template>
13122
13300
 
13123
13301
  <xsl:template name="setNamedDestination">
13124
- <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
13125
- <xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
13126
- <fox:destination internal-destination="{@id}"/>
13127
- </xsl:if>
13128
- <xsl:for-each select=". | mn:title | mn:name">
13129
- <xsl:if test="@named_dest">
13130
- <fox:destination internal-destination="{@named_dest}"/>
13302
+ <xsl:if test="$isGenerateTableIF = 'false'">
13303
+ <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
13304
+ <xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
13305
+ <fox:destination internal-destination="{@id}"/>
13131
13306
  </xsl:if>
13132
- </xsl:for-each>
13307
+ <xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
13308
+ <xsl:if test="@named_dest">
13309
+ <fox:destination internal-destination="{@named_dest}"/>
13310
+ </xsl:if>
13311
+ </xsl:for-each>
13312
+ </xsl:if>
13133
13313
  </xsl:template>
13134
13314
 
13135
13315
  <xsl:template name="add-letter-spacing">
@@ -13477,7 +13657,7 @@
13477
13657
  </xsl:when>
13478
13658
  <xsl:otherwise>
13479
13659
  <!-- namespace-uri(ancestor::mn:title) != '' to skip title from $contents -->
13480
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
13660
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
13481
13661
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
13482
13662
  </xsl:if>
13483
13663
  <fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm" role="SKIP" text-align-last="center">
@@ -13511,7 +13691,7 @@
13511
13691
  </fo:block>
13512
13692
  </fo:block-container>
13513
13693
  </fo:inline-container>
13514
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
13694
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
13515
13695
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
13516
13696
  </xsl:if>
13517
13697
  </xsl:otherwise>