metanorma-csa 2.6.9 → 2.6.10

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,6 +221,44 @@
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">
@@ -302,7 +310,7 @@
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">
@@ -362,7 +370,7 @@
362
370
  </xsl:if>
363
371
  </xsl:template>
364
372
 
365
- <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:title" priority="3">
373
+ <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
366
374
  <fo:block font-size="26pt" color="black" margin-top="2pt" margin-bottom="30pt" role="H1">
367
375
  <xsl:apply-templates/>
368
376
  </fo:block>
@@ -424,7 +432,7 @@
424
432
  <!-- ====== -->
425
433
  <!-- title -->
426
434
  <!-- ====== -->
427
- <xsl:template match="mn:annex/mn:title">
435
+ <xsl:template match="mn:annex/mn:fmt-title">
428
436
  <xsl:variable name="level">
429
437
  <xsl:call-template name="getLevel"/>
430
438
  </xsl:variable>
@@ -440,7 +448,7 @@
440
448
  </fo:block>
441
449
  </xsl:template>
442
450
 
443
- <xsl:template match="mn:title" name="title">
451
+ <xsl:template match="mn:fmt-title" name="title">
444
452
 
445
453
  <xsl:variable name="level">
446
454
  <xsl:call-template name="getLevel"/>
@@ -511,7 +519,7 @@
511
519
  <xsl:variable name="element-name">
512
520
  <xsl:choose>
513
521
  <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 -->
522
+ <xsl:when test="../@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
515
523
  <xsl:when test="parent::mn:admonition">fo:inline</xsl:when>
516
524
  <xsl:otherwise>fo:block</xsl:otherwise>
517
525
  </xsl:choose>
@@ -581,8 +589,8 @@
581
589
  <fo:list-item-label><fo:block/></fo:list-item-label>
582
590
  <fo:list-item-body>
583
591
  <fo:block>
584
- <xsl:apply-templates select="mn:name"/>
585
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
592
+ <xsl:apply-templates select="mn:fmt-name"/>
593
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
586
594
  </fo:block>
587
595
  </fo:list-item-body>
588
596
  </fo:list-item>
@@ -791,10 +799,6 @@
791
799
  <title-part lang="ru">
792
800
  </title-part>
793
801
  <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
802
  </xsl:variable>
799
803
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
800
804
 
@@ -1247,7 +1251,8 @@
1247
1251
  <xsl:template match="mn:stem" mode="update_xml_step1"/>
1248
1252
 
1249
1253
  <xsl:template match="mn:fmt-stem" mode="update_xml_step1">
1250
- <xsl:element name="stem" namespace="{$namespace_full}">
1254
+ <!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
1255
+ <xsl:copy>
1251
1256
  <xsl:copy-of select="@*"/>
1252
1257
  <xsl:choose>
1253
1258
  <xsl:when test="mn:semx and count(node()) = 1">
@@ -1271,7 +1276,8 @@
1271
1276
  </xsl:choose>
1272
1277
  </xsl:otherwise>
1273
1278
  </xsl:choose>
1274
- </xsl:element>
1279
+ </xsl:copy>
1280
+ <!-- </xsl:element> -->
1275
1281
  </xsl:template>
1276
1282
 
1277
1283
  <xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
@@ -1433,12 +1439,14 @@
1433
1439
  </xsl:template>
1434
1440
 
1435
1441
  <xsl:template match="mn:fmt-title" mode="update_xml_step1">
1436
- <xsl:element name="title" namespace="{$namespace_full}">
1442
+ <!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
1443
+ <xsl:copy>
1437
1444
  <xsl:copy-of select="@*"/>
1438
1445
  <xsl:call-template name="addNamedDestinationAttribute"/>
1439
1446
 
1440
1447
  <xsl:apply-templates mode="update_xml_step1"/>
1441
- </xsl:element>
1448
+ </xsl:copy>
1449
+ <!-- </xsl:element> -->
1442
1450
  </xsl:template>
1443
1451
 
1444
1452
  <xsl:template name="addNamedDestinationAttribute">
@@ -1450,12 +1458,14 @@
1450
1458
  <xsl:apply-templates mode="update_xml_step1"/>
1451
1459
  </xsl:when>
1452
1460
  <xsl:otherwise>
1453
- <xsl:element name="name" namespace="{$namespace_full}">
1461
+ <!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
1462
+ <xsl:copy>
1454
1463
  <xsl:copy-of select="@*"/>
1455
1464
  <xsl:call-template name="addNamedDestinationAttribute"/>
1456
1465
 
1457
1466
  <xsl:apply-templates mode="update_xml_step1"/>
1458
- </xsl:element>
1467
+ </xsl:copy>
1468
+ <!-- </xsl:element> -->
1459
1469
  </xsl:otherwise>
1460
1470
  </xsl:choose>
1461
1471
  </xsl:template>
@@ -1470,7 +1480,7 @@
1470
1480
  <xsl:apply-templates mode="update_xml_step1"/>
1471
1481
  </xsl:template>
1472
1482
  <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}">
1483
+ <xsl:element name="fmt-preferred" namespace="{$namespace_full}">
1474
1484
  <xsl:copy-of select="@*"/>
1475
1485
  <xsl:apply-templates mode="update_xml_step1"/>
1476
1486
  </xsl:element>
@@ -1480,7 +1490,7 @@
1480
1490
  <xsl:apply-templates mode="update_xml_step1"/>
1481
1491
  </xsl:template>
1482
1492
  <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}">
1493
+ <xsl:element name="fmt-admitted" namespace="{$namespace_full}">
1484
1494
  <xsl:copy-of select="@*"/>
1485
1495
  <xsl:apply-templates mode="update_xml_step1"/>
1486
1496
  </xsl:element>
@@ -1490,32 +1500,32 @@
1490
1500
  <xsl:apply-templates mode="update_xml_step1"/>
1491
1501
  </xsl:template>
1492
1502
  <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}">
1503
+ <xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
1494
1504
  <xsl:copy-of select="@*"/>
1495
1505
  <xsl:apply-templates mode="update_xml_step1"/>
1496
1506
  </xsl:element>
1497
1507
  </xsl:template>
1498
1508
 
1499
- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
1509
+ <!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
1500
1510
  <xsl:element name="definition" namespace="{$namespace_full}">
1501
1511
  <xsl:copy-of select="@*"/>
1502
1512
  <xsl:apply-templates mode="update_xml_step1"/>
1503
1513
  </xsl:element>
1504
1514
  </xsl:template>
1505
-
1515
+
1506
1516
  <xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
1507
1517
  <xsl:element name="termsource" namespace="{$namespace_full}">
1508
1518
  <xsl:copy-of select="@*"/>
1509
1519
  <xsl:apply-templates mode="update_xml_step1"/>
1510
1520
  </xsl:element>
1511
1521
  </xsl:template>
1512
-
1522
+
1513
1523
  <xsl:template match="mn:fmt-source" mode="update_xml_step1">
1514
1524
  <xsl:element name="source" namespace="{$namespace_full}">
1515
1525
  <xsl:copy-of select="@*"/>
1516
1526
  <xsl:apply-templates mode="update_xml_step1"/>
1517
1527
  </xsl:element>
1518
- </xsl:template>
1528
+ </xsl:template> -->
1519
1529
 
1520
1530
  <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
1531
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -1538,12 +1548,12 @@
1538
1548
  </xsl:template>
1539
1549
 
1540
1550
  <xsl:template match="mn:identifier" mode="update_xml_step1"/>
1541
- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
1551
+ <!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
1542
1552
  <xsl:element name="identifier" namespace="{$namespace_full}">
1543
1553
  <xsl:copy-of select="@*"/>
1544
1554
  <xsl:apply-templates mode="update_xml_step1"/>
1545
1555
  </xsl:element>
1546
- </xsl:template>
1556
+ </xsl:template> -->
1547
1557
 
1548
1558
  <xsl:template match="mn:concept" mode="update_xml_step1"/>
1549
1559
 
@@ -1553,51 +1563,53 @@
1553
1563
 
1554
1564
  <xsl:template match="mn:eref" mode="update_xml_step1"/>
1555
1565
 
1556
- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
1566
+ <!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
1557
1567
  <xsl:element name="eref" namespace="{$namespace_full}">
1558
1568
  <xsl:copy-of select="@*"/>
1559
1569
  <xsl:apply-templates mode="update_xml_step1"/>
1560
1570
  </xsl:element>
1561
- </xsl:template>
1571
+ </xsl:template> -->
1562
1572
 
1563
1573
  <xsl:template match="mn:xref" mode="update_xml_step1"/>
1564
1574
 
1565
- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
1575
+ <!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
1566
1576
  <xsl:element name="xref" namespace="{$namespace_full}">
1567
1577
  <xsl:copy-of select="@*"/>
1568
1578
  <xsl:apply-templates mode="update_xml_step1"/>
1569
1579
  </xsl:element>
1570
- </xsl:template>
1580
+ </xsl:template> -->
1571
1581
 
1572
1582
  <xsl:template match="mn:link" mode="update_xml_step1"/>
1573
1583
 
1574
- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
1584
+ <!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
1575
1585
  <xsl:element name="link" namespace="{$namespace_full}">
1576
1586
  <xsl:copy-of select="@*"/>
1577
1587
  <xsl:apply-templates mode="update_xml_step1"/>
1578
1588
  </xsl:element>
1579
- </xsl:template>
1589
+ </xsl:template> -->
1580
1590
 
1581
1591
  <xsl:template match="mn:origin" mode="update_xml_step1"/>
1582
1592
 
1583
- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
1593
+ <!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
1584
1594
  <xsl:element name="origin" namespace="{$namespace_full}">
1585
1595
  <xsl:copy-of select="@*"/>
1586
1596
  <xsl:apply-templates mode="update_xml_step1"/>
1587
1597
  </xsl:element>
1588
- </xsl:template>
1598
+ </xsl:template> -->
1589
1599
 
1590
1600
  <xsl:template match="mn:erefstack" mode="update_xml_step1"/>
1591
1601
 
1592
1602
  <xsl:template match="mn:svgmap" mode="update_xml_step1"/>
1593
1603
 
1594
- <xsl:template match="mn:review-container" mode="update_xml_step1"/>
1604
+ <xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
1595
1605
 
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>
1606
+ <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
1607
+ <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
1608
+ <xsl:value-of select="."/>
1609
+ </xsl:element>
1610
+ </xsl:template>
1611
+
1612
+ <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
1601
1613
 
1602
1614
  <!-- END: update new Presentation XML -->
1603
1615
 
@@ -1793,7 +1805,7 @@
1793
1805
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
1794
1806
  <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
1807
 
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">
1808
+ <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
1809
 
1798
1810
  <xsl:variable name="parent" select="local-name(..)"/>
1799
1811
 
@@ -1912,7 +1924,7 @@
1912
1924
  </xsl:if>
1913
1925
  </xsl:template>
1914
1926
 
1915
- <xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
1927
+ <xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
1916
1928
  <xsl:copy-of select="."/>
1917
1929
  </xsl:template>
1918
1930
 
@@ -2239,7 +2251,7 @@
2239
2251
  </fo:block>
2240
2252
  </xsl:template> <!-- copyright-statement -->
2241
2253
 
2242
- <xsl:template match="mn:copyright-statement//mn:title">
2254
+ <xsl:template match="mn:copyright-statement//mn:fmt-title">
2243
2255
  <!-- process in the template 'title' -->
2244
2256
  <xsl:call-template name="title"/>
2245
2257
  </xsl:template> <!-- copyright-statement//title -->
@@ -2255,7 +2267,7 @@
2255
2267
  </fo:block>
2256
2268
  </xsl:template> <!-- license-statement -->
2257
2269
 
2258
- <xsl:template match="mn:license-statement//mn:title">
2270
+ <xsl:template match="mn:license-statement//mn:fmt-title">
2259
2271
  <!-- process in the template 'title' -->
2260
2272
  <xsl:call-template name="title"/>
2261
2273
  </xsl:template> <!-- license-statement/title -->
@@ -2272,7 +2284,7 @@
2272
2284
  </fo:block>
2273
2285
  </xsl:template> <!-- legal-statement -->
2274
2286
 
2275
- <xsl:template match="mn:legal-statement//mn:title">
2287
+ <xsl:template match="mn:legal-statement//mn:fmt-title">
2276
2288
  <!-- process in the template 'title' -->
2277
2289
  <xsl:call-template name="title"/>
2278
2290
 
@@ -2292,7 +2304,7 @@
2292
2304
  </fo:block>
2293
2305
  </xsl:template> <!-- feedback-statement -->
2294
2306
 
2295
- <xsl:template match="mn:feedback-statement//mn:title">
2307
+ <xsl:template match="mn:feedback-statement//mn:fmt-title">
2296
2308
  <!-- process in the template 'title' -->
2297
2309
  <xsl:call-template name="title"/>
2298
2310
  </xsl:template>
@@ -2317,7 +2329,7 @@
2317
2329
  <xsl:template name="refine_link-style">
2318
2330
  </xsl:template> <!-- refine_link-style -->
2319
2331
 
2320
- <xsl:template match="mn:link" name="link">
2332
+ <xsl:template match="mn:fmt-link" name="link">
2321
2333
  <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
2322
2334
  <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
2323
2335
  <xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
@@ -2539,7 +2551,7 @@
2539
2551
  <xsl:value-of select="."/>
2540
2552
  </xsl:attribute>
2541
2553
  </xsl:for-each>
2542
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
2554
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
2543
2555
  </xsl:when>
2544
2556
 
2545
2557
  <xsl:otherwise>
@@ -2581,11 +2593,11 @@
2581
2593
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
2582
2594
  </xsl:if>
2583
2595
 
2584
- <xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
2596
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
2585
2597
  </fo:block>
2586
2598
 
2587
2599
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
2588
- <xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name AFTER content -->
2600
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
2589
2601
 
2590
2602
  </fo:block-container>
2591
2603
  </fo:block-container>
@@ -2886,7 +2898,7 @@
2886
2898
 
2887
2899
  <!-- end mode="syntax_highlight" -->
2888
2900
 
2889
- <xsl:template match="mn:sourcecode/mn:name">
2901
+ <xsl:template match="mn:sourcecode/mn:fmt-name">
2890
2902
  <xsl:if test="normalize-space() != ''">
2891
2903
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
2892
2904
  <xsl:apply-templates/>
@@ -2904,7 +2916,7 @@
2904
2916
  </xsl:choose>
2905
2917
  </xsl:template>
2906
2918
 
2907
- <xsl:template match="mn:annotation">
2919
+ <xsl:template match="mn:callout-annotation">
2908
2920
  <xsl:variable name="annotation-id" select="@id"/>
2909
2921
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
2910
2922
  <fo:block id="{$annotation-id}" white-space="nowrap">
@@ -2916,7 +2928,7 @@
2916
2928
  </fo:block>
2917
2929
  </xsl:template>
2918
2930
 
2919
- <xsl:template match="mn:annotation/mn:p">
2931
+ <xsl:template match="mn:callout-annotation/mn:p">
2920
2932
  <xsl:param name="callout"/>
2921
2933
  <fo:inline id="{@id}">
2922
2934
  <xsl:call-template name="setNamedDestination"/>
@@ -3069,7 +3081,7 @@
3069
3081
  <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
3082
  <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
3071
3083
  <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>
3084
+ <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
3085
  <xsl:otherwise>
3074
3086
  <xsl:variable name="tag">
3075
3087
  <xsl:call-template name="insertTag">
@@ -3470,12 +3482,12 @@
3470
3482
  <xsl:template match="mn:permission">
3471
3483
  <xsl:call-template name="setNamedDestination"/>
3472
3484
  <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)]"/>
3485
+ <xsl:apply-templates select="mn:fmt-name"/>
3486
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3475
3487
  </fo:block>
3476
3488
  </xsl:template>
3477
3489
 
3478
- <xsl:template match="mn:permission/mn:name">
3490
+ <xsl:template match="mn:permission/mn:fmt-name">
3479
3491
  <xsl:if test="normalize-space() != ''">
3480
3492
  <fo:block xsl:use-attribute-sets="permission-name-style">
3481
3493
  <xsl:apply-templates/>
@@ -3497,15 +3509,15 @@
3497
3509
  <xsl:template match="mn:requirement">
3498
3510
  <xsl:call-template name="setNamedDestination"/>
3499
3511
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
3500
- <xsl:apply-templates select="mn:name"/>
3512
+ <xsl:apply-templates select="mn:fmt-name"/>
3501
3513
  <xsl:apply-templates select="mn:label"/>
3502
3514
  <xsl:apply-templates select="@obligation"/>
3503
3515
  <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)]"/>
3516
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
3505
3517
  </fo:block>
3506
3518
  </xsl:template>
3507
3519
 
3508
- <xsl:template match="mn:requirement/mn:name">
3520
+ <xsl:template match="mn:requirement/mn:fmt-name">
3509
3521
  <xsl:if test="normalize-space() != ''">
3510
3522
 
3511
3523
  <fo:block xsl:use-attribute-sets="requirement-name-style">
@@ -3541,12 +3553,12 @@
3541
3553
  <xsl:template match="mn:recommendation">
3542
3554
  <xsl:call-template name="setNamedDestination"/>
3543
3555
  <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)]"/>
3556
+ <xsl:apply-templates select="mn:fmt-name"/>
3557
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3546
3558
  </fo:block>
3547
3559
  </xsl:template>
3548
3560
 
3549
- <xsl:template match="mn:recommendation/mn:name">
3561
+ <xsl:template match="mn:recommendation/mn:fmt-name">
3550
3562
  <xsl:if test="normalize-space() != ''">
3551
3563
 
3552
3564
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
@@ -3801,11 +3813,11 @@
3801
3813
 
3802
3814
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
3803
3815
  </xsl:if>
3804
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
3816
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3805
3817
  </fo:block>
3806
3818
  </xsl:template>
3807
3819
 
3808
- <xsl:template match="mn:term/mn:name">
3820
+ <xsl:template match="mn:term/mn:fmt-name">
3809
3821
  <xsl:if test="normalize-space() != ''">
3810
3822
  <!-- <xsl:variable name="level">
3811
3823
  <xsl:call-template name="getLevelTermName"/>
@@ -3824,7 +3836,7 @@
3824
3836
  <!-- origin -->
3825
3837
  <!-- modification -->
3826
3838
  <!-- ====== -->
3827
- <xsl:template match="mn:termsource" name="termsource">
3839
+ <xsl:template match="mn:fmt-termsource" name="termsource">
3828
3840
  <fo:block xsl:use-attribute-sets="termsource-style">
3829
3841
 
3830
3842
  <xsl:call-template name="refine_termsource-style"/>
@@ -3863,24 +3875,24 @@
3863
3875
  </fo:block>
3864
3876
  </xsl:template>
3865
3877
 
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">
3878
+ <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
3879
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
3868
3880
  </xsl:template>
3869
3881
 
3870
- <xsl:template match="mn:termsource/text()">
3882
+ <xsl:template match="mn:fmt-termsource/text()">
3871
3883
  <xsl:if test="normalize-space() != ''">
3872
3884
  <xsl:value-of select="."/>
3873
3885
  </xsl:if>
3874
3886
  </xsl:template>
3875
3887
 
3876
3888
  <!-- text SOURCE: -->
3877
- <xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
3889
+ <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
3878
3890
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
3879
3891
  <xsl:value-of select="."/>
3880
3892
  </fo:inline>
3881
3893
  </xsl:template>
3882
3894
 
3883
- <xsl:template match="mn:origin">
3895
+ <xsl:template match="mn:fmt-origin">
3884
3896
  <xsl:call-template name="insert_basic_link">
3885
3897
  <xsl:with-param name="element">
3886
3898
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -3926,7 +3938,7 @@
3926
3938
  <!-- ====== -->
3927
3939
 
3928
3940
  <!-- Preferred, admitted, deprecated -->
3929
- <xsl:template match="mn:preferred">
3941
+ <xsl:template match="mn:fmt-preferred">
3930
3942
  <xsl:variable name="level">
3931
3943
  <xsl:call-template name="getLevel"/>
3932
3944
  </xsl:variable>
@@ -3942,15 +3954,15 @@
3942
3954
  </xsl:variable>
3943
3955
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
3944
3956
 
3945
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
3957
+ <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
3946
3958
 
3947
3959
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
3948
3960
 
3949
- <xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
3961
+ <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
3950
3962
  <xsl:call-template name="setIDforNamedDestination"/>
3951
3963
  </xsl:for-each>
3952
3964
 
3953
- <xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
3965
+ <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
3954
3966
  </fo:block>
3955
3967
  </xsl:if>
3956
3968
 
@@ -3974,13 +3986,13 @@
3974
3986
  <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
3975
3987
  <xsl:template match="mn:domain"/>
3976
3988
 
3977
- <xsl:template match="mn:admitted">
3989
+ <xsl:template match="mn:fmt-admitted">
3978
3990
  <fo:block xsl:use-attribute-sets="admitted-style">
3979
3991
  <xsl:apply-templates/>
3980
3992
  </fo:block>
3981
3993
  </xsl:template>
3982
3994
 
3983
- <xsl:template match="mn:deprecates">
3995
+ <xsl:template match="mn:fmt-deprecates">
3984
3996
  <fo:block xsl:use-attribute-sets="deprecates-style">
3985
3997
  <xsl:apply-templates/>
3986
3998
  </fo:block>
@@ -3994,7 +4006,7 @@
3994
4006
 
3995
4007
  <!-- 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
4008
  <!-- in metanorma xml preferred terms delimited by semicolons -->
3997
- <xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
4009
+ <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
3998
4010
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
3999
4011
  </xsl:template>
4000
4012
  <!-- End Preferred, admitted, deprecated -->
@@ -4013,16 +4025,16 @@
4013
4025
  <!-- ========== -->
4014
4026
  <!-- definition -->
4015
4027
  <!-- ========== -->
4016
- <xsl:template match="mn:definition">
4028
+ <xsl:template match="mn:fmt-definition">
4017
4029
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
4018
4030
  <xsl:apply-templates/>
4019
4031
  </fo:block>
4020
4032
  </xsl:template>
4021
4033
 
4022
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]">
4034
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
4023
4035
  <xsl:apply-templates/>
4024
4036
  </xsl:template>
4025
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
4037
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
4026
4038
  <fo:inline> <xsl:apply-templates/></fo:inline>
4027
4039
  <fo:block/>
4028
4040
  </xsl:template>
@@ -4091,12 +4103,12 @@
4091
4103
  <xsl:call-template name="refine_termexample-style"/>
4092
4104
  <xsl:call-template name="setBlockSpanAll"/>
4093
4105
 
4094
- <xsl:apply-templates select="mn:name"/>
4095
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4106
+ <xsl:apply-templates select="mn:fmt-name"/>
4107
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4096
4108
  </fo:block>
4097
4109
  </xsl:template>
4098
4110
 
4099
- <xsl:template match="mn:termexample/mn:name">
4111
+ <xsl:template match="mn:termexample/mn:fmt-name">
4100
4112
  <xsl:if test="normalize-space() != ''">
4101
4113
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
4102
4114
  <xsl:call-template name="refine_termexample-name-style"/>
@@ -4147,7 +4159,7 @@
4147
4159
  <xsl:call-template name="refine_example-style"/>
4148
4160
 
4149
4161
  <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
4162
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>block
4151
4163
  </xsl:variable>
4152
4164
 
4153
4165
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -4158,7 +4170,7 @@
4158
4170
 
4159
4171
  <!-- display name 'EXAMPLE' in a separate block -->
4160
4172
  <fo:block>
4161
- <xsl:apply-templates select="mn:name">
4173
+ <xsl:apply-templates select="mn:fmt-name">
4162
4174
  <xsl:with-param name="fo_element" select="$fo_element"/>
4163
4175
  </xsl:apply-templates>
4164
4176
  </fo:block>
@@ -4166,7 +4178,7 @@
4166
4178
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4167
4179
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4168
4180
  <xsl:variable name="example_body">
4169
- <xsl:apply-templates select="node()[not(self::mn:name)]">
4181
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
4170
4182
  <xsl:with-param name="fo_element" select="$fo_element"/>
4171
4183
  </xsl:apply-templates>
4172
4184
  </xsl:variable>
@@ -4193,14 +4205,14 @@
4193
4205
  <fo:list-item>
4194
4206
  <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
4195
4207
  <fo:block>
4196
- <xsl:apply-templates select="mn:name">
4208
+ <xsl:apply-templates select="mn:fmt-name">
4197
4209
  <xsl:with-param name="fo_element">block</xsl:with-param>
4198
4210
  </xsl:apply-templates>
4199
4211
  </fo:block>
4200
4212
  </fo:list-item-label>
4201
4213
  <fo:list-item-body start-indent="body-start()">
4202
4214
  <fo:block>
4203
- <xsl:apply-templates select="node()[not(self::mn:name)]">
4215
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
4204
4216
  <xsl:with-param name="fo_element" select="$fo_element"/>
4205
4217
  </xsl:apply-templates>
4206
4218
  </fo:block>
@@ -4213,21 +4225,21 @@
4213
4225
 
4214
4226
  <!-- display 'EXAMPLE' and first element in the same line -->
4215
4227
  <fo:block>
4216
- <xsl:apply-templates select="mn:name">
4228
+ <xsl:apply-templates select="mn:fmt-name">
4217
4229
  <xsl:with-param name="fo_element" select="$fo_element"/>
4218
4230
  </xsl:apply-templates>
4219
4231
  <fo:inline>
4220
- <xsl:apply-templates select="*[not(self::mn:name)][1]">
4232
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
4221
4233
  <xsl:with-param name="fo_element" select="$fo_element"/>
4222
4234
  </xsl:apply-templates>
4223
4235
  </fo:inline>
4224
4236
  </fo:block>
4225
4237
 
4226
- <xsl:if test="*[not(self::mn:name)][position() &gt; 1]">
4238
+ <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
4227
4239
  <!-- display further elements in blocks -->
4228
4240
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4229
4241
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4230
- <xsl:apply-templates select="*[not(self::mn:name)][position() &gt; 1]">
4242
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
4231
4243
  <xsl:with-param name="fo_element" select="'block'"/>
4232
4244
  </xsl:apply-templates>
4233
4245
  </fo:block-container>
@@ -4241,7 +4253,7 @@
4241
4253
  </xsl:template>
4242
4254
 
4243
4255
  <!-- example/name -->
4244
- <xsl:template match="mn:example/mn:name">
4256
+ <xsl:template match="mn:example/mn:fmt-name">
4245
4257
  <xsl:param name="fo_element">block</xsl:param>
4246
4258
 
4247
4259
  <xsl:choose>
@@ -4266,7 +4278,7 @@
4266
4278
  </xsl:template>
4267
4279
 
4268
4280
  <!-- 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">
4281
+ <xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
4270
4282
  <fo:inline xsl:use-attribute-sets="example-name-style">
4271
4283
  <xsl:apply-templates/>
4272
4284
  </fo:inline>
@@ -4528,7 +4540,7 @@
4528
4540
 
4529
4541
  <!-- Display table's name before table as standalone block -->
4530
4542
  <!-- $namespace = 'iso' or -->
4531
- <xsl:apply-templates select="mn:name"/> <!-- table's title rendered before table -->
4543
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
4532
4544
 
4533
4545
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
4534
4546
 
@@ -4569,7 +4581,7 @@
4569
4581
 
4570
4582
  <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
4571
4583
 
4572
- <xsl:for-each select="mn:name">
4584
+ <xsl:for-each select="mn:fmt-name">
4573
4585
  <xsl:call-template name="setIDforNamedDestination"/>
4574
4586
  </xsl:for-each>
4575
4587
 
@@ -4599,6 +4611,10 @@
4599
4611
  <xsl:with-param name="margin-side" select="$margin-side"/>
4600
4612
  </xsl:call-template>
4601
4613
 
4614
+ <xsl:call-template name="setTableStyles">
4615
+ <xsl:with-param name="scope">table</xsl:with-param>
4616
+ </xsl:call-template>
4617
+
4602
4618
  </xsl:element>
4603
4619
  </xsl:variable>
4604
4620
 
@@ -4619,7 +4635,7 @@
4619
4635
  </xsl:attribute>
4620
4636
  </xsl:for-each>
4621
4637
 
4622
- <xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[local-name(..) != 'name'] or ./mn:source"/>
4638
+ <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
4639
  <xsl:if test="$isNoteOrFnExist = 'true'">
4624
4640
  <!-- <xsl:choose>
4625
4641
  <xsl:when test="$namespace = 'plateau'"></xsl:when>
@@ -4675,7 +4691,7 @@
4675
4691
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
4676
4692
  </xsl:when>
4677
4693
  <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 -->
4694
+ <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
4695
  </xsl:otherwise>
4680
4696
  </xsl:choose>
4681
4697
 
@@ -4772,7 +4788,7 @@
4772
4788
  </xsl:template>
4773
4789
 
4774
4790
  <!-- table/name-->
4775
- <xsl:template match="*[local-name()='table']/mn:name">
4791
+ <xsl:template match="*[local-name()='table']/mn:fmt-name">
4776
4792
  <xsl:param name="continued"/>
4777
4793
  <xsl:param name="cols-count"/>
4778
4794
  <xsl:if test="normalize-space() != ''">
@@ -4837,7 +4853,7 @@
4837
4853
  </xsl:template>
4838
4854
 
4839
4855
  <!-- SOURCE: ... -->
4840
- <xsl:template match="*[local-name()='table']/mn:source" priority="2">
4856
+ <xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
4841
4857
  <xsl:call-template name="termsource"/>
4842
4858
  </xsl:template>
4843
4859
 
@@ -5002,11 +5018,11 @@
5002
5018
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
5003
5019
  </xsl:template>
5004
5020
 
5005
- <xsl:template match="mn:termsource" mode="td_text">
5006
- <xsl:value-of select="*[local-name()='origin']/@citeas"/>
5021
+ <xsl:template match="mn:fmt-termsource" mode="td_text">
5022
+ <xsl:value-of select="mn:fmt-origin/@citeas"/>
5007
5023
  </xsl:template>
5008
5024
 
5009
- <xsl:template match="mn:link" mode="td_text">
5025
+ <xsl:template match="mn:fmt-link" mode="td_text">
5010
5026
  <xsl:value-of select="@target"/>
5011
5027
  </xsl:template>
5012
5028
 
@@ -5208,12 +5224,12 @@
5208
5224
 
5209
5225
  <xsl:call-template name="refine_table-header-title-style"/>
5210
5226
 
5211
- <xsl:apply-templates select="ancestor::mn:table/mn:name">
5227
+ <xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
5212
5228
  <xsl:with-param name="continued">true</xsl:with-param>
5213
5229
  <xsl:with-param name="cols-count" select="$cols-count"/>
5214
5230
  </xsl:apply-templates>
5215
5231
 
5216
- <xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5232
+ <xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5217
5233
  <fo:block role="SKIP"/>
5218
5234
  </xsl:if>
5219
5235
 
@@ -5248,7 +5264,7 @@
5248
5264
  <xsl:param name="colwidths"/>
5249
5265
  <xsl:param name="colgroup"/>
5250
5266
 
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"/>
5267
+ <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
5268
 
5253
5269
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
5254
5270
  </xsl:variable>
@@ -5289,6 +5305,12 @@
5289
5305
  </xsl:choose>
5290
5306
  </xsl:for-each>
5291
5307
 
5308
+ <xsl:for-each select="ancestor::mn:table[1]">
5309
+ <xsl:call-template name="setTableStyles">
5310
+ <xsl:with-param name="scope">table</xsl:with-param>
5311
+ </xsl:call-template>
5312
+ </xsl:for-each>
5313
+
5292
5314
  <xsl:choose>
5293
5315
  <xsl:when test="xalan:nodeset($colgroup)//mn:col">
5294
5316
  <xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
@@ -5305,10 +5327,22 @@
5305
5327
 
5306
5328
  <fo:table-body role="SKIP">
5307
5329
  <fo:table-row role="SKIP">
5330
+ <xsl:for-each select="ancestor::mn:table[1]">
5331
+ <xsl:call-template name="setTableStyles">
5332
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
5333
+ </xsl:call-template>
5334
+ </xsl:for-each>
5335
+
5308
5336
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
5309
5337
 
5310
5338
  <xsl:call-template name="refine_table-footer-cell-style"/>
5311
5339
 
5340
+ <xsl:for-each select="ancestor::mn:table[1]">
5341
+ <xsl:call-template name="setTableStyles">
5342
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
5343
+ </xsl:call-template>
5344
+ </xsl:for-each>
5345
+
5312
5346
  <xsl:call-template name="setBordersTableArray"/>
5313
5347
 
5314
5348
  <!-- fn will be processed inside 'note' processing -->
@@ -5316,7 +5350,7 @@
5316
5350
  <xsl:apply-templates select="../mn:dl"/>
5317
5351
  <xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
5318
5352
  <xsl:apply-templates select="../mn:example"/>
5319
- <xsl:apply-templates select="../mn:source"/>
5353
+ <xsl:apply-templates select="../mn:fmt-source"/>
5320
5354
 
5321
5355
  <xsl:variable name="isDisplayRowSeparator">
5322
5356
  </xsl:variable>
@@ -5505,7 +5539,12 @@
5505
5539
 
5506
5540
  <xsl:template name="setTableRowAttributes">
5507
5541
 
5508
- <xsl:call-template name="setColors"/>
5542
+ <xsl:for-each select="ancestor::mn:table[1]">
5543
+ <xsl:call-template name="setTableStyles">
5544
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
5545
+ </xsl:call-template>
5546
+ </xsl:for-each>
5547
+ <xsl:call-template name="setTableStyles"/>
5509
5548
 
5510
5549
  </xsl:template> <!-- setTableRowAttributes -->
5511
5550
  <!-- ===================== -->
@@ -5558,7 +5597,13 @@
5558
5597
  </xsl:attribute>
5559
5598
  </xsl:if>
5560
5599
  <xsl:call-template name="display-align"/>
5561
- <xsl:call-template name="setColors"/>
5600
+
5601
+ <xsl:for-each select="ancestor::mn:table[1]">
5602
+ <xsl:call-template name="setTableStyles">
5603
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
5604
+ </xsl:call-template>
5605
+ </xsl:for-each>
5606
+ <xsl:call-template name="setTableStyles"/>
5562
5607
  </xsl:template>
5563
5608
 
5564
5609
  <xsl:template name="display-align">
@@ -5574,7 +5619,8 @@
5574
5619
  </xsl:if>
5575
5620
  </xsl:template>
5576
5621
 
5577
- <xsl:template name="setColors">
5622
+ <xsl:template name="setTableStyles">
5623
+ <xsl:param name="scope">cell</xsl:param>
5578
5624
  <xsl:variable name="styles__">
5579
5625
  <xsl:call-template name="split">
5580
5626
  <xsl:with-param name="pText" select="concat(@style,';')"/>
@@ -5586,16 +5632,22 @@
5586
5632
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
5587
5633
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
5588
5634
  <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'">
5635
+ <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
5636
  <style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
5591
5637
  </xsl:if>
5638
+ <xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
5639
+ <style name="{$key}-top"><xsl:value-of select="$value"/></style>
5640
+ <style name="{$key}-right"><xsl:value-of select="$value"/></style>
5641
+ <style name="{$key}-left"><xsl:value-of select="$value"/></style>
5642
+ <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
5643
+ </xsl:if>
5592
5644
  </xsl:for-each>
5593
5645
  </xsl:variable>
5594
5646
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
5595
5647
  <xsl:for-each select="$styles/style">
5596
5648
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
5597
5649
  </xsl:for-each>
5598
- </xsl:template> <!-- setColors -->
5650
+ </xsl:template> <!-- setTableStyles -->
5599
5651
 
5600
5652
  <!-- cell in table body, footer -->
5601
5653
  <xsl:template match="*[local-name()='td']" name="td">
@@ -5659,11 +5711,11 @@
5659
5711
 
5660
5712
  <xsl:call-template name="refine_table-note-name-style"/>
5661
5713
 
5662
- <xsl:apply-templates select="mn:name"/>
5714
+ <xsl:apply-templates select="mn:fmt-name"/>
5663
5715
 
5664
5716
  </fo:inline>
5665
5717
 
5666
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5718
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5667
5719
  </fo:block>
5668
5720
  </xsl:template> <!-- table/note -->
5669
5721
 
@@ -5802,7 +5854,7 @@
5802
5854
 
5803
5855
  <!-- footnotes for table's name rendering -->
5804
5856
  <xsl:template name="table_name_fn_display">
5805
- <xsl:for-each select="mn:name//mn:fn">
5857
+ <xsl:for-each select="mn:fmt-name//mn:fn">
5806
5858
  <xsl:variable name="reference" select="@reference"/>
5807
5859
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
5808
5860
  <fo:block margin-bottom="12pt">
@@ -6459,7 +6511,7 @@
6459
6511
  </xsl:if> -->
6460
6512
 
6461
6513
  <xsl:variable name="words">
6462
- <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
6514
+ <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
6463
6515
  <word>
6464
6516
  <xsl:copy-of select="."/>
6465
6517
  </word>
@@ -6518,7 +6570,7 @@
6518
6570
  </xsl:copy>
6519
6571
  </xsl:template>
6520
6572
 
6521
- <xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
6573
+ <xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
6522
6574
 
6523
6575
  <xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
6524
6576
  <xsl:variable name="formatting_tags">
@@ -6553,7 +6605,7 @@
6553
6605
  </xsl:call-template>
6554
6606
  </xsl:template>
6555
6607
 
6556
- <xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
6608
+ <xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
6557
6609
  <xsl:variable name="link">
6558
6610
  <link_updated>
6559
6611
  <xsl:variable name="target_text">
@@ -6766,7 +6818,7 @@
6766
6818
 
6767
6819
  <xsl:call-template name="refine_multicomponent_block_style"/>
6768
6820
 
6769
- <xsl:apply-templates select="mn:name">
6821
+ <xsl:apply-templates select="mn:fmt-name">
6770
6822
  <xsl:with-param name="process">true</xsl:with-param>
6771
6823
  </xsl:apply-templates>
6772
6824
 
@@ -6949,7 +7001,7 @@
6949
7001
  </xsl:template> <!-- refine_multicomponent_block_style -->
6950
7002
 
6951
7003
  <!-- dl/name -->
6952
- <xsl:template match="mn:dl/mn:name">
7004
+ <xsl:template match="mn:dl/mn:fmt-name">
6953
7005
  <xsl:param name="process">false</xsl:param>
6954
7006
  <xsl:if test="$process = 'true'">
6955
7007
  <fo:block xsl:use-attribute-sets="dl-name-style">
@@ -7360,12 +7412,12 @@
7360
7412
  <xsl:template match="mn:appendix">
7361
7413
  <xsl:call-template name="setNamedDestination"/>
7362
7414
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
7363
- <xsl:apply-templates select="mn:title"/>
7415
+ <xsl:apply-templates select="mn:fmt-title"/>
7364
7416
  </fo:block>
7365
- <xsl:apply-templates select="node()[not(local-name()='title')]"/>
7417
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
7366
7418
  </xsl:template>
7367
7419
 
7368
- <xsl:template match="mn:appendix/mn:title" priority="2">
7420
+ <xsl:template match="mn:appendix/mn:fmt-title" priority="2">
7369
7421
  <xsl:variable name="level">
7370
7422
  <xsl:call-template name="getLevel"/>
7371
7423
  </xsl:variable>
@@ -7378,16 +7430,16 @@
7378
7430
  <xsl:template match="mn:appendix//mn:example" priority="2">
7379
7431
  <xsl:call-template name="setNamedDestination"/>
7380
7432
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
7381
- <xsl:apply-templates select="mn:name"/>
7433
+ <xsl:apply-templates select="mn:fmt-name"/>
7382
7434
  </fo:block>
7383
- <xsl:apply-templates select="node()[not(local-name()='name')]"/>
7435
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7384
7436
  </xsl:template>
7385
7437
 
7386
7438
  <xsl:attribute-set name="xref-style">
7387
7439
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
7388
7440
  </xsl:attribute-set>
7389
7441
 
7390
- <xsl:template match="mn:xref">
7442
+ <xsl:template match="mn:fmt-xref">
7391
7443
  <xsl:call-template name="insert_basic_link">
7392
7444
  <xsl:with-param name="element">
7393
7445
  <xsl:variable name="alt_text">
@@ -7407,7 +7459,7 @@
7407
7459
  </xsl:template> <!-- xref -->
7408
7460
 
7409
7461
  <!-- 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="."/>
7462
+ <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
7463
  </xsl:template>
7412
7464
 
7413
7465
  <xsl:attribute-set name="eref-style">
@@ -7440,7 +7492,7 @@
7440
7492
  <!-- ====== -->
7441
7493
  <!-- eref -->
7442
7494
  <!-- ====== -->
7443
- <xsl:template match="mn:eref" name="eref">
7495
+ <xsl:template match="mn:fmt-eref" name="eref">
7444
7496
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
7445
7497
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
7446
7498
  <xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
@@ -7581,28 +7633,28 @@
7581
7633
 
7582
7634
  <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7583
7635
 
7584
- <xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
7636
+ <xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
7585
7637
 
7586
7638
  <xsl:call-template name="refine_note-name-style"/>
7587
7639
 
7588
7640
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7589
7641
  <!-- <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]">
7642
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7591
7643
  <xsl:call-template name="append_add-style"/>
7592
7644
  </xsl:if>
7593
7645
 
7594
7646
  <!-- 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)]">
7647
+ <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)]">
7648
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
7597
7649
  <xsl:with-param name="skip">false</xsl:with-param>
7598
7650
  </xsl:apply-templates>
7599
7651
  </xsl:if>
7600
7652
 
7601
- <xsl:apply-templates select="mn:name"/>
7653
+ <xsl:apply-templates select="mn:fmt-name"/>
7602
7654
 
7603
7655
  </fo:inline>
7604
7656
 
7605
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7657
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7606
7658
  </fo:block>
7607
7659
  </fo:block-container>
7608
7660
  </fo:block-container>
@@ -7641,19 +7693,19 @@
7641
7693
 
7642
7694
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7643
7695
  <!-- <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]">
7696
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7645
7697
  <xsl:call-template name="append_add-style"/>
7646
7698
  </xsl:if>
7647
7699
 
7648
- <xsl:apply-templates select="mn:name"/>
7700
+ <xsl:apply-templates select="mn:fmt-name"/>
7649
7701
 
7650
7702
  </fo:inline>
7651
7703
 
7652
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7704
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7653
7705
  </fo:block>
7654
7706
  </xsl:template>
7655
7707
 
7656
- <xsl:template match="mn:note/mn:name">
7708
+ <xsl:template match="mn:note/mn:fmt-name">
7657
7709
  <xsl:param name="sfx"/>
7658
7710
  <xsl:variable name="suffix">
7659
7711
  <xsl:choose>
@@ -7680,7 +7732,7 @@
7680
7732
  </xsl:if>
7681
7733
  </xsl:template>
7682
7734
 
7683
- <xsl:template match="mn:termnote/mn:name">
7735
+ <xsl:template match="mn:termnote/mn:fmt-name">
7684
7736
  <xsl:param name="sfx"/>
7685
7737
  <xsl:variable name="suffix">
7686
7738
  <xsl:choose>
@@ -7763,15 +7815,15 @@
7763
7815
 
7764
7816
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7765
7817
  <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 -->
7818
+ <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
7819
  </fo:block>
7768
7820
  </fo:block-container>
7769
7821
  </fo:block-container>
7770
- <xsl:if test="mn:author or mn:source or mn:attribution">
7822
+ <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
7771
7823
  <fo:block xsl:use-attribute-sets="quote-source-style">
7772
7824
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
7773
7825
  <xsl:apply-templates select="mn:author"/>
7774
- <xsl:apply-templates select="mn:source"/>
7826
+ <xsl:apply-templates select="mn:fmt-source"/>
7775
7827
  <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
7776
7828
  <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
7777
7829
  </fo:block>
@@ -7781,17 +7833,32 @@
7781
7833
  </fo:block-container>
7782
7834
  </xsl:template>
7783
7835
 
7784
- <xsl:template match="mn:source">
7836
+ <xsl:template match="mn:fmt-source">
7785
7837
  <xsl:if test="../mn:author">
7786
7838
  <xsl:text>, </xsl:text>
7787
7839
  </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>
7840
+ <xsl:choose>
7841
+ <xsl:when test="not(parent::quote)">
7842
+ <fo:block>
7843
+ <xsl:call-template name="insert_basic_link">
7844
+ <xsl:with-param name="element">
7845
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
7846
+ <xsl:apply-templates/>
7847
+ </fo:basic-link>
7848
+ </xsl:with-param>
7849
+ </xsl:call-template>
7850
+ </fo:block>
7851
+ </xsl:when>
7852
+ <xsl:otherwise>
7853
+ <xsl:call-template name="insert_basic_link">
7854
+ <xsl:with-param name="element">
7855
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
7856
+ <xsl:apply-templates/>
7857
+ </fo:basic-link>
7858
+ </xsl:with-param>
7859
+ </xsl:call-template>
7860
+ </xsl:otherwise>
7861
+ </xsl:choose>
7795
7862
  </xsl:template>
7796
7863
 
7797
7864
  <xsl:template match="mn:author">
@@ -7868,7 +7935,7 @@
7868
7935
  <ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
7869
7936
  <xsl:choose>
7870
7937
  <!-- skip figure/name/fn -->
7871
- <xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
7938
+ <xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
7872
7939
  <xsl:otherwise>
7873
7940
  <xsl:element name="figure" namespace="{$namespace_full}">
7874
7941
  <xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
@@ -8064,17 +8131,17 @@
8064
8131
 
8065
8132
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
8066
8133
 
8067
- <xsl:for-each select="mn:name"> <!-- set context -->
8134
+ <xsl:for-each select="mn:fmt-name"> <!-- set context -->
8068
8135
  <xsl:call-template name="setIDforNamedDestination"/>
8069
8136
  </xsl:for-each>
8070
8137
 
8071
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
8138
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
8072
8139
  </fo:block>
8073
8140
 
8074
8141
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
8075
8142
  <xsl:call-template name="showFigureKey"/>
8076
8143
  </xsl:if>
8077
- <xsl:apply-templates select="mn:name"/> <!-- show figure's name AFTER image -->
8144
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
8078
8145
 
8079
8146
  </fo:block-container>
8080
8147
  </xsl:template>
@@ -8100,9 +8167,9 @@
8100
8167
  <xsl:template match="mn:figure[@class = 'pseudocode']">
8101
8168
  <xsl:call-template name="setNamedDestination"/>
8102
8169
  <fo:block id="{@id}">
8103
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
8170
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8104
8171
  </fo:block>
8105
- <xsl:apply-templates select="mn:name"/>
8172
+ <xsl:apply-templates select="mn:fmt-name"/>
8106
8173
  </xsl:template>
8107
8174
 
8108
8175
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
@@ -8113,7 +8180,7 @@
8113
8180
 
8114
8181
  <!-- SOURCE: ... -->
8115
8182
  <!-- figure/source -->
8116
- <xsl:template match="mn:figure/mn:source" priority="2">
8183
+ <xsl:template match="mn:figure/mn:fmt-source" priority="2">
8117
8184
  <xsl:call-template name="termsource"/>
8118
8185
  </xsl:template>
8119
8186
 
@@ -8123,7 +8190,7 @@
8123
8190
  <xsl:variable name="isAdded" select="../@added"/>
8124
8191
  <xsl:variable name="isDeleted" select="../@deleted"/>
8125
8192
  <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) -->
8193
+ <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
8194
  <fo:inline padding-left="1mm" padding-right="1mm">
8128
8195
  <xsl:if test="not(parent::mn:figure) or parent::mn:p">
8129
8196
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -8144,13 +8211,26 @@
8144
8211
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
8145
8212
 
8146
8213
  <xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
8147
- <xsl:attribute name="width">100%</xsl:attribute>
8214
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
8215
+ <xsl:choose>
8216
+ <xsl:when test="@width and not(@height)">
8217
+ <xsl:attribute name="width">100%</xsl:attribute>
8218
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8219
+ </xsl:when>
8220
+ <xsl:when test="@height and not(@width)">
8221
+ <xsl:attribute name="height">100%</xsl:attribute>
8222
+ <xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
8223
+ </xsl:when>
8224
+ <xsl:when test="not(@width) and not(@height)">
8225
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8226
+ </xsl:when>
8227
+ </xsl:choose>
8228
+
8148
8229
  <xsl:if test="normalize-space($logo_width) != ''">
8149
8230
  <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
8150
8231
  </xsl:if>
8151
- <xsl:attribute name="content-height">100%</xsl:attribute>
8152
8232
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8153
- <xsl:attribute name="scaling">uniform</xsl:attribute>
8233
+ <xsl:attribute name="vertical-align">top</xsl:attribute>
8154
8234
  </xsl:if>
8155
8235
 
8156
8236
  <xsl:variable name="width">
@@ -8439,7 +8519,7 @@
8439
8519
  <xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
8440
8520
  <xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
8441
8521
 
8442
- <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
8522
+ <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
8443
8523
  <xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
8444
8524
  <xsl:param name="name"/>
8445
8525
 
@@ -8449,8 +8529,8 @@
8449
8529
 
8450
8530
  <xsl:variable name="alt-text">
8451
8531
  <xsl:choose>
8452
- <xsl:when test="normalize-space(../mn:name) != ''">
8453
- <xsl:value-of select="../mn:name"/>
8532
+ <xsl:when test="normalize-space(../mn:fmt-name) != ''">
8533
+ <xsl:value-of select="../mn:fmt-name"/>
8454
8534
  </xsl:when>
8455
8535
  <xsl:when test="normalize-space($name) != ''">
8456
8536
  <xsl:value-of select="$name"/>
@@ -8459,7 +8539,7 @@
8459
8539
  </xsl:choose>
8460
8540
  </xsl:variable>
8461
8541
 
8462
- <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
8542
+ <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
8463
8543
 
8464
8544
  <xsl:choose>
8465
8545
  <xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
@@ -8508,9 +8588,9 @@
8508
8588
  <fo:table-cell column-number="2">
8509
8589
  <fo:block>
8510
8590
  <fo:block-container width="{$width_scale}px" height="{$height_scale}px">
8511
- <xsl:if test="../mn:name/mn:bookmark">
8591
+ <xsl:if test="../mn:fmt-name/mn:bookmark">
8512
8592
  <fo:block line-height="0" font-size="0">
8513
- <xsl:for-each select="../mn:name/mn:bookmark">
8593
+ <xsl:for-each select="../mn:fmt-name/mn:bookmark">
8514
8594
  <xsl:call-template name="bookmark"/>
8515
8595
  </xsl:for-each>
8516
8596
  </fo:block>
@@ -8750,7 +8830,7 @@
8750
8830
 
8751
8831
  <!-- image with svg and emf -->
8752
8832
  <xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
8753
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
8833
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
8754
8834
  <xsl:for-each select="*[local-name() = 'svg']">
8755
8835
  <xsl:call-template name="image_svg">
8756
8836
  <xsl:with-param name="name" select="$name"/>
@@ -8767,7 +8847,7 @@
8767
8847
 
8768
8848
  <xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
8769
8849
  <xsl:variable name="svg_content" select="document(@src)"/>
8770
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
8850
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
8771
8851
  <xsl:for-each select="xalan:nodeset($svg_content)/node()">
8772
8852
  <xsl:call-template name="image_svg">
8773
8853
  <xsl:with-param name="name" select="$name"/>
@@ -8890,7 +8970,7 @@
8890
8970
  <xsl:template match="mn:emf"/>
8891
8971
 
8892
8972
  <!-- figure/name -->
8893
- <xsl:template match="mn:figure/mn:name | mn:image/mn:name">
8973
+ <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
8894
8974
  <xsl:if test="normalize-space() != ''">
8895
8975
  <fo:block xsl:use-attribute-sets="figure-name-style">
8896
8976
 
@@ -8962,25 +9042,25 @@
8962
9042
  <fo:block-container margin-left="0mm" role="SKIP">
8963
9043
  <xsl:call-template name="setNamedDestination"/>
8964
9044
  <fo:block id="{@id}">
8965
- <xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
9045
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
8966
9046
  </fo:block>
8967
9047
  </fo:block-container>
8968
9048
  </fo:block-container>
8969
9049
  </xsl:template>
8970
9050
 
8971
- <xsl:template match="mn:formula/mn:dt/mn:stem">
9051
+ <xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
8972
9052
  <fo:inline>
8973
9053
  <xsl:apply-templates/>
8974
9054
  </fo:inline>
8975
9055
  </xsl:template>
8976
9056
 
8977
- <xsl:template match="mn:admitted/mn:stem">
9057
+ <xsl:template match="mn:fmt-admitted/mn:fmt-stem">
8978
9058
  <fo:inline>
8979
9059
  <xsl:apply-templates/>
8980
9060
  </fo:inline>
8981
9061
  </xsl:template>
8982
9062
 
8983
- <xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
9063
+ <xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
8984
9064
  <!-- https://github.com/metanorma/isodoc/issues/607
8985
9065
  <xsl:if test="normalize-space() != ''">
8986
9066
  <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
@@ -8989,7 +9069,7 @@
8989
9069
  </xsl:template>
8990
9070
 
8991
9071
  <!-- stem inside formula with name (with formula's number) -->
8992
- <xsl:template match="mn:formula[mn:name]/mn:stem">
9072
+ <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
8993
9073
  <fo:block xsl:use-attribute-sets="formula-style">
8994
9074
 
8995
9075
  <fo:table table-layout="fixed" width="100%">
@@ -9009,13 +9089,13 @@
9009
9089
 
9010
9090
  <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
9011
9091
 
9012
- <xsl:for-each select="../mn:name">
9092
+ <xsl:for-each select="../mn:fmt-name">
9013
9093
  <xsl:call-template name="setIDforNamedDestination"/>
9014
9094
  </xsl:for-each>
9015
9095
 
9016
9096
  <xsl:call-template name="refine_formula-stem-number-style"/>
9017
9097
 
9018
- <xsl:apply-templates select="../mn:name"/>
9098
+ <xsl:apply-templates select="../mn:fmt-name"/>
9019
9099
  </fo:block>
9020
9100
  </fo:table-cell>
9021
9101
  </fo:table-row>
@@ -9025,7 +9105,7 @@
9025
9105
  </xsl:template>
9026
9106
 
9027
9107
  <!-- stem inside formula without name (without formula's number) -->
9028
- <xsl:template match="mn:formula[not(mn:name)]/mn:stem">
9108
+ <xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
9029
9109
  <fo:block xsl:use-attribute-sets="formula-style">
9030
9110
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
9031
9111
  <xsl:apply-templates/>
@@ -9379,7 +9459,7 @@
9379
9459
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
9380
9460
  <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
9381
9461
  -->
9382
- <xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
9462
+ <xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
9383
9463
  <fo:inline xsl:use-attribute-sets="mathml-style">
9384
9464
 
9385
9465
  <xsl:call-template name="refine_mathml-style"/>
@@ -9645,7 +9725,7 @@
9645
9725
 
9646
9726
  <xsl:template match="mn:ul | mn:ol" mode="list" name="list">
9647
9727
 
9648
- <xsl:apply-templates select="mn:name">
9728
+ <xsl:apply-templates select="mn:fmt-name">
9649
9729
  <xsl:with-param name="process">true</xsl:with-param>
9650
9730
  </xsl:apply-templates>
9651
9731
 
@@ -9691,7 +9771,7 @@
9691
9771
 
9692
9772
  <xsl:call-template name="refine_list-style"/>
9693
9773
 
9694
- <xsl:if test="mn:name">
9774
+ <xsl:if test="mn:fmt-name">
9695
9775
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
9696
9776
  </xsl:if>
9697
9777
 
@@ -9706,7 +9786,7 @@
9706
9786
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
9707
9787
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
9708
9788
 
9709
- <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
9789
+ <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
9710
9790
  <xsl:param name="process">false</xsl:param>
9711
9791
  <xsl:if test="$process = 'true'">
9712
9792
  <fo:block xsl:use-attribute-sets="list-name-style">
@@ -9836,7 +9916,7 @@
9836
9916
  -->
9837
9917
  <!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
9838
9918
  <!-- 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">
9919
+ <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
9920
  <xsl:param name="footnote_body_from_table">false</xsl:param>
9841
9921
 
9842
9922
  <!-- list of unique footnotes -->
@@ -9960,7 +10040,7 @@
9960
10040
  <!-- commented:
9961
10041
  .//mn:bibitem[ancestor::mn:references]/mn:note |
9962
10042
  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])]">
10043
+ <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
10044
  <!-- copy unique fn -->
9965
10045
  <fn gen_id="{generate-id(.)}">
9966
10046
  <xsl:copy-of select="@*"/>
@@ -10038,7 +10118,7 @@
10038
10118
  <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
10039
10119
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10040
10120
  <fo:block>
10041
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
10121
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
10042
10122
  </fo:block>
10043
10123
  </fo:block-container>
10044
10124
  </fo:block-container>
@@ -10064,7 +10144,7 @@
10064
10144
  </xsl:otherwise>
10065
10145
  </xsl:choose> -->
10066
10146
  <xsl:variable name="name">
10067
- <xsl:apply-templates select="mn:name"/>
10147
+ <xsl:apply-templates select="mn:fmt-name"/>
10068
10148
  </xsl:variable>
10069
10149
  <xsl:copy-of select="$name"/>
10070
10150
  <xsl:if test="normalize-space($name) != ''">
@@ -10072,7 +10152,7 @@
10072
10152
  </xsl:if>
10073
10153
  </xsl:template>
10074
10154
 
10075
- <xsl:template match="mn:admonition/mn:name">
10155
+ <xsl:template match="mn:admonition/mn:fmt-name">
10076
10156
  <xsl:apply-templates/>
10077
10157
  </xsl:template>
10078
10158
 
@@ -10199,10 +10279,10 @@
10199
10279
  <xsl:call-template name="setNamedDestination"/>
10200
10280
  <fo:block id="{@id}"/>
10201
10281
 
10202
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
10282
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
10203
10283
 
10204
10284
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
10205
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
10285
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
10206
10286
  </fo:block>
10207
10287
  </xsl:template> <!-- references -->
10208
10288
 
@@ -10502,7 +10582,8 @@
10502
10582
  </xsl:copy>
10503
10583
  </xsl:template>
10504
10584
 
10505
- <xsl:template match="mn:xref" mode="index_add_id">
10585
+ <xsl:template match="mn:xref" mode="index_add_id"/>
10586
+ <xsl:template match="mn:fmt-xref" mode="index_add_id">
10506
10587
  <xsl:param name="docid"/>
10507
10588
  <xsl:variable name="id">
10508
10589
  <xsl:call-template name="generateIndexXrefId">
@@ -10544,7 +10625,7 @@
10544
10625
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
10545
10626
  <xsl:copy>
10546
10627
  <xsl:apply-templates select="@*" mode="index_update"/>
10547
- <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
10628
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
10548
10629
  </xsl:copy>
10549
10630
  </xsl:template>
10550
10631
 
@@ -10565,11 +10646,11 @@
10565
10646
  <xsl:value-of select="."/>
10566
10647
  <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
10567
10648
  </xsl:when>
10568
- <xsl:when test="self::* and local-name(.) = 'xref'">
10649
+ <xsl:when test="self::* and local-name(.) = 'fmt-xref'">
10569
10650
  <xsl:variable name="id" select="@id"/>
10570
10651
 
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"/>
10652
+ <xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
10653
+ <xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
10573
10654
 
10574
10655
  <xsl:variable name="pages_">
10575
10656
  <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
@@ -10665,18 +10746,18 @@
10665
10746
  <xsl:variable name="item_number">
10666
10747
  <xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
10667
10748
  </xsl:variable>
10668
- <xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
10749
+ <xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
10669
10750
  <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
10670
10751
  </xsl:template>
10671
10752
 
10672
- <xsl:template match="mn:indexsect/mn:title" priority="4">
10753
+ <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
10673
10754
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
10674
10755
  <!-- Index -->
10675
10756
  <xsl:apply-templates/>
10676
10757
  </fo:block>
10677
10758
  </xsl:template>
10678
10759
 
10679
- <xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
10760
+ <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
10680
10761
  <!-- Letter A, B, C, ... -->
10681
10762
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
10682
10763
  <xsl:apply-templates/>
@@ -10717,12 +10798,12 @@
10717
10798
  <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
10799
  <bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
10719
10800
  <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]">
10801
+ <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
10802
  <!-- skip here, see the template 'fmt-review-start' -->
10722
10803
  </xsl:when>
10723
10804
  <xsl:otherwise>
10724
10805
  <!-- <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>
10806
+ <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
10807
  <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
10727
10808
  <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
10728
10809
  </xsl:otherwise>
@@ -10886,7 +10967,7 @@
10886
10967
 
10887
10968
  <xsl:template name="processTables_Contents">
10888
10969
  <mnx:tables>
10889
- <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
10970
+ <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
10890
10971
  <xsl:choose>
10891
10972
  <xsl:when test="mn:fmt-name">
10892
10973
  <xsl:variable name="fmt_name">
@@ -10908,7 +10989,7 @@
10908
10989
 
10909
10990
  <xsl:template name="processFigures_Contents">
10910
10991
  <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) != '']">
10992
+ <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
10993
  <xsl:choose>
10913
10994
  <xsl:when test="mn:fmt-name">
10914
10995
  <xsl:variable name="fmt_name">
@@ -10937,7 +11018,7 @@
10937
11018
 
10938
11019
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
10939
11020
 
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">
11021
+ <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
11022
  <xsl:apply-templates mode="contents"/>
10942
11023
  <xsl:text> </xsl:text>
10943
11024
  </xsl:template>
@@ -10949,7 +11030,7 @@
10949
11030
  </xsl:if>
10950
11031
  </xsl:template>
10951
11032
 
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">
11033
+ <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
11034
  <xsl:apply-templates mode="bookmarks"/>
10954
11035
  <xsl:text> </xsl:text>
10955
11036
  </xsl:template>
@@ -10960,7 +11041,7 @@
10960
11041
  </xsl:if>
10961
11042
  </xsl:template>
10962
11043
 
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">
11044
+ <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
11045
  <xsl:value-of select="."/>
10965
11046
  </xsl:template>
10966
11047
 
@@ -10970,7 +11051,7 @@
10970
11051
  </xsl:if>
10971
11052
  </xsl:template>
10972
11053
 
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">
11054
+ <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
11055
  <xsl:value-of select="."/>
10975
11056
  </xsl:template>
10976
11057
 
@@ -11431,7 +11512,7 @@
11431
11512
  <xsl:value-of select="."/>
11432
11513
  </xsl:template>
11433
11514
 
11434
- <xsl:template match="mn:review" mode="contents_item"/>
11515
+ <xsl:template match="mn:annotation" mode="contents_item"/>
11435
11516
 
11436
11517
  <xsl:template match="mn:tab" mode="contents_item">
11437
11518
  <xsl:text> </xsl:text>
@@ -11586,7 +11667,7 @@
11586
11667
  <xsl:apply-templates/>
11587
11668
  </xsl:template>
11588
11669
 
11589
- <xsl:template match="mn:toc//mn:xref" priority="3">
11670
+ <xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
11590
11671
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11591
11672
  <!-- New format: one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11592
11673
  <!-- <test><xsl:copy-of select="."/></test> -->
@@ -11654,8 +11735,8 @@
11654
11735
  <xsl:apply-templates mode="toc_table_width"/>
11655
11736
  </xsl:template>
11656
11737
 
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"/>
11738
+ <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
11739
+ <xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
11659
11740
 
11660
11741
  <xsl:template match="mn:li" mode="toc_table_width">
11661
11742
  <mn:tr>
@@ -11663,7 +11744,7 @@
11663
11744
  </mn:tr>
11664
11745
  </xsl:template>
11665
11746
 
11666
- <xsl:template match="mn:xref" mode="toc_table_width">
11747
+ <xsl:template match="mn:fmt-xref" mode="toc_table_width">
11667
11748
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11668
11749
  <!-- New format - one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11669
11750
  <xsl:for-each select="mn:tab">
@@ -11737,10 +11818,10 @@
11737
11818
 
11738
11819
  </xsl:template> <!-- tab -->
11739
11820
 
11740
- <xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
11741
- <xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
11821
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
11822
+ <xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
11742
11823
 
11743
- <xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
11824
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
11744
11825
  <xsl:attribute name="padding-right">4mm</xsl:attribute>
11745
11826
  </xsl:template>
11746
11827
 
@@ -11755,13 +11836,13 @@
11755
11836
  </xsl:template>
11756
11837
 
11757
11838
  <xsl:variable name="reviews_">
11758
- <xsl:for-each select="//mn:review[not(parent::mn:review-container)][@from]">
11839
+ <xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
11759
11840
  <xsl:copy>
11760
11841
  <xsl:copy-of select="@from"/>
11761
11842
  <xsl:copy-of select="@id"/>
11762
11843
  </xsl:copy>
11763
11844
  </xsl:for-each>
11764
- <xsl:for-each select="//mn:fmt-review-start[@source]">
11845
+ <xsl:for-each select="//mn:fmt-annotation-start[@source]">
11765
11846
  <xsl:copy>
11766
11847
  <xsl:copy-of select="@source"/>
11767
11848
  <xsl:copy-of select="@id"/>
@@ -11775,7 +11856,7 @@
11775
11856
  <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
11776
11857
  <xsl:variable name="curr_id" select="@id"/>
11777
11858
  <!-- <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] -->
11859
+ <xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
11779
11860
  <xsl:variable name="review_id" select="normalize-space(@id)"/>
11780
11861
  <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
11781
11862
  <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 +11871,7 @@
11790
11871
 
11791
11872
  <!-- document text (not figures, or tables) footnotes -->
11792
11873
  <xsl:variable name="reviews_container_">
11793
- <xsl:for-each select="//mn:review-container/mn:fmt-review-body">
11874
+ <xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
11794
11875
  <xsl:variable name="update_xml_step1">
11795
11876
  <xsl:apply-templates select="." mode="update_xml_step1"/>
11796
11877
  </xsl:variable>
@@ -11799,10 +11880,10 @@
11799
11880
  </xsl:variable>
11800
11881
  <xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
11801
11882
 
11802
- <xsl:template match="mn:review-container"/>
11883
+ <xsl:template match="mn:annotation-container"/>
11803
11884
 
11804
11885
  <!-- 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 -->
11886
+ <xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
11806
11887
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
11807
11888
  <xsl:if test="$isGenerateTableIF = 'false'">
11808
11889
  <xsl:choose>
@@ -11822,7 +11903,7 @@
11822
11903
  </xsl:template>
11823
11904
 
11824
11905
  <!-- 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 -->
11906
+ <xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
11826
11907
  <!-- comment 2019-11-29 -->
11827
11908
  <!-- <fo:block font-weight="bold">Review:</fo:block>
11828
11909
  <xsl:apply-templates /> -->
@@ -11878,7 +11959,7 @@
11878
11959
  </xsl:template>
11879
11960
 
11880
11961
  <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
11881
- <xsl:template match="mn:review[@type = 'other']"/>
11962
+ <xsl:template match="mn:annotation[@type = 'other']"/>
11882
11963
 
11883
11964
  <!-- ============ -->
11884
11965
  <!-- errata -->
@@ -12271,9 +12352,12 @@
12271
12352
  <xsl:choose>
12272
12353
  <xsl:when test="mn:fmt-title">
12273
12354
  <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)]"/>
12355
+ <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
12275
12356
  </xsl:variable>
12276
12357
  <xsl:value-of select="normalize-space($fmt_title_section)"/>
12358
+ <xsl:if test="normalize-space($fmt_title_section) = ''">
12359
+ <xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
12360
+ </xsl:if>
12277
12361
  </xsl:when>
12278
12362
  <xsl:otherwise>
12279
12363
  <xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
@@ -12286,6 +12370,9 @@
12286
12370
  <xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
12287
12371
  <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
12288
12372
  </xsl:when>
12373
+ <xsl:when test="mn:fmt-title/mn:tab">
12374
+ <xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
12375
+ </xsl:when>
12289
12376
  <xsl:when test="mn:fmt-title">
12290
12377
  <xsl:copy-of select="mn:fmt-title/node()"/>
12291
12378
  </xsl:when>
@@ -12427,10 +12514,10 @@
12427
12514
 
12428
12515
  </fo:block>
12429
12516
 
12430
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
12517
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
12431
12518
 
12432
12519
  <fo:block>
12433
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
12520
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
12434
12521
  </fo:block>
12435
12522
  </xsl:otherwise>
12436
12523
  </xsl:choose>
@@ -12439,7 +12526,7 @@
12439
12526
  <xsl:template name="refine_annex_style">
12440
12527
  </xsl:template>
12441
12528
 
12442
- <xsl:template match="mn:name/text()">
12529
+ <xsl:template match="mn:name/text() | mn:fmt-name/text()">
12443
12530
  <!-- 0xA0 to space replacement -->
12444
12531
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
12445
12532
  </xsl:template>
@@ -12495,28 +12582,28 @@
12495
12582
  <xsl:template match="mn:amend"/>
12496
12583
 
12497
12584
  <!-- fmt-title renamed to title in update_xml_step1 -->
12498
- <xsl:template match="mn:fmt-title"/>
12585
+ <!-- <xsl:template match="mn:fmt-title" /> -->
12499
12586
 
12500
12587
  <!-- fmt-name renamed to name in update_xml_step1 -->
12501
- <xsl:template match="mn:fmt-name"/>
12588
+ <!-- <xsl:template match="mn:fmt-name" /> -->
12502
12589
 
12503
12590
  <!-- fmt-preferred renamed to preferred in update_xml_step1 -->
12504
- <xsl:template match="mn:fmt-preferred"/>
12591
+ <!-- <xsl:template match="mn:fmt-preferred" /> -->
12505
12592
 
12506
12593
  <!-- fmt-admitted renamed to admitted in update_xml_step1 -->
12507
- <xsl:template match="mn:fmt-admitted"/>
12594
+ <!-- <xsl:template match="mn:fmt-admitted" /> -->
12508
12595
 
12509
12596
  <!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
12510
- <xsl:template match="mn:fmt-deprecates"/>
12597
+ <!-- <xsl:template match="mn:fmt-deprecates" /> -->
12511
12598
 
12512
12599
  <!-- fmt-definition renamed to definition in update_xml_step1 -->
12513
- <xsl:template match="mn:fmt-definition"/>
12600
+ <!-- <xsl:template match="mn:fmt-definition" /> -->
12514
12601
 
12515
12602
  <!-- fmt-termsource renamed to termsource in update_xml_step1 -->
12516
- <xsl:template match="mn:fmt-termsource"/>
12603
+ <!-- <xsl:template match="mn:fmt-termsource" /> -->
12517
12604
 
12518
12605
  <!-- fmt-source renamed to source in update_xml_step1 -->
12519
- <xsl:template match="mn:fmt-source"/>
12606
+ <!-- <xsl:template match="mn:fmt-source" /> -->
12520
12607
 
12521
12608
  <xsl:template match="mn:semx">
12522
12609
  <xsl:apply-templates/>
@@ -12961,12 +13048,12 @@
12961
13048
  <xsl:when test="ancestor::mn:preface">
12962
13049
  <xsl:value-of select="$level_total - 2"/>
12963
13050
  </xsl:when>
12964
- <xsl:when test="ancestor::mn:sections and self::mn:title">
13051
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
12965
13052
  <!-- determine 'depth' depends on upper clause with title/@depth -->
12966
13053
  <!-- <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"/>
13054
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
12968
13055
  <!-- <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::*)"/>
13056
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
12970
13057
  <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
12971
13058
  <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
12972
13059
  <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
@@ -12982,8 +13069,8 @@
12982
13069
  </xsl:otherwise>
12983
13070
  </xsl:choose>
12984
13071
  </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)"/>
13072
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
13073
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
12987
13074
  <xsl:choose>
12988
13075
  <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
12989
13076
  <xsl:value-of select="number($upper_terms_depth + 1)"/>
@@ -12994,7 +13081,7 @@
12994
13081
  </xsl:choose>
12995
13082
  </xsl:when>
12996
13083
  <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)"/>
13084
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
12998
13085
  <xsl:choose>
12999
13086
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13000
13087
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -13010,8 +13097,8 @@
13010
13097
  <xsl:when test="parent::mn:annex">
13011
13098
  <xsl:value-of select="$level_total - 1"/>
13012
13099
  </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)"/>
13100
+ <xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
13101
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
13015
13102
  <xsl:choose>
13016
13103
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13017
13104
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -13044,7 +13131,7 @@
13044
13131
  </xsl:when>
13045
13132
  <xsl:otherwise>
13046
13133
  <xsl:variable name="title_level_">
13047
- <xsl:for-each select="../preceding-sibling::mn:title[1]">
13134
+ <xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
13048
13135
  <xsl:call-template name="getLevel"/>
13049
13136
  </xsl:for-each>
13050
13137
  </xsl:variable>
@@ -13121,15 +13208,17 @@
13121
13208
  </xsl:template>
13122
13209
 
13123
13210
  <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}"/>
13211
+ <xsl:if test="$isGenerateTableIF = 'false'">
13212
+ <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
13213
+ <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'">
13214
+ <fox:destination internal-destination="{@id}"/>
13131
13215
  </xsl:if>
13132
- </xsl:for-each>
13216
+ <xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
13217
+ <xsl:if test="@named_dest">
13218
+ <fox:destination internal-destination="{@named_dest}"/>
13219
+ </xsl:if>
13220
+ </xsl:for-each>
13221
+ </xsl:if>
13133
13222
  </xsl:template>
13134
13223
 
13135
13224
  <xsl:template name="add-letter-spacing">
@@ -13477,7 +13566,7 @@
13477
13566
  </xsl:when>
13478
13567
  <xsl:otherwise>
13479
13568
  <!-- 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())">
13569
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
13481
13570
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
13482
13571
  </xsl:if>
13483
13572
  <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 +13600,7 @@
13511
13600
  </fo:block>
13512
13601
  </fo:block-container>
13513
13602
  </fo:inline-container>
13514
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
13603
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
13515
13604
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
13516
13605
  </xsl:if>
13517
13606
  </xsl:otherwise>