metanorma-ogc 2.7.9 → 2.7.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="no"/>
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
 
@@ -80,6 +80,29 @@
80
80
  </xsl:variable>
81
81
  <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
82
82
 
83
+ <xsl:template name="layout-master-set">
84
+ <fo:layout-master-set>
85
+
86
+ <!-- Document pages -->
87
+ <fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
88
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
89
+ <fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
90
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm" precedence="true"/>
91
+ <fo:region-start region-name="left" extent="{$marginLeftRight1}mm"/>
92
+ <fo:region-end region-name="right" extent="{$marginLeftRight2}mm"/>
93
+ </fo:simple-page-master>
94
+
95
+ <fo:simple-page-master master-name="document-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
96
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
97
+ <fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
98
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm" precedence="true"/>
99
+ <fo:region-start region-name="left" extent="{$marginLeftRight1}mm"/>
100
+ <fo:region-end region-name="right" extent="{$marginLeftRight2}mm"/>
101
+ </fo:simple-page-master>
102
+
103
+ </fo:layout-master-set>
104
+ </xsl:template> <!-- END: layout-master-set -->
105
+
83
106
  <xsl:template match="/">
84
107
 
85
108
  <fo:root xml:lang="{$lang}">
@@ -89,26 +112,8 @@
89
112
  <xsl:call-template name="insertRootStyle">
90
113
  <xsl:with-param name="root-style" select="$root-style"/>
91
114
  </xsl:call-template>
92
- <fo:layout-master-set>
93
-
94
- <!-- Document pages -->
95
- <fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
96
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
97
- <fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
98
- <fo:region-after region-name="footer" extent="{$marginBottom}mm" precedence="true"/>
99
- <fo:region-start region-name="left" extent="{$marginLeftRight1}mm"/>
100
- <fo:region-end region-name="right" extent="{$marginLeftRight2}mm"/>
101
- </fo:simple-page-master>
102
-
103
- <fo:simple-page-master master-name="document-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
104
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
105
- <fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
106
- <fo:region-after region-name="footer" extent="{$marginBottom}mm" precedence="true"/>
107
- <fo:region-start region-name="left" extent="{$marginLeftRight1}mm"/>
108
- <fo:region-end region-name="right" extent="{$marginLeftRight2}mm"/>
109
- </fo:simple-page-master>
110
-
111
- </fo:layout-master-set>
115
+
116
+ <xsl:call-template name="layout-master-set"/>
112
117
 
113
118
  <fo:declarations>
114
119
  <xsl:call-template name="addPDFUAmeta"/>
@@ -118,7 +123,7 @@
118
123
  <xsl:with-param name="contents" select="$contents"/>
119
124
  <xsl:with-param name="contents_addon">
120
125
  <xsl:variable name="list_of_tables_figures_">
121
- <xsl:for-each select="//mn:table[@id and mn:name] | //mn:figure[@id and mn:name]">
126
+ <xsl:for-each select="//mn:table[@id and mn:fmt-name] | //mn:figure[@id and mn:fmt-name]">
122
127
  <table_figure id="{@id}"><xsl:apply-templates select="mn:fmt-name" mode="bookmarks"/></table_figure>
123
128
  </xsl:for-each>
124
129
  </xsl:variable>
@@ -147,83 +152,7 @@
147
152
  </xsl:with-param>
148
153
  </xsl:call-template>
149
154
 
150
- <!-- Cover Page -->
151
- <fo:page-sequence master-reference="document" force-page-count="no-force">
152
- <xsl:call-template name="insertHeaderFooter"/>
153
- <fo:flow flow-name="xsl-region-body">
154
-
155
- <fo:block-container margin-left="-12mm" margin-right="-9mm">
156
- <fo:block-container margin-left="0mm" margin-right="0mm">
157
- <fo:block font-size="36pt" background-color="{$color}" color="white" margin-left="2.5mm" padding-top="1mm" padding-left="1mm" role="H1">
158
- <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title/node()"/>
159
- </fo:block>
160
- </fo:block-container>
161
- </fo:block-container>
162
-
163
- <!-- <fo:block font-family="Lato" font-weight="300" font-size="14pt" font-style="italic" margin-top="6pt" color="rgb(21, 43, 77)">
164
- <xsl:text>Additional context, inspirational quote, etc. fits into this subheading area</xsl:text>
165
- </fo:block> -->
166
-
167
- <fo:block text-align="right" font-size="10pt" margin-top="12pt" margin-bottom="24pt">
168
- <fo:block margin-top="6pt">Submission Date: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on"/></fo:block>
169
- <fo:block margin-top="6pt">Approval Date: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on"/></fo:block>
170
- <fo:block margin-top="6pt">Publication Date: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']/mn:on"/></fo:block>
171
- <fo:block margin-top="6pt">External identifier of this OGC® document: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'ogc-external']"/></fo:block>
172
- <fo:block margin-top="6pt">Internal reference number of this OGC® document: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docnumber"/></fo:block>
173
-
174
- <xsl:variable name="url" select="/mn:metanorma/mn:bibdata/mn:uri"/>
175
- <xsl:if test="normalize-space($url) != ''">
176
- <fo:block margin-top="6pt">URL for this OGC® document: <xsl:value-of select="$url"/></fo:block>
177
- </xsl:if>
178
-
179
- <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = '']"/>
180
-
181
- <fo:block margin-top="6pt"><xsl:text>Category: </xsl:text>
182
- <xsl:call-template name="capitalizeWords">
183
- <xsl:with-param name="str" select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype"/>
184
- </xsl:call-template>
185
- </fo:block>
186
-
187
- <xsl:variable name="editors">
188
- <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
189
- <xsl:value-of select="."/>
190
- <xsl:if test="position() != last()">, </xsl:if>
191
- </xsl:for-each>
192
- </xsl:variable>
193
- <xsl:if test="normalize-space($editors) != ''">
194
- <fo:block margin-top="6pt">
195
- <!-- Editor: -->
196
- <xsl:call-template name="getLocalizedString">
197
- <xsl:with-param name="key">editor_full</xsl:with-param>
198
- </xsl:call-template><xsl:text>: </xsl:text><xsl:value-of select="$editors"/>
199
- </fo:block>
200
- </xsl:if>
201
- </fo:block>
202
-
203
- <!-- absolute-position="fixed" left="20mm" top="91mm" width="175mm" -->
204
- <fo:block-container font-size="9pt" margin-left="-5mm" margin-right="-5mm">
205
- <fo:block-container margin-left="0mm" margin-right="0mm">
206
- <fo:block margin-top="8pt">
207
- <xsl:variable name="copyright_statement">
208
- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:copyright-statement" mode="update_xml_step1"/>
209
- </xsl:variable>
210
- <xsl:apply-templates select="xalan:nodeset($copyright_statement)/*"/>
211
- </fo:block>
212
- <fo:block margin-top="8pt"> </fo:block>
213
- <fo:block margin-top="8pt">
214
- <xsl:variable name="legal_statement">
215
- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
216
- </xsl:variable>
217
- <xsl:apply-templates select="xalan:nodeset($legal_statement)/*"/>
218
- </fo:block>
219
- </fo:block-container>
220
- </fo:block-container>
221
-
222
- <xsl:call-template name="insertLogo"/>
223
-
224
- </fo:flow>
225
- </fo:page-sequence>
226
- <!-- End Cover Page -->
155
+ <xsl:call-template name="cover-page"/>
227
156
 
228
157
  <xsl:variable name="updated_xml">
229
158
  <xsl:call-template name="updateXML"/>
@@ -313,6 +242,86 @@
313
242
 
314
243
  </xsl:template>
315
244
 
245
+ <xsl:template name="cover-page">
246
+ <!-- Cover Page -->
247
+ <fo:page-sequence master-reference="document" force-page-count="no-force">
248
+ <xsl:call-template name="insertHeaderFooter"/>
249
+ <fo:flow flow-name="xsl-region-body">
250
+
251
+ <fo:block-container margin-left="-12mm" margin-right="-9mm">
252
+ <fo:block-container margin-left="0mm" margin-right="0mm">
253
+ <fo:block font-size="36pt" background-color="{$color}" color="white" margin-left="2.5mm" padding-top="1mm" padding-left="1mm" role="H1">
254
+ <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title/node()"/>
255
+ </fo:block>
256
+ </fo:block-container>
257
+ </fo:block-container>
258
+
259
+ <!-- <fo:block font-family="Lato" font-weight="300" font-size="14pt" font-style="italic" margin-top="6pt" color="rgb(21, 43, 77)">
260
+ <xsl:text>Additional context, inspirational quote, etc. fits into this subheading area</xsl:text>
261
+ </fo:block> -->
262
+
263
+ <fo:block text-align="right" font-size="10pt" margin-top="12pt" margin-bottom="24pt">
264
+ <fo:block margin-top="6pt">Submission Date: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on"/></fo:block>
265
+ <fo:block margin-top="6pt">Approval Date: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on"/></fo:block>
266
+ <fo:block margin-top="6pt">Publication Date: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']/mn:on"/></fo:block>
267
+ <fo:block margin-top="6pt">External identifier of this OGC® document: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'ogc-external']"/></fo:block>
268
+ <fo:block margin-top="6pt">Internal reference number of this OGC® document: <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docnumber"/></fo:block>
269
+
270
+ <xsl:variable name="url" select="/mn:metanorma/mn:bibdata/mn:uri"/>
271
+ <xsl:if test="normalize-space($url) != ''">
272
+ <fo:block margin-top="6pt">URL for this OGC® document: <xsl:value-of select="$url"/></fo:block>
273
+ </xsl:if>
274
+
275
+ <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = '']"/>
276
+
277
+ <fo:block margin-top="6pt"><xsl:text>Category: </xsl:text>
278
+ <xsl:call-template name="capitalizeWords">
279
+ <xsl:with-param name="str" select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype"/>
280
+ </xsl:call-template>
281
+ </fo:block>
282
+
283
+ <xsl:variable name="editors">
284
+ <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
285
+ <xsl:value-of select="."/>
286
+ <xsl:if test="position() != last()">, </xsl:if>
287
+ </xsl:for-each>
288
+ </xsl:variable>
289
+ <xsl:if test="normalize-space($editors) != ''">
290
+ <fo:block margin-top="6pt">
291
+ <!-- Editor: -->
292
+ <xsl:call-template name="getLocalizedString">
293
+ <xsl:with-param name="key">editor_full</xsl:with-param>
294
+ </xsl:call-template><xsl:text>: </xsl:text><xsl:value-of select="$editors"/>
295
+ </fo:block>
296
+ </xsl:if>
297
+ </fo:block>
298
+
299
+ <!-- absolute-position="fixed" left="20mm" top="91mm" width="175mm" -->
300
+ <fo:block-container font-size="9pt" margin-left="-5mm" margin-right="-5mm">
301
+ <fo:block-container margin-left="0mm" margin-right="0mm">
302
+ <fo:block margin-top="8pt">
303
+ <xsl:variable name="copyright_statement">
304
+ <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:copyright-statement" mode="update_xml_step1"/>
305
+ </xsl:variable>
306
+ <xsl:apply-templates select="xalan:nodeset($copyright_statement)/*"/>
307
+ </fo:block>
308
+ <fo:block margin-top="8pt"> </fo:block>
309
+ <fo:block margin-top="8pt">
310
+ <xsl:variable name="legal_statement">
311
+ <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
312
+ </xsl:variable>
313
+ <xsl:apply-templates select="xalan:nodeset($legal_statement)/*"/>
314
+ </fo:block>
315
+ </fo:block-container>
316
+ </fo:block-container>
317
+
318
+ <xsl:call-template name="insertLogo"/>
319
+
320
+ </fo:flow>
321
+ </fo:page-sequence>
322
+ <!-- End Cover Page -->
323
+ </xsl:template> <!-- END: cover-page -->
324
+
316
325
  <xsl:template name="processPrefaceAndMainSectionsOGC_items">
317
326
  <xsl:variable name="updated_xml_step_move_pagebreak">
318
327
 
@@ -372,13 +381,13 @@
372
381
  <fo:block break-after="page"/>
373
382
  <fo:block-container line-height="1.08" font-family="Lato">
374
383
 
375
- <xsl:apply-templates select="mn:title"/>
384
+ <xsl:apply-templates select="mn:fmt-title"/>
376
385
 
377
386
  <fo:block role="TOC">
378
387
 
379
- <xsl:apply-templates select="*[not(self::mn:title)]"/>
388
+ <xsl:apply-templates select="*[not(self::mn:fmt-title)]"/>
380
389
 
381
- <xsl:if test="count(*) = 1 and mn:title"> <!-- if there isn't user ToC -->
390
+ <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
382
391
 
383
392
  <xsl:variable name="margin-left">3.9</xsl:variable>
384
393
  <xsl:for-each select="$contents//mnx:item[@display = 'true']">
@@ -396,7 +405,7 @@
396
405
  </fo:block>
397
406
  </xsl:for-each>
398
407
 
399
- <xsl:if test="//mn:figure[@id and mn:name] or //mn:table[@id and mn:name]">
408
+ <xsl:if test="//mn:figure[@id and mn:fmt-name] or //mn:table[@id and mn:fmt-name]">
400
409
  <fo:block font-size="11pt" margin-top="8pt"> </fo:block>
401
410
  <fo:block font-size="11pt" margin-top="8pt"> </fo:block>
402
411
  <fo:block xsl:use-attribute-sets="title-toc-style">
@@ -405,10 +414,10 @@
405
414
  <xsl:with-param name="key">table_of_figures</xsl:with-param>
406
415
  </xsl:call-template>
407
416
  </fo:block>
408
- <xsl:for-each select="//mn:figure[@id and mn:name] | //mn:table[@id and mn:name]">
417
+ <xsl:for-each select="//mn:figure[@id and mn:fmt-name] | //mn:table[@id and mn:fmt-name]">
409
418
  <fo:block margin-top="8pt" margin-bottom="5pt" text-align-last="justify" role="TOCI">
410
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{mn:name}">
411
- <xsl:apply-templates select="mn:name" mode="contents"/>
419
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{mn:fmt-name}">
420
+ <xsl:apply-templates select="mn:fmt-name" mode="contents"/>
412
421
  <fo:inline keep-together.within-line="always">
413
422
  <fo:leader leader-pattern="dots"/>
414
423
  <fo:page-number-citation ref-id="{@id}"/>
@@ -422,7 +431,7 @@
422
431
  </fo:block-container>
423
432
  </xsl:template>
424
433
 
425
- <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:title" priority="3">
434
+ <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
426
435
  <fo:block xsl:use-attribute-sets="title-toc-style" role="H1">
427
436
  <!-- <xsl:call-template name="getTitle">
428
437
  <xsl:with-param name="name" select="'title-toc'"/>
@@ -558,14 +567,14 @@
558
567
  <!-- title -->
559
568
  <!-- ====== -->
560
569
 
561
- <xsl:template match="mn:annex/mn:title">
570
+ <xsl:template match="mn:annex/mn:fmt-title">
562
571
  <fo:block xsl:use-attribute-sets="title-depth1-style" role="H1">
563
572
  <xsl:apply-templates/>
564
573
  <xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
565
574
  </fo:block>
566
575
  </xsl:template>
567
576
 
568
- <xsl:template match="mn:title" name="title">
577
+ <xsl:template match="mn:fmt-title" name="title">
569
578
 
570
579
  <xsl:variable name="level">
571
580
  <xsl:call-template name="getLevel"/>
@@ -637,7 +646,7 @@
637
646
  <xsl:variable name="element-name">
638
647
  <xsl:choose>
639
648
  <xsl:when test="$inline = 'true'">fo:inline</xsl:when>
640
- <xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
649
+ <xsl:when test="../@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
641
650
  <xsl:when test="parent::mn:admonition">fo:inline</xsl:when>
642
651
  <xsl:otherwise>fo:block</xsl:otherwise>
643
652
  </xsl:choose>
@@ -906,10 +915,6 @@
906
915
  <title-part lang="ru">
907
916
  </title-part>
908
917
  <title-part lang="zh">第 # 部分:</title-part>
909
-
910
- <title-subpart lang="en">Sub-part #</title-subpart>
911
- <title-subpart lang="fr">Partie de sub #</title-subpart>
912
-
913
918
  </xsl:variable>
914
919
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
915
920
 
@@ -1362,7 +1367,8 @@
1362
1367
  <xsl:template match="mn:stem" mode="update_xml_step1"/>
1363
1368
 
1364
1369
  <xsl:template match="mn:fmt-stem" mode="update_xml_step1">
1365
- <xsl:element name="stem" namespace="{$namespace_full}">
1370
+ <!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
1371
+ <xsl:copy>
1366
1372
  <xsl:copy-of select="@*"/>
1367
1373
  <xsl:choose>
1368
1374
  <xsl:when test="mn:semx and count(node()) = 1">
@@ -1386,7 +1392,8 @@
1386
1392
  </xsl:choose>
1387
1393
  </xsl:otherwise>
1388
1394
  </xsl:choose>
1389
- </xsl:element>
1395
+ </xsl:copy>
1396
+ <!-- </xsl:element> -->
1390
1397
  </xsl:template>
1391
1398
 
1392
1399
  <xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
@@ -1548,12 +1555,14 @@
1548
1555
  </xsl:template>
1549
1556
 
1550
1557
  <xsl:template match="mn:fmt-title" mode="update_xml_step1">
1551
- <xsl:element name="title" namespace="{$namespace_full}">
1558
+ <!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
1559
+ <xsl:copy>
1552
1560
  <xsl:copy-of select="@*"/>
1553
1561
  <xsl:call-template name="addNamedDestinationAttribute"/>
1554
1562
 
1555
1563
  <xsl:apply-templates mode="update_xml_step1"/>
1556
- </xsl:element>
1564
+ </xsl:copy>
1565
+ <!-- </xsl:element> -->
1557
1566
  </xsl:template>
1558
1567
 
1559
1568
  <xsl:template name="addNamedDestinationAttribute">
@@ -1565,12 +1574,14 @@
1565
1574
  <xsl:apply-templates mode="update_xml_step1"/>
1566
1575
  </xsl:when>
1567
1576
  <xsl:otherwise>
1568
- <xsl:element name="name" namespace="{$namespace_full}">
1577
+ <!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
1578
+ <xsl:copy>
1569
1579
  <xsl:copy-of select="@*"/>
1570
1580
  <xsl:call-template name="addNamedDestinationAttribute"/>
1571
1581
 
1572
1582
  <xsl:apply-templates mode="update_xml_step1"/>
1573
- </xsl:element>
1583
+ </xsl:copy>
1584
+ <!-- </xsl:element> -->
1574
1585
  </xsl:otherwise>
1575
1586
  </xsl:choose>
1576
1587
  </xsl:template>
@@ -1585,7 +1596,7 @@
1585
1596
  <xsl:apply-templates mode="update_xml_step1"/>
1586
1597
  </xsl:template>
1587
1598
  <xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="update_xml_step1">
1588
- <xsl:element name="preferred" namespace="{$namespace_full}">
1599
+ <xsl:element name="fmt-preferred" namespace="{$namespace_full}">
1589
1600
  <xsl:copy-of select="@*"/>
1590
1601
  <xsl:apply-templates mode="update_xml_step1"/>
1591
1602
  </xsl:element>
@@ -1595,7 +1606,7 @@
1595
1606
  <xsl:apply-templates mode="update_xml_step1"/>
1596
1607
  </xsl:template>
1597
1608
  <xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="update_xml_step1">
1598
- <xsl:element name="admitted" namespace="{$namespace_full}">
1609
+ <xsl:element name="fmt-admitted" namespace="{$namespace_full}">
1599
1610
  <xsl:copy-of select="@*"/>
1600
1611
  <xsl:apply-templates mode="update_xml_step1"/>
1601
1612
  </xsl:element>
@@ -1605,32 +1616,32 @@
1605
1616
  <xsl:apply-templates mode="update_xml_step1"/>
1606
1617
  </xsl:template>
1607
1618
  <xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="update_xml_step1">
1608
- <xsl:element name="deprecates" namespace="{$namespace_full}">
1619
+ <xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
1609
1620
  <xsl:copy-of select="@*"/>
1610
1621
  <xsl:apply-templates mode="update_xml_step1"/>
1611
1622
  </xsl:element>
1612
1623
  </xsl:template>
1613
1624
 
1614
- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
1625
+ <!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
1615
1626
  <xsl:element name="definition" namespace="{$namespace_full}">
1616
1627
  <xsl:copy-of select="@*"/>
1617
1628
  <xsl:apply-templates mode="update_xml_step1"/>
1618
1629
  </xsl:element>
1619
1630
  </xsl:template>
1620
-
1631
+
1621
1632
  <xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
1622
1633
  <xsl:element name="termsource" namespace="{$namespace_full}">
1623
1634
  <xsl:copy-of select="@*"/>
1624
1635
  <xsl:apply-templates mode="update_xml_step1"/>
1625
1636
  </xsl:element>
1626
1637
  </xsl:template>
1627
-
1638
+
1628
1639
  <xsl:template match="mn:fmt-source" mode="update_xml_step1">
1629
1640
  <xsl:element name="source" namespace="{$namespace_full}">
1630
1641
  <xsl:copy-of select="@*"/>
1631
1642
  <xsl:apply-templates mode="update_xml_step1"/>
1632
1643
  </xsl:element>
1633
- </xsl:template>
1644
+ </xsl:template> -->
1634
1645
 
1635
1646
  <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">
1636
1647
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -1653,12 +1664,12 @@
1653
1664
  </xsl:template>
1654
1665
 
1655
1666
  <xsl:template match="mn:identifier" mode="update_xml_step1"/>
1656
- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
1667
+ <!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
1657
1668
  <xsl:element name="identifier" namespace="{$namespace_full}">
1658
1669
  <xsl:copy-of select="@*"/>
1659
1670
  <xsl:apply-templates mode="update_xml_step1"/>
1660
1671
  </xsl:element>
1661
- </xsl:template>
1672
+ </xsl:template> -->
1662
1673
 
1663
1674
  <xsl:template match="mn:concept" mode="update_xml_step1"/>
1664
1675
 
@@ -1668,51 +1679,53 @@
1668
1679
 
1669
1680
  <xsl:template match="mn:eref" mode="update_xml_step1"/>
1670
1681
 
1671
- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
1682
+ <!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
1672
1683
  <xsl:element name="eref" namespace="{$namespace_full}">
1673
1684
  <xsl:copy-of select="@*"/>
1674
1685
  <xsl:apply-templates mode="update_xml_step1"/>
1675
1686
  </xsl:element>
1676
- </xsl:template>
1687
+ </xsl:template> -->
1677
1688
 
1678
1689
  <xsl:template match="mn:xref" mode="update_xml_step1"/>
1679
1690
 
1680
- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
1691
+ <!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
1681
1692
  <xsl:element name="xref" namespace="{$namespace_full}">
1682
1693
  <xsl:copy-of select="@*"/>
1683
1694
  <xsl:apply-templates mode="update_xml_step1"/>
1684
1695
  </xsl:element>
1685
- </xsl:template>
1696
+ </xsl:template> -->
1686
1697
 
1687
1698
  <xsl:template match="mn:link" mode="update_xml_step1"/>
1688
1699
 
1689
- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
1700
+ <!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
1690
1701
  <xsl:element name="link" namespace="{$namespace_full}">
1691
1702
  <xsl:copy-of select="@*"/>
1692
1703
  <xsl:apply-templates mode="update_xml_step1"/>
1693
1704
  </xsl:element>
1694
- </xsl:template>
1705
+ </xsl:template> -->
1695
1706
 
1696
1707
  <xsl:template match="mn:origin" mode="update_xml_step1"/>
1697
1708
 
1698
- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
1709
+ <!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
1699
1710
  <xsl:element name="origin" namespace="{$namespace_full}">
1700
1711
  <xsl:copy-of select="@*"/>
1701
1712
  <xsl:apply-templates mode="update_xml_step1"/>
1702
1713
  </xsl:element>
1703
- </xsl:template>
1714
+ </xsl:template> -->
1704
1715
 
1705
1716
  <xsl:template match="mn:erefstack" mode="update_xml_step1"/>
1706
1717
 
1707
1718
  <xsl:template match="mn:svgmap" mode="update_xml_step1"/>
1708
1719
 
1709
- <xsl:template match="mn:review-container" mode="update_xml_step1"/>
1720
+ <xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
1710
1721
 
1711
- <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
1712
- <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
1713
- <xsl:value-of select="."/>
1714
- </xsl:element>
1715
- </xsl:template>
1722
+ <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
1723
+ <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
1724
+ <xsl:value-of select="."/>
1725
+ </xsl:element>
1726
+ </xsl:template>
1727
+
1728
+ <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
1716
1729
 
1717
1730
  <!-- END: update new Presentation XML -->
1718
1731
 
@@ -1908,7 +1921,7 @@
1908
1921
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
1909
1922
  <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>
1910
1923
 
1911
- <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">
1924
+ <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">
1912
1925
 
1913
1926
  <xsl:variable name="parent" select="local-name(..)"/>
1914
1927
 
@@ -2027,7 +2040,7 @@
2027
2040
  </xsl:if>
2028
2041
  </xsl:template>
2029
2042
 
2030
- <xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
2043
+ <xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
2031
2044
  <xsl:copy-of select="."/>
2032
2045
  </xsl:template>
2033
2046
 
@@ -2369,7 +2382,7 @@
2369
2382
  </fo:block>
2370
2383
  </xsl:template> <!-- copyright-statement -->
2371
2384
 
2372
- <xsl:template match="mn:copyright-statement//mn:title">
2385
+ <xsl:template match="mn:copyright-statement//mn:fmt-title">
2373
2386
  <xsl:variable name="level">
2374
2387
  <xsl:call-template name="getLevel"/>
2375
2388
  </xsl:variable>
@@ -2398,7 +2411,7 @@
2398
2411
  </fo:block>
2399
2412
  </xsl:template> <!-- license-statement -->
2400
2413
 
2401
- <xsl:template match="mn:license-statement//mn:title">
2414
+ <xsl:template match="mn:license-statement//mn:fmt-title">
2402
2415
  <xsl:variable name="level">
2403
2416
  <xsl:call-template name="getLevel"/>
2404
2417
  </xsl:variable>
@@ -2426,7 +2439,7 @@
2426
2439
  </fo:block>
2427
2440
  </xsl:template> <!-- legal-statement -->
2428
2441
 
2429
- <xsl:template match="mn:legal-statement//mn:title">
2442
+ <xsl:template match="mn:legal-statement//mn:fmt-title">
2430
2443
  <!-- ogc-white-paper rsd -->
2431
2444
  <xsl:variable name="level">
2432
2445
  <xsl:call-template name="getLevel"/>
@@ -2459,7 +2472,7 @@
2459
2472
  </fo:block>
2460
2473
  </xsl:template> <!-- feedback-statement -->
2461
2474
 
2462
- <xsl:template match="mn:feedback-statement//mn:title">
2475
+ <xsl:template match="mn:feedback-statement//mn:fmt-title">
2463
2476
  <!-- process in the template 'title' -->
2464
2477
  <xsl:call-template name="title"/>
2465
2478
  </xsl:template>
@@ -2484,7 +2497,7 @@
2484
2497
  <xsl:template name="refine_link-style">
2485
2498
  </xsl:template> <!-- refine_link-style -->
2486
2499
 
2487
- <xsl:template match="mn:link" name="link">
2500
+ <xsl:template match="mn:fmt-link" name="link">
2488
2501
  <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
2489
2502
  <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
2490
2503
  <xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
@@ -2710,7 +2723,7 @@
2710
2723
  <xsl:value-of select="."/>
2711
2724
  </xsl:attribute>
2712
2725
  </xsl:for-each>
2713
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
2726
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
2714
2727
  </xsl:when>
2715
2728
 
2716
2729
  <xsl:otherwise>
@@ -2752,11 +2765,11 @@
2752
2765
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
2753
2766
  </xsl:if>
2754
2767
 
2755
- <xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
2768
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
2756
2769
  </fo:block>
2757
2770
 
2758
2771
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
2759
- <xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name AFTER content -->
2772
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
2760
2773
 
2761
2774
  </fo:block-container>
2762
2775
  </fo:block-container>
@@ -3057,7 +3070,7 @@
3057
3070
 
3058
3071
  <!-- end mode="syntax_highlight" -->
3059
3072
 
3060
- <xsl:template match="mn:sourcecode/mn:name">
3073
+ <xsl:template match="mn:sourcecode/mn:fmt-name">
3061
3074
  <xsl:if test="normalize-space() != ''">
3062
3075
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
3063
3076
  <xsl:apply-templates/>
@@ -3075,7 +3088,7 @@
3075
3088
  </xsl:choose>
3076
3089
  </xsl:template>
3077
3090
 
3078
- <xsl:template match="mn:annotation">
3091
+ <xsl:template match="mn:callout-annotation">
3079
3092
  <xsl:variable name="annotation-id" select="@id"/>
3080
3093
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
3081
3094
  <fo:block id="{$annotation-id}" white-space="nowrap">
@@ -3087,7 +3100,7 @@
3087
3100
  </fo:block>
3088
3101
  </xsl:template>
3089
3102
 
3090
- <xsl:template match="mn:annotation/mn:p">
3103
+ <xsl:template match="mn:callout-annotation/mn:p">
3091
3104
  <xsl:param name="callout"/>
3092
3105
  <fo:inline id="{@id}">
3093
3106
  <xsl:call-template name="setNamedDestination"/>
@@ -3243,7 +3256,7 @@
3243
3256
  <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
3244
3257
  <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
3245
3258
  <xsl:choose>
3246
- <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>
3259
+ <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>
3247
3260
  <xsl:otherwise>
3248
3261
  <xsl:variable name="tag">
3249
3262
  <xsl:call-template name="insertTag">
@@ -3673,12 +3686,12 @@
3673
3686
  <xsl:template match="mn:permission">
3674
3687
  <xsl:call-template name="setNamedDestination"/>
3675
3688
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
3676
- <xsl:apply-templates select="mn:name"/>
3677
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
3689
+ <xsl:apply-templates select="mn:fmt-name"/>
3690
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3678
3691
  </fo:block>
3679
3692
  </xsl:template>
3680
3693
 
3681
- <xsl:template match="mn:permission/mn:name">
3694
+ <xsl:template match="mn:permission/mn:fmt-name">
3682
3695
  <xsl:if test="normalize-space() != ''">
3683
3696
  <fo:block xsl:use-attribute-sets="permission-name-style">
3684
3697
  <xsl:apply-templates/>
@@ -3701,15 +3714,15 @@
3701
3714
  <xsl:template match="mn:requirement">
3702
3715
  <xsl:call-template name="setNamedDestination"/>
3703
3716
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
3704
- <xsl:apply-templates select="mn:name"/>
3717
+ <xsl:apply-templates select="mn:fmt-name"/>
3705
3718
  <xsl:apply-templates select="mn:label"/>
3706
3719
  <xsl:apply-templates select="@obligation"/>
3707
3720
  <xsl:apply-templates select="mn:subject"/>
3708
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:label) and not(self::mn:subject)]"/>
3721
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
3709
3722
  </fo:block>
3710
3723
  </xsl:template>
3711
3724
 
3712
- <xsl:template match="mn:requirement/mn:name">
3725
+ <xsl:template match="mn:requirement/mn:fmt-name">
3713
3726
  <xsl:if test="normalize-space() != ''">
3714
3727
 
3715
3728
  <fo:block xsl:use-attribute-sets="requirement-name-style">
@@ -3749,12 +3762,12 @@
3749
3762
  <xsl:template match="mn:recommendation">
3750
3763
  <xsl:call-template name="setNamedDestination"/>
3751
3764
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
3752
- <xsl:apply-templates select="mn:name"/>
3753
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
3765
+ <xsl:apply-templates select="mn:fmt-name"/>
3766
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3754
3767
  </fo:block>
3755
3768
  </xsl:template>
3756
3769
 
3757
- <xsl:template match="mn:recommendation/mn:name">
3770
+ <xsl:template match="mn:recommendation/mn:fmt-name">
3758
3771
  <xsl:if test="normalize-space() != ''">
3759
3772
 
3760
3773
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
@@ -4022,11 +4035,11 @@
4022
4035
 
4023
4036
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
4024
4037
  </xsl:if>
4025
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4038
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4026
4039
  </fo:block>
4027
4040
  </xsl:template>
4028
4041
 
4029
- <xsl:template match="mn:term/mn:name">
4042
+ <xsl:template match="mn:term/mn:fmt-name">
4030
4043
  <xsl:if test="normalize-space() != ''">
4031
4044
  <!-- <xsl:variable name="level">
4032
4045
  <xsl:call-template name="getLevelTermName"/>
@@ -4045,7 +4058,7 @@
4045
4058
  <!-- origin -->
4046
4059
  <!-- modification -->
4047
4060
  <!-- ====== -->
4048
- <xsl:template match="mn:termsource" name="termsource">
4061
+ <xsl:template match="mn:fmt-termsource" name="termsource">
4049
4062
  <fo:block xsl:use-attribute-sets="termsource-style">
4050
4063
 
4051
4064
  <xsl:call-template name="refine_termsource-style"/>
@@ -4084,24 +4097,24 @@
4084
4097
  </fo:block>
4085
4098
  </xsl:template>
4086
4099
 
4087
- <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">
4100
+ <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">
4088
4101
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
4089
4102
  </xsl:template>
4090
4103
 
4091
- <xsl:template match="mn:termsource/text()">
4104
+ <xsl:template match="mn:fmt-termsource/text()">
4092
4105
  <xsl:if test="normalize-space() != ''">
4093
4106
  <xsl:value-of select="."/>
4094
4107
  </xsl:if>
4095
4108
  </xsl:template>
4096
4109
 
4097
4110
  <!-- text SOURCE: -->
4098
- <xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
4111
+ <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
4099
4112
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
4100
4113
  <xsl:value-of select="."/>
4101
4114
  </fo:inline>
4102
4115
  </xsl:template>
4103
4116
 
4104
- <xsl:template match="mn:origin">
4117
+ <xsl:template match="mn:fmt-origin">
4105
4118
  <xsl:call-template name="insert_basic_link">
4106
4119
  <xsl:with-param name="element">
4107
4120
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -4147,7 +4160,7 @@
4147
4160
  <!-- ====== -->
4148
4161
 
4149
4162
  <!-- Preferred, admitted, deprecated -->
4150
- <xsl:template match="mn:preferred">
4163
+ <xsl:template match="mn:fmt-preferred">
4151
4164
  <xsl:variable name="level">
4152
4165
  <xsl:call-template name="getLevel"/>
4153
4166
  </xsl:variable>
@@ -4163,15 +4176,15 @@
4163
4176
  </xsl:variable>
4164
4177
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
4165
4178
 
4166
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
4179
+ <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
4167
4180
 
4168
4181
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
4169
4182
 
4170
- <xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
4183
+ <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
4171
4184
  <xsl:call-template name="setIDforNamedDestination"/>
4172
4185
  </xsl:for-each>
4173
4186
 
4174
- <xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
4187
+ <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
4175
4188
  </fo:block>
4176
4189
  </xsl:if>
4177
4190
 
@@ -4195,13 +4208,13 @@
4195
4208
  <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
4196
4209
  <xsl:template match="mn:domain"/>
4197
4210
 
4198
- <xsl:template match="mn:admitted">
4211
+ <xsl:template match="mn:fmt-admitted">
4199
4212
  <fo:block xsl:use-attribute-sets="admitted-style">
4200
4213
  <xsl:apply-templates/>
4201
4214
  </fo:block>
4202
4215
  </xsl:template>
4203
4216
 
4204
- <xsl:template match="mn:deprecates">
4217
+ <xsl:template match="mn:fmt-deprecates">
4205
4218
  <fo:block xsl:use-attribute-sets="deprecates-style">
4206
4219
  <xsl:apply-templates/>
4207
4220
  </fo:block>
@@ -4215,7 +4228,7 @@
4215
4228
 
4216
4229
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
4217
4230
  <!-- in metanorma xml preferred terms delimited by semicolons -->
4218
- <xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
4231
+ <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
4219
4232
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
4220
4233
  </xsl:template>
4221
4234
  <!-- End Preferred, admitted, deprecated -->
@@ -4234,16 +4247,16 @@
4234
4247
  <!-- ========== -->
4235
4248
  <!-- definition -->
4236
4249
  <!-- ========== -->
4237
- <xsl:template match="mn:definition">
4250
+ <xsl:template match="mn:fmt-definition">
4238
4251
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
4239
4252
  <xsl:apply-templates/>
4240
4253
  </fo:block>
4241
4254
  </xsl:template>
4242
4255
 
4243
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]">
4256
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
4244
4257
  <xsl:apply-templates/>
4245
4258
  </xsl:template>
4246
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
4259
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
4247
4260
  <fo:inline> <xsl:apply-templates/></fo:inline>
4248
4261
  <fo:block/>
4249
4262
  </xsl:template>
@@ -4313,12 +4326,12 @@
4313
4326
  <xsl:call-template name="refine_termexample-style"/>
4314
4327
  <xsl:call-template name="setBlockSpanAll"/>
4315
4328
 
4316
- <xsl:apply-templates select="mn:name"/>
4317
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4329
+ <xsl:apply-templates select="mn:fmt-name"/>
4330
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4318
4331
  </fo:block>
4319
4332
  </xsl:template>
4320
4333
 
4321
- <xsl:template match="mn:termexample/mn:name">
4334
+ <xsl:template match="mn:termexample/mn:fmt-name">
4322
4335
  <xsl:if test="normalize-space() != ''">
4323
4336
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
4324
4337
  <xsl:call-template name="refine_termexample-name-style"/>
@@ -4369,7 +4382,7 @@
4369
4382
  <xsl:call-template name="refine_example-style"/>
4370
4383
 
4371
4384
  <xsl:variable name="fo_element">
4372
- <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:name)][1][self::mn:sourcecode]">block</xsl:if>block
4385
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>block
4373
4386
  </xsl:variable>
4374
4387
 
4375
4388
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -4380,7 +4393,7 @@
4380
4393
 
4381
4394
  <!-- display name 'EXAMPLE' in a separate block -->
4382
4395
  <fo:block>
4383
- <xsl:apply-templates select="mn:name">
4396
+ <xsl:apply-templates select="mn:fmt-name">
4384
4397
  <xsl:with-param name="fo_element" select="$fo_element"/>
4385
4398
  </xsl:apply-templates>
4386
4399
  </fo:block>
@@ -4388,7 +4401,7 @@
4388
4401
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4389
4402
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4390
4403
  <xsl:variable name="example_body">
4391
- <xsl:apply-templates select="node()[not(self::mn:name)]">
4404
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
4392
4405
  <xsl:with-param name="fo_element" select="$fo_element"/>
4393
4406
  </xsl:apply-templates>
4394
4407
  </xsl:variable>
@@ -4415,14 +4428,14 @@
4415
4428
  <fo:list-item>
4416
4429
  <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
4417
4430
  <fo:block>
4418
- <xsl:apply-templates select="mn:name">
4431
+ <xsl:apply-templates select="mn:fmt-name">
4419
4432
  <xsl:with-param name="fo_element">block</xsl:with-param>
4420
4433
  </xsl:apply-templates>
4421
4434
  </fo:block>
4422
4435
  </fo:list-item-label>
4423
4436
  <fo:list-item-body start-indent="body-start()">
4424
4437
  <fo:block>
4425
- <xsl:apply-templates select="node()[not(self::mn:name)]">
4438
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
4426
4439
  <xsl:with-param name="fo_element" select="$fo_element"/>
4427
4440
  </xsl:apply-templates>
4428
4441
  </fo:block>
@@ -4435,21 +4448,21 @@
4435
4448
 
4436
4449
  <!-- display 'EXAMPLE' and first element in the same line -->
4437
4450
  <fo:block>
4438
- <xsl:apply-templates select="mn:name">
4451
+ <xsl:apply-templates select="mn:fmt-name">
4439
4452
  <xsl:with-param name="fo_element" select="$fo_element"/>
4440
4453
  </xsl:apply-templates>
4441
4454
  <fo:inline>
4442
- <xsl:apply-templates select="*[not(self::mn:name)][1]">
4455
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
4443
4456
  <xsl:with-param name="fo_element" select="$fo_element"/>
4444
4457
  </xsl:apply-templates>
4445
4458
  </fo:inline>
4446
4459
  </fo:block>
4447
4460
 
4448
- <xsl:if test="*[not(self::mn:name)][position() &gt; 1]">
4461
+ <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
4449
4462
  <!-- display further elements in blocks -->
4450
4463
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4451
4464
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4452
- <xsl:apply-templates select="*[not(self::mn:name)][position() &gt; 1]">
4465
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
4453
4466
  <xsl:with-param name="fo_element" select="'block'"/>
4454
4467
  </xsl:apply-templates>
4455
4468
  </fo:block-container>
@@ -4463,7 +4476,7 @@
4463
4476
  </xsl:template>
4464
4477
 
4465
4478
  <!-- example/name -->
4466
- <xsl:template match="mn:example/mn:name">
4479
+ <xsl:template match="mn:example/mn:fmt-name">
4467
4480
  <xsl:param name="fo_element">block</xsl:param>
4468
4481
 
4469
4482
  <xsl:choose>
@@ -4488,7 +4501,7 @@
4488
4501
  </xsl:template>
4489
4502
 
4490
4503
  <!-- table/example/name, table/tfoot//example/name -->
4491
- <xsl:template match="mn:table/mn:example/mn:name | mn:table/mn:tfoot//mn:example/mn:name">
4504
+ <xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
4492
4505
  <fo:inline xsl:use-attribute-sets="example-name-style">
4493
4506
  <xsl:apply-templates/>
4494
4507
  </fo:inline>
@@ -4804,7 +4817,7 @@
4804
4817
 
4805
4818
  <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
4806
4819
 
4807
- <xsl:for-each select="mn:name">
4820
+ <xsl:for-each select="mn:fmt-name">
4808
4821
  <xsl:call-template name="setIDforNamedDestination"/>
4809
4822
  </xsl:for-each>
4810
4823
 
@@ -4840,6 +4853,10 @@
4840
4853
  <xsl:with-param name="margin-side" select="$margin-side"/>
4841
4854
  </xsl:call-template>
4842
4855
 
4856
+ <xsl:call-template name="setTableStyles">
4857
+ <xsl:with-param name="scope">table</xsl:with-param>
4858
+ </xsl:call-template>
4859
+
4843
4860
  </xsl:element>
4844
4861
  </xsl:variable>
4845
4862
 
@@ -4860,7 +4877,7 @@
4860
4877
  </xsl:attribute>
4861
4878
  </xsl:for-each>
4862
4879
 
4863
- <xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[local-name(..) != 'name'] or ./mn:source"/>
4880
+ <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"/>
4864
4881
  <xsl:if test="$isNoteOrFnExist = 'true'">
4865
4882
  <!-- <xsl:choose>
4866
4883
  <xsl:when test="$namespace = 'plateau'"></xsl:when>
@@ -4916,7 +4933,7 @@
4916
4933
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
4917
4934
  </xsl:when>
4918
4935
  <xsl:otherwise>
4919
- <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 -->
4936
+ <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 -->
4920
4937
  </xsl:otherwise>
4921
4938
  </xsl:choose>
4922
4939
 
@@ -4936,7 +4953,7 @@
4936
4953
  <xsl:with-param name="colgroup" select="$colgroup"/>
4937
4954
  </xsl:call-template>
4938
4955
  </xsl:for-each>
4939
- <xsl:apply-templates select="mn:name"/>
4956
+ <xsl:apply-templates select="mn:fmt-name"/>
4940
4957
 
4941
4958
  <!-- https://github.com/metanorma/metanorma-plateau/issues/171
4942
4959
  <xsl:if test="$namespace = 'plateau'">
@@ -5011,7 +5028,7 @@
5011
5028
  </xsl:template>
5012
5029
 
5013
5030
  <!-- table/name-->
5014
- <xsl:template match="*[local-name()='table']/mn:name">
5031
+ <xsl:template match="*[local-name()='table']/mn:fmt-name">
5015
5032
  <xsl:param name="continued"/>
5016
5033
  <xsl:param name="cols-count"/>
5017
5034
  <xsl:if test="normalize-space() != ''">
@@ -5076,7 +5093,7 @@
5076
5093
  </xsl:template>
5077
5094
 
5078
5095
  <!-- SOURCE: ... -->
5079
- <xsl:template match="*[local-name()='table']/mn:source" priority="2">
5096
+ <xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
5080
5097
  <xsl:call-template name="termsource"/>
5081
5098
  </xsl:template>
5082
5099
 
@@ -5241,11 +5258,11 @@
5241
5258
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
5242
5259
  </xsl:template>
5243
5260
 
5244
- <xsl:template match="mn:termsource" mode="td_text">
5245
- <xsl:value-of select="*[local-name()='origin']/@citeas"/>
5261
+ <xsl:template match="mn:fmt-termsource" mode="td_text">
5262
+ <xsl:value-of select="mn:fmt-origin/@citeas"/>
5246
5263
  </xsl:template>
5247
5264
 
5248
- <xsl:template match="mn:link" mode="td_text">
5265
+ <xsl:template match="mn:fmt-link" mode="td_text">
5249
5266
  <xsl:value-of select="@target"/>
5250
5267
  </xsl:template>
5251
5268
 
@@ -5447,12 +5464,12 @@
5447
5464
 
5448
5465
  <xsl:call-template name="refine_table-header-title-style"/>
5449
5466
 
5450
- <xsl:apply-templates select="ancestor::mn:table/mn:name">
5467
+ <xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
5451
5468
  <xsl:with-param name="continued">true</xsl:with-param>
5452
5469
  <xsl:with-param name="cols-count" select="$cols-count"/>
5453
5470
  </xsl:apply-templates>
5454
5471
 
5455
- <xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5472
+ <xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5456
5473
  <fo:block role="SKIP"/>
5457
5474
  </xsl:if>
5458
5475
 
@@ -5487,7 +5504,7 @@
5487
5504
  <xsl:param name="colwidths"/>
5488
5505
  <xsl:param name="colgroup"/>
5489
5506
 
5490
- <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"/>
5507
+ <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"/>
5491
5508
 
5492
5509
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
5493
5510
  </xsl:variable>
@@ -5528,6 +5545,12 @@
5528
5545
  </xsl:choose>
5529
5546
  </xsl:for-each>
5530
5547
 
5548
+ <xsl:for-each select="ancestor::mn:table[1]">
5549
+ <xsl:call-template name="setTableStyles">
5550
+ <xsl:with-param name="scope">table</xsl:with-param>
5551
+ </xsl:call-template>
5552
+ </xsl:for-each>
5553
+
5531
5554
  <xsl:choose>
5532
5555
  <xsl:when test="xalan:nodeset($colgroup)//mn:col">
5533
5556
  <xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
@@ -5544,10 +5567,22 @@
5544
5567
 
5545
5568
  <fo:table-body role="SKIP">
5546
5569
  <fo:table-row role="SKIP">
5570
+ <xsl:for-each select="ancestor::mn:table[1]">
5571
+ <xsl:call-template name="setTableStyles">
5572
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
5573
+ </xsl:call-template>
5574
+ </xsl:for-each>
5575
+
5547
5576
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
5548
5577
 
5549
5578
  <xsl:call-template name="refine_table-footer-cell-style"/>
5550
5579
 
5580
+ <xsl:for-each select="ancestor::mn:table[1]">
5581
+ <xsl:call-template name="setTableStyles">
5582
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
5583
+ </xsl:call-template>
5584
+ </xsl:for-each>
5585
+
5551
5586
  <xsl:call-template name="setBordersTableArray"/>
5552
5587
 
5553
5588
  <!-- fn will be processed inside 'note' processing -->
@@ -5555,7 +5590,7 @@
5555
5590
  <xsl:apply-templates select="../mn:dl"/>
5556
5591
  <xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
5557
5592
  <xsl:apply-templates select="../mn:example"/>
5558
- <xsl:apply-templates select="../mn:source"/>
5593
+ <xsl:apply-templates select="../mn:fmt-source"/>
5559
5594
 
5560
5595
  <xsl:variable name="isDisplayRowSeparator">
5561
5596
  </xsl:variable>
@@ -5744,7 +5779,12 @@
5744
5779
 
5745
5780
  <xsl:template name="setTableRowAttributes">
5746
5781
 
5747
- <xsl:call-template name="setColors"/>
5782
+ <xsl:for-each select="ancestor::mn:table[1]">
5783
+ <xsl:call-template name="setTableStyles">
5784
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
5785
+ </xsl:call-template>
5786
+ </xsl:for-each>
5787
+ <xsl:call-template name="setTableStyles"/>
5748
5788
 
5749
5789
  </xsl:template> <!-- setTableRowAttributes -->
5750
5790
  <!-- ===================== -->
@@ -5797,7 +5837,13 @@
5797
5837
  </xsl:attribute>
5798
5838
  </xsl:if>
5799
5839
  <xsl:call-template name="display-align"/>
5800
- <xsl:call-template name="setColors"/>
5840
+
5841
+ <xsl:for-each select="ancestor::mn:table[1]">
5842
+ <xsl:call-template name="setTableStyles">
5843
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
5844
+ </xsl:call-template>
5845
+ </xsl:for-each>
5846
+ <xsl:call-template name="setTableStyles"/>
5801
5847
  </xsl:template>
5802
5848
 
5803
5849
  <xsl:template name="display-align">
@@ -5813,7 +5859,8 @@
5813
5859
  </xsl:if>
5814
5860
  </xsl:template>
5815
5861
 
5816
- <xsl:template name="setColors">
5862
+ <xsl:template name="setTableStyles">
5863
+ <xsl:param name="scope">cell</xsl:param>
5817
5864
  <xsl:variable name="styles__">
5818
5865
  <xsl:call-template name="split">
5819
5866
  <xsl:with-param name="pText" select="concat(@style,';')"/>
@@ -5825,16 +5872,22 @@
5825
5872
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
5826
5873
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
5827
5874
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
5828
- <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'">
5875
+ <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'">
5829
5876
  <style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
5830
5877
  </xsl:if>
5878
+ <xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
5879
+ <style name="{$key}-top"><xsl:value-of select="$value"/></style>
5880
+ <style name="{$key}-right"><xsl:value-of select="$value"/></style>
5881
+ <style name="{$key}-left"><xsl:value-of select="$value"/></style>
5882
+ <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
5883
+ </xsl:if>
5831
5884
  </xsl:for-each>
5832
5885
  </xsl:variable>
5833
5886
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
5834
5887
  <xsl:for-each select="$styles/style">
5835
5888
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
5836
5889
  </xsl:for-each>
5837
- </xsl:template> <!-- setColors -->
5890
+ </xsl:template> <!-- setTableStyles -->
5838
5891
 
5839
5892
  <!-- cell in table body, footer -->
5840
5893
  <xsl:template match="*[local-name()='td']" name="td">
@@ -5898,11 +5951,11 @@
5898
5951
 
5899
5952
  <xsl:call-template name="refine_table-note-name-style"/>
5900
5953
 
5901
- <xsl:apply-templates select="mn:name"/>
5954
+ <xsl:apply-templates select="mn:fmt-name"/>
5902
5955
 
5903
5956
  </fo:inline>
5904
5957
 
5905
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5958
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5906
5959
  </fo:block>
5907
5960
  </xsl:template> <!-- table/note -->
5908
5961
 
@@ -6041,7 +6094,7 @@
6041
6094
 
6042
6095
  <!-- footnotes for table's name rendering -->
6043
6096
  <xsl:template name="table_name_fn_display">
6044
- <xsl:for-each select="mn:name//mn:fn">
6097
+ <xsl:for-each select="mn:fmt-name//mn:fn">
6045
6098
  <xsl:variable name="reference" select="@reference"/>
6046
6099
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
6047
6100
  <fo:block margin-bottom="12pt">
@@ -6698,7 +6751,7 @@
6698
6751
  </xsl:if> -->
6699
6752
 
6700
6753
  <xsl:variable name="words">
6701
- <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
6754
+ <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
6702
6755
  <word>
6703
6756
  <xsl:copy-of select="."/>
6704
6757
  </word>
@@ -6757,7 +6810,7 @@
6757
6810
  </xsl:copy>
6758
6811
  </xsl:template>
6759
6812
 
6760
- <xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
6813
+ <xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
6761
6814
 
6762
6815
  <xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
6763
6816
  <xsl:variable name="formatting_tags">
@@ -6792,7 +6845,7 @@
6792
6845
  </xsl:call-template>
6793
6846
  </xsl:template>
6794
6847
 
6795
- <xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
6848
+ <xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
6796
6849
  <xsl:variable name="link">
6797
6850
  <link_updated>
6798
6851
  <xsl:variable name="target_text">
@@ -7008,7 +7061,7 @@
7008
7061
 
7009
7062
  <xsl:call-template name="refine_multicomponent_block_style"/>
7010
7063
 
7011
- <xsl:apply-templates select="mn:name">
7064
+ <xsl:apply-templates select="mn:fmt-name">
7012
7065
  <xsl:with-param name="process">true</xsl:with-param>
7013
7066
  </xsl:apply-templates>
7014
7067
 
@@ -7191,7 +7244,7 @@
7191
7244
  </xsl:template> <!-- refine_multicomponent_block_style -->
7192
7245
 
7193
7246
  <!-- dl/name -->
7194
- <xsl:template match="mn:dl/mn:name">
7247
+ <xsl:template match="mn:dl/mn:fmt-name">
7195
7248
  <xsl:param name="process">false</xsl:param>
7196
7249
  <xsl:if test="$process = 'true'">
7197
7250
  <fo:block xsl:use-attribute-sets="dl-name-style">
@@ -7609,12 +7662,12 @@
7609
7662
  <xsl:template match="mn:appendix">
7610
7663
  <xsl:call-template name="setNamedDestination"/>
7611
7664
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
7612
- <xsl:apply-templates select="mn:title"/>
7665
+ <xsl:apply-templates select="mn:fmt-title"/>
7613
7666
  </fo:block>
7614
- <xsl:apply-templates select="node()[not(local-name()='title')]"/>
7667
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
7615
7668
  </xsl:template>
7616
7669
 
7617
- <xsl:template match="mn:appendix/mn:title" priority="2">
7670
+ <xsl:template match="mn:appendix/mn:fmt-title" priority="2">
7618
7671
  <xsl:variable name="level">
7619
7672
  <xsl:call-template name="getLevel"/>
7620
7673
  </xsl:variable>
@@ -7627,9 +7680,9 @@
7627
7680
  <xsl:template match="mn:appendix//mn:example" priority="2">
7628
7681
  <xsl:call-template name="setNamedDestination"/>
7629
7682
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
7630
- <xsl:apply-templates select="mn:name"/>
7683
+ <xsl:apply-templates select="mn:fmt-name"/>
7631
7684
  </fo:block>
7632
- <xsl:apply-templates select="node()[not(local-name()='name')]"/>
7685
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7633
7686
  </xsl:template>
7634
7687
 
7635
7688
  <xsl:attribute-set name="xref-style">
@@ -7637,7 +7690,7 @@
7637
7690
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
7638
7691
  </xsl:attribute-set>
7639
7692
 
7640
- <xsl:template match="mn:xref">
7693
+ <xsl:template match="mn:fmt-xref">
7641
7694
  <xsl:call-template name="insert_basic_link">
7642
7695
  <xsl:with-param name="element">
7643
7696
  <xsl:variable name="alt_text">
@@ -7657,7 +7710,7 @@
7657
7710
  </xsl:template> <!-- xref -->
7658
7711
 
7659
7712
  <!-- command between two xref points to non-standard bibitem -->
7660
- <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="."/>
7713
+ <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="."/>
7661
7714
  </xsl:template>
7662
7715
 
7663
7716
  <xsl:attribute-set name="eref-style">
@@ -7690,7 +7743,7 @@
7690
7743
  <!-- ====== -->
7691
7744
  <!-- eref -->
7692
7745
  <!-- ====== -->
7693
- <xsl:template match="mn:eref" name="eref">
7746
+ <xsl:template match="mn:fmt-eref" name="eref">
7694
7747
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
7695
7748
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
7696
7749
  <xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
@@ -7834,28 +7887,28 @@
7834
7887
 
7835
7888
  <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7836
7889
 
7837
- <xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
7890
+ <xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
7838
7891
 
7839
7892
  <xsl:call-template name="refine_note-name-style"/>
7840
7893
 
7841
7894
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7842
7895
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7843
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7896
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7844
7897
  <xsl:call-template name="append_add-style"/>
7845
7898
  </xsl:if>
7846
7899
 
7847
7900
  <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
7848
- <xsl:if test="count(*[not(self::mn:name)]) = 1 and *[not(self::mn:name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
7849
- <xsl:apply-templates select="*[not(self::mn:name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
7901
+ <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)]">
7902
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
7850
7903
  <xsl:with-param name="skip">false</xsl:with-param>
7851
7904
  </xsl:apply-templates>
7852
7905
  </xsl:if>
7853
7906
 
7854
- <xsl:apply-templates select="mn:name"/>
7907
+ <xsl:apply-templates select="mn:fmt-name"/>
7855
7908
 
7856
7909
  </fo:inline>
7857
7910
 
7858
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7911
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7859
7912
  </fo:block>
7860
7913
  </fo:block-container>
7861
7914
  </fo:block-container>
@@ -7894,19 +7947,19 @@
7894
7947
 
7895
7948
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7896
7949
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7897
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7950
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
7898
7951
  <xsl:call-template name="append_add-style"/>
7899
7952
  </xsl:if>
7900
7953
 
7901
- <xsl:apply-templates select="mn:name"/>
7954
+ <xsl:apply-templates select="mn:fmt-name"/>
7902
7955
 
7903
7956
  </fo:inline>
7904
7957
 
7905
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7958
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7906
7959
  </fo:block>
7907
7960
  </xsl:template>
7908
7961
 
7909
- <xsl:template match="mn:note/mn:name">
7962
+ <xsl:template match="mn:note/mn:fmt-name">
7910
7963
  <xsl:param name="sfx"/>
7911
7964
  <xsl:variable name="suffix">
7912
7965
  <xsl:choose>
@@ -7933,7 +7986,7 @@
7933
7986
  </xsl:if>
7934
7987
  </xsl:template>
7935
7988
 
7936
- <xsl:template match="mn:termnote/mn:name">
7989
+ <xsl:template match="mn:termnote/mn:fmt-name">
7937
7990
  <xsl:param name="sfx"/>
7938
7991
  <xsl:variable name="suffix">
7939
7992
  <xsl:choose>
@@ -8016,15 +8069,15 @@
8016
8069
 
8017
8070
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8018
8071
  <fo:block role="BlockQuote">
8019
- <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 -->
8072
+ <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 -->
8020
8073
  </fo:block>
8021
8074
  </fo:block-container>
8022
8075
  </fo:block-container>
8023
- <xsl:if test="mn:author or mn:source or mn:attribution">
8076
+ <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
8024
8077
  <fo:block xsl:use-attribute-sets="quote-source-style">
8025
8078
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
8026
8079
  <xsl:apply-templates select="mn:author"/>
8027
- <xsl:apply-templates select="mn:source"/>
8080
+ <xsl:apply-templates select="mn:fmt-source"/>
8028
8081
  <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
8029
8082
  <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
8030
8083
  </fo:block>
@@ -8034,17 +8087,32 @@
8034
8087
  </fo:block-container>
8035
8088
  </xsl:template>
8036
8089
 
8037
- <xsl:template match="mn:source">
8090
+ <xsl:template match="mn:fmt-source">
8038
8091
  <xsl:if test="../mn:author">
8039
8092
  <xsl:text>, </xsl:text>
8040
8093
  </xsl:if>
8041
- <xsl:call-template name="insert_basic_link">
8042
- <xsl:with-param name="element">
8043
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
8044
- <xsl:apply-templates/>
8045
- </fo:basic-link>
8046
- </xsl:with-param>
8047
- </xsl:call-template>
8094
+ <xsl:choose>
8095
+ <xsl:when test="not(parent::quote)">
8096
+ <fo:block>
8097
+ <xsl:call-template name="insert_basic_link">
8098
+ <xsl:with-param name="element">
8099
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
8100
+ <xsl:apply-templates/>
8101
+ </fo:basic-link>
8102
+ </xsl:with-param>
8103
+ </xsl:call-template>
8104
+ </fo:block>
8105
+ </xsl:when>
8106
+ <xsl:otherwise>
8107
+ <xsl:call-template name="insert_basic_link">
8108
+ <xsl:with-param name="element">
8109
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
8110
+ <xsl:apply-templates/>
8111
+ </fo:basic-link>
8112
+ </xsl:with-param>
8113
+ </xsl:call-template>
8114
+ </xsl:otherwise>
8115
+ </xsl:choose>
8048
8116
  </xsl:template>
8049
8117
 
8050
8118
  <xsl:template match="mn:author">
@@ -8125,7 +8193,7 @@
8125
8193
  <ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
8126
8194
  <xsl:choose>
8127
8195
  <!-- skip figure/name/fn -->
8128
- <xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
8196
+ <xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
8129
8197
  <xsl:otherwise>
8130
8198
  <xsl:element name="figure" namespace="{$namespace_full}">
8131
8199
  <xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
@@ -8321,17 +8389,17 @@
8321
8389
 
8322
8390
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
8323
8391
 
8324
- <xsl:for-each select="mn:name"> <!-- set context -->
8392
+ <xsl:for-each select="mn:fmt-name"> <!-- set context -->
8325
8393
  <xsl:call-template name="setIDforNamedDestination"/>
8326
8394
  </xsl:for-each>
8327
8395
 
8328
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
8396
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
8329
8397
  </fo:block>
8330
8398
 
8331
8399
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
8332
8400
  <xsl:call-template name="showFigureKey"/>
8333
8401
  </xsl:if>
8334
- <xsl:apply-templates select="mn:name"/> <!-- show figure's name AFTER image -->
8402
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
8335
8403
 
8336
8404
  </fo:block-container>
8337
8405
  </xsl:template>
@@ -8357,9 +8425,9 @@
8357
8425
  <xsl:template match="mn:figure[@class = 'pseudocode']">
8358
8426
  <xsl:call-template name="setNamedDestination"/>
8359
8427
  <fo:block id="{@id}">
8360
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
8428
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8361
8429
  </fo:block>
8362
- <xsl:apply-templates select="mn:name"/>
8430
+ <xsl:apply-templates select="mn:fmt-name"/>
8363
8431
  </xsl:template>
8364
8432
 
8365
8433
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
@@ -8370,7 +8438,7 @@
8370
8438
 
8371
8439
  <!-- SOURCE: ... -->
8372
8440
  <!-- figure/source -->
8373
- <xsl:template match="mn:figure/mn:source" priority="2">
8441
+ <xsl:template match="mn:figure/mn:fmt-source" priority="2">
8374
8442
  <xsl:call-template name="termsource"/>
8375
8443
  </xsl:template>
8376
8444
 
@@ -8380,7 +8448,7 @@
8380
8448
  <xsl:variable name="isAdded" select="../@added"/>
8381
8449
  <xsl:variable name="isDeleted" select="../@deleted"/>
8382
8450
  <xsl:choose>
8383
- <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) -->
8451
+ <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) -->
8384
8452
  <fo:inline padding-left="1mm" padding-right="1mm">
8385
8453
  <xsl:if test="not(parent::mn:figure) or parent::mn:p">
8386
8454
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -8401,13 +8469,26 @@
8401
8469
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
8402
8470
 
8403
8471
  <xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
8404
- <xsl:attribute name="width">100%</xsl:attribute>
8472
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
8473
+ <xsl:choose>
8474
+ <xsl:when test="@width and not(@height)">
8475
+ <xsl:attribute name="width">100%</xsl:attribute>
8476
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8477
+ </xsl:when>
8478
+ <xsl:when test="@height and not(@width)">
8479
+ <xsl:attribute name="height">100%</xsl:attribute>
8480
+ <xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
8481
+ </xsl:when>
8482
+ <xsl:when test="not(@width) and not(@height)">
8483
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8484
+ </xsl:when>
8485
+ </xsl:choose>
8486
+
8405
8487
  <xsl:if test="normalize-space($logo_width) != ''">
8406
8488
  <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
8407
8489
  </xsl:if>
8408
- <xsl:attribute name="content-height">100%</xsl:attribute>
8409
8490
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8410
- <xsl:attribute name="scaling">uniform</xsl:attribute>
8491
+ <xsl:attribute name="vertical-align">top</xsl:attribute>
8411
8492
  </xsl:if>
8412
8493
 
8413
8494
  <xsl:variable name="width">
@@ -8696,7 +8777,7 @@
8696
8777
  <xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
8697
8778
  <xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
8698
8779
 
8699
- <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
8780
+ <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
8700
8781
  <xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
8701
8782
  <xsl:param name="name"/>
8702
8783
 
@@ -8706,8 +8787,8 @@
8706
8787
 
8707
8788
  <xsl:variable name="alt-text">
8708
8789
  <xsl:choose>
8709
- <xsl:when test="normalize-space(../mn:name) != ''">
8710
- <xsl:value-of select="../mn:name"/>
8790
+ <xsl:when test="normalize-space(../mn:fmt-name) != ''">
8791
+ <xsl:value-of select="../mn:fmt-name"/>
8711
8792
  </xsl:when>
8712
8793
  <xsl:when test="normalize-space($name) != ''">
8713
8794
  <xsl:value-of select="$name"/>
@@ -8716,7 +8797,7 @@
8716
8797
  </xsl:choose>
8717
8798
  </xsl:variable>
8718
8799
 
8719
- <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
8800
+ <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
8720
8801
 
8721
8802
  <xsl:choose>
8722
8803
  <xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
@@ -8765,9 +8846,9 @@
8765
8846
  <fo:table-cell column-number="2">
8766
8847
  <fo:block>
8767
8848
  <fo:block-container width="{$width_scale}px" height="{$height_scale}px">
8768
- <xsl:if test="../mn:name/mn:bookmark">
8849
+ <xsl:if test="../mn:fmt-name/mn:bookmark">
8769
8850
  <fo:block line-height="0" font-size="0">
8770
- <xsl:for-each select="../mn:name/mn:bookmark">
8851
+ <xsl:for-each select="../mn:fmt-name/mn:bookmark">
8771
8852
  <xsl:call-template name="bookmark"/>
8772
8853
  </xsl:for-each>
8773
8854
  </fo:block>
@@ -9007,7 +9088,7 @@
9007
9088
 
9008
9089
  <!-- image with svg and emf -->
9009
9090
  <xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
9010
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
9091
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
9011
9092
  <xsl:for-each select="*[local-name() = 'svg']">
9012
9093
  <xsl:call-template name="image_svg">
9013
9094
  <xsl:with-param name="name" select="$name"/>
@@ -9024,7 +9105,7 @@
9024
9105
 
9025
9106
  <xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
9026
9107
  <xsl:variable name="svg_content" select="document(@src)"/>
9027
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
9108
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
9028
9109
  <xsl:for-each select="xalan:nodeset($svg_content)/node()">
9029
9110
  <xsl:call-template name="image_svg">
9030
9111
  <xsl:with-param name="name" select="$name"/>
@@ -9147,7 +9228,7 @@
9147
9228
  <xsl:template match="mn:emf"/>
9148
9229
 
9149
9230
  <!-- figure/name -->
9150
- <xsl:template match="mn:figure/mn:name | mn:image/mn:name">
9231
+ <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
9151
9232
  <xsl:if test="normalize-space() != ''">
9152
9233
  <fo:block xsl:use-attribute-sets="figure-name-style">
9153
9234
 
@@ -9219,25 +9300,25 @@
9219
9300
  <fo:block-container margin-left="0mm" role="SKIP">
9220
9301
  <xsl:call-template name="setNamedDestination"/>
9221
9302
  <fo:block id="{@id}">
9222
- <xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
9303
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
9223
9304
  </fo:block>
9224
9305
  </fo:block-container>
9225
9306
  </fo:block-container>
9226
9307
  </xsl:template>
9227
9308
 
9228
- <xsl:template match="mn:formula/mn:dt/mn:stem">
9309
+ <xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
9229
9310
  <fo:inline>
9230
9311
  <xsl:apply-templates/>
9231
9312
  </fo:inline>
9232
9313
  </xsl:template>
9233
9314
 
9234
- <xsl:template match="mn:admitted/mn:stem">
9315
+ <xsl:template match="mn:fmt-admitted/mn:fmt-stem">
9235
9316
  <fo:inline>
9236
9317
  <xsl:apply-templates/>
9237
9318
  </fo:inline>
9238
9319
  </xsl:template>
9239
9320
 
9240
- <xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
9321
+ <xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
9241
9322
  <!-- https://github.com/metanorma/isodoc/issues/607
9242
9323
  <xsl:if test="normalize-space() != ''">
9243
9324
  <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
@@ -9246,7 +9327,7 @@
9246
9327
  </xsl:template>
9247
9328
 
9248
9329
  <!-- stem inside formula with name (with formula's number) -->
9249
- <xsl:template match="mn:formula[mn:name]/mn:stem">
9330
+ <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
9250
9331
  <fo:block xsl:use-attribute-sets="formula-style">
9251
9332
 
9252
9333
  <fo:table table-layout="fixed" width="100%">
@@ -9266,13 +9347,13 @@
9266
9347
 
9267
9348
  <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
9268
9349
 
9269
- <xsl:for-each select="../mn:name">
9350
+ <xsl:for-each select="../mn:fmt-name">
9270
9351
  <xsl:call-template name="setIDforNamedDestination"/>
9271
9352
  </xsl:for-each>
9272
9353
 
9273
9354
  <xsl:call-template name="refine_formula-stem-number-style"/>
9274
9355
 
9275
- <xsl:apply-templates select="../mn:name"/>
9356
+ <xsl:apply-templates select="../mn:fmt-name"/>
9276
9357
  </fo:block>
9277
9358
  </fo:table-cell>
9278
9359
  </fo:table-row>
@@ -9282,7 +9363,7 @@
9282
9363
  </xsl:template>
9283
9364
 
9284
9365
  <!-- stem inside formula without name (without formula's number) -->
9285
- <xsl:template match="mn:formula[not(mn:name)]/mn:stem">
9366
+ <xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
9286
9367
  <fo:block xsl:use-attribute-sets="formula-style">
9287
9368
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
9288
9369
  <xsl:apply-templates/>
@@ -9636,7 +9717,7 @@
9636
9717
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
9637
9718
  <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
9638
9719
  -->
9639
- <xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
9720
+ <xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
9640
9721
  <fo:inline xsl:use-attribute-sets="mathml-style">
9641
9722
 
9642
9723
  <xsl:call-template name="refine_mathml-style"/>
@@ -9903,7 +9984,7 @@
9903
9984
 
9904
9985
  <xsl:template match="mn:ul | mn:ol" mode="list" name="list">
9905
9986
 
9906
- <xsl:apply-templates select="mn:name">
9987
+ <xsl:apply-templates select="mn:fmt-name">
9907
9988
  <xsl:with-param name="process">true</xsl:with-param>
9908
9989
  </xsl:apply-templates>
9909
9990
 
@@ -9949,7 +10030,7 @@
9949
10030
 
9950
10031
  <xsl:call-template name="refine_list-style"/>
9951
10032
 
9952
- <xsl:if test="mn:name">
10033
+ <xsl:if test="mn:fmt-name">
9953
10034
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
9954
10035
  </xsl:if>
9955
10036
 
@@ -9964,7 +10045,7 @@
9964
10045
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
9965
10046
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
9966
10047
 
9967
- <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
10048
+ <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
9968
10049
  <xsl:param name="process">false</xsl:param>
9969
10050
  <xsl:if test="$process = 'true'">
9970
10051
  <fo:block xsl:use-attribute-sets="list-name-style">
@@ -10096,7 +10177,7 @@
10096
10177
  -->
10097
10178
  <!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
10098
10179
  <!-- fn in text -->
10099
- <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))]" priority="2" name="fn">
10180
+ <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))]" priority="2" name="fn">
10100
10181
  <xsl:param name="footnote_body_from_table">false</xsl:param>
10101
10182
 
10102
10183
  <!-- list of unique footnotes -->
@@ -10220,7 +10301,7 @@
10220
10301
  <!-- commented:
10221
10302
  .//mn:bibitem[ancestor::mn:references]/mn:note |
10222
10303
  because 'fn' there is in biblio-tag -->
10223
- <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])]">
10304
+ <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])]">
10224
10305
  <!-- copy unique fn -->
10225
10306
  <fn gen_id="{generate-id(.)}">
10226
10307
  <xsl:copy-of select="@*"/>
@@ -10305,7 +10386,7 @@
10305
10386
  <xsl:call-template name="displayAdmonitionName"/>
10306
10387
  </fo:block>
10307
10388
  <fo:block xsl:use-attribute-sets="admonition-p-style">
10308
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
10389
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
10309
10390
  </fo:block>
10310
10391
 
10311
10392
  </fo:block-container>
@@ -10331,7 +10412,7 @@
10331
10412
  </xsl:otherwise>
10332
10413
  </xsl:choose> -->
10333
10414
  <xsl:variable name="name">
10334
- <xsl:apply-templates select="mn:name"/>
10415
+ <xsl:apply-templates select="mn:fmt-name"/>
10335
10416
  </xsl:variable>
10336
10417
  <xsl:copy-of select="$name"/>
10337
10418
  <xsl:if test="normalize-space($name) != ''">
@@ -10339,7 +10420,7 @@
10339
10420
  </xsl:if>
10340
10421
  </xsl:template>
10341
10422
 
10342
- <xsl:template match="mn:admonition/mn:name">
10423
+ <xsl:template match="mn:admonition/mn:fmt-name">
10343
10424
  <xsl:apply-templates/>
10344
10425
  </xsl:template>
10345
10426
 
@@ -10464,10 +10545,10 @@
10464
10545
  <xsl:call-template name="setNamedDestination"/>
10465
10546
  <fo:block id="{@id}"/>
10466
10547
 
10467
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
10548
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
10468
10549
 
10469
10550
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
10470
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
10551
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
10471
10552
  </fo:block>
10472
10553
  </xsl:template> <!-- references -->
10473
10554
 
@@ -10783,7 +10864,8 @@
10783
10864
  </xsl:copy>
10784
10865
  </xsl:template>
10785
10866
 
10786
- <xsl:template match="mn:xref" mode="index_add_id">
10867
+ <xsl:template match="mn:xref" mode="index_add_id"/>
10868
+ <xsl:template match="mn:fmt-xref" mode="index_add_id">
10787
10869
  <xsl:param name="docid"/>
10788
10870
  <xsl:variable name="id">
10789
10871
  <xsl:call-template name="generateIndexXrefId">
@@ -10825,7 +10907,7 @@
10825
10907
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
10826
10908
  <xsl:copy>
10827
10909
  <xsl:apply-templates select="@*" mode="index_update"/>
10828
- <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
10910
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
10829
10911
  </xsl:copy>
10830
10912
  </xsl:template>
10831
10913
 
@@ -10846,11 +10928,11 @@
10846
10928
  <xsl:value-of select="."/>
10847
10929
  <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
10848
10930
  </xsl:when>
10849
- <xsl:when test="self::* and local-name(.) = 'xref'">
10931
+ <xsl:when test="self::* and local-name(.) = 'fmt-xref'">
10850
10932
  <xsl:variable name="id" select="@id"/>
10851
10933
 
10852
- <xsl:variable name="id_next" select="following-sibling::mn:xref[1]/@id"/>
10853
- <xsl:variable name="id_prev" select="preceding-sibling::mn:xref[1]/@id"/>
10934
+ <xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
10935
+ <xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
10854
10936
 
10855
10937
  <xsl:variable name="pages_">
10856
10938
  <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
@@ -10946,18 +11028,18 @@
10946
11028
  <xsl:variable name="item_number">
10947
11029
  <xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
10948
11030
  </xsl:variable>
10949
- <xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
11031
+ <xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
10950
11032
  <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
10951
11033
  </xsl:template>
10952
11034
 
10953
- <xsl:template match="mn:indexsect/mn:title" priority="4">
11035
+ <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
10954
11036
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
10955
11037
  <!-- Index -->
10956
11038
  <xsl:apply-templates/>
10957
11039
  </fo:block>
10958
11040
  </xsl:template>
10959
11041
 
10960
- <xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
11042
+ <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
10961
11043
  <!-- Letter A, B, C, ... -->
10962
11044
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
10963
11045
  <xsl:apply-templates/>
@@ -10998,12 +11080,12 @@
10998
11080
  <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"/>
10999
11081
  <bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
11000
11082
  <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"/> -->
11001
- <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]">
11083
+ <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]">
11002
11084
  <!-- skip here, see the template 'fmt-review-start' -->
11003
11085
  </xsl:when>
11004
11086
  <xsl:otherwise>
11005
11087
  <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
11006
- <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>
11088
+ <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>
11007
11089
  <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
11008
11090
  <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
11009
11091
  </xsl:otherwise>
@@ -11167,7 +11249,7 @@
11167
11249
 
11168
11250
  <xsl:template name="processTables_Contents">
11169
11251
  <mnx:tables>
11170
- <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
11252
+ <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
11171
11253
  <xsl:choose>
11172
11254
  <xsl:when test="mn:fmt-name">
11173
11255
  <xsl:variable name="fmt_name">
@@ -11189,7 +11271,7 @@
11189
11271
 
11190
11272
  <xsl:template name="processFigures_Contents">
11191
11273
  <mnx:figures>
11192
- <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) != '']">
11274
+ <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) != '']">
11193
11275
  <xsl:choose>
11194
11276
  <xsl:when test="mn:fmt-name">
11195
11277
  <xsl:variable name="fmt_name">
@@ -11218,7 +11300,7 @@
11218
11300
 
11219
11301
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
11220
11302
 
11221
- <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">
11303
+ <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">
11222
11304
  <xsl:apply-templates mode="contents"/>
11223
11305
  <xsl:text> </xsl:text>
11224
11306
  </xsl:template>
@@ -11230,7 +11312,7 @@
11230
11312
  </xsl:if>
11231
11313
  </xsl:template>
11232
11314
 
11233
- <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">
11315
+ <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">
11234
11316
  <xsl:apply-templates mode="bookmarks"/>
11235
11317
  <xsl:text> </xsl:text>
11236
11318
  </xsl:template>
@@ -11241,7 +11323,7 @@
11241
11323
  </xsl:if>
11242
11324
  </xsl:template>
11243
11325
 
11244
- <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">
11326
+ <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">
11245
11327
  <xsl:value-of select="."/>
11246
11328
  </xsl:template>
11247
11329
 
@@ -11251,7 +11333,7 @@
11251
11333
  </xsl:if>
11252
11334
  </xsl:template>
11253
11335
 
11254
- <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">
11336
+ <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">
11255
11337
  <xsl:value-of select="."/>
11256
11338
  </xsl:template>
11257
11339
 
@@ -11681,7 +11763,7 @@
11681
11763
  <xsl:value-of select="."/>
11682
11764
  </xsl:template>
11683
11765
 
11684
- <xsl:template match="mn:review" mode="contents_item"/>
11766
+ <xsl:template match="mn:annotation" mode="contents_item"/>
11685
11767
 
11686
11768
  <xsl:template match="mn:tab" mode="contents_item">
11687
11769
  <xsl:text> </xsl:text>
@@ -11836,7 +11918,7 @@
11836
11918
  <xsl:apply-templates/>
11837
11919
  </xsl:template>
11838
11920
 
11839
- <xsl:template match="mn:toc//mn:xref" priority="3">
11921
+ <xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
11840
11922
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11841
11923
  <!-- New format: one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11842
11924
  <!-- <test><xsl:copy-of select="."/></test> -->
@@ -11904,8 +11986,8 @@
11904
11986
  <xsl:apply-templates mode="toc_table_width"/>
11905
11987
  </xsl:template>
11906
11988
 
11907
- <xsl:template match="mn:clause[@type = 'toc']/mn:title" mode="toc_table_width"/>
11908
- <xsl:template match="mn:clause[not(@type = 'toc')]/mn:title" mode="toc_table_width"/>
11989
+ <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
11990
+ <xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
11909
11991
 
11910
11992
  <xsl:template match="mn:li" mode="toc_table_width">
11911
11993
  <mn:tr>
@@ -11913,7 +11995,7 @@
11913
11995
  </mn:tr>
11914
11996
  </xsl:template>
11915
11997
 
11916
- <xsl:template match="mn:xref" mode="toc_table_width">
11998
+ <xsl:template match="mn:fmt-xref" mode="toc_table_width">
11917
11999
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11918
12000
  <!-- New format - one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
11919
12001
  <xsl:for-each select="mn:tab">
@@ -11959,7 +12041,7 @@
11959
12041
 
11960
12042
  <xsl:variable name="padding">
11961
12043
  <xsl:choose>
11962
- <xsl:when test="ancestor::mn:note and ancestor::mn:name">4</xsl:when>
12044
+ <xsl:when test="ancestor::mn:note and ancestor::mn:fmt-name">4</xsl:when>
11963
12045
  <xsl:when test="$depth &gt;= 5"/>
11964
12046
  <xsl:when test="$depth &gt;= 4">5</xsl:when>
11965
12047
  <xsl:when test="$depth &gt;= 3 and ancestor::mn:terms">3</xsl:when>
@@ -11996,10 +12078,10 @@
11996
12078
 
11997
12079
  </xsl:template> <!-- tab -->
11998
12080
 
11999
- <xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
12000
- <xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
12081
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
12082
+ <xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
12001
12083
 
12002
- <xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
12084
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
12003
12085
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
12004
12086
  </xsl:template>
12005
12087
 
@@ -12014,13 +12096,13 @@
12014
12096
  </xsl:template>
12015
12097
 
12016
12098
  <xsl:variable name="reviews_">
12017
- <xsl:for-each select="//mn:review[not(parent::mn:review-container)][@from]">
12099
+ <xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
12018
12100
  <xsl:copy>
12019
12101
  <xsl:copy-of select="@from"/>
12020
12102
  <xsl:copy-of select="@id"/>
12021
12103
  </xsl:copy>
12022
12104
  </xsl:for-each>
12023
- <xsl:for-each select="//mn:fmt-review-start[@source]">
12105
+ <xsl:for-each select="//mn:fmt-annotation-start[@source]">
12024
12106
  <xsl:copy>
12025
12107
  <xsl:copy-of select="@source"/>
12026
12108
  <xsl:copy-of select="@id"/>
@@ -12034,7 +12116,7 @@
12034
12116
  <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
12035
12117
  <xsl:variable name="curr_id" select="@id"/>
12036
12118
  <!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
12037
- <xsl:for-each select="$reviews//mn:review[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
12119
+ <xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
12038
12120
  <xsl:variable name="review_id" select="normalize-space(@id)"/>
12039
12121
  <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
12040
12122
  <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>
@@ -12049,7 +12131,7 @@
12049
12131
 
12050
12132
  <!-- document text (not figures, or tables) footnotes -->
12051
12133
  <xsl:variable name="reviews_container_">
12052
- <xsl:for-each select="//mn:review-container/mn:fmt-review-body">
12134
+ <xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
12053
12135
  <xsl:variable name="update_xml_step1">
12054
12136
  <xsl:apply-templates select="." mode="update_xml_step1"/>
12055
12137
  </xsl:variable>
@@ -12058,10 +12140,10 @@
12058
12140
  </xsl:variable>
12059
12141
  <xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
12060
12142
 
12061
- <xsl:template match="mn:review-container"/>
12143
+ <xsl:template match="mn:annotation-container"/>
12062
12144
 
12063
12145
  <!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
12064
- <xsl:template match="mn:review[not(parent::mn:review-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
12146
+ <xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
12065
12147
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
12066
12148
  <xsl:if test="$isGenerateTableIF = 'false'">
12067
12149
  <xsl:choose>
@@ -12081,7 +12163,7 @@
12081
12163
  </xsl:template>
12082
12164
 
12083
12165
  <!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
12084
- <xsl:template match="mn:fmt-review-start" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
12166
+ <xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
12085
12167
  <!-- comment 2019-11-29 -->
12086
12168
  <!-- <fo:block font-weight="bold">Review:</fo:block>
12087
12169
  <xsl:apply-templates /> -->
@@ -12137,7 +12219,7 @@
12137
12219
  </xsl:template>
12138
12220
 
12139
12221
  <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
12140
- <xsl:template match="mn:review[@type = 'other']"/>
12222
+ <xsl:template match="mn:annotation[@type = 'other']"/>
12141
12223
 
12142
12224
  <!-- ============ -->
12143
12225
  <!-- errata -->
@@ -12530,9 +12612,12 @@
12530
12612
  <xsl:choose>
12531
12613
  <xsl:when test="mn:fmt-title">
12532
12614
  <xsl:variable name="fmt_title_section">
12533
- <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:review)]"/>
12615
+ <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
12534
12616
  </xsl:variable>
12535
12617
  <xsl:value-of select="normalize-space($fmt_title_section)"/>
12618
+ <xsl:if test="normalize-space($fmt_title_section) = ''">
12619
+ <xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
12620
+ </xsl:if>
12536
12621
  </xsl:when>
12537
12622
  <xsl:otherwise>
12538
12623
  <xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
@@ -12545,6 +12630,9 @@
12545
12630
  <xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
12546
12631
  <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
12547
12632
  </xsl:when>
12633
+ <xsl:when test="mn:fmt-title/mn:tab">
12634
+ <xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
12635
+ </xsl:when>
12548
12636
  <xsl:when test="mn:fmt-title">
12549
12637
  <xsl:copy-of select="mn:fmt-title/node()"/>
12550
12638
  </xsl:when>
@@ -12686,10 +12774,10 @@
12686
12774
 
12687
12775
  </fo:block>
12688
12776
 
12689
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
12777
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
12690
12778
 
12691
12779
  <fo:block>
12692
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
12780
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
12693
12781
  </fo:block>
12694
12782
  </xsl:otherwise>
12695
12783
  </xsl:choose>
@@ -12698,7 +12786,7 @@
12698
12786
  <xsl:template name="refine_annex_style">
12699
12787
  </xsl:template>
12700
12788
 
12701
- <xsl:template match="mn:name/text()">
12789
+ <xsl:template match="mn:name/text() | mn:fmt-name/text()">
12702
12790
  <!-- 0xA0 to space replacement -->
12703
12791
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
12704
12792
  </xsl:template>
@@ -12754,28 +12842,28 @@
12754
12842
  <xsl:template match="mn:amend"/>
12755
12843
 
12756
12844
  <!-- fmt-title renamed to title in update_xml_step1 -->
12757
- <xsl:template match="mn:fmt-title"/>
12845
+ <!-- <xsl:template match="mn:fmt-title" /> -->
12758
12846
 
12759
12847
  <!-- fmt-name renamed to name in update_xml_step1 -->
12760
- <xsl:template match="mn:fmt-name"/>
12848
+ <!-- <xsl:template match="mn:fmt-name" /> -->
12761
12849
 
12762
12850
  <!-- fmt-preferred renamed to preferred in update_xml_step1 -->
12763
- <xsl:template match="mn:fmt-preferred"/>
12851
+ <!-- <xsl:template match="mn:fmt-preferred" /> -->
12764
12852
 
12765
12853
  <!-- fmt-admitted renamed to admitted in update_xml_step1 -->
12766
- <xsl:template match="mn:fmt-admitted"/>
12854
+ <!-- <xsl:template match="mn:fmt-admitted" /> -->
12767
12855
 
12768
12856
  <!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
12769
- <xsl:template match="mn:fmt-deprecates"/>
12857
+ <!-- <xsl:template match="mn:fmt-deprecates" /> -->
12770
12858
 
12771
12859
  <!-- fmt-definition renamed to definition in update_xml_step1 -->
12772
- <xsl:template match="mn:fmt-definition"/>
12860
+ <!-- <xsl:template match="mn:fmt-definition" /> -->
12773
12861
 
12774
12862
  <!-- fmt-termsource renamed to termsource in update_xml_step1 -->
12775
- <xsl:template match="mn:fmt-termsource"/>
12863
+ <!-- <xsl:template match="mn:fmt-termsource" /> -->
12776
12864
 
12777
12865
  <!-- fmt-source renamed to source in update_xml_step1 -->
12778
- <xsl:template match="mn:fmt-source"/>
12866
+ <!-- <xsl:template match="mn:fmt-source" /> -->
12779
12867
 
12780
12868
  <xsl:template match="mn:semx">
12781
12869
  <xsl:apply-templates/>
@@ -13220,12 +13308,12 @@
13220
13308
  <xsl:when test="ancestor::mn:preface">
13221
13309
  <xsl:value-of select="$level_total - 2"/>
13222
13310
  </xsl:when>
13223
- <xsl:when test="ancestor::mn:sections and self::mn:title">
13311
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
13224
13312
  <!-- determine 'depth' depends on upper clause with title/@depth -->
13225
13313
  <!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
13226
- <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:title/@depth][1]/mn:title/@depth"/>
13314
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
13227
13315
  <!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
13228
- <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:title/@depth][1]/ancestor::*)"/>
13316
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
13229
13317
  <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
13230
13318
  <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
13231
13319
  <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
@@ -13241,8 +13329,8 @@
13241
13329
  </xsl:otherwise>
13242
13330
  </xsl:choose>
13243
13331
  </xsl:when>
13244
- <xsl:when test="ancestor::mn:sections and self::mn:name and parent::mn:term">
13245
- <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:title/@depth)"/>
13332
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
13333
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
13246
13334
  <xsl:choose>
13247
13335
  <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
13248
13336
  <xsl:value-of select="number($upper_terms_depth + 1)"/>
@@ -13253,7 +13341,7 @@
13253
13341
  </xsl:choose>
13254
13342
  </xsl:when>
13255
13343
  <xsl:when test="ancestor::mn:sections">
13256
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:title/@depth)"/>
13344
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
13257
13345
  <xsl:choose>
13258
13346
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13259
13347
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -13269,8 +13357,8 @@
13269
13357
  <xsl:when test="parent::mn:annex">
13270
13358
  <xsl:value-of select="$level_total - 1"/>
13271
13359
  </xsl:when>
13272
- <xsl:when test="ancestor::mn:annex and self::mn:title">
13273
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:title/@depth)"/>
13360
+ <xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
13361
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
13274
13362
  <xsl:choose>
13275
13363
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13276
13364
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -13303,7 +13391,7 @@
13303
13391
  </xsl:when>
13304
13392
  <xsl:otherwise>
13305
13393
  <xsl:variable name="title_level_">
13306
- <xsl:for-each select="../preceding-sibling::mn:title[1]">
13394
+ <xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
13307
13395
  <xsl:call-template name="getLevel"/>
13308
13396
  </xsl:for-each>
13309
13397
  </xsl:variable>
@@ -13380,15 +13468,17 @@
13380
13468
  </xsl:template>
13381
13469
 
13382
13470
  <xsl:template name="setNamedDestination">
13383
- <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
13384
- <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'">
13385
- <fox:destination internal-destination="{@id}"/>
13386
- </xsl:if>
13387
- <xsl:for-each select=". | mn:title | mn:name">
13388
- <xsl:if test="@named_dest">
13389
- <fox:destination internal-destination="{@named_dest}"/>
13471
+ <xsl:if test="$isGenerateTableIF = 'false'">
13472
+ <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
13473
+ <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'">
13474
+ <fox:destination internal-destination="{@id}"/>
13390
13475
  </xsl:if>
13391
- </xsl:for-each>
13476
+ <xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
13477
+ <xsl:if test="@named_dest">
13478
+ <fox:destination internal-destination="{@named_dest}"/>
13479
+ </xsl:if>
13480
+ </xsl:for-each>
13481
+ </xsl:if>
13392
13482
  </xsl:template>
13393
13483
 
13394
13484
  <xsl:template name="add-letter-spacing">
@@ -13736,7 +13826,7 @@
13736
13826
  </xsl:when>
13737
13827
  <xsl:otherwise>
13738
13828
  <!-- namespace-uri(ancestor::mn:title) != '' to skip title from $contents -->
13739
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
13829
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
13740
13830
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
13741
13831
  </xsl:if>
13742
13832
  <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">
@@ -13770,7 +13860,7 @@
13770
13860
  </fo:block>
13771
13861
  </fo:block-container>
13772
13862
  </fo:inline-container>
13773
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
13863
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
13774
13864
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
13775
13865
  </xsl:if>
13776
13866
  </xsl:otherwise>