metanorma-ribose 2.6.9 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  <xsl:output 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
-
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
323
 
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"/>
@@ -468,12 +379,9 @@
468
379
 
469
380
  <xsl:for-each select=".//mn:page_sequence[normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
470
381
 
471
- <fo:page-sequence master-reference="document" force-page-count="no-force">
382
+ <xsl:variable name="page_orientation"><xsl:call-template name="getPageSequenceOrientation"/></xsl:variable>
472
383
 
473
- <xsl:attribute name="master-reference">
474
- <xsl:text>document</xsl:text>
475
- <xsl:call-template name="getPageSequenceOrientation"/>
476
- </xsl:attribute>
384
+ <fo:page-sequence master-reference="document{$page_orientation}" force-page-count="no-force">
477
385
 
478
386
  <xsl:call-template name="insertFootnoteSeparatorCommon"/>
479
387
 
@@ -505,6 +413,103 @@
505
413
  </fo:root>
506
414
  </xsl:template>
507
415
 
416
+ <xsl:template name="cover-page">
417
+ <!-- Cover Page -->
418
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
419
+
420
+ <fo:flow flow-name="xsl-region-body" color="black">
421
+ <!-- background image -->
422
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
423
+ <fo:block>
424
+ <!-- <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"/> -->
425
+ <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"/>
426
+ </fo:block>
427
+ </fo:block-container>
428
+
429
+ <!-- Ribose logo -->
430
+ <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" -->
431
+ <fo:block>
432
+ <fo:instream-foreign-object content-width="32mm" fox:alt-text="Ribose Logo">
433
+ <xsl:copy-of select="$Ribose-Logo"/>
434
+ </fo:instream-foreign-object>
435
+ </fo:block>
436
+ </fo:block-container>
437
+
438
+ <fo:block-container absolute-position="fixed" left="0mm" top="{$pageHeight - 52.4}mm" height="41mm" display-align="after"> <!-- top="227mm" -->
439
+ <fo:block font-size="10pt" line-height="1.4">
440
+ <fo:table table-layout="fixed" width="100%">
441
+ <fo:table-column column-width="proportional-column-width(13)"/>
442
+ <fo:table-column column-width="proportional-column-width(38)"/>
443
+ <fo:table-column column-width="proportional-column-width(90)"/>
444
+ <fo:table-column column-width="proportional-column-width(61)"/>
445
+ <fo:table-column column-width="proportional-column-width(12)"/>
446
+ <fo:table-body>
447
+ <fo:table-row>
448
+ <fo:table-cell><fo:block/></fo:table-cell>
449
+ <fo:table-cell display-align="before" border-right="0.5pt solid black" padding-top="1.5mm" padding-right="5mm">
450
+ <!-- Author's list -->
451
+ <fo:block>
452
+ <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
453
+ <fo:block>
454
+ <xsl:apply-templates/>
455
+ </fo:block>
456
+ </xsl:for-each>
457
+ </fo:block>
458
+ </fo:table-cell>
459
+ <fo:table-cell display-align="before" padding-top="1.5mm" padding-left="8mm">
460
+ <fo:block>
461
+ <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:ext/mn:security"/>
462
+ <fo:block>
463
+ <xsl:call-template name="convertDate">
464
+ <xsl:with-param name="date" select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']/mn:on"/>
465
+ <xsl:with-param name="format" select="'Month DD, YYYY'"/>
466
+ </xsl:call-template>
467
+ </fo:block>
468
+ <fo:block><xsl:value-of select="$docnumber_version"/></fo:block>
469
+ <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/>
470
+ <fo:block>
471
+ <xsl:text>© </xsl:text>
472
+ <xsl:value-of select="$copyright_year"/>
473
+ <xsl:text> </xsl:text>
474
+ <xsl:variable name="publisher" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='publisher']/mn:organization/mn:name"/>
475
+ <xsl:value-of select="$publisher"/>
476
+ <xsl:if test="substring($publisher, string-length($publisher)) != '.'"><xsl:text>.</xsl:text></xsl:if>
477
+ <xsl:text> </xsl:text>
478
+ <xsl:call-template name="getLocalizedString">
479
+ <xsl:with-param name="key">all_rights_reserved</xsl:with-param>
480
+ </xsl:call-template>
481
+ </fo:block>
482
+ </fo:block>
483
+ </fo:table-cell>
484
+ <fo:table-cell display-align="after">
485
+ <fo:block text-align="right">
486
+ <!-- <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"/> -->
487
+ </fo:block>
488
+ </fo:table-cell>
489
+ <fo:table-cell><fo:block/></fo:table-cell>
490
+ </fo:table-row>
491
+ </fo:table-body>
492
+ </fo:table>
493
+ </fo:block>
494
+ </fo:block-container>
495
+
496
+ <!-- title and version -->
497
+ <fo:block-container margin-top="{$pageHeight - 279.4}mm" height="60mm" display-align="center">
498
+ <xsl:variable name="title" select="/mn:metanorma/mn:bibdata/mn:title[@language = $lang]"/>
499
+ <xsl:if test="string-length($title) &gt; 80">
500
+ <xsl:attribute name="margin-right">-30mm</xsl:attribute>
501
+ </xsl:if>
502
+ <fo:block font-size="27pt" font-weight="bold" role="H1">
503
+ <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@language = $lang]" mode="cover_page"/>
504
+ </fo:block>
505
+ <fo:block space-before="9pt" font-size="16.8pt" font-weight="600">
506
+ <xsl:value-of select="$docnumber_version"/>
507
+ </fo:block>
508
+ </fo:block-container>
509
+ </fo:flow>
510
+ </fo:page-sequence>
511
+ </xsl:template> <!-- END: cover-page -->
512
+
508
513
  <xsl:template name="processPrefaceAndMainSectionsRibose_items">
509
514
  <xsl:variable name="updated_xml_step_move_pagebreak">
510
515
 
@@ -569,13 +574,13 @@
569
574
 
570
575
  <xsl:template name="insertListOf_Title">
571
576
  <xsl:param name="title"/>
572
- <fo:block font-size="13pt" font-weight="bold" color="black" margin-top="12pt" margin-bottom="12pt" keep-with-next="always">
577
+ <fo:block xsl:use-attribute-sets="toc-listof-title-style">
573
578
  <xsl:value-of select="$title"/>
574
579
  </fo:block>
575
580
  </xsl:template>
576
581
 
577
582
  <xsl:template name="insertListOf_Item">
578
- <fo:block font-size="13pt" role="TOCI" margin-left="16.5mm" space-before="4pt" space-after="5pt">
583
+ <fo:block xsl:use-attribute-sets="toc-listof-item-style">
579
584
  <fo:block text-align-last="justify">
580
585
  <fo:basic-link internal-destination="{@id}">
581
586
  <xsl:call-template name="setAltText">
@@ -584,8 +589,8 @@
584
589
  <xsl:apply-templates select="." mode="contents"/>
585
590
  <xsl:text>  </xsl:text>
586
591
  <fo:inline>
587
- <fo:leader leader-pattern="rule" rule-thickness="0.2mm"/>
588
- <fo:inline padding-left="2mm"><fo:page-number-citation ref-id="{@id}"/></fo:inline>
592
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
593
+ <fo:inline xsl:use-attribute-sets="toc-pagenumber-style"><fo:page-number-citation ref-id="{@id}"/></fo:inline>
589
594
  </fo:inline>
590
595
  </fo:basic-link>
591
596
  </fo:block>
@@ -596,32 +601,21 @@
596
601
  <xsl:apply-templates/>
597
602
  </xsl:template>
598
603
 
599
- <xsl:template match="mn:preface/mn:clause[@type = 'toc']" priority="3">
604
+ <xsl:template match="mn:preface/mn:clause[@type = 'toc']" name="toc" priority="3">
600
605
  <fo:block role="TOC">
601
606
  <xsl:apply-templates/>
602
607
 
603
- <xsl:if test="count(*) = 1 and mn:title"> <!-- if there isn't user ToC -->
608
+ <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
604
609
 
605
610
  <xsl:if test="$contents//mnx:item[@display = 'true']">
606
611
 
607
- <fo:block-container margin-left="32mm" margin-right="-17mm">
612
+ <fo:block-container xsl:use-attribute-sets="toc-style">
608
613
  <fo:block-container margin-left="0mm" margin-right="0mm">
609
614
  <xsl:for-each select="$contents//mnx:item[@display = 'true']">
610
- <fo:block font-size="13pt" role="TOCI">
611
- <xsl:if test="@level = 1">
612
- <xsl:if test="preceding-sibling::mnx:item[@display = 'true' and @level = 1]">
613
- <xsl:attribute name="space-before">16pt</xsl:attribute>
614
- </xsl:if>
615
- <xsl:attribute name="space-after">4pt</xsl:attribute>
616
- <xsl:attribute name="font-weight">bold</xsl:attribute>
617
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
618
- <xsl:attribute name="color">black</xsl:attribute>
619
- </xsl:if>
620
- <xsl:if test="@level &gt;= 2">
621
- <xsl:attribute name="margin-left"><xsl:value-of select="(@level - 1) * 16.5"/>mm</xsl:attribute>
622
- <xsl:attribute name="space-before">4pt</xsl:attribute>
623
- <xsl:attribute name="space-after">5pt</xsl:attribute>
624
- </xsl:if>
615
+ <fo:block xsl:use-attribute-sets="toc-item-style">
616
+
617
+ <xsl:call-template name="refine_toc-item-style"/>
618
+
625
619
  <fo:block text-align-last="justify">
626
620
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}">
627
621
  <xsl:value-of select="@section"/>
@@ -629,8 +623,8 @@
629
623
  <xsl:apply-templates select="mnx:title"/>
630
624
  <xsl:text>  </xsl:text>
631
625
  <fo:inline>
632
- <fo:leader leader-pattern="rule" rule-thickness="0.2mm"/>
633
- <fo:inline padding-left="2mm"><fo:page-number-citation ref-id="{@id}"/></fo:inline>
626
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
627
+ <fo:inline xsl:use-attribute-sets="toc-pagenumber-style"><fo:page-number-citation ref-id="{@id}"/></fo:inline>
634
628
  </fo:inline>
635
629
  </fo:basic-link>
636
630
  </fo:block>
@@ -667,8 +661,8 @@
667
661
  </fo:block>
668
662
  </xsl:template>
669
663
 
670
- <xsl:template match="mn:preface/mn:clause[@type = 'toc']/mn:title" priority="3">
671
- <fo:block font-size="27pt" font-weight="bold" color="black" margin-left="-15mm" margin-bottom="13mm" role="H1">
664
+ <xsl:template match="mn:preface/mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
665
+ <fo:block xsl:use-attribute-sets="toc-title-style">
672
666
  <!-- <xsl:call-template name="getLocalizedString">
673
667
  <xsl:with-param name="key">table_of_contents</xsl:with-param>
674
668
  </xsl:call-template> -->
@@ -779,7 +773,7 @@
779
773
  </fo:block>
780
774
  </xsl:template> -->
781
775
 
782
- <xsl:template match="mn:title" name="title">
776
+ <xsl:template match="mn:fmt-title" name="title">
783
777
 
784
778
  <xsl:variable name="level">
785
779
  <xsl:call-template name="getLevel"/>
@@ -906,7 +900,7 @@
906
900
  <xsl:variable name="element-name">
907
901
  <xsl:choose>
908
902
  <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 -->
903
+ <xsl:when test="../@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
910
904
  <xsl:when test="parent::mn:admonition">fo:inline</xsl:when>
911
905
  <xsl:otherwise>fo:block</xsl:otherwise>
912
906
  </xsl:choose>
@@ -978,14 +972,14 @@
978
972
  <fo:list-item-label><fo:block/></fo:list-item-label>
979
973
  <fo:list-item-body>
980
974
  <fo:block>
981
- <xsl:apply-templates select="mn:name"/>
982
- <xsl:apply-templates select="node()[not(parent::mn:name)]"/>
975
+ <xsl:apply-templates select="mn:fmt-name"/>
976
+ <xsl:apply-templates select="node()[not(parent::mn:fmt-name)]"/>
983
977
  </fo:block>
984
978
  </fo:list-item-body>
985
979
  </fo:list-item>
986
980
  </xsl:template>
987
981
 
988
- <xsl:template match="mn:preferred | mn:deprecates | mn:admitted" priority="2">
982
+ <xsl:template match="mn:fmt-preferred | mn:fmt-deprecates | mn:fmt-admitted" priority="2">
989
983
  <xsl:variable name="level">
990
984
  <xsl:call-template name="getLevel"/>
991
985
  </xsl:variable>
@@ -999,23 +993,23 @@
999
993
  <xsl:call-template name="getLevelTermName"/>
1000
994
  </xsl:variable>
1001
995
  <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]">
996
+ <xsl:if test="preceding-sibling::*[1][self::mn:fmt-name]">
1003
997
  <xsl:attribute name="space-before">11mm</xsl:attribute>
1004
998
  <fo:inline padding-right="1mm">
1005
- <xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
999
+ <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
1006
1000
  </fo:inline>
1007
1001
  </xsl:if>
1008
1002
 
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>
1003
+ <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
1004
 
1011
1005
  <xsl:variable name="term_kind">
1012
1006
  <xsl:choose>
1013
- <xsl:when test="self::mn:deprecates">
1007
+ <xsl:when test="self::mn:fmt-deprecates">
1014
1008
  <xsl:call-template name="getLocalizedString">
1015
1009
  <xsl:with-param name="key">deprecated</xsl:with-param>
1016
1010
  </xsl:call-template>
1017
1011
  </xsl:when>
1018
- <xsl:otherwise><xsl:value-of select="local-name()"/></xsl:otherwise>
1012
+ <xsl:otherwise><xsl:value-of select="substring-after(local-name(), 'fmt-')"/></xsl:otherwise>
1019
1013
  </xsl:choose>
1020
1014
  </xsl:variable>
1021
1015
  <xsl:variable name="kind" select="local-name()"/>
@@ -1023,9 +1017,9 @@
1023
1017
  <fo:inline-container text-align="center" width="29mm">
1024
1018
  <xsl:attribute name="background-color">
1025
1019
  <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>
1020
+ <xsl:when test="$kind = 'fmt-preferred'">rgb(255, 240, 198)</xsl:when>
1021
+ <xsl:when test="$kind = 'fmt-deprecates'">rgb(252, 221, 194)</xsl:when>
1022
+ <xsl:when test="$kind = 'fmt-admitted'">rgb(208, 223, 239)</xsl:when>
1029
1023
  </xsl:choose>
1030
1024
  </xsl:attribute>
1031
1025
  <fo:block padding-top="1mm" padding-bottom="0.5mm">
@@ -1052,7 +1046,7 @@
1052
1046
  <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
1053
1047
  <xsl:attribute name="color">black</xsl:attribute>
1054
1048
  <xsl:attribute name="line-height">125%</xsl:attribute>
1055
- <xsl:apply-templates select="mn:title/node()"/>
1049
+ <xsl:apply-templates select="mn:fmt-title/node()"/>
1056
1050
  </fo:block>
1057
1051
  </fo:table-cell>
1058
1052
  </fo:table-row>
@@ -1061,7 +1055,7 @@
1061
1055
  <fo:table-row>
1062
1056
  <fo:table-cell text-align="left">
1063
1057
  <fo:block>
1064
- <xsl:apply-templates select="node()[not(self::mn:title)]"/>
1058
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
1065
1059
  </fo:block>
1066
1060
  </fo:table-cell>
1067
1061
  </fo:table-row>
@@ -1071,7 +1065,7 @@
1071
1065
  </fo:block>
1072
1066
  </xsl:template>
1073
1067
 
1074
- <xsl:template match="*[self::mn:table or self::mn:figure or self::mn:sourcecode]/mn:name/node()[1][self::text()]" priority="2">
1068
+ <xsl:template match="*[self::mn:table or self::mn:figure or self::mn:sourcecode]/mn:fmt-name/node()[1][self::text()]" priority="2">
1075
1069
  <xsl:choose>
1076
1070
  <xsl:when test="contains(., '—')">
1077
1071
  <xsl:variable name="name_number" select="normalize-space(translate(substring-before(., '—'), ' ', ' '))"/>
@@ -1458,10 +1452,6 @@
1458
1452
  <title-part lang="ru">
1459
1453
  </title-part>
1460
1454
  <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
1455
  </xsl:variable>
1466
1456
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
1467
1457
 
@@ -1916,7 +1906,8 @@
1916
1906
  <xsl:template match="mn:stem" mode="update_xml_step1"/>
1917
1907
 
1918
1908
  <xsl:template match="mn:fmt-stem" mode="update_xml_step1">
1919
- <xsl:element name="stem" namespace="{$namespace_full}">
1909
+ <!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
1910
+ <xsl:copy>
1920
1911
  <xsl:copy-of select="@*"/>
1921
1912
  <xsl:choose>
1922
1913
  <xsl:when test="mn:semx and count(node()) = 1">
@@ -1940,7 +1931,8 @@
1940
1931
  </xsl:choose>
1941
1932
  </xsl:otherwise>
1942
1933
  </xsl:choose>
1943
- </xsl:element>
1934
+ </xsl:copy>
1935
+ <!-- </xsl:element> -->
1944
1936
  </xsl:template>
1945
1937
 
1946
1938
  <xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
@@ -2102,12 +2094,14 @@
2102
2094
  </xsl:template>
2103
2095
 
2104
2096
  <xsl:template match="mn:fmt-title" mode="update_xml_step1">
2105
- <xsl:element name="title" namespace="{$namespace_full}">
2097
+ <!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
2098
+ <xsl:copy>
2106
2099
  <xsl:copy-of select="@*"/>
2107
2100
  <xsl:call-template name="addNamedDestinationAttribute"/>
2108
2101
 
2109
2102
  <xsl:apply-templates mode="update_xml_step1"/>
2110
- </xsl:element>
2103
+ </xsl:copy>
2104
+ <!-- </xsl:element> -->
2111
2105
  </xsl:template>
2112
2106
 
2113
2107
  <xsl:template name="addNamedDestinationAttribute">
@@ -2119,12 +2113,14 @@
2119
2113
  <xsl:apply-templates mode="update_xml_step1"/>
2120
2114
  </xsl:when>
2121
2115
  <xsl:otherwise>
2122
- <xsl:element name="name" namespace="{$namespace_full}">
2116
+ <!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
2117
+ <xsl:copy>
2123
2118
  <xsl:copy-of select="@*"/>
2124
2119
  <xsl:call-template name="addNamedDestinationAttribute"/>
2125
2120
 
2126
2121
  <xsl:apply-templates mode="update_xml_step1"/>
2127
- </xsl:element>
2122
+ </xsl:copy>
2123
+ <!-- </xsl:element> -->
2128
2124
  </xsl:otherwise>
2129
2125
  </xsl:choose>
2130
2126
  </xsl:template>
@@ -2139,7 +2135,7 @@
2139
2135
  <xsl:apply-templates mode="update_xml_step1"/>
2140
2136
  </xsl:template>
2141
2137
  <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}">
2138
+ <xsl:element name="fmt-preferred" namespace="{$namespace_full}">
2143
2139
  <xsl:copy-of select="@*"/>
2144
2140
  <xsl:apply-templates mode="update_xml_step1"/>
2145
2141
  </xsl:element>
@@ -2149,7 +2145,7 @@
2149
2145
  <xsl:apply-templates mode="update_xml_step1"/>
2150
2146
  </xsl:template>
2151
2147
  <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}">
2148
+ <xsl:element name="fmt-admitted" namespace="{$namespace_full}">
2153
2149
  <xsl:copy-of select="@*"/>
2154
2150
  <xsl:apply-templates mode="update_xml_step1"/>
2155
2151
  </xsl:element>
@@ -2159,32 +2155,32 @@
2159
2155
  <xsl:apply-templates mode="update_xml_step1"/>
2160
2156
  </xsl:template>
2161
2157
  <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}">
2158
+ <xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
2163
2159
  <xsl:copy-of select="@*"/>
2164
2160
  <xsl:apply-templates mode="update_xml_step1"/>
2165
2161
  </xsl:element>
2166
2162
  </xsl:template>
2167
2163
 
2168
- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
2164
+ <!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
2169
2165
  <xsl:element name="definition" namespace="{$namespace_full}">
2170
2166
  <xsl:copy-of select="@*"/>
2171
2167
  <xsl:apply-templates mode="update_xml_step1"/>
2172
2168
  </xsl:element>
2173
2169
  </xsl:template>
2174
-
2170
+
2175
2171
  <xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
2176
2172
  <xsl:element name="termsource" namespace="{$namespace_full}">
2177
2173
  <xsl:copy-of select="@*"/>
2178
2174
  <xsl:apply-templates mode="update_xml_step1"/>
2179
2175
  </xsl:element>
2180
2176
  </xsl:template>
2181
-
2177
+
2182
2178
  <xsl:template match="mn:fmt-source" mode="update_xml_step1">
2183
2179
  <xsl:element name="source" namespace="{$namespace_full}">
2184
2180
  <xsl:copy-of select="@*"/>
2185
2181
  <xsl:apply-templates mode="update_xml_step1"/>
2186
2182
  </xsl:element>
2187
- </xsl:template>
2183
+ </xsl:template> -->
2188
2184
 
2189
2185
  <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
2186
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -2207,12 +2203,12 @@
2207
2203
  </xsl:template>
2208
2204
 
2209
2205
  <xsl:template match="mn:identifier" mode="update_xml_step1"/>
2210
- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
2206
+ <!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
2211
2207
  <xsl:element name="identifier" namespace="{$namespace_full}">
2212
2208
  <xsl:copy-of select="@*"/>
2213
2209
  <xsl:apply-templates mode="update_xml_step1"/>
2214
2210
  </xsl:element>
2215
- </xsl:template>
2211
+ </xsl:template> -->
2216
2212
 
2217
2213
  <xsl:template match="mn:concept" mode="update_xml_step1"/>
2218
2214
 
@@ -2222,51 +2218,53 @@
2222
2218
 
2223
2219
  <xsl:template match="mn:eref" mode="update_xml_step1"/>
2224
2220
 
2225
- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
2221
+ <!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
2226
2222
  <xsl:element name="eref" namespace="{$namespace_full}">
2227
2223
  <xsl:copy-of select="@*"/>
2228
2224
  <xsl:apply-templates mode="update_xml_step1"/>
2229
2225
  </xsl:element>
2230
- </xsl:template>
2226
+ </xsl:template> -->
2231
2227
 
2232
2228
  <xsl:template match="mn:xref" mode="update_xml_step1"/>
2233
2229
 
2234
- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
2230
+ <!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
2235
2231
  <xsl:element name="xref" namespace="{$namespace_full}">
2236
2232
  <xsl:copy-of select="@*"/>
2237
2233
  <xsl:apply-templates mode="update_xml_step1"/>
2238
2234
  </xsl:element>
2239
- </xsl:template>
2235
+ </xsl:template> -->
2240
2236
 
2241
2237
  <xsl:template match="mn:link" mode="update_xml_step1"/>
2242
2238
 
2243
- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
2239
+ <!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
2244
2240
  <xsl:element name="link" namespace="{$namespace_full}">
2245
2241
  <xsl:copy-of select="@*"/>
2246
2242
  <xsl:apply-templates mode="update_xml_step1"/>
2247
2243
  </xsl:element>
2248
- </xsl:template>
2244
+ </xsl:template> -->
2249
2245
 
2250
2246
  <xsl:template match="mn:origin" mode="update_xml_step1"/>
2251
2247
 
2252
- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
2248
+ <!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
2253
2249
  <xsl:element name="origin" namespace="{$namespace_full}">
2254
2250
  <xsl:copy-of select="@*"/>
2255
2251
  <xsl:apply-templates mode="update_xml_step1"/>
2256
2252
  </xsl:element>
2257
- </xsl:template>
2253
+ </xsl:template> -->
2258
2254
 
2259
2255
  <xsl:template match="mn:erefstack" mode="update_xml_step1"/>
2260
2256
 
2261
2257
  <xsl:template match="mn:svgmap" mode="update_xml_step1"/>
2262
2258
 
2263
- <xsl:template match="mn:review-container" mode="update_xml_step1"/>
2259
+ <xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
2264
2260
 
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>
2261
+ <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
2262
+ <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
2263
+ <xsl:value-of select="."/>
2264
+ </xsl:element>
2265
+ </xsl:template>
2266
+
2267
+ <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
2270
2268
 
2271
2269
  <!-- END: update new Presentation XML -->
2272
2270
 
@@ -2462,7 +2460,7 @@
2462
2460
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
2463
2461
  <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
2462
 
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">
2463
+ <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
2464
 
2467
2465
  <xsl:variable name="parent" select="local-name(..)"/>
2468
2466
 
@@ -2581,7 +2579,7 @@
2581
2579
  </xsl:if>
2582
2580
  </xsl:template>
2583
2581
 
2584
- <xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
2582
+ <xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
2585
2583
  <xsl:copy-of select="."/>
2586
2584
  </xsl:template>
2587
2585
 
@@ -2911,7 +2909,7 @@
2911
2909
  </fo:block>
2912
2910
  </xsl:template> <!-- copyright-statement -->
2913
2911
 
2914
- <xsl:template match="mn:copyright-statement//mn:title">
2912
+ <xsl:template match="mn:copyright-statement//mn:fmt-title">
2915
2913
  <!-- process in the template 'title' -->
2916
2914
  <xsl:call-template name="title"/>
2917
2915
  </xsl:template> <!-- copyright-statement//title -->
@@ -2927,7 +2925,7 @@
2927
2925
  </fo:block>
2928
2926
  </xsl:template> <!-- license-statement -->
2929
2927
 
2930
- <xsl:template match="mn:license-statement//mn:title">
2928
+ <xsl:template match="mn:license-statement//mn:fmt-title">
2931
2929
  <!-- process in the template 'title' -->
2932
2930
  <xsl:call-template name="title"/>
2933
2931
  </xsl:template> <!-- license-statement/title -->
@@ -2944,7 +2942,7 @@
2944
2942
  </fo:block>
2945
2943
  </xsl:template> <!-- legal-statement -->
2946
2944
 
2947
- <xsl:template match="mn:legal-statement//mn:title">
2945
+ <xsl:template match="mn:legal-statement//mn:fmt-title">
2948
2946
  <!-- ogc-white-paper rsd -->
2949
2947
  <xsl:variable name="level">
2950
2948
  <xsl:call-template name="getLevel"/>
@@ -2969,7 +2967,7 @@
2969
2967
  </fo:block>
2970
2968
  </xsl:template> <!-- feedback-statement -->
2971
2969
 
2972
- <xsl:template match="mn:feedback-statement//mn:title">
2970
+ <xsl:template match="mn:feedback-statement//mn:fmt-title">
2973
2971
  <!-- process in the template 'title' -->
2974
2972
  <xsl:call-template name="title"/>
2975
2973
  </xsl:template>
@@ -3000,7 +2998,7 @@
3000
2998
  </xsl:if>
3001
2999
  </xsl:template> <!-- refine_link-style -->
3002
3000
 
3003
- <xsl:template match="mn:link" name="link">
3001
+ <xsl:template match="mn:fmt-link" name="link">
3004
3002
  <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
3005
3003
  <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
3006
3004
  <xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
@@ -3132,7 +3130,7 @@
3132
3130
  </xsl:attribute-set> <!-- sourcecode-style -->
3133
3131
 
3134
3132
  <xsl:template name="refine_sourcecode-style"> <!-- background for image -->
3135
- <xsl:if test="starts-with(mn:name/text()[1], 'Figure ')">
3133
+ <xsl:if test="starts-with((mn:fmt-name//text())[1], 'Figure ')">
3136
3134
  <xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
3137
3135
  <xsl:attribute name="padding-left">11mm</xsl:attribute>
3138
3136
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -3140,7 +3138,7 @@
3140
3138
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
3141
3139
  <xsl:attribute name="padding-top">7.5mm</xsl:attribute>
3142
3140
  <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 ')">
3141
+ <xsl:if test="following-sibling::*[1][self::mn:sourcecode] and starts-with((mn:fmt-name//text())[1], 'Figure ')">
3144
3142
  <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
3145
3143
  </xsl:if>
3146
3144
  </xsl:if>
@@ -3246,7 +3244,7 @@
3246
3244
  <xsl:value-of select="."/>
3247
3245
  </xsl:attribute>
3248
3246
  </xsl:for-each>
3249
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
3247
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3250
3248
  </xsl:when>
3251
3249
 
3252
3250
  <xsl:otherwise>
@@ -3271,7 +3269,7 @@
3271
3269
  </xsl:attribute>
3272
3270
  </xsl:if>
3273
3271
  <fo:block-container margin-left="0mm" role="SKIP">
3274
- <xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name BEFORE content -->
3272
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
3275
3273
 
3276
3274
  <fo:block xsl:use-attribute-sets="sourcecode-style">
3277
3275
 
@@ -3289,7 +3287,7 @@
3289
3287
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3290
3288
  </xsl:if>
3291
3289
 
3292
- <xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
3290
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
3293
3291
  </fo:block>
3294
3292
 
3295
3293
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
@@ -3593,7 +3591,7 @@
3593
3591
 
3594
3592
  <!-- end mode="syntax_highlight" -->
3595
3593
 
3596
- <xsl:template match="mn:sourcecode/mn:name">
3594
+ <xsl:template match="mn:sourcecode/mn:fmt-name">
3597
3595
  <xsl:if test="normalize-space() != ''">
3598
3596
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
3599
3597
  <xsl:apply-templates/>
@@ -3611,7 +3609,7 @@
3611
3609
  </xsl:choose>
3612
3610
  </xsl:template>
3613
3611
 
3614
- <xsl:template match="mn:annotation">
3612
+ <xsl:template match="mn:callout-annotation">
3615
3613
  <xsl:variable name="annotation-id" select="@id"/>
3616
3614
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
3617
3615
  <fo:block id="{$annotation-id}" white-space="nowrap">
@@ -3623,7 +3621,7 @@
3623
3621
  </fo:block>
3624
3622
  </xsl:template>
3625
3623
 
3626
- <xsl:template match="mn:annotation/mn:p">
3624
+ <xsl:template match="mn:callout-annotation/mn:p">
3627
3625
  <xsl:param name="callout"/>
3628
3626
  <fo:inline id="{@id}">
3629
3627
  <xsl:call-template name="setNamedDestination"/>
@@ -3704,7 +3702,7 @@
3704
3702
  </xsl:template>
3705
3703
 
3706
3704
  <xsl:template name="refine_strong_style">
3707
- <xsl:if test="not(parent::mn:termsource)">
3705
+ <xsl:if test="not(parent::mn:fmt-termsource)">
3708
3706
  <xsl:attribute name="font-weight">normal</xsl:attribute>
3709
3707
  <xsl:attribute name="color">black</xsl:attribute>
3710
3708
  </xsl:if>
@@ -3784,7 +3782,7 @@
3784
3782
  <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
3783
  <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
3786
3784
  <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>
3785
+ <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
3786
  <xsl:otherwise>
3789
3787
  <xsl:variable name="tag">
3790
3788
  <xsl:call-template name="insertTag">
@@ -4185,12 +4183,12 @@
4185
4183
  <xsl:template match="mn:permission">
4186
4184
  <xsl:call-template name="setNamedDestination"/>
4187
4185
  <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)]"/>
4186
+ <xsl:apply-templates select="mn:fmt-name"/>
4187
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4190
4188
  </fo:block>
4191
4189
  </xsl:template>
4192
4190
 
4193
- <xsl:template match="mn:permission/mn:name">
4191
+ <xsl:template match="mn:permission/mn:fmt-name">
4194
4192
  <xsl:if test="normalize-space() != ''">
4195
4193
  <fo:block xsl:use-attribute-sets="permission-name-style">
4196
4194
  <xsl:apply-templates/>
@@ -4212,15 +4210,15 @@
4212
4210
  <xsl:template match="mn:requirement">
4213
4211
  <xsl:call-template name="setNamedDestination"/>
4214
4212
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
4215
- <xsl:apply-templates select="mn:name"/>
4213
+ <xsl:apply-templates select="mn:fmt-name"/>
4216
4214
  <xsl:apply-templates select="mn:label"/>
4217
4215
  <xsl:apply-templates select="@obligation"/>
4218
4216
  <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)]"/>
4217
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
4220
4218
  </fo:block>
4221
4219
  </xsl:template>
4222
4220
 
4223
- <xsl:template match="mn:requirement/mn:name">
4221
+ <xsl:template match="mn:requirement/mn:fmt-name">
4224
4222
  <xsl:if test="normalize-space() != ''">
4225
4223
 
4226
4224
  <fo:block xsl:use-attribute-sets="requirement-name-style">
@@ -4256,12 +4254,12 @@
4256
4254
  <xsl:template match="mn:recommendation">
4257
4255
  <xsl:call-template name="setNamedDestination"/>
4258
4256
  <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)]"/>
4257
+ <xsl:apply-templates select="mn:fmt-name"/>
4258
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4261
4259
  </fo:block>
4262
4260
  </xsl:template>
4263
4261
 
4264
- <xsl:template match="mn:recommendation/mn:name">
4262
+ <xsl:template match="mn:recommendation/mn:fmt-name">
4265
4263
  <xsl:if test="normalize-space() != ''">
4266
4264
 
4267
4265
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
@@ -4519,11 +4517,11 @@
4519
4517
 
4520
4518
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
4521
4519
  </xsl:if>
4522
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4520
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4523
4521
  </fo:block>
4524
4522
  </xsl:template>
4525
4523
 
4526
- <xsl:template match="mn:term/mn:name">
4524
+ <xsl:template match="mn:term/mn:fmt-name">
4527
4525
  <xsl:if test="normalize-space() != ''">
4528
4526
  <!-- <xsl:variable name="level">
4529
4527
  <xsl:call-template name="getLevelTermName"/>
@@ -4542,7 +4540,7 @@
4542
4540
  <!-- origin -->
4543
4541
  <!-- modification -->
4544
4542
  <!-- ====== -->
4545
- <xsl:template match="mn:termsource" name="termsource">
4543
+ <xsl:template match="mn:fmt-termsource" name="termsource">
4546
4544
  <fo:block xsl:use-attribute-sets="termsource-style">
4547
4545
 
4548
4546
  <xsl:call-template name="refine_termsource-style"/>
@@ -4581,24 +4579,24 @@
4581
4579
  </fo:block>
4582
4580
  </xsl:template>
4583
4581
 
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">
4582
+ <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
4583
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
4586
4584
  </xsl:template>
4587
4585
 
4588
- <xsl:template match="mn:termsource/text()">
4586
+ <xsl:template match="mn:fmt-termsource/text()">
4589
4587
  <xsl:if test="normalize-space() != ''">
4590
4588
  <xsl:value-of select="."/>
4591
4589
  </xsl:if>
4592
4590
  </xsl:template>
4593
4591
 
4594
4592
  <!-- text SOURCE: -->
4595
- <xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
4593
+ <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
4596
4594
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
4597
4595
  <xsl:value-of select="."/>
4598
4596
  </fo:inline>
4599
4597
  </xsl:template>
4600
4598
 
4601
- <xsl:template match="mn:origin">
4599
+ <xsl:template match="mn:fmt-origin">
4602
4600
  <xsl:call-template name="insert_basic_link">
4603
4601
  <xsl:with-param name="element">
4604
4602
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -4644,7 +4642,7 @@
4644
4642
  <!-- ====== -->
4645
4643
 
4646
4644
  <!-- Preferred, admitted, deprecated -->
4647
- <xsl:template match="mn:preferred">
4645
+ <xsl:template match="mn:fmt-preferred">
4648
4646
  <xsl:variable name="level">
4649
4647
  <xsl:call-template name="getLevel"/>
4650
4648
  </xsl:variable>
@@ -4655,15 +4653,15 @@
4655
4653
  </xsl:variable>
4656
4654
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
4657
4655
 
4658
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
4656
+ <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
4659
4657
 
4660
4658
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
4661
4659
 
4662
- <xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
4660
+ <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
4663
4661
  <xsl:call-template name="setIDforNamedDestination"/>
4664
4662
  </xsl:for-each>
4665
4663
 
4666
- <xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
4664
+ <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
4667
4665
  </fo:block>
4668
4666
  </xsl:if>
4669
4667
 
@@ -4687,13 +4685,13 @@
4687
4685
  <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
4688
4686
  <xsl:template match="mn:domain"/>
4689
4687
 
4690
- <xsl:template match="mn:admitted">
4688
+ <xsl:template match="mn:fmt-admitted">
4691
4689
  <fo:block xsl:use-attribute-sets="admitted-style">
4692
4690
  <xsl:apply-templates/>
4693
4691
  </fo:block>
4694
4692
  </xsl:template>
4695
4693
 
4696
- <xsl:template match="mn:deprecates">
4694
+ <xsl:template match="mn:fmt-deprecates">
4697
4695
  <fo:block xsl:use-attribute-sets="deprecates-style">
4698
4696
  <xsl:apply-templates/>
4699
4697
  </fo:block>
@@ -4707,7 +4705,7 @@
4707
4705
 
4708
4706
  <!-- 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
4707
  <!-- in metanorma xml preferred terms delimited by semicolons -->
4710
- <xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
4708
+ <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
4711
4709
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
4712
4710
  </xsl:template>
4713
4711
  <!-- End Preferred, admitted, deprecated -->
@@ -4726,16 +4724,16 @@
4726
4724
  <!-- ========== -->
4727
4725
  <!-- definition -->
4728
4726
  <!-- ========== -->
4729
- <xsl:template match="mn:definition">
4727
+ <xsl:template match="mn:fmt-definition">
4730
4728
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
4731
4729
  <xsl:apply-templates/>
4732
4730
  </fo:block>
4733
4731
  </xsl:template>
4734
4732
 
4735
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]">
4733
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
4736
4734
  <xsl:apply-templates/>
4737
4735
  </xsl:template>
4738
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
4736
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
4739
4737
  <fo:inline> <xsl:apply-templates/></fo:inline>
4740
4738
  <fo:block/>
4741
4739
  </xsl:template>
@@ -4807,12 +4805,12 @@
4807
4805
  <xsl:call-template name="refine_termexample-style"/>
4808
4806
  <xsl:call-template name="setBlockSpanAll"/>
4809
4807
 
4810
- <xsl:apply-templates select="mn:name"/>
4811
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4808
+ <xsl:apply-templates select="mn:fmt-name"/>
4809
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4812
4810
  </fo:block>
4813
4811
  </xsl:template>
4814
4812
 
4815
- <xsl:template match="mn:termexample/mn:name">
4813
+ <xsl:template match="mn:termexample/mn:fmt-name">
4816
4814
  <xsl:if test="normalize-space() != ''">
4817
4815
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
4818
4816
  <xsl:call-template name="refine_termexample-name-style"/>
@@ -4863,7 +4861,7 @@
4863
4861
  <xsl:call-template name="refine_example-style"/>
4864
4862
 
4865
4863
  <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
4864
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>inline
4867
4865
  </xsl:variable>
4868
4866
 
4869
4867
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -4874,7 +4872,7 @@
4874
4872
 
4875
4873
  <!-- display name 'EXAMPLE' in a separate block -->
4876
4874
  <fo:block>
4877
- <xsl:apply-templates select="mn:name">
4875
+ <xsl:apply-templates select="mn:fmt-name">
4878
4876
  <xsl:with-param name="fo_element" select="$fo_element"/>
4879
4877
  </xsl:apply-templates>
4880
4878
  </fo:block>
@@ -4882,7 +4880,7 @@
4882
4880
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4883
4881
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4884
4882
  <xsl:variable name="example_body">
4885
- <xsl:apply-templates select="node()[not(self::mn:name)]">
4883
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
4886
4884
  <xsl:with-param name="fo_element" select="$fo_element"/>
4887
4885
  </xsl:apply-templates>
4888
4886
  </xsl:variable>
@@ -4909,14 +4907,14 @@
4909
4907
  <fo:list-item>
4910
4908
  <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
4911
4909
  <fo:block>
4912
- <xsl:apply-templates select="mn:name">
4910
+ <xsl:apply-templates select="mn:fmt-name">
4913
4911
  <xsl:with-param name="fo_element">block</xsl:with-param>
4914
4912
  </xsl:apply-templates>
4915
4913
  </fo:block>
4916
4914
  </fo:list-item-label>
4917
4915
  <fo:list-item-body start-indent="body-start()">
4918
4916
  <fo:block>
4919
- <xsl:apply-templates select="node()[not(self::mn:name)]">
4917
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
4920
4918
  <xsl:with-param name="fo_element" select="$fo_element"/>
4921
4919
  </xsl:apply-templates>
4922
4920
  </fo:block>
@@ -4929,21 +4927,21 @@
4929
4927
 
4930
4928
  <!-- display 'EXAMPLE' and first element in the same line -->
4931
4929
  <fo:block>
4932
- <xsl:apply-templates select="mn:name">
4930
+ <xsl:apply-templates select="mn:fmt-name">
4933
4931
  <xsl:with-param name="fo_element" select="$fo_element"/>
4934
4932
  </xsl:apply-templates>
4935
4933
  <fo:inline>
4936
- <xsl:apply-templates select="*[not(self::mn:name)][1]">
4934
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
4937
4935
  <xsl:with-param name="fo_element" select="$fo_element"/>
4938
4936
  </xsl:apply-templates>
4939
4937
  </fo:inline>
4940
4938
  </fo:block>
4941
4939
 
4942
- <xsl:if test="*[not(self::mn:name)][position() &gt; 1]">
4940
+ <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
4943
4941
  <!-- display further elements in blocks -->
4944
4942
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
4945
4943
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
4946
- <xsl:apply-templates select="*[not(self::mn:name)][position() &gt; 1]">
4944
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
4947
4945
  <xsl:with-param name="fo_element" select="'block'"/>
4948
4946
  </xsl:apply-templates>
4949
4947
  </fo:block-container>
@@ -4957,7 +4955,7 @@
4957
4955
  </xsl:template>
4958
4956
 
4959
4957
  <!-- example/name -->
4960
- <xsl:template match="mn:example/mn:name">
4958
+ <xsl:template match="mn:example/mn:fmt-name">
4961
4959
  <xsl:param name="fo_element">block</xsl:param>
4962
4960
 
4963
4961
  <xsl:choose>
@@ -4982,7 +4980,7 @@
4982
4980
  </xsl:template>
4983
4981
 
4984
4982
  <!-- 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">
4983
+ <xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
4986
4984
  <fo:inline xsl:use-attribute-sets="example-name-style">
4987
4985
  <xsl:apply-templates/>
4988
4986
  </fo:inline>
@@ -5265,7 +5263,7 @@
5265
5263
 
5266
5264
  <!-- Display table's name before table as standalone block -->
5267
5265
  <!-- $namespace = 'iso' or -->
5268
- <xsl:apply-templates select="mn:name"/> <!-- table's title rendered before table -->
5266
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
5269
5267
 
5270
5268
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
5271
5269
 
@@ -5306,7 +5304,7 @@
5306
5304
 
5307
5305
  <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
5308
5306
 
5309
- <xsl:for-each select="mn:name">
5307
+ <xsl:for-each select="mn:fmt-name">
5310
5308
  <xsl:call-template name="setIDforNamedDestination"/>
5311
5309
  </xsl:for-each>
5312
5310
 
@@ -5336,6 +5334,10 @@
5336
5334
  <xsl:with-param name="margin-side" select="$margin-side"/>
5337
5335
  </xsl:call-template>
5338
5336
 
5337
+ <xsl:call-template name="setTableStyles">
5338
+ <xsl:with-param name="scope">table</xsl:with-param>
5339
+ </xsl:call-template>
5340
+
5339
5341
  </xsl:element>
5340
5342
  </xsl:variable>
5341
5343
 
@@ -5356,7 +5358,7 @@
5356
5358
  </xsl:attribute>
5357
5359
  </xsl:for-each>
5358
5360
 
5359
- <xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[local-name(..) != 'name'] or ./mn:source"/>
5361
+ <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
5362
  <xsl:if test="$isNoteOrFnExist = 'true'">
5361
5363
  <!-- <xsl:choose>
5362
5364
  <xsl:when test="$namespace = 'plateau'"></xsl:when>
@@ -5412,7 +5414,7 @@
5412
5414
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
5413
5415
  </xsl:when>
5414
5416
  <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 -->
5417
+ <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
5418
  </xsl:otherwise>
5417
5419
  </xsl:choose>
5418
5420
 
@@ -5509,7 +5511,7 @@
5509
5511
  </xsl:template>
5510
5512
 
5511
5513
  <!-- table/name-->
5512
- <xsl:template match="*[local-name()='table']/mn:name">
5514
+ <xsl:template match="*[local-name()='table']/mn:fmt-name">
5513
5515
  <xsl:param name="continued"/>
5514
5516
  <xsl:param name="cols-count"/>
5515
5517
  <xsl:if test="normalize-space() != ''">
@@ -5574,7 +5576,7 @@
5574
5576
  </xsl:template>
5575
5577
 
5576
5578
  <!-- SOURCE: ... -->
5577
- <xsl:template match="*[local-name()='table']/mn:source" priority="2">
5579
+ <xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
5578
5580
  <xsl:call-template name="termsource"/>
5579
5581
  </xsl:template>
5580
5582
 
@@ -5739,11 +5741,11 @@
5739
5741
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
5740
5742
  </xsl:template>
5741
5743
 
5742
- <xsl:template match="mn:termsource" mode="td_text">
5743
- <xsl:value-of select="*[local-name()='origin']/@citeas"/>
5744
+ <xsl:template match="mn:fmt-termsource" mode="td_text">
5745
+ <xsl:value-of select="mn:fmt-origin/@citeas"/>
5744
5746
  </xsl:template>
5745
5747
 
5746
- <xsl:template match="mn:link" mode="td_text">
5748
+ <xsl:template match="mn:fmt-link" mode="td_text">
5747
5749
  <xsl:value-of select="@target"/>
5748
5750
  </xsl:template>
5749
5751
 
@@ -5945,12 +5947,12 @@
5945
5947
 
5946
5948
  <xsl:call-template name="refine_table-header-title-style"/>
5947
5949
 
5948
- <xsl:apply-templates select="ancestor::mn:table/mn:name">
5950
+ <xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
5949
5951
  <xsl:with-param name="continued">true</xsl:with-param>
5950
5952
  <xsl:with-param name="cols-count" select="$cols-count"/>
5951
5953
  </xsl:apply-templates>
5952
5954
 
5953
- <xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5955
+ <xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5954
5956
  <fo:block role="SKIP"/>
5955
5957
  </xsl:if>
5956
5958
 
@@ -5985,7 +5987,7 @@
5985
5987
  <xsl:param name="colwidths"/>
5986
5988
  <xsl:param name="colgroup"/>
5987
5989
 
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"/>
5990
+ <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
5991
 
5990
5992
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
5991
5993
  </xsl:variable>
@@ -6026,6 +6028,12 @@
6026
6028
  </xsl:choose>
6027
6029
  </xsl:for-each>
6028
6030
 
6031
+ <xsl:for-each select="ancestor::mn:table[1]">
6032
+ <xsl:call-template name="setTableStyles">
6033
+ <xsl:with-param name="scope">table</xsl:with-param>
6034
+ </xsl:call-template>
6035
+ </xsl:for-each>
6036
+
6029
6037
  <xsl:choose>
6030
6038
  <xsl:when test="xalan:nodeset($colgroup)//mn:col">
6031
6039
  <xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
@@ -6042,10 +6050,22 @@
6042
6050
 
6043
6051
  <fo:table-body role="SKIP">
6044
6052
  <fo:table-row role="SKIP">
6053
+ <xsl:for-each select="ancestor::mn:table[1]">
6054
+ <xsl:call-template name="setTableStyles">
6055
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
6056
+ </xsl:call-template>
6057
+ </xsl:for-each>
6058
+
6045
6059
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
6046
6060
 
6047
6061
  <xsl:call-template name="refine_table-footer-cell-style"/>
6048
6062
 
6063
+ <xsl:for-each select="ancestor::mn:table[1]">
6064
+ <xsl:call-template name="setTableStyles">
6065
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
6066
+ </xsl:call-template>
6067
+ </xsl:for-each>
6068
+
6049
6069
  <xsl:call-template name="setBordersTableArray"/>
6050
6070
 
6051
6071
  <!-- fn will be processed inside 'note' processing -->
@@ -6053,7 +6073,7 @@
6053
6073
  <xsl:apply-templates select="../mn:dl"/>
6054
6074
  <xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
6055
6075
  <xsl:apply-templates select="../mn:example"/>
6056
- <xsl:apply-templates select="../mn:source"/>
6076
+ <xsl:apply-templates select="../mn:fmt-source"/>
6057
6077
 
6058
6078
  <xsl:variable name="isDisplayRowSeparator">
6059
6079
  </xsl:variable>
@@ -6242,7 +6262,12 @@
6242
6262
 
6243
6263
  <xsl:template name="setTableRowAttributes">
6244
6264
 
6245
- <xsl:call-template name="setColors"/>
6265
+ <xsl:for-each select="ancestor::mn:table[1]">
6266
+ <xsl:call-template name="setTableStyles">
6267
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
6268
+ </xsl:call-template>
6269
+ </xsl:for-each>
6270
+ <xsl:call-template name="setTableStyles"/>
6246
6271
 
6247
6272
  </xsl:template> <!-- setTableRowAttributes -->
6248
6273
  <!-- ===================== -->
@@ -6295,7 +6320,13 @@
6295
6320
  </xsl:attribute>
6296
6321
  </xsl:if>
6297
6322
  <xsl:call-template name="display-align"/>
6298
- <xsl:call-template name="setColors"/>
6323
+
6324
+ <xsl:for-each select="ancestor::mn:table[1]">
6325
+ <xsl:call-template name="setTableStyles">
6326
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
6327
+ </xsl:call-template>
6328
+ </xsl:for-each>
6329
+ <xsl:call-template name="setTableStyles"/>
6299
6330
  </xsl:template>
6300
6331
 
6301
6332
  <xsl:template name="display-align">
@@ -6311,7 +6342,8 @@
6311
6342
  </xsl:if>
6312
6343
  </xsl:template>
6313
6344
 
6314
- <xsl:template name="setColors">
6345
+ <xsl:template name="setTableStyles">
6346
+ <xsl:param name="scope">cell</xsl:param>
6315
6347
  <xsl:variable name="styles__">
6316
6348
  <xsl:call-template name="split">
6317
6349
  <xsl:with-param name="pText" select="concat(@style,';')"/>
@@ -6320,19 +6352,35 @@
6320
6352
  </xsl:variable>
6321
6353
  <xsl:variable name="quot">"</xsl:variable>
6322
6354
  <xsl:variable name="styles_">
6355
+ <!-- PDF: Borderless tables https://github.com/metanorma/metanorma-jis/issues/344 -->
6356
+ <xsl:if test="@plain = 'true' or ancestor::mn:table/@plain = 'true'">
6357
+ <style name="border-top">none</style>
6358
+ <style name="border-right">none</style>
6359
+ <style name="border-left">none</style>
6360
+ <style name="border-bottom">none</style>
6361
+ <style name="color">inherit</style>
6362
+ <style name="background-color">transparent</style>
6363
+ </xsl:if>
6364
+
6323
6365
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
6324
6366
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
6325
6367
  <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'">
6368
+ <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
6369
  <style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
6328
6370
  </xsl:if>
6371
+ <xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
6372
+ <style name="{$key}-top"><xsl:value-of select="$value"/></style>
6373
+ <style name="{$key}-right"><xsl:value-of select="$value"/></style>
6374
+ <style name="{$key}-left"><xsl:value-of select="$value"/></style>
6375
+ <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
6376
+ </xsl:if>
6329
6377
  </xsl:for-each>
6330
6378
  </xsl:variable>
6331
6379
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
6332
6380
  <xsl:for-each select="$styles/style">
6333
6381
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
6334
6382
  </xsl:for-each>
6335
- </xsl:template> <!-- setColors -->
6383
+ </xsl:template> <!-- setTableStyles -->
6336
6384
 
6337
6385
  <!-- cell in table body, footer -->
6338
6386
  <xsl:template match="*[local-name()='td']" name="td">
@@ -6396,11 +6444,11 @@
6396
6444
 
6397
6445
  <xsl:call-template name="refine_table-note-name-style"/>
6398
6446
 
6399
- <xsl:apply-templates select="mn:name"/>
6447
+ <xsl:apply-templates select="mn:fmt-name"/>
6400
6448
 
6401
6449
  </fo:inline>
6402
6450
 
6403
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
6451
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
6404
6452
  </fo:block>
6405
6453
  </xsl:template> <!-- table/note -->
6406
6454
 
@@ -6539,7 +6587,7 @@
6539
6587
 
6540
6588
  <!-- footnotes for table's name rendering -->
6541
6589
  <xsl:template name="table_name_fn_display">
6542
- <xsl:for-each select="mn:name//mn:fn">
6590
+ <xsl:for-each select="mn:fmt-name//mn:fn">
6543
6591
  <xsl:variable name="reference" select="@reference"/>
6544
6592
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
6545
6593
  <fo:block margin-bottom="12pt">
@@ -7196,7 +7244,7 @@
7196
7244
  </xsl:if> -->
7197
7245
 
7198
7246
  <xsl:variable name="words">
7199
- <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
7247
+ <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
7200
7248
  <word>
7201
7249
  <xsl:copy-of select="."/>
7202
7250
  </word>
@@ -7255,7 +7303,7 @@
7255
7303
  </xsl:copy>
7256
7304
  </xsl:template>
7257
7305
 
7258
- <xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
7306
+ <xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
7259
7307
 
7260
7308
  <xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
7261
7309
  <xsl:variable name="formatting_tags">
@@ -7290,7 +7338,7 @@
7290
7338
  </xsl:call-template>
7291
7339
  </xsl:template>
7292
7340
 
7293
- <xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
7341
+ <xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
7294
7342
  <xsl:variable name="link">
7295
7343
  <link_updated>
7296
7344
  <xsl:variable name="target_text">
@@ -7508,7 +7556,7 @@
7508
7556
 
7509
7557
  <xsl:call-template name="refine_multicomponent_block_style"/>
7510
7558
 
7511
- <xsl:apply-templates select="mn:name">
7559
+ <xsl:apply-templates select="mn:fmt-name">
7512
7560
  <xsl:with-param name="process">true</xsl:with-param>
7513
7561
  </xsl:apply-templates>
7514
7562
 
@@ -7691,7 +7739,7 @@
7691
7739
  </xsl:template> <!-- refine_multicomponent_block_style -->
7692
7740
 
7693
7741
  <!-- dl/name -->
7694
- <xsl:template match="mn:dl/mn:name">
7742
+ <xsl:template match="mn:dl/mn:fmt-name">
7695
7743
  <xsl:param name="process">false</xsl:param>
7696
7744
  <xsl:if test="$process = 'true'">
7697
7745
  <fo:block xsl:use-attribute-sets="dl-name-style">
@@ -8110,12 +8158,12 @@
8110
8158
  <xsl:template match="mn:appendix">
8111
8159
  <xsl:call-template name="setNamedDestination"/>
8112
8160
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
8113
- <xsl:apply-templates select="mn:title"/>
8161
+ <xsl:apply-templates select="mn:fmt-title"/>
8114
8162
  </fo:block>
8115
- <xsl:apply-templates select="node()[not(local-name()='title')]"/>
8163
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
8116
8164
  </xsl:template>
8117
8165
 
8118
- <xsl:template match="mn:appendix/mn:title" priority="2">
8166
+ <xsl:template match="mn:appendix/mn:fmt-title" priority="2">
8119
8167
  <xsl:variable name="level">
8120
8168
  <xsl:call-template name="getLevel"/>
8121
8169
  </xsl:variable>
@@ -8128,15 +8176,15 @@
8128
8176
  <xsl:template match="mn:appendix//mn:example" priority="2">
8129
8177
  <xsl:call-template name="setNamedDestination"/>
8130
8178
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
8131
- <xsl:apply-templates select="mn:name"/>
8179
+ <xsl:apply-templates select="mn:fmt-name"/>
8132
8180
  </fo:block>
8133
- <xsl:apply-templates select="node()[not(local-name()='name')]"/>
8181
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8134
8182
  </xsl:template>
8135
8183
 
8136
8184
  <xsl:attribute-set name="xref-style">
8137
8185
  </xsl:attribute-set>
8138
8186
 
8139
- <xsl:template match="mn:xref">
8187
+ <xsl:template match="mn:fmt-xref">
8140
8188
  <xsl:call-template name="insert_basic_link">
8141
8189
  <xsl:with-param name="element">
8142
8190
  <xsl:variable name="alt_text">
@@ -8156,7 +8204,7 @@
8156
8204
  </xsl:template> <!-- xref -->
8157
8205
 
8158
8206
  <!-- 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="."/>
8207
+ <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
8208
  </xsl:template>
8161
8209
 
8162
8210
  <xsl:attribute-set name="eref-style">
@@ -8187,7 +8235,7 @@
8187
8235
  <!-- ====== -->
8188
8236
  <!-- eref -->
8189
8237
  <!-- ====== -->
8190
- <xsl:template match="mn:eref" name="eref">
8238
+ <xsl:template match="mn:fmt-eref" name="eref">
8191
8239
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
8192
8240
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
8193
8241
  <xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
@@ -8320,7 +8368,10 @@
8320
8368
 
8321
8369
  <xsl:call-template name="setNamedDestination"/>
8322
8370
 
8323
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8371
+ <fo:block-container xsl:use-attribute-sets="note-style" role="SKIP">
8372
+ <xsl:if test="not(parent::mn:references)">
8373
+ <xsl:copy-of select="@id"/>
8374
+ </xsl:if>
8324
8375
 
8325
8376
  <xsl:call-template name="setBlockSpanAll"/>
8326
8377
 
@@ -8333,28 +8384,28 @@
8333
8384
 
8334
8385
  <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8335
8386
 
8336
- <xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
8387
+ <xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
8337
8388
 
8338
8389
  <xsl:call-template name="refine_note-name-style"/>
8339
8390
 
8340
8391
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8341
8392
  <!-- <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]">
8393
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
8343
8394
  <xsl:call-template name="append_add-style"/>
8344
8395
  </xsl:if>
8345
8396
 
8346
8397
  <!-- 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)]">
8398
+ <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)]">
8399
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
8349
8400
  <xsl:with-param name="skip">false</xsl:with-param>
8350
8401
  </xsl:apply-templates>
8351
8402
  </xsl:if>
8352
8403
 
8353
- <xsl:apply-templates select="mn:name"/>
8404
+ <xsl:apply-templates select="mn:fmt-name"/>
8354
8405
 
8355
8406
  </fo:inline>
8356
8407
 
8357
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
8408
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8358
8409
  </fo:block>
8359
8410
  </fo:block-container>
8360
8411
  </fo:block-container>
@@ -8393,19 +8444,19 @@
8393
8444
 
8394
8445
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8395
8446
  <!-- <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]">
8447
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
8397
8448
  <xsl:call-template name="append_add-style"/>
8398
8449
  </xsl:if>
8399
8450
 
8400
- <xsl:apply-templates select="mn:name"/>
8451
+ <xsl:apply-templates select="mn:fmt-name"/>
8401
8452
 
8402
8453
  </fo:inline>
8403
8454
 
8404
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
8455
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8405
8456
  </fo:block>
8406
8457
  </xsl:template>
8407
8458
 
8408
- <xsl:template match="mn:note/mn:name">
8459
+ <xsl:template match="mn:note/mn:fmt-name">
8409
8460
  <xsl:param name="sfx"/>
8410
8461
  <xsl:variable name="suffix">
8411
8462
  <xsl:choose>
@@ -8432,7 +8483,7 @@
8432
8483
  </xsl:if>
8433
8484
  </xsl:template>
8434
8485
 
8435
- <xsl:template match="mn:termnote/mn:name">
8486
+ <xsl:template match="mn:termnote/mn:fmt-name">
8436
8487
  <xsl:param name="sfx"/>
8437
8488
  <xsl:variable name="suffix">
8438
8489
  <xsl:choose>
@@ -8515,15 +8566,15 @@
8515
8566
 
8516
8567
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8517
8568
  <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 -->
8569
+ <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
8570
  </fo:block>
8520
8571
  </fo:block-container>
8521
8572
  </fo:block-container>
8522
- <xsl:if test="mn:author or mn:source or mn:attribution">
8573
+ <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
8523
8574
  <fo:block xsl:use-attribute-sets="quote-source-style">
8524
8575
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
8525
8576
  <xsl:apply-templates select="mn:author"/>
8526
- <xsl:apply-templates select="mn:source"/>
8577
+ <xsl:apply-templates select="mn:fmt-source"/>
8527
8578
  <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
8528
8579
  <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
8529
8580
  </fo:block>
@@ -8533,17 +8584,32 @@
8533
8584
  </fo:block-container>
8534
8585
  </xsl:template>
8535
8586
 
8536
- <xsl:template match="mn:source">
8587
+ <xsl:template match="mn:fmt-source">
8537
8588
  <xsl:if test="../mn:author">
8538
8589
  <xsl:text>, </xsl:text>
8539
8590
  </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>
8591
+ <xsl:choose>
8592
+ <xsl:when test="not(parent::quote)">
8593
+ <fo:block>
8594
+ <xsl:call-template name="insert_basic_link">
8595
+ <xsl:with-param name="element">
8596
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
8597
+ <xsl:apply-templates/>
8598
+ </fo:basic-link>
8599
+ </xsl:with-param>
8600
+ </xsl:call-template>
8601
+ </fo:block>
8602
+ </xsl:when>
8603
+ <xsl:otherwise>
8604
+ <xsl:call-template name="insert_basic_link">
8605
+ <xsl:with-param name="element">
8606
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
8607
+ <xsl:apply-templates/>
8608
+ </fo:basic-link>
8609
+ </xsl:with-param>
8610
+ </xsl:call-template>
8611
+ </xsl:otherwise>
8612
+ </xsl:choose>
8547
8613
  </xsl:template>
8548
8614
 
8549
8615
  <xsl:template match="mn:author">
@@ -8628,7 +8694,7 @@
8628
8694
  <ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
8629
8695
  <xsl:choose>
8630
8696
  <!-- skip figure/name/fn -->
8631
- <xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
8697
+ <xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
8632
8698
  <xsl:otherwise>
8633
8699
  <xsl:element name="figure" namespace="{$namespace_full}">
8634
8700
  <xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
@@ -8817,7 +8883,7 @@
8817
8883
  <xsl:with-param name="isAdded" select="$isAdded"/>
8818
8884
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
8819
8885
  </xsl:call-template> <!-- show figure's name BEFORE image -->
8820
- <xsl:apply-templates select="mn:name"/>
8886
+ <xsl:apply-templates select="mn:fmt-name"/>
8821
8887
 
8822
8888
  <!-- Example: Dimensions in millimeters -->
8823
8889
  <xsl:apply-templates select="mn:note[@type = 'units']"/>
@@ -8827,11 +8893,11 @@
8827
8893
 
8828
8894
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
8829
8895
 
8830
- <xsl:for-each select="mn:name"> <!-- set context -->
8896
+ <xsl:for-each select="mn:fmt-name"> <!-- set context -->
8831
8897
  <xsl:call-template name="setIDforNamedDestination"/>
8832
8898
  </xsl:for-each>
8833
8899
 
8834
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
8900
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
8835
8901
  </fo:block>
8836
8902
 
8837
8903
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
@@ -8862,9 +8928,9 @@
8862
8928
  <xsl:template match="mn:figure[@class = 'pseudocode']">
8863
8929
  <xsl:call-template name="setNamedDestination"/>
8864
8930
  <fo:block id="{@id}">
8865
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
8931
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8866
8932
  </fo:block>
8867
- <xsl:apply-templates select="mn:name"/>
8933
+ <xsl:apply-templates select="mn:fmt-name"/>
8868
8934
  </xsl:template>
8869
8935
 
8870
8936
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
@@ -8875,7 +8941,7 @@
8875
8941
 
8876
8942
  <!-- SOURCE: ... -->
8877
8943
  <!-- figure/source -->
8878
- <xsl:template match="mn:figure/mn:source" priority="2">
8944
+ <xsl:template match="mn:figure/mn:fmt-source" priority="2">
8879
8945
  <xsl:call-template name="termsource"/>
8880
8946
  </xsl:template>
8881
8947
 
@@ -8885,7 +8951,7 @@
8885
8951
  <xsl:variable name="isAdded" select="../@added"/>
8886
8952
  <xsl:variable name="isDeleted" select="../@deleted"/>
8887
8953
  <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) -->
8954
+ <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
8955
  <fo:inline padding-left="1mm" padding-right="1mm">
8890
8956
  <xsl:if test="not(parent::mn:figure) or parent::mn:p">
8891
8957
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -8906,13 +8972,26 @@
8906
8972
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
8907
8973
 
8908
8974
  <xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
8909
- <xsl:attribute name="width">100%</xsl:attribute>
8975
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
8976
+ <xsl:choose>
8977
+ <xsl:when test="@width and not(@height)">
8978
+ <xsl:attribute name="width">100%</xsl:attribute>
8979
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8980
+ </xsl:when>
8981
+ <xsl:when test="@height and not(@width)">
8982
+ <xsl:attribute name="height">100%</xsl:attribute>
8983
+ <xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
8984
+ </xsl:when>
8985
+ <xsl:when test="not(@width) and not(@height)">
8986
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8987
+ </xsl:when>
8988
+ </xsl:choose>
8989
+
8910
8990
  <xsl:if test="normalize-space($logo_width) != ''">
8911
8991
  <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
8912
8992
  </xsl:if>
8913
- <xsl:attribute name="content-height">100%</xsl:attribute>
8914
8993
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8915
- <xsl:attribute name="scaling">uniform</xsl:attribute>
8994
+ <xsl:attribute name="vertical-align">top</xsl:attribute>
8916
8995
  </xsl:if>
8917
8996
 
8918
8997
  <xsl:variable name="width">
@@ -9201,7 +9280,7 @@
9201
9280
  <xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
9202
9281
  <xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
9203
9282
 
9204
- <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
9283
+ <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
9205
9284
  <xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
9206
9285
  <xsl:param name="name"/>
9207
9286
 
@@ -9211,8 +9290,8 @@
9211
9290
 
9212
9291
  <xsl:variable name="alt-text">
9213
9292
  <xsl:choose>
9214
- <xsl:when test="normalize-space(../mn:name) != ''">
9215
- <xsl:value-of select="../mn:name"/>
9293
+ <xsl:when test="normalize-space(../mn:fmt-name) != ''">
9294
+ <xsl:value-of select="../mn:fmt-name"/>
9216
9295
  </xsl:when>
9217
9296
  <xsl:when test="normalize-space($name) != ''">
9218
9297
  <xsl:value-of select="$name"/>
@@ -9221,7 +9300,7 @@
9221
9300
  </xsl:choose>
9222
9301
  </xsl:variable>
9223
9302
 
9224
- <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
9303
+ <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
9225
9304
 
9226
9305
  <xsl:choose>
9227
9306
  <xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
@@ -9270,9 +9349,9 @@
9270
9349
  <fo:table-cell column-number="2">
9271
9350
  <fo:block>
9272
9351
  <fo:block-container width="{$width_scale}px" height="{$height_scale}px">
9273
- <xsl:if test="../mn:name/mn:bookmark">
9352
+ <xsl:if test="../mn:fmt-name/mn:bookmark">
9274
9353
  <fo:block line-height="0" font-size="0">
9275
- <xsl:for-each select="../mn:name/mn:bookmark">
9354
+ <xsl:for-each select="../mn:fmt-name/mn:bookmark">
9276
9355
  <xsl:call-template name="bookmark"/>
9277
9356
  </xsl:for-each>
9278
9357
  </fo:block>
@@ -9512,7 +9591,7 @@
9512
9591
 
9513
9592
  <!-- image with svg and emf -->
9514
9593
  <xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
9515
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
9594
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
9516
9595
  <xsl:for-each select="*[local-name() = 'svg']">
9517
9596
  <xsl:call-template name="image_svg">
9518
9597
  <xsl:with-param name="name" select="$name"/>
@@ -9529,7 +9608,7 @@
9529
9608
 
9530
9609
  <xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
9531
9610
  <xsl:variable name="svg_content" select="document(@src)"/>
9532
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
9611
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
9533
9612
  <xsl:for-each select="xalan:nodeset($svg_content)/node()">
9534
9613
  <xsl:call-template name="image_svg">
9535
9614
  <xsl:with-param name="name" select="$name"/>
@@ -9652,7 +9731,7 @@
9652
9731
  <xsl:template match="mn:emf"/>
9653
9732
 
9654
9733
  <!-- figure/name -->
9655
- <xsl:template match="mn:figure/mn:name | mn:image/mn:name">
9734
+ <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
9656
9735
  <xsl:if test="normalize-space() != ''">
9657
9736
  <fo:block xsl:use-attribute-sets="figure-name-style">
9658
9737
 
@@ -9724,25 +9803,25 @@
9724
9803
  <fo:block-container margin-left="0mm" role="SKIP">
9725
9804
  <xsl:call-template name="setNamedDestination"/>
9726
9805
  <fo:block id="{@id}">
9727
- <xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
9806
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
9728
9807
  </fo:block>
9729
9808
  </fo:block-container>
9730
9809
  </fo:block-container>
9731
9810
  </xsl:template>
9732
9811
 
9733
- <xsl:template match="mn:formula/mn:dt/mn:stem">
9812
+ <xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
9734
9813
  <fo:inline>
9735
9814
  <xsl:apply-templates/>
9736
9815
  </fo:inline>
9737
9816
  </xsl:template>
9738
9817
 
9739
- <xsl:template match="mn:admitted/mn:stem">
9818
+ <xsl:template match="mn:fmt-admitted/mn:fmt-stem">
9740
9819
  <fo:inline>
9741
9820
  <xsl:apply-templates/>
9742
9821
  </fo:inline>
9743
9822
  </xsl:template>
9744
9823
 
9745
- <xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
9824
+ <xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
9746
9825
  <!-- https://github.com/metanorma/isodoc/issues/607
9747
9826
  <xsl:if test="normalize-space() != ''">
9748
9827
  <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
@@ -9751,7 +9830,7 @@
9751
9830
  </xsl:template>
9752
9831
 
9753
9832
  <!-- stem inside formula with name (with formula's number) -->
9754
- <xsl:template match="mn:formula[mn:name]/mn:stem">
9833
+ <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
9755
9834
  <fo:block xsl:use-attribute-sets="formula-style">
9756
9835
 
9757
9836
  <fo:table table-layout="fixed" width="100%">
@@ -9771,13 +9850,13 @@
9771
9850
 
9772
9851
  <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
9773
9852
 
9774
- <xsl:for-each select="../mn:name">
9853
+ <xsl:for-each select="../mn:fmt-name">
9775
9854
  <xsl:call-template name="setIDforNamedDestination"/>
9776
9855
  </xsl:for-each>
9777
9856
 
9778
9857
  <xsl:call-template name="refine_formula-stem-number-style"/>
9779
9858
 
9780
- <xsl:apply-templates select="../mn:name"/>
9859
+ <xsl:apply-templates select="../mn:fmt-name"/>
9781
9860
  </fo:block>
9782
9861
  </fo:table-cell>
9783
9862
  </fo:table-row>
@@ -9787,7 +9866,7 @@
9787
9866
  </xsl:template>
9788
9867
 
9789
9868
  <!-- stem inside formula without name (without formula's number) -->
9790
- <xsl:template match="mn:formula[not(mn:name)]/mn:stem">
9869
+ <xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
9791
9870
  <fo:block xsl:use-attribute-sets="formula-style">
9792
9871
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
9793
9872
  <xsl:apply-templates/>
@@ -10141,7 +10220,7 @@
10141
10220
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
10142
10221
  <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
10143
10222
  -->
10144
- <xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
10223
+ <xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
10145
10224
  <fo:inline xsl:use-attribute-sets="mathml-style">
10146
10225
 
10147
10226
  <xsl:call-template name="refine_mathml-style"/>
@@ -10411,7 +10490,7 @@
10411
10490
 
10412
10491
  <xsl:template match="mn:ul | mn:ol" mode="list" name="list">
10413
10492
 
10414
- <xsl:apply-templates select="mn:name">
10493
+ <xsl:apply-templates select="mn:fmt-name">
10415
10494
  <xsl:with-param name="process">true</xsl:with-param>
10416
10495
  </xsl:apply-templates>
10417
10496
 
@@ -10457,7 +10536,7 @@
10457
10536
 
10458
10537
  <xsl:call-template name="refine_list-style"/>
10459
10538
 
10460
- <xsl:if test="mn:name">
10539
+ <xsl:if test="mn:fmt-name">
10461
10540
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
10462
10541
  </xsl:if>
10463
10542
 
@@ -10472,7 +10551,7 @@
10472
10551
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
10473
10552
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
10474
10553
 
10475
- <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
10554
+ <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
10476
10555
  <xsl:param name="process">false</xsl:param>
10477
10556
  <xsl:if test="$process = 'true'">
10478
10557
  <fo:block xsl:use-attribute-sets="list-name-style">
@@ -10604,7 +10683,7 @@
10604
10683
  -->
10605
10684
  <!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
10606
10685
  <!-- 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">
10686
+ <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
10687
  <xsl:param name="footnote_body_from_table">false</xsl:param>
10609
10688
 
10610
10689
  <!-- list of unique footnotes -->
@@ -10728,7 +10807,7 @@
10728
10807
  <!-- commented:
10729
10808
  .//mn:bibitem[ancestor::mn:references]/mn:note |
10730
10809
  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])]">
10810
+ <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
10811
  <!-- copy unique fn -->
10733
10812
  <fn gen_id="{generate-id(.)}">
10734
10813
  <xsl:copy-of select="@*"/>
@@ -10808,7 +10887,7 @@
10808
10887
  <xsl:call-template name="displayAdmonitionName"/>
10809
10888
  </fo:block>
10810
10889
  <fo:block xsl:use-attribute-sets="admonition-p-style">
10811
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
10890
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
10812
10891
  </fo:block>
10813
10892
 
10814
10893
  </fo:block-container>
@@ -10834,7 +10913,7 @@
10834
10913
  </xsl:otherwise>
10835
10914
  </xsl:choose> -->
10836
10915
  <xsl:variable name="name">
10837
- <xsl:apply-templates select="mn:name"/>
10916
+ <xsl:apply-templates select="mn:fmt-name"/>
10838
10917
  </xsl:variable>
10839
10918
  <xsl:copy-of select="$name"/>
10840
10919
  <xsl:if test="normalize-space($name) != ''">
@@ -10842,7 +10921,7 @@
10842
10921
  </xsl:if>
10843
10922
  </xsl:template>
10844
10923
 
10845
- <xsl:template match="mn:admonition/mn:name">
10924
+ <xsl:template match="mn:admonition/mn:fmt-name">
10846
10925
  <xsl:apply-templates/>
10847
10926
  </xsl:template>
10848
10927
 
@@ -10970,10 +11049,10 @@
10970
11049
  <xsl:call-template name="setNamedDestination"/>
10971
11050
  <fo:block id="{@id}"/>
10972
11051
 
10973
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
11052
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
10974
11053
 
10975
11054
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
10976
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
11055
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
10977
11056
  </fo:block>
10978
11057
  </xsl:template> <!-- references -->
10979
11058
 
@@ -10992,8 +11071,8 @@
10992
11071
  </xsl:template> <!-- bibitem -->
10993
11072
 
10994
11073
  <!-- Bibliography (non-normative references) -->
10995
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
10996
- <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
11074
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
11075
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
10997
11076
  <xsl:call-template name="setNamedDestination"/>
10998
11077
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
10999
11078
  <fo:list-item>
@@ -11010,6 +11089,7 @@
11010
11089
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11011
11090
  </xsl:apply-templates>
11012
11091
  <xsl:apply-templates select="mn:formattedref"/>
11092
+ <xsl:call-template name="processBibliographyNote"/>
11013
11093
  </fo:block>
11014
11094
  </fo:list-item-body>
11015
11095
  </fo:list-item>
@@ -11043,7 +11123,7 @@
11043
11123
  </fo:list-item>
11044
11124
  </xsl:otherwise>
11045
11125
  </xsl:choose>
11046
- <xsl:apply-templates select="following-sibling::*[1][self::mn:bibitem]">
11126
+ <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
11047
11127
  <xsl:with-param name="skip">false</xsl:with-param>
11048
11128
  </xsl:apply-templates>
11049
11129
  </xsl:template>
@@ -11060,8 +11140,26 @@
11060
11140
  </xsl:apply-templates>
11061
11141
  <xsl:apply-templates select="mn:formattedref"/>
11062
11142
  <!-- end bibitem processing -->
11143
+
11144
+ <xsl:call-template name="processBibliographyNote"/>
11063
11145
  </xsl:template> <!-- processBibitem (bibitem) -->
11064
11146
 
11147
+ <xsl:template name="processBibliographyNote">
11148
+ <xsl:if test="self::mn:note">
11149
+ <xsl:variable name="note_node">
11150
+ <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
11151
+ <xsl:copy> <!-- skip @id -->
11152
+ <xsl:copy-of select="node()"/>
11153
+ </xsl:copy>
11154
+ </xsl:element>
11155
+ </xsl:variable>
11156
+ <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
11157
+ <xsl:call-template name="note"/>
11158
+ </xsl:for-each> -->
11159
+ <xsl:call-template name="note"/>
11160
+ </xsl:if>
11161
+ </xsl:template>
11162
+
11065
11163
  <xsl:template match="mn:title" mode="title">
11066
11164
  <fo:inline><xsl:apply-templates/></fo:inline>
11067
11165
  </xsl:template>
@@ -11287,7 +11385,8 @@
11287
11385
  </xsl:copy>
11288
11386
  </xsl:template>
11289
11387
 
11290
- <xsl:template match="mn:xref" mode="index_add_id">
11388
+ <xsl:template match="mn:xref" mode="index_add_id"/>
11389
+ <xsl:template match="mn:fmt-xref" mode="index_add_id">
11291
11390
  <xsl:param name="docid"/>
11292
11391
  <xsl:variable name="id">
11293
11392
  <xsl:call-template name="generateIndexXrefId">
@@ -11329,7 +11428,7 @@
11329
11428
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
11330
11429
  <xsl:copy>
11331
11430
  <xsl:apply-templates select="@*" mode="index_update"/>
11332
- <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
11431
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
11333
11432
  </xsl:copy>
11334
11433
  </xsl:template>
11335
11434
 
@@ -11350,11 +11449,11 @@
11350
11449
  <xsl:value-of select="."/>
11351
11450
  <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
11352
11451
  </xsl:when>
11353
- <xsl:when test="self::* and local-name(.) = 'xref'">
11452
+ <xsl:when test="self::* and local-name(.) = 'fmt-xref'">
11354
11453
  <xsl:variable name="id" select="@id"/>
11355
11454
 
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"/>
11455
+ <xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
11456
+ <xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
11358
11457
 
11359
11458
  <xsl:variable name="pages_">
11360
11459
  <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
@@ -11450,18 +11549,18 @@
11450
11549
  <xsl:variable name="item_number">
11451
11550
  <xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
11452
11551
  </xsl:variable>
11453
- <xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
11552
+ <xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
11454
11553
  <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
11455
11554
  </xsl:template>
11456
11555
 
11457
- <xsl:template match="mn:indexsect/mn:title" priority="4">
11556
+ <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
11458
11557
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
11459
11558
  <!-- Index -->
11460
11559
  <xsl:apply-templates/>
11461
11560
  </fo:block>
11462
11561
  </xsl:template>
11463
11562
 
11464
- <xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
11563
+ <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
11465
11564
  <!-- Letter A, B, C, ... -->
11466
11565
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
11467
11566
  <xsl:apply-templates/>
@@ -11502,12 +11601,12 @@
11502
11601
  <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
11602
  <bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
11504
11603
  <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]">
11604
+ <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
11605
  <!-- skip here, see the template 'fmt-review-start' -->
11507
11606
  </xsl:when>
11508
11607
  <xsl:otherwise>
11509
11608
  <!-- <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>
11609
+ <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
11610
  <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
11512
11611
  <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
11513
11612
  </xsl:otherwise>
@@ -11606,6 +11705,83 @@
11606
11705
  <!-- End Form's elements processing -->
11607
11706
  <!-- =================== -->
11608
11707
 
11708
+ <xsl:attribute-set name="toc-style">
11709
+ <xsl:attribute name="margin-left">32mm</xsl:attribute>
11710
+ <xsl:attribute name="margin-right">-17mm</xsl:attribute>
11711
+ </xsl:attribute-set>
11712
+
11713
+ <xsl:template name="refine_toc-style">
11714
+ </xsl:template>
11715
+
11716
+ <xsl:attribute-set name="toc-title-style">
11717
+ <xsl:attribute name="role">H1</xsl:attribute>
11718
+ <xsl:attribute name="font-size">27pt</xsl:attribute>
11719
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
11720
+ <xsl:attribute name="color">black</xsl:attribute>
11721
+ <xsl:attribute name="margin-left">-15mm</xsl:attribute>
11722
+ <xsl:attribute name="margin-bottom">13mm</xsl:attribute>
11723
+ </xsl:attribute-set>
11724
+
11725
+ <xsl:attribute-set name="toc-title-page-style">
11726
+ </xsl:attribute-set> <!-- toc-title-page-style -->
11727
+
11728
+ <xsl:attribute-set name="toc-item-block-style">
11729
+ </xsl:attribute-set>
11730
+
11731
+ <xsl:template name="refine_toc-item-block-style">
11732
+ </xsl:template>
11733
+
11734
+ <xsl:attribute-set name="toc-item-style">
11735
+ <xsl:attribute name="role">TOCI</xsl:attribute>
11736
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
11737
+ </xsl:attribute-set> <!-- END: toc-item-style -->
11738
+
11739
+ <xsl:template name="refine_toc-item-style">
11740
+ <xsl:if test="@level = 1">
11741
+ <xsl:if test="preceding-sibling::mnx:item[@display = 'true' and @level = 1]">
11742
+ <xsl:attribute name="space-before">16pt</xsl:attribute>
11743
+ </xsl:if>
11744
+ <xsl:attribute name="space-after">4pt</xsl:attribute>
11745
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
11746
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
11747
+ <xsl:attribute name="color">black</xsl:attribute>
11748
+ </xsl:if>
11749
+ <xsl:if test="@level &gt;= 2">
11750
+ <xsl:attribute name="margin-left"><xsl:value-of select="(@level - 1) * 16.5"/>mm</xsl:attribute>
11751
+ <xsl:attribute name="space-before">4pt</xsl:attribute>
11752
+ <xsl:attribute name="space-after">5pt</xsl:attribute>
11753
+ </xsl:if>
11754
+ </xsl:template> <!-- END: refine_toc-item-style -->
11755
+
11756
+ <xsl:attribute-set name="toc-leader-style">
11757
+ <xsl:attribute name="leader-pattern">rule</xsl:attribute>
11758
+ <xsl:attribute name="rule-thickness">0.2mm</xsl:attribute>
11759
+ </xsl:attribute-set> <!-- END: toc-leader-style -->
11760
+
11761
+ <xsl:attribute-set name="toc-pagenumber-style">
11762
+ <xsl:attribute name="padding-left">2mm</xsl:attribute>
11763
+ </xsl:attribute-set>
11764
+
11765
+ <!-- List of Figures, Tables -->
11766
+ <xsl:attribute-set name="toc-listof-title-style">
11767
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
11768
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
11769
+ <xsl:attribute name="color">black</xsl:attribute>
11770
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
11771
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11772
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
11773
+ </xsl:attribute-set>
11774
+
11775
+ <xsl:attribute-set name="toc-listof-item-block-style">
11776
+ </xsl:attribute-set>
11777
+
11778
+ <xsl:attribute-set name="toc-listof-item-style">
11779
+ <xsl:attribute name="role">TOCI</xsl:attribute>
11780
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
11781
+ <xsl:attribute name="margin-left">16.5mm</xsl:attribute>
11782
+ <xsl:attribute name="space-before">4pt</xsl:attribute>
11783
+ </xsl:attribute-set>
11784
+
11609
11785
  <xsl:template name="processPrefaceSectionsDefault_Contents">
11610
11786
  <xsl:variable name="nodes_preface_">
11611
11787
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -11671,7 +11847,7 @@
11671
11847
 
11672
11848
  <xsl:template name="processTables_Contents">
11673
11849
  <mnx:tables>
11674
- <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
11850
+ <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
11675
11851
  <xsl:choose>
11676
11852
  <xsl:when test="mn:fmt-name">
11677
11853
  <xsl:variable name="fmt_name">
@@ -11693,7 +11869,7 @@
11693
11869
 
11694
11870
  <xsl:template name="processFigures_Contents">
11695
11871
  <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) != '']">
11872
+ <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
11873
  <xsl:choose>
11698
11874
  <xsl:when test="mn:fmt-name">
11699
11875
  <xsl:variable name="fmt_name">
@@ -11722,7 +11898,7 @@
11722
11898
 
11723
11899
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
11724
11900
 
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">
11901
+ <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
11902
  <xsl:apply-templates mode="contents"/>
11727
11903
  <xsl:text> </xsl:text>
11728
11904
  </xsl:template>
@@ -11734,7 +11910,7 @@
11734
11910
  </xsl:if>
11735
11911
  </xsl:template>
11736
11912
 
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">
11913
+ <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
11914
  <xsl:apply-templates mode="bookmarks"/>
11739
11915
  <xsl:text> </xsl:text>
11740
11916
  </xsl:template>
@@ -11745,7 +11921,7 @@
11745
11921
  </xsl:if>
11746
11922
  </xsl:template>
11747
11923
 
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">
11924
+ <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
11925
  <xsl:value-of select="."/>
11750
11926
  </xsl:template>
11751
11927
 
@@ -11755,7 +11931,7 @@
11755
11931
  </xsl:if>
11756
11932
  </xsl:template>
11757
11933
 
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">
11934
+ <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
11935
  <xsl:value-of select="."/>
11760
11936
  </xsl:template>
11761
11937
 
@@ -12216,7 +12392,7 @@
12216
12392
  <xsl:value-of select="."/>
12217
12393
  </xsl:template>
12218
12394
 
12219
- <xsl:template match="mn:review" mode="contents_item"/>
12395
+ <xsl:template match="mn:annotation" mode="contents_item"/>
12220
12396
 
12221
12397
  <xsl:template match="mn:tab" mode="contents_item">
12222
12398
  <xsl:text> </xsl:text>
@@ -12371,7 +12547,7 @@
12371
12547
  <xsl:apply-templates/>
12372
12548
  </xsl:template>
12373
12549
 
12374
- <xsl:template match="mn:toc//mn:xref" priority="3">
12550
+ <xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
12375
12551
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
12376
12552
  <!-- New format: one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
12377
12553
  <!-- <test><xsl:copy-of select="."/></test> -->
@@ -12439,8 +12615,8 @@
12439
12615
  <xsl:apply-templates mode="toc_table_width"/>
12440
12616
  </xsl:template>
12441
12617
 
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"/>
12618
+ <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
12619
+ <xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
12444
12620
 
12445
12621
  <xsl:template match="mn:li" mode="toc_table_width">
12446
12622
  <mn:tr>
@@ -12448,7 +12624,7 @@
12448
12624
  </mn:tr>
12449
12625
  </xsl:template>
12450
12626
 
12451
- <xsl:template match="mn:xref" mode="toc_table_width">
12627
+ <xsl:template match="mn:fmt-xref" mode="toc_table_width">
12452
12628
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
12453
12629
  <!-- New format - one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
12454
12630
  <xsl:for-each select="mn:tab">
@@ -12522,10 +12698,10 @@
12522
12698
 
12523
12699
  </xsl:template> <!-- tab -->
12524
12700
 
12525
- <xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
12526
- <xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
12701
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
12702
+ <xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
12527
12703
 
12528
- <xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
12704
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
12529
12705
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
12530
12706
  </xsl:template>
12531
12707
 
@@ -12540,13 +12716,13 @@
12540
12716
  </xsl:template>
12541
12717
 
12542
12718
  <xsl:variable name="reviews_">
12543
- <xsl:for-each select="//mn:review[not(parent::mn:review-container)][@from]">
12719
+ <xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
12544
12720
  <xsl:copy>
12545
12721
  <xsl:copy-of select="@from"/>
12546
12722
  <xsl:copy-of select="@id"/>
12547
12723
  </xsl:copy>
12548
12724
  </xsl:for-each>
12549
- <xsl:for-each select="//mn:fmt-review-start[@source]">
12725
+ <xsl:for-each select="//mn:fmt-annotation-start[@source]">
12550
12726
  <xsl:copy>
12551
12727
  <xsl:copy-of select="@source"/>
12552
12728
  <xsl:copy-of select="@id"/>
@@ -12560,7 +12736,7 @@
12560
12736
  <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
12561
12737
  <xsl:variable name="curr_id" select="@id"/>
12562
12738
  <!-- <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] -->
12739
+ <xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
12564
12740
  <xsl:variable name="review_id" select="normalize-space(@id)"/>
12565
12741
  <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
12566
12742
  <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 +12751,7 @@
12575
12751
 
12576
12752
  <!-- document text (not figures, or tables) footnotes -->
12577
12753
  <xsl:variable name="reviews_container_">
12578
- <xsl:for-each select="//mn:review-container/mn:fmt-review-body">
12754
+ <xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
12579
12755
  <xsl:variable name="update_xml_step1">
12580
12756
  <xsl:apply-templates select="." mode="update_xml_step1"/>
12581
12757
  </xsl:variable>
@@ -12584,10 +12760,10 @@
12584
12760
  </xsl:variable>
12585
12761
  <xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
12586
12762
 
12587
- <xsl:template match="mn:review-container"/>
12763
+ <xsl:template match="mn:annotation-container"/>
12588
12764
 
12589
12765
  <!-- 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 -->
12766
+ <xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
12591
12767
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
12592
12768
  <xsl:if test="$isGenerateTableIF = 'false'">
12593
12769
  <xsl:choose>
@@ -12607,7 +12783,7 @@
12607
12783
  </xsl:template>
12608
12784
 
12609
12785
  <!-- 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 -->
12786
+ <xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
12611
12787
  <!-- comment 2019-11-29 -->
12612
12788
  <!-- <fo:block font-weight="bold">Review:</fo:block>
12613
12789
  <xsl:apply-templates /> -->
@@ -12663,7 +12839,7 @@
12663
12839
  </xsl:template>
12664
12840
 
12665
12841
  <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
12666
- <xsl:template match="mn:review[@type = 'other']"/>
12842
+ <xsl:template match="mn:annotation[@type = 'other']"/>
12667
12843
 
12668
12844
  <!-- ============ -->
12669
12845
  <!-- errata -->
@@ -13056,9 +13232,12 @@
13056
13232
  <xsl:choose>
13057
13233
  <xsl:when test="mn:fmt-title">
13058
13234
  <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)]"/>
13235
+ <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
13060
13236
  </xsl:variable>
13061
13237
  <xsl:value-of select="normalize-space($fmt_title_section)"/>
13238
+ <xsl:if test="normalize-space($fmt_title_section) = ''">
13239
+ <xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
13240
+ </xsl:if>
13062
13241
  </xsl:when>
13063
13242
  <xsl:otherwise>
13064
13243
  <xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
@@ -13071,6 +13250,9 @@
13071
13250
  <xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
13072
13251
  <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
13073
13252
  </xsl:when>
13253
+ <xsl:when test="mn:fmt-title/mn:tab">
13254
+ <xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
13255
+ </xsl:when>
13074
13256
  <xsl:when test="mn:fmt-title">
13075
13257
  <xsl:copy-of select="mn:fmt-title/node()"/>
13076
13258
  </xsl:when>
@@ -13212,10 +13394,10 @@
13212
13394
 
13213
13395
  </fo:block>
13214
13396
 
13215
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
13397
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
13216
13398
 
13217
13399
  <fo:block>
13218
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
13400
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
13219
13401
  </fo:block>
13220
13402
  </xsl:otherwise>
13221
13403
  </xsl:choose>
@@ -13224,7 +13406,7 @@
13224
13406
  <xsl:template name="refine_annex_style">
13225
13407
  </xsl:template>
13226
13408
 
13227
- <xsl:template match="mn:name/text()">
13409
+ <xsl:template match="mn:name/text() | mn:fmt-name/text()">
13228
13410
  <!-- 0xA0 to space replacement -->
13229
13411
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
13230
13412
  </xsl:template>
@@ -13280,28 +13462,28 @@
13280
13462
  <xsl:template match="mn:amend"/>
13281
13463
 
13282
13464
  <!-- fmt-title renamed to title in update_xml_step1 -->
13283
- <xsl:template match="mn:fmt-title"/>
13465
+ <!-- <xsl:template match="mn:fmt-title" /> -->
13284
13466
 
13285
13467
  <!-- fmt-name renamed to name in update_xml_step1 -->
13286
- <xsl:template match="mn:fmt-name"/>
13468
+ <!-- <xsl:template match="mn:fmt-name" /> -->
13287
13469
 
13288
13470
  <!-- fmt-preferred renamed to preferred in update_xml_step1 -->
13289
- <xsl:template match="mn:fmt-preferred"/>
13471
+ <!-- <xsl:template match="mn:fmt-preferred" /> -->
13290
13472
 
13291
13473
  <!-- fmt-admitted renamed to admitted in update_xml_step1 -->
13292
- <xsl:template match="mn:fmt-admitted"/>
13474
+ <!-- <xsl:template match="mn:fmt-admitted" /> -->
13293
13475
 
13294
13476
  <!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
13295
- <xsl:template match="mn:fmt-deprecates"/>
13477
+ <!-- <xsl:template match="mn:fmt-deprecates" /> -->
13296
13478
 
13297
13479
  <!-- fmt-definition renamed to definition in update_xml_step1 -->
13298
- <xsl:template match="mn:fmt-definition"/>
13480
+ <!-- <xsl:template match="mn:fmt-definition" /> -->
13299
13481
 
13300
13482
  <!-- fmt-termsource renamed to termsource in update_xml_step1 -->
13301
- <xsl:template match="mn:fmt-termsource"/>
13483
+ <!-- <xsl:template match="mn:fmt-termsource" /> -->
13302
13484
 
13303
13485
  <!-- fmt-source renamed to source in update_xml_step1 -->
13304
- <xsl:template match="mn:fmt-source"/>
13486
+ <!-- <xsl:template match="mn:fmt-source" /> -->
13305
13487
 
13306
13488
  <xsl:template match="mn:semx">
13307
13489
  <xsl:apply-templates/>
@@ -13746,12 +13928,12 @@
13746
13928
  <xsl:when test="ancestor::mn:preface">
13747
13929
  <xsl:value-of select="$level_total - 2"/>
13748
13930
  </xsl:when>
13749
- <xsl:when test="ancestor::mn:sections and self::mn:title">
13931
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
13750
13932
  <!-- determine 'depth' depends on upper clause with title/@depth -->
13751
13933
  <!-- <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"/>
13934
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
13753
13935
  <!-- <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::*)"/>
13936
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
13755
13937
  <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
13756
13938
  <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
13757
13939
  <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
@@ -13767,8 +13949,8 @@
13767
13949
  </xsl:otherwise>
13768
13950
  </xsl:choose>
13769
13951
  </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)"/>
13952
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
13953
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
13772
13954
  <xsl:choose>
13773
13955
  <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
13774
13956
  <xsl:value-of select="number($upper_terms_depth + 1)"/>
@@ -13779,7 +13961,7 @@
13779
13961
  </xsl:choose>
13780
13962
  </xsl:when>
13781
13963
  <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)"/>
13964
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
13783
13965
  <xsl:choose>
13784
13966
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13785
13967
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -13795,8 +13977,8 @@
13795
13977
  <xsl:when test="parent::mn:annex">
13796
13978
  <xsl:value-of select="$level_total - 1"/>
13797
13979
  </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)"/>
13980
+ <xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
13981
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
13800
13982
  <xsl:choose>
13801
13983
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13802
13984
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -13829,7 +14011,7 @@
13829
14011
  </xsl:when>
13830
14012
  <xsl:otherwise>
13831
14013
  <xsl:variable name="title_level_">
13832
- <xsl:for-each select="../preceding-sibling::mn:title[1]">
14014
+ <xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
13833
14015
  <xsl:call-template name="getLevel"/>
13834
14016
  </xsl:for-each>
13835
14017
  </xsl:variable>
@@ -13906,15 +14088,17 @@
13906
14088
  </xsl:template>
13907
14089
 
13908
14090
  <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}"/>
14091
+ <xsl:if test="$isGenerateTableIF = 'false'">
14092
+ <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
14093
+ <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'">
14094
+ <fox:destination internal-destination="{@id}"/>
13916
14095
  </xsl:if>
13917
- </xsl:for-each>
14096
+ <xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
14097
+ <xsl:if test="@named_dest">
14098
+ <fox:destination internal-destination="{@named_dest}"/>
14099
+ </xsl:if>
14100
+ </xsl:for-each>
14101
+ </xsl:if>
13918
14102
  </xsl:template>
13919
14103
 
13920
14104
  <xsl:template name="add-letter-spacing">
@@ -14262,7 +14446,7 @@
14262
14446
  </xsl:when>
14263
14447
  <xsl:otherwise>
14264
14448
  <!-- 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())">
14449
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
14266
14450
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
14267
14451
  </xsl:if>
14268
14452
  <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 +14480,7 @@
14296
14480
  </fo:block>
14297
14481
  </fo:block-container>
14298
14482
  </fo:inline-container>
14299
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
14483
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
14300
14484
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
14301
14485
  </xsl:if>
14302
14486
  </xsl:otherwise>