metanorma-plateau 1.0.9 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  <xsl:output 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
 
@@ -62,6 +62,99 @@
62
62
  </xsl:for-each>
63
63
  </xsl:variable>
64
64
 
65
+ <xsl:template name="layout-master-set">
66
+ <fo:layout-master-set>
67
+
68
+ <!-- Cover page -->
69
+ <xsl:variable name="cover_page_margin_bottom">
70
+ <xsl:choose>
71
+ <xsl:when test="$doctype = 'technical-report'">48</xsl:when>
72
+ <xsl:otherwise>45</xsl:otherwise>
73
+ </xsl:choose>
74
+ </xsl:variable>
75
+ <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
76
+ <fo:region-body margin-top="15mm" margin-bottom="{$cover_page_margin_bottom}mm" margin-left="36mm" margin-right="8.5mm"/>
77
+ <fo:region-before region-name="header" extent="15mm"/>
78
+ <fo:region-after region-name="footer" extent="{$cover_page_margin_bottom}mm"/>
79
+ <fo:region-start region-name="left-region" extent="36mm"/>
80
+ <fo:region-end region-name="right-region" extent="8.5mm"/>
81
+ </fo:simple-page-master>
82
+
83
+ <fo:simple-page-master master-name="document_preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
84
+ <xsl:if test="$vertical_layout = 'true'">
85
+ <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
86
+ <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
87
+ </xsl:if>
88
+ <fo:region-body margin-top="50mm" margin-bottom="35mm" margin-left="26mm" margin-right="34mm">
89
+ <xsl:if test="$vertical_layout = 'true'">
90
+ <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
91
+ </xsl:if>
92
+ </fo:region-body>
93
+ <fo:region-before region-name="header" extent="50mm"/>
94
+ <fo:region-after region-name="footer" extent="35mm"/>
95
+ <fo:region-start region-name="left-region" extent="26mm"/>
96
+ <fo:region-end region-name="right-region" extent="34mm"/>
97
+ </fo:simple-page-master>
98
+
99
+ <fo:simple-page-master master-name="document_toc" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
100
+ <xsl:if test="$vertical_layout = 'true'">
101
+ <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
102
+ <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
103
+ </xsl:if>
104
+ <fo:region-body margin-top="16.5mm" margin-bottom="22mm" margin-left="14.5mm" margin-right="22.3mm">
105
+ <xsl:if test="$vertical_layout = 'true'">
106
+ <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
107
+ </xsl:if>
108
+ </fo:region-body>
109
+ <fo:region-before region-name="header" extent="16.5mm"/>
110
+ <fo:region-after region-name="footer" extent="22mm"/>
111
+ <fo:region-start region-name="left-region" extent="14.5mm"/>
112
+ <fo:region-end region-name="right-region" extent="22.3mm"/>
113
+ </fo:simple-page-master>
114
+
115
+ <fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
116
+ <xsl:if test="$vertical_layout = 'true'">
117
+ <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
118
+ <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
119
+ </xsl:if>
120
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
121
+ <xsl:if test="$vertical_layout = 'true'">
122
+ <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
123
+ </xsl:if>
124
+ </fo:region-body>
125
+ <fo:region-before region-name="header" extent="{$marginTop}mm"/>
126
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
127
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
128
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
129
+ </fo:simple-page-master>
130
+
131
+ <!-- landscape -->
132
+ <fo:simple-page-master master-name="document-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
133
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
134
+ <fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
135
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm" precedence="true"/>
136
+ <fo:region-start region-name="left-region-landscape" extent="{$marginLeftRight1}mm"/>
137
+ <fo:region-end region-name="right-region-landscape" extent="{$marginLeftRight2}mm"/>
138
+ </fo:simple-page-master>
139
+
140
+ <fo:simple-page-master master-name="last-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
141
+ <fo:region-body margin-top="179.5mm" margin-bottom="30mm" margin-left="15mm" margin-right="22.7mm"/>
142
+ <fo:region-before region-name="header" extent="179.5mm"/>
143
+ <fo:region-after region-name="footer" extent="30mm"/>
144
+ <fo:region-start region-name="left-region" extent="15mm"/>
145
+ <fo:region-end region-name="right-region" extent="22.7mm"/>
146
+ </fo:simple-page-master>
147
+
148
+ <fo:simple-page-master master-name="last-page_technical-report" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
149
+ <fo:region-body margin-top="191mm" margin-bottom="41mm" margin-left="26mm" margin-right="26mm"/>
150
+ <fo:region-before region-name="header" extent="{$marginTop}mm"/>
151
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
152
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
153
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
154
+ </fo:simple-page-master>
155
+ </fo:layout-master-set>
156
+ </xsl:template> <!-- END: layout-master-set -->
157
+
65
158
  <xsl:template match="/">
66
159
 
67
160
  <fo:root xml:lang="{$lang}">
@@ -76,96 +169,7 @@
76
169
  <xsl:attribute name="font-size">10pt</xsl:attribute>
77
170
  </xsl:if>
78
171
 
79
- <fo:layout-master-set>
80
-
81
- <!-- Cover page -->
82
- <xsl:variable name="cover_page_margin_bottom">
83
- <xsl:choose>
84
- <xsl:when test="$doctype = 'technical-report'">48</xsl:when>
85
- <xsl:otherwise>45</xsl:otherwise>
86
- </xsl:choose>
87
- </xsl:variable>
88
- <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
89
- <fo:region-body margin-top="15mm" margin-bottom="{$cover_page_margin_bottom}mm" margin-left="36mm" margin-right="8.5mm"/>
90
- <fo:region-before region-name="header" extent="15mm"/>
91
- <fo:region-after region-name="footer" extent="{$cover_page_margin_bottom}mm"/>
92
- <fo:region-start region-name="left-region" extent="36mm"/>
93
- <fo:region-end region-name="right-region" extent="8.5mm"/>
94
- </fo:simple-page-master>
95
-
96
- <fo:simple-page-master master-name="document_preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
97
- <xsl:if test="$vertical_layout = 'true'">
98
- <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
99
- <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
100
- </xsl:if>
101
- <fo:region-body margin-top="50mm" margin-bottom="35mm" margin-left="26mm" margin-right="34mm">
102
- <xsl:if test="$vertical_layout = 'true'">
103
- <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
104
- </xsl:if>
105
- </fo:region-body>
106
- <fo:region-before region-name="header" extent="50mm"/>
107
- <fo:region-after region-name="footer" extent="35mm"/>
108
- <fo:region-start region-name="left-region" extent="26mm"/>
109
- <fo:region-end region-name="right-region" extent="34mm"/>
110
- </fo:simple-page-master>
111
-
112
- <fo:simple-page-master master-name="document_toc" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
113
- <xsl:if test="$vertical_layout = 'true'">
114
- <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
115
- <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
116
- </xsl:if>
117
- <fo:region-body margin-top="16.5mm" margin-bottom="22mm" margin-left="14.5mm" margin-right="22.3mm">
118
- <xsl:if test="$vertical_layout = 'true'">
119
- <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
120
- </xsl:if>
121
- </fo:region-body>
122
- <fo:region-before region-name="header" extent="16.5mm"/>
123
- <fo:region-after region-name="footer" extent="22mm"/>
124
- <fo:region-start region-name="left-region" extent="14.5mm"/>
125
- <fo:region-end region-name="right-region" extent="22.3mm"/>
126
- </fo:simple-page-master>
127
-
128
- <fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
129
- <xsl:if test="$vertical_layout = 'true'">
130
- <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
131
- <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
132
- </xsl:if>
133
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
134
- <xsl:if test="$vertical_layout = 'true'">
135
- <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
136
- </xsl:if>
137
- </fo:region-body>
138
- <fo:region-before region-name="header" extent="{$marginTop}mm"/>
139
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
140
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
141
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
142
- </fo:simple-page-master>
143
-
144
- <!-- landscape -->
145
- <fo:simple-page-master master-name="document-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
146
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
147
- <fo:region-before region-name="header" extent="{$marginTop}mm" precedence="true"/>
148
- <fo:region-after region-name="footer" extent="{$marginBottom}mm" precedence="true"/>
149
- <fo:region-start region-name="left-region-landscape" extent="{$marginLeftRight1}mm"/>
150
- <fo:region-end region-name="right-region-landscape" extent="{$marginLeftRight2}mm"/>
151
- </fo:simple-page-master>
152
-
153
- <fo:simple-page-master master-name="last-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
154
- <fo:region-body margin-top="179.5mm" margin-bottom="30mm" margin-left="15mm" margin-right="22.7mm"/>
155
- <fo:region-before region-name="header" extent="179.5mm"/>
156
- <fo:region-after region-name="footer" extent="30mm"/>
157
- <fo:region-start region-name="left-region" extent="15mm"/>
158
- <fo:region-end region-name="right-region" extent="22.7mm"/>
159
- </fo:simple-page-master>
160
-
161
- <fo:simple-page-master master-name="last-page_technical-report" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
162
- <fo:region-body margin-top="191mm" margin-bottom="41mm" margin-left="26mm" margin-right="26mm"/>
163
- <fo:region-before region-name="header" extent="{$marginTop}mm"/>
164
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
165
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
166
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
167
- </fo:simple-page-master>
168
- </fo:layout-master-set>
172
+ <xsl:call-template name="layout-master-set"/>
169
173
 
170
174
  <fo:declarations>
171
175
  <xsl:call-template name="addPDFUAmeta"/>
@@ -235,7 +239,7 @@
235
239
  <!-- <xsl:for-each select="xalan:nodeset($current_document)"> -->
236
240
  <xsl:for-each select="xalan:nodeset($updated_xml_with_pages)">
237
241
 
238
- <xsl:call-template name="insertCoverPage">
242
+ <xsl:call-template name="cover-page">
239
243
  <xsl:with-param name="num" select="$num"/>
240
244
  </xsl:call-template>
241
245
 
@@ -337,46 +341,7 @@
337
341
  </fo:page-sequence>
338
342
  </xsl:for-each>
339
343
 
340
- <xsl:choose>
341
- <xsl:when test="$doctype = 'technical-report'">
342
- <fo:page-sequence master-reference="last-page_technical-report" force-page-count="no-force">
343
- <xsl:call-template name="insertHeaderFooter"/>
344
- <fo:flow flow-name="xsl-region-body">
345
- <fo:block-container width="100%" height="64mm" border="0.75pt solid black" font-size="14pt" text-align="center" display-align="center" line-height="1.7">
346
- <fo:block>
347
- <xsl:value-of select="/*/mn:bibdata/mn:title[@language = 'ja' and @type = 'title-main']"/>
348
- </fo:block>
349
- <fo:block>
350
- <xsl:value-of select="$i18n_doctype_dict_technical_report"/>
351
- </fo:block>
352
- <fo:block font-size="12pt" margin-top="18pt">
353
- <fo:block><xsl:value-of select="/*/mn:bibdata/mn:date[@type = 'published']"/><xsl:text> 発行</xsl:text></fo:block>
354
- <!-- 委託者 (Contractor) -->
355
- <fo:block>委託者:<xsl:value-of select="/*/mn:bibdata/mn:contributor[mn:role/@type = 'author']/mn:organization/mn:name"/></fo:block>
356
- <!-- 受託者 (Trustees) -->
357
- <fo:block>受託者:<xsl:value-of select="/*/mn:bibdata/mn:contributor[mn:role/@type = 'enabler']/mn:organization/mn:name"/></fo:block>
358
- </fo:block>
359
- </fo:block-container>
360
- </fo:flow>
361
- </fo:page-sequence>
362
- </xsl:when>
363
- <xsl:otherwise> <!-- handbook -->
364
- <fo:page-sequence master-reference="last-page" force-page-count="no-force">
365
- <fo:flow flow-name="xsl-region-body">
366
- <fo:block-container width="100%" border="0.75pt solid black" font-size="10pt" line-height="1.7">
367
- <fo:block margin-left="4.5mm" margin-top="1mm">
368
- <xsl:value-of select="/*/mn:bibdata/mn:title[@language = 'ja' and @type = 'title-main']"/>
369
- <fo:inline padding-left="4mm"><xsl:value-of select="/*/mn:bibdata/mn:edition[@language = 'ja']"/></fo:inline>
370
- </fo:block>
371
- <fo:block margin-left="7.7mm"><xsl:value-of select="/*/mn:bibdata/mn:date[@type = 'published']"/><xsl:text> 発行</xsl:text></fo:block>
372
- <!-- MLIT Department -->
373
- <fo:block margin-left="7.7mm"><xsl:value-of select="/*/mn:bibdata/mn:contributor[mn:role/@type = 'author']/mn:organization/mn:name"/></fo:block>
374
- <fo:block margin-left="9mm"><xsl:value-of select="/*/mn:bibdata/mn:contributor[mn:role/@type = 'enabler']/mn:organization/mn:name"/></fo:block>
375
- </fo:block-container>
376
- </fo:flow>
377
- </fo:page-sequence>
378
- </xsl:otherwise>
379
- </xsl:choose>
344
+ <xsl:call-template name="back-page"/>
380
345
 
381
346
  </xsl:for-each>
382
347
 
@@ -419,7 +384,7 @@
419
384
  <xsl:element name="sections" namespace="{$namespace_full}"> <!-- save context element -->
420
385
 
421
386
  <!-- determine clause 2 element number -->
422
- <xsl:variable name="clause_2_num_" select="count(/*/mn:sections/*[normalize-space(mn:title/mn:tab/preceding-sibling::*) = '2']/preceding-sibling::*)"/>
387
+ <xsl:variable name="clause_2_num_" select="count(/*/mn:sections/*[normalize-space(mn:fmt-title/mn:tab/preceding-sibling::*) = '2']/preceding-sibling::*)"/>
423
388
  <xsl:variable name="clause_2_num__">
424
389
  <xsl:choose>
425
390
  <xsl:when test="$clause_2_num_ = 0">2</xsl:when>
@@ -496,7 +461,7 @@
496
461
  <fo:block><fo:leader leader-pattern="rule" rule-style="double" rule-thickness="1.5pt" leader-length="100%"/></fo:block>
497
462
  </xsl:if>
498
463
  <xsl:apply-templates/>
499
- <xsl:if test="count(*) = 1 and mn:title"> <!-- if there isn't user ToC -->
464
+ <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
500
465
  <!-- fill ToC -->
501
466
  <fo:block role="TOC" font-weight="bold">
502
467
  <xsl:if test="$doctype = 'technical-report'">
@@ -592,7 +557,7 @@
592
557
  </xsl:if>
593
558
  </xsl:template>
594
559
 
595
- <xsl:template match="mn:clause[@type = 'toc']/mn:title" priority="3"/>
560
+ <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" priority="3"/>
596
561
 
597
562
  <xsl:template name="insertTocItem">
598
563
  <xsl:param name="printSection">false</xsl:param>
@@ -615,7 +580,7 @@
615
580
  </fo:block>
616
581
  </xsl:template>
617
582
 
618
- <xsl:template name="insertCoverPage">
583
+ <xsl:template name="cover-page">
619
584
  <xsl:param name="num"/>
620
585
  <fo:page-sequence master-reference="cover-page" force-page-count="no-force" font-family="Noto Sans Condensed">
621
586
 
@@ -754,7 +719,7 @@
754
719
  <fo:block id="firstpage_id_{$num}"> </fo:block>
755
720
  </fo:flow>
756
721
  </fo:page-sequence>
757
- </xsl:template> <!-- insertCoverPage -->
722
+ </xsl:template> <!-- cover-page -->
758
723
 
759
724
  <xsl:template match="mn:p[@class = 'JapaneseIndustrialStandard']" priority="4"/>
760
725
  <xsl:template match="mn:p[@class = 'StandardNumber']" priority="4"/>
@@ -895,7 +860,7 @@
895
860
  <xsl:choose>
896
861
  <xsl:when test="self::mn:p and count(node()) = count(processing-instruction())"><!-- skip --></xsl:when> <!-- empty paragraph with processing-instruction -->
897
862
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
898
- <xsl:when test="self::mn:title or self::mn:term">
863
+ <xsl:when test="self::mn:fmt-title or self::mn:term">
899
864
  <xsl:apply-templates select="."/>
900
865
  </xsl:when>
901
866
  <xsl:when test="@mainsection = 'true'">
@@ -922,7 +887,7 @@
922
887
  </xsl:choose>
923
888
  </xsl:template>
924
889
 
925
- <xsl:template match="mn:title" priority="2" name="title">
890
+ <xsl:template match="mn:fmt-title" priority="2" name="title">
926
891
 
927
892
  <xsl:variable name="level">
928
893
  <xsl:call-template name="getLevel"/>
@@ -968,8 +933,8 @@
968
933
  <xsl:when test="ancestor::mn:foreword and $level = 2">0mm</xsl:when>
969
934
  <!-- <xsl:when test="ancestor::mn:annex and $level = 2">4.5mm</xsl:when> -->
970
935
  <xsl:when test="ancestor::mn:bibliography and $level = 2">0mm</xsl:when>
971
- <xsl:when test="$doctype = 'technical-report' and $level = 2 and preceding-sibling::*[2][self::mn:title]">0mm</xsl:when>
972
- <xsl:when test="$doctype = 'technical-report' and $level = 3 and preceding-sibling::*[2][self::mn:title]">0mm</xsl:when>
936
+ <xsl:when test="$doctype = 'technical-report' and $level = 2 and preceding-sibling::*[2][self::mn:fmt-title]">0mm</xsl:when>
937
+ <xsl:when test="$doctype = 'technical-report' and $level = 3 and preceding-sibling::*[2][self::mn:fmt-title]">0mm</xsl:when>
973
938
  <xsl:when test="$level = 2">2mm</xsl:when>
974
939
  <xsl:when test="$level &gt;= 3">2mm</xsl:when>
975
940
  <xsl:otherwise>0mm</xsl:otherwise>
@@ -1106,15 +1071,15 @@
1106
1071
  </xsl:template>
1107
1072
 
1108
1073
  <!-- indent for clause level 4 and more -->
1109
- <xsl:template match="mn:sections/mn:page_sequence//mn:clause[mn:title[@depth &gt;= 4]]" priority="20">
1074
+ <xsl:template match="mn:sections/mn:page_sequence//mn:clause[mn:fmt-title[@depth &gt;= 4]]" priority="20">
1110
1075
  <fo:block keep-with-next="always">
1111
1076
  <fo:block id="{@id}"/>
1112
1077
  </fo:block>
1113
- <xsl:apply-templates select="mn:title"/>
1078
+ <xsl:apply-templates select="mn:fmt-title"/>
1114
1079
  <fo:block-container margin-left="6mm">
1115
1080
  <fo:block-container margin-left="0">
1116
1081
  <fo:block>
1117
- <xsl:apply-templates select="*[not(self::mn:title)]"/>
1082
+ <xsl:apply-templates select="*[not(self::mn:fmt-title)]"/>
1118
1083
  </fo:block>
1119
1084
  </fo:block-container>
1120
1085
  </fo:block-container>
@@ -1143,7 +1108,7 @@
1143
1108
 
1144
1109
  <xsl:choose>
1145
1110
 
1146
- <xsl:when test="preceding-sibling::*[1][self::mn:title]/@inline-header = 'true' and $inline-header = 'false'"/> <!-- paragraph displayed in title template -->
1111
+ <xsl:when test="preceding-sibling::*[1][self::mn:fmt-title]/@inline-header = 'true' and $inline-header = 'false'"/> <!-- paragraph displayed in title template -->
1147
1112
 
1148
1113
  <xsl:otherwise>
1149
1114
 
@@ -1187,7 +1152,7 @@
1187
1152
  <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
1188
1153
  </xsl:if>
1189
1154
 
1190
- <xsl:if test="parent::mn:definition">
1155
+ <xsl:if test="parent::mn:fmt-definition">
1191
1156
  <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
1192
1157
  </xsl:if>
1193
1158
 
@@ -1274,10 +1239,10 @@
1274
1239
  <fo:table-row>
1275
1240
  <fo:table-cell padding="2mm">
1276
1241
  <fo:block keep-with-next="always" margin-bottom="10pt" role="SKIP">
1277
- <xsl:apply-templates select="mn:name"/>
1242
+ <xsl:apply-templates select="mn:fmt-name"/>
1278
1243
  </fo:block>
1279
1244
  <fo:block>
1280
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
1245
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
1281
1246
  </fo:block>
1282
1247
  </fo:table-cell>
1283
1248
  </fo:table-row>
@@ -1299,12 +1264,12 @@
1299
1264
  <fo:list-item>
1300
1265
  <fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()">
1301
1266
  <fo:block xsl:use-attribute-sets="note-name-style">
1302
- <xsl:apply-templates select="mn:name"/>
1267
+ <xsl:apply-templates select="mn:fmt-name"/>
1303
1268
  </fo:block>
1304
1269
  </fo:list-item-label>
1305
1270
  <fo:list-item-body start-indent="body-start()">
1306
1271
  <fo:block>
1307
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
1272
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
1308
1273
  </fo:block>
1309
1274
  </fo:list-item-body>
1310
1275
  </fo:list-item>
@@ -1590,7 +1555,7 @@
1590
1555
  <xsl:variable name="tag_font_en_bold_open">###<xsl:value-of select="$element_name_font_en_bold"/>###</xsl:variable>
1591
1556
  <xsl:variable name="tag_font_en_bold_close">###/<xsl:value-of select="$element_name_font_en_bold"/>###</xsl:variable>
1592
1557
 
1593
- <xsl:template match="mn:p//text()[not(ancestor::mn:strong) and not(ancestor::mn:stem)] | mn:dt/text() | mn:td/text() | mn:th/text()" mode="update_xml_step1">
1558
+ <xsl:template match="mn:p//text()[not(ancestor::mn:strong) and not(ancestor::mn:fmt-stem)] | mn:dt/text() | mn:td/text() | mn:th/text()" mode="update_xml_step1">
1594
1559
  <!-- add hairspace after 'IDEOGRAPHIC SPACE' (U+3000) -->
1595
1560
  <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.), '(\u3000)', concat('$1',$hair_space))"/>
1596
1561
  <xsl:variable name="text_en__">
@@ -1617,8 +1582,6 @@
1617
1582
  <xsl:copy-of select="xalan:nodeset($text_en)/*[local-name() = 'text']/node()"/>
1618
1583
  </xsl:template>
1619
1584
 
1620
- <!-- mn:term/mn:preferred2//text() | -->
1621
-
1622
1585
  <!-- <name>注記 1</name> to <name>注記<font_en> 1</font_en></name> -->
1623
1586
  <xsl:template match="mn:title/text() | mn:fmt-title/text() | mn:note/mn:name/text() | mn:note/mn:fmt-name/text() | mn:termnote/mn:name/text() | mn:termnote/mn:fmt-name/text() | mn:table/mn:name/text() | mn:table/mn:fmt-name/text() | mn:figure/mn:name/text() | mn:figure/mn:fmt-name/text() | mn:termexample/mn:name/text() | mn:termexample/mn:fmt-name/text() | mn:xref//text() | mn:fmt-xref//text() | mn:origin/text() | mn:fmt-origin/text()" mode="update_xml_step1">
1624
1587
  <xsl:variable name="text_en_" select="java:replaceAll(java:java.lang.String.new(.), $regex_en, concat($tag_font_en_bold_open,'$1',$tag_font_en_bold_close))"/>
@@ -1675,12 +1638,14 @@
1675
1638
  </xsl:copy>
1676
1639
  </xsl:template>
1677
1640
  <xsl:template match="mn:example/mn:fmt-name[contains(mn:span/text(), ' — ')]" mode="update_xml_step1" priority="2">
1678
- <xsl:element name="name" namespace="{$namespace_full}">
1641
+ <!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
1642
+ <xsl:copy>
1679
1643
  <xsl:copy-of select="@*"/>
1680
1644
  <xsl:apply-templates select="*[1]" mode="update_xml_step1"/>
1681
- </xsl:element>
1645
+ </xsl:copy>
1646
+ <!-- </xsl:element> -->
1682
1647
  </xsl:template>
1683
- <xsl:template match="mn:example/mn:name/text()" mode="update_xml_step1">
1648
+ <xsl:template match="mn:example/mn:fmt-name/text()" mode="update_xml_step1">
1684
1649
  <xsl:variable name="example_name" select="."/>
1685
1650
  <!--
1686
1651
  <xsl:choose>
@@ -1701,7 +1666,7 @@
1701
1666
  <xsl:copy-of select="xalan:nodeset($text_en)/*[local-name() = 'text']/node()"/>
1702
1667
  </xsl:template>
1703
1668
 
1704
- <xsl:template match="mn:eref//text()" mode="update_xml_step1">
1669
+ <xsl:template match="mn:fmt-eref//text()" mode="update_xml_step1">
1705
1670
  <!-- Example: JIS Z 8301:2011 to <font_en_bold>JIS Z 8301</font_en_bold><font_en>:2011</font_en> -->
1706
1671
  <xsl:variable name="parts">
1707
1672
  <xsl:choose>
@@ -1751,6 +1716,11 @@
1751
1716
  <!-- Key title after the table -->
1752
1717
  <!-- <xsl:template match="mn:table/mn:p[@class = 'ListTitle']" priority="2" mode="update_xml_step1"/> -->
1753
1718
 
1719
+ <!-- prevent nested <font_en><font_en>...</font_en></font_en> in the auto-layout table width XSL-FO -->
1720
+ <xsl:template match="*[local-name() = 'font_en'] | *[local-name() = 'font_en_bold']" mode="update_xml_step1">
1721
+ <xsl:copy-of select="."/>
1722
+ </xsl:template>
1723
+
1754
1724
  <xsl:template match="*[local-name() = 'font_en_bold'][normalize-space() != '']">
1755
1725
  <xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
1756
1726
  <xsl:choose>
@@ -1759,17 +1729,15 @@
1759
1729
  </xsl:choose>
1760
1730
  </xsl:if>
1761
1731
  <fo:inline font-family="Noto Sans Condensed" font-weight="300"> <!-- font-weight="bold" -->
1762
- <!-- <xsl:if test="ancestor::mn:preferred">
1763
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1764
- </xsl:if> -->
1765
- <xsl:if test="(ancestor::mn:figure or ancestor::mn:table) and parent::mn:name">
1732
+
1733
+ <xsl:if test="(ancestor::mn:figure or ancestor::mn:table) and parent::mn:fmt-name">
1766
1734
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1767
1735
  <xsl:if test="$doctype = 'technical-report'">
1768
1736
  <xsl:attribute name="font-weight">normal</xsl:attribute>
1769
1737
  </xsl:if>
1770
1738
  </xsl:if>
1771
1739
 
1772
- <xsl:if test="ancestor::mn:annex and ancestor::mn:title and not(ancestor::mn:clause)">
1740
+ <xsl:if test="ancestor::mn:annex and ancestor::mn:fmt-title and not(ancestor::mn:clause)">
1773
1741
  <xsl:attribute name="font-family">inherit</xsl:attribute>
1774
1742
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1775
1743
  </xsl:if>
@@ -1785,6 +1753,7 @@
1785
1753
  </xsl:template>
1786
1754
 
1787
1755
  <xsl:template match="*[local-name() = 'font_en'][normalize-space() != '']">
1756
+ <!-- <debug><xsl:copy-of select="ancestor::mn:td"/></debug> -->
1788
1757
  <xsl:if test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
1789
1758
  <xsl:choose>
1790
1759
  <xsl:when test="$isGenerateTableIF = 'false'"><fo:inline font-size="0.1pt"><xsl:text> </xsl:text></fo:inline></xsl:when>
@@ -1796,7 +1765,7 @@
1796
1765
  <xsl:attribute name="font-family">Noto Sans Condensed</xsl:attribute>
1797
1766
  <xsl:attribute name="font-weight">300</xsl:attribute>
1798
1767
  </xsl:if>
1799
- <xsl:if test="ancestor::mn:preferred">
1768
+ <xsl:if test="ancestor::mn:fmt-preferred">
1800
1769
  <xsl:attribute name="font-weight">normal</xsl:attribute>
1801
1770
  </xsl:if>
1802
1771
  <xsl:apply-templates/>
@@ -1854,7 +1823,7 @@
1854
1823
  </fo:block>
1855
1824
  </xsl:template>
1856
1825
 
1857
- <xsl:template match="mn:xref[@pagenumber = 'true']" priority="2">
1826
+ <xsl:template match="mn:xref[@pagenumber = 'true'] | mn:fmt-xref[@pagenumber = 'true']" priority="2">
1858
1827
  <xsl:call-template name="insert_basic_link">
1859
1828
  <xsl:with-param name="element">
1860
1829
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
@@ -1914,6 +1883,49 @@
1914
1883
  </xsl:if>
1915
1884
  </xsl:template>
1916
1885
 
1886
+ <xsl:template name="back-page">
1887
+ <xsl:choose>
1888
+ <xsl:when test="$doctype = 'technical-report'">
1889
+ <fo:page-sequence master-reference="last-page_technical-report" force-page-count="no-force">
1890
+ <xsl:call-template name="insertHeaderFooter"/>
1891
+ <fo:flow flow-name="xsl-region-body">
1892
+ <fo:block-container width="100%" height="64mm" border="0.75pt solid black" font-size="14pt" text-align="center" display-align="center" line-height="1.7">
1893
+ <fo:block>
1894
+ <xsl:value-of select="/*/mn:bibdata/mn:title[@language = 'ja' and @type = 'title-main']"/>
1895
+ </fo:block>
1896
+ <fo:block>
1897
+ <xsl:value-of select="$i18n_doctype_dict_technical_report"/>
1898
+ </fo:block>
1899
+ <fo:block font-size="12pt" margin-top="18pt">
1900
+ <fo:block><xsl:value-of select="/*/mn:bibdata/mn:date[@type = 'published']"/><xsl:text> 発行</xsl:text></fo:block>
1901
+ <!-- 委託者 (Contractor) -->
1902
+ <fo:block>委託者:<xsl:value-of select="/*/mn:bibdata/mn:contributor[mn:role/@type = 'author']/mn:organization/mn:name"/></fo:block>
1903
+ <!-- 受託者 (Trustees) -->
1904
+ <fo:block>受託者:<xsl:value-of select="/*/mn:bibdata/mn:contributor[mn:role/@type = 'enabler']/mn:organization/mn:name"/></fo:block>
1905
+ </fo:block>
1906
+ </fo:block-container>
1907
+ </fo:flow>
1908
+ </fo:page-sequence>
1909
+ </xsl:when>
1910
+ <xsl:otherwise> <!-- handbook -->
1911
+ <fo:page-sequence master-reference="last-page" force-page-count="no-force">
1912
+ <fo:flow flow-name="xsl-region-body">
1913
+ <fo:block-container width="100%" border="0.75pt solid black" font-size="10pt" line-height="1.7">
1914
+ <fo:block margin-left="4.5mm" margin-top="1mm">
1915
+ <xsl:value-of select="/*/mn:bibdata/mn:title[@language = 'ja' and @type = 'title-main']"/>
1916
+ <fo:inline padding-left="4mm"><xsl:value-of select="/*/mn:bibdata/mn:edition[@language = 'ja']"/></fo:inline>
1917
+ </fo:block>
1918
+ <fo:block margin-left="7.7mm"><xsl:value-of select="/*/mn:bibdata/mn:date[@type = 'published']"/><xsl:text> 発行</xsl:text></fo:block>
1919
+ <!-- MLIT Department -->
1920
+ <fo:block margin-left="7.7mm"><xsl:value-of select="/*/mn:bibdata/mn:contributor[mn:role/@type = 'author']/mn:organization/mn:name"/></fo:block>
1921
+ <fo:block margin-left="9mm"><xsl:value-of select="/*/mn:bibdata/mn:contributor[mn:role/@type = 'enabler']/mn:organization/mn:name"/></fo:block>
1922
+ </fo:block-container>
1923
+ </fo:flow>
1924
+ </fo:page-sequence>
1925
+ </xsl:otherwise>
1926
+ </xsl:choose>
1927
+ </xsl:template> <!-- END: back-page -->
1928
+
1917
1929
  <xsl:variable name="PLATEAU-Logo">
1918
1930
  <svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 141.72 172.64">
1919
1931
  <defs>
@@ -2159,10 +2171,6 @@
2159
2171
  <title-part lang="ru">
2160
2172
  </title-part>
2161
2173
  <title-part lang="zh">第 # 部分:</title-part>
2162
-
2163
- <title-subpart lang="en">Sub-part #</title-subpart>
2164
- <title-subpart lang="fr">Partie de sub #</title-subpart>
2165
-
2166
2174
  </xsl:variable>
2167
2175
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
2168
2176
 
@@ -2636,7 +2644,8 @@
2636
2644
  <xsl:template match="mn:stem" mode="update_xml_step1"/>
2637
2645
 
2638
2646
  <xsl:template match="mn:fmt-stem" mode="update_xml_step1">
2639
- <xsl:element name="stem" namespace="{$namespace_full}">
2647
+ <!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
2648
+ <xsl:copy>
2640
2649
  <xsl:copy-of select="@*"/>
2641
2650
  <xsl:choose>
2642
2651
  <xsl:when test="mn:semx and count(node()) = 1">
@@ -2660,7 +2669,8 @@
2660
2669
  </xsl:choose>
2661
2670
  </xsl:otherwise>
2662
2671
  </xsl:choose>
2663
- </xsl:element>
2672
+ </xsl:copy>
2673
+ <!-- </xsl:element> -->
2664
2674
  </xsl:template>
2665
2675
 
2666
2676
  <xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
@@ -2822,12 +2832,14 @@
2822
2832
  </xsl:template>
2823
2833
 
2824
2834
  <xsl:template match="mn:fmt-title" mode="update_xml_step1">
2825
- <xsl:element name="title" namespace="{$namespace_full}">
2835
+ <!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
2836
+ <xsl:copy>
2826
2837
  <xsl:copy-of select="@*"/>
2827
2838
  <xsl:call-template name="addNamedDestinationAttribute"/>
2828
2839
 
2829
2840
  <xsl:apply-templates mode="update_xml_step1"/>
2830
- </xsl:element>
2841
+ </xsl:copy>
2842
+ <!-- </xsl:element> -->
2831
2843
  </xsl:template>
2832
2844
 
2833
2845
  <xsl:template name="addNamedDestinationAttribute">
@@ -2839,12 +2851,14 @@
2839
2851
  <xsl:apply-templates mode="update_xml_step1"/>
2840
2852
  </xsl:when>
2841
2853
  <xsl:otherwise>
2842
- <xsl:element name="name" namespace="{$namespace_full}">
2854
+ <!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
2855
+ <xsl:copy>
2843
2856
  <xsl:copy-of select="@*"/>
2844
2857
  <xsl:call-template name="addNamedDestinationAttribute"/>
2845
2858
 
2846
2859
  <xsl:apply-templates mode="update_xml_step1"/>
2847
- </xsl:element>
2860
+ </xsl:copy>
2861
+ <!-- </xsl:element> -->
2848
2862
  </xsl:otherwise>
2849
2863
  </xsl:choose>
2850
2864
  </xsl:template>
@@ -2859,7 +2873,7 @@
2859
2873
  <xsl:apply-templates mode="update_xml_step1"/>
2860
2874
  </xsl:template>
2861
2875
  <xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="update_xml_step1">
2862
- <xsl:element name="preferred" namespace="{$namespace_full}">
2876
+ <xsl:element name="fmt-preferred" namespace="{$namespace_full}">
2863
2877
  <xsl:copy-of select="@*"/>
2864
2878
  <xsl:apply-templates mode="update_xml_step1"/>
2865
2879
  </xsl:element>
@@ -2869,7 +2883,7 @@
2869
2883
  <xsl:apply-templates mode="update_xml_step1"/>
2870
2884
  </xsl:template>
2871
2885
  <xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="update_xml_step1">
2872
- <xsl:element name="admitted" namespace="{$namespace_full}">
2886
+ <xsl:element name="fmt-admitted" namespace="{$namespace_full}">
2873
2887
  <xsl:copy-of select="@*"/>
2874
2888
  <xsl:apply-templates mode="update_xml_step1"/>
2875
2889
  </xsl:element>
@@ -2879,32 +2893,32 @@
2879
2893
  <xsl:apply-templates mode="update_xml_step1"/>
2880
2894
  </xsl:template>
2881
2895
  <xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="update_xml_step1">
2882
- <xsl:element name="deprecates" namespace="{$namespace_full}">
2896
+ <xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
2883
2897
  <xsl:copy-of select="@*"/>
2884
2898
  <xsl:apply-templates mode="update_xml_step1"/>
2885
2899
  </xsl:element>
2886
2900
  </xsl:template>
2887
2901
 
2888
- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
2902
+ <!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
2889
2903
  <xsl:element name="definition" namespace="{$namespace_full}">
2890
2904
  <xsl:copy-of select="@*"/>
2891
2905
  <xsl:apply-templates mode="update_xml_step1"/>
2892
2906
  </xsl:element>
2893
2907
  </xsl:template>
2894
-
2908
+
2895
2909
  <xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
2896
2910
  <xsl:element name="termsource" namespace="{$namespace_full}">
2897
2911
  <xsl:copy-of select="@*"/>
2898
2912
  <xsl:apply-templates mode="update_xml_step1"/>
2899
2913
  </xsl:element>
2900
2914
  </xsl:template>
2901
-
2915
+
2902
2916
  <xsl:template match="mn:fmt-source" mode="update_xml_step1">
2903
2917
  <xsl:element name="source" namespace="{$namespace_full}">
2904
2918
  <xsl:copy-of select="@*"/>
2905
2919
  <xsl:apply-templates mode="update_xml_step1"/>
2906
2920
  </xsl:element>
2907
- </xsl:template>
2921
+ </xsl:template> -->
2908
2922
 
2909
2923
  <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">
2910
2924
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -2927,12 +2941,12 @@
2927
2941
  </xsl:template>
2928
2942
 
2929
2943
  <xsl:template match="mn:identifier" mode="update_xml_step1"/>
2930
- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
2944
+ <!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
2931
2945
  <xsl:element name="identifier" namespace="{$namespace_full}">
2932
2946
  <xsl:copy-of select="@*"/>
2933
2947
  <xsl:apply-templates mode="update_xml_step1"/>
2934
2948
  </xsl:element>
2935
- </xsl:template>
2949
+ </xsl:template> -->
2936
2950
 
2937
2951
  <xsl:template match="mn:concept" mode="update_xml_step1"/>
2938
2952
 
@@ -2942,51 +2956,53 @@
2942
2956
 
2943
2957
  <xsl:template match="mn:eref" mode="update_xml_step1"/>
2944
2958
 
2945
- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
2959
+ <!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
2946
2960
  <xsl:element name="eref" namespace="{$namespace_full}">
2947
2961
  <xsl:copy-of select="@*"/>
2948
2962
  <xsl:apply-templates mode="update_xml_step1"/>
2949
2963
  </xsl:element>
2950
- </xsl:template>
2964
+ </xsl:template> -->
2951
2965
 
2952
2966
  <xsl:template match="mn:xref" mode="update_xml_step1"/>
2953
2967
 
2954
- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
2968
+ <!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
2955
2969
  <xsl:element name="xref" namespace="{$namespace_full}">
2956
2970
  <xsl:copy-of select="@*"/>
2957
2971
  <xsl:apply-templates mode="update_xml_step1"/>
2958
2972
  </xsl:element>
2959
- </xsl:template>
2973
+ </xsl:template> -->
2960
2974
 
2961
2975
  <xsl:template match="mn:link" mode="update_xml_step1"/>
2962
2976
 
2963
- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
2977
+ <!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
2964
2978
  <xsl:element name="link" namespace="{$namespace_full}">
2965
2979
  <xsl:copy-of select="@*"/>
2966
2980
  <xsl:apply-templates mode="update_xml_step1"/>
2967
2981
  </xsl:element>
2968
- </xsl:template>
2982
+ </xsl:template> -->
2969
2983
 
2970
2984
  <xsl:template match="mn:origin" mode="update_xml_step1"/>
2971
2985
 
2972
- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
2986
+ <!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
2973
2987
  <xsl:element name="origin" namespace="{$namespace_full}">
2974
2988
  <xsl:copy-of select="@*"/>
2975
2989
  <xsl:apply-templates mode="update_xml_step1"/>
2976
2990
  </xsl:element>
2977
- </xsl:template>
2991
+ </xsl:template> -->
2978
2992
 
2979
2993
  <xsl:template match="mn:erefstack" mode="update_xml_step1"/>
2980
2994
 
2981
2995
  <xsl:template match="mn:svgmap" mode="update_xml_step1"/>
2982
2996
 
2983
- <xsl:template match="mn:review-container" mode="update_xml_step1"/>
2997
+ <xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
2984
2998
 
2985
- <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
2986
- <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
2987
- <xsl:value-of select="."/>
2988
- </xsl:element>
2989
- </xsl:template>
2999
+ <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
3000
+ <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
3001
+ <xsl:value-of select="."/>
3002
+ </xsl:element>
3003
+ </xsl:template>
3004
+
3005
+ <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
2990
3006
 
2991
3007
  <!-- END: update new Presentation XML -->
2992
3008
 
@@ -3179,7 +3195,7 @@
3179
3195
  </xsl:variable>
3180
3196
 
3181
3197
  <!-- add 'fn' after eref and origin, to reference bibitem with note = 'Withdrawn.' or 'Cancelled and replaced...' -->
3182
- <xsl:template match="mn:eref | mn:origin" mode="update_xml_step2">
3198
+ <xsl:template match="mn:fmt-eref | mn:fmt-origin" mode="update_xml_step2">
3183
3199
  <xsl:copy-of select="."/>
3184
3200
 
3185
3201
  <xsl:variable name="bibitemid" select="@bibitemid"/>
@@ -3248,7 +3264,7 @@
3248
3264
  </xsl:call-template>
3249
3265
  </xsl:template>
3250
3266
 
3251
- <xsl:template match="mn:stem | mn:image" mode="update_xml_step2">
3267
+ <xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_step2">
3252
3268
  <xsl:copy-of select="."/>
3253
3269
  </xsl:template>
3254
3270
 
@@ -3285,7 +3301,7 @@
3285
3301
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
3286
3302
  <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>
3287
3303
 
3288
- <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">
3304
+ <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">
3289
3305
 
3290
3306
  <xsl:variable name="parent" select="local-name(..)"/>
3291
3307
 
@@ -3404,7 +3420,7 @@
3404
3420
  </xsl:if>
3405
3421
  </xsl:template>
3406
3422
 
3407
- <xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
3423
+ <xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
3408
3424
  <xsl:copy-of select="."/>
3409
3425
  </xsl:template>
3410
3426
 
@@ -3731,7 +3747,7 @@
3731
3747
  </fo:block>
3732
3748
  </xsl:template> <!-- copyright-statement -->
3733
3749
 
3734
- <xsl:template match="mn:copyright-statement//mn:title">
3750
+ <xsl:template match="mn:copyright-statement//mn:fmt-title">
3735
3751
  <!-- process in the template 'title' -->
3736
3752
  <xsl:call-template name="title"/>
3737
3753
  </xsl:template> <!-- copyright-statement//title -->
@@ -3747,7 +3763,7 @@
3747
3763
  </fo:block>
3748
3764
  </xsl:template> <!-- license-statement -->
3749
3765
 
3750
- <xsl:template match="mn:license-statement//mn:title">
3766
+ <xsl:template match="mn:license-statement//mn:fmt-title">
3751
3767
  <!-- process in the template 'title' -->
3752
3768
  <xsl:call-template name="title"/>
3753
3769
  </xsl:template> <!-- license-statement/title -->
@@ -3764,7 +3780,7 @@
3764
3780
  </fo:block>
3765
3781
  </xsl:template> <!-- legal-statement -->
3766
3782
 
3767
- <xsl:template match="mn:legal-statement//mn:title">
3783
+ <xsl:template match="mn:legal-statement//mn:fmt-title">
3768
3784
  <!-- process in the template 'title' -->
3769
3785
  <xsl:call-template name="title"/>
3770
3786
 
@@ -3784,7 +3800,7 @@
3784
3800
  </fo:block>
3785
3801
  </xsl:template> <!-- feedback-statement -->
3786
3802
 
3787
- <xsl:template match="mn:feedback-statement//mn:title">
3803
+ <xsl:template match="mn:feedback-statement//mn:fmt-title">
3788
3804
  <!-- process in the template 'title' -->
3789
3805
  <xsl:call-template name="title"/>
3790
3806
  </xsl:template>
@@ -3807,7 +3823,7 @@
3807
3823
  <xsl:template name="refine_link-style">
3808
3824
  </xsl:template> <!-- refine_link-style -->
3809
3825
 
3810
- <xsl:template match="mn:link" name="link">
3826
+ <xsl:template match="mn:fmt-link" name="link">
3811
3827
  <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
3812
3828
  <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
3813
3829
  <xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
@@ -4025,7 +4041,7 @@
4025
4041
  <xsl:value-of select="."/>
4026
4042
  </xsl:attribute>
4027
4043
  </xsl:for-each>
4028
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4044
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4029
4045
  </xsl:when>
4030
4046
 
4031
4047
  <xsl:otherwise>
@@ -4067,11 +4083,11 @@
4067
4083
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
4068
4084
  </xsl:if>
4069
4085
 
4070
- <xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
4086
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
4071
4087
  </fo:block>
4072
4088
 
4073
4089
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
4074
- <xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name AFTER content -->
4090
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
4075
4091
 
4076
4092
  </fo:block-container>
4077
4093
  </fo:block-container>
@@ -4372,7 +4388,7 @@
4372
4388
 
4373
4389
  <!-- end mode="syntax_highlight" -->
4374
4390
 
4375
- <xsl:template match="mn:sourcecode/mn:name">
4391
+ <xsl:template match="mn:sourcecode/mn:fmt-name">
4376
4392
  <xsl:if test="normalize-space() != ''">
4377
4393
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4378
4394
  <xsl:apply-templates/>
@@ -4390,7 +4406,7 @@
4390
4406
  </xsl:choose>
4391
4407
  </xsl:template>
4392
4408
 
4393
- <xsl:template match="mn:annotation">
4409
+ <xsl:template match="mn:callout-annotation">
4394
4410
  <xsl:variable name="annotation-id" select="@id"/>
4395
4411
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
4396
4412
  <fo:block id="{$annotation-id}" white-space="nowrap">
@@ -4402,7 +4418,7 @@
4402
4418
  </fo:block>
4403
4419
  </xsl:template>
4404
4420
 
4405
- <xsl:template match="mn:annotation/mn:p">
4421
+ <xsl:template match="mn:callout-annotation/mn:p">
4406
4422
  <xsl:param name="callout"/>
4407
4423
  <fo:inline id="{@id}">
4408
4424
  <xsl:call-template name="setNamedDestination"/>
@@ -4552,7 +4568,7 @@
4552
4568
  <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
4553
4569
  <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
4554
4570
  <xsl:choose>
4555
- <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>
4571
+ <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>
4556
4572
  <xsl:otherwise>
4557
4573
  <xsl:variable name="tag">
4558
4574
  <xsl:call-template name="insertTag">
@@ -4953,12 +4969,12 @@
4953
4969
  <xsl:template match="mn:permission">
4954
4970
  <xsl:call-template name="setNamedDestination"/>
4955
4971
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
4956
- <xsl:apply-templates select="mn:name"/>
4957
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4972
+ <xsl:apply-templates select="mn:fmt-name"/>
4973
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4958
4974
  </fo:block>
4959
4975
  </xsl:template>
4960
4976
 
4961
- <xsl:template match="mn:permission/mn:name">
4977
+ <xsl:template match="mn:permission/mn:fmt-name">
4962
4978
  <xsl:if test="normalize-space() != ''">
4963
4979
  <fo:block xsl:use-attribute-sets="permission-name-style">
4964
4980
  <xsl:apply-templates/>
@@ -4980,15 +4996,15 @@
4980
4996
  <xsl:template match="mn:requirement">
4981
4997
  <xsl:call-template name="setNamedDestination"/>
4982
4998
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
4983
- <xsl:apply-templates select="mn:name"/>
4999
+ <xsl:apply-templates select="mn:fmt-name"/>
4984
5000
  <xsl:apply-templates select="mn:label"/>
4985
5001
  <xsl:apply-templates select="@obligation"/>
4986
5002
  <xsl:apply-templates select="mn:subject"/>
4987
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:label) and not(self::mn:subject)]"/>
5003
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
4988
5004
  </fo:block>
4989
5005
  </xsl:template>
4990
5006
 
4991
- <xsl:template match="mn:requirement/mn:name">
5007
+ <xsl:template match="mn:requirement/mn:fmt-name">
4992
5008
  <xsl:if test="normalize-space() != ''">
4993
5009
 
4994
5010
  <fo:block xsl:use-attribute-sets="requirement-name-style">
@@ -5024,12 +5040,12 @@
5024
5040
  <xsl:template match="mn:recommendation">
5025
5041
  <xsl:call-template name="setNamedDestination"/>
5026
5042
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
5027
- <xsl:apply-templates select="mn:name"/>
5028
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5043
+ <xsl:apply-templates select="mn:fmt-name"/>
5044
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5029
5045
  </fo:block>
5030
5046
  </xsl:template>
5031
5047
 
5032
- <xsl:template match="mn:recommendation/mn:name">
5048
+ <xsl:template match="mn:recommendation/mn:fmt-name">
5033
5049
  <xsl:if test="normalize-space() != ''">
5034
5050
 
5035
5051
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
@@ -5287,11 +5303,11 @@
5287
5303
 
5288
5304
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
5289
5305
  </xsl:if>
5290
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5306
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5291
5307
  </fo:block>
5292
5308
  </xsl:template>
5293
5309
 
5294
- <xsl:template match="mn:term/mn:name">
5310
+ <xsl:template match="mn:term/mn:fmt-name">
5295
5311
  <xsl:if test="normalize-space() != ''">
5296
5312
  <!-- <xsl:variable name="level">
5297
5313
  <xsl:call-template name="getLevelTermName"/>
@@ -5310,7 +5326,7 @@
5310
5326
  <!-- origin -->
5311
5327
  <!-- modification -->
5312
5328
  <!-- ====== -->
5313
- <xsl:template match="mn:termsource" name="termsource">
5329
+ <xsl:template match="mn:fmt-termsource" name="termsource">
5314
5330
  <fo:block xsl:use-attribute-sets="termsource-style">
5315
5331
 
5316
5332
  <xsl:call-template name="refine_termsource-style"/>
@@ -5349,24 +5365,24 @@
5349
5365
  </fo:block>
5350
5366
  </xsl:template>
5351
5367
 
5352
- <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">
5368
+ <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">
5353
5369
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
5354
5370
  </xsl:template>
5355
5371
 
5356
- <xsl:template match="mn:termsource/text()">
5372
+ <xsl:template match="mn:fmt-termsource/text()">
5357
5373
  <xsl:if test="normalize-space() != ''">
5358
5374
  <xsl:value-of select="."/>
5359
5375
  </xsl:if>
5360
5376
  </xsl:template>
5361
5377
 
5362
5378
  <!-- text SOURCE: -->
5363
- <xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
5379
+ <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
5364
5380
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
5365
5381
  <xsl:value-of select="."/>
5366
5382
  </fo:inline>
5367
5383
  </xsl:template>
5368
5384
 
5369
- <xsl:template match="mn:origin">
5385
+ <xsl:template match="mn:fmt-origin">
5370
5386
  <xsl:call-template name="insert_basic_link">
5371
5387
  <xsl:with-param name="element">
5372
5388
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -5412,7 +5428,7 @@
5412
5428
  <!-- ====== -->
5413
5429
 
5414
5430
  <!-- Preferred, admitted, deprecated -->
5415
- <xsl:template match="mn:preferred">
5431
+ <xsl:template match="mn:fmt-preferred">
5416
5432
  <xsl:variable name="level">
5417
5433
  <xsl:call-template name="getLevel"/>
5418
5434
  </xsl:variable>
@@ -5423,15 +5439,15 @@
5423
5439
  </xsl:variable>
5424
5440
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
5425
5441
 
5426
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
5442
+ <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
5427
5443
 
5428
5444
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
5429
5445
 
5430
- <xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
5446
+ <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
5431
5447
  <xsl:call-template name="setIDforNamedDestination"/>
5432
5448
  </xsl:for-each>
5433
5449
 
5434
- <xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
5450
+ <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
5435
5451
  </fo:block>
5436
5452
  </xsl:if>
5437
5453
 
@@ -5455,13 +5471,13 @@
5455
5471
  <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
5456
5472
  <xsl:template match="mn:domain"/>
5457
5473
 
5458
- <xsl:template match="mn:admitted">
5474
+ <xsl:template match="mn:fmt-admitted">
5459
5475
  <fo:block xsl:use-attribute-sets="admitted-style">
5460
5476
  <xsl:apply-templates/>
5461
5477
  </fo:block>
5462
5478
  </xsl:template>
5463
5479
 
5464
- <xsl:template match="mn:deprecates">
5480
+ <xsl:template match="mn:fmt-deprecates">
5465
5481
  <fo:block xsl:use-attribute-sets="deprecates-style">
5466
5482
  <xsl:apply-templates/>
5467
5483
  </fo:block>
@@ -5475,7 +5491,7 @@
5475
5491
 
5476
5492
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
5477
5493
  <!-- in metanorma xml preferred terms delimited by semicolons -->
5478
- <xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
5494
+ <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
5479
5495
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
5480
5496
  </xsl:template>
5481
5497
  <!-- End Preferred, admitted, deprecated -->
@@ -5494,16 +5510,16 @@
5494
5510
  <!-- ========== -->
5495
5511
  <!-- definition -->
5496
5512
  <!-- ========== -->
5497
- <xsl:template match="mn:definition">
5513
+ <xsl:template match="mn:fmt-definition">
5498
5514
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
5499
5515
  <xsl:apply-templates/>
5500
5516
  </fo:block>
5501
5517
  </xsl:template>
5502
5518
 
5503
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]">
5519
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
5504
5520
  <xsl:apply-templates/>
5505
5521
  </xsl:template>
5506
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
5522
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
5507
5523
  <fo:inline> <xsl:apply-templates/></fo:inline>
5508
5524
  <fo:block/>
5509
5525
  </xsl:template>
@@ -5569,12 +5585,12 @@
5569
5585
  <xsl:call-template name="refine_termexample-style"/>
5570
5586
  <xsl:call-template name="setBlockSpanAll"/>
5571
5587
 
5572
- <xsl:apply-templates select="mn:name"/>
5573
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5588
+ <xsl:apply-templates select="mn:fmt-name"/>
5589
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5574
5590
  </fo:block>
5575
5591
  </xsl:template>
5576
5592
 
5577
- <xsl:template match="mn:termexample/mn:name">
5593
+ <xsl:template match="mn:termexample/mn:fmt-name">
5578
5594
  <xsl:if test="normalize-space() != ''">
5579
5595
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
5580
5596
  <xsl:call-template name="refine_termexample-name-style"/>
@@ -5625,7 +5641,7 @@
5625
5641
  <xsl:call-template name="refine_example-style"/>
5626
5642
 
5627
5643
  <xsl:variable name="fo_element">
5628
- <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:name)][1][self::mn:sourcecode]">block</xsl:if>block
5644
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>block
5629
5645
  </xsl:variable>
5630
5646
 
5631
5647
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -5636,7 +5652,7 @@
5636
5652
 
5637
5653
  <!-- display name 'EXAMPLE' in a separate block -->
5638
5654
  <fo:block>
5639
- <xsl:apply-templates select="mn:name">
5655
+ <xsl:apply-templates select="mn:fmt-name">
5640
5656
  <xsl:with-param name="fo_element" select="$fo_element"/>
5641
5657
  </xsl:apply-templates>
5642
5658
  </fo:block>
@@ -5644,7 +5660,7 @@
5644
5660
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
5645
5661
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
5646
5662
  <xsl:variable name="example_body">
5647
- <xsl:apply-templates select="node()[not(self::mn:name)]">
5663
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
5648
5664
  <xsl:with-param name="fo_element" select="$fo_element"/>
5649
5665
  </xsl:apply-templates>
5650
5666
  </xsl:variable>
@@ -5671,14 +5687,14 @@
5671
5687
  <fo:list-item>
5672
5688
  <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
5673
5689
  <fo:block>
5674
- <xsl:apply-templates select="mn:name">
5690
+ <xsl:apply-templates select="mn:fmt-name">
5675
5691
  <xsl:with-param name="fo_element">block</xsl:with-param>
5676
5692
  </xsl:apply-templates>
5677
5693
  </fo:block>
5678
5694
  </fo:list-item-label>
5679
5695
  <fo:list-item-body start-indent="body-start()">
5680
5696
  <fo:block>
5681
- <xsl:apply-templates select="node()[not(self::mn:name)]">
5697
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
5682
5698
  <xsl:with-param name="fo_element" select="$fo_element"/>
5683
5699
  </xsl:apply-templates>
5684
5700
  </fo:block>
@@ -5691,21 +5707,21 @@
5691
5707
 
5692
5708
  <!-- display 'EXAMPLE' and first element in the same line -->
5693
5709
  <fo:block>
5694
- <xsl:apply-templates select="mn:name">
5710
+ <xsl:apply-templates select="mn:fmt-name">
5695
5711
  <xsl:with-param name="fo_element" select="$fo_element"/>
5696
5712
  </xsl:apply-templates>
5697
5713
  <fo:inline>
5698
- <xsl:apply-templates select="*[not(self::mn:name)][1]">
5714
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
5699
5715
  <xsl:with-param name="fo_element" select="$fo_element"/>
5700
5716
  </xsl:apply-templates>
5701
5717
  </fo:inline>
5702
5718
  </fo:block>
5703
5719
 
5704
- <xsl:if test="*[not(self::mn:name)][position() &gt; 1]">
5720
+ <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
5705
5721
  <!-- display further elements in blocks -->
5706
5722
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
5707
5723
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
5708
- <xsl:apply-templates select="*[not(self::mn:name)][position() &gt; 1]">
5724
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
5709
5725
  <xsl:with-param name="fo_element" select="'block'"/>
5710
5726
  </xsl:apply-templates>
5711
5727
  </fo:block-container>
@@ -5719,7 +5735,7 @@
5719
5735
  </xsl:template>
5720
5736
 
5721
5737
  <!-- example/name -->
5722
- <xsl:template match="mn:example/mn:name">
5738
+ <xsl:template match="mn:example/mn:fmt-name">
5723
5739
  <xsl:param name="fo_element">block</xsl:param>
5724
5740
 
5725
5741
  <xsl:choose>
@@ -5744,7 +5760,7 @@
5744
5760
  </xsl:template>
5745
5761
 
5746
5762
  <!-- table/example/name, table/tfoot//example/name -->
5747
- <xsl:template match="mn:table/mn:example/mn:name | mn:table/mn:tfoot//mn:example/mn:name">
5763
+ <xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
5748
5764
  <fo:inline xsl:use-attribute-sets="example-name-style">
5749
5765
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5750
5766
  <xsl:apply-templates/>
@@ -6036,7 +6052,7 @@
6036
6052
 
6037
6053
  <!-- Display table's name before table as standalone block -->
6038
6054
  <!-- $namespace = 'iso' or -->
6039
- <xsl:apply-templates select="mn:name"/> <!-- table's title rendered before table -->
6055
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
6040
6056
  <xsl:call-template name="table_name_fn_display"/>
6041
6057
 
6042
6058
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
@@ -6078,7 +6094,7 @@
6078
6094
 
6079
6095
  <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
6080
6096
 
6081
- <xsl:for-each select="mn:name">
6097
+ <xsl:for-each select="mn:fmt-name">
6082
6098
  <xsl:call-template name="setIDforNamedDestination"/>
6083
6099
  </xsl:for-each>
6084
6100
 
@@ -6108,6 +6124,10 @@
6108
6124
  <xsl:with-param name="margin-side" select="$margin-side"/>
6109
6125
  </xsl:call-template>
6110
6126
 
6127
+ <xsl:call-template name="setTableStyles">
6128
+ <xsl:with-param name="scope">table</xsl:with-param>
6129
+ </xsl:call-template>
6130
+
6111
6131
  </xsl:element>
6112
6132
  </xsl:variable>
6113
6133
 
@@ -6128,7 +6148,7 @@
6128
6148
  </xsl:attribute>
6129
6149
  </xsl:for-each>
6130
6150
 
6131
- <xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[local-name(..) != 'name'] or ./mn:source"/>
6151
+ <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"/>
6132
6152
  <xsl:if test="$isNoteOrFnExist = 'true'">
6133
6153
  <!-- <xsl:choose>
6134
6154
  <xsl:when test="$namespace = 'plateau'"></xsl:when>
@@ -6184,7 +6204,7 @@
6184
6204
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
6185
6205
  </xsl:when>
6186
6206
  <xsl:otherwise>
6187
- <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 -->
6207
+ <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 -->
6188
6208
  </xsl:otherwise>
6189
6209
  </xsl:choose>
6190
6210
 
@@ -6281,7 +6301,7 @@
6281
6301
  </xsl:template>
6282
6302
 
6283
6303
  <!-- table/name-->
6284
- <xsl:template match="*[local-name()='table']/mn:name">
6304
+ <xsl:template match="*[local-name()='table']/mn:fmt-name">
6285
6305
  <xsl:param name="continued"/>
6286
6306
  <xsl:param name="cols-count"/>
6287
6307
  <xsl:if test="normalize-space() != ''">
@@ -6346,7 +6366,7 @@
6346
6366
  </xsl:template>
6347
6367
 
6348
6368
  <!-- SOURCE: ... -->
6349
- <xsl:template match="*[local-name()='table']/mn:source" priority="2">
6369
+ <xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
6350
6370
  <xsl:call-template name="termsource"/>
6351
6371
  </xsl:template>
6352
6372
 
@@ -6511,11 +6531,11 @@
6511
6531
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
6512
6532
  </xsl:template>
6513
6533
 
6514
- <xsl:template match="mn:termsource" mode="td_text">
6515
- <xsl:value-of select="*[local-name()='origin']/@citeas"/>
6534
+ <xsl:template match="mn:fmt-termsource" mode="td_text">
6535
+ <xsl:value-of select="mn:fmt-origin/@citeas"/>
6516
6536
  </xsl:template>
6517
6537
 
6518
- <xsl:template match="mn:link" mode="td_text">
6538
+ <xsl:template match="mn:fmt-link" mode="td_text">
6519
6539
  <xsl:value-of select="@target"/>
6520
6540
  </xsl:template>
6521
6541
 
@@ -6717,12 +6737,12 @@
6717
6737
 
6718
6738
  <xsl:call-template name="refine_table-header-title-style"/>
6719
6739
 
6720
- <xsl:apply-templates select="ancestor::mn:table/mn:name">
6740
+ <xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
6721
6741
  <xsl:with-param name="continued">true</xsl:with-param>
6722
6742
  <xsl:with-param name="cols-count" select="$cols-count"/>
6723
6743
  </xsl:apply-templates>
6724
6744
 
6725
- <xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
6745
+ <xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
6726
6746
  <fo:block role="SKIP"/>
6727
6747
  </xsl:if>
6728
6748
 
@@ -6757,7 +6777,7 @@
6757
6777
  <xsl:param name="colwidths"/>
6758
6778
  <xsl:param name="colgroup"/>
6759
6779
 
6760
- <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"/>
6780
+ <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"/>
6761
6781
 
6762
6782
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
6763
6783
  </xsl:variable>
@@ -6798,6 +6818,12 @@
6798
6818
  </xsl:choose>
6799
6819
  </xsl:for-each>
6800
6820
 
6821
+ <xsl:for-each select="ancestor::mn:table[1]">
6822
+ <xsl:call-template name="setTableStyles">
6823
+ <xsl:with-param name="scope">table</xsl:with-param>
6824
+ </xsl:call-template>
6825
+ </xsl:for-each>
6826
+
6801
6827
  <xsl:choose>
6802
6828
  <xsl:when test="xalan:nodeset($colgroup)//mn:col">
6803
6829
  <xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
@@ -6814,10 +6840,22 @@
6814
6840
 
6815
6841
  <fo:table-body role="SKIP">
6816
6842
  <fo:table-row role="SKIP">
6843
+ <xsl:for-each select="ancestor::mn:table[1]">
6844
+ <xsl:call-template name="setTableStyles">
6845
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
6846
+ </xsl:call-template>
6847
+ </xsl:for-each>
6848
+
6817
6849
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
6818
6850
 
6819
6851
  <xsl:call-template name="refine_table-footer-cell-style"/>
6820
6852
 
6853
+ <xsl:for-each select="ancestor::mn:table[1]">
6854
+ <xsl:call-template name="setTableStyles">
6855
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
6856
+ </xsl:call-template>
6857
+ </xsl:for-each>
6858
+
6821
6859
  <xsl:call-template name="setBordersTableArray"/>
6822
6860
 
6823
6861
  <!-- fn will be processed inside 'note' processing -->
@@ -6825,7 +6863,7 @@
6825
6863
  <xsl:apply-templates select="../mn:dl"/>
6826
6864
  <xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
6827
6865
  <xsl:apply-templates select="../mn:example"/>
6828
- <xsl:apply-templates select="../mn:source"/>
6866
+ <xsl:apply-templates select="../mn:fmt-source"/>
6829
6867
 
6830
6868
  <xsl:variable name="isDisplayRowSeparator">
6831
6869
  </xsl:variable>
@@ -7012,7 +7050,12 @@
7012
7050
 
7013
7051
  <xsl:template name="setTableRowAttributes">
7014
7052
 
7015
- <xsl:call-template name="setColors"/>
7053
+ <xsl:for-each select="ancestor::mn:table[1]">
7054
+ <xsl:call-template name="setTableStyles">
7055
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
7056
+ </xsl:call-template>
7057
+ </xsl:for-each>
7058
+ <xsl:call-template name="setTableStyles"/>
7016
7059
 
7017
7060
  </xsl:template> <!-- setTableRowAttributes -->
7018
7061
  <!-- ===================== -->
@@ -7065,7 +7108,13 @@
7065
7108
  </xsl:attribute>
7066
7109
  </xsl:if>
7067
7110
  <xsl:call-template name="display-align"/>
7068
- <xsl:call-template name="setColors"/>
7111
+
7112
+ <xsl:for-each select="ancestor::mn:table[1]">
7113
+ <xsl:call-template name="setTableStyles">
7114
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
7115
+ </xsl:call-template>
7116
+ </xsl:for-each>
7117
+ <xsl:call-template name="setTableStyles"/>
7069
7118
  </xsl:template>
7070
7119
 
7071
7120
  <xsl:template name="display-align">
@@ -7081,7 +7130,8 @@
7081
7130
  </xsl:if>
7082
7131
  </xsl:template>
7083
7132
 
7084
- <xsl:template name="setColors">
7133
+ <xsl:template name="setTableStyles">
7134
+ <xsl:param name="scope">cell</xsl:param>
7085
7135
  <xsl:variable name="styles__">
7086
7136
  <xsl:call-template name="split">
7087
7137
  <xsl:with-param name="pText" select="concat(@style,';')"/>
@@ -7093,16 +7143,22 @@
7093
7143
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
7094
7144
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
7095
7145
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
7096
- <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'">
7146
+ <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'">
7097
7147
  <style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
7098
7148
  </xsl:if>
7149
+ <xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
7150
+ <style name="{$key}-top"><xsl:value-of select="$value"/></style>
7151
+ <style name="{$key}-right"><xsl:value-of select="$value"/></style>
7152
+ <style name="{$key}-left"><xsl:value-of select="$value"/></style>
7153
+ <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
7154
+ </xsl:if>
7099
7155
  </xsl:for-each>
7100
7156
  </xsl:variable>
7101
7157
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
7102
7158
  <xsl:for-each select="$styles/style">
7103
7159
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
7104
7160
  </xsl:for-each>
7105
- </xsl:template> <!-- setColors -->
7161
+ </xsl:template> <!-- setTableStyles -->
7106
7162
 
7107
7163
  <!-- cell in table body, footer -->
7108
7164
  <xsl:template match="*[local-name()='td']" name="td">
@@ -7166,11 +7222,11 @@
7166
7222
 
7167
7223
  <xsl:call-template name="refine_table-note-name-style"/>
7168
7224
 
7169
- <xsl:apply-templates select="mn:name"/>
7225
+ <xsl:apply-templates select="mn:fmt-name"/>
7170
7226
 
7171
7227
  </fo:inline>
7172
7228
 
7173
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7229
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7174
7230
  </fo:block>
7175
7231
  </xsl:template> <!-- table/note -->
7176
7232
 
@@ -7310,7 +7366,7 @@
7310
7366
 
7311
7367
  <!-- footnotes for table's name rendering -->
7312
7368
  <xsl:template name="table_name_fn_display">
7313
- <xsl:for-each select="mn:name//mn:fn">
7369
+ <xsl:for-each select="mn:fmt-name//mn:fn">
7314
7370
  <xsl:variable name="reference" select="@reference"/>
7315
7371
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
7316
7372
  <fo:block margin-bottom="12pt">
@@ -7967,7 +8023,7 @@
7967
8023
  </xsl:if> -->
7968
8024
 
7969
8025
  <xsl:variable name="words">
7970
- <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
8026
+ <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
7971
8027
  <word>
7972
8028
  <xsl:copy-of select="."/>
7973
8029
  </word>
@@ -8026,7 +8082,7 @@
8026
8082
  </xsl:copy>
8027
8083
  </xsl:template>
8028
8084
 
8029
- <xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
8085
+ <xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
8030
8086
 
8031
8087
  <xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
8032
8088
  <xsl:variable name="formatting_tags">
@@ -8061,7 +8117,7 @@
8061
8117
  </xsl:call-template>
8062
8118
  </xsl:template>
8063
8119
 
8064
- <xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
8120
+ <xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
8065
8121
  <xsl:variable name="link">
8066
8122
  <link_updated>
8067
8123
  <xsl:variable name="target_text">
@@ -8279,7 +8335,7 @@
8279
8335
 
8280
8336
  <xsl:call-template name="refine_multicomponent_block_style"/>
8281
8337
 
8282
- <xsl:apply-templates select="mn:name">
8338
+ <xsl:apply-templates select="mn:fmt-name">
8283
8339
  <xsl:with-param name="process">true</xsl:with-param>
8284
8340
  </xsl:apply-templates>
8285
8341
 
@@ -8491,7 +8547,7 @@
8491
8547
  </xsl:template> <!-- refine_multicomponent_block_style -->
8492
8548
 
8493
8549
  <!-- dl/name -->
8494
- <xsl:template match="mn:dl/mn:name">
8550
+ <xsl:template match="mn:dl/mn:fmt-name">
8495
8551
  <xsl:param name="process">false</xsl:param>
8496
8552
  <xsl:if test="$process = 'true'">
8497
8553
  <fo:block xsl:use-attribute-sets="dl-name-style">
@@ -8907,12 +8963,12 @@
8907
8963
  <xsl:template match="mn:appendix">
8908
8964
  <xsl:call-template name="setNamedDestination"/>
8909
8965
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
8910
- <xsl:apply-templates select="mn:title"/>
8966
+ <xsl:apply-templates select="mn:fmt-title"/>
8911
8967
  </fo:block>
8912
- <xsl:apply-templates select="node()[not(local-name()='title')]"/>
8968
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
8913
8969
  </xsl:template>
8914
8970
 
8915
- <xsl:template match="mn:appendix/mn:title" priority="2">
8971
+ <xsl:template match="mn:appendix/mn:fmt-title" priority="2">
8916
8972
  <xsl:variable name="level">
8917
8973
  <xsl:call-template name="getLevel"/>
8918
8974
  </xsl:variable>
@@ -8925,15 +8981,15 @@
8925
8981
  <xsl:template match="mn:appendix//mn:example" priority="2">
8926
8982
  <xsl:call-template name="setNamedDestination"/>
8927
8983
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
8928
- <xsl:apply-templates select="mn:name"/>
8984
+ <xsl:apply-templates select="mn:fmt-name"/>
8929
8985
  </fo:block>
8930
- <xsl:apply-templates select="node()[not(local-name()='name')]"/>
8986
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8931
8987
  </xsl:template>
8932
8988
 
8933
8989
  <xsl:attribute-set name="xref-style">
8934
8990
  </xsl:attribute-set>
8935
8991
 
8936
- <xsl:template match="mn:xref">
8992
+ <xsl:template match="mn:fmt-xref">
8937
8993
  <xsl:call-template name="insert_basic_link">
8938
8994
  <xsl:with-param name="element">
8939
8995
  <xsl:variable name="alt_text">
@@ -8953,7 +9009,7 @@
8953
9009
  </xsl:template> <!-- xref -->
8954
9010
 
8955
9011
  <!-- command between two xref points to non-standard bibitem -->
8956
- <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="."/>
9012
+ <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="."/>
8957
9013
  </xsl:template>
8958
9014
 
8959
9015
  <xsl:attribute-set name="eref-style">
@@ -8984,7 +9040,7 @@
8984
9040
  <!-- ====== -->
8985
9041
  <!-- eref -->
8986
9042
  <!-- ====== -->
8987
- <xsl:template match="mn:eref" name="eref">
9043
+ <xsl:template match="mn:fmt-eref" name="eref">
8988
9044
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
8989
9045
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
8990
9046
  <xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
@@ -9122,28 +9178,28 @@
9122
9178
 
9123
9179
  <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
9124
9180
 
9125
- <xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
9181
+ <xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
9126
9182
 
9127
9183
  <xsl:call-template name="refine_note-name-style"/>
9128
9184
 
9129
9185
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9130
9186
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9131
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9187
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9132
9188
  <xsl:call-template name="append_add-style"/>
9133
9189
  </xsl:if>
9134
9190
 
9135
9191
  <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
9136
- <xsl:if test="count(*[not(self::mn:name)]) = 1 and *[not(self::mn:name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
9137
- <xsl:apply-templates select="*[not(self::mn:name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
9192
+ <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)]">
9193
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
9138
9194
  <xsl:with-param name="skip">false</xsl:with-param>
9139
9195
  </xsl:apply-templates>
9140
9196
  </xsl:if>
9141
9197
 
9142
- <xsl:apply-templates select="mn:name"/>
9198
+ <xsl:apply-templates select="mn:fmt-name"/>
9143
9199
 
9144
9200
  </fo:inline>
9145
9201
 
9146
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
9202
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9147
9203
  </fo:block>
9148
9204
  </fo:block-container>
9149
9205
  </fo:block-container>
@@ -9185,19 +9241,19 @@
9185
9241
 
9186
9242
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9187
9243
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9188
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9244
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9189
9245
  <xsl:call-template name="append_add-style"/>
9190
9246
  </xsl:if>
9191
9247
 
9192
- <xsl:apply-templates select="mn:name"/>
9248
+ <xsl:apply-templates select="mn:fmt-name"/>
9193
9249
 
9194
9250
  </fo:inline>
9195
9251
 
9196
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
9252
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9197
9253
  </fo:block>
9198
9254
  </xsl:template>
9199
9255
 
9200
- <xsl:template match="mn:note/mn:name">
9256
+ <xsl:template match="mn:note/mn:fmt-name">
9201
9257
  <xsl:param name="sfx"/>
9202
9258
  <xsl:variable name="suffix">
9203
9259
  <xsl:choose>
@@ -9224,7 +9280,7 @@
9224
9280
  </xsl:if>
9225
9281
  </xsl:template>
9226
9282
 
9227
- <xsl:template match="mn:termnote/mn:name">
9283
+ <xsl:template match="mn:termnote/mn:fmt-name">
9228
9284
  <xsl:param name="sfx"/>
9229
9285
  <xsl:variable name="suffix">
9230
9286
  <xsl:choose>
@@ -9306,15 +9362,15 @@
9306
9362
 
9307
9363
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9308
9364
  <fo:block role="BlockQuote">
9309
- <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 -->
9365
+ <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 -->
9310
9366
  </fo:block>
9311
9367
  </fo:block-container>
9312
9368
  </fo:block-container>
9313
- <xsl:if test="mn:author or mn:source or mn:attribution">
9369
+ <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
9314
9370
  <fo:block xsl:use-attribute-sets="quote-source-style">
9315
9371
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
9316
9372
  <xsl:apply-templates select="mn:author"/>
9317
- <xsl:apply-templates select="mn:source"/>
9373
+ <xsl:apply-templates select="mn:fmt-source"/>
9318
9374
  <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
9319
9375
  <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
9320
9376
  </fo:block>
@@ -9324,17 +9380,32 @@
9324
9380
  </fo:block-container>
9325
9381
  </xsl:template>
9326
9382
 
9327
- <xsl:template match="mn:source">
9383
+ <xsl:template match="mn:fmt-source">
9328
9384
  <xsl:if test="../mn:author">
9329
9385
  <xsl:text>, </xsl:text>
9330
9386
  </xsl:if>
9331
- <xsl:call-template name="insert_basic_link">
9332
- <xsl:with-param name="element">
9333
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
9334
- <xsl:apply-templates/>
9335
- </fo:basic-link>
9336
- </xsl:with-param>
9337
- </xsl:call-template>
9387
+ <xsl:choose>
9388
+ <xsl:when test="not(parent::quote)">
9389
+ <fo:block>
9390
+ <xsl:call-template name="insert_basic_link">
9391
+ <xsl:with-param name="element">
9392
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
9393
+ <xsl:apply-templates/>
9394
+ </fo:basic-link>
9395
+ </xsl:with-param>
9396
+ </xsl:call-template>
9397
+ </fo:block>
9398
+ </xsl:when>
9399
+ <xsl:otherwise>
9400
+ <xsl:call-template name="insert_basic_link">
9401
+ <xsl:with-param name="element">
9402
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
9403
+ <xsl:apply-templates/>
9404
+ </fo:basic-link>
9405
+ </xsl:with-param>
9406
+ </xsl:call-template>
9407
+ </xsl:otherwise>
9408
+ </xsl:choose>
9338
9409
  </xsl:template>
9339
9410
 
9340
9411
  <xsl:template match="mn:author">
@@ -9412,7 +9483,7 @@
9412
9483
  <ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
9413
9484
  <xsl:choose>
9414
9485
  <!-- skip figure/name/fn -->
9415
- <xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
9486
+ <xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
9416
9487
  <xsl:otherwise>
9417
9488
  <xsl:element name="figure" namespace="{$namespace_full}">
9418
9489
  <xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
@@ -9613,17 +9684,17 @@
9613
9684
 
9614
9685
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
9615
9686
 
9616
- <xsl:for-each select="mn:name"> <!-- set context -->
9687
+ <xsl:for-each select="mn:fmt-name"> <!-- set context -->
9617
9688
  <xsl:call-template name="setIDforNamedDestination"/>
9618
9689
  </xsl:for-each>
9619
9690
 
9620
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
9691
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
9621
9692
  </fo:block>
9622
9693
 
9623
9694
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
9624
9695
  <xsl:call-template name="showFigureKey"/>
9625
9696
  </xsl:if>
9626
- <xsl:apply-templates select="mn:name"/> <!-- show figure's name AFTER image -->
9697
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
9627
9698
 
9628
9699
  </fo:block-container>
9629
9700
  </xsl:template>
@@ -9649,9 +9720,9 @@
9649
9720
  <xsl:template match="mn:figure[@class = 'pseudocode']">
9650
9721
  <xsl:call-template name="setNamedDestination"/>
9651
9722
  <fo:block id="{@id}">
9652
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
9723
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9653
9724
  </fo:block>
9654
- <xsl:apply-templates select="mn:name"/>
9725
+ <xsl:apply-templates select="mn:fmt-name"/>
9655
9726
  </xsl:template>
9656
9727
 
9657
9728
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
@@ -9662,7 +9733,7 @@
9662
9733
 
9663
9734
  <!-- SOURCE: ... -->
9664
9735
  <!-- figure/source -->
9665
- <xsl:template match="mn:figure/mn:source" priority="2">
9736
+ <xsl:template match="mn:figure/mn:fmt-source" priority="2">
9666
9737
  <xsl:call-template name="termsource"/>
9667
9738
  </xsl:template>
9668
9739
 
@@ -9672,7 +9743,7 @@
9672
9743
  <xsl:variable name="isAdded" select="../@added"/>
9673
9744
  <xsl:variable name="isDeleted" select="../@deleted"/>
9674
9745
  <xsl:choose>
9675
- <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) -->
9746
+ <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) -->
9676
9747
  <fo:inline padding-left="1mm" padding-right="1mm">
9677
9748
  <xsl:if test="not(parent::mn:figure) or parent::mn:p">
9678
9749
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -9693,13 +9764,26 @@
9693
9764
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
9694
9765
 
9695
9766
  <xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
9696
- <xsl:attribute name="width">100%</xsl:attribute>
9767
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
9768
+ <xsl:choose>
9769
+ <xsl:when test="@width and not(@height)">
9770
+ <xsl:attribute name="width">100%</xsl:attribute>
9771
+ <xsl:attribute name="content-height">100%</xsl:attribute>
9772
+ </xsl:when>
9773
+ <xsl:when test="@height and not(@width)">
9774
+ <xsl:attribute name="height">100%</xsl:attribute>
9775
+ <xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
9776
+ </xsl:when>
9777
+ <xsl:when test="not(@width) and not(@height)">
9778
+ <xsl:attribute name="content-height">100%</xsl:attribute>
9779
+ </xsl:when>
9780
+ </xsl:choose>
9781
+
9697
9782
  <xsl:if test="normalize-space($logo_width) != ''">
9698
9783
  <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
9699
9784
  </xsl:if>
9700
- <xsl:attribute name="content-height">100%</xsl:attribute>
9701
9785
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
9702
- <xsl:attribute name="scaling">uniform</xsl:attribute>
9786
+ <xsl:attribute name="vertical-align">top</xsl:attribute>
9703
9787
  </xsl:if>
9704
9788
 
9705
9789
  <xsl:variable name="width">
@@ -9988,7 +10072,7 @@
9988
10072
  <xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
9989
10073
  <xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
9990
10074
 
9991
- <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
10075
+ <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
9992
10076
  <xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
9993
10077
  <xsl:param name="name"/>
9994
10078
 
@@ -9998,8 +10082,8 @@
9998
10082
 
9999
10083
  <xsl:variable name="alt-text">
10000
10084
  <xsl:choose>
10001
- <xsl:when test="normalize-space(../mn:name) != ''">
10002
- <xsl:value-of select="../mn:name"/>
10085
+ <xsl:when test="normalize-space(../mn:fmt-name) != ''">
10086
+ <xsl:value-of select="../mn:fmt-name"/>
10003
10087
  </xsl:when>
10004
10088
  <xsl:when test="normalize-space($name) != ''">
10005
10089
  <xsl:value-of select="$name"/>
@@ -10008,7 +10092,7 @@
10008
10092
  </xsl:choose>
10009
10093
  </xsl:variable>
10010
10094
 
10011
- <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
10095
+ <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
10012
10096
 
10013
10097
  <xsl:choose>
10014
10098
  <xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
@@ -10057,9 +10141,9 @@
10057
10141
  <fo:table-cell column-number="2">
10058
10142
  <fo:block>
10059
10143
  <fo:block-container width="{$width_scale}px" height="{$height_scale}px">
10060
- <xsl:if test="../mn:name/mn:bookmark">
10144
+ <xsl:if test="../mn:fmt-name/mn:bookmark">
10061
10145
  <fo:block line-height="0" font-size="0">
10062
- <xsl:for-each select="../mn:name/mn:bookmark">
10146
+ <xsl:for-each select="../mn:fmt-name/mn:bookmark">
10063
10147
  <xsl:call-template name="bookmark"/>
10064
10148
  </xsl:for-each>
10065
10149
  </fo:block>
@@ -10299,7 +10383,7 @@
10299
10383
 
10300
10384
  <!-- image with svg and emf -->
10301
10385
  <xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
10302
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
10386
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
10303
10387
  <xsl:for-each select="*[local-name() = 'svg']">
10304
10388
  <xsl:call-template name="image_svg">
10305
10389
  <xsl:with-param name="name" select="$name"/>
@@ -10316,7 +10400,7 @@
10316
10400
 
10317
10401
  <xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
10318
10402
  <xsl:variable name="svg_content" select="document(@src)"/>
10319
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
10403
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
10320
10404
  <xsl:for-each select="xalan:nodeset($svg_content)/node()">
10321
10405
  <xsl:call-template name="image_svg">
10322
10406
  <xsl:with-param name="name" select="$name"/>
@@ -10439,7 +10523,7 @@
10439
10523
  <xsl:template match="mn:emf"/>
10440
10524
 
10441
10525
  <!-- figure/name -->
10442
- <xsl:template match="mn:figure/mn:name | mn:image/mn:name">
10526
+ <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
10443
10527
  <xsl:if test="normalize-space() != ''">
10444
10528
  <fo:block xsl:use-attribute-sets="figure-name-style">
10445
10529
 
@@ -10509,25 +10593,25 @@
10509
10593
  <fo:block-container margin-left="0mm" role="SKIP">
10510
10594
  <xsl:call-template name="setNamedDestination"/>
10511
10595
  <fo:block id="{@id}">
10512
- <xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
10596
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
10513
10597
  </fo:block>
10514
10598
  </fo:block-container>
10515
10599
  </fo:block-container>
10516
10600
  </xsl:template>
10517
10601
 
10518
- <xsl:template match="mn:formula/mn:dt/mn:stem">
10602
+ <xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
10519
10603
  <fo:inline>
10520
10604
  <xsl:apply-templates/>
10521
10605
  </fo:inline>
10522
10606
  </xsl:template>
10523
10607
 
10524
- <xsl:template match="mn:admitted/mn:stem">
10608
+ <xsl:template match="mn:fmt-admitted/mn:fmt-stem">
10525
10609
  <fo:inline>
10526
10610
  <xsl:apply-templates/>
10527
10611
  </fo:inline>
10528
10612
  </xsl:template>
10529
10613
 
10530
- <xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
10614
+ <xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
10531
10615
  <!-- https://github.com/metanorma/isodoc/issues/607
10532
10616
  <xsl:if test="normalize-space() != ''">
10533
10617
  <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
@@ -10536,7 +10620,7 @@
10536
10620
  </xsl:template>
10537
10621
 
10538
10622
  <!-- stem inside formula with name (with formula's number) -->
10539
- <xsl:template match="mn:formula[mn:name]/mn:stem">
10623
+ <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
10540
10624
  <fo:block xsl:use-attribute-sets="formula-style">
10541
10625
 
10542
10626
  <fo:table table-layout="fixed" width="100%">
@@ -10556,13 +10640,13 @@
10556
10640
 
10557
10641
  <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
10558
10642
 
10559
- <xsl:for-each select="../mn:name">
10643
+ <xsl:for-each select="../mn:fmt-name">
10560
10644
  <xsl:call-template name="setIDforNamedDestination"/>
10561
10645
  </xsl:for-each>
10562
10646
 
10563
10647
  <xsl:call-template name="refine_formula-stem-number-style"/>
10564
10648
 
10565
- <xsl:apply-templates select="../mn:name"/>
10649
+ <xsl:apply-templates select="../mn:fmt-name"/>
10566
10650
  </fo:block>
10567
10651
  </fo:table-cell>
10568
10652
  </fo:table-row>
@@ -10572,7 +10656,7 @@
10572
10656
  </xsl:template>
10573
10657
 
10574
10658
  <!-- stem inside formula without name (without formula's number) -->
10575
- <xsl:template match="mn:formula[not(mn:name)]/mn:stem">
10659
+ <xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
10576
10660
  <fo:block xsl:use-attribute-sets="formula-style">
10577
10661
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
10578
10662
  <xsl:apply-templates/>
@@ -10926,7 +11010,7 @@
10926
11010
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
10927
11011
  <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
10928
11012
  -->
10929
- <xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
11013
+ <xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
10930
11014
  <fo:inline xsl:use-attribute-sets="mathml-style">
10931
11015
 
10932
11016
  <xsl:call-template name="refine_mathml-style"/>
@@ -11202,7 +11286,7 @@
11202
11286
 
11203
11287
  <xsl:template match="mn:ul | mn:ol" mode="list" name="list">
11204
11288
 
11205
- <xsl:apply-templates select="mn:name">
11289
+ <xsl:apply-templates select="mn:fmt-name">
11206
11290
  <xsl:with-param name="process">true</xsl:with-param>
11207
11291
  </xsl:apply-templates>
11208
11292
 
@@ -11248,7 +11332,7 @@
11248
11332
 
11249
11333
  <xsl:call-template name="refine_list-style"/>
11250
11334
 
11251
- <xsl:if test="mn:name">
11335
+ <xsl:if test="mn:fmt-name">
11252
11336
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
11253
11337
  </xsl:if>
11254
11338
 
@@ -11263,7 +11347,7 @@
11263
11347
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
11264
11348
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
11265
11349
 
11266
- <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
11350
+ <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
11267
11351
  <xsl:param name="process">false</xsl:param>
11268
11352
  <xsl:if test="$process = 'true'">
11269
11353
  <fo:block xsl:use-attribute-sets="list-name-style">
@@ -11390,7 +11474,7 @@
11390
11474
  -->
11391
11475
  <!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
11392
11476
  <!-- fn in text -->
11393
- <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))]" priority="2" name="fn">
11477
+ <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))]" priority="2" name="fn">
11394
11478
  <xsl:param name="footnote_body_from_table">false</xsl:param>
11395
11479
 
11396
11480
  <!-- list of unique footnotes -->
@@ -11515,7 +11599,7 @@
11515
11599
  <!-- commented:
11516
11600
  .//mn:bibitem[ancestor::mn:references]/mn:note |
11517
11601
  because 'fn' there is in biblio-tag -->
11518
- <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])]">
11602
+ <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])]">
11519
11603
  <!-- copy unique fn -->
11520
11604
  <fn gen_id="{generate-id(.)}">
11521
11605
  <xsl:copy-of select="@*"/>
@@ -11580,7 +11664,7 @@
11580
11664
  <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
11581
11665
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11582
11666
  <fo:block>
11583
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
11667
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
11584
11668
  </fo:block>
11585
11669
  </fo:block-container>
11586
11670
  </fo:block-container>
@@ -11606,7 +11690,7 @@
11606
11690
  </xsl:otherwise>
11607
11691
  </xsl:choose> -->
11608
11692
  <xsl:variable name="name">
11609
- <xsl:apply-templates select="mn:name"/>
11693
+ <xsl:apply-templates select="mn:fmt-name"/>
11610
11694
  </xsl:variable>
11611
11695
  <xsl:copy-of select="$name"/>
11612
11696
  <xsl:if test="normalize-space($name) != ''">
@@ -11614,7 +11698,7 @@
11614
11698
  </xsl:if>
11615
11699
  </xsl:template>
11616
11700
 
11617
- <xsl:template match="mn:admonition/mn:name">
11701
+ <xsl:template match="mn:admonition/mn:fmt-name">
11618
11702
  <xsl:apply-templates/>
11619
11703
  </xsl:template>
11620
11704
 
@@ -11739,10 +11823,10 @@
11739
11823
  <xsl:call-template name="setNamedDestination"/>
11740
11824
  <fo:block id="{@id}"/>
11741
11825
 
11742
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
11826
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
11743
11827
 
11744
11828
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
11745
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
11829
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
11746
11830
  </fo:block>
11747
11831
  </xsl:template> <!-- references -->
11748
11832
 
@@ -12061,7 +12145,8 @@
12061
12145
  </xsl:copy>
12062
12146
  </xsl:template>
12063
12147
 
12064
- <xsl:template match="mn:xref" mode="index_add_id">
12148
+ <xsl:template match="mn:xref" mode="index_add_id"/>
12149
+ <xsl:template match="mn:fmt-xref" mode="index_add_id">
12065
12150
  <xsl:param name="docid"/>
12066
12151
  <xsl:variable name="id">
12067
12152
  <xsl:call-template name="generateIndexXrefId">
@@ -12103,7 +12188,7 @@
12103
12188
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
12104
12189
  <xsl:copy>
12105
12190
  <xsl:apply-templates select="@*" mode="index_update"/>
12106
- <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
12191
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
12107
12192
  </xsl:copy>
12108
12193
  </xsl:template>
12109
12194
 
@@ -12124,11 +12209,11 @@
12124
12209
  <xsl:value-of select="."/>
12125
12210
  <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
12126
12211
  </xsl:when>
12127
- <xsl:when test="self::* and local-name(.) = 'xref'">
12212
+ <xsl:when test="self::* and local-name(.) = 'fmt-xref'">
12128
12213
  <xsl:variable name="id" select="@id"/>
12129
12214
 
12130
- <xsl:variable name="id_next" select="following-sibling::mn:xref[1]/@id"/>
12131
- <xsl:variable name="id_prev" select="preceding-sibling::mn:xref[1]/@id"/>
12215
+ <xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
12216
+ <xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
12132
12217
 
12133
12218
  <xsl:variable name="pages_">
12134
12219
  <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
@@ -12224,18 +12309,18 @@
12224
12309
  <xsl:variable name="item_number">
12225
12310
  <xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
12226
12311
  </xsl:variable>
12227
- <xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
12312
+ <xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
12228
12313
  <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
12229
12314
  </xsl:template>
12230
12315
 
12231
- <xsl:template match="mn:indexsect/mn:title" priority="4">
12316
+ <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
12232
12317
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
12233
12318
  <!-- Index -->
12234
12319
  <xsl:apply-templates/>
12235
12320
  </fo:block>
12236
12321
  </xsl:template>
12237
12322
 
12238
- <xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
12323
+ <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
12239
12324
  <!-- Letter A, B, C, ... -->
12240
12325
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
12241
12326
  <xsl:apply-templates/>
@@ -12277,12 +12362,12 @@
12277
12362
  <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"/>
12278
12363
  <bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
12279
12364
  <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"/> -->
12280
- <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]">
12365
+ <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]">
12281
12366
  <!-- skip here, see the template 'fmt-review-start' -->
12282
12367
  </xsl:when>
12283
12368
  <xsl:otherwise>
12284
12369
  <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
12285
- <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>
12370
+ <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>
12286
12371
  <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
12287
12372
  <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
12288
12373
  </xsl:otherwise>
@@ -12446,7 +12531,7 @@
12446
12531
 
12447
12532
  <xsl:template name="processTables_Contents">
12448
12533
  <mnx:tables>
12449
- <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
12534
+ <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
12450
12535
  <xsl:choose>
12451
12536
  <xsl:when test="mn:fmt-name">
12452
12537
  <xsl:variable name="fmt_name">
@@ -12468,7 +12553,7 @@
12468
12553
 
12469
12554
  <xsl:template name="processFigures_Contents">
12470
12555
  <mnx:figures>
12471
- <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) != '']">
12556
+ <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) != '']">
12472
12557
  <xsl:choose>
12473
12558
  <xsl:when test="mn:fmt-name">
12474
12559
  <xsl:variable name="fmt_name">
@@ -12497,7 +12582,7 @@
12497
12582
 
12498
12583
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
12499
12584
 
12500
- <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">
12585
+ <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">
12501
12586
  <xsl:apply-templates mode="contents"/>
12502
12587
  <xsl:text> </xsl:text>
12503
12588
  </xsl:template>
@@ -12509,7 +12594,7 @@
12509
12594
  </xsl:if>
12510
12595
  </xsl:template>
12511
12596
 
12512
- <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">
12597
+ <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">
12513
12598
  <xsl:apply-templates mode="bookmarks"/>
12514
12599
  <xsl:text> </xsl:text>
12515
12600
  </xsl:template>
@@ -12520,7 +12605,7 @@
12520
12605
  </xsl:if>
12521
12606
  </xsl:template>
12522
12607
 
12523
- <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">
12608
+ <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">
12524
12609
  <xsl:value-of select="."/>
12525
12610
  </xsl:template>
12526
12611
 
@@ -12530,7 +12615,7 @@
12530
12615
  </xsl:if>
12531
12616
  </xsl:template>
12532
12617
 
12533
- <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">
12618
+ <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">
12534
12619
  <xsl:value-of select="."/>
12535
12620
  </xsl:template>
12536
12621
 
@@ -12991,7 +13076,7 @@
12991
13076
  <xsl:value-of select="."/>
12992
13077
  </xsl:template>
12993
13078
 
12994
- <xsl:template match="mn:review" mode="contents_item"/>
13079
+ <xsl:template match="mn:annotation" mode="contents_item"/>
12995
13080
 
12996
13081
  <xsl:template match="mn:tab" mode="contents_item">
12997
13082
  <xsl:text> </xsl:text>
@@ -13146,7 +13231,7 @@
13146
13231
  <xsl:apply-templates/>
13147
13232
  </xsl:template>
13148
13233
 
13149
- <xsl:template match="mn:toc//mn:xref" priority="3">
13234
+ <xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
13150
13235
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13151
13236
  <!-- New format: one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13152
13237
  <!-- <test><xsl:copy-of select="."/></test> -->
@@ -13214,8 +13299,8 @@
13214
13299
  <xsl:apply-templates mode="toc_table_width"/>
13215
13300
  </xsl:template>
13216
13301
 
13217
- <xsl:template match="mn:clause[@type = 'toc']/mn:title" mode="toc_table_width"/>
13218
- <xsl:template match="mn:clause[not(@type = 'toc')]/mn:title" mode="toc_table_width"/>
13302
+ <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
13303
+ <xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
13219
13304
 
13220
13305
  <xsl:template match="mn:li" mode="toc_table_width">
13221
13306
  <mn:tr>
@@ -13223,7 +13308,7 @@
13223
13308
  </mn:tr>
13224
13309
  </xsl:template>
13225
13310
 
13226
- <xsl:template match="mn:xref" mode="toc_table_width">
13311
+ <xsl:template match="mn:fmt-xref" mode="toc_table_width">
13227
13312
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13228
13313
  <!-- New format - one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13229
13314
  <xsl:for-each select="mn:tab">
@@ -13297,10 +13382,10 @@
13297
13382
 
13298
13383
  </xsl:template> <!-- tab -->
13299
13384
 
13300
- <xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
13301
- <xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
13385
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
13386
+ <xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
13302
13387
 
13303
- <xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
13388
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
13304
13389
  </xsl:template>
13305
13390
 
13306
13391
  <xsl:template name="insertNonBreakSpaces">
@@ -13314,13 +13399,13 @@
13314
13399
  </xsl:template>
13315
13400
 
13316
13401
  <xsl:variable name="reviews_">
13317
- <xsl:for-each select="//mn:review[not(parent::mn:review-container)][@from]">
13402
+ <xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
13318
13403
  <xsl:copy>
13319
13404
  <xsl:copy-of select="@from"/>
13320
13405
  <xsl:copy-of select="@id"/>
13321
13406
  </xsl:copy>
13322
13407
  </xsl:for-each>
13323
- <xsl:for-each select="//mn:fmt-review-start[@source]">
13408
+ <xsl:for-each select="//mn:fmt-annotation-start[@source]">
13324
13409
  <xsl:copy>
13325
13410
  <xsl:copy-of select="@source"/>
13326
13411
  <xsl:copy-of select="@id"/>
@@ -13334,7 +13419,7 @@
13334
13419
  <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
13335
13420
  <xsl:variable name="curr_id" select="@id"/>
13336
13421
  <!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
13337
- <xsl:for-each select="$reviews//mn:review[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
13422
+ <xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
13338
13423
  <xsl:variable name="review_id" select="normalize-space(@id)"/>
13339
13424
  <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
13340
13425
  <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>
@@ -13349,7 +13434,7 @@
13349
13434
 
13350
13435
  <!-- document text (not figures, or tables) footnotes -->
13351
13436
  <xsl:variable name="reviews_container_">
13352
- <xsl:for-each select="//mn:review-container/mn:fmt-review-body">
13437
+ <xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
13353
13438
  <xsl:variable name="update_xml_step1">
13354
13439
  <xsl:apply-templates select="." mode="update_xml_step1"/>
13355
13440
  </xsl:variable>
@@ -13358,10 +13443,10 @@
13358
13443
  </xsl:variable>
13359
13444
  <xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
13360
13445
 
13361
- <xsl:template match="mn:review-container"/>
13446
+ <xsl:template match="mn:annotation-container"/>
13362
13447
 
13363
13448
  <!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
13364
- <xsl:template match="mn:review[not(parent::mn:review-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13449
+ <xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13365
13450
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
13366
13451
  <xsl:if test="$isGenerateTableIF = 'false'">
13367
13452
  <xsl:choose>
@@ -13381,7 +13466,7 @@
13381
13466
  </xsl:template>
13382
13467
 
13383
13468
  <!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
13384
- <xsl:template match="mn:fmt-review-start" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13469
+ <xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13385
13470
  <!-- comment 2019-11-29 -->
13386
13471
  <!-- <fo:block font-weight="bold">Review:</fo:block>
13387
13472
  <xsl:apply-templates /> -->
@@ -13437,7 +13522,7 @@
13437
13522
  </xsl:template>
13438
13523
 
13439
13524
  <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
13440
- <xsl:template match="mn:review[@type = 'other']"/>
13525
+ <xsl:template match="mn:annotation[@type = 'other']"/>
13441
13526
 
13442
13527
  <!-- ============ -->
13443
13528
  <!-- errata -->
@@ -13830,9 +13915,12 @@
13830
13915
  <xsl:choose>
13831
13916
  <xsl:when test="mn:fmt-title">
13832
13917
  <xsl:variable name="fmt_title_section">
13833
- <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:review)]"/>
13918
+ <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
13834
13919
  </xsl:variable>
13835
13920
  <xsl:value-of select="normalize-space($fmt_title_section)"/>
13921
+ <xsl:if test="normalize-space($fmt_title_section) = ''">
13922
+ <xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
13923
+ </xsl:if>
13836
13924
  </xsl:when>
13837
13925
  <xsl:otherwise>
13838
13926
  <xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
@@ -13845,6 +13933,9 @@
13845
13933
  <xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
13846
13934
  <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
13847
13935
  </xsl:when>
13936
+ <xsl:when test="mn:fmt-title/mn:tab">
13937
+ <xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
13938
+ </xsl:when>
13848
13939
  <xsl:when test="mn:fmt-title">
13849
13940
  <xsl:copy-of select="mn:fmt-title/node()"/>
13850
13941
  </xsl:when>
@@ -13982,10 +14073,10 @@
13982
14073
 
13983
14074
  </fo:block>
13984
14075
 
13985
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
14076
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
13986
14077
 
13987
14078
  <fo:block>
13988
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
14079
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
13989
14080
  </fo:block>
13990
14081
  </xsl:otherwise>
13991
14082
  </xsl:choose>
@@ -13994,7 +14085,7 @@
13994
14085
  <xsl:template name="refine_annex_style">
13995
14086
  </xsl:template>
13996
14087
 
13997
- <xsl:template match="mn:name/text()">
14088
+ <xsl:template match="mn:name/text() | mn:fmt-name/text()">
13998
14089
  <!-- 0xA0 to space replacement -->
13999
14090
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
14000
14091
  </xsl:template>
@@ -14050,28 +14141,28 @@
14050
14141
  <xsl:template match="mn:amend"/>
14051
14142
 
14052
14143
  <!-- fmt-title renamed to title in update_xml_step1 -->
14053
- <xsl:template match="mn:fmt-title"/>
14144
+ <!-- <xsl:template match="mn:fmt-title" /> -->
14054
14145
 
14055
14146
  <!-- fmt-name renamed to name in update_xml_step1 -->
14056
- <xsl:template match="mn:fmt-name"/>
14147
+ <!-- <xsl:template match="mn:fmt-name" /> -->
14057
14148
 
14058
14149
  <!-- fmt-preferred renamed to preferred in update_xml_step1 -->
14059
- <xsl:template match="mn:fmt-preferred"/>
14150
+ <!-- <xsl:template match="mn:fmt-preferred" /> -->
14060
14151
 
14061
14152
  <!-- fmt-admitted renamed to admitted in update_xml_step1 -->
14062
- <xsl:template match="mn:fmt-admitted"/>
14153
+ <!-- <xsl:template match="mn:fmt-admitted" /> -->
14063
14154
 
14064
14155
  <!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
14065
- <xsl:template match="mn:fmt-deprecates"/>
14156
+ <!-- <xsl:template match="mn:fmt-deprecates" /> -->
14066
14157
 
14067
14158
  <!-- fmt-definition renamed to definition in update_xml_step1 -->
14068
- <xsl:template match="mn:fmt-definition"/>
14159
+ <!-- <xsl:template match="mn:fmt-definition" /> -->
14069
14160
 
14070
14161
  <!-- fmt-termsource renamed to termsource in update_xml_step1 -->
14071
- <xsl:template match="mn:fmt-termsource"/>
14162
+ <!-- <xsl:template match="mn:fmt-termsource" /> -->
14072
14163
 
14073
14164
  <!-- fmt-source renamed to source in update_xml_step1 -->
14074
- <xsl:template match="mn:fmt-source"/>
14165
+ <!-- <xsl:template match="mn:fmt-source" /> -->
14075
14166
 
14076
14167
  <xsl:template match="mn:semx">
14077
14168
  <xsl:apply-templates/>
@@ -14540,12 +14631,12 @@
14540
14631
  <xsl:when test="ancestor::mn:preface">
14541
14632
  <xsl:value-of select="$level_total - 2"/>
14542
14633
  </xsl:when>
14543
- <xsl:when test="ancestor::mn:sections and self::mn:title">
14634
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
14544
14635
  <!-- determine 'depth' depends on upper clause with title/@depth -->
14545
14636
  <!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
14546
- <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:title/@depth][1]/mn:title/@depth"/>
14637
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
14547
14638
  <!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
14548
- <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:title/@depth][1]/ancestor::*)"/>
14639
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
14549
14640
  <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
14550
14641
  <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
14551
14642
  <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
@@ -14561,8 +14652,8 @@
14561
14652
  </xsl:otherwise>
14562
14653
  </xsl:choose>
14563
14654
  </xsl:when>
14564
- <xsl:when test="ancestor::mn:sections and self::mn:name and parent::mn:term">
14565
- <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:title/@depth)"/>
14655
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
14656
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
14566
14657
  <xsl:choose>
14567
14658
  <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
14568
14659
  <xsl:value-of select="number($upper_terms_depth + 1)"/>
@@ -14573,7 +14664,7 @@
14573
14664
  </xsl:choose>
14574
14665
  </xsl:when>
14575
14666
  <xsl:when test="ancestor::mn:sections">
14576
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:title/@depth)"/>
14667
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
14577
14668
  <xsl:choose>
14578
14669
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
14579
14670
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -14589,8 +14680,8 @@
14589
14680
  <xsl:when test="parent::mn:annex">
14590
14681
  <xsl:value-of select="$level_total - 1"/>
14591
14682
  </xsl:when>
14592
- <xsl:when test="ancestor::mn:annex and self::mn:title">
14593
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:title/@depth)"/>
14683
+ <xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
14684
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
14594
14685
  <xsl:choose>
14595
14686
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
14596
14687
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -14623,7 +14714,7 @@
14623
14714
  </xsl:when>
14624
14715
  <xsl:otherwise>
14625
14716
  <xsl:variable name="title_level_">
14626
- <xsl:for-each select="../preceding-sibling::mn:title[1]">
14717
+ <xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
14627
14718
  <xsl:call-template name="getLevel"/>
14628
14719
  </xsl:for-each>
14629
14720
  </xsl:variable>
@@ -14700,15 +14791,17 @@
14700
14791
  </xsl:template>
14701
14792
 
14702
14793
  <xsl:template name="setNamedDestination">
14703
- <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
14704
- <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'">
14705
- <fox:destination internal-destination="{@id}"/>
14706
- </xsl:if>
14707
- <xsl:for-each select=". | mn:title | mn:name">
14708
- <xsl:if test="@named_dest">
14709
- <fox:destination internal-destination="{@named_dest}"/>
14794
+ <xsl:if test="$isGenerateTableIF = 'false'">
14795
+ <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
14796
+ <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'">
14797
+ <fox:destination internal-destination="{@id}"/>
14710
14798
  </xsl:if>
14711
- </xsl:for-each>
14799
+ <xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
14800
+ <xsl:if test="@named_dest">
14801
+ <fox:destination internal-destination="{@named_dest}"/>
14802
+ </xsl:if>
14803
+ </xsl:for-each>
14804
+ </xsl:if>
14712
14805
  </xsl:template>
14713
14806
 
14714
14807
  <xsl:template name="add-letter-spacing">
@@ -15056,7 +15149,7 @@
15056
15149
  </xsl:when>
15057
15150
  <xsl:otherwise>
15058
15151
  <!-- namespace-uri(ancestor::mn:title) != '' to skip title from $contents -->
15059
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
15152
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
15060
15153
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
15061
15154
  </xsl:if>
15062
15155
  <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">
@@ -15090,7 +15183,7 @@
15090
15183
  </fo:block>
15091
15184
  </fo:block-container>
15092
15185
  </fo:inline-container>
15093
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
15186
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
15094
15187
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
15095
15188
  </xsl:if>
15096
15189
  </xsl:otherwise>