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
 
@@ -233,6 +233,52 @@
233
233
  </xsl:variable>
234
234
  <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
235
235
 
236
+ <xsl:template name="layout-master-set">
237
+ <fo:layout-master-set>
238
+ <!-- Cover page -->
239
+ <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
240
+ <fo:region-body margin-top="16.5mm" margin-bottom="10mm" margin-left="16.5mm" margin-right="14mm"/>
241
+ <fo:region-before region-name="cover-page-header" extent="16.5mm"/>
242
+ <fo:region-after extent="10mm"/>
243
+ <fo:region-start extent="16.5mm"/>
244
+ <fo:region-end extent="14mm"/>
245
+ </fo:simple-page-master>
246
+
247
+ <!-- Preface pages -->
248
+ <fo:simple-page-master master-name="preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
249
+ <fo:region-body margin-top="16.5mm" margin-bottom="22.5mm" margin-left="16.5mm" margin-right="16.5mm"/>
250
+ <fo:region-before region-name="header" extent="16.5mm"/>
251
+ <fo:region-after region-name="footer" extent="22.5mm"/>
252
+ <fo:region-start region-name="left-region" extent="16.5mm"/>
253
+ <fo:region-end region-name="right-region" extent="16.5mm"/>
254
+ </fo:simple-page-master>
255
+ <fo:simple-page-master master-name="preface-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
256
+ <fo:region-body margin-top="16.5mm" margin-bottom="22.5mm" margin-left="16.5mm" margin-right="16.5mm"/>
257
+ <fo:region-before region-name="header" extent="16.5mm"/>
258
+ <fo:region-after region-name="footer" extent="22.5mm"/>
259
+ <fo:region-start region-name="left-region" extent="16.5mm"/>
260
+ <fo:region-end region-name="right-region" extent="16.5mm"/>
261
+ </fo:simple-page-master>
262
+
263
+ <!-- Document pages -->
264
+ <fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
265
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
266
+ <fo:region-before region-name="header" extent="{$marginTop}mm"/>
267
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
268
+ <fo:region-start region-name="left-region" extent="16.5mm"/>
269
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
270
+ </fo:simple-page-master>
271
+ <fo:simple-page-master master-name="document-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
272
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
273
+ <fo:region-before region-name="header" extent="{$marginTop}mm"/>
274
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
275
+ <fo:region-start region-name="left-region" extent="16.5mm"/>
276
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
277
+ </fo:simple-page-master>
278
+
279
+ </fo:layout-master-set>
280
+ </xsl:template> <!-- END: layout-master-set -->
281
+
236
282
  <xsl:template match="/">
237
283
 
238
284
  <fo:root xml:lang="{$lang}">
@@ -242,49 +288,8 @@
242
288
  <xsl:call-template name="insertRootStyle">
243
289
  <xsl:with-param name="root-style" select="$root-style"/>
244
290
  </xsl:call-template>
245
- <fo:layout-master-set>
246
- <!-- Cover page -->
247
- <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
248
- <fo:region-body margin-top="16.5mm" margin-bottom="10mm" margin-left="16.5mm" margin-right="14mm"/>
249
- <fo:region-before region-name="cover-page-header" extent="16.5mm"/>
250
- <fo:region-after extent="10mm"/>
251
- <fo:region-start extent="16.5mm"/>
252
- <fo:region-end extent="14mm"/>
253
- </fo:simple-page-master>
254
-
255
- <!-- Preface pages -->
256
- <fo:simple-page-master master-name="preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
257
- <fo:region-body margin-top="16.5mm" margin-bottom="22.5mm" margin-left="16.5mm" margin-right="16.5mm"/>
258
- <fo:region-before region-name="header" extent="16.5mm"/>
259
- <fo:region-after region-name="footer" extent="22.5mm"/>
260
- <fo:region-start region-name="left-region" extent="16.5mm"/>
261
- <fo:region-end region-name="right-region" extent="16.5mm"/>
262
- </fo:simple-page-master>
263
- <fo:simple-page-master master-name="preface-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
264
- <fo:region-body margin-top="16.5mm" margin-bottom="22.5mm" margin-left="16.5mm" margin-right="16.5mm"/>
265
- <fo:region-before region-name="header" extent="16.5mm"/>
266
- <fo:region-after region-name="footer" extent="22.5mm"/>
267
- <fo:region-start region-name="left-region" extent="16.5mm"/>
268
- <fo:region-end region-name="right-region" extent="16.5mm"/>
269
- </fo:simple-page-master>
270
-
271
- <!-- Document pages -->
272
- <fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
273
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
274
- <fo:region-before region-name="header" extent="{$marginTop}mm"/>
275
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
276
- <fo:region-start region-name="left-region" extent="16.5mm"/>
277
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
278
- </fo:simple-page-master>
279
- <fo:simple-page-master master-name="document-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
280
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
281
- <fo:region-before region-name="header" extent="{$marginTop}mm"/>
282
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
283
- <fo:region-start region-name="left-region" extent="16.5mm"/>
284
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
285
- </fo:simple-page-master>
286
-
287
- </fo:layout-master-set>
291
+
292
+ <xsl:call-template name="layout-master-set"/>
288
293
 
289
294
  <fo:declarations>
290
295
  <xsl:call-template name="addPDFUAmeta"/>
@@ -307,7 +312,7 @@
307
312
  <xsl:for-each select="$contents//mnx:tables/mnx:table">
308
313
  <fo:bookmark internal-destination="{@id}">
309
314
  <xsl:variable name="title">
310
- <xsl:apply-templates select="mn:name" mode="bookmarks"/>
315
+ <xsl:apply-templates select="mn:name | mn:fmt-name" mode="bookmarks"/>
311
316
  </xsl:variable>
312
317
  <fo:bookmark-title><xsl:value-of select="$title"/></fo:bookmark-title>
313
318
  </fo:bookmark>
@@ -323,7 +328,7 @@
323
328
  <xsl:for-each select="$contents//mnx:figures/mnx:figure">
324
329
  <fo:bookmark internal-destination="{@id}">
325
330
  <xsl:variable name="title">
326
- <xsl:apply-templates select="mn:name" mode="bookmarks"/>
331
+ <xsl:apply-templates select="mn:name | mn:fmt-name" mode="bookmarks"/>
327
332
  </xsl:variable>
328
333
  <fo:bookmark-title><xsl:value-of select="$title"/></fo:bookmark-title>
329
334
  </fo:bookmark>
@@ -346,254 +351,7 @@
346
351
  </xsl:with-param>
347
352
  </xsl:call-template>
348
353
 
349
- <!-- Cover Page -->
350
- <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
351
- <xsl:call-template name="insertFootnoteSeparatorCommon"/>
352
-
353
- <fo:flow flow-name="xsl-region-body" color="white">
354
-
355
- <xsl:variable name="curr_lang" select="/mn:metanorma/mn:bibdata/mn:language[@current = 'true']"/>
356
- <xsl:variable name="stage" select="/mn:metanorma/mn:bibdata/mn:status/mn:stage[@language = $curr_lang] | /mn:metanorma/mn:bibdata/mn:status/mn:stage[not(@language)]"/>
357
- <xsl:variable name="isLegacy" select="normalize-space($stage = 'deprecated' or $stage = 'legacy' or $stage = 'retired' or $stage = 'rescinded')"/>
358
-
359
- <!-- background image -->
360
- <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
361
- <fo:block>
362
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
363
- </fo:block>
364
- </fo:block-container>
365
-
366
- <xsl:call-template name="insertBackgroundColor">
367
- <xsl:with-param name="opacity">0.85</xsl:with-param>
368
- </xsl:call-template>
369
-
370
- <xsl:call-template name="insertCrossingLines"/>
371
-
372
- <!-- title and logo -->
373
- <fo:block>
374
- <fo:table table-layout="fixed" width="100%">
375
- <fo:table-column column-width="75%"/>
376
- <fo:table-column column-width="25%"/>
377
- <fo:table-body>
378
- <fo:table-row>
379
- <fo:table-cell font-weight="bold">
380
- <fo:block font-size="16pt" color="{$color_design}" margin-bottom="4pt">
381
- <xsl:variable name="ogc_document" select="concat('OGC® DOCUMENT: ', $docnumber)"/>
382
- <xsl:call-template name="addLetterSpacing">
383
- <xsl:with-param name="text" select="$ogc_document"/>
384
- <xsl:with-param name="letter-spacing" select="0.3"/>
385
- </xsl:call-template>
386
- </fo:block>
387
- <xsl:variable name="ogc_external" select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type='ogc-external']"/>
388
- <xsl:if test="normalize-space($ogc_external) != ''">
389
- <fo:block font-size="10pt">External identifier of this OGC<fo:inline font-size="58%" baseline-shift="30%">®</fo:inline> document: <fo:inline font-weight="normal"><xsl:value-of select="$ogc_external"/></fo:inline></fo:block>
390
- </xsl:if>
391
- </fo:table-cell>
392
- <fo:table-cell text-align="right">
393
- <fo:block>
394
- <xsl:call-template name="insertLogo"/>
395
- </fo:block>
396
- </fo:table-cell>
397
- </fo:table-row>
398
- </fo:table-body>
399
- </fo:table>
400
- </fo:block>
401
-
402
- <!-- <fo:block-container absolute-position="fixed" left="16.5mm" top="83mm" height="90mm"> -->
403
- <fo:block-container absolute-position="fixed" left="16.5mm" top="40mm" height="170mm">
404
- <fo:block-container width="155mm" height="99%" display-align="center">
405
- <fo:block font-size="33pt" role="H1">
406
- <xsl:variable name="length_title" select="string-length($doctitle)"/>
407
- <xsl:variable name="fit_font-size">
408
- <xsl:choose>
409
- <xsl:when test="$length_title &gt; 230">20</xsl:when>
410
- <xsl:when test="$length_title &gt; 170">26</xsl:when>
411
- <xsl:when test="$length_title &gt; 155">28</xsl:when>
412
- <xsl:when test="$length_title &gt; 130">30</xsl:when>
413
- </xsl:choose>
414
- </xsl:variable>
415
- <xsl:if test="normalize-space($fit_font-size) != ''">
416
- <xsl:attribute name="font-size"><xsl:value-of select="$fit_font-size"/>pt</xsl:attribute>
417
- </xsl:if>
418
- <xsl:call-template name="addLetterSpacing">
419
- <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctitle))"/>
420
- <xsl:with-param name="letter-spacing" select="1.1"/>
421
- </xsl:call-template>
422
- </fo:block>
423
- <fo:block-container width="22.5mm" border-bottom="2pt solid {$color_design}" margin-bottom="24pt">
424
- <fo:block margin-top="4pt"> </fo:block>
425
- </fo:block-container>
426
- <fo:block color="{$color_design}">
427
- <fo:block font-size="17pt">
428
- <xsl:call-template name="addLetterSpacing">
429
- <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctype))"/>
430
- </xsl:call-template>
431
- <xsl:value-of select="$linebreak"/>
432
- <xsl:variable name="docsubtype" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:subdoctype)"/>
433
- <xsl:variable name="docsubtype_str">
434
- <xsl:choose>
435
- <xsl:when test="$docsubtype = 'implementation'">Implementation</xsl:when>
436
- <xsl:when test="$docsubtype = 'conceptual-model'">Conceptual model</xsl:when>
437
- <xsl:when test="$docsubtype = 'conceptual-model-and-encoding'">Conceptual model &amp; encoding</xsl:when>
438
- <xsl:when test="$docsubtype = 'conceptual-model-and-implementation'">Conceptual model &amp; implementation</xsl:when>
439
- <xsl:when test="$docsubtype = 'encoding'">Encoding</xsl:when>
440
- <xsl:when test="$docsubtype = 'extension'">Extension</xsl:when>
441
- <xsl:when test="$docsubtype = 'profile'">Profile</xsl:when>
442
- <xsl:when test="$docsubtype = 'profile-with-extension'">Profile with extension</xsl:when>
443
- <xsl:when test="$docsubtype = 'general'">General</xsl:when>
444
- </xsl:choose>
445
- </xsl:variable>
446
- <xsl:call-template name="addLetterSpacing">
447
- <xsl:with-param name="text" select="$docsubtype_str"/>
448
- <xsl:with-param name="letter-spacing" select="0.25"/>
449
- </xsl:call-template>
450
- </fo:block>
451
- <xsl:variable name="stage_uc" select="java:toUpperCase(java:java.lang.String.new($stage))"/>
452
-
453
- <xsl:choose>
454
- <xsl:when test="$isLegacy = 'true'">
455
- <fo:block-container font-size="17pt" background-color="{$color_background_blue}" margin-left="-2.5mm" height="11.5mm" width="56mm" display-align="center" margin-top="0.5mm">
456
- <fo:block-container margin-left="2.5mm">
457
- <fo:block-container margin-left="0mm">
458
- <fo:block margin-top="1mm">
459
- <xsl:call-template name="addLetterSpacing">
460
- <xsl:with-param name="text" select="$stage_uc"/>
461
- </xsl:call-template>
462
- </fo:block>
463
- </fo:block-container>
464
- </fo:block-container>
465
- </fo:block-container>
466
- </xsl:when>
467
- <xsl:otherwise>
468
- <fo:block font-size="12pt" font-weight="bold" margin-top="14pt">
469
- <xsl:call-template name="addLetterSpacing">
470
- <xsl:with-param name="text" select="$stage_uc"/>
471
- </xsl:call-template>
472
- </fo:block>
473
- </xsl:otherwise>
474
- </xsl:choose>
475
-
476
- </fo:block>
477
- </fo:block-container>
478
- </fo:block-container>
479
-
480
- <fo:block-container absolute-position="fixed" left="16.5mm" top="204mm" height="60mm" width="180mm" display-align="after" font-size="10pt">
481
- <fo:block line-height="140%">
482
- <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = '']"/>
483
- <fo:block>
484
- <fo:inline font-weight="bold">
485
- <!-- Submission Date: -->
486
- <xsl:call-template name="getLocalizedString">
487
- <xsl:with-param name="key">submission_date</xsl:with-param>
488
- </xsl:call-template><xsl:text>: </xsl:text>
489
- </fo:inline>
490
- <xsl:choose>
491
- <xsl:when test="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on">
492
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on"/>
493
- </xsl:when>
494
- <xsl:otherwise>XXX</xsl:otherwise>
495
- </xsl:choose>
496
- </fo:block>
497
- <fo:block>
498
- <fo:inline font-weight="bold">
499
- <!-- Approval Date: -->
500
- <xsl:call-template name="getLocalizedString">
501
- <xsl:with-param name="key">approval_date</xsl:with-param>
502
- </xsl:call-template><xsl:text>: </xsl:text>
503
- </fo:inline>
504
- <xsl:choose>
505
- <xsl:when test="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on">
506
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on"/>
507
- </xsl:when>
508
- <xsl:otherwise>XXX</xsl:otherwise>
509
- </xsl:choose>
510
- </fo:block>
511
- <fo:block>
512
- <fo:inline font-weight="bold">
513
- <!-- Publication Date: -->
514
- <xsl:call-template name="getLocalizedString">
515
- <xsl:with-param name="key">publication_date</xsl:with-param>
516
- </xsl:call-template><xsl:text>: </xsl:text>
517
- </fo:inline>
518
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']/mn:on"/>
519
- </fo:block>
520
-
521
- <fo:block margin-bottom="12pt">
522
- <xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
523
- <fo:block>
524
- <fo:inline font-weight="bold">
525
- <!-- Author: -->
526
- <xsl:call-template name="getLocalizedString">
527
- <xsl:with-param name="key">author</xsl:with-param>
528
- </xsl:call-template><xsl:text>: </xsl:text>
529
- </fo:inline>
530
- <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
531
- <xsl:value-of select="."/>
532
- <xsl:if test="position() != last()">, </xsl:if>
533
- </xsl:for-each>
534
- </fo:block>
535
- </xsl:if>
536
- <xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
537
- <fo:block>
538
- <fo:inline font-weight="bold">
539
- <!-- Editor: -->
540
- <xsl:call-template name="getLocalizedString">
541
- <xsl:with-param name="key">editor_full</xsl:with-param>
542
- </xsl:call-template><xsl:text>: </xsl:text>
543
- </fo:inline>
544
- <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
545
- <xsl:value-of select="."/>
546
- <xsl:if test="position() != last()">, </xsl:if>
547
- </xsl:for-each>
548
- </fo:block>
549
- </xsl:if>
550
- <xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='contributor']/mn:person/mn:name/mn:completename">
551
- <fo:block>
552
- <fo:inline font-weight="bold">
553
- <!-- Contributor: -->
554
- <xsl:call-template name="getLocalizedString">
555
- <xsl:with-param name="key">contributor</xsl:with-param>
556
- </xsl:call-template><xsl:text>: </xsl:text>
557
- </fo:inline>
558
- <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='contributor']/mn:person/mn:name/mn:completename">
559
- <xsl:value-of select="."/>
560
- <xsl:if test="position() != last()">, </xsl:if>
561
- </xsl:for-each>
562
- </fo:block>
563
- </xsl:if>
564
- </fo:block>
565
- </fo:block>
566
-
567
- <xsl:choose>
568
- <xsl:when test="$isLegacy = 'true'">
569
- <fo:block-container margin-left="-7mm" color="{$color_design}" background-color="{$color_background_blue}" width="202mm">
570
- <fo:block-container margin-left="2.5mm" margin-right="1mm" padding-top="0.5mm" padding-bottom="0.5mm">
571
- <fo:block-container margin-left="0mm" margin-right="0mm">
572
- <fo:block>
573
- <xsl:variable name="legal_statement">
574
- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
575
- </xsl:variable>
576
- <xsl:apply-templates select="xalan:nodeset($legal_statement)/*">
577
- <xsl:with-param name="isLegacy" select="$isLegacy"/>
578
- </xsl:apply-templates>
579
- </fo:block>
580
- </fo:block-container>
581
- </fo:block-container>
582
- </fo:block-container>
583
- </xsl:when>
584
- <xsl:otherwise>
585
- <xsl:variable name="legal_statement">
586
- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
587
- </xsl:variable>
588
- <xsl:apply-templates select="xalan:nodeset($legal_statement)/*"/>
589
- </xsl:otherwise>
590
- </xsl:choose>
591
-
592
- </fo:block-container>
593
-
594
- </fo:flow>
595
- </fo:page-sequence>
596
- <!-- End Cover Page -->
354
+ <xsl:call-template name="cover-page"/>
597
355
 
598
356
  <!-- Copyright, Content, Foreword, etc. pages -->
599
357
  <fo:page-sequence master-reference="preface" initial-page-number="2" format="i" force-page-count="no-force">
@@ -773,6 +531,256 @@
773
531
 
774
532
  </xsl:template>
775
533
 
534
+ <xsl:template name="cover-page">
535
+ <!-- Cover Page -->
536
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
537
+ <xsl:call-template name="insertFootnoteSeparatorCommon"/>
538
+
539
+ <fo:flow flow-name="xsl-region-body" color="white">
540
+
541
+ <xsl:variable name="curr_lang" select="/mn:metanorma/mn:bibdata/mn:language[@current = 'true']"/>
542
+ <xsl:variable name="stage" select="/mn:metanorma/mn:bibdata/mn:status/mn:stage[@language = $curr_lang] | /mn:metanorma/mn:bibdata/mn:status/mn:stage[not(@language)]"/>
543
+ <xsl:variable name="isLegacy" select="normalize-space($stage = 'deprecated' or $stage = 'legacy' or $stage = 'retired' or $stage = 'rescinded')"/>
544
+
545
+ <!-- background image -->
546
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
547
+ <fo:block>
548
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
549
+ </fo:block>
550
+ </fo:block-container>
551
+
552
+ <xsl:call-template name="insertBackgroundColor">
553
+ <xsl:with-param name="opacity">0.85</xsl:with-param>
554
+ </xsl:call-template>
555
+
556
+ <xsl:call-template name="insertCrossingLines"/>
557
+
558
+ <!-- title and logo -->
559
+ <fo:block>
560
+ <fo:table table-layout="fixed" width="100%">
561
+ <fo:table-column column-width="75%"/>
562
+ <fo:table-column column-width="25%"/>
563
+ <fo:table-body>
564
+ <fo:table-row>
565
+ <fo:table-cell font-weight="bold">
566
+ <fo:block font-size="16pt" color="{$color_design}" margin-bottom="4pt">
567
+ <xsl:variable name="ogc_document" select="concat('OGC® DOCUMENT: ', $docnumber)"/>
568
+ <xsl:call-template name="addLetterSpacing">
569
+ <xsl:with-param name="text" select="$ogc_document"/>
570
+ <xsl:with-param name="letter-spacing" select="0.3"/>
571
+ </xsl:call-template>
572
+ </fo:block>
573
+ <xsl:variable name="ogc_external" select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type='ogc-external']"/>
574
+ <xsl:if test="normalize-space($ogc_external) != ''">
575
+ <fo:block font-size="10pt">External identifier of this OGC<fo:inline font-size="58%" baseline-shift="30%">®</fo:inline> document: <fo:inline font-weight="normal"><xsl:value-of select="$ogc_external"/></fo:inline></fo:block>
576
+ </xsl:if>
577
+ </fo:table-cell>
578
+ <fo:table-cell text-align="right">
579
+ <fo:block>
580
+ <xsl:call-template name="insertLogo"/>
581
+ </fo:block>
582
+ </fo:table-cell>
583
+ </fo:table-row>
584
+ </fo:table-body>
585
+ </fo:table>
586
+ </fo:block>
587
+
588
+ <!-- <fo:block-container absolute-position="fixed" left="16.5mm" top="83mm" height="90mm"> -->
589
+ <fo:block-container absolute-position="fixed" left="16.5mm" top="40mm" height="170mm">
590
+ <fo:block-container width="155mm" height="99%" display-align="center">
591
+ <fo:block font-size="33pt" role="H1">
592
+ <xsl:variable name="length_title" select="string-length($doctitle)"/>
593
+ <xsl:variable name="fit_font-size">
594
+ <xsl:choose>
595
+ <xsl:when test="$length_title &gt; 230">20</xsl:when>
596
+ <xsl:when test="$length_title &gt; 170">26</xsl:when>
597
+ <xsl:when test="$length_title &gt; 155">28</xsl:when>
598
+ <xsl:when test="$length_title &gt; 130">30</xsl:when>
599
+ </xsl:choose>
600
+ </xsl:variable>
601
+ <xsl:if test="normalize-space($fit_font-size) != ''">
602
+ <xsl:attribute name="font-size"><xsl:value-of select="$fit_font-size"/>pt</xsl:attribute>
603
+ </xsl:if>
604
+ <xsl:call-template name="addLetterSpacing">
605
+ <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctitle))"/>
606
+ <xsl:with-param name="letter-spacing" select="1.1"/>
607
+ </xsl:call-template>
608
+ </fo:block>
609
+ <fo:block-container width="22.5mm" border-bottom="2pt solid {$color_design}" margin-bottom="24pt">
610
+ <fo:block margin-top="4pt"> </fo:block>
611
+ </fo:block-container>
612
+ <fo:block color="{$color_design}">
613
+ <fo:block font-size="17pt">
614
+ <xsl:call-template name="addLetterSpacing">
615
+ <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctype))"/>
616
+ </xsl:call-template>
617
+ <xsl:value-of select="$linebreak"/>
618
+ <xsl:variable name="docsubtype" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:subdoctype)"/>
619
+ <xsl:variable name="docsubtype_str">
620
+ <xsl:choose>
621
+ <xsl:when test="$docsubtype = 'implementation'">Implementation</xsl:when>
622
+ <xsl:when test="$docsubtype = 'conceptual-model'">Conceptual model</xsl:when>
623
+ <xsl:when test="$docsubtype = 'conceptual-model-and-encoding'">Conceptual model &amp; encoding</xsl:when>
624
+ <xsl:when test="$docsubtype = 'conceptual-model-and-implementation'">Conceptual model &amp; implementation</xsl:when>
625
+ <xsl:when test="$docsubtype = 'encoding'">Encoding</xsl:when>
626
+ <xsl:when test="$docsubtype = 'extension'">Extension</xsl:when>
627
+ <xsl:when test="$docsubtype = 'profile'">Profile</xsl:when>
628
+ <xsl:when test="$docsubtype = 'profile-with-extension'">Profile with extension</xsl:when>
629
+ <xsl:when test="$docsubtype = 'general'">General</xsl:when>
630
+ </xsl:choose>
631
+ </xsl:variable>
632
+ <xsl:call-template name="addLetterSpacing">
633
+ <xsl:with-param name="text" select="$docsubtype_str"/>
634
+ <xsl:with-param name="letter-spacing" select="0.25"/>
635
+ </xsl:call-template>
636
+ </fo:block>
637
+ <xsl:variable name="stage_uc" select="java:toUpperCase(java:java.lang.String.new($stage))"/>
638
+
639
+ <xsl:choose>
640
+ <xsl:when test="$isLegacy = 'true'">
641
+ <fo:block-container font-size="17pt" background-color="{$color_background_blue}" margin-left="-2.5mm" height="11.5mm" width="56mm" display-align="center" margin-top="0.5mm">
642
+ <fo:block-container margin-left="2.5mm">
643
+ <fo:block-container margin-left="0mm">
644
+ <fo:block margin-top="1mm">
645
+ <xsl:call-template name="addLetterSpacing">
646
+ <xsl:with-param name="text" select="$stage_uc"/>
647
+ </xsl:call-template>
648
+ </fo:block>
649
+ </fo:block-container>
650
+ </fo:block-container>
651
+ </fo:block-container>
652
+ </xsl:when>
653
+ <xsl:otherwise>
654
+ <fo:block font-size="12pt" font-weight="bold" margin-top="14pt">
655
+ <xsl:call-template name="addLetterSpacing">
656
+ <xsl:with-param name="text" select="$stage_uc"/>
657
+ </xsl:call-template>
658
+ </fo:block>
659
+ </xsl:otherwise>
660
+ </xsl:choose>
661
+
662
+ </fo:block>
663
+ </fo:block-container>
664
+ </fo:block-container>
665
+
666
+ <fo:block-container absolute-position="fixed" left="16.5mm" top="204mm" height="60mm" width="180mm" display-align="after" font-size="10pt">
667
+ <fo:block line-height="140%">
668
+ <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = '']"/>
669
+ <fo:block>
670
+ <fo:inline font-weight="bold">
671
+ <!-- Submission Date: -->
672
+ <xsl:call-template name="getLocalizedString">
673
+ <xsl:with-param name="key">submission_date</xsl:with-param>
674
+ </xsl:call-template><xsl:text>: </xsl:text>
675
+ </fo:inline>
676
+ <xsl:choose>
677
+ <xsl:when test="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on">
678
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on"/>
679
+ </xsl:when>
680
+ <xsl:otherwise>XXX</xsl:otherwise>
681
+ </xsl:choose>
682
+ </fo:block>
683
+ <fo:block>
684
+ <fo:inline font-weight="bold">
685
+ <!-- Approval Date: -->
686
+ <xsl:call-template name="getLocalizedString">
687
+ <xsl:with-param name="key">approval_date</xsl:with-param>
688
+ </xsl:call-template><xsl:text>: </xsl:text>
689
+ </fo:inline>
690
+ <xsl:choose>
691
+ <xsl:when test="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on">
692
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on"/>
693
+ </xsl:when>
694
+ <xsl:otherwise>XXX</xsl:otherwise>
695
+ </xsl:choose>
696
+ </fo:block>
697
+ <fo:block>
698
+ <fo:inline font-weight="bold">
699
+ <!-- Publication Date: -->
700
+ <xsl:call-template name="getLocalizedString">
701
+ <xsl:with-param name="key">publication_date</xsl:with-param>
702
+ </xsl:call-template><xsl:text>: </xsl:text>
703
+ </fo:inline>
704
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']/mn:on"/>
705
+ </fo:block>
706
+
707
+ <fo:block margin-bottom="12pt">
708
+ <xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
709
+ <fo:block>
710
+ <fo:inline font-weight="bold">
711
+ <!-- Author: -->
712
+ <xsl:call-template name="getLocalizedString">
713
+ <xsl:with-param name="key">author</xsl:with-param>
714
+ </xsl:call-template><xsl:text>: </xsl:text>
715
+ </fo:inline>
716
+ <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
717
+ <xsl:value-of select="."/>
718
+ <xsl:if test="position() != last()">, </xsl:if>
719
+ </xsl:for-each>
720
+ </fo:block>
721
+ </xsl:if>
722
+ <xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
723
+ <fo:block>
724
+ <fo:inline font-weight="bold">
725
+ <!-- Editor: -->
726
+ <xsl:call-template name="getLocalizedString">
727
+ <xsl:with-param name="key">editor_full</xsl:with-param>
728
+ </xsl:call-template><xsl:text>: </xsl:text>
729
+ </fo:inline>
730
+ <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
731
+ <xsl:value-of select="."/>
732
+ <xsl:if test="position() != last()">, </xsl:if>
733
+ </xsl:for-each>
734
+ </fo:block>
735
+ </xsl:if>
736
+ <xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='contributor']/mn:person/mn:name/mn:completename">
737
+ <fo:block>
738
+ <fo:inline font-weight="bold">
739
+ <!-- Contributor: -->
740
+ <xsl:call-template name="getLocalizedString">
741
+ <xsl:with-param name="key">contributor</xsl:with-param>
742
+ </xsl:call-template><xsl:text>: </xsl:text>
743
+ </fo:inline>
744
+ <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='contributor']/mn:person/mn:name/mn:completename">
745
+ <xsl:value-of select="."/>
746
+ <xsl:if test="position() != last()">, </xsl:if>
747
+ </xsl:for-each>
748
+ </fo:block>
749
+ </xsl:if>
750
+ </fo:block>
751
+ </fo:block>
752
+
753
+ <xsl:choose>
754
+ <xsl:when test="$isLegacy = 'true'">
755
+ <fo:block-container margin-left="-7mm" color="{$color_design}" background-color="{$color_background_blue}" width="202mm">
756
+ <fo:block-container margin-left="2.5mm" margin-right="1mm" padding-top="0.5mm" padding-bottom="0.5mm">
757
+ <fo:block-container margin-left="0mm" margin-right="0mm">
758
+ <fo:block>
759
+ <xsl:variable name="legal_statement">
760
+ <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
761
+ </xsl:variable>
762
+ <xsl:apply-templates select="xalan:nodeset($legal_statement)/*">
763
+ <xsl:with-param name="isLegacy" select="$isLegacy"/>
764
+ </xsl:apply-templates>
765
+ </fo:block>
766
+ </fo:block-container>
767
+ </fo:block-container>
768
+ </fo:block-container>
769
+ </xsl:when>
770
+ <xsl:otherwise>
771
+ <xsl:variable name="legal_statement">
772
+ <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
773
+ </xsl:variable>
774
+ <xsl:apply-templates select="xalan:nodeset($legal_statement)/*"/>
775
+ </xsl:otherwise>
776
+ </xsl:choose>
777
+
778
+ </fo:block-container>
779
+
780
+ </fo:flow>
781
+ </fo:page-sequence>
782
+ </xsl:template> <!-- END: cover-page -->
783
+
776
784
  <xsl:template name="processPrefaceAndMainSectionsOGC_items">
777
785
  <xsl:variable name="updated_xml_step_move_pagebreak">
778
786
 
@@ -860,7 +868,7 @@
860
868
 
861
869
  <xsl:apply-templates/>
862
870
 
863
- <xsl:if test="count(*) = 1 and mn:title"> <!-- if there isn't user ToC -->
871
+ <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
864
872
 
865
873
  <fo:block-container line-height="130%">
866
874
  <fo:block role="TOC">
@@ -994,7 +1002,7 @@
994
1002
 
995
1003
  </xsl:template>
996
1004
 
997
- <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:title" priority="3">
1005
+ <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
998
1006
  <xsl:variable name="title-toc">
999
1007
  <xsl:apply-templates/>
1000
1008
  <!-- <xsl:call-template name="getTitle">
@@ -1266,7 +1274,7 @@
1266
1274
  </fo:block>
1267
1275
  </xsl:template>
1268
1276
 
1269
- <xsl:template match="mn:legal-statement//mn:title" priority="2">
1277
+ <xsl:template match="mn:legal-statement//mn:fmt-title" priority="2">
1270
1278
  <xsl:variable name="level">
1271
1279
  <xsl:call-template name="getLevel"/>
1272
1280
  </xsl:variable>
@@ -1276,7 +1284,7 @@
1276
1284
  </fo:inline>
1277
1285
  </xsl:template>
1278
1286
 
1279
- <xsl:template match="mn:legal-statement//mn:title/text() | mn:license-statement//mn:title/text() | mn:copyright-statement//mn:title/text()">
1287
+ <xsl:template match="mn:legal-statement//mn:fmt-title/text() | mn:license-statement//mn:fmt-title/text() | mn:copyright-statement//mn:fmt-title/text()">
1280
1288
  <xsl:call-template name="addLetterSpacing">
1281
1289
  <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new(.))"/>
1282
1290
  </xsl:call-template>
@@ -1310,7 +1318,7 @@
1310
1318
  <!-- ====== -->
1311
1319
  <!-- title -->
1312
1320
  <!-- ====== -->
1313
- <xsl:template match="mn:title" name="title">
1321
+ <xsl:template match="mn:fmt-title" name="title">
1314
1322
 
1315
1323
  <xsl:variable name="level">
1316
1324
  <xsl:call-template name="getLevel"/>
@@ -1433,7 +1441,7 @@
1433
1441
  <xsl:variable name="element-name">
1434
1442
  <xsl:choose>
1435
1443
  <xsl:when test="$inline = 'true'">fo:inline</xsl:when>
1436
- <xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
1444
+ <xsl:when test="../@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
1437
1445
  <xsl:when test="parent::mn:admonition">fo:inline</xsl:when>
1438
1446
  <xsl:otherwise>fo:block</xsl:otherwise>
1439
1447
  </xsl:choose>
@@ -1525,14 +1533,14 @@
1525
1533
  <fo:list-item-label><fo:block/></fo:list-item-label>
1526
1534
  <fo:list-item-body>
1527
1535
  <fo:block>
1528
- <xsl:apply-templates select="mn:name"/>
1529
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
1536
+ <xsl:apply-templates select="mn:fmt-name"/>
1537
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
1530
1538
  </fo:block>
1531
1539
  </fo:list-item-body>
1532
1540
  </fo:list-item>
1533
1541
  </xsl:template>
1534
1542
 
1535
- <xsl:template match="mn:term/mn:name" priority="2">
1543
+ <xsl:template match="mn:term/mn:fmt-name" priority="2">
1536
1544
  <xsl:variable name="levelTerm">
1537
1545
  <xsl:call-template name="getLevelTermName"/>
1538
1546
  </xsl:variable>
@@ -1544,7 +1552,7 @@
1544
1552
  </fo:list-item-label>
1545
1553
  <fo:list-item-body start-indent="body-start()">
1546
1554
  <fo:block>
1547
- <xsl:apply-templates select="../mn:preferred | ../mn:deprecated | ../mn:deprecates | ../mn:admitted" mode="term_name"/>
1555
+ <xsl:apply-templates select="../mn:fmt-preferred | ../mn:fmt-deprecated | ../mn:fmt-deprecates | ../mn:fmt-admitted" mode="term_name"/>
1548
1556
  </fo:block>
1549
1557
  </fo:list-item-body>
1550
1558
  </fo:list-item>
@@ -1553,17 +1561,17 @@
1553
1561
  </fo:block>
1554
1562
  </xsl:template>
1555
1563
 
1556
- <xsl:template match="mn:preferred | mn:deprecated | mn:deprecates | mn:admitted" priority="2"/>
1564
+ <xsl:template match="mn:fmt-preferred | mn:fmt-deprecated | mn:fmt-deprecates | mn:fmt-admitted" priority="2"/>
1557
1565
 
1558
1566
  <!-- first preferred displays on the same line as term/name -->
1559
- <xsl:template match="mn:preferred[not(preceding-sibling::mn:preferred)]" mode="term_name" priority="2">
1567
+ <xsl:template match="mn:fmt-preferred[not(preceding-sibling::mn:fmt-preferred)]" mode="term_name" priority="2">
1560
1568
  <fo:inline font-size="18pt" padding-right="3mm"><xsl:call-template name="setStyle_preferred"/><xsl:apply-templates/></fo:inline>
1561
1569
  <fo:inline padding-right="2mm"> </fo:inline>
1562
1570
  </xsl:template>
1563
1571
 
1564
- <xsl:template match="mn:preferred | mn:deprecated | mn:deprecates | mn:admitted" mode="term_name">
1572
+ <xsl:template match="mn:fmt-preferred | mn:fmt-deprecated | mn:fmt-deprecates | mn:fmt-admitted" mode="term_name">
1565
1573
  <xsl:choose>
1566
- <xsl:when test="preceding-sibling::*[self::mn:preferred or self::mn:deprecated or self::mn:deprecates or self::admitted]">
1574
+ <xsl:when test="preceding-sibling::*[self::mn:fmt-preferred or self::mn:fmt-deprecated or self::mn:fmt-deprecates or self::mn:fmt-admitted]">
1567
1575
  <fo:block space-before="6pt"><xsl:call-template name="displayTerm"/></fo:block> <!-- block wrapper -->
1568
1576
  </xsl:when>
1569
1577
  <xsl:otherwise><xsl:call-template name="displayTerm"/></xsl:otherwise>
@@ -1585,7 +1593,7 @@
1585
1593
  <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($kind))"/>
1586
1594
  </xsl:call-template>
1587
1595
  </fo:inline> -->
1588
- <xsl:if test="following-sibling::*[self::mn:preferred or self::mn:deprecated or self::mn:deprecates or self::mn:admitted]">
1596
+ <xsl:if test="following-sibling::*[self::mn:fmt-preferred or self::mn:fmt-deprecated or self::mn:fmt-deprecates or self::mn:fmt-admitted]">
1589
1597
  <fo:inline padding-right="2mm"> </fo:inline>
1590
1598
  </xsl:if>
1591
1599
  </xsl:template>
@@ -1630,7 +1638,7 @@
1630
1638
  <fo:block-container id="{@id}" margin-top="12pt" margin-bottom="12pt">
1631
1639
  <fo:block>
1632
1640
  <xsl:apply-templates select="mn:note[@type = 'units']"/>
1633
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]">
1641
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]">
1634
1642
  <xsl:with-param name="indent" select="$indent"/>
1635
1643
  </xsl:apply-templates>
1636
1644
  </fo:block>
@@ -1638,7 +1646,7 @@
1638
1646
  <xsl:for-each select="mn:note[not(@type = 'units')]">
1639
1647
  <xsl:call-template name="note"/>
1640
1648
  </xsl:for-each>
1641
- <xsl:apply-templates select="mn:name"/>
1649
+ <xsl:apply-templates select="mn:fmt-name"/>
1642
1650
  </fo:block-container>
1643
1651
  </xsl:template>
1644
1652
 
@@ -1930,7 +1938,7 @@
1930
1938
  <xsl:value-of select="$linebreak"/>
1931
1939
  </xsl:template>
1932
1940
 
1933
- <xsl:template match="mn:name/text()[1]" priority="2">
1941
+ <xsl:template match="mn:fmt-name/text()[1]" priority="2">
1934
1942
  <!-- 0xA0 to space replacement -->
1935
1943
  <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
1936
1944
  <xsl:variable name="separator" select="' — '"/>
@@ -2106,10 +2114,6 @@
2106
2114
  <title-part lang="ru">
2107
2115
  </title-part>
2108
2116
  <title-part lang="zh">第 # 部分:</title-part>
2109
-
2110
- <title-subpart lang="en">Sub-part #</title-subpart>
2111
- <title-subpart lang="fr">Partie de sub #</title-subpart>
2112
-
2113
2117
  </xsl:variable>
2114
2118
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
2115
2119
 
@@ -2563,7 +2567,8 @@
2563
2567
  <xsl:template match="mn:stem" mode="update_xml_step1"/>
2564
2568
 
2565
2569
  <xsl:template match="mn:fmt-stem" mode="update_xml_step1">
2566
- <xsl:element name="stem" namespace="{$namespace_full}">
2570
+ <!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
2571
+ <xsl:copy>
2567
2572
  <xsl:copy-of select="@*"/>
2568
2573
  <xsl:choose>
2569
2574
  <xsl:when test="mn:semx and count(node()) = 1">
@@ -2587,7 +2592,8 @@
2587
2592
  </xsl:choose>
2588
2593
  </xsl:otherwise>
2589
2594
  </xsl:choose>
2590
- </xsl:element>
2595
+ </xsl:copy>
2596
+ <!-- </xsl:element> -->
2591
2597
  </xsl:template>
2592
2598
 
2593
2599
  <xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
@@ -2749,12 +2755,14 @@
2749
2755
  </xsl:template>
2750
2756
 
2751
2757
  <xsl:template match="mn:fmt-title" mode="update_xml_step1">
2752
- <xsl:element name="title" namespace="{$namespace_full}">
2758
+ <!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
2759
+ <xsl:copy>
2753
2760
  <xsl:copy-of select="@*"/>
2754
2761
  <xsl:call-template name="addNamedDestinationAttribute"/>
2755
2762
 
2756
2763
  <xsl:apply-templates mode="update_xml_step1"/>
2757
- </xsl:element>
2764
+ </xsl:copy>
2765
+ <!-- </xsl:element> -->
2758
2766
  </xsl:template>
2759
2767
 
2760
2768
  <xsl:template name="addNamedDestinationAttribute">
@@ -2766,12 +2774,14 @@
2766
2774
  <xsl:apply-templates mode="update_xml_step1"/>
2767
2775
  </xsl:when>
2768
2776
  <xsl:otherwise>
2769
- <xsl:element name="name" namespace="{$namespace_full}">
2777
+ <!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
2778
+ <xsl:copy>
2770
2779
  <xsl:copy-of select="@*"/>
2771
2780
  <xsl:call-template name="addNamedDestinationAttribute"/>
2772
2781
 
2773
2782
  <xsl:apply-templates mode="update_xml_step1"/>
2774
- </xsl:element>
2783
+ </xsl:copy>
2784
+ <!-- </xsl:element> -->
2775
2785
  </xsl:otherwise>
2776
2786
  </xsl:choose>
2777
2787
  </xsl:template>
@@ -2786,7 +2796,7 @@
2786
2796
  <xsl:apply-templates mode="update_xml_step1"/>
2787
2797
  </xsl:template>
2788
2798
  <xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="update_xml_step1">
2789
- <xsl:element name="preferred" namespace="{$namespace_full}">
2799
+ <xsl:element name="fmt-preferred" namespace="{$namespace_full}">
2790
2800
  <xsl:copy-of select="@*"/>
2791
2801
  <xsl:apply-templates mode="update_xml_step1"/>
2792
2802
  </xsl:element>
@@ -2796,7 +2806,7 @@
2796
2806
  <xsl:apply-templates mode="update_xml_step1"/>
2797
2807
  </xsl:template>
2798
2808
  <xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="update_xml_step1">
2799
- <xsl:element name="admitted" namespace="{$namespace_full}">
2809
+ <xsl:element name="fmt-admitted" namespace="{$namespace_full}">
2800
2810
  <xsl:copy-of select="@*"/>
2801
2811
  <xsl:apply-templates mode="update_xml_step1"/>
2802
2812
  </xsl:element>
@@ -2806,32 +2816,32 @@
2806
2816
  <xsl:apply-templates mode="update_xml_step1"/>
2807
2817
  </xsl:template>
2808
2818
  <xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="update_xml_step1">
2809
- <xsl:element name="deprecates" namespace="{$namespace_full}">
2819
+ <xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
2810
2820
  <xsl:copy-of select="@*"/>
2811
2821
  <xsl:apply-templates mode="update_xml_step1"/>
2812
2822
  </xsl:element>
2813
2823
  </xsl:template>
2814
2824
 
2815
- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
2825
+ <!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
2816
2826
  <xsl:element name="definition" namespace="{$namespace_full}">
2817
2827
  <xsl:copy-of select="@*"/>
2818
2828
  <xsl:apply-templates mode="update_xml_step1"/>
2819
2829
  </xsl:element>
2820
2830
  </xsl:template>
2821
-
2831
+
2822
2832
  <xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
2823
2833
  <xsl:element name="termsource" namespace="{$namespace_full}">
2824
2834
  <xsl:copy-of select="@*"/>
2825
2835
  <xsl:apply-templates mode="update_xml_step1"/>
2826
2836
  </xsl:element>
2827
2837
  </xsl:template>
2828
-
2838
+
2829
2839
  <xsl:template match="mn:fmt-source" mode="update_xml_step1">
2830
2840
  <xsl:element name="source" namespace="{$namespace_full}">
2831
2841
  <xsl:copy-of select="@*"/>
2832
2842
  <xsl:apply-templates mode="update_xml_step1"/>
2833
2843
  </xsl:element>
2834
- </xsl:template>
2844
+ </xsl:template> -->
2835
2845
 
2836
2846
  <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">
2837
2847
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -2854,12 +2864,12 @@
2854
2864
  </xsl:template>
2855
2865
 
2856
2866
  <xsl:template match="mn:identifier" mode="update_xml_step1"/>
2857
- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
2867
+ <!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
2858
2868
  <xsl:element name="identifier" namespace="{$namespace_full}">
2859
2869
  <xsl:copy-of select="@*"/>
2860
2870
  <xsl:apply-templates mode="update_xml_step1"/>
2861
2871
  </xsl:element>
2862
- </xsl:template>
2872
+ </xsl:template> -->
2863
2873
 
2864
2874
  <xsl:template match="mn:concept" mode="update_xml_step1"/>
2865
2875
 
@@ -2869,51 +2879,53 @@
2869
2879
 
2870
2880
  <xsl:template match="mn:eref" mode="update_xml_step1"/>
2871
2881
 
2872
- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
2882
+ <!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
2873
2883
  <xsl:element name="eref" namespace="{$namespace_full}">
2874
2884
  <xsl:copy-of select="@*"/>
2875
2885
  <xsl:apply-templates mode="update_xml_step1"/>
2876
2886
  </xsl:element>
2877
- </xsl:template>
2887
+ </xsl:template> -->
2878
2888
 
2879
2889
  <xsl:template match="mn:xref" mode="update_xml_step1"/>
2880
2890
 
2881
- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
2891
+ <!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
2882
2892
  <xsl:element name="xref" namespace="{$namespace_full}">
2883
2893
  <xsl:copy-of select="@*"/>
2884
2894
  <xsl:apply-templates mode="update_xml_step1"/>
2885
2895
  </xsl:element>
2886
- </xsl:template>
2896
+ </xsl:template> -->
2887
2897
 
2888
2898
  <xsl:template match="mn:link" mode="update_xml_step1"/>
2889
2899
 
2890
- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
2900
+ <!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
2891
2901
  <xsl:element name="link" namespace="{$namespace_full}">
2892
2902
  <xsl:copy-of select="@*"/>
2893
2903
  <xsl:apply-templates mode="update_xml_step1"/>
2894
2904
  </xsl:element>
2895
- </xsl:template>
2905
+ </xsl:template> -->
2896
2906
 
2897
2907
  <xsl:template match="mn:origin" mode="update_xml_step1"/>
2898
2908
 
2899
- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
2909
+ <!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
2900
2910
  <xsl:element name="origin" namespace="{$namespace_full}">
2901
2911
  <xsl:copy-of select="@*"/>
2902
2912
  <xsl:apply-templates mode="update_xml_step1"/>
2903
2913
  </xsl:element>
2904
- </xsl:template>
2914
+ </xsl:template> -->
2905
2915
 
2906
2916
  <xsl:template match="mn:erefstack" mode="update_xml_step1"/>
2907
2917
 
2908
2918
  <xsl:template match="mn:svgmap" mode="update_xml_step1"/>
2909
2919
 
2910
- <xsl:template match="mn:review-container" mode="update_xml_step1"/>
2920
+ <xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
2911
2921
 
2912
- <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
2913
- <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
2914
- <xsl:value-of select="."/>
2915
- </xsl:element>
2916
- </xsl:template>
2922
+ <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
2923
+ <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
2924
+ <xsl:value-of select="."/>
2925
+ </xsl:element>
2926
+ </xsl:template>
2927
+
2928
+ <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
2917
2929
 
2918
2930
  <!-- END: update new Presentation XML -->
2919
2931
 
@@ -3109,7 +3121,7 @@
3109
3121
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
3110
3122
  <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>
3111
3123
 
3112
- <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">
3124
+ <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">
3113
3125
 
3114
3126
  <xsl:variable name="parent" select="local-name(..)"/>
3115
3127
 
@@ -3228,7 +3240,7 @@
3228
3240
  </xsl:if>
3229
3241
  </xsl:template>
3230
3242
 
3231
- <xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
3243
+ <xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
3232
3244
  <xsl:copy-of select="."/>
3233
3245
  </xsl:template>
3234
3246
 
@@ -3570,7 +3582,7 @@
3570
3582
  </fo:block>
3571
3583
  </xsl:template> <!-- copyright-statement -->
3572
3584
 
3573
- <xsl:template match="mn:copyright-statement//mn:title">
3585
+ <xsl:template match="mn:copyright-statement//mn:fmt-title">
3574
3586
  <xsl:variable name="level">
3575
3587
  <xsl:call-template name="getLevel"/>
3576
3588
  </xsl:variable>
@@ -3594,7 +3606,7 @@
3594
3606
  </fo:block>
3595
3607
  </xsl:template> <!-- license-statement -->
3596
3608
 
3597
- <xsl:template match="mn:license-statement//mn:title">
3609
+ <xsl:template match="mn:license-statement//mn:fmt-title">
3598
3610
  <xsl:variable name="level">
3599
3611
  <xsl:call-template name="getLevel"/>
3600
3612
  </xsl:variable>
@@ -3622,7 +3634,7 @@
3622
3634
  </fo:block>
3623
3635
  </xsl:template> <!-- legal-statement -->
3624
3636
 
3625
- <xsl:template match="mn:legal-statement//mn:title">
3637
+ <xsl:template match="mn:legal-statement//mn:fmt-title">
3626
3638
  <!-- process in the template 'title' -->
3627
3639
  <xsl:call-template name="title"/>
3628
3640
 
@@ -3642,7 +3654,7 @@
3642
3654
  </fo:block>
3643
3655
  </xsl:template> <!-- feedback-statement -->
3644
3656
 
3645
- <xsl:template match="mn:feedback-statement//mn:title">
3657
+ <xsl:template match="mn:feedback-statement//mn:fmt-title">
3646
3658
  <!-- process in the template 'title' -->
3647
3659
  <xsl:call-template name="title"/>
3648
3660
  </xsl:template>
@@ -3666,7 +3678,7 @@
3666
3678
  <xsl:template name="refine_link-style">
3667
3679
  </xsl:template> <!-- refine_link-style -->
3668
3680
 
3669
- <xsl:template match="mn:link" name="link">
3681
+ <xsl:template match="mn:fmt-link" name="link">
3670
3682
  <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
3671
3683
  <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
3672
3684
  <xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
@@ -3894,7 +3906,7 @@
3894
3906
  <xsl:value-of select="."/>
3895
3907
  </xsl:attribute>
3896
3908
  </xsl:for-each>
3897
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
3909
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3898
3910
  </xsl:when>
3899
3911
 
3900
3912
  <xsl:otherwise>
@@ -3939,11 +3951,11 @@
3939
3951
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3940
3952
  </xsl:if>
3941
3953
 
3942
- <xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
3954
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
3943
3955
  </fo:block>
3944
3956
 
3945
3957
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
3946
- <xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name AFTER content -->
3958
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
3947
3959
  <xsl:if test="parent::mn:example">
3948
3960
  <fo:block font-size="1pt" line-height="10%" space-before="6pt"> </fo:block>
3949
3961
  </xsl:if>
@@ -4247,7 +4259,7 @@
4247
4259
 
4248
4260
  <!-- end mode="syntax_highlight" -->
4249
4261
 
4250
- <xsl:template match="mn:sourcecode/mn:name">
4262
+ <xsl:template match="mn:sourcecode/mn:fmt-name">
4251
4263
  <xsl:if test="normalize-space() != ''">
4252
4264
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4253
4265
  <xsl:apply-templates/>
@@ -4265,11 +4277,11 @@
4265
4277
  </xsl:choose>
4266
4278
  </xsl:template>
4267
4279
 
4268
- <xsl:template match="mn:annotation">
4280
+ <xsl:template match="mn:callout-annotation">
4269
4281
  <xsl:variable name="annotation-id" select="@id"/>
4270
4282
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
4271
4283
  <fo:block id="{$annotation-id}" white-space="nowrap">
4272
- <xsl:if test="not(preceding-sibling::mn:annotation)">
4284
+ <xsl:if test="not(preceding-sibling::mn:callout-annotation)">
4273
4285
  <xsl:attribute name="space-before">6pt</xsl:attribute>
4274
4286
  </xsl:if>
4275
4287
  <fo:inline>
@@ -4280,7 +4292,7 @@
4280
4292
  </fo:block>
4281
4293
  </xsl:template>
4282
4294
 
4283
- <xsl:template match="mn:annotation/mn:p">
4295
+ <xsl:template match="mn:callout-annotation/mn:p">
4284
4296
  <xsl:param name="callout"/>
4285
4297
  <fo:inline id="{@id}">
4286
4298
  <xsl:call-template name="setNamedDestination"/>
@@ -4437,7 +4449,7 @@
4437
4449
  <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
4438
4450
  <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
4439
4451
  <xsl:choose>
4440
- <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>
4452
+ <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>
4441
4453
  <xsl:otherwise>
4442
4454
  <xsl:variable name="tag">
4443
4455
  <xsl:call-template name="insertTag">
@@ -4867,12 +4879,12 @@
4867
4879
  <xsl:template match="mn:permission">
4868
4880
  <xsl:call-template name="setNamedDestination"/>
4869
4881
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
4870
- <xsl:apply-templates select="mn:name"/>
4871
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4882
+ <xsl:apply-templates select="mn:fmt-name"/>
4883
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4872
4884
  </fo:block>
4873
4885
  </xsl:template>
4874
4886
 
4875
- <xsl:template match="mn:permission/mn:name">
4887
+ <xsl:template match="mn:permission/mn:fmt-name">
4876
4888
  <xsl:if test="normalize-space() != ''">
4877
4889
  <fo:block xsl:use-attribute-sets="permission-name-style">
4878
4890
  <xsl:apply-templates/>
@@ -4895,15 +4907,15 @@
4895
4907
  <xsl:template match="mn:requirement">
4896
4908
  <xsl:call-template name="setNamedDestination"/>
4897
4909
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
4898
- <xsl:apply-templates select="mn:name"/>
4910
+ <xsl:apply-templates select="mn:fmt-name"/>
4899
4911
  <xsl:apply-templates select="mn:label"/>
4900
4912
  <xsl:apply-templates select="@obligation"/>
4901
4913
  <xsl:apply-templates select="mn:subject"/>
4902
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:label) and not(self::mn:subject)]"/>
4914
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
4903
4915
  </fo:block>
4904
4916
  </xsl:template>
4905
4917
 
4906
- <xsl:template match="mn:requirement/mn:name">
4918
+ <xsl:template match="mn:requirement/mn:fmt-name">
4907
4919
  <xsl:if test="normalize-space() != ''">
4908
4920
 
4909
4921
  <fo:block xsl:use-attribute-sets="requirement-name-style">
@@ -4943,12 +4955,12 @@
4943
4955
  <xsl:template match="mn:recommendation">
4944
4956
  <xsl:call-template name="setNamedDestination"/>
4945
4957
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
4946
- <xsl:apply-templates select="mn:name"/>
4947
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4958
+ <xsl:apply-templates select="mn:fmt-name"/>
4959
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4948
4960
  </fo:block>
4949
4961
  </xsl:template>
4950
4962
 
4951
- <xsl:template match="mn:recommendation/mn:name">
4963
+ <xsl:template match="mn:recommendation/mn:fmt-name">
4952
4964
  <xsl:if test="normalize-space() != ''">
4953
4965
 
4954
4966
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
@@ -5211,15 +5223,15 @@
5211
5223
  <xsl:template match="mn:term">
5212
5224
  <xsl:call-template name="setNamedDestination"/>
5213
5225
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
5214
- <xsl:apply-templates select="mn:name"/>
5226
+ <xsl:apply-templates select="mn:fmt-name"/>
5215
5227
 
5216
5228
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
5217
5229
  </xsl:if>
5218
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5230
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5219
5231
  </fo:block>
5220
5232
  </xsl:template>
5221
5233
 
5222
- <xsl:template match="mn:term/mn:name">
5234
+ <xsl:template match="mn:term/mn:fmt-name">
5223
5235
  <xsl:if test="normalize-space() != ''">
5224
5236
  <!-- <xsl:variable name="level">
5225
5237
  <xsl:call-template name="getLevelTermName"/>
@@ -5238,7 +5250,7 @@
5238
5250
  <!-- origin -->
5239
5251
  <!-- modification -->
5240
5252
  <!-- ====== -->
5241
- <xsl:template match="mn:termsource" name="termsource">
5253
+ <xsl:template match="mn:fmt-termsource" name="termsource">
5242
5254
  <fo:block xsl:use-attribute-sets="termsource-style">
5243
5255
 
5244
5256
  <xsl:call-template name="refine_termsource-style"/>
@@ -5277,24 +5289,24 @@
5277
5289
  </fo:block>
5278
5290
  </xsl:template>
5279
5291
 
5280
- <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">
5292
+ <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">
5281
5293
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
5282
5294
  </xsl:template>
5283
5295
 
5284
- <xsl:template match="mn:termsource/text()">
5296
+ <xsl:template match="mn:fmt-termsource/text()">
5285
5297
  <xsl:if test="normalize-space() != ''">
5286
5298
  <xsl:value-of select="."/>
5287
5299
  </xsl:if>
5288
5300
  </xsl:template>
5289
5301
 
5290
5302
  <!-- text SOURCE: -->
5291
- <xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
5303
+ <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
5292
5304
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
5293
5305
  <xsl:value-of select="."/>
5294
5306
  </fo:inline>
5295
5307
  </xsl:template>
5296
5308
 
5297
- <xsl:template match="mn:origin">
5309
+ <xsl:template match="mn:fmt-origin">
5298
5310
  <xsl:call-template name="insert_basic_link">
5299
5311
  <xsl:with-param name="element">
5300
5312
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -5340,7 +5352,7 @@
5340
5352
  <!-- ====== -->
5341
5353
 
5342
5354
  <!-- Preferred, admitted, deprecated -->
5343
- <xsl:template match="mn:preferred">
5355
+ <xsl:template match="mn:fmt-preferred">
5344
5356
  <xsl:variable name="level">
5345
5357
  <xsl:call-template name="getLevel"/>
5346
5358
  </xsl:variable>
@@ -5351,15 +5363,15 @@
5351
5363
  </xsl:variable>
5352
5364
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
5353
5365
 
5354
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
5366
+ <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
5355
5367
 
5356
5368
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
5357
5369
 
5358
- <xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
5370
+ <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
5359
5371
  <xsl:call-template name="setIDforNamedDestination"/>
5360
5372
  </xsl:for-each>
5361
5373
 
5362
- <xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
5374
+ <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
5363
5375
  </fo:block>
5364
5376
  </xsl:if>
5365
5377
 
@@ -5383,13 +5395,13 @@
5383
5395
  <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
5384
5396
  <xsl:template match="mn:domain"/>
5385
5397
 
5386
- <xsl:template match="mn:admitted">
5398
+ <xsl:template match="mn:fmt-admitted">
5387
5399
  <fo:block xsl:use-attribute-sets="admitted-style">
5388
5400
  <xsl:apply-templates/>
5389
5401
  </fo:block>
5390
5402
  </xsl:template>
5391
5403
 
5392
- <xsl:template match="mn:deprecates">
5404
+ <xsl:template match="mn:fmt-deprecates">
5393
5405
  <fo:block xsl:use-attribute-sets="deprecates-style">
5394
5406
  <xsl:apply-templates/>
5395
5407
  </fo:block>
@@ -5403,7 +5415,7 @@
5403
5415
 
5404
5416
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
5405
5417
  <!-- in metanorma xml preferred terms delimited by semicolons -->
5406
- <xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
5418
+ <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
5407
5419
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
5408
5420
  </xsl:template>
5409
5421
  <!-- End Preferred, admitted, deprecated -->
@@ -5422,16 +5434,16 @@
5422
5434
  <!-- ========== -->
5423
5435
  <!-- definition -->
5424
5436
  <!-- ========== -->
5425
- <xsl:template match="mn:definition">
5437
+ <xsl:template match="mn:fmt-definition">
5426
5438
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
5427
5439
  <xsl:apply-templates/>
5428
5440
  </fo:block>
5429
5441
  </xsl:template>
5430
5442
 
5431
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]">
5443
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
5432
5444
  <xsl:apply-templates/>
5433
5445
  </xsl:template>
5434
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
5446
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
5435
5447
  <fo:inline> <xsl:apply-templates/></fo:inline>
5436
5448
  <fo:block/>
5437
5449
  </xsl:template>
@@ -5496,12 +5508,12 @@
5496
5508
  <xsl:call-template name="refine_termexample-style"/>
5497
5509
  <xsl:call-template name="setBlockSpanAll"/>
5498
5510
 
5499
- <xsl:apply-templates select="mn:name"/>
5500
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5511
+ <xsl:apply-templates select="mn:fmt-name"/>
5512
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5501
5513
  </fo:block>
5502
5514
  </xsl:template>
5503
5515
 
5504
- <xsl:template match="mn:termexample/mn:name">
5516
+ <xsl:template match="mn:termexample/mn:fmt-name">
5505
5517
  <xsl:if test="normalize-space() != ''">
5506
5518
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
5507
5519
  <xsl:call-template name="refine_termexample-name-style"/>
@@ -5552,7 +5564,7 @@
5552
5564
  <xsl:call-template name="refine_example-style"/>
5553
5565
 
5554
5566
  <xsl:variable name="fo_element">
5555
- <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:name)][1][self::mn:sourcecode]">block</xsl:if>inline
5567
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>inline
5556
5568
  </xsl:variable>
5557
5569
 
5558
5570
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -5563,7 +5575,7 @@
5563
5575
 
5564
5576
  <!-- display name 'EXAMPLE' in a separate block -->
5565
5577
  <fo:block>
5566
- <xsl:apply-templates select="mn:name">
5578
+ <xsl:apply-templates select="mn:fmt-name">
5567
5579
  <xsl:with-param name="fo_element" select="$fo_element"/>
5568
5580
  </xsl:apply-templates>
5569
5581
  </fo:block>
@@ -5571,7 +5583,7 @@
5571
5583
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
5572
5584
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
5573
5585
  <xsl:variable name="example_body">
5574
- <xsl:apply-templates select="node()[not(self::mn:name)]">
5586
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
5575
5587
  <xsl:with-param name="fo_element" select="$fo_element"/>
5576
5588
  </xsl:apply-templates>
5577
5589
  </xsl:variable>
@@ -5598,14 +5610,14 @@
5598
5610
  <fo:list-item>
5599
5611
  <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
5600
5612
  <fo:block>
5601
- <xsl:apply-templates select="mn:name">
5613
+ <xsl:apply-templates select="mn:fmt-name">
5602
5614
  <xsl:with-param name="fo_element">block</xsl:with-param>
5603
5615
  </xsl:apply-templates>
5604
5616
  </fo:block>
5605
5617
  </fo:list-item-label>
5606
5618
  <fo:list-item-body start-indent="body-start()">
5607
5619
  <fo:block>
5608
- <xsl:apply-templates select="node()[not(self::mn:name)]">
5620
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
5609
5621
  <xsl:with-param name="fo_element" select="$fo_element"/>
5610
5622
  </xsl:apply-templates>
5611
5623
  </fo:block>
@@ -5618,21 +5630,21 @@
5618
5630
 
5619
5631
  <!-- display 'EXAMPLE' and first element in the same line -->
5620
5632
  <fo:block>
5621
- <xsl:apply-templates select="mn:name">
5633
+ <xsl:apply-templates select="mn:fmt-name">
5622
5634
  <xsl:with-param name="fo_element" select="$fo_element"/>
5623
5635
  </xsl:apply-templates>
5624
5636
  <fo:inline>
5625
- <xsl:apply-templates select="*[not(self::mn:name)][1]">
5637
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
5626
5638
  <xsl:with-param name="fo_element" select="$fo_element"/>
5627
5639
  </xsl:apply-templates>
5628
5640
  </fo:inline>
5629
5641
  </fo:block>
5630
5642
 
5631
- <xsl:if test="*[not(self::mn:name)][position() &gt; 1]">
5643
+ <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
5632
5644
  <!-- display further elements in blocks -->
5633
5645
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
5634
5646
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
5635
- <xsl:apply-templates select="*[not(self::mn:name)][position() &gt; 1]">
5647
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
5636
5648
  <xsl:with-param name="fo_element" select="'block'"/>
5637
5649
  </xsl:apply-templates>
5638
5650
  </fo:block-container>
@@ -5646,7 +5658,7 @@
5646
5658
  </xsl:template>
5647
5659
 
5648
5660
  <!-- example/name -->
5649
- <xsl:template match="mn:example/mn:name">
5661
+ <xsl:template match="mn:example/mn:fmt-name">
5650
5662
  <xsl:param name="fo_element">block</xsl:param>
5651
5663
 
5652
5664
  <xsl:choose>
@@ -5671,7 +5683,7 @@
5671
5683
  </xsl:template>
5672
5684
 
5673
5685
  <!-- table/example/name, table/tfoot//example/name -->
5674
- <xsl:template match="mn:table/mn:example/mn:name | mn:table/mn:tfoot//mn:example/mn:name">
5686
+ <xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
5675
5687
  <fo:inline xsl:use-attribute-sets="example-name-style">
5676
5688
  <xsl:apply-templates/>
5677
5689
  </fo:inline>
@@ -5960,7 +5972,7 @@
5960
5972
 
5961
5973
  <!-- Display table's name before table as standalone block -->
5962
5974
  <!-- $namespace = 'iso' or -->
5963
- <xsl:apply-templates select="mn:name"/> <!-- table's title rendered before table -->
5975
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
5964
5976
  <xsl:call-template name="table_name_fn_display"/>
5965
5977
 
5966
5978
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
@@ -6002,7 +6014,7 @@
6002
6014
 
6003
6015
  <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
6004
6016
 
6005
- <xsl:for-each select="mn:name">
6017
+ <xsl:for-each select="mn:fmt-name">
6006
6018
  <xsl:call-template name="setIDforNamedDestination"/>
6007
6019
  </xsl:for-each>
6008
6020
 
@@ -6038,6 +6050,10 @@
6038
6050
  <xsl:with-param name="margin-side" select="$margin-side"/>
6039
6051
  </xsl:call-template>
6040
6052
 
6053
+ <xsl:call-template name="setTableStyles">
6054
+ <xsl:with-param name="scope">table</xsl:with-param>
6055
+ </xsl:call-template>
6056
+
6041
6057
  </xsl:element>
6042
6058
  </xsl:variable>
6043
6059
 
@@ -6058,7 +6074,7 @@
6058
6074
  </xsl:attribute>
6059
6075
  </xsl:for-each>
6060
6076
 
6061
- <xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[local-name(..) != 'name'] or ./mn:source"/>
6077
+ <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"/>
6062
6078
  <xsl:if test="$isNoteOrFnExist = 'true'">
6063
6079
  <!-- <xsl:choose>
6064
6080
  <xsl:when test="$namespace = 'plateau'"></xsl:when>
@@ -6114,7 +6130,7 @@
6114
6130
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
6115
6131
  </xsl:when>
6116
6132
  <xsl:otherwise>
6117
- <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 -->
6133
+ <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 -->
6118
6134
  </xsl:otherwise>
6119
6135
  </xsl:choose>
6120
6136
 
@@ -6208,7 +6224,7 @@
6208
6224
  </xsl:template>
6209
6225
 
6210
6226
  <!-- table/name-->
6211
- <xsl:template match="*[local-name()='table']/mn:name">
6227
+ <xsl:template match="*[local-name()='table']/mn:fmt-name">
6212
6228
  <xsl:param name="continued"/>
6213
6229
  <xsl:param name="cols-count"/>
6214
6230
  <xsl:if test="normalize-space() != ''">
@@ -6273,7 +6289,7 @@
6273
6289
  </xsl:template>
6274
6290
 
6275
6291
  <!-- SOURCE: ... -->
6276
- <xsl:template match="*[local-name()='table']/mn:source" priority="2">
6292
+ <xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
6277
6293
  <xsl:call-template name="termsource"/>
6278
6294
  </xsl:template>
6279
6295
 
@@ -6438,11 +6454,11 @@
6438
6454
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
6439
6455
  </xsl:template>
6440
6456
 
6441
- <xsl:template match="mn:termsource" mode="td_text">
6442
- <xsl:value-of select="*[local-name()='origin']/@citeas"/>
6457
+ <xsl:template match="mn:fmt-termsource" mode="td_text">
6458
+ <xsl:value-of select="mn:fmt-origin/@citeas"/>
6443
6459
  </xsl:template>
6444
6460
 
6445
- <xsl:template match="mn:link" mode="td_text">
6461
+ <xsl:template match="mn:fmt-link" mode="td_text">
6446
6462
  <xsl:value-of select="@target"/>
6447
6463
  </xsl:template>
6448
6464
 
@@ -6644,12 +6660,12 @@
6644
6660
 
6645
6661
  <xsl:call-template name="refine_table-header-title-style"/>
6646
6662
 
6647
- <xsl:apply-templates select="ancestor::mn:table/mn:name">
6663
+ <xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
6648
6664
  <xsl:with-param name="continued">true</xsl:with-param>
6649
6665
  <xsl:with-param name="cols-count" select="$cols-count"/>
6650
6666
  </xsl:apply-templates>
6651
6667
 
6652
- <xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
6668
+ <xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
6653
6669
  <fo:block role="SKIP"/>
6654
6670
  </xsl:if>
6655
6671
 
@@ -6684,7 +6700,7 @@
6684
6700
  <xsl:param name="colwidths"/>
6685
6701
  <xsl:param name="colgroup"/>
6686
6702
 
6687
- <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"/>
6703
+ <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"/>
6688
6704
 
6689
6705
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
6690
6706
  </xsl:variable>
@@ -6725,6 +6741,12 @@
6725
6741
  </xsl:choose>
6726
6742
  </xsl:for-each>
6727
6743
 
6744
+ <xsl:for-each select="ancestor::mn:table[1]">
6745
+ <xsl:call-template name="setTableStyles">
6746
+ <xsl:with-param name="scope">table</xsl:with-param>
6747
+ </xsl:call-template>
6748
+ </xsl:for-each>
6749
+
6728
6750
  <xsl:choose>
6729
6751
  <xsl:when test="xalan:nodeset($colgroup)//mn:col">
6730
6752
  <xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
@@ -6741,10 +6763,22 @@
6741
6763
 
6742
6764
  <fo:table-body role="SKIP">
6743
6765
  <fo:table-row role="SKIP">
6766
+ <xsl:for-each select="ancestor::mn:table[1]">
6767
+ <xsl:call-template name="setTableStyles">
6768
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
6769
+ </xsl:call-template>
6770
+ </xsl:for-each>
6771
+
6744
6772
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
6745
6773
 
6746
6774
  <xsl:call-template name="refine_table-footer-cell-style"/>
6747
6775
 
6776
+ <xsl:for-each select="ancestor::mn:table[1]">
6777
+ <xsl:call-template name="setTableStyles">
6778
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
6779
+ </xsl:call-template>
6780
+ </xsl:for-each>
6781
+
6748
6782
  <xsl:call-template name="setBordersTableArray"/>
6749
6783
 
6750
6784
  <!-- fn will be processed inside 'note' processing -->
@@ -6752,7 +6786,7 @@
6752
6786
  <xsl:apply-templates select="../mn:dl"/>
6753
6787
  <xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
6754
6788
  <xsl:apply-templates select="../mn:example"/>
6755
- <xsl:apply-templates select="../mn:source"/>
6789
+ <xsl:apply-templates select="../mn:fmt-source"/>
6756
6790
 
6757
6791
  <xsl:variable name="isDisplayRowSeparator">
6758
6792
  </xsl:variable>
@@ -6941,7 +6975,12 @@
6941
6975
 
6942
6976
  <xsl:template name="setTableRowAttributes">
6943
6977
 
6944
- <xsl:call-template name="setColors"/>
6978
+ <xsl:for-each select="ancestor::mn:table[1]">
6979
+ <xsl:call-template name="setTableStyles">
6980
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
6981
+ </xsl:call-template>
6982
+ </xsl:for-each>
6983
+ <xsl:call-template name="setTableStyles"/>
6945
6984
 
6946
6985
  </xsl:template> <!-- setTableRowAttributes -->
6947
6986
  <!-- ===================== -->
@@ -6994,7 +7033,13 @@
6994
7033
  </xsl:attribute>
6995
7034
  </xsl:if>
6996
7035
  <xsl:call-template name="display-align"/>
6997
- <xsl:call-template name="setColors"/>
7036
+
7037
+ <xsl:for-each select="ancestor::mn:table[1]">
7038
+ <xsl:call-template name="setTableStyles">
7039
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
7040
+ </xsl:call-template>
7041
+ </xsl:for-each>
7042
+ <xsl:call-template name="setTableStyles"/>
6998
7043
  </xsl:template>
6999
7044
 
7000
7045
  <xsl:template name="display-align">
@@ -7010,7 +7055,8 @@
7010
7055
  </xsl:if>
7011
7056
  </xsl:template>
7012
7057
 
7013
- <xsl:template name="setColors">
7058
+ <xsl:template name="setTableStyles">
7059
+ <xsl:param name="scope">cell</xsl:param>
7014
7060
  <xsl:variable name="styles__">
7015
7061
  <xsl:call-template name="split">
7016
7062
  <xsl:with-param name="pText" select="concat(@style,';')"/>
@@ -7022,16 +7068,22 @@
7022
7068
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
7023
7069
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
7024
7070
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
7025
- <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'">
7071
+ <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'">
7026
7072
  <style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
7027
7073
  </xsl:if>
7074
+ <xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
7075
+ <style name="{$key}-top"><xsl:value-of select="$value"/></style>
7076
+ <style name="{$key}-right"><xsl:value-of select="$value"/></style>
7077
+ <style name="{$key}-left"><xsl:value-of select="$value"/></style>
7078
+ <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
7079
+ </xsl:if>
7028
7080
  </xsl:for-each>
7029
7081
  </xsl:variable>
7030
7082
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
7031
7083
  <xsl:for-each select="$styles/style">
7032
7084
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
7033
7085
  </xsl:for-each>
7034
- </xsl:template> <!-- setColors -->
7086
+ </xsl:template> <!-- setTableStyles -->
7035
7087
 
7036
7088
  <!-- cell in table body, footer -->
7037
7089
  <xsl:template match="*[local-name()='td']" name="td">
@@ -7095,11 +7147,11 @@
7095
7147
 
7096
7148
  <xsl:call-template name="refine_table-note-name-style"/>
7097
7149
 
7098
- <xsl:apply-templates select="mn:name"/>
7150
+ <xsl:apply-templates select="mn:fmt-name"/>
7099
7151
 
7100
7152
  </fo:inline>
7101
7153
 
7102
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7154
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7103
7155
  </fo:block>
7104
7156
  </xsl:template> <!-- table/note -->
7105
7157
 
@@ -7238,7 +7290,7 @@
7238
7290
 
7239
7291
  <!-- footnotes for table's name rendering -->
7240
7292
  <xsl:template name="table_name_fn_display">
7241
- <xsl:for-each select="mn:name//mn:fn">
7293
+ <xsl:for-each select="mn:fmt-name//mn:fn">
7242
7294
  <xsl:variable name="reference" select="@reference"/>
7243
7295
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
7244
7296
  <fo:block margin-bottom="12pt">
@@ -7895,7 +7947,7 @@
7895
7947
  </xsl:if> -->
7896
7948
 
7897
7949
  <xsl:variable name="words">
7898
- <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
7950
+ <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
7899
7951
  <word>
7900
7952
  <xsl:copy-of select="."/>
7901
7953
  </word>
@@ -7954,7 +8006,7 @@
7954
8006
  </xsl:copy>
7955
8007
  </xsl:template>
7956
8008
 
7957
- <xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
8009
+ <xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
7958
8010
 
7959
8011
  <xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
7960
8012
  <xsl:variable name="formatting_tags">
@@ -7989,7 +8041,7 @@
7989
8041
  </xsl:call-template>
7990
8042
  </xsl:template>
7991
8043
 
7992
- <xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
8044
+ <xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
7993
8045
  <xsl:variable name="link">
7994
8046
  <link_updated>
7995
8047
  <xsl:variable name="target_text">
@@ -8224,7 +8276,7 @@
8224
8276
 
8225
8277
  <xsl:call-template name="refine_multicomponent_block_style"/>
8226
8278
 
8227
- <xsl:apply-templates select="mn:name">
8279
+ <xsl:apply-templates select="mn:fmt-name">
8228
8280
  <xsl:with-param name="process">true</xsl:with-param>
8229
8281
  </xsl:apply-templates>
8230
8282
 
@@ -8407,7 +8459,7 @@
8407
8459
  </xsl:template> <!-- refine_multicomponent_block_style -->
8408
8460
 
8409
8461
  <!-- dl/name -->
8410
- <xsl:template match="mn:dl/mn:name">
8462
+ <xsl:template match="mn:dl/mn:fmt-name">
8411
8463
  <xsl:param name="process">false</xsl:param>
8412
8464
  <xsl:if test="$process = 'true'">
8413
8465
  <fo:block xsl:use-attribute-sets="dl-name-style">
@@ -8830,12 +8882,12 @@
8830
8882
  <xsl:template match="mn:appendix">
8831
8883
  <xsl:call-template name="setNamedDestination"/>
8832
8884
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
8833
- <xsl:apply-templates select="mn:title"/>
8885
+ <xsl:apply-templates select="mn:fmt-title"/>
8834
8886
  </fo:block>
8835
- <xsl:apply-templates select="node()[not(local-name()='title')]"/>
8887
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
8836
8888
  </xsl:template>
8837
8889
 
8838
- <xsl:template match="mn:appendix/mn:title" priority="2">
8890
+ <xsl:template match="mn:appendix/mn:fmt-title" priority="2">
8839
8891
  <xsl:variable name="level">
8840
8892
  <xsl:call-template name="getLevel"/>
8841
8893
  </xsl:variable>
@@ -8848,15 +8900,15 @@
8848
8900
  <xsl:template match="mn:appendix//mn:example" priority="2">
8849
8901
  <xsl:call-template name="setNamedDestination"/>
8850
8902
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
8851
- <xsl:apply-templates select="mn:name"/>
8903
+ <xsl:apply-templates select="mn:fmt-name"/>
8852
8904
  </fo:block>
8853
- <xsl:apply-templates select="node()[not(local-name()='name')]"/>
8905
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8854
8906
  </xsl:template>
8855
8907
 
8856
8908
  <xsl:attribute-set name="xref-style">
8857
8909
  </xsl:attribute-set>
8858
8910
 
8859
- <xsl:template match="mn:xref">
8911
+ <xsl:template match="mn:fmt-xref">
8860
8912
  <xsl:call-template name="insert_basic_link">
8861
8913
  <xsl:with-param name="element">
8862
8914
  <xsl:variable name="alt_text">
@@ -8876,7 +8928,7 @@
8876
8928
  </xsl:template> <!-- xref -->
8877
8929
 
8878
8930
  <!-- command between two xref points to non-standard bibitem -->
8879
- <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="."/>
8931
+ <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="."/>
8880
8932
  </xsl:template>
8881
8933
 
8882
8934
  <xsl:attribute-set name="eref-style">
@@ -8907,7 +8959,7 @@
8907
8959
  <!-- ====== -->
8908
8960
  <!-- eref -->
8909
8961
  <!-- ====== -->
8910
- <xsl:template match="mn:eref" name="eref">
8962
+ <xsl:template match="mn:fmt-eref" name="eref">
8911
8963
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
8912
8964
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
8913
8965
  <xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
@@ -9050,28 +9102,28 @@
9050
9102
 
9051
9103
  <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
9052
9104
 
9053
- <xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
9105
+ <xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
9054
9106
 
9055
9107
  <xsl:call-template name="refine_note-name-style"/>
9056
9108
 
9057
9109
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9058
9110
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9059
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9111
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9060
9112
  <xsl:call-template name="append_add-style"/>
9061
9113
  </xsl:if>
9062
9114
 
9063
9115
  <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
9064
- <xsl:if test="count(*[not(self::mn:name)]) = 1 and *[not(self::mn:name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
9065
- <xsl:apply-templates select="*[not(self::mn:name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
9116
+ <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)]">
9117
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
9066
9118
  <xsl:with-param name="skip">false</xsl:with-param>
9067
9119
  </xsl:apply-templates>
9068
9120
  </xsl:if>
9069
9121
 
9070
- <xsl:apply-templates select="mn:name"/>
9122
+ <xsl:apply-templates select="mn:fmt-name"/>
9071
9123
 
9072
9124
  </fo:inline>
9073
9125
 
9074
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
9126
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9075
9127
  </fo:block>
9076
9128
  </fo:block-container>
9077
9129
  </fo:block-container>
@@ -9110,19 +9162,19 @@
9110
9162
 
9111
9163
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9112
9164
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9113
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9165
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9114
9166
  <xsl:call-template name="append_add-style"/>
9115
9167
  </xsl:if>
9116
9168
 
9117
- <xsl:apply-templates select="mn:name"/>
9169
+ <xsl:apply-templates select="mn:fmt-name"/>
9118
9170
 
9119
9171
  </fo:inline>
9120
9172
 
9121
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
9173
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9122
9174
  </fo:block>
9123
9175
  </xsl:template>
9124
9176
 
9125
- <xsl:template match="mn:note/mn:name">
9177
+ <xsl:template match="mn:note/mn:fmt-name">
9126
9178
  <xsl:param name="sfx"/>
9127
9179
  <xsl:variable name="suffix">
9128
9180
  <xsl:choose>
@@ -9149,7 +9201,7 @@
9149
9201
  </xsl:if>
9150
9202
  </xsl:template>
9151
9203
 
9152
- <xsl:template match="mn:termnote/mn:name">
9204
+ <xsl:template match="mn:termnote/mn:fmt-name">
9153
9205
  <xsl:param name="sfx"/>
9154
9206
  <xsl:variable name="suffix">
9155
9207
  <xsl:choose>
@@ -9232,15 +9284,15 @@
9232
9284
 
9233
9285
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9234
9286
  <fo:block role="BlockQuote">
9235
- <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 -->
9287
+ <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 -->
9236
9288
  </fo:block>
9237
9289
  </fo:block-container>
9238
9290
  </fo:block-container>
9239
- <xsl:if test="mn:author or mn:source or mn:attribution">
9291
+ <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
9240
9292
  <fo:block xsl:use-attribute-sets="quote-source-style">
9241
9293
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
9242
9294
  <xsl:apply-templates select="mn:author"/>
9243
- <xsl:apply-templates select="mn:source"/>
9295
+ <xsl:apply-templates select="mn:fmt-source"/>
9244
9296
  <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
9245
9297
  <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
9246
9298
  </fo:block>
@@ -9250,17 +9302,32 @@
9250
9302
  </fo:block-container>
9251
9303
  </xsl:template>
9252
9304
 
9253
- <xsl:template match="mn:source">
9305
+ <xsl:template match="mn:fmt-source">
9254
9306
  <xsl:if test="../mn:author">
9255
9307
  <xsl:text>, </xsl:text>
9256
9308
  </xsl:if>
9257
- <xsl:call-template name="insert_basic_link">
9258
- <xsl:with-param name="element">
9259
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
9260
- <xsl:apply-templates/>
9261
- </fo:basic-link>
9262
- </xsl:with-param>
9263
- </xsl:call-template>
9309
+ <xsl:choose>
9310
+ <xsl:when test="not(parent::quote)">
9311
+ <fo:block>
9312
+ <xsl:call-template name="insert_basic_link">
9313
+ <xsl:with-param name="element">
9314
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
9315
+ <xsl:apply-templates/>
9316
+ </fo:basic-link>
9317
+ </xsl:with-param>
9318
+ </xsl:call-template>
9319
+ </fo:block>
9320
+ </xsl:when>
9321
+ <xsl:otherwise>
9322
+ <xsl:call-template name="insert_basic_link">
9323
+ <xsl:with-param name="element">
9324
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
9325
+ <xsl:apply-templates/>
9326
+ </fo:basic-link>
9327
+ </xsl:with-param>
9328
+ </xsl:call-template>
9329
+ </xsl:otherwise>
9330
+ </xsl:choose>
9264
9331
  </xsl:template>
9265
9332
 
9266
9333
  <xsl:template match="mn:author">
@@ -9340,7 +9407,7 @@
9340
9407
  <ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
9341
9408
  <xsl:choose>
9342
9409
  <!-- skip figure/name/fn -->
9343
- <xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
9410
+ <xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
9344
9411
  <xsl:otherwise>
9345
9412
  <xsl:element name="figure" namespace="{$namespace_full}">
9346
9413
  <xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
@@ -9536,17 +9603,17 @@
9536
9603
 
9537
9604
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
9538
9605
 
9539
- <xsl:for-each select="mn:name"> <!-- set context -->
9606
+ <xsl:for-each select="mn:fmt-name"> <!-- set context -->
9540
9607
  <xsl:call-template name="setIDforNamedDestination"/>
9541
9608
  </xsl:for-each>
9542
9609
 
9543
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
9610
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
9544
9611
  </fo:block>
9545
9612
 
9546
9613
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
9547
9614
  <xsl:call-template name="showFigureKey"/>
9548
9615
  </xsl:if>
9549
- <xsl:apply-templates select="mn:name"/> <!-- show figure's name AFTER image -->
9616
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
9550
9617
 
9551
9618
  </fo:block-container>
9552
9619
  </xsl:template>
@@ -9572,9 +9639,9 @@
9572
9639
  <xsl:template match="mn:figure[@class = 'pseudocode']">
9573
9640
  <xsl:call-template name="setNamedDestination"/>
9574
9641
  <fo:block id="{@id}">
9575
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
9642
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9576
9643
  </fo:block>
9577
- <xsl:apply-templates select="mn:name"/>
9644
+ <xsl:apply-templates select="mn:fmt-name"/>
9578
9645
  </xsl:template>
9579
9646
 
9580
9647
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
@@ -9585,7 +9652,7 @@
9585
9652
 
9586
9653
  <!-- SOURCE: ... -->
9587
9654
  <!-- figure/source -->
9588
- <xsl:template match="mn:figure/mn:source" priority="2">
9655
+ <xsl:template match="mn:figure/mn:fmt-source" priority="2">
9589
9656
  <xsl:call-template name="termsource"/>
9590
9657
  </xsl:template>
9591
9658
 
@@ -9595,7 +9662,7 @@
9595
9662
  <xsl:variable name="isAdded" select="../@added"/>
9596
9663
  <xsl:variable name="isDeleted" select="../@deleted"/>
9597
9664
  <xsl:choose>
9598
- <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) -->
9665
+ <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) -->
9599
9666
  <fo:inline padding-left="1mm" padding-right="1mm">
9600
9667
  <xsl:if test="not(parent::mn:figure) or parent::mn:p">
9601
9668
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -9616,13 +9683,26 @@
9616
9683
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
9617
9684
 
9618
9685
  <xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
9619
- <xsl:attribute name="width">100%</xsl:attribute>
9686
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
9687
+ <xsl:choose>
9688
+ <xsl:when test="@width and not(@height)">
9689
+ <xsl:attribute name="width">100%</xsl:attribute>
9690
+ <xsl:attribute name="content-height">100%</xsl:attribute>
9691
+ </xsl:when>
9692
+ <xsl:when test="@height and not(@width)">
9693
+ <xsl:attribute name="height">100%</xsl:attribute>
9694
+ <xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
9695
+ </xsl:when>
9696
+ <xsl:when test="not(@width) and not(@height)">
9697
+ <xsl:attribute name="content-height">100%</xsl:attribute>
9698
+ </xsl:when>
9699
+ </xsl:choose>
9700
+
9620
9701
  <xsl:if test="normalize-space($logo_width) != ''">
9621
9702
  <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
9622
9703
  </xsl:if>
9623
- <xsl:attribute name="content-height">100%</xsl:attribute>
9624
9704
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
9625
- <xsl:attribute name="scaling">uniform</xsl:attribute>
9705
+ <xsl:attribute name="vertical-align">top</xsl:attribute>
9626
9706
  </xsl:if>
9627
9707
 
9628
9708
  <xsl:variable name="width">
@@ -9911,7 +9991,7 @@
9911
9991
  <xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
9912
9992
  <xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
9913
9993
 
9914
- <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
9994
+ <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
9915
9995
  <xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
9916
9996
  <xsl:param name="name"/>
9917
9997
 
@@ -9921,8 +10001,8 @@
9921
10001
 
9922
10002
  <xsl:variable name="alt-text">
9923
10003
  <xsl:choose>
9924
- <xsl:when test="normalize-space(../mn:name) != ''">
9925
- <xsl:value-of select="../mn:name"/>
10004
+ <xsl:when test="normalize-space(../mn:fmt-name) != ''">
10005
+ <xsl:value-of select="../mn:fmt-name"/>
9926
10006
  </xsl:when>
9927
10007
  <xsl:when test="normalize-space($name) != ''">
9928
10008
  <xsl:value-of select="$name"/>
@@ -9931,7 +10011,7 @@
9931
10011
  </xsl:choose>
9932
10012
  </xsl:variable>
9933
10013
 
9934
- <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
10014
+ <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
9935
10015
 
9936
10016
  <xsl:choose>
9937
10017
  <xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
@@ -9980,9 +10060,9 @@
9980
10060
  <fo:table-cell column-number="2">
9981
10061
  <fo:block>
9982
10062
  <fo:block-container width="{$width_scale}px" height="{$height_scale}px">
9983
- <xsl:if test="../mn:name/mn:bookmark">
10063
+ <xsl:if test="../mn:fmt-name/mn:bookmark">
9984
10064
  <fo:block line-height="0" font-size="0">
9985
- <xsl:for-each select="../mn:name/mn:bookmark">
10065
+ <xsl:for-each select="../mn:fmt-name/mn:bookmark">
9986
10066
  <xsl:call-template name="bookmark"/>
9987
10067
  </xsl:for-each>
9988
10068
  </fo:block>
@@ -10222,7 +10302,7 @@
10222
10302
 
10223
10303
  <!-- image with svg and emf -->
10224
10304
  <xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
10225
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
10305
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
10226
10306
  <xsl:for-each select="*[local-name() = 'svg']">
10227
10307
  <xsl:call-template name="image_svg">
10228
10308
  <xsl:with-param name="name" select="$name"/>
@@ -10239,7 +10319,7 @@
10239
10319
 
10240
10320
  <xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
10241
10321
  <xsl:variable name="svg_content" select="document(@src)"/>
10242
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
10322
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
10243
10323
  <xsl:for-each select="xalan:nodeset($svg_content)/node()">
10244
10324
  <xsl:call-template name="image_svg">
10245
10325
  <xsl:with-param name="name" select="$name"/>
@@ -10362,7 +10442,7 @@
10362
10442
  <xsl:template match="mn:emf"/>
10363
10443
 
10364
10444
  <!-- figure/name -->
10365
- <xsl:template match="mn:figure/mn:name | mn:image/mn:name">
10445
+ <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
10366
10446
  <xsl:if test="normalize-space() != ''">
10367
10447
  <fo:block xsl:use-attribute-sets="figure-name-style">
10368
10448
 
@@ -10433,25 +10513,25 @@
10433
10513
  <fo:block-container margin-left="0mm" role="SKIP">
10434
10514
  <xsl:call-template name="setNamedDestination"/>
10435
10515
  <fo:block id="{@id}">
10436
- <xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
10516
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
10437
10517
  </fo:block>
10438
10518
  </fo:block-container>
10439
10519
  </fo:block-container>
10440
10520
  </xsl:template>
10441
10521
 
10442
- <xsl:template match="mn:formula/mn:dt/mn:stem">
10522
+ <xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
10443
10523
  <fo:inline>
10444
10524
  <xsl:apply-templates/>
10445
10525
  </fo:inline>
10446
10526
  </xsl:template>
10447
10527
 
10448
- <xsl:template match="mn:admitted/mn:stem">
10528
+ <xsl:template match="mn:fmt-admitted/mn:fmt-stem">
10449
10529
  <fo:inline>
10450
10530
  <xsl:apply-templates/>
10451
10531
  </fo:inline>
10452
10532
  </xsl:template>
10453
10533
 
10454
- <xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
10534
+ <xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
10455
10535
  <!-- https://github.com/metanorma/isodoc/issues/607
10456
10536
  <xsl:if test="normalize-space() != ''">
10457
10537
  <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
@@ -10460,7 +10540,7 @@
10460
10540
  </xsl:template>
10461
10541
 
10462
10542
  <!-- stem inside formula with name (with formula's number) -->
10463
- <xsl:template match="mn:formula[mn:name]/mn:stem">
10543
+ <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
10464
10544
  <fo:block xsl:use-attribute-sets="formula-style">
10465
10545
 
10466
10546
  <fo:table table-layout="fixed" width="100%">
@@ -10480,13 +10560,13 @@
10480
10560
 
10481
10561
  <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
10482
10562
 
10483
- <xsl:for-each select="../mn:name">
10563
+ <xsl:for-each select="../mn:fmt-name">
10484
10564
  <xsl:call-template name="setIDforNamedDestination"/>
10485
10565
  </xsl:for-each>
10486
10566
 
10487
10567
  <xsl:call-template name="refine_formula-stem-number-style"/>
10488
10568
 
10489
- <xsl:apply-templates select="../mn:name"/>
10569
+ <xsl:apply-templates select="../mn:fmt-name"/>
10490
10570
  </fo:block>
10491
10571
  </fo:table-cell>
10492
10572
  </fo:table-row>
@@ -10496,7 +10576,7 @@
10496
10576
  </xsl:template>
10497
10577
 
10498
10578
  <!-- stem inside formula without name (without formula's number) -->
10499
- <xsl:template match="mn:formula[not(mn:name)]/mn:stem">
10579
+ <xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
10500
10580
  <fo:block xsl:use-attribute-sets="formula-style">
10501
10581
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
10502
10582
  <xsl:apply-templates/>
@@ -10850,7 +10930,7 @@
10850
10930
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
10851
10931
  <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
10852
10932
  -->
10853
- <xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
10933
+ <xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
10854
10934
  <fo:inline xsl:use-attribute-sets="mathml-style">
10855
10935
 
10856
10936
  <xsl:call-template name="refine_mathml-style"/>
@@ -11124,7 +11204,7 @@
11124
11204
 
11125
11205
  <xsl:template match="mn:ul | mn:ol" mode="list" name="list">
11126
11206
 
11127
- <xsl:apply-templates select="mn:name">
11207
+ <xsl:apply-templates select="mn:fmt-name">
11128
11208
  <xsl:with-param name="process">true</xsl:with-param>
11129
11209
  </xsl:apply-templates>
11130
11210
 
@@ -11170,7 +11250,7 @@
11170
11250
 
11171
11251
  <xsl:call-template name="refine_list-style"/>
11172
11252
 
11173
- <xsl:if test="mn:name">
11253
+ <xsl:if test="mn:fmt-name">
11174
11254
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
11175
11255
  </xsl:if>
11176
11256
 
@@ -11185,7 +11265,7 @@
11185
11265
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
11186
11266
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
11187
11267
 
11188
- <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
11268
+ <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
11189
11269
  <xsl:param name="process">false</xsl:param>
11190
11270
  <xsl:if test="$process = 'true'">
11191
11271
  <fo:block xsl:use-attribute-sets="list-name-style">
@@ -11316,7 +11396,7 @@
11316
11396
  -->
11317
11397
  <!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
11318
11398
  <!-- fn in text -->
11319
- <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))]" priority="2" name="fn">
11399
+ <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))]" priority="2" name="fn">
11320
11400
  <xsl:param name="footnote_body_from_table">false</xsl:param>
11321
11401
 
11322
11402
  <!-- list of unique footnotes -->
@@ -11440,7 +11520,7 @@
11440
11520
  <!-- commented:
11441
11521
  .//mn:bibitem[ancestor::mn:references]/mn:note |
11442
11522
  because 'fn' there is in biblio-tag -->
11443
- <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])]">
11523
+ <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])]">
11444
11524
  <!-- copy unique fn -->
11445
11525
  <fn gen_id="{generate-id(.)}">
11446
11526
  <xsl:copy-of select="@*"/>
@@ -11525,7 +11605,7 @@
11525
11605
  <xsl:call-template name="displayAdmonitionName"/>
11526
11606
  </fo:block>
11527
11607
  <fo:block xsl:use-attribute-sets="admonition-p-style">
11528
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
11608
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
11529
11609
  </fo:block>
11530
11610
 
11531
11611
  </fo:block-container>
@@ -11551,7 +11631,7 @@
11551
11631
  </xsl:otherwise>
11552
11632
  </xsl:choose> -->
11553
11633
  <xsl:variable name="name">
11554
- <xsl:apply-templates select="mn:name"/>
11634
+ <xsl:apply-templates select="mn:fmt-name"/>
11555
11635
  </xsl:variable>
11556
11636
  <xsl:copy-of select="$name"/>
11557
11637
  <xsl:if test="normalize-space($name) != ''">
@@ -11559,7 +11639,7 @@
11559
11639
  </xsl:if>
11560
11640
  </xsl:template>
11561
11641
 
11562
- <xsl:template match="mn:admonition/mn:name">
11642
+ <xsl:template match="mn:admonition/mn:fmt-name">
11563
11643
  <xsl:apply-templates/>
11564
11644
  </xsl:template>
11565
11645
 
@@ -11687,10 +11767,10 @@
11687
11767
  <xsl:call-template name="setNamedDestination"/>
11688
11768
  <fo:block id="{@id}"/>
11689
11769
 
11690
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
11770
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
11691
11771
 
11692
11772
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
11693
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
11773
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
11694
11774
  </fo:block>
11695
11775
  </xsl:template> <!-- references -->
11696
11776
 
@@ -12006,7 +12086,8 @@
12006
12086
  </xsl:copy>
12007
12087
  </xsl:template>
12008
12088
 
12009
- <xsl:template match="mn:xref" mode="index_add_id">
12089
+ <xsl:template match="mn:xref" mode="index_add_id"/>
12090
+ <xsl:template match="mn:fmt-xref" mode="index_add_id">
12010
12091
  <xsl:param name="docid"/>
12011
12092
  <xsl:variable name="id">
12012
12093
  <xsl:call-template name="generateIndexXrefId">
@@ -12048,7 +12129,7 @@
12048
12129
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
12049
12130
  <xsl:copy>
12050
12131
  <xsl:apply-templates select="@*" mode="index_update"/>
12051
- <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
12132
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
12052
12133
  </xsl:copy>
12053
12134
  </xsl:template>
12054
12135
 
@@ -12069,11 +12150,11 @@
12069
12150
  <xsl:value-of select="."/>
12070
12151
  <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
12071
12152
  </xsl:when>
12072
- <xsl:when test="self::* and local-name(.) = 'xref'">
12153
+ <xsl:when test="self::* and local-name(.) = 'fmt-xref'">
12073
12154
  <xsl:variable name="id" select="@id"/>
12074
12155
 
12075
- <xsl:variable name="id_next" select="following-sibling::mn:xref[1]/@id"/>
12076
- <xsl:variable name="id_prev" select="preceding-sibling::mn:xref[1]/@id"/>
12156
+ <xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
12157
+ <xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
12077
12158
 
12078
12159
  <xsl:variable name="pages_">
12079
12160
  <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
@@ -12169,18 +12250,18 @@
12169
12250
  <xsl:variable name="item_number">
12170
12251
  <xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
12171
12252
  </xsl:variable>
12172
- <xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
12253
+ <xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
12173
12254
  <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
12174
12255
  </xsl:template>
12175
12256
 
12176
- <xsl:template match="mn:indexsect/mn:title" priority="4">
12257
+ <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
12177
12258
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
12178
12259
  <!-- Index -->
12179
12260
  <xsl:apply-templates/>
12180
12261
  </fo:block>
12181
12262
  </xsl:template>
12182
12263
 
12183
- <xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
12264
+ <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
12184
12265
  <!-- Letter A, B, C, ... -->
12185
12266
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
12186
12267
  <xsl:apply-templates/>
@@ -12221,12 +12302,12 @@
12221
12302
  <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"/>
12222
12303
  <bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
12223
12304
  <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"/> -->
12224
- <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]">
12305
+ <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]">
12225
12306
  <!-- skip here, see the template 'fmt-review-start' -->
12226
12307
  </xsl:when>
12227
12308
  <xsl:otherwise>
12228
12309
  <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
12229
- <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>
12310
+ <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>
12230
12311
  <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
12231
12312
  <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
12232
12313
  </xsl:otherwise>
@@ -12390,7 +12471,7 @@
12390
12471
 
12391
12472
  <xsl:template name="processTables_Contents">
12392
12473
  <mnx:tables>
12393
- <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
12474
+ <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
12394
12475
  <xsl:choose>
12395
12476
  <xsl:when test="mn:fmt-name">
12396
12477
  <xsl:variable name="fmt_name">
@@ -12412,7 +12493,7 @@
12412
12493
 
12413
12494
  <xsl:template name="processFigures_Contents">
12414
12495
  <mnx:figures>
12415
- <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) != '']">
12496
+ <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) != '']">
12416
12497
  <xsl:choose>
12417
12498
  <xsl:when test="mn:fmt-name">
12418
12499
  <xsl:variable name="fmt_name">
@@ -12441,7 +12522,7 @@
12441
12522
 
12442
12523
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
12443
12524
 
12444
- <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">
12525
+ <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">
12445
12526
  <xsl:apply-templates mode="contents"/>
12446
12527
  <xsl:text> </xsl:text>
12447
12528
  </xsl:template>
@@ -12453,7 +12534,7 @@
12453
12534
  </xsl:if>
12454
12535
  </xsl:template>
12455
12536
 
12456
- <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">
12537
+ <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">
12457
12538
  <xsl:apply-templates mode="bookmarks"/>
12458
12539
  <xsl:text> </xsl:text>
12459
12540
  </xsl:template>
@@ -12464,7 +12545,7 @@
12464
12545
  </xsl:if>
12465
12546
  </xsl:template>
12466
12547
 
12467
- <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">
12548
+ <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">
12468
12549
  <xsl:value-of select="."/>
12469
12550
  </xsl:template>
12470
12551
 
@@ -12474,7 +12555,7 @@
12474
12555
  </xsl:if>
12475
12556
  </xsl:template>
12476
12557
 
12477
- <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">
12558
+ <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">
12478
12559
  <xsl:value-of select="."/>
12479
12560
  </xsl:template>
12480
12561
 
@@ -12904,7 +12985,7 @@
12904
12985
  <xsl:value-of select="."/>
12905
12986
  </xsl:template>
12906
12987
 
12907
- <xsl:template match="mn:review" mode="contents_item"/>
12988
+ <xsl:template match="mn:annotation" mode="contents_item"/>
12908
12989
 
12909
12990
  <xsl:template match="mn:tab" mode="contents_item">
12910
12991
  <xsl:text> </xsl:text>
@@ -13059,7 +13140,7 @@
13059
13140
  <xsl:apply-templates/>
13060
13141
  </xsl:template>
13061
13142
 
13062
- <xsl:template match="mn:toc//mn:xref" priority="3">
13143
+ <xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
13063
13144
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13064
13145
  <!-- New format: one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13065
13146
  <!-- <test><xsl:copy-of select="."/></test> -->
@@ -13127,8 +13208,8 @@
13127
13208
  <xsl:apply-templates mode="toc_table_width"/>
13128
13209
  </xsl:template>
13129
13210
 
13130
- <xsl:template match="mn:clause[@type = 'toc']/mn:title" mode="toc_table_width"/>
13131
- <xsl:template match="mn:clause[not(@type = 'toc')]/mn:title" mode="toc_table_width"/>
13211
+ <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
13212
+ <xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
13132
13213
 
13133
13214
  <xsl:template match="mn:li" mode="toc_table_width">
13134
13215
  <mn:tr>
@@ -13136,7 +13217,7 @@
13136
13217
  </mn:tr>
13137
13218
  </xsl:template>
13138
13219
 
13139
- <xsl:template match="mn:xref" mode="toc_table_width">
13220
+ <xsl:template match="mn:fmt-xref" mode="toc_table_width">
13140
13221
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13141
13222
  <!-- New format - one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13142
13223
  <xsl:for-each select="mn:tab">
@@ -13182,7 +13263,7 @@
13182
13263
 
13183
13264
  <xsl:variable name="padding">
13184
13265
  <xsl:choose>
13185
- <xsl:when test="ancestor::mn:note and ancestor::mn:name">1</xsl:when>
13266
+ <xsl:when test="ancestor::mn:note and ancestor::mn:fmt-name">1</xsl:when>
13186
13267
  <xsl:when test="$depth = 2">2</xsl:when>
13187
13268
  <xsl:otherwise>1</xsl:otherwise>
13188
13269
  </xsl:choose>
@@ -13215,10 +13296,10 @@
13215
13296
 
13216
13297
  </xsl:template> <!-- tab -->
13217
13298
 
13218
- <xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
13219
- <xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
13299
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
13300
+ <xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
13220
13301
 
13221
- <xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
13302
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
13222
13303
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
13223
13304
  </xsl:template>
13224
13305
 
@@ -13233,13 +13314,13 @@
13233
13314
  </xsl:template>
13234
13315
 
13235
13316
  <xsl:variable name="reviews_">
13236
- <xsl:for-each select="//mn:review[not(parent::mn:review-container)][@from]">
13317
+ <xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
13237
13318
  <xsl:copy>
13238
13319
  <xsl:copy-of select="@from"/>
13239
13320
  <xsl:copy-of select="@id"/>
13240
13321
  </xsl:copy>
13241
13322
  </xsl:for-each>
13242
- <xsl:for-each select="//mn:fmt-review-start[@source]">
13323
+ <xsl:for-each select="//mn:fmt-annotation-start[@source]">
13243
13324
  <xsl:copy>
13244
13325
  <xsl:copy-of select="@source"/>
13245
13326
  <xsl:copy-of select="@id"/>
@@ -13253,7 +13334,7 @@
13253
13334
  <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
13254
13335
  <xsl:variable name="curr_id" select="@id"/>
13255
13336
  <!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
13256
- <xsl:for-each select="$reviews//mn:review[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
13337
+ <xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
13257
13338
  <xsl:variable name="review_id" select="normalize-space(@id)"/>
13258
13339
  <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
13259
13340
  <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>
@@ -13268,7 +13349,7 @@
13268
13349
 
13269
13350
  <!-- document text (not figures, or tables) footnotes -->
13270
13351
  <xsl:variable name="reviews_container_">
13271
- <xsl:for-each select="//mn:review-container/mn:fmt-review-body">
13352
+ <xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
13272
13353
  <xsl:variable name="update_xml_step1">
13273
13354
  <xsl:apply-templates select="." mode="update_xml_step1"/>
13274
13355
  </xsl:variable>
@@ -13277,10 +13358,10 @@
13277
13358
  </xsl:variable>
13278
13359
  <xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
13279
13360
 
13280
- <xsl:template match="mn:review-container"/>
13361
+ <xsl:template match="mn:annotation-container"/>
13281
13362
 
13282
13363
  <!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
13283
- <xsl:template match="mn:review[not(parent::mn:review-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13364
+ <xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13284
13365
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
13285
13366
  <xsl:if test="$isGenerateTableIF = 'false'">
13286
13367
  <xsl:choose>
@@ -13300,7 +13381,7 @@
13300
13381
  </xsl:template>
13301
13382
 
13302
13383
  <!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
13303
- <xsl:template match="mn:fmt-review-start" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13384
+ <xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13304
13385
  <!-- comment 2019-11-29 -->
13305
13386
  <!-- <fo:block font-weight="bold">Review:</fo:block>
13306
13387
  <xsl:apply-templates /> -->
@@ -13356,7 +13437,7 @@
13356
13437
  </xsl:template>
13357
13438
 
13358
13439
  <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
13359
- <xsl:template match="mn:review[@type = 'other']"/>
13440
+ <xsl:template match="mn:annotation[@type = 'other']"/>
13360
13441
 
13361
13442
  <!-- ============ -->
13362
13443
  <!-- errata -->
@@ -13749,9 +13830,12 @@
13749
13830
  <xsl:choose>
13750
13831
  <xsl:when test="mn:fmt-title">
13751
13832
  <xsl:variable name="fmt_title_section">
13752
- <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:review)]"/>
13833
+ <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
13753
13834
  </xsl:variable>
13754
13835
  <xsl:value-of select="normalize-space($fmt_title_section)"/>
13836
+ <xsl:if test="normalize-space($fmt_title_section) = ''">
13837
+ <xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
13838
+ </xsl:if>
13755
13839
  </xsl:when>
13756
13840
  <xsl:otherwise>
13757
13841
  <xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
@@ -13764,6 +13848,9 @@
13764
13848
  <xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
13765
13849
  <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
13766
13850
  </xsl:when>
13851
+ <xsl:when test="mn:fmt-title/mn:tab">
13852
+ <xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
13853
+ </xsl:when>
13767
13854
  <xsl:when test="mn:fmt-title">
13768
13855
  <xsl:copy-of select="mn:fmt-title/node()"/>
13769
13856
  </xsl:when>
@@ -13905,10 +13992,10 @@
13905
13992
 
13906
13993
  </fo:block>
13907
13994
 
13908
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
13995
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
13909
13996
 
13910
13997
  <fo:block>
13911
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
13998
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
13912
13999
  </fo:block>
13913
14000
  </xsl:otherwise>
13914
14001
  </xsl:choose>
@@ -13917,7 +14004,7 @@
13917
14004
  <xsl:template name="refine_annex_style">
13918
14005
  </xsl:template>
13919
14006
 
13920
- <xsl:template match="mn:name/text()">
14007
+ <xsl:template match="mn:name/text() | mn:fmt-name/text()">
13921
14008
  <!-- 0xA0 to space replacement -->
13922
14009
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
13923
14010
  </xsl:template>
@@ -13973,28 +14060,28 @@
13973
14060
  <xsl:template match="mn:amend"/>
13974
14061
 
13975
14062
  <!-- fmt-title renamed to title in update_xml_step1 -->
13976
- <xsl:template match="mn:fmt-title"/>
14063
+ <!-- <xsl:template match="mn:fmt-title" /> -->
13977
14064
 
13978
14065
  <!-- fmt-name renamed to name in update_xml_step1 -->
13979
- <xsl:template match="mn:fmt-name"/>
14066
+ <!-- <xsl:template match="mn:fmt-name" /> -->
13980
14067
 
13981
14068
  <!-- fmt-preferred renamed to preferred in update_xml_step1 -->
13982
- <xsl:template match="mn:fmt-preferred"/>
14069
+ <!-- <xsl:template match="mn:fmt-preferred" /> -->
13983
14070
 
13984
14071
  <!-- fmt-admitted renamed to admitted in update_xml_step1 -->
13985
- <xsl:template match="mn:fmt-admitted"/>
14072
+ <!-- <xsl:template match="mn:fmt-admitted" /> -->
13986
14073
 
13987
14074
  <!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
13988
- <xsl:template match="mn:fmt-deprecates"/>
14075
+ <!-- <xsl:template match="mn:fmt-deprecates" /> -->
13989
14076
 
13990
14077
  <!-- fmt-definition renamed to definition in update_xml_step1 -->
13991
- <xsl:template match="mn:fmt-definition"/>
14078
+ <!-- <xsl:template match="mn:fmt-definition" /> -->
13992
14079
 
13993
14080
  <!-- fmt-termsource renamed to termsource in update_xml_step1 -->
13994
- <xsl:template match="mn:fmt-termsource"/>
14081
+ <!-- <xsl:template match="mn:fmt-termsource" /> -->
13995
14082
 
13996
14083
  <!-- fmt-source renamed to source in update_xml_step1 -->
13997
- <xsl:template match="mn:fmt-source"/>
14084
+ <!-- <xsl:template match="mn:fmt-source" /> -->
13998
14085
 
13999
14086
  <xsl:template match="mn:semx">
14000
14087
  <xsl:apply-templates/>
@@ -14439,12 +14526,12 @@
14439
14526
  <xsl:when test="ancestor::mn:preface">
14440
14527
  <xsl:value-of select="$level_total - 2"/>
14441
14528
  </xsl:when>
14442
- <xsl:when test="ancestor::mn:sections and self::mn:title">
14529
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
14443
14530
  <!-- determine 'depth' depends on upper clause with title/@depth -->
14444
14531
  <!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
14445
- <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:title/@depth][1]/mn:title/@depth"/>
14532
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
14446
14533
  <!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
14447
- <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:title/@depth][1]/ancestor::*)"/>
14534
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
14448
14535
  <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
14449
14536
  <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
14450
14537
  <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
@@ -14460,8 +14547,8 @@
14460
14547
  </xsl:otherwise>
14461
14548
  </xsl:choose>
14462
14549
  </xsl:when>
14463
- <xsl:when test="ancestor::mn:sections and self::mn:name and parent::mn:term">
14464
- <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:title/@depth)"/>
14550
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
14551
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
14465
14552
  <xsl:choose>
14466
14553
  <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
14467
14554
  <xsl:value-of select="number($upper_terms_depth + 1)"/>
@@ -14472,7 +14559,7 @@
14472
14559
  </xsl:choose>
14473
14560
  </xsl:when>
14474
14561
  <xsl:when test="ancestor::mn:sections">
14475
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:title/@depth)"/>
14562
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
14476
14563
  <xsl:choose>
14477
14564
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
14478
14565
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -14488,8 +14575,8 @@
14488
14575
  <xsl:when test="parent::mn:annex">
14489
14576
  <xsl:value-of select="$level_total - 1"/>
14490
14577
  </xsl:when>
14491
- <xsl:when test="ancestor::mn:annex and self::mn:title">
14492
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:title/@depth)"/>
14578
+ <xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
14579
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
14493
14580
  <xsl:choose>
14494
14581
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
14495
14582
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -14522,7 +14609,7 @@
14522
14609
  </xsl:when>
14523
14610
  <xsl:otherwise>
14524
14611
  <xsl:variable name="title_level_">
14525
- <xsl:for-each select="../preceding-sibling::mn:title[1]">
14612
+ <xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
14526
14613
  <xsl:call-template name="getLevel"/>
14527
14614
  </xsl:for-each>
14528
14615
  </xsl:variable>
@@ -14599,15 +14686,17 @@
14599
14686
  </xsl:template>
14600
14687
 
14601
14688
  <xsl:template name="setNamedDestination">
14602
- <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
14603
- <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'">
14604
- <fox:destination internal-destination="{@id}"/>
14605
- </xsl:if>
14606
- <xsl:for-each select=". | mn:title | mn:name">
14607
- <xsl:if test="@named_dest">
14608
- <fox:destination internal-destination="{@named_dest}"/>
14689
+ <xsl:if test="$isGenerateTableIF = 'false'">
14690
+ <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
14691
+ <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'">
14692
+ <fox:destination internal-destination="{@id}"/>
14609
14693
  </xsl:if>
14610
- </xsl:for-each>
14694
+ <xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
14695
+ <xsl:if test="@named_dest">
14696
+ <fox:destination internal-destination="{@named_dest}"/>
14697
+ </xsl:if>
14698
+ </xsl:for-each>
14699
+ </xsl:if>
14611
14700
  </xsl:template>
14612
14701
 
14613
14702
  <xsl:template name="add-letter-spacing">
@@ -14955,7 +15044,7 @@
14955
15044
  </xsl:when>
14956
15045
  <xsl:otherwise>
14957
15046
  <!-- namespace-uri(ancestor::mn:title) != '' to skip title from $contents -->
14958
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
15047
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
14959
15048
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
14960
15049
  </xsl:if>
14961
15050
  <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">
@@ -14989,7 +15078,7 @@
14989
15078
  </fo:block>
14990
15079
  </fo:block-container>
14991
15080
  </fo:inline-container>
14992
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
15081
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
14993
15082
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
14994
15083
  </xsl:if>
14995
15084
  </xsl:otherwise>