metanorma-ribose 2.6.9 → 2.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="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
 
@@ -55,6 +55,263 @@
55
55
 
56
56
  </xsl:variable>
57
57
 
58
+ <xsl:template name="layout-master-set">
59
+ <fo:layout-master-set>
60
+
61
+ <!-- Cover page -->
62
+ <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
63
+ <fo:region-body margin-top="176mm" margin-bottom="11.5mm" margin-left="13mm" margin-right="78mm"/>
64
+ <fo:region-before region-name="cover-page-header" extent="176mm"/>
65
+ <fo:region-after region-name="cover-page-footer" extent="11.5mm"/>
66
+ <fo:region-start extent="13mm"/>
67
+ <fo:region-end extent="78mm"/>
68
+ </fo:simple-page-master>
69
+
70
+ <!-- ToC -->
71
+ <fo:simple-page-master master-name="toc-odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
72
+ <fo:region-body margin-top="14mm" margin-bottom="26.5mm" margin-left="61mm" margin-right="12mm"/>
73
+ <fo:region-before region-name="header-toc-odd" extent="14mm"/>
74
+ <fo:region-after region-name="footer-odd" extent="12.5mm"/>
75
+ <fo:region-start region-name="left-region" extent="13mm"/>
76
+ <fo:region-end region-name="right-region" extent="12mm"/>
77
+ </fo:simple-page-master>
78
+ <fo:simple-page-master master-name="toc-even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
79
+ <fo:region-body margin-top="14mm" margin-bottom="85mm" margin-left="61mm" margin-right="12mm"/>
80
+ <fo:region-before region-name="header-toc-even" extent="14mm"/>
81
+ <fo:region-after region-name="footer-even" extent="12.5mm"/>
82
+ <fo:region-start region-name="left-region" extent="13mm"/>
83
+ <fo:region-end region-name="right-region" extent="12mm"/>
84
+ </fo:simple-page-master>
85
+ <fo:page-sequence-master master-name="toc">
86
+ <fo:repeatable-page-master-alternatives>
87
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="toc-odd"/>
88
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="toc-even"/>
89
+ </fo:repeatable-page-master-alternatives>
90
+ </fo:page-sequence-master>
91
+
92
+ <fo:simple-page-master master-name="first" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
93
+ <fo:region-body margin-top="14mm" margin-bottom="85mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
94
+ <fo:region-before region-name="header-LB-yellow" extent="14mm"/>
95
+ <fo:region-after region-name="footer-even" extent="12.5mm"/>
96
+ <fo:region-start region-name="left-region" extent="13mm"/>
97
+ <fo:region-end region-name="right-region" extent="12mm"/>
98
+ </fo:simple-page-master>
99
+
100
+ <xsl:variable name="pages">
101
+ <!-- Page 2 and 3: (left bottom + right top, yellow) -->
102
+ <fo:simple-page-master master-name="page2" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
103
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
104
+ <fo:region-before region-name="header-LB-yellow" extent="14mm"/>
105
+ <fo:region-after region-name="footer-even" extent="12.5mm"/>
106
+ <fo:region-start region-name="left-region" extent="13mm"/>
107
+ <fo:region-end region-name="right-region" extent="12mm"/>
108
+ </fo:simple-page-master>
109
+ <fo:simple-page-master master-name="page3" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
110
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
111
+ <fo:region-before region-name="header-RT-yellow" extent="14mm"/>
112
+ <fo:region-after region-name="footer-odd" extent="12.5mm"/>
113
+ <fo:region-start region-name="left-region" extent="13mm"/>
114
+ <fo:region-end region-name="right-region" extent="12mm"/>
115
+ </fo:simple-page-master>
116
+
117
+ <!-- Page 4 and 5: (left top + right bottom, blue) -->
118
+ <fo:simple-page-master master-name="page4" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
119
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
120
+ <fo:region-before region-name="header-LT-blue" extent="14mm"/>
121
+ <fo:region-after region-name="footer-even" extent="12.5mm"/>
122
+ <fo:region-start region-name="left-region" extent="13mm"/>
123
+ <fo:region-end region-name="right-region" extent="12mm"/>
124
+ </fo:simple-page-master>
125
+ <fo:simple-page-master master-name="page5" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
126
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
127
+ <fo:region-before region-name="header-RB-blue" extent="14mm"/>
128
+ <fo:region-after region-name="footer-odd" extent="12.5mm"/>
129
+ <fo:region-start region-name="left-region" extent="13mm"/>
130
+ <fo:region-end region-name="right-region" extent="12mm"/>
131
+ </fo:simple-page-master>
132
+
133
+ <!-- Page 6 and 7: (left bottom + right top, orange) -->
134
+ <fo:simple-page-master master-name="page6" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
135
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
136
+ <fo:region-before region-name="header-LB-orange" extent="14mm"/>
137
+ <fo:region-after region-name="footer-even" extent="12.5mm"/>
138
+ <fo:region-start region-name="left-region" extent="13mm"/>
139
+ <fo:region-end region-name="right-region" extent="12mm"/>
140
+ </fo:simple-page-master>
141
+ <fo:simple-page-master master-name="page7" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
142
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
143
+ <fo:region-before region-name="header-RT-orange" extent="14mm"/>
144
+ <fo:region-after region-name="footer-odd" extent="12.5mm"/>
145
+ <fo:region-start region-name="left-region" extent="13mm"/>
146
+ <fo:region-end region-name="right-region" extent="12mm"/>
147
+ </fo:simple-page-master>
148
+
149
+ <!-- Page 8 and 9: (left top + right bottom, yellow) -->
150
+ <fo:simple-page-master master-name="page8" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
151
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
152
+ <fo:region-before region-name="header-LT-yellow" extent="14mm"/>
153
+ <fo:region-after region-name="footer-even" extent="12.5mm"/>
154
+ <fo:region-start region-name="left-region" extent="13mm"/>
155
+ <fo:region-end region-name="right-region" extent="12mm"/>
156
+ </fo:simple-page-master>
157
+ <fo:simple-page-master master-name="page9" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
158
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
159
+ <fo:region-before region-name="header-RB-yellow" extent="14mm"/>
160
+ <fo:region-after region-name="footer-odd" extent="12.5mm"/>
161
+ <fo:region-start region-name="left-region" extent="13mm"/>
162
+ <fo:region-end region-name="right-region" extent="12mm"/>
163
+ </fo:simple-page-master>
164
+
165
+ <fo:simple-page-master master-name="page10" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
166
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
167
+ <fo:region-before region-name="header-LB-blue" extent="14mm"/>
168
+ <fo:region-after region-name="footer-even" extent="12.5mm"/>
169
+ <fo:region-start region-name="left-region" extent="13mm"/>
170
+ <fo:region-end region-name="right-region" extent="12mm"/>
171
+ </fo:simple-page-master>
172
+ <fo:simple-page-master master-name="page11" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
173
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
174
+ <fo:region-before region-name="header-RT-blue" extent="14mm"/>
175
+ <fo:region-after region-name="footer-odd" extent="12.5mm"/>
176
+ <fo:region-start region-name="left-region" extent="13mm"/>
177
+ <fo:region-end region-name="right-region" extent="12mm"/>
178
+ </fo:simple-page-master>
179
+
180
+ <fo:simple-page-master master-name="page12" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
181
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
182
+ <fo:region-before region-name="header-LT-orange" extent="14mm"/>
183
+ <fo:region-after region-name="footer-even" extent="12.5mm"/>
184
+ <fo:region-start region-name="left-region" extent="13mm"/>
185
+ <fo:region-end region-name="right-region" extent="12mm"/>
186
+ </fo:simple-page-master>
187
+ <fo:simple-page-master master-name="page13" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
188
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
189
+ <fo:region-before region-name="header-RB-orange" extent="14mm"/>
190
+ <fo:region-after region-name="footer-odd" extent="12.5mm"/>
191
+ <fo:region-start region-name="left-region" extent="13mm"/>
192
+ <fo:region-end region-name="right-region" extent="12mm"/>
193
+ </fo:simple-page-master>
194
+
195
+ <fo:simple-page-master master-name="page14" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
196
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
197
+ <fo:region-before region-name="header-LB-yellow" extent="14mm"/>
198
+ <fo:region-after region-name="footer-even" extent="12.5mm"/>
199
+ <fo:region-start region-name="left-region" extent="13mm"/>
200
+ <fo:region-end region-name="right-region" extent="12mm"/>
201
+ </fo:simple-page-master>
202
+ <fo:simple-page-master master-name="page15" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
203
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
204
+ <fo:region-before region-name="header-RT-yellow" extent="14mm"/>
205
+ <fo:region-after region-name="footer-odd" extent="12.5mm"/>
206
+ <fo:region-start region-name="left-region" extent="13mm"/>
207
+ <fo:region-end region-name="right-region" extent="12mm"/>
208
+ </fo:simple-page-master>
209
+
210
+ <fo:simple-page-master master-name="page16" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
211
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
212
+ <fo:region-before region-name="header-LT-blue" extent="14mm"/>
213
+ <fo:region-after region-name="footer-even" extent="12.5mm"/>
214
+ <fo:region-start region-name="left-region" extent="13mm"/>
215
+ <fo:region-end region-name="right-region" extent="12mm"/>
216
+ </fo:simple-page-master>
217
+ <fo:simple-page-master master-name="page17" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
218
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
219
+ <fo:region-before region-name="header-RB-blue" extent="14mm"/>
220
+ <fo:region-after region-name="footer-odd" extent="12.5mm"/>
221
+ <fo:region-start region-name="left-region" extent="13mm"/>
222
+ <fo:region-end region-name="right-region" extent="12mm"/>
223
+ </fo:simple-page-master>
224
+
225
+ <fo:simple-page-master master-name="page18" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
226
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
227
+ <fo:region-before region-name="header-LB-orange" extent="14mm"/>
228
+ <fo:region-after region-name="footer-even" extent="12.5mm"/>
229
+ <fo:region-start region-name="left-region" extent="13mm"/>
230
+ <fo:region-end region-name="right-region" extent="12mm"/>
231
+ </fo:simple-page-master>
232
+ <fo:simple-page-master master-name="page19" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
233
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
234
+ <fo:region-before region-name="header-RT-orange" extent="14mm"/>
235
+ <fo:region-after region-name="footer-odd" extent="12.5mm"/>
236
+ <fo:region-start region-name="left-region" extent="13mm"/>
237
+ <fo:region-end region-name="right-region" extent="12mm"/>
238
+ </fo:simple-page-master>
239
+
240
+ <fo:simple-page-master master-name="page20" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
241
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
242
+ <fo:region-before region-name="header-LT-yellow" extent="14mm"/>
243
+ <fo:region-after region-name="footer-even" extent="12.5mm"/>
244
+ <fo:region-start region-name="left-region" extent="13mm"/>
245
+ <fo:region-end region-name="right-region" extent="12mm"/>
246
+ </fo:simple-page-master>
247
+ <fo:simple-page-master master-name="page21" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
248
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
249
+ <fo:region-before region-name="header-RB-yellow" extent="14mm"/>
250
+ <fo:region-after region-name="footer-odd" extent="12.5mm"/>
251
+ <fo:region-start region-name="left-region" extent="13mm"/>
252
+ <fo:region-end region-name="right-region" extent="12mm"/>
253
+ </fo:simple-page-master>
254
+
255
+ <fo:simple-page-master master-name="page22" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
256
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
257
+ <fo:region-before region-name="header-LB-blue" extent="14mm"/>
258
+ <fo:region-after region-name="footer-even" extent="12.5mm"/>
259
+ <fo:region-start region-name="left-region" extent="13mm"/>
260
+ <fo:region-end region-name="right-region" extent="12mm"/>
261
+ </fo:simple-page-master>
262
+ <fo:simple-page-master master-name="page23" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
263
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
264
+ <fo:region-before region-name="header-RT-blue" extent="14mm"/>
265
+ <fo:region-after region-name="footer-odd" extent="12.5mm"/>
266
+ <fo:region-start region-name="left-region" extent="13mm"/>
267
+ <fo:region-end region-name="right-region" extent="12mm"/>
268
+ </fo:simple-page-master>
269
+
270
+ <fo:simple-page-master master-name="page24" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
271
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
272
+ <fo:region-before region-name="header-LT-orange" extent="14mm"/>
273
+ <fo:region-after region-name="footer-even" extent="12.5mm"/>
274
+ <fo:region-start region-name="left-region" extent="13mm"/>
275
+ <fo:region-end region-name="right-region" extent="12mm"/>
276
+ </fo:simple-page-master>
277
+ <fo:simple-page-master master-name="page25" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
278
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
279
+ <fo:region-before region-name="header-RB-orange" extent="14mm"/>
280
+ <fo:region-after region-name="footer-odd" extent="12.5mm"/>
281
+ <fo:region-start region-name="left-region" extent="13mm"/>
282
+ <fo:region-end region-name="right-region" extent="12mm"/>
283
+ </fo:simple-page-master>
284
+ </xsl:variable>
285
+ <xsl:copy-of select="$pages"/>
286
+ <xsl:for-each select="xalan:nodeset($pages)/*">
287
+ <xsl:copy>
288
+ <xsl:copy-of select="@*"/>
289
+ <xsl:attribute name="master-name"><xsl:value-of select="@master-name"/>-landscape</xsl:attribute>
290
+ <xsl:attribute name="page-width"><xsl:value-of select="@page-height"/></xsl:attribute>
291
+ <xsl:attribute name="page-height"><xsl:value-of select="@page-width"/></xsl:attribute>
292
+ <xsl:copy-of select="node()"/>
293
+ </xsl:copy>
294
+ </xsl:for-each>
295
+
296
+ <fo:page-sequence-master master-name="document">
297
+ <fo:single-page-master-reference master-reference="first"/>
298
+ <xsl:call-template name="insert_single-page-master-reference">
299
+ <xsl:with-param name="initial">true</xsl:with-param>
300
+ </xsl:call-template>
301
+ <fo:repeatable-page-master-reference master-reference="page2"/>
302
+ </fo:page-sequence-master>
303
+
304
+ <fo:page-sequence-master master-name="document-landscape">
305
+ <xsl:call-template name="insert_single-page-master-reference">
306
+ <xsl:with-param name="initial">true</xsl:with-param>
307
+ <xsl:with-param name="landscape_sfx">-landscape</xsl:with-param>
308
+ </xsl:call-template>
309
+ <fo:repeatable-page-master-reference master-reference="page2-landscape"/>
310
+ </fo:page-sequence-master>
311
+
312
+ </fo:layout-master-set>
313
+ </xsl:template> <!-- END: layout-master-set -->
314
+
58
315
  <xsl:template match="/">
59
316
  <fo:root xml:lang="{$lang}">
60
317
  <xsl:variable name="root-style">
@@ -63,260 +320,8 @@
63
320
  <xsl:call-template name="insertRootStyle">
64
321
  <xsl:with-param name="root-style" select="$root-style"/>
65
322
  </xsl:call-template>
66
- <fo:layout-master-set>
67
-
68
- <!-- Cover page -->
69
- <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
70
- <fo:region-body margin-top="176mm" margin-bottom="11.5mm" margin-left="13mm" margin-right="78mm"/>
71
- <fo:region-before region-name="cover-page-header" extent="176mm"/>
72
- <fo:region-after region-name="cover-page-footer" extent="11.5mm"/>
73
- <fo:region-start extent="13mm"/>
74
- <fo:region-end extent="78mm"/>
75
- </fo:simple-page-master>
76
-
77
- <!-- ToC -->
78
- <fo:simple-page-master master-name="toc-odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
79
- <fo:region-body margin-top="14mm" margin-bottom="26.5mm" margin-left="61mm" margin-right="12mm"/>
80
- <fo:region-before region-name="header-toc-odd" extent="14mm"/>
81
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
82
- <fo:region-start region-name="left-region" extent="13mm"/>
83
- <fo:region-end region-name="right-region" extent="12mm"/>
84
- </fo:simple-page-master>
85
- <fo:simple-page-master master-name="toc-even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
86
- <fo:region-body margin-top="14mm" margin-bottom="85mm" margin-left="61mm" margin-right="12mm"/>
87
- <fo:region-before region-name="header-toc-even" extent="14mm"/>
88
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
89
- <fo:region-start region-name="left-region" extent="13mm"/>
90
- <fo:region-end region-name="right-region" extent="12mm"/>
91
- </fo:simple-page-master>
92
- <fo:page-sequence-master master-name="toc">
93
- <fo:repeatable-page-master-alternatives>
94
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="toc-odd"/>
95
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="toc-even"/>
96
- </fo:repeatable-page-master-alternatives>
97
- </fo:page-sequence-master>
98
-
99
- <fo:simple-page-master master-name="first" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
100
- <fo:region-body margin-top="14mm" margin-bottom="85mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
101
- <fo:region-before region-name="header-LB-yellow" extent="14mm"/>
102
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
103
- <fo:region-start region-name="left-region" extent="13mm"/>
104
- <fo:region-end region-name="right-region" extent="12mm"/>
105
- </fo:simple-page-master>
106
-
107
- <xsl:variable name="pages">
108
- <!-- Page 2 and 3: (left bottom + right top, yellow) -->
109
- <fo:simple-page-master master-name="page2" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
110
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
111
- <fo:region-before region-name="header-LB-yellow" extent="14mm"/>
112
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
113
- <fo:region-start region-name="left-region" extent="13mm"/>
114
- <fo:region-end region-name="right-region" extent="12mm"/>
115
- </fo:simple-page-master>
116
- <fo:simple-page-master master-name="page3" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
117
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
118
- <fo:region-before region-name="header-RT-yellow" extent="14mm"/>
119
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
120
- <fo:region-start region-name="left-region" extent="13mm"/>
121
- <fo:region-end region-name="right-region" extent="12mm"/>
122
- </fo:simple-page-master>
123
-
124
- <!-- Page 4 and 5: (left top + right bottom, blue) -->
125
- <fo:simple-page-master master-name="page4" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
126
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
127
- <fo:region-before region-name="header-LT-blue" extent="14mm"/>
128
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
129
- <fo:region-start region-name="left-region" extent="13mm"/>
130
- <fo:region-end region-name="right-region" extent="12mm"/>
131
- </fo:simple-page-master>
132
- <fo:simple-page-master master-name="page5" page-width="{$pageWidth}mm" page-height="{$pageHeight}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-RB-blue" extent="14mm"/>
135
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
136
- <fo:region-start region-name="left-region" extent="13mm"/>
137
- <fo:region-end region-name="right-region" extent="12mm"/>
138
- </fo:simple-page-master>
139
-
140
- <!-- Page 6 and 7: (left bottom + right top, orange) -->
141
- <fo:simple-page-master master-name="page6" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
142
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
143
- <fo:region-before region-name="header-LB-orange" extent="14mm"/>
144
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
145
- <fo:region-start region-name="left-region" extent="13mm"/>
146
- <fo:region-end region-name="right-region" extent="12mm"/>
147
- </fo:simple-page-master>
148
- <fo:simple-page-master master-name="page7" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
149
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
150
- <fo:region-before region-name="header-RT-orange" extent="14mm"/>
151
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
152
- <fo:region-start region-name="left-region" extent="13mm"/>
153
- <fo:region-end region-name="right-region" extent="12mm"/>
154
- </fo:simple-page-master>
155
-
156
- <!-- Page 8 and 9: (left top + right bottom, yellow) -->
157
- <fo:simple-page-master master-name="page8" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
158
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
159
- <fo:region-before region-name="header-LT-yellow" extent="14mm"/>
160
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
161
- <fo:region-start region-name="left-region" extent="13mm"/>
162
- <fo:region-end region-name="right-region" extent="12mm"/>
163
- </fo:simple-page-master>
164
- <fo:simple-page-master master-name="page9" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
165
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
166
- <fo:region-before region-name="header-RB-yellow" extent="14mm"/>
167
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
168
- <fo:region-start region-name="left-region" extent="13mm"/>
169
- <fo:region-end region-name="right-region" extent="12mm"/>
170
- </fo:simple-page-master>
171
-
172
- <fo:simple-page-master master-name="page10" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
173
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
174
- <fo:region-before region-name="header-LB-blue" extent="14mm"/>
175
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
176
- <fo:region-start region-name="left-region" extent="13mm"/>
177
- <fo:region-end region-name="right-region" extent="12mm"/>
178
- </fo:simple-page-master>
179
- <fo:simple-page-master master-name="page11" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
180
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
181
- <fo:region-before region-name="header-RT-blue" extent="14mm"/>
182
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
183
- <fo:region-start region-name="left-region" extent="13mm"/>
184
- <fo:region-end region-name="right-region" extent="12mm"/>
185
- </fo:simple-page-master>
186
-
187
- <fo:simple-page-master master-name="page12" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
188
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
189
- <fo:region-before region-name="header-LT-orange" extent="14mm"/>
190
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
191
- <fo:region-start region-name="left-region" extent="13mm"/>
192
- <fo:region-end region-name="right-region" extent="12mm"/>
193
- </fo:simple-page-master>
194
- <fo:simple-page-master master-name="page13" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
195
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
196
- <fo:region-before region-name="header-RB-orange" extent="14mm"/>
197
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
198
- <fo:region-start region-name="left-region" extent="13mm"/>
199
- <fo:region-end region-name="right-region" extent="12mm"/>
200
- </fo:simple-page-master>
201
-
202
- <fo:simple-page-master master-name="page14" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
203
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
204
- <fo:region-before region-name="header-LB-yellow" extent="14mm"/>
205
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
206
- <fo:region-start region-name="left-region" extent="13mm"/>
207
- <fo:region-end region-name="right-region" extent="12mm"/>
208
- </fo:simple-page-master>
209
- <fo:simple-page-master master-name="page15" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
210
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
211
- <fo:region-before region-name="header-RT-yellow" extent="14mm"/>
212
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
213
- <fo:region-start region-name="left-region" extent="13mm"/>
214
- <fo:region-end region-name="right-region" extent="12mm"/>
215
- </fo:simple-page-master>
216
-
217
- <fo:simple-page-master master-name="page16" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
218
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
219
- <fo:region-before region-name="header-LT-blue" extent="14mm"/>
220
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
221
- <fo:region-start region-name="left-region" extent="13mm"/>
222
- <fo:region-end region-name="right-region" extent="12mm"/>
223
- </fo:simple-page-master>
224
- <fo:simple-page-master master-name="page17" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
225
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
226
- <fo:region-before region-name="header-RB-blue" extent="14mm"/>
227
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
228
- <fo:region-start region-name="left-region" extent="13mm"/>
229
- <fo:region-end region-name="right-region" extent="12mm"/>
230
- </fo:simple-page-master>
231
-
232
- <fo:simple-page-master master-name="page18" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
233
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
234
- <fo:region-before region-name="header-LB-orange" extent="14mm"/>
235
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
236
- <fo:region-start region-name="left-region" extent="13mm"/>
237
- <fo:region-end region-name="right-region" extent="12mm"/>
238
- </fo:simple-page-master>
239
- <fo:simple-page-master master-name="page19" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
240
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
241
- <fo:region-before region-name="header-RT-orange" extent="14mm"/>
242
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
243
- <fo:region-start region-name="left-region" extent="13mm"/>
244
- <fo:region-end region-name="right-region" extent="12mm"/>
245
- </fo:simple-page-master>
246
-
247
- <fo:simple-page-master master-name="page20" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
248
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
249
- <fo:region-before region-name="header-LT-yellow" extent="14mm"/>
250
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
251
- <fo:region-start region-name="left-region" extent="13mm"/>
252
- <fo:region-end region-name="right-region" extent="12mm"/>
253
- </fo:simple-page-master>
254
- <fo:simple-page-master master-name="page21" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
255
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
256
- <fo:region-before region-name="header-RB-yellow" extent="14mm"/>
257
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
258
- <fo:region-start region-name="left-region" extent="13mm"/>
259
- <fo:region-end region-name="right-region" extent="12mm"/>
260
- </fo:simple-page-master>
261
-
262
- <fo:simple-page-master master-name="page22" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
263
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
264
- <fo:region-before region-name="header-LB-blue" extent="14mm"/>
265
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
266
- <fo:region-start region-name="left-region" extent="13mm"/>
267
- <fo:region-end region-name="right-region" extent="12mm"/>
268
- </fo:simple-page-master>
269
- <fo:simple-page-master master-name="page23" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
270
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
271
- <fo:region-before region-name="header-RT-blue" extent="14mm"/>
272
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
273
- <fo:region-start region-name="left-region" extent="13mm"/>
274
- <fo:region-end region-name="right-region" extent="12mm"/>
275
- </fo:simple-page-master>
276
-
277
- <fo:simple-page-master master-name="page24" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
278
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
279
- <fo:region-before region-name="header-LT-orange" extent="14mm"/>
280
- <fo:region-after region-name="footer-even" extent="12.5mm"/>
281
- <fo:region-start region-name="left-region" extent="13mm"/>
282
- <fo:region-end region-name="right-region" extent="12mm"/>
283
- </fo:simple-page-master>
284
- <fo:simple-page-master master-name="page25" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
285
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
286
- <fo:region-before region-name="header-RB-orange" extent="14mm"/>
287
- <fo:region-after region-name="footer-odd" extent="12.5mm"/>
288
- <fo:region-start region-name="left-region" extent="13mm"/>
289
- <fo:region-end region-name="right-region" extent="12mm"/>
290
- </fo:simple-page-master>
291
- </xsl:variable>
292
- <xsl:copy-of select="$pages"/>
293
- <xsl:for-each select="xalan:nodeset($pages)/*">
294
- <xsl:copy>
295
- <xsl:copy-of select="@*"/>
296
- <xsl:attribute name="master-name"><xsl:value-of select="@master-name"/>-landscape</xsl:attribute>
297
- <xsl:attribute name="page-width"><xsl:value-of select="@page-height"/></xsl:attribute>
298
- <xsl:attribute name="page-height"><xsl:value-of select="@page-width"/></xsl:attribute>
299
- <xsl:copy-of select="node()"/>
300
- </xsl:copy>
301
- </xsl:for-each>
302
323
 
303
- <fo:page-sequence-master master-name="document">
304
- <fo:single-page-master-reference master-reference="first"/>
305
- <xsl:call-template name="insert_single-page-master-reference">
306
- <xsl:with-param name="initial">true</xsl:with-param>
307
- </xsl:call-template>
308
- <fo:repeatable-page-master-reference master-reference="page2"/>
309
- </fo:page-sequence-master>
310
-
311
- <fo:page-sequence-master master-name="document-landscape">
312
- <xsl:call-template name="insert_single-page-master-reference">
313
- <xsl:with-param name="initial">true</xsl:with-param>
314
- <xsl:with-param name="landscape_sfx">-landscape</xsl:with-param>
315
- </xsl:call-template>
316
- <fo:repeatable-page-master-reference master-reference="page2-landscape"/>
317
- </fo:page-sequence-master>
318
-
319
- </fo:layout-master-set>
324
+ <xsl:call-template name="layout-master-set"/>
320
325
 
321
326
  <fo:declarations>
322
327
  <xsl:call-template name="addPDFUAmeta"/>
@@ -326,101 +331,7 @@
326
331
  <xsl:with-param name="contents" select="$contents"/>
327
332
  </xsl:call-template>
328
333
 
329
- <!-- Cover Page -->
330
- <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
331
-
332
- <fo:flow flow-name="xsl-region-body" color="black">
333
- <!-- background image -->
334
- <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
335
- <fo:block>
336
- <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/> -->
337
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" height="{$pageHeight}mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
338
- </fo:block>
339
- </fo:block-container>
340
-
341
- <!-- Ribose logo -->
342
- <fo:block-container absolute-position="fixed" left="171mm" top="{$pageHeight - 33.4}mm" height="30mm" width="40mm" id="__internal_layout__logo_{generate-id()}"> <!-- top="246mm" -->
343
- <fo:block>
344
- <fo:instream-foreign-object content-width="32mm" fox:alt-text="Ribose Logo">
345
- <xsl:copy-of select="$Ribose-Logo"/>
346
- </fo:instream-foreign-object>
347
- </fo:block>
348
- </fo:block-container>
349
-
350
- <fo:block-container absolute-position="fixed" left="0mm" top="{$pageHeight - 52.4}mm" height="41mm" display-align="after"> <!-- top="227mm" -->
351
- <fo:block font-size="10pt" line-height="1.4">
352
- <fo:table table-layout="fixed" width="100%">
353
- <fo:table-column column-width="proportional-column-width(13)"/>
354
- <fo:table-column column-width="proportional-column-width(38)"/>
355
- <fo:table-column column-width="proportional-column-width(90)"/>
356
- <fo:table-column column-width="proportional-column-width(61)"/>
357
- <fo:table-column column-width="proportional-column-width(12)"/>
358
- <fo:table-body>
359
- <fo:table-row>
360
- <fo:table-cell><fo:block/></fo:table-cell>
361
- <fo:table-cell display-align="before" border-right="0.5pt solid black" padding-top="1.5mm" padding-right="5mm">
362
- <!-- Author's list -->
363
- <fo:block>
364
- <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
365
- <fo:block>
366
- <xsl:apply-templates/>
367
- </fo:block>
368
- </xsl:for-each>
369
- </fo:block>
370
- </fo:table-cell>
371
- <fo:table-cell display-align="before" padding-top="1.5mm" padding-left="8mm">
372
- <fo:block>
373
- <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:ext/mn:security"/>
374
- <fo:block>
375
- <xsl:call-template name="convertDate">
376
- <xsl:with-param name="date" select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']/mn:on"/>
377
- <xsl:with-param name="format" select="'Month DD, YYYY'"/>
378
- </xsl:call-template>
379
- </fo:block>
380
- <fo:block><xsl:value-of select="$docnumber_version"/></fo:block>
381
- <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/>
382
- <fo:block>
383
- <xsl:text>© </xsl:text>
384
- <xsl:value-of select="$copyright_year"/>
385
- <xsl:text> </xsl:text>
386
- <xsl:variable name="publisher" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='publisher']/mn:organization/mn:name"/>
387
- <xsl:value-of select="$publisher"/>
388
- <xsl:if test="substring($publisher, string-length($publisher)) != '.'"><xsl:text>.</xsl:text></xsl:if>
389
- <xsl:text> </xsl:text>
390
- <xsl:call-template name="getLocalizedString">
391
- <xsl:with-param name="key">all_rights_reserved</xsl:with-param>
392
- </xsl:call-template>
393
- </fo:block>
394
- </fo:block>
395
- </fo:table-cell>
396
- <fo:table-cell display-align="after">
397
- <fo:block text-align="right">
398
- <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Ribose-Logo))}" width="32mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Ribose Logo"/> -->
399
- </fo:block>
400
- </fo:table-cell>
401
- <fo:table-cell><fo:block/></fo:table-cell>
402
- </fo:table-row>
403
- </fo:table-body>
404
- </fo:table>
405
- </fo:block>
406
- </fo:block-container>
407
-
408
- <!-- title and version -->
409
- <fo:block-container margin-top="{$pageHeight - 279.4}mm" height="60mm" display-align="center">
410
- <xsl:variable name="title" select="/mn:metanorma/mn:bibdata/mn:title[@language = $lang]"/>
411
- <xsl:if test="string-length($title) &gt; 80">
412
- <xsl:attribute name="margin-right">-30mm</xsl:attribute>
413
- </xsl:if>
414
- <fo:block font-size="27pt" font-weight="bold" role="H1">
415
- <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@language = $lang]" mode="cover_page"/>
416
- </fo:block>
417
- <fo:block space-before="9pt" font-size="16.8pt" font-weight="600">
418
- <xsl:value-of select="$docnumber_version"/>
419
- </fo:block>
420
- </fo:block-container>
421
- </fo:flow>
422
- </fo:page-sequence>
423
- <!-- END Cover page -->
334
+ <xsl:call-template name="cover-page"/>
424
335
 
425
336
  <xsl:variable name="updated_xml">
426
337
  <xsl:call-template name="updateXML"/>
@@ -505,6 +416,103 @@
505
416
  </fo:root>
506
417
  </xsl:template>
507
418
 
419
+ <xsl:template name="cover-page">
420
+ <!-- Cover Page -->
421
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
422
+
423
+ <fo:flow flow-name="xsl-region-body" color="black">
424
+ <!-- background image -->
425
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
426
+ <fo:block>
427
+ <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/> -->
428
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" height="{$pageHeight}mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
429
+ </fo:block>
430
+ </fo:block-container>
431
+
432
+ <!-- Ribose logo -->
433
+ <fo:block-container absolute-position="fixed" left="171mm" top="{$pageHeight - 33.4}mm" height="30mm" width="40mm" id="__internal_layout__logo_{generate-id()}"> <!-- top="246mm" -->
434
+ <fo:block>
435
+ <fo:instream-foreign-object content-width="32mm" fox:alt-text="Ribose Logo">
436
+ <xsl:copy-of select="$Ribose-Logo"/>
437
+ </fo:instream-foreign-object>
438
+ </fo:block>
439
+ </fo:block-container>
440
+
441
+ <fo:block-container absolute-position="fixed" left="0mm" top="{$pageHeight - 52.4}mm" height="41mm" display-align="after"> <!-- top="227mm" -->
442
+ <fo:block font-size="10pt" line-height="1.4">
443
+ <fo:table table-layout="fixed" width="100%">
444
+ <fo:table-column column-width="proportional-column-width(13)"/>
445
+ <fo:table-column column-width="proportional-column-width(38)"/>
446
+ <fo:table-column column-width="proportional-column-width(90)"/>
447
+ <fo:table-column column-width="proportional-column-width(61)"/>
448
+ <fo:table-column column-width="proportional-column-width(12)"/>
449
+ <fo:table-body>
450
+ <fo:table-row>
451
+ <fo:table-cell><fo:block/></fo:table-cell>
452
+ <fo:table-cell display-align="before" border-right="0.5pt solid black" padding-top="1.5mm" padding-right="5mm">
453
+ <!-- Author's list -->
454
+ <fo:block>
455
+ <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
456
+ <fo:block>
457
+ <xsl:apply-templates/>
458
+ </fo:block>
459
+ </xsl:for-each>
460
+ </fo:block>
461
+ </fo:table-cell>
462
+ <fo:table-cell display-align="before" padding-top="1.5mm" padding-left="8mm">
463
+ <fo:block>
464
+ <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:ext/mn:security"/>
465
+ <fo:block>
466
+ <xsl:call-template name="convertDate">
467
+ <xsl:with-param name="date" select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']/mn:on"/>
468
+ <xsl:with-param name="format" select="'Month DD, YYYY'"/>
469
+ </xsl:call-template>
470
+ </fo:block>
471
+ <fo:block><xsl:value-of select="$docnumber_version"/></fo:block>
472
+ <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/>
473
+ <fo:block>
474
+ <xsl:text>© </xsl:text>
475
+ <xsl:value-of select="$copyright_year"/>
476
+ <xsl:text> </xsl:text>
477
+ <xsl:variable name="publisher" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='publisher']/mn:organization/mn:name"/>
478
+ <xsl:value-of select="$publisher"/>
479
+ <xsl:if test="substring($publisher, string-length($publisher)) != '.'"><xsl:text>.</xsl:text></xsl:if>
480
+ <xsl:text> </xsl:text>
481
+ <xsl:call-template name="getLocalizedString">
482
+ <xsl:with-param name="key">all_rights_reserved</xsl:with-param>
483
+ </xsl:call-template>
484
+ </fo:block>
485
+ </fo:block>
486
+ </fo:table-cell>
487
+ <fo:table-cell display-align="after">
488
+ <fo:block text-align="right">
489
+ <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Ribose-Logo))}" width="32mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Ribose Logo"/> -->
490
+ </fo:block>
491
+ </fo:table-cell>
492
+ <fo:table-cell><fo:block/></fo:table-cell>
493
+ </fo:table-row>
494
+ </fo:table-body>
495
+ </fo:table>
496
+ </fo:block>
497
+ </fo:block-container>
498
+
499
+ <!-- title and version -->
500
+ <fo:block-container margin-top="{$pageHeight - 279.4}mm" height="60mm" display-align="center">
501
+ <xsl:variable name="title" select="/mn:metanorma/mn:bibdata/mn:title[@language = $lang]"/>
502
+ <xsl:if test="string-length($title) &gt; 80">
503
+ <xsl:attribute name="margin-right">-30mm</xsl:attribute>
504
+ </xsl:if>
505
+ <fo:block font-size="27pt" font-weight="bold" role="H1">
506
+ <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@language = $lang]" mode="cover_page"/>
507
+ </fo:block>
508
+ <fo:block space-before="9pt" font-size="16.8pt" font-weight="600">
509
+ <xsl:value-of select="$docnumber_version"/>
510
+ </fo:block>
511
+ </fo:block-container>
512
+ </fo:flow>
513
+ </fo:page-sequence>
514
+ </xsl:template> <!-- END: cover-page -->
515
+
508
516
  <xsl:template name="processPrefaceAndMainSectionsRibose_items">
509
517
  <xsl:variable name="updated_xml_step_move_pagebreak">
510
518
 
@@ -600,7 +608,7 @@
600
608
  <fo:block role="TOC">
601
609
  <xsl:apply-templates/>
602
610
 
603
- <xsl:if test="count(*) = 1 and mn:title"> <!-- if there isn't user ToC -->
611
+ <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
604
612
 
605
613
  <xsl:if test="$contents//mnx:item[@display = 'true']">
606
614
 
@@ -667,7 +675,7 @@
667
675
  </fo:block>
668
676
  </xsl:template>
669
677
 
670
- <xsl:template match="mn:preface/mn:clause[@type = 'toc']/mn:title" priority="3">
678
+ <xsl:template match="mn:preface/mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
671
679
  <fo:block font-size="27pt" font-weight="bold" color="black" margin-left="-15mm" margin-bottom="13mm" role="H1">
672
680
  <!-- <xsl:call-template name="getLocalizedString">
673
681
  <xsl:with-param name="key">table_of_contents</xsl:with-param>
@@ -779,7 +787,7 @@
779
787
  </fo:block>
780
788
  </xsl:template> -->
781
789
 
782
- <xsl:template match="mn:title" name="title">
790
+ <xsl:template match="mn:fmt-title" name="title">
783
791
 
784
792
  <xsl:variable name="level">
785
793
  <xsl:call-template name="getLevel"/>
@@ -906,7 +914,7 @@
906
914
  <xsl:variable name="element-name">
907
915
  <xsl:choose>
908
916
  <xsl:when test="$inline = 'true'">fo:inline</xsl:when>
909
- <xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
917
+ <xsl:when test="../@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
910
918
  <xsl:when test="parent::mn:admonition">fo:inline</xsl:when>
911
919
  <xsl:otherwise>fo:block</xsl:otherwise>
912
920
  </xsl:choose>
@@ -978,14 +986,14 @@
978
986
  <fo:list-item-label><fo:block/></fo:list-item-label>
979
987
  <fo:list-item-body>
980
988
  <fo:block>
981
- <xsl:apply-templates select="mn:name"/>
982
- <xsl:apply-templates select="node()[not(parent::mn:name)]"/>
989
+ <xsl:apply-templates select="mn:fmt-name"/>
990
+ <xsl:apply-templates select="node()[not(parent::mn:fmt-name)]"/>
983
991
  </fo:block>
984
992
  </fo:list-item-body>
985
993
  </fo:list-item>
986
994
  </xsl:template>
987
995
 
988
- <xsl:template match="mn:preferred | mn:deprecates | mn:admitted" priority="2">
996
+ <xsl:template match="mn:fmt-preferred | mn:fmt-deprecates | mn:fmt-admitted" priority="2">
989
997
  <xsl:variable name="level">
990
998
  <xsl:call-template name="getLevel"/>
991
999
  </xsl:variable>
@@ -999,23 +1007,23 @@
999
1007
  <xsl:call-template name="getLevelTermName"/>
1000
1008
  </xsl:variable>
1001
1009
  <fo:block font-weight="bold" color="black" font-size="{$font-size}" keep-with-next="always" role="H{$levelTerm}"> <!-- 600 - semibold -->
1002
- <xsl:if test="preceding-sibling::*[1][self::mn:name]">
1010
+ <xsl:if test="preceding-sibling::*[1][self::mn:fmt-name]">
1003
1011
  <xsl:attribute name="space-before">11mm</xsl:attribute>
1004
1012
  <fo:inline padding-right="1mm">
1005
- <xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
1013
+ <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
1006
1014
  </fo:inline>
1007
1015
  </xsl:if>
1008
1016
 
1009
- <fo:inline padding-right="4mm"><xsl:if test="self::mn:preferred"><xsl:call-template name="setStyle_preferred"/></xsl:if><xsl:apply-templates/></fo:inline>
1017
+ <fo:inline padding-right="4mm"><xsl:if test="self::mn:fmt-preferred"><xsl:call-template name="setStyle_preferred"/></xsl:if><xsl:apply-templates/></fo:inline>
1010
1018
 
1011
1019
  <xsl:variable name="term_kind">
1012
1020
  <xsl:choose>
1013
- <xsl:when test="self::mn:deprecates">
1021
+ <xsl:when test="self::mn:fmt-deprecates">
1014
1022
  <xsl:call-template name="getLocalizedString">
1015
1023
  <xsl:with-param name="key">deprecated</xsl:with-param>
1016
1024
  </xsl:call-template>
1017
1025
  </xsl:when>
1018
- <xsl:otherwise><xsl:value-of select="local-name()"/></xsl:otherwise>
1026
+ <xsl:otherwise><xsl:value-of select="substring-after(local-name(), 'fmt-')"/></xsl:otherwise>
1019
1027
  </xsl:choose>
1020
1028
  </xsl:variable>
1021
1029
  <xsl:variable name="kind" select="local-name()"/>
@@ -1023,9 +1031,9 @@
1023
1031
  <fo:inline-container text-align="center" width="29mm">
1024
1032
  <xsl:attribute name="background-color">
1025
1033
  <xsl:choose>
1026
- <xsl:when test="$kind = 'preferred'">rgb(255, 240, 198)</xsl:when>
1027
- <xsl:when test="$kind = 'deprecates'">rgb(252, 221, 194)</xsl:when>
1028
- <xsl:when test="$kind = 'admitted'">rgb(208, 223, 239)</xsl:when>
1034
+ <xsl:when test="$kind = 'fmt-preferred'">rgb(255, 240, 198)</xsl:when>
1035
+ <xsl:when test="$kind = 'fmt-deprecates'">rgb(252, 221, 194)</xsl:when>
1036
+ <xsl:when test="$kind = 'fmt-admitted'">rgb(208, 223, 239)</xsl:when>
1029
1037
  </xsl:choose>
1030
1038
  </xsl:attribute>
1031
1039
  <fo:block padding-top="1mm" padding-bottom="0.5mm">
@@ -1052,7 +1060,7 @@
1052
1060
  <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
1053
1061
  <xsl:attribute name="color">black</xsl:attribute>
1054
1062
  <xsl:attribute name="line-height">125%</xsl:attribute>
1055
- <xsl:apply-templates select="mn:title/node()"/>
1063
+ <xsl:apply-templates select="mn:fmt-title/node()"/>
1056
1064
  </fo:block>
1057
1065
  </fo:table-cell>
1058
1066
  </fo:table-row>
@@ -1061,7 +1069,7 @@
1061
1069
  <fo:table-row>
1062
1070
  <fo:table-cell text-align="left">
1063
1071
  <fo:block>
1064
- <xsl:apply-templates select="node()[not(self::mn:title)]"/>
1072
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
1065
1073
  </fo:block>
1066
1074
  </fo:table-cell>
1067
1075
  </fo:table-row>
@@ -1071,7 +1079,7 @@
1071
1079
  </fo:block>
1072
1080
  </xsl:template>
1073
1081
 
1074
- <xsl:template match="*[self::mn:table or self::mn:figure or self::mn:sourcecode]/mn:name/node()[1][self::text()]" priority="2">
1082
+ <xsl:template match="*[self::mn:table or self::mn:figure or self::mn:sourcecode]/mn:fmt-name/node()[1][self::text()]" priority="2">
1075
1083
  <xsl:choose>
1076
1084
  <xsl:when test="contains(., '—')">
1077
1085
  <xsl:variable name="name_number" select="normalize-space(translate(substring-before(., '—'), ' ', ' '))"/>
@@ -1458,10 +1466,6 @@
1458
1466
  <title-part lang="ru">
1459
1467
  </title-part>
1460
1468
  <title-part lang="zh">第 # 部分:</title-part>
1461
-
1462
- <title-subpart lang="en">Sub-part #</title-subpart>
1463
- <title-subpart lang="fr">Partie de sub #</title-subpart>
1464
-
1465
1469
  </xsl:variable>
1466
1470
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
1467
1471
 
@@ -1916,7 +1920,8 @@
1916
1920
  <xsl:template match="mn:stem" mode="update_xml_step1"/>
1917
1921
 
1918
1922
  <xsl:template match="mn:fmt-stem" mode="update_xml_step1">
1919
- <xsl:element name="stem" namespace="{$namespace_full}">
1923
+ <!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
1924
+ <xsl:copy>
1920
1925
  <xsl:copy-of select="@*"/>
1921
1926
  <xsl:choose>
1922
1927
  <xsl:when test="mn:semx and count(node()) = 1">
@@ -1940,7 +1945,8 @@
1940
1945
  </xsl:choose>
1941
1946
  </xsl:otherwise>
1942
1947
  </xsl:choose>
1943
- </xsl:element>
1948
+ </xsl:copy>
1949
+ <!-- </xsl:element> -->
1944
1950
  </xsl:template>
1945
1951
 
1946
1952
  <xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
@@ -2102,12 +2108,14 @@
2102
2108
  </xsl:template>
2103
2109
 
2104
2110
  <xsl:template match="mn:fmt-title" mode="update_xml_step1">
2105
- <xsl:element name="title" namespace="{$namespace_full}">
2111
+ <!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
2112
+ <xsl:copy>
2106
2113
  <xsl:copy-of select="@*"/>
2107
2114
  <xsl:call-template name="addNamedDestinationAttribute"/>
2108
2115
 
2109
2116
  <xsl:apply-templates mode="update_xml_step1"/>
2110
- </xsl:element>
2117
+ </xsl:copy>
2118
+ <!-- </xsl:element> -->
2111
2119
  </xsl:template>
2112
2120
 
2113
2121
  <xsl:template name="addNamedDestinationAttribute">
@@ -2119,12 +2127,14 @@
2119
2127
  <xsl:apply-templates mode="update_xml_step1"/>
2120
2128
  </xsl:when>
2121
2129
  <xsl:otherwise>
2122
- <xsl:element name="name" namespace="{$namespace_full}">
2130
+ <!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
2131
+ <xsl:copy>
2123
2132
  <xsl:copy-of select="@*"/>
2124
2133
  <xsl:call-template name="addNamedDestinationAttribute"/>
2125
2134
 
2126
2135
  <xsl:apply-templates mode="update_xml_step1"/>
2127
- </xsl:element>
2136
+ </xsl:copy>
2137
+ <!-- </xsl:element> -->
2128
2138
  </xsl:otherwise>
2129
2139
  </xsl:choose>
2130
2140
  </xsl:template>
@@ -2139,7 +2149,7 @@
2139
2149
  <xsl:apply-templates mode="update_xml_step1"/>
2140
2150
  </xsl:template>
2141
2151
  <xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="update_xml_step1">
2142
- <xsl:element name="preferred" namespace="{$namespace_full}">
2152
+ <xsl:element name="fmt-preferred" namespace="{$namespace_full}">
2143
2153
  <xsl:copy-of select="@*"/>
2144
2154
  <xsl:apply-templates mode="update_xml_step1"/>
2145
2155
  </xsl:element>
@@ -2149,7 +2159,7 @@
2149
2159
  <xsl:apply-templates mode="update_xml_step1"/>
2150
2160
  </xsl:template>
2151
2161
  <xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="update_xml_step1">
2152
- <xsl:element name="admitted" namespace="{$namespace_full}">
2162
+ <xsl:element name="fmt-admitted" namespace="{$namespace_full}">
2153
2163
  <xsl:copy-of select="@*"/>
2154
2164
  <xsl:apply-templates mode="update_xml_step1"/>
2155
2165
  </xsl:element>
@@ -2159,32 +2169,32 @@
2159
2169
  <xsl:apply-templates mode="update_xml_step1"/>
2160
2170
  </xsl:template>
2161
2171
  <xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="update_xml_step1">
2162
- <xsl:element name="deprecates" namespace="{$namespace_full}">
2172
+ <xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
2163
2173
  <xsl:copy-of select="@*"/>
2164
2174
  <xsl:apply-templates mode="update_xml_step1"/>
2165
2175
  </xsl:element>
2166
2176
  </xsl:template>
2167
2177
 
2168
- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
2178
+ <!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
2169
2179
  <xsl:element name="definition" namespace="{$namespace_full}">
2170
2180
  <xsl:copy-of select="@*"/>
2171
2181
  <xsl:apply-templates mode="update_xml_step1"/>
2172
2182
  </xsl:element>
2173
2183
  </xsl:template>
2174
-
2184
+
2175
2185
  <xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
2176
2186
  <xsl:element name="termsource" namespace="{$namespace_full}">
2177
2187
  <xsl:copy-of select="@*"/>
2178
2188
  <xsl:apply-templates mode="update_xml_step1"/>
2179
2189
  </xsl:element>
2180
2190
  </xsl:template>
2181
-
2191
+
2182
2192
  <xsl:template match="mn:fmt-source" mode="update_xml_step1">
2183
2193
  <xsl:element name="source" namespace="{$namespace_full}">
2184
2194
  <xsl:copy-of select="@*"/>
2185
2195
  <xsl:apply-templates mode="update_xml_step1"/>
2186
2196
  </xsl:element>
2187
- </xsl:template>
2197
+ </xsl:template> -->
2188
2198
 
2189
2199
  <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">
2190
2200
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -2207,12 +2217,12 @@
2207
2217
  </xsl:template>
2208
2218
 
2209
2219
  <xsl:template match="mn:identifier" mode="update_xml_step1"/>
2210
- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
2220
+ <!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
2211
2221
  <xsl:element name="identifier" namespace="{$namespace_full}">
2212
2222
  <xsl:copy-of select="@*"/>
2213
2223
  <xsl:apply-templates mode="update_xml_step1"/>
2214
2224
  </xsl:element>
2215
- </xsl:template>
2225
+ </xsl:template> -->
2216
2226
 
2217
2227
  <xsl:template match="mn:concept" mode="update_xml_step1"/>
2218
2228
 
@@ -2222,51 +2232,53 @@
2222
2232
 
2223
2233
  <xsl:template match="mn:eref" mode="update_xml_step1"/>
2224
2234
 
2225
- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
2235
+ <!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
2226
2236
  <xsl:element name="eref" namespace="{$namespace_full}">
2227
2237
  <xsl:copy-of select="@*"/>
2228
2238
  <xsl:apply-templates mode="update_xml_step1"/>
2229
2239
  </xsl:element>
2230
- </xsl:template>
2240
+ </xsl:template> -->
2231
2241
 
2232
2242
  <xsl:template match="mn:xref" mode="update_xml_step1"/>
2233
2243
 
2234
- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
2244
+ <!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
2235
2245
  <xsl:element name="xref" namespace="{$namespace_full}">
2236
2246
  <xsl:copy-of select="@*"/>
2237
2247
  <xsl:apply-templates mode="update_xml_step1"/>
2238
2248
  </xsl:element>
2239
- </xsl:template>
2249
+ </xsl:template> -->
2240
2250
 
2241
2251
  <xsl:template match="mn:link" mode="update_xml_step1"/>
2242
2252
 
2243
- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
2253
+ <!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
2244
2254
  <xsl:element name="link" namespace="{$namespace_full}">
2245
2255
  <xsl:copy-of select="@*"/>
2246
2256
  <xsl:apply-templates mode="update_xml_step1"/>
2247
2257
  </xsl:element>
2248
- </xsl:template>
2258
+ </xsl:template> -->
2249
2259
 
2250
2260
  <xsl:template match="mn:origin" mode="update_xml_step1"/>
2251
2261
 
2252
- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
2262
+ <!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
2253
2263
  <xsl:element name="origin" namespace="{$namespace_full}">
2254
2264
  <xsl:copy-of select="@*"/>
2255
2265
  <xsl:apply-templates mode="update_xml_step1"/>
2256
2266
  </xsl:element>
2257
- </xsl:template>
2267
+ </xsl:template> -->
2258
2268
 
2259
2269
  <xsl:template match="mn:erefstack" mode="update_xml_step1"/>
2260
2270
 
2261
2271
  <xsl:template match="mn:svgmap" mode="update_xml_step1"/>
2262
2272
 
2263
- <xsl:template match="mn:review-container" mode="update_xml_step1"/>
2273
+ <xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
2264
2274
 
2265
- <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
2266
- <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
2267
- <xsl:value-of select="."/>
2268
- </xsl:element>
2269
- </xsl:template>
2275
+ <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
2276
+ <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
2277
+ <xsl:value-of select="."/>
2278
+ </xsl:element>
2279
+ </xsl:template>
2280
+
2281
+ <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
2270
2282
 
2271
2283
  <!-- END: update new Presentation XML -->
2272
2284
 
@@ -2462,7 +2474,7 @@
2462
2474
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
2463
2475
  <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>
2464
2476
 
2465
- <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">
2477
+ <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">
2466
2478
 
2467
2479
  <xsl:variable name="parent" select="local-name(..)"/>
2468
2480
 
@@ -2581,7 +2593,7 @@
2581
2593
  </xsl:if>
2582
2594
  </xsl:template>
2583
2595
 
2584
- <xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
2596
+ <xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
2585
2597
  <xsl:copy-of select="."/>
2586
2598
  </xsl:template>
2587
2599
 
@@ -2911,7 +2923,7 @@
2911
2923
  </fo:block>
2912
2924
  </xsl:template> <!-- copyright-statement -->
2913
2925
 
2914
- <xsl:template match="mn:copyright-statement//mn:title">
2926
+ <xsl:template match="mn:copyright-statement//mn:fmt-title">
2915
2927
  <!-- process in the template 'title' -->
2916
2928
  <xsl:call-template name="title"/>
2917
2929
  </xsl:template> <!-- copyright-statement//title -->
@@ -2927,7 +2939,7 @@
2927
2939
  </fo:block>
2928
2940
  </xsl:template> <!-- license-statement -->
2929
2941
 
2930
- <xsl:template match="mn:license-statement//mn:title">
2942
+ <xsl:template match="mn:license-statement//mn:fmt-title">
2931
2943
  <!-- process in the template 'title' -->
2932
2944
  <xsl:call-template name="title"/>
2933
2945
  </xsl:template> <!-- license-statement/title -->
@@ -2944,7 +2956,7 @@
2944
2956
  </fo:block>
2945
2957
  </xsl:template> <!-- legal-statement -->
2946
2958
 
2947
- <xsl:template match="mn:legal-statement//mn:title">
2959
+ <xsl:template match="mn:legal-statement//mn:fmt-title">
2948
2960
  <!-- ogc-white-paper rsd -->
2949
2961
  <xsl:variable name="level">
2950
2962
  <xsl:call-template name="getLevel"/>
@@ -2969,7 +2981,7 @@
2969
2981
  </fo:block>
2970
2982
  </xsl:template> <!-- feedback-statement -->
2971
2983
 
2972
- <xsl:template match="mn:feedback-statement//mn:title">
2984
+ <xsl:template match="mn:feedback-statement//mn:fmt-title">
2973
2985
  <!-- process in the template 'title' -->
2974
2986
  <xsl:call-template name="title"/>
2975
2987
  </xsl:template>
@@ -3000,7 +3012,7 @@
3000
3012
  </xsl:if>
3001
3013
  </xsl:template> <!-- refine_link-style -->
3002
3014
 
3003
- <xsl:template match="mn:link" name="link">
3015
+ <xsl:template match="mn:fmt-link" name="link">
3004
3016
  <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
3005
3017
  <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
3006
3018
  <xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
@@ -3132,7 +3144,7 @@
3132
3144
  </xsl:attribute-set> <!-- sourcecode-style -->
3133
3145
 
3134
3146
  <xsl:template name="refine_sourcecode-style"> <!-- background for image -->
3135
- <xsl:if test="starts-with(mn:name/text()[1], 'Figure ')">
3147
+ <xsl:if test="starts-with((mn:fmt-name//text())[1], 'Figure ')">
3136
3148
  <xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
3137
3149
  <xsl:attribute name="padding-left">11mm</xsl:attribute>
3138
3150
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -3140,7 +3152,7 @@
3140
3152
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
3141
3153
  <xsl:attribute name="padding-top">7.5mm</xsl:attribute>
3142
3154
  <xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
3143
- <xsl:if test="following-sibling::*[1][self::mn:sourcecode] and starts-with(mn:name/text()[1], 'Figure ')">
3155
+ <xsl:if test="following-sibling::*[1][self::mn:sourcecode] and starts-with((mn:fmt-name//text())[1], 'Figure ')">
3144
3156
  <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
3145
3157
  </xsl:if>
3146
3158
  </xsl:if>
@@ -3246,7 +3258,7 @@
3246
3258
  <xsl:value-of select="."/>
3247
3259
  </xsl:attribute>
3248
3260
  </xsl:for-each>
3249
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
3261
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3250
3262
  </xsl:when>
3251
3263
 
3252
3264
  <xsl:otherwise>
@@ -3271,7 +3283,7 @@
3271
3283
  </xsl:attribute>
3272
3284
  </xsl:if>
3273
3285
  <fo:block-container margin-left="0mm" role="SKIP">
3274
- <xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name BEFORE content -->
3286
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
3275
3287
 
3276
3288
  <fo:block xsl:use-attribute-sets="sourcecode-style">
3277
3289
 
@@ -3289,7 +3301,7 @@
3289
3301
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3290
3302
  </xsl:if>
3291
3303
 
3292
- <xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
3304
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
3293
3305
  </fo:block>
3294
3306
 
3295
3307
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
@@ -3593,7 +3605,7 @@
3593
3605
 
3594
3606
  <!-- end mode="syntax_highlight" -->
3595
3607
 
3596
- <xsl:template match="mn:sourcecode/mn:name">
3608
+ <xsl:template match="mn:sourcecode/mn:fmt-name">
3597
3609
  <xsl:if test="normalize-space() != ''">
3598
3610
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
3599
3611
  <xsl:apply-templates/>
@@ -3611,7 +3623,7 @@
3611
3623
  </xsl:choose>
3612
3624
  </xsl:template>
3613
3625
 
3614
- <xsl:template match="mn:annotation">
3626
+ <xsl:template match="mn:callout-annotation">
3615
3627
  <xsl:variable name="annotation-id" select="@id"/>
3616
3628
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
3617
3629
  <fo:block id="{$annotation-id}" white-space="nowrap">
@@ -3623,7 +3635,7 @@
3623
3635
  </fo:block>
3624
3636
  </xsl:template>
3625
3637
 
3626
- <xsl:template match="mn:annotation/mn:p">
3638
+ <xsl:template match="mn:callout-annotation/mn:p">
3627
3639
  <xsl:param name="callout"/>
3628
3640
  <fo:inline id="{@id}">
3629
3641
  <xsl:call-template name="setNamedDestination"/>
@@ -3704,7 +3716,7 @@
3704
3716
  </xsl:template>
3705
3717
 
3706
3718
  <xsl:template name="refine_strong_style">
3707
- <xsl:if test="not(parent::mn:termsource)">
3719
+ <xsl:if test="not(parent::mn:fmt-termsource)">
3708
3720
  <xsl:attribute name="font-weight">normal</xsl:attribute>
3709
3721
  <xsl:attribute name="color">black</xsl:attribute>
3710
3722
  </xsl:if>
@@ -3784,7 +3796,7 @@
3784
3796
  <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
3785
3797
  <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
3786
3798
  <xsl:choose>
3787
- <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>
3799
+ <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>
3788
3800
  <xsl:otherwise>
3789
3801
  <xsl:variable name="tag">
3790
3802
  <xsl:call-template name="insertTag">
@@ -4185,12 +4197,12 @@
4185
4197
  <xsl:template match="mn:permission">
4186
4198
  <xsl:call-template name="setNamedDestination"/>
4187
4199
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
4188
- <xsl:apply-templates select="mn:name"/>
4189
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4200
+ <xsl:apply-templates select="mn:fmt-name"/>
4201
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4190
4202
  </fo:block>
4191
4203
  </xsl:template>
4192
4204
 
4193
- <xsl:template match="mn:permission/mn:name">
4205
+ <xsl:template match="mn:permission/mn:fmt-name">
4194
4206
  <xsl:if test="normalize-space() != ''">
4195
4207
  <fo:block xsl:use-attribute-sets="permission-name-style">
4196
4208
  <xsl:apply-templates/>
@@ -4212,15 +4224,15 @@
4212
4224
  <xsl:template match="mn:requirement">
4213
4225
  <xsl:call-template name="setNamedDestination"/>
4214
4226
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
4215
- <xsl:apply-templates select="mn:name"/>
4227
+ <xsl:apply-templates select="mn:fmt-name"/>
4216
4228
  <xsl:apply-templates select="mn:label"/>
4217
4229
  <xsl:apply-templates select="@obligation"/>
4218
4230
  <xsl:apply-templates select="mn:subject"/>
4219
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:label) and not(self::mn:subject)]"/>
4231
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
4220
4232
  </fo:block>
4221
4233
  </xsl:template>
4222
4234
 
4223
- <xsl:template match="mn:requirement/mn:name">
4235
+ <xsl:template match="mn:requirement/mn:fmt-name">
4224
4236
  <xsl:if test="normalize-space() != ''">
4225
4237
 
4226
4238
  <fo:block xsl:use-attribute-sets="requirement-name-style">
@@ -4256,12 +4268,12 @@
4256
4268
  <xsl:template match="mn:recommendation">
4257
4269
  <xsl:call-template name="setNamedDestination"/>
4258
4270
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
4259
- <xsl:apply-templates select="mn:name"/>
4260
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4271
+ <xsl:apply-templates select="mn:fmt-name"/>
4272
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4261
4273
  </fo:block>
4262
4274
  </xsl:template>
4263
4275
 
4264
- <xsl:template match="mn:recommendation/mn:name">
4276
+ <xsl:template match="mn:recommendation/mn:fmt-name">
4265
4277
  <xsl:if test="normalize-space() != ''">
4266
4278
 
4267
4279
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
@@ -4519,11 +4531,11 @@
4519
4531
 
4520
4532
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
4521
4533
  </xsl:if>
4522
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4534
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4523
4535
  </fo:block>
4524
4536
  </xsl:template>
4525
4537
 
4526
- <xsl:template match="mn:term/mn:name">
4538
+ <xsl:template match="mn:term/mn:fmt-name">
4527
4539
  <xsl:if test="normalize-space() != ''">
4528
4540
  <!-- <xsl:variable name="level">
4529
4541
  <xsl:call-template name="getLevelTermName"/>
@@ -4542,7 +4554,7 @@
4542
4554
  <!-- origin -->
4543
4555
  <!-- modification -->
4544
4556
  <!-- ====== -->
4545
- <xsl:template match="mn:termsource" name="termsource">
4557
+ <xsl:template match="mn:fmt-termsource" name="termsource">
4546
4558
  <fo:block xsl:use-attribute-sets="termsource-style">
4547
4559
 
4548
4560
  <xsl:call-template name="refine_termsource-style"/>
@@ -4581,24 +4593,24 @@
4581
4593
  </fo:block>
4582
4594
  </xsl:template>
4583
4595
 
4584
- <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">
4596
+ <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">
4585
4597
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
4586
4598
  </xsl:template>
4587
4599
 
4588
- <xsl:template match="mn:termsource/text()">
4600
+ <xsl:template match="mn:fmt-termsource/text()">
4589
4601
  <xsl:if test="normalize-space() != ''">
4590
4602
  <xsl:value-of select="."/>
4591
4603
  </xsl:if>
4592
4604
  </xsl:template>
4593
4605
 
4594
4606
  <!-- text SOURCE: -->
4595
- <xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
4607
+ <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
4596
4608
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
4597
4609
  <xsl:value-of select="."/>
4598
4610
  </fo:inline>
4599
4611
  </xsl:template>
4600
4612
 
4601
- <xsl:template match="mn:origin">
4613
+ <xsl:template match="mn:fmt-origin">
4602
4614
  <xsl:call-template name="insert_basic_link">
4603
4615
  <xsl:with-param name="element">
4604
4616
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -4644,7 +4656,7 @@
4644
4656
  <!-- ====== -->
4645
4657
 
4646
4658
  <!-- Preferred, admitted, deprecated -->
4647
- <xsl:template match="mn:preferred">
4659
+ <xsl:template match="mn:fmt-preferred">
4648
4660
  <xsl:variable name="level">
4649
4661
  <xsl:call-template name="getLevel"/>
4650
4662
  </xsl:variable>
@@ -4655,15 +4667,15 @@
4655
4667
  </xsl:variable>
4656
4668
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
4657
4669
 
4658
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
4670
+ <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
4659
4671
 
4660
4672
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
4661
4673
 
4662
- <xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
4674
+ <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
4663
4675
  <xsl:call-template name="setIDforNamedDestination"/>
4664
4676
  </xsl:for-each>
4665
4677
 
4666
- <xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
4678
+ <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
4667
4679
  </fo:block>
4668
4680
  </xsl:if>
4669
4681
 
@@ -4687,13 +4699,13 @@
4687
4699
  <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
4688
4700
  <xsl:template match="mn:domain"/>
4689
4701
 
4690
- <xsl:template match="mn:admitted">
4702
+ <xsl:template match="mn:fmt-admitted">
4691
4703
  <fo:block xsl:use-attribute-sets="admitted-style">
4692
4704
  <xsl:apply-templates/>
4693
4705
  </fo:block>
4694
4706
  </xsl:template>
4695
4707
 
4696
- <xsl:template match="mn:deprecates">
4708
+ <xsl:template match="mn:fmt-deprecates">
4697
4709
  <fo:block xsl:use-attribute-sets="deprecates-style">
4698
4710
  <xsl:apply-templates/>
4699
4711
  </fo:block>
@@ -4707,7 +4719,7 @@
4707
4719
 
4708
4720
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
4709
4721
  <!-- in metanorma xml preferred terms delimited by semicolons -->
4710
- <xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
4722
+ <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
4711
4723
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
4712
4724
  </xsl:template>
4713
4725
  <!-- End Preferred, admitted, deprecated -->
@@ -4726,16 +4738,16 @@
4726
4738
  <!-- ========== -->
4727
4739
  <!-- definition -->
4728
4740
  <!-- ========== -->
4729
- <xsl:template match="mn:definition">
4741
+ <xsl:template match="mn:fmt-definition">
4730
4742
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
4731
4743
  <xsl:apply-templates/>
4732
4744
  </fo:block>
4733
4745
  </xsl:template>
4734
4746
 
4735
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]">
4747
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
4736
4748
  <xsl:apply-templates/>
4737
4749
  </xsl:template>
4738
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
4750
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
4739
4751
  <fo:inline> <xsl:apply-templates/></fo:inline>
4740
4752
  <fo:block/>
4741
4753
  </xsl:template>
@@ -4807,12 +4819,12 @@
4807
4819
  <xsl:call-template name="refine_termexample-style"/>
4808
4820
  <xsl:call-template name="setBlockSpanAll"/>
4809
4821
 
4810
- <xsl:apply-templates select="mn:name"/>
4811
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4822
+ <xsl:apply-templates select="mn:fmt-name"/>
4823
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4812
4824
  </fo:block>
4813
4825
  </xsl:template>
4814
4826
 
4815
- <xsl:template match="mn:termexample/mn:name">
4827
+ <xsl:template match="mn:termexample/mn:fmt-name">
4816
4828
  <xsl:if test="normalize-space() != ''">
4817
4829
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
4818
4830
  <xsl:call-template name="refine_termexample-name-style"/>
@@ -4863,7 +4875,7 @@
4863
4875
  <xsl:call-template name="refine_example-style"/>
4864
4876
 
4865
4877
  <xsl:variable name="fo_element">
4866
- <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:name)][1][self::mn:sourcecode]">block</xsl:if>inline
4878
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>inline
4867
4879
  </xsl:variable>
4868
4880
 
4869
4881
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -4874,7 +4886,7 @@
4874
4886
 
4875
4887
  <!-- display name 'EXAMPLE' in a separate block -->
4876
4888
  <fo:block>
4877
- <xsl:apply-templates select="mn:name">
4889
+ <xsl:apply-templates select="mn:fmt-name">
4878
4890
  <xsl:with-param name="fo_element" select="$fo_element"/>
4879
4891
  </xsl:apply-templates>
4880
4892
  </fo:block>
@@ -4882,7 +4894,7 @@
4882
4894
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4883
4895
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4884
4896
  <xsl:variable name="example_body">
4885
- <xsl:apply-templates select="node()[not(self::mn:name)]">
4897
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
4886
4898
  <xsl:with-param name="fo_element" select="$fo_element"/>
4887
4899
  </xsl:apply-templates>
4888
4900
  </xsl:variable>
@@ -4909,14 +4921,14 @@
4909
4921
  <fo:list-item>
4910
4922
  <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
4911
4923
  <fo:block>
4912
- <xsl:apply-templates select="mn:name">
4924
+ <xsl:apply-templates select="mn:fmt-name">
4913
4925
  <xsl:with-param name="fo_element">block</xsl:with-param>
4914
4926
  </xsl:apply-templates>
4915
4927
  </fo:block>
4916
4928
  </fo:list-item-label>
4917
4929
  <fo:list-item-body start-indent="body-start()">
4918
4930
  <fo:block>
4919
- <xsl:apply-templates select="node()[not(self::mn:name)]">
4931
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
4920
4932
  <xsl:with-param name="fo_element" select="$fo_element"/>
4921
4933
  </xsl:apply-templates>
4922
4934
  </fo:block>
@@ -4929,21 +4941,21 @@
4929
4941
 
4930
4942
  <!-- display 'EXAMPLE' and first element in the same line -->
4931
4943
  <fo:block>
4932
- <xsl:apply-templates select="mn:name">
4944
+ <xsl:apply-templates select="mn:fmt-name">
4933
4945
  <xsl:with-param name="fo_element" select="$fo_element"/>
4934
4946
  </xsl:apply-templates>
4935
4947
  <fo:inline>
4936
- <xsl:apply-templates select="*[not(self::mn:name)][1]">
4948
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
4937
4949
  <xsl:with-param name="fo_element" select="$fo_element"/>
4938
4950
  </xsl:apply-templates>
4939
4951
  </fo:inline>
4940
4952
  </fo:block>
4941
4953
 
4942
- <xsl:if test="*[not(self::mn:name)][position() &gt; 1]">
4954
+ <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
4943
4955
  <!-- display further elements in blocks -->
4944
4956
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4945
4957
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4946
- <xsl:apply-templates select="*[not(self::mn:name)][position() &gt; 1]">
4958
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
4947
4959
  <xsl:with-param name="fo_element" select="'block'"/>
4948
4960
  </xsl:apply-templates>
4949
4961
  </fo:block-container>
@@ -4957,7 +4969,7 @@
4957
4969
  </xsl:template>
4958
4970
 
4959
4971
  <!-- example/name -->
4960
- <xsl:template match="mn:example/mn:name">
4972
+ <xsl:template match="mn:example/mn:fmt-name">
4961
4973
  <xsl:param name="fo_element">block</xsl:param>
4962
4974
 
4963
4975
  <xsl:choose>
@@ -4982,7 +4994,7 @@
4982
4994
  </xsl:template>
4983
4995
 
4984
4996
  <!-- table/example/name, table/tfoot//example/name -->
4985
- <xsl:template match="mn:table/mn:example/mn:name | mn:table/mn:tfoot//mn:example/mn:name">
4997
+ <xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
4986
4998
  <fo:inline xsl:use-attribute-sets="example-name-style">
4987
4999
  <xsl:apply-templates/>
4988
5000
  </fo:inline>
@@ -5265,7 +5277,7 @@
5265
5277
 
5266
5278
  <!-- Display table's name before table as standalone block -->
5267
5279
  <!-- $namespace = 'iso' or -->
5268
- <xsl:apply-templates select="mn:name"/> <!-- table's title rendered before table -->
5280
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
5269
5281
 
5270
5282
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
5271
5283
 
@@ -5306,7 +5318,7 @@
5306
5318
 
5307
5319
  <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
5308
5320
 
5309
- <xsl:for-each select="mn:name">
5321
+ <xsl:for-each select="mn:fmt-name">
5310
5322
  <xsl:call-template name="setIDforNamedDestination"/>
5311
5323
  </xsl:for-each>
5312
5324
 
@@ -5336,6 +5348,10 @@
5336
5348
  <xsl:with-param name="margin-side" select="$margin-side"/>
5337
5349
  </xsl:call-template>
5338
5350
 
5351
+ <xsl:call-template name="setTableStyles">
5352
+ <xsl:with-param name="scope">table</xsl:with-param>
5353
+ </xsl:call-template>
5354
+
5339
5355
  </xsl:element>
5340
5356
  </xsl:variable>
5341
5357
 
@@ -5356,7 +5372,7 @@
5356
5372
  </xsl:attribute>
5357
5373
  </xsl:for-each>
5358
5374
 
5359
- <xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[local-name(..) != 'name'] or ./mn:source"/>
5375
+ <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"/>
5360
5376
  <xsl:if test="$isNoteOrFnExist = 'true'">
5361
5377
  <!-- <xsl:choose>
5362
5378
  <xsl:when test="$namespace = 'plateau'"></xsl:when>
@@ -5412,7 +5428,7 @@
5412
5428
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
5413
5429
  </xsl:when>
5414
5430
  <xsl:otherwise>
5415
- <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 -->
5431
+ <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 -->
5416
5432
  </xsl:otherwise>
5417
5433
  </xsl:choose>
5418
5434
 
@@ -5509,7 +5525,7 @@
5509
5525
  </xsl:template>
5510
5526
 
5511
5527
  <!-- table/name-->
5512
- <xsl:template match="*[local-name()='table']/mn:name">
5528
+ <xsl:template match="*[local-name()='table']/mn:fmt-name">
5513
5529
  <xsl:param name="continued"/>
5514
5530
  <xsl:param name="cols-count"/>
5515
5531
  <xsl:if test="normalize-space() != ''">
@@ -5574,7 +5590,7 @@
5574
5590
  </xsl:template>
5575
5591
 
5576
5592
  <!-- SOURCE: ... -->
5577
- <xsl:template match="*[local-name()='table']/mn:source" priority="2">
5593
+ <xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
5578
5594
  <xsl:call-template name="termsource"/>
5579
5595
  </xsl:template>
5580
5596
 
@@ -5739,11 +5755,11 @@
5739
5755
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
5740
5756
  </xsl:template>
5741
5757
 
5742
- <xsl:template match="mn:termsource" mode="td_text">
5743
- <xsl:value-of select="*[local-name()='origin']/@citeas"/>
5758
+ <xsl:template match="mn:fmt-termsource" mode="td_text">
5759
+ <xsl:value-of select="mn:fmt-origin/@citeas"/>
5744
5760
  </xsl:template>
5745
5761
 
5746
- <xsl:template match="mn:link" mode="td_text">
5762
+ <xsl:template match="mn:fmt-link" mode="td_text">
5747
5763
  <xsl:value-of select="@target"/>
5748
5764
  </xsl:template>
5749
5765
 
@@ -5945,12 +5961,12 @@
5945
5961
 
5946
5962
  <xsl:call-template name="refine_table-header-title-style"/>
5947
5963
 
5948
- <xsl:apply-templates select="ancestor::mn:table/mn:name">
5964
+ <xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
5949
5965
  <xsl:with-param name="continued">true</xsl:with-param>
5950
5966
  <xsl:with-param name="cols-count" select="$cols-count"/>
5951
5967
  </xsl:apply-templates>
5952
5968
 
5953
- <xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5969
+ <xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5954
5970
  <fo:block role="SKIP"/>
5955
5971
  </xsl:if>
5956
5972
 
@@ -5985,7 +6001,7 @@
5985
6001
  <xsl:param name="colwidths"/>
5986
6002
  <xsl:param name="colgroup"/>
5987
6003
 
5988
- <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"/>
6004
+ <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"/>
5989
6005
 
5990
6006
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
5991
6007
  </xsl:variable>
@@ -6026,6 +6042,12 @@
6026
6042
  </xsl:choose>
6027
6043
  </xsl:for-each>
6028
6044
 
6045
+ <xsl:for-each select="ancestor::mn:table[1]">
6046
+ <xsl:call-template name="setTableStyles">
6047
+ <xsl:with-param name="scope">table</xsl:with-param>
6048
+ </xsl:call-template>
6049
+ </xsl:for-each>
6050
+
6029
6051
  <xsl:choose>
6030
6052
  <xsl:when test="xalan:nodeset($colgroup)//mn:col">
6031
6053
  <xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
@@ -6042,10 +6064,22 @@
6042
6064
 
6043
6065
  <fo:table-body role="SKIP">
6044
6066
  <fo:table-row role="SKIP">
6067
+ <xsl:for-each select="ancestor::mn:table[1]">
6068
+ <xsl:call-template name="setTableStyles">
6069
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
6070
+ </xsl:call-template>
6071
+ </xsl:for-each>
6072
+
6045
6073
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
6046
6074
 
6047
6075
  <xsl:call-template name="refine_table-footer-cell-style"/>
6048
6076
 
6077
+ <xsl:for-each select="ancestor::mn:table[1]">
6078
+ <xsl:call-template name="setTableStyles">
6079
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
6080
+ </xsl:call-template>
6081
+ </xsl:for-each>
6082
+
6049
6083
  <xsl:call-template name="setBordersTableArray"/>
6050
6084
 
6051
6085
  <!-- fn will be processed inside 'note' processing -->
@@ -6053,7 +6087,7 @@
6053
6087
  <xsl:apply-templates select="../mn:dl"/>
6054
6088
  <xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
6055
6089
  <xsl:apply-templates select="../mn:example"/>
6056
- <xsl:apply-templates select="../mn:source"/>
6090
+ <xsl:apply-templates select="../mn:fmt-source"/>
6057
6091
 
6058
6092
  <xsl:variable name="isDisplayRowSeparator">
6059
6093
  </xsl:variable>
@@ -6242,7 +6276,12 @@
6242
6276
 
6243
6277
  <xsl:template name="setTableRowAttributes">
6244
6278
 
6245
- <xsl:call-template name="setColors"/>
6279
+ <xsl:for-each select="ancestor::mn:table[1]">
6280
+ <xsl:call-template name="setTableStyles">
6281
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
6282
+ </xsl:call-template>
6283
+ </xsl:for-each>
6284
+ <xsl:call-template name="setTableStyles"/>
6246
6285
 
6247
6286
  </xsl:template> <!-- setTableRowAttributes -->
6248
6287
  <!-- ===================== -->
@@ -6295,7 +6334,13 @@
6295
6334
  </xsl:attribute>
6296
6335
  </xsl:if>
6297
6336
  <xsl:call-template name="display-align"/>
6298
- <xsl:call-template name="setColors"/>
6337
+
6338
+ <xsl:for-each select="ancestor::mn:table[1]">
6339
+ <xsl:call-template name="setTableStyles">
6340
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
6341
+ </xsl:call-template>
6342
+ </xsl:for-each>
6343
+ <xsl:call-template name="setTableStyles"/>
6299
6344
  </xsl:template>
6300
6345
 
6301
6346
  <xsl:template name="display-align">
@@ -6311,7 +6356,8 @@
6311
6356
  </xsl:if>
6312
6357
  </xsl:template>
6313
6358
 
6314
- <xsl:template name="setColors">
6359
+ <xsl:template name="setTableStyles">
6360
+ <xsl:param name="scope">cell</xsl:param>
6315
6361
  <xsl:variable name="styles__">
6316
6362
  <xsl:call-template name="split">
6317
6363
  <xsl:with-param name="pText" select="concat(@style,';')"/>
@@ -6323,16 +6369,22 @@
6323
6369
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
6324
6370
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
6325
6371
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
6326
- <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'">
6372
+ <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'">
6327
6373
  <style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
6328
6374
  </xsl:if>
6375
+ <xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
6376
+ <style name="{$key}-top"><xsl:value-of select="$value"/></style>
6377
+ <style name="{$key}-right"><xsl:value-of select="$value"/></style>
6378
+ <style name="{$key}-left"><xsl:value-of select="$value"/></style>
6379
+ <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
6380
+ </xsl:if>
6329
6381
  </xsl:for-each>
6330
6382
  </xsl:variable>
6331
6383
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
6332
6384
  <xsl:for-each select="$styles/style">
6333
6385
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
6334
6386
  </xsl:for-each>
6335
- </xsl:template> <!-- setColors -->
6387
+ </xsl:template> <!-- setTableStyles -->
6336
6388
 
6337
6389
  <!-- cell in table body, footer -->
6338
6390
  <xsl:template match="*[local-name()='td']" name="td">
@@ -6396,11 +6448,11 @@
6396
6448
 
6397
6449
  <xsl:call-template name="refine_table-note-name-style"/>
6398
6450
 
6399
- <xsl:apply-templates select="mn:name"/>
6451
+ <xsl:apply-templates select="mn:fmt-name"/>
6400
6452
 
6401
6453
  </fo:inline>
6402
6454
 
6403
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
6455
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
6404
6456
  </fo:block>
6405
6457
  </xsl:template> <!-- table/note -->
6406
6458
 
@@ -6539,7 +6591,7 @@
6539
6591
 
6540
6592
  <!-- footnotes for table's name rendering -->
6541
6593
  <xsl:template name="table_name_fn_display">
6542
- <xsl:for-each select="mn:name//mn:fn">
6594
+ <xsl:for-each select="mn:fmt-name//mn:fn">
6543
6595
  <xsl:variable name="reference" select="@reference"/>
6544
6596
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
6545
6597
  <fo:block margin-bottom="12pt">
@@ -7196,7 +7248,7 @@
7196
7248
  </xsl:if> -->
7197
7249
 
7198
7250
  <xsl:variable name="words">
7199
- <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
7251
+ <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
7200
7252
  <word>
7201
7253
  <xsl:copy-of select="."/>
7202
7254
  </word>
@@ -7255,7 +7307,7 @@
7255
7307
  </xsl:copy>
7256
7308
  </xsl:template>
7257
7309
 
7258
- <xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
7310
+ <xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
7259
7311
 
7260
7312
  <xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
7261
7313
  <xsl:variable name="formatting_tags">
@@ -7290,7 +7342,7 @@
7290
7342
  </xsl:call-template>
7291
7343
  </xsl:template>
7292
7344
 
7293
- <xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
7345
+ <xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
7294
7346
  <xsl:variable name="link">
7295
7347
  <link_updated>
7296
7348
  <xsl:variable name="target_text">
@@ -7508,7 +7560,7 @@
7508
7560
 
7509
7561
  <xsl:call-template name="refine_multicomponent_block_style"/>
7510
7562
 
7511
- <xsl:apply-templates select="mn:name">
7563
+ <xsl:apply-templates select="mn:fmt-name">
7512
7564
  <xsl:with-param name="process">true</xsl:with-param>
7513
7565
  </xsl:apply-templates>
7514
7566
 
@@ -7691,7 +7743,7 @@
7691
7743
  </xsl:template> <!-- refine_multicomponent_block_style -->
7692
7744
 
7693
7745
  <!-- dl/name -->
7694
- <xsl:template match="mn:dl/mn:name">
7746
+ <xsl:template match="mn:dl/mn:fmt-name">
7695
7747
  <xsl:param name="process">false</xsl:param>
7696
7748
  <xsl:if test="$process = 'true'">
7697
7749
  <fo:block xsl:use-attribute-sets="dl-name-style">
@@ -8110,12 +8162,12 @@
8110
8162
  <xsl:template match="mn:appendix">
8111
8163
  <xsl:call-template name="setNamedDestination"/>
8112
8164
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
8113
- <xsl:apply-templates select="mn:title"/>
8165
+ <xsl:apply-templates select="mn:fmt-title"/>
8114
8166
  </fo:block>
8115
- <xsl:apply-templates select="node()[not(local-name()='title')]"/>
8167
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
8116
8168
  </xsl:template>
8117
8169
 
8118
- <xsl:template match="mn:appendix/mn:title" priority="2">
8170
+ <xsl:template match="mn:appendix/mn:fmt-title" priority="2">
8119
8171
  <xsl:variable name="level">
8120
8172
  <xsl:call-template name="getLevel"/>
8121
8173
  </xsl:variable>
@@ -8128,15 +8180,15 @@
8128
8180
  <xsl:template match="mn:appendix//mn:example" priority="2">
8129
8181
  <xsl:call-template name="setNamedDestination"/>
8130
8182
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
8131
- <xsl:apply-templates select="mn:name"/>
8183
+ <xsl:apply-templates select="mn:fmt-name"/>
8132
8184
  </fo:block>
8133
- <xsl:apply-templates select="node()[not(local-name()='name')]"/>
8185
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8134
8186
  </xsl:template>
8135
8187
 
8136
8188
  <xsl:attribute-set name="xref-style">
8137
8189
  </xsl:attribute-set>
8138
8190
 
8139
- <xsl:template match="mn:xref">
8191
+ <xsl:template match="mn:fmt-xref">
8140
8192
  <xsl:call-template name="insert_basic_link">
8141
8193
  <xsl:with-param name="element">
8142
8194
  <xsl:variable name="alt_text">
@@ -8156,7 +8208,7 @@
8156
8208
  </xsl:template> <!-- xref -->
8157
8209
 
8158
8210
  <!-- command between two xref points to non-standard bibitem -->
8159
- <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="."/>
8211
+ <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="."/>
8160
8212
  </xsl:template>
8161
8213
 
8162
8214
  <xsl:attribute-set name="eref-style">
@@ -8187,7 +8239,7 @@
8187
8239
  <!-- ====== -->
8188
8240
  <!-- eref -->
8189
8241
  <!-- ====== -->
8190
- <xsl:template match="mn:eref" name="eref">
8242
+ <xsl:template match="mn:fmt-eref" name="eref">
8191
8243
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
8192
8244
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
8193
8245
  <xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
@@ -8333,28 +8385,28 @@
8333
8385
 
8334
8386
  <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8335
8387
 
8336
- <xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
8388
+ <xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
8337
8389
 
8338
8390
  <xsl:call-template name="refine_note-name-style"/>
8339
8391
 
8340
8392
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8341
8393
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8342
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
8394
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
8343
8395
  <xsl:call-template name="append_add-style"/>
8344
8396
  </xsl:if>
8345
8397
 
8346
8398
  <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8347
- <xsl:if test="count(*[not(self::mn:name)]) = 1 and *[not(self::mn:name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
8348
- <xsl:apply-templates select="*[not(self::mn:name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
8399
+ <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)]">
8400
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
8349
8401
  <xsl:with-param name="skip">false</xsl:with-param>
8350
8402
  </xsl:apply-templates>
8351
8403
  </xsl:if>
8352
8404
 
8353
- <xsl:apply-templates select="mn:name"/>
8405
+ <xsl:apply-templates select="mn:fmt-name"/>
8354
8406
 
8355
8407
  </fo:inline>
8356
8408
 
8357
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
8409
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8358
8410
  </fo:block>
8359
8411
  </fo:block-container>
8360
8412
  </fo:block-container>
@@ -8393,19 +8445,19 @@
8393
8445
 
8394
8446
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8395
8447
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8396
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
8448
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
8397
8449
  <xsl:call-template name="append_add-style"/>
8398
8450
  </xsl:if>
8399
8451
 
8400
- <xsl:apply-templates select="mn:name"/>
8452
+ <xsl:apply-templates select="mn:fmt-name"/>
8401
8453
 
8402
8454
  </fo:inline>
8403
8455
 
8404
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
8456
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8405
8457
  </fo:block>
8406
8458
  </xsl:template>
8407
8459
 
8408
- <xsl:template match="mn:note/mn:name">
8460
+ <xsl:template match="mn:note/mn:fmt-name">
8409
8461
  <xsl:param name="sfx"/>
8410
8462
  <xsl:variable name="suffix">
8411
8463
  <xsl:choose>
@@ -8432,7 +8484,7 @@
8432
8484
  </xsl:if>
8433
8485
  </xsl:template>
8434
8486
 
8435
- <xsl:template match="mn:termnote/mn:name">
8487
+ <xsl:template match="mn:termnote/mn:fmt-name">
8436
8488
  <xsl:param name="sfx"/>
8437
8489
  <xsl:variable name="suffix">
8438
8490
  <xsl:choose>
@@ -8515,15 +8567,15 @@
8515
8567
 
8516
8568
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8517
8569
  <fo:block role="BlockQuote">
8518
- <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 -->
8570
+ <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 -->
8519
8571
  </fo:block>
8520
8572
  </fo:block-container>
8521
8573
  </fo:block-container>
8522
- <xsl:if test="mn:author or mn:source or mn:attribution">
8574
+ <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
8523
8575
  <fo:block xsl:use-attribute-sets="quote-source-style">
8524
8576
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
8525
8577
  <xsl:apply-templates select="mn:author"/>
8526
- <xsl:apply-templates select="mn:source"/>
8578
+ <xsl:apply-templates select="mn:fmt-source"/>
8527
8579
  <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
8528
8580
  <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
8529
8581
  </fo:block>
@@ -8533,17 +8585,32 @@
8533
8585
  </fo:block-container>
8534
8586
  </xsl:template>
8535
8587
 
8536
- <xsl:template match="mn:source">
8588
+ <xsl:template match="mn:fmt-source">
8537
8589
  <xsl:if test="../mn:author">
8538
8590
  <xsl:text>, </xsl:text>
8539
8591
  </xsl:if>
8540
- <xsl:call-template name="insert_basic_link">
8541
- <xsl:with-param name="element">
8542
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
8543
- <xsl:apply-templates/>
8544
- </fo:basic-link>
8545
- </xsl:with-param>
8546
- </xsl:call-template>
8592
+ <xsl:choose>
8593
+ <xsl:when test="not(parent::quote)">
8594
+ <fo:block>
8595
+ <xsl:call-template name="insert_basic_link">
8596
+ <xsl:with-param name="element">
8597
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
8598
+ <xsl:apply-templates/>
8599
+ </fo:basic-link>
8600
+ </xsl:with-param>
8601
+ </xsl:call-template>
8602
+ </fo:block>
8603
+ </xsl:when>
8604
+ <xsl:otherwise>
8605
+ <xsl:call-template name="insert_basic_link">
8606
+ <xsl:with-param name="element">
8607
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
8608
+ <xsl:apply-templates/>
8609
+ </fo:basic-link>
8610
+ </xsl:with-param>
8611
+ </xsl:call-template>
8612
+ </xsl:otherwise>
8613
+ </xsl:choose>
8547
8614
  </xsl:template>
8548
8615
 
8549
8616
  <xsl:template match="mn:author">
@@ -8628,7 +8695,7 @@
8628
8695
  <ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
8629
8696
  <xsl:choose>
8630
8697
  <!-- skip figure/name/fn -->
8631
- <xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
8698
+ <xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
8632
8699
  <xsl:otherwise>
8633
8700
  <xsl:element name="figure" namespace="{$namespace_full}">
8634
8701
  <xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
@@ -8817,7 +8884,7 @@
8817
8884
  <xsl:with-param name="isAdded" select="$isAdded"/>
8818
8885
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
8819
8886
  </xsl:call-template> <!-- show figure's name BEFORE image -->
8820
- <xsl:apply-templates select="mn:name"/>
8887
+ <xsl:apply-templates select="mn:fmt-name"/>
8821
8888
 
8822
8889
  <!-- Example: Dimensions in millimeters -->
8823
8890
  <xsl:apply-templates select="mn:note[@type = 'units']"/>
@@ -8827,11 +8894,11 @@
8827
8894
 
8828
8895
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
8829
8896
 
8830
- <xsl:for-each select="mn:name"> <!-- set context -->
8897
+ <xsl:for-each select="mn:fmt-name"> <!-- set context -->
8831
8898
  <xsl:call-template name="setIDforNamedDestination"/>
8832
8899
  </xsl:for-each>
8833
8900
 
8834
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
8901
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
8835
8902
  </fo:block>
8836
8903
 
8837
8904
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
@@ -8862,9 +8929,9 @@
8862
8929
  <xsl:template match="mn:figure[@class = 'pseudocode']">
8863
8930
  <xsl:call-template name="setNamedDestination"/>
8864
8931
  <fo:block id="{@id}">
8865
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
8932
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8866
8933
  </fo:block>
8867
- <xsl:apply-templates select="mn:name"/>
8934
+ <xsl:apply-templates select="mn:fmt-name"/>
8868
8935
  </xsl:template>
8869
8936
 
8870
8937
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
@@ -8875,7 +8942,7 @@
8875
8942
 
8876
8943
  <!-- SOURCE: ... -->
8877
8944
  <!-- figure/source -->
8878
- <xsl:template match="mn:figure/mn:source" priority="2">
8945
+ <xsl:template match="mn:figure/mn:fmt-source" priority="2">
8879
8946
  <xsl:call-template name="termsource"/>
8880
8947
  </xsl:template>
8881
8948
 
@@ -8885,7 +8952,7 @@
8885
8952
  <xsl:variable name="isAdded" select="../@added"/>
8886
8953
  <xsl:variable name="isDeleted" select="../@deleted"/>
8887
8954
  <xsl:choose>
8888
- <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) -->
8955
+ <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) -->
8889
8956
  <fo:inline padding-left="1mm" padding-right="1mm">
8890
8957
  <xsl:if test="not(parent::mn:figure) or parent::mn:p">
8891
8958
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -8906,13 +8973,26 @@
8906
8973
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
8907
8974
 
8908
8975
  <xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
8909
- <xsl:attribute name="width">100%</xsl:attribute>
8976
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
8977
+ <xsl:choose>
8978
+ <xsl:when test="@width and not(@height)">
8979
+ <xsl:attribute name="width">100%</xsl:attribute>
8980
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8981
+ </xsl:when>
8982
+ <xsl:when test="@height and not(@width)">
8983
+ <xsl:attribute name="height">100%</xsl:attribute>
8984
+ <xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
8985
+ </xsl:when>
8986
+ <xsl:when test="not(@width) and not(@height)">
8987
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8988
+ </xsl:when>
8989
+ </xsl:choose>
8990
+
8910
8991
  <xsl:if test="normalize-space($logo_width) != ''">
8911
8992
  <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
8912
8993
  </xsl:if>
8913
- <xsl:attribute name="content-height">100%</xsl:attribute>
8914
8994
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8915
- <xsl:attribute name="scaling">uniform</xsl:attribute>
8995
+ <xsl:attribute name="vertical-align">top</xsl:attribute>
8916
8996
  </xsl:if>
8917
8997
 
8918
8998
  <xsl:variable name="width">
@@ -9201,7 +9281,7 @@
9201
9281
  <xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
9202
9282
  <xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
9203
9283
 
9204
- <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
9284
+ <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
9205
9285
  <xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
9206
9286
  <xsl:param name="name"/>
9207
9287
 
@@ -9211,8 +9291,8 @@
9211
9291
 
9212
9292
  <xsl:variable name="alt-text">
9213
9293
  <xsl:choose>
9214
- <xsl:when test="normalize-space(../mn:name) != ''">
9215
- <xsl:value-of select="../mn:name"/>
9294
+ <xsl:when test="normalize-space(../mn:fmt-name) != ''">
9295
+ <xsl:value-of select="../mn:fmt-name"/>
9216
9296
  </xsl:when>
9217
9297
  <xsl:when test="normalize-space($name) != ''">
9218
9298
  <xsl:value-of select="$name"/>
@@ -9221,7 +9301,7 @@
9221
9301
  </xsl:choose>
9222
9302
  </xsl:variable>
9223
9303
 
9224
- <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
9304
+ <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
9225
9305
 
9226
9306
  <xsl:choose>
9227
9307
  <xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
@@ -9270,9 +9350,9 @@
9270
9350
  <fo:table-cell column-number="2">
9271
9351
  <fo:block>
9272
9352
  <fo:block-container width="{$width_scale}px" height="{$height_scale}px">
9273
- <xsl:if test="../mn:name/mn:bookmark">
9353
+ <xsl:if test="../mn:fmt-name/mn:bookmark">
9274
9354
  <fo:block line-height="0" font-size="0">
9275
- <xsl:for-each select="../mn:name/mn:bookmark">
9355
+ <xsl:for-each select="../mn:fmt-name/mn:bookmark">
9276
9356
  <xsl:call-template name="bookmark"/>
9277
9357
  </xsl:for-each>
9278
9358
  </fo:block>
@@ -9512,7 +9592,7 @@
9512
9592
 
9513
9593
  <!-- image with svg and emf -->
9514
9594
  <xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
9515
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
9595
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
9516
9596
  <xsl:for-each select="*[local-name() = 'svg']">
9517
9597
  <xsl:call-template name="image_svg">
9518
9598
  <xsl:with-param name="name" select="$name"/>
@@ -9529,7 +9609,7 @@
9529
9609
 
9530
9610
  <xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
9531
9611
  <xsl:variable name="svg_content" select="document(@src)"/>
9532
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
9612
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
9533
9613
  <xsl:for-each select="xalan:nodeset($svg_content)/node()">
9534
9614
  <xsl:call-template name="image_svg">
9535
9615
  <xsl:with-param name="name" select="$name"/>
@@ -9652,7 +9732,7 @@
9652
9732
  <xsl:template match="mn:emf"/>
9653
9733
 
9654
9734
  <!-- figure/name -->
9655
- <xsl:template match="mn:figure/mn:name | mn:image/mn:name">
9735
+ <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
9656
9736
  <xsl:if test="normalize-space() != ''">
9657
9737
  <fo:block xsl:use-attribute-sets="figure-name-style">
9658
9738
 
@@ -9724,25 +9804,25 @@
9724
9804
  <fo:block-container margin-left="0mm" role="SKIP">
9725
9805
  <xsl:call-template name="setNamedDestination"/>
9726
9806
  <fo:block id="{@id}">
9727
- <xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
9807
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
9728
9808
  </fo:block>
9729
9809
  </fo:block-container>
9730
9810
  </fo:block-container>
9731
9811
  </xsl:template>
9732
9812
 
9733
- <xsl:template match="mn:formula/mn:dt/mn:stem">
9813
+ <xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
9734
9814
  <fo:inline>
9735
9815
  <xsl:apply-templates/>
9736
9816
  </fo:inline>
9737
9817
  </xsl:template>
9738
9818
 
9739
- <xsl:template match="mn:admitted/mn:stem">
9819
+ <xsl:template match="mn:fmt-admitted/mn:fmt-stem">
9740
9820
  <fo:inline>
9741
9821
  <xsl:apply-templates/>
9742
9822
  </fo:inline>
9743
9823
  </xsl:template>
9744
9824
 
9745
- <xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
9825
+ <xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
9746
9826
  <!-- https://github.com/metanorma/isodoc/issues/607
9747
9827
  <xsl:if test="normalize-space() != ''">
9748
9828
  <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
@@ -9751,7 +9831,7 @@
9751
9831
  </xsl:template>
9752
9832
 
9753
9833
  <!-- stem inside formula with name (with formula's number) -->
9754
- <xsl:template match="mn:formula[mn:name]/mn:stem">
9834
+ <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
9755
9835
  <fo:block xsl:use-attribute-sets="formula-style">
9756
9836
 
9757
9837
  <fo:table table-layout="fixed" width="100%">
@@ -9771,13 +9851,13 @@
9771
9851
 
9772
9852
  <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
9773
9853
 
9774
- <xsl:for-each select="../mn:name">
9854
+ <xsl:for-each select="../mn:fmt-name">
9775
9855
  <xsl:call-template name="setIDforNamedDestination"/>
9776
9856
  </xsl:for-each>
9777
9857
 
9778
9858
  <xsl:call-template name="refine_formula-stem-number-style"/>
9779
9859
 
9780
- <xsl:apply-templates select="../mn:name"/>
9860
+ <xsl:apply-templates select="../mn:fmt-name"/>
9781
9861
  </fo:block>
9782
9862
  </fo:table-cell>
9783
9863
  </fo:table-row>
@@ -9787,7 +9867,7 @@
9787
9867
  </xsl:template>
9788
9868
 
9789
9869
  <!-- stem inside formula without name (without formula's number) -->
9790
- <xsl:template match="mn:formula[not(mn:name)]/mn:stem">
9870
+ <xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
9791
9871
  <fo:block xsl:use-attribute-sets="formula-style">
9792
9872
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
9793
9873
  <xsl:apply-templates/>
@@ -10141,7 +10221,7 @@
10141
10221
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
10142
10222
  <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
10143
10223
  -->
10144
- <xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
10224
+ <xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
10145
10225
  <fo:inline xsl:use-attribute-sets="mathml-style">
10146
10226
 
10147
10227
  <xsl:call-template name="refine_mathml-style"/>
@@ -10411,7 +10491,7 @@
10411
10491
 
10412
10492
  <xsl:template match="mn:ul | mn:ol" mode="list" name="list">
10413
10493
 
10414
- <xsl:apply-templates select="mn:name">
10494
+ <xsl:apply-templates select="mn:fmt-name">
10415
10495
  <xsl:with-param name="process">true</xsl:with-param>
10416
10496
  </xsl:apply-templates>
10417
10497
 
@@ -10457,7 +10537,7 @@
10457
10537
 
10458
10538
  <xsl:call-template name="refine_list-style"/>
10459
10539
 
10460
- <xsl:if test="mn:name">
10540
+ <xsl:if test="mn:fmt-name">
10461
10541
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
10462
10542
  </xsl:if>
10463
10543
 
@@ -10472,7 +10552,7 @@
10472
10552
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
10473
10553
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
10474
10554
 
10475
- <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
10555
+ <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
10476
10556
  <xsl:param name="process">false</xsl:param>
10477
10557
  <xsl:if test="$process = 'true'">
10478
10558
  <fo:block xsl:use-attribute-sets="list-name-style">
@@ -10604,7 +10684,7 @@
10604
10684
  -->
10605
10685
  <!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
10606
10686
  <!-- fn in text -->
10607
- <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))]" priority="2" name="fn">
10687
+ <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))]" priority="2" name="fn">
10608
10688
  <xsl:param name="footnote_body_from_table">false</xsl:param>
10609
10689
 
10610
10690
  <!-- list of unique footnotes -->
@@ -10728,7 +10808,7 @@
10728
10808
  <!-- commented:
10729
10809
  .//mn:bibitem[ancestor::mn:references]/mn:note |
10730
10810
  because 'fn' there is in biblio-tag -->
10731
- <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])]">
10811
+ <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])]">
10732
10812
  <!-- copy unique fn -->
10733
10813
  <fn gen_id="{generate-id(.)}">
10734
10814
  <xsl:copy-of select="@*"/>
@@ -10808,7 +10888,7 @@
10808
10888
  <xsl:call-template name="displayAdmonitionName"/>
10809
10889
  </fo:block>
10810
10890
  <fo:block xsl:use-attribute-sets="admonition-p-style">
10811
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
10891
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
10812
10892
  </fo:block>
10813
10893
 
10814
10894
  </fo:block-container>
@@ -10834,7 +10914,7 @@
10834
10914
  </xsl:otherwise>
10835
10915
  </xsl:choose> -->
10836
10916
  <xsl:variable name="name">
10837
- <xsl:apply-templates select="mn:name"/>
10917
+ <xsl:apply-templates select="mn:fmt-name"/>
10838
10918
  </xsl:variable>
10839
10919
  <xsl:copy-of select="$name"/>
10840
10920
  <xsl:if test="normalize-space($name) != ''">
@@ -10842,7 +10922,7 @@
10842
10922
  </xsl:if>
10843
10923
  </xsl:template>
10844
10924
 
10845
- <xsl:template match="mn:admonition/mn:name">
10925
+ <xsl:template match="mn:admonition/mn:fmt-name">
10846
10926
  <xsl:apply-templates/>
10847
10927
  </xsl:template>
10848
10928
 
@@ -10970,10 +11050,10 @@
10970
11050
  <xsl:call-template name="setNamedDestination"/>
10971
11051
  <fo:block id="{@id}"/>
10972
11052
 
10973
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
11053
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
10974
11054
 
10975
11055
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
10976
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
11056
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
10977
11057
  </fo:block>
10978
11058
  </xsl:template> <!-- references -->
10979
11059
 
@@ -11287,7 +11367,8 @@
11287
11367
  </xsl:copy>
11288
11368
  </xsl:template>
11289
11369
 
11290
- <xsl:template match="mn:xref" mode="index_add_id">
11370
+ <xsl:template match="mn:xref" mode="index_add_id"/>
11371
+ <xsl:template match="mn:fmt-xref" mode="index_add_id">
11291
11372
  <xsl:param name="docid"/>
11292
11373
  <xsl:variable name="id">
11293
11374
  <xsl:call-template name="generateIndexXrefId">
@@ -11329,7 +11410,7 @@
11329
11410
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
11330
11411
  <xsl:copy>
11331
11412
  <xsl:apply-templates select="@*" mode="index_update"/>
11332
- <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
11413
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
11333
11414
  </xsl:copy>
11334
11415
  </xsl:template>
11335
11416
 
@@ -11350,11 +11431,11 @@
11350
11431
  <xsl:value-of select="."/>
11351
11432
  <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
11352
11433
  </xsl:when>
11353
- <xsl:when test="self::* and local-name(.) = 'xref'">
11434
+ <xsl:when test="self::* and local-name(.) = 'fmt-xref'">
11354
11435
  <xsl:variable name="id" select="@id"/>
11355
11436
 
11356
- <xsl:variable name="id_next" select="following-sibling::mn:xref[1]/@id"/>
11357
- <xsl:variable name="id_prev" select="preceding-sibling::mn:xref[1]/@id"/>
11437
+ <xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
11438
+ <xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
11358
11439
 
11359
11440
  <xsl:variable name="pages_">
11360
11441
  <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
@@ -11450,18 +11531,18 @@
11450
11531
  <xsl:variable name="item_number">
11451
11532
  <xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
11452
11533
  </xsl:variable>
11453
- <xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
11534
+ <xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
11454
11535
  <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
11455
11536
  </xsl:template>
11456
11537
 
11457
- <xsl:template match="mn:indexsect/mn:title" priority="4">
11538
+ <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
11458
11539
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
11459
11540
  <!-- Index -->
11460
11541
  <xsl:apply-templates/>
11461
11542
  </fo:block>
11462
11543
  </xsl:template>
11463
11544
 
11464
- <xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
11545
+ <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
11465
11546
  <!-- Letter A, B, C, ... -->
11466
11547
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
11467
11548
  <xsl:apply-templates/>
@@ -11502,12 +11583,12 @@
11502
11583
  <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"/>
11503
11584
  <bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
11504
11585
  <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"/> -->
11505
- <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]">
11586
+ <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]">
11506
11587
  <!-- skip here, see the template 'fmt-review-start' -->
11507
11588
  </xsl:when>
11508
11589
  <xsl:otherwise>
11509
11590
  <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
11510
- <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>
11591
+ <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>
11511
11592
  <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
11512
11593
  <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
11513
11594
  </xsl:otherwise>
@@ -11671,7 +11752,7 @@
11671
11752
 
11672
11753
  <xsl:template name="processTables_Contents">
11673
11754
  <mnx:tables>
11674
- <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
11755
+ <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
11675
11756
  <xsl:choose>
11676
11757
  <xsl:when test="mn:fmt-name">
11677
11758
  <xsl:variable name="fmt_name">
@@ -11693,7 +11774,7 @@
11693
11774
 
11694
11775
  <xsl:template name="processFigures_Contents">
11695
11776
  <mnx:figures>
11696
- <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) != '']">
11777
+ <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) != '']">
11697
11778
  <xsl:choose>
11698
11779
  <xsl:when test="mn:fmt-name">
11699
11780
  <xsl:variable name="fmt_name">
@@ -11722,7 +11803,7 @@
11722
11803
 
11723
11804
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
11724
11805
 
11725
- <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">
11806
+ <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">
11726
11807
  <xsl:apply-templates mode="contents"/>
11727
11808
  <xsl:text> </xsl:text>
11728
11809
  </xsl:template>
@@ -11734,7 +11815,7 @@
11734
11815
  </xsl:if>
11735
11816
  </xsl:template>
11736
11817
 
11737
- <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">
11818
+ <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">
11738
11819
  <xsl:apply-templates mode="bookmarks"/>
11739
11820
  <xsl:text> </xsl:text>
11740
11821
  </xsl:template>
@@ -11745,7 +11826,7 @@
11745
11826
  </xsl:if>
11746
11827
  </xsl:template>
11747
11828
 
11748
- <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">
11829
+ <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">
11749
11830
  <xsl:value-of select="."/>
11750
11831
  </xsl:template>
11751
11832
 
@@ -11755,7 +11836,7 @@
11755
11836
  </xsl:if>
11756
11837
  </xsl:template>
11757
11838
 
11758
- <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">
11839
+ <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">
11759
11840
  <xsl:value-of select="."/>
11760
11841
  </xsl:template>
11761
11842
 
@@ -12216,7 +12297,7 @@
12216
12297
  <xsl:value-of select="."/>
12217
12298
  </xsl:template>
12218
12299
 
12219
- <xsl:template match="mn:review" mode="contents_item"/>
12300
+ <xsl:template match="mn:annotation" mode="contents_item"/>
12220
12301
 
12221
12302
  <xsl:template match="mn:tab" mode="contents_item">
12222
12303
  <xsl:text> </xsl:text>
@@ -12371,7 +12452,7 @@
12371
12452
  <xsl:apply-templates/>
12372
12453
  </xsl:template>
12373
12454
 
12374
- <xsl:template match="mn:toc//mn:xref" priority="3">
12455
+ <xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
12375
12456
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
12376
12457
  <!-- New format: one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
12377
12458
  <!-- <test><xsl:copy-of select="."/></test> -->
@@ -12439,8 +12520,8 @@
12439
12520
  <xsl:apply-templates mode="toc_table_width"/>
12440
12521
  </xsl:template>
12441
12522
 
12442
- <xsl:template match="mn:clause[@type = 'toc']/mn:title" mode="toc_table_width"/>
12443
- <xsl:template match="mn:clause[not(@type = 'toc')]/mn:title" mode="toc_table_width"/>
12523
+ <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
12524
+ <xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
12444
12525
 
12445
12526
  <xsl:template match="mn:li" mode="toc_table_width">
12446
12527
  <mn:tr>
@@ -12448,7 +12529,7 @@
12448
12529
  </mn:tr>
12449
12530
  </xsl:template>
12450
12531
 
12451
- <xsl:template match="mn:xref" mode="toc_table_width">
12532
+ <xsl:template match="mn:fmt-xref" mode="toc_table_width">
12452
12533
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
12453
12534
  <!-- New format - one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
12454
12535
  <xsl:for-each select="mn:tab">
@@ -12522,10 +12603,10 @@
12522
12603
 
12523
12604
  </xsl:template> <!-- tab -->
12524
12605
 
12525
- <xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
12526
- <xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
12606
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
12607
+ <xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
12527
12608
 
12528
- <xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
12609
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
12529
12610
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
12530
12611
  </xsl:template>
12531
12612
 
@@ -12540,13 +12621,13 @@
12540
12621
  </xsl:template>
12541
12622
 
12542
12623
  <xsl:variable name="reviews_">
12543
- <xsl:for-each select="//mn:review[not(parent::mn:review-container)][@from]">
12624
+ <xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
12544
12625
  <xsl:copy>
12545
12626
  <xsl:copy-of select="@from"/>
12546
12627
  <xsl:copy-of select="@id"/>
12547
12628
  </xsl:copy>
12548
12629
  </xsl:for-each>
12549
- <xsl:for-each select="//mn:fmt-review-start[@source]">
12630
+ <xsl:for-each select="//mn:fmt-annotation-start[@source]">
12550
12631
  <xsl:copy>
12551
12632
  <xsl:copy-of select="@source"/>
12552
12633
  <xsl:copy-of select="@id"/>
@@ -12560,7 +12641,7 @@
12560
12641
  <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
12561
12642
  <xsl:variable name="curr_id" select="@id"/>
12562
12643
  <!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
12563
- <xsl:for-each select="$reviews//mn:review[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
12644
+ <xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
12564
12645
  <xsl:variable name="review_id" select="normalize-space(@id)"/>
12565
12646
  <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
12566
12647
  <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>
@@ -12575,7 +12656,7 @@
12575
12656
 
12576
12657
  <!-- document text (not figures, or tables) footnotes -->
12577
12658
  <xsl:variable name="reviews_container_">
12578
- <xsl:for-each select="//mn:review-container/mn:fmt-review-body">
12659
+ <xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
12579
12660
  <xsl:variable name="update_xml_step1">
12580
12661
  <xsl:apply-templates select="." mode="update_xml_step1"/>
12581
12662
  </xsl:variable>
@@ -12584,10 +12665,10 @@
12584
12665
  </xsl:variable>
12585
12666
  <xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
12586
12667
 
12587
- <xsl:template match="mn:review-container"/>
12668
+ <xsl:template match="mn:annotation-container"/>
12588
12669
 
12589
12670
  <!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
12590
- <xsl:template match="mn:review[not(parent::mn:review-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
12671
+ <xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
12591
12672
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
12592
12673
  <xsl:if test="$isGenerateTableIF = 'false'">
12593
12674
  <xsl:choose>
@@ -12607,7 +12688,7 @@
12607
12688
  </xsl:template>
12608
12689
 
12609
12690
  <!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
12610
- <xsl:template match="mn:fmt-review-start" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
12691
+ <xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
12611
12692
  <!-- comment 2019-11-29 -->
12612
12693
  <!-- <fo:block font-weight="bold">Review:</fo:block>
12613
12694
  <xsl:apply-templates /> -->
@@ -12663,7 +12744,7 @@
12663
12744
  </xsl:template>
12664
12745
 
12665
12746
  <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
12666
- <xsl:template match="mn:review[@type = 'other']"/>
12747
+ <xsl:template match="mn:annotation[@type = 'other']"/>
12667
12748
 
12668
12749
  <!-- ============ -->
12669
12750
  <!-- errata -->
@@ -13056,9 +13137,12 @@
13056
13137
  <xsl:choose>
13057
13138
  <xsl:when test="mn:fmt-title">
13058
13139
  <xsl:variable name="fmt_title_section">
13059
- <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:review)]"/>
13140
+ <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
13060
13141
  </xsl:variable>
13061
13142
  <xsl:value-of select="normalize-space($fmt_title_section)"/>
13143
+ <xsl:if test="normalize-space($fmt_title_section) = ''">
13144
+ <xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
13145
+ </xsl:if>
13062
13146
  </xsl:when>
13063
13147
  <xsl:otherwise>
13064
13148
  <xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
@@ -13071,6 +13155,9 @@
13071
13155
  <xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
13072
13156
  <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
13073
13157
  </xsl:when>
13158
+ <xsl:when test="mn:fmt-title/mn:tab">
13159
+ <xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
13160
+ </xsl:when>
13074
13161
  <xsl:when test="mn:fmt-title">
13075
13162
  <xsl:copy-of select="mn:fmt-title/node()"/>
13076
13163
  </xsl:when>
@@ -13212,10 +13299,10 @@
13212
13299
 
13213
13300
  </fo:block>
13214
13301
 
13215
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
13302
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
13216
13303
 
13217
13304
  <fo:block>
13218
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
13305
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
13219
13306
  </fo:block>
13220
13307
  </xsl:otherwise>
13221
13308
  </xsl:choose>
@@ -13224,7 +13311,7 @@
13224
13311
  <xsl:template name="refine_annex_style">
13225
13312
  </xsl:template>
13226
13313
 
13227
- <xsl:template match="mn:name/text()">
13314
+ <xsl:template match="mn:name/text() | mn:fmt-name/text()">
13228
13315
  <!-- 0xA0 to space replacement -->
13229
13316
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
13230
13317
  </xsl:template>
@@ -13280,28 +13367,28 @@
13280
13367
  <xsl:template match="mn:amend"/>
13281
13368
 
13282
13369
  <!-- fmt-title renamed to title in update_xml_step1 -->
13283
- <xsl:template match="mn:fmt-title"/>
13370
+ <!-- <xsl:template match="mn:fmt-title" /> -->
13284
13371
 
13285
13372
  <!-- fmt-name renamed to name in update_xml_step1 -->
13286
- <xsl:template match="mn:fmt-name"/>
13373
+ <!-- <xsl:template match="mn:fmt-name" /> -->
13287
13374
 
13288
13375
  <!-- fmt-preferred renamed to preferred in update_xml_step1 -->
13289
- <xsl:template match="mn:fmt-preferred"/>
13376
+ <!-- <xsl:template match="mn:fmt-preferred" /> -->
13290
13377
 
13291
13378
  <!-- fmt-admitted renamed to admitted in update_xml_step1 -->
13292
- <xsl:template match="mn:fmt-admitted"/>
13379
+ <!-- <xsl:template match="mn:fmt-admitted" /> -->
13293
13380
 
13294
13381
  <!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
13295
- <xsl:template match="mn:fmt-deprecates"/>
13382
+ <!-- <xsl:template match="mn:fmt-deprecates" /> -->
13296
13383
 
13297
13384
  <!-- fmt-definition renamed to definition in update_xml_step1 -->
13298
- <xsl:template match="mn:fmt-definition"/>
13385
+ <!-- <xsl:template match="mn:fmt-definition" /> -->
13299
13386
 
13300
13387
  <!-- fmt-termsource renamed to termsource in update_xml_step1 -->
13301
- <xsl:template match="mn:fmt-termsource"/>
13388
+ <!-- <xsl:template match="mn:fmt-termsource" /> -->
13302
13389
 
13303
13390
  <!-- fmt-source renamed to source in update_xml_step1 -->
13304
- <xsl:template match="mn:fmt-source"/>
13391
+ <!-- <xsl:template match="mn:fmt-source" /> -->
13305
13392
 
13306
13393
  <xsl:template match="mn:semx">
13307
13394
  <xsl:apply-templates/>
@@ -13746,12 +13833,12 @@
13746
13833
  <xsl:when test="ancestor::mn:preface">
13747
13834
  <xsl:value-of select="$level_total - 2"/>
13748
13835
  </xsl:when>
13749
- <xsl:when test="ancestor::mn:sections and self::mn:title">
13836
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
13750
13837
  <!-- determine 'depth' depends on upper clause with title/@depth -->
13751
13838
  <!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
13752
- <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:title/@depth][1]/mn:title/@depth"/>
13839
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
13753
13840
  <!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
13754
- <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:title/@depth][1]/ancestor::*)"/>
13841
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
13755
13842
  <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
13756
13843
  <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
13757
13844
  <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
@@ -13767,8 +13854,8 @@
13767
13854
  </xsl:otherwise>
13768
13855
  </xsl:choose>
13769
13856
  </xsl:when>
13770
- <xsl:when test="ancestor::mn:sections and self::mn:name and parent::mn:term">
13771
- <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:title/@depth)"/>
13857
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
13858
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
13772
13859
  <xsl:choose>
13773
13860
  <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
13774
13861
  <xsl:value-of select="number($upper_terms_depth + 1)"/>
@@ -13779,7 +13866,7 @@
13779
13866
  </xsl:choose>
13780
13867
  </xsl:when>
13781
13868
  <xsl:when test="ancestor::mn:sections">
13782
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:title/@depth)"/>
13869
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
13783
13870
  <xsl:choose>
13784
13871
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13785
13872
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -13795,8 +13882,8 @@
13795
13882
  <xsl:when test="parent::mn:annex">
13796
13883
  <xsl:value-of select="$level_total - 1"/>
13797
13884
  </xsl:when>
13798
- <xsl:when test="ancestor::mn:annex and self::mn:title">
13799
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:title/@depth)"/>
13885
+ <xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
13886
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
13800
13887
  <xsl:choose>
13801
13888
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13802
13889
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -13829,7 +13916,7 @@
13829
13916
  </xsl:when>
13830
13917
  <xsl:otherwise>
13831
13918
  <xsl:variable name="title_level_">
13832
- <xsl:for-each select="../preceding-sibling::mn:title[1]">
13919
+ <xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
13833
13920
  <xsl:call-template name="getLevel"/>
13834
13921
  </xsl:for-each>
13835
13922
  </xsl:variable>
@@ -13906,15 +13993,17 @@
13906
13993
  </xsl:template>
13907
13994
 
13908
13995
  <xsl:template name="setNamedDestination">
13909
- <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
13910
- <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'">
13911
- <fox:destination internal-destination="{@id}"/>
13912
- </xsl:if>
13913
- <xsl:for-each select=". | mn:title | mn:name">
13914
- <xsl:if test="@named_dest">
13915
- <fox:destination internal-destination="{@named_dest}"/>
13996
+ <xsl:if test="$isGenerateTableIF = 'false'">
13997
+ <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
13998
+ <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'">
13999
+ <fox:destination internal-destination="{@id}"/>
13916
14000
  </xsl:if>
13917
- </xsl:for-each>
14001
+ <xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
14002
+ <xsl:if test="@named_dest">
14003
+ <fox:destination internal-destination="{@named_dest}"/>
14004
+ </xsl:if>
14005
+ </xsl:for-each>
14006
+ </xsl:if>
13918
14007
  </xsl:template>
13919
14008
 
13920
14009
  <xsl:template name="add-letter-spacing">
@@ -14262,7 +14351,7 @@
14262
14351
  </xsl:when>
14263
14352
  <xsl:otherwise>
14264
14353
  <!-- namespace-uri(ancestor::mn:title) != '' to skip title from $contents -->
14265
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
14354
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
14266
14355
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
14267
14356
  </xsl:if>
14268
14357
  <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">
@@ -14296,7 +14385,7 @@
14296
14385
  </fo:block>
14297
14386
  </fo:block-container>
14298
14387
  </fo:inline-container>
14299
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
14388
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
14300
14389
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
14301
14390
  </xsl:if>
14302
14391
  </xsl:otherwise>