metanorma-jis 0.5.10 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  <xsl:output method="xml" encoding="UTF-8" indent="no"/>
4
4
 
5
- <xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:name))]" use="@reference"/>
5
+ <xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:fmt-name))]" use="@reference"/>
6
6
 
7
7
  <xsl:variable name="debug">false</xsl:variable>
8
8
 
@@ -74,6 +74,325 @@
74
74
  <xsl:variable name="pageWidthA5">148</xsl:variable>
75
75
  <xsl:variable name="pageHeightA5">210</xsl:variable>
76
76
 
77
+ <xsl:template name="layout-master-set">
78
+ <fo:layout-master-set>
79
+
80
+ <!-- Cover page -->
81
+ <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
82
+ <fo:region-body margin-top="28.5mm" margin-bottom="25mm" margin-left="22mm" margin-right="22mm"/>
83
+ <fo:region-before region-name="header" extent="28.5mm"/>
84
+ <fo:region-after region-name="footer" extent="25mm"/>
85
+ <fo:region-start region-name="left-region" extent="22mm"/>
86
+ <fo:region-end region-name="right-region" extent="22mm"/>
87
+ </fo:simple-page-master>
88
+
89
+ <fo:simple-page-master master-name="cover-page_vertical_layout" page-width="{$pageWidthA5}mm" page-height="{$pageHeightA5}mm">
90
+ <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
91
+ fo:region-body/@margin-top = left margin
92
+ fo:region-body/@margin-bottom = right margin
93
+ fo:region-body/margin-left = bottom margin
94
+ fo:region-body/margin-right = top margin
95
+ -->
96
+ <fo:region-body margin-top="6mm" margin-bottom="6mm" margin-left="12.8mm" margin-right="58mm" writing-mode="tb-rl"/>
97
+ <fo:region-before region-name="header" extent="58mm" precedence="true"/>
98
+ <fo:region-after region-name="footer" extent="12.8mm"/>
99
+ <fo:region-start region-name="left-region" extent="20mm"/> <!-- 6 20mm -->
100
+ <fo:region-end region-name="right-region" extent="6.8mm"/> <!-- 17mm -->
101
+ </fo:simple-page-master>
102
+
103
+ <fo:simple-page-master master-name="cover-page-JSA" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
104
+ <fo:region-body margin-top="165mm" margin-bottom="44.5mm" margin-left="37mm" margin-right="37mm"/>
105
+ <fo:region-before region-name="header" extent="165mm"/>
106
+ <fo:region-after region-name="footer" extent="44.5mm"/>
107
+ <fo:region-start region-name="left-region" extent="37mm"/>
108
+ <fo:region-end region-name="right-region" extent="37mm"/>
109
+ </fo:simple-page-master>
110
+
111
+ <fo:simple-page-master master-name="first_page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
112
+ <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
113
+ <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
114
+ <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
115
+ </xsl:if>
116
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
117
+ <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
118
+ <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
119
+ </xsl:if>
120
+ </fo:region-body>
121
+ <fo:region-before region-name="header" extent="{$marginTop}mm"/>
122
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
123
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
124
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
125
+ </fo:simple-page-master>
126
+ <fo:simple-page-master master-name="odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
127
+ <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
128
+ <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
129
+ <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
130
+ </xsl:if>
131
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
132
+ <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
133
+ <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
134
+ </xsl:if>
135
+ </fo:region-body>
136
+ <fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
137
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
138
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
139
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
140
+ </fo:simple-page-master>
141
+ <fo:simple-page-master master-name="even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
142
+ <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
143
+ <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
144
+ <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
145
+ </xsl:if>
146
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
147
+ <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
148
+ <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
149
+ </xsl:if>
150
+ </fo:region-body>
151
+ <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
152
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
153
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
154
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
155
+ </fo:simple-page-master>
156
+
157
+ <fo:simple-page-master master-name="first_page_toc" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
158
+ <xsl:if test="$vertical_layout = 'true'">
159
+ <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
160
+ <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
161
+ </xsl:if>
162
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
163
+ <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
164
+ <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
165
+ </xsl:if>
166
+ </fo:region-body>
167
+ <fo:region-before region-name="header-odd-first" extent="{$marginTop}mm"/>
168
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
169
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
170
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
171
+ </fo:simple-page-master>
172
+
173
+ <fo:page-sequence-master master-name="toc">
174
+ <fo:repeatable-page-master-alternatives>
175
+ <fo:conditional-page-master-reference page-position="first" master-reference="first_page_toc"/>
176
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
177
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
178
+ </fo:repeatable-page-master-alternatives>
179
+ </fo:page-sequence-master>
180
+
181
+ <xsl:if test="1 = 3">
182
+ <fo:simple-page-master master-name="toc_vertical_layout" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
183
+ <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
184
+ fo:region-body/@margin-top = left margin
185
+ fo:region-body/@margin-bottom = right margin
186
+ fo:region-body/margin-left = bottom margin
187
+ fo:region-body/margin-right = top margin
188
+ -->
189
+ <!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
190
+ <fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="{$marginLeftRight2}mm" margin-left="30mm" margin-right="30mm" writing-mode="tb-rl"/> <!-- background-color="rgb(240,240,240)" -->
191
+ <fo:region-before region-name="header" extent="30mm"/> <!-- background-color="yellow" -->
192
+ <fo:region-after region-name="footer" extent="210mm" writing-mode="tb-rl" background-color="green"/> <!-- 30 background-color="green" -->
193
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm" writing-mode="tb-rl" background-color="blue"/> <!-- background-color="blue" -->
194
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
195
+ </fo:simple-page-master>
196
+ </xsl:if>
197
+
198
+ <fo:simple-page-master master-name="toc_vertical_layout" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
199
+ <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
200
+ fo:region-body/@margin-top = left margin
201
+ fo:region-body/@margin-bottom = right margin
202
+ fo:region-body/margin-left = bottom margin
203
+ fo:region-body/margin-right = top margin
204
+ -->
205
+ <!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
206
+ <fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="38mm" margin-left="30mm" margin-right="30mm" writing-mode="tb-rl"/> <!-- background-color="rgb(240,240,240)" -->
207
+ <fo:region-before region-name="header" extent="30mm"/> <!-- background-color="yellow" -->
208
+ <fo:region-after region-name="footer" extent="30mm"/> <!-- background-color="green" -->
209
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/> <!-- background-color="blue" -->
210
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
211
+ </fo:simple-page-master>
212
+
213
+ <fo:page-sequence-master master-name="preface">
214
+ <fo:repeatable-page-master-alternatives>
215
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
216
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
217
+ </fo:repeatable-page-master-alternatives>
218
+ </fo:page-sequence-master>
219
+
220
+ <fo:page-sequence-master master-name="document_first_section">
221
+ <fo:repeatable-page-master-alternatives>
222
+ <fo:conditional-page-master-reference page-position="first" master-reference="first_page"/>
223
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
224
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
225
+ </fo:repeatable-page-master-alternatives>
226
+ </fo:page-sequence-master>
227
+
228
+ <fo:page-sequence-master master-name="document">
229
+ <fo:repeatable-page-master-alternatives>
230
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
231
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
232
+ </fo:repeatable-page-master-alternatives>
233
+ </fo:page-sequence-master>
234
+
235
+ <fo:simple-page-master master-name="document_vertical_layout" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
236
+ <xsl:if test="$isGenerateTableIF = 'true'">
237
+ <xsl:attribute name="page-width"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
238
+ <xsl:attribute name="page-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
239
+ </xsl:if>
240
+ <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
241
+ fo:region-body/@margin-top = left margin
242
+ fo:region-body/@margin-bottom = right margin
243
+ fo:region-body/margin-left = bottom margin
244
+ fo:region-body/margin-right = top margin
245
+ -->
246
+ <!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
247
+ <fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="{$marginLeftRight2}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm"> <!-- background-color="rgb(240,240,240)" -->
248
+ <xsl:if test="$isGenerateTableIF = 'false'">
249
+ <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
250
+ </xsl:if>
251
+ </fo:region-body>
252
+ <fo:region-before region-name="header" extent="{$marginTop}mm"/> <!-- background-color="yellow" -->
253
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/> <!-- background-color="green" -->
254
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/> <!-- background-color="blue" -->
255
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
256
+ </fo:simple-page-master>
257
+
258
+ <fo:simple-page-master master-name="document_vertical_layout_page" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
259
+ <xsl:if test="$isGenerateTableIF = 'true'">
260
+ <xsl:attribute name="page-width"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
261
+ <xsl:attribute name="page-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
262
+ </xsl:if>
263
+ <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
264
+ fo:region-body/@margin-top = left margin
265
+ fo:region-body/@margin-bottom = right margin
266
+ fo:region-body/margin-left = bottom margin
267
+ fo:region-body/margin-right = top margin
268
+ -->
269
+ <!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
270
+ <fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="{$marginLeftRight2}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm"> <!-- background-color="rgb(240,240,240)" -->
271
+ <xsl:if test="$isGenerateTableIF = 'false'">
272
+ <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
273
+ </xsl:if>
274
+ </fo:region-body>
275
+ <fo:region-before region-name="header" extent="{$marginTop}mm"/> <!-- background-color="yellow" -->
276
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/> <!-- background-color="green" -->
277
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/> <!-- background-color="blue" -->
278
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
279
+ </fo:simple-page-master>
280
+ <fo:simple-page-master master-name="document_vertical_layout_last" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
281
+ <xsl:if test="$isGenerateTableIF = 'true'">
282
+ <xsl:attribute name="page-width"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
283
+ <xsl:attribute name="page-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
284
+ </xsl:if>
285
+ <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
286
+ fo:region-body/@margin-top = left margin
287
+ fo:region-body/@margin-bottom = right margin
288
+ fo:region-body/margin-left = bottom margin
289
+ fo:region-body/margin-right = top margin
290
+ -->
291
+ <!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
292
+ <fo:region-body margin-top="194mm" margin-bottom="{$marginLeftRight2}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm"> <!-- background-color="rgb(240,240,240)" -->
293
+ <xsl:if test="$isGenerateTableIF = 'false'">
294
+ <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
295
+ </xsl:if>
296
+ </fo:region-body>
297
+ <fo:region-before region-name="header-last" extent="{$marginTop}mm"> <!-- background-color="yellow" -->
298
+ <xsl:if test="$isGenerateTableIF = 'false'">
299
+ <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
300
+ </xsl:if>
301
+ </fo:region-before>
302
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/> <!-- background-color="green" -->
303
+ <!-- for boilerplate:
304
+ reserve paper space in left-region, but text will render in the header
305
+ -->
306
+ <fo:region-start region-name="left-region" extent="194mm"/> <!-- background-color="blue" background-color="rgb(230,230,230)" -->
307
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
308
+ </fo:simple-page-master>
309
+
310
+ <fo:page-sequence-master master-name="document_vertical_layout_with_last">
311
+ <fo:repeatable-page-master-alternatives>
312
+ <fo:conditional-page-master-reference page-position="last" master-reference="document_vertical_layout_last"/>
313
+ <fo:conditional-page-master-reference page-position="any" master-reference="document_vertical_layout_page"/>
314
+ </fo:repeatable-page-master-alternatives>
315
+ </fo:page-sequence-master>
316
+
317
+ <fo:simple-page-master master-name="commentary_first_page_even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
318
+ <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
319
+ <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
320
+ <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
321
+ </xsl:if>
322
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
323
+ <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
324
+ <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
325
+ </xsl:if>
326
+ </fo:region-body>
327
+ <fo:region-before region-name="header-commentary-even-first" extent="{$marginTop}mm"/>
328
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
329
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
330
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
331
+ </fo:simple-page-master>
332
+
333
+ <fo:simple-page-master master-name="commentary_first_page_odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
334
+ <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
335
+ <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
336
+ <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
337
+ </xsl:if>
338
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
339
+ <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
340
+ <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
341
+ </xsl:if>
342
+ </fo:region-body>
343
+ <fo:region-before region-name="header-commentary-odd-first" extent="{$marginTop}mm"/>
344
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
345
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
346
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
347
+ </fo:simple-page-master>
348
+
349
+ <fo:page-sequence-master master-name="document_commentary_section">
350
+ <fo:repeatable-page-master-alternatives>
351
+ <fo:conditional-page-master-reference page-position="first" odd-or-even="even" master-reference="commentary_first_page_even"/>
352
+ <fo:conditional-page-master-reference page-position="first" odd-or-even="odd" master-reference="commentary_first_page_odd"/>
353
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
354
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
355
+ </fo:repeatable-page-master-alternatives>
356
+ </fo:page-sequence-master>
357
+
358
+ <!-- landscape -->
359
+ <fo:simple-page-master master-name="odd-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
360
+ <fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="{$marginLeftRight2}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm"/>
361
+ <fo:region-before region-name="header-odd" extent="{$marginLeftRight1}mm" precedence="true"/>
362
+ <fo:region-after region-name="footer" extent="{$marginLeftRight2}mm" precedence="true"/>
363
+ <fo:region-start region-name="left-region-landscape" extent="{$marginBottom}mm"/>
364
+ <fo:region-end region-name="right-region-landscape" extent="{$marginTop}mm"/>
365
+ </fo:simple-page-master>
366
+ <fo:simple-page-master master-name="even-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
367
+ <fo:region-body margin-top="{$marginLeftRight2}mm" margin-bottom="{$marginLeftRight1}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm"/>
368
+ <fo:region-before region-name="header-even" extent="{$marginLeftRight2}mm" precedence="true"/>
369
+ <fo:region-after region-name="footer" extent="{$marginLeftRight1}mm" precedence="true"/>
370
+ <fo:region-start region-name="left-region-landscape" extent="{$marginBottom}mm"/>
371
+ <fo:region-end region-name="right-region-landspace" extent="{$marginTop}mm"/>
372
+ </fo:simple-page-master>
373
+ <fo:page-sequence-master master-name="document-landscape">
374
+ <fo:repeatable-page-master-alternatives>
375
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-landscape"/>
376
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-landscape"/>
377
+ </fo:repeatable-page-master-alternatives>
378
+ </fo:page-sequence-master>
379
+
380
+ <fo:simple-page-master master-name="back-page" page-width="{$pageWidthA5}mm" page-height="{$pageHeightA5}mm">
381
+ <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
382
+ fo:region-body/@margin-top = left margin
383
+ fo:region-body/@margin-bottom = right margin
384
+ fo:region-body/margin-left = bottom margin
385
+ fo:region-body/margin-right = top margin
386
+ -->
387
+ <fo:region-body margin-top="5mm" margin-bottom="122mm" margin-left="6.5mm" margin-right="70mm" writing-mode="tb-rl"/>
388
+ <fo:region-before region-name="header" extent="70mm"/>
389
+ <fo:region-after region-name="footer" extent="6.5mm"/>
390
+ <fo:region-start region-name="left-region" extent="5mm"/>
391
+ <fo:region-end region-name="right-region" extent="122mm"/>
392
+ </fo:simple-page-master>
393
+ </fo:layout-master-set>
394
+ </xsl:template> <!-- END: layout-master-set -->
395
+
77
396
  <xsl:template match="/">
78
397
 
79
398
  <fo:root xml:lang="{$lang}">
@@ -98,322 +417,7 @@
98
417
  <xsl:with-param name="root-style" select="$root-style"/>
99
418
  </xsl:call-template>
100
419
 
101
- <fo:layout-master-set>
102
-
103
- <!-- Cover page -->
104
- <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
105
- <fo:region-body margin-top="28.5mm" margin-bottom="25mm" margin-left="22mm" margin-right="22mm"/>
106
- <fo:region-before region-name="header" extent="28.5mm"/>
107
- <fo:region-after region-name="footer" extent="25mm"/>
108
- <fo:region-start region-name="left-region" extent="22mm"/>
109
- <fo:region-end region-name="right-region" extent="22mm"/>
110
- </fo:simple-page-master>
111
-
112
- <fo:simple-page-master master-name="cover-page_2024" page-width="{$pageWidthA5}mm" page-height="{$pageHeightA5}mm">
113
- <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
114
- fo:region-body/@margin-top = left margin
115
- fo:region-body/@margin-bottom = right margin
116
- fo:region-body/margin-left = bottom margin
117
- fo:region-body/margin-right = top margin
118
- -->
119
- <fo:region-body margin-top="6mm" margin-bottom="6mm" margin-left="12.8mm" margin-right="58mm" writing-mode="tb-rl"/>
120
- <fo:region-before region-name="header" extent="58mm" precedence="true"/>
121
- <fo:region-after region-name="footer" extent="12.8mm"/>
122
- <fo:region-start region-name="left-region" extent="20mm"/> <!-- 6 20mm -->
123
- <fo:region-end region-name="right-region" extent="6.8mm"/> <!-- 17mm -->
124
- </fo:simple-page-master>
125
-
126
- <fo:simple-page-master master-name="cover-page-JSA" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
127
- <fo:region-body margin-top="165mm" margin-bottom="44.5mm" margin-left="37mm" margin-right="37mm"/>
128
- <fo:region-before region-name="header" extent="165mm"/>
129
- <fo:region-after region-name="footer" extent="44.5mm"/>
130
- <fo:region-start region-name="left-region" extent="37mm"/>
131
- <fo:region-end region-name="right-region" extent="37mm"/>
132
- </fo:simple-page-master>
133
-
134
- <fo:simple-page-master master-name="first_page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
135
- <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
136
- <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
137
- <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
138
- </xsl:if>
139
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
140
- <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
141
- <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
142
- </xsl:if>
143
- </fo:region-body>
144
- <fo:region-before region-name="header" extent="{$marginTop}mm"/>
145
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
146
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
147
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
148
- </fo:simple-page-master>
149
- <fo:simple-page-master master-name="odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
150
- <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
151
- <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
152
- <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
153
- </xsl:if>
154
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
155
- <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
156
- <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
157
- </xsl:if>
158
- </fo:region-body>
159
- <fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
160
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
161
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
162
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
163
- </fo:simple-page-master>
164
- <fo:simple-page-master master-name="even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
165
- <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
166
- <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
167
- <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
168
- </xsl:if>
169
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
170
- <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
171
- <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
172
- </xsl:if>
173
- </fo:region-body>
174
- <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
175
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
176
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
177
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
178
- </fo:simple-page-master>
179
-
180
- <fo:simple-page-master master-name="first_page_toc" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
181
- <xsl:if test="$vertical_layout = 'true'">
182
- <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
183
- <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
184
- </xsl:if>
185
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
186
- <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
187
- <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
188
- </xsl:if>
189
- </fo:region-body>
190
- <fo:region-before region-name="header-odd-first" extent="{$marginTop}mm"/>
191
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
192
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
193
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
194
- </fo:simple-page-master>
195
-
196
- <fo:page-sequence-master master-name="document_toc">
197
- <fo:repeatable-page-master-alternatives>
198
- <fo:conditional-page-master-reference page-position="first" master-reference="first_page_toc"/>
199
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
200
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
201
- </fo:repeatable-page-master-alternatives>
202
- </fo:page-sequence-master>
203
-
204
- <xsl:if test="1 = 3">
205
- <fo:simple-page-master master-name="document_toc_2024" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
206
- <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
207
- fo:region-body/@margin-top = left margin
208
- fo:region-body/@margin-bottom = right margin
209
- fo:region-body/margin-left = bottom margin
210
- fo:region-body/margin-right = top margin
211
- -->
212
- <!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
213
- <fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="{$marginLeftRight2}mm" margin-left="30mm" margin-right="30mm" writing-mode="tb-rl"/> <!-- background-color="rgb(240,240,240)" -->
214
- <fo:region-before region-name="header" extent="30mm"/> <!-- background-color="yellow" -->
215
- <fo:region-after region-name="footer" extent="210mm" writing-mode="tb-rl" background-color="green"/> <!-- 30 background-color="green" -->
216
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm" writing-mode="tb-rl" background-color="blue"/> <!-- background-color="blue" -->
217
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
218
- </fo:simple-page-master>
219
- </xsl:if>
220
-
221
- <fo:simple-page-master master-name="document_toc_2024" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
222
- <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
223
- fo:region-body/@margin-top = left margin
224
- fo:region-body/@margin-bottom = right margin
225
- fo:region-body/margin-left = bottom margin
226
- fo:region-body/margin-right = top margin
227
- -->
228
- <!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
229
- <fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="38mm" margin-left="30mm" margin-right="30mm" writing-mode="tb-rl"/> <!-- background-color="rgb(240,240,240)" -->
230
- <fo:region-before region-name="header" extent="30mm"/> <!-- background-color="yellow" -->
231
- <fo:region-after region-name="footer" extent="30mm"/> <!-- background-color="green" -->
232
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/> <!-- background-color="blue" -->
233
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
234
- </fo:simple-page-master>
235
-
236
- <fo:page-sequence-master master-name="document_preface">
237
- <fo:repeatable-page-master-alternatives>
238
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
239
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
240
- </fo:repeatable-page-master-alternatives>
241
- </fo:page-sequence-master>
242
-
243
- <fo:page-sequence-master master-name="document_first_section">
244
- <fo:repeatable-page-master-alternatives>
245
- <fo:conditional-page-master-reference page-position="first" master-reference="first_page"/>
246
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
247
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
248
- </fo:repeatable-page-master-alternatives>
249
- </fo:page-sequence-master>
250
-
251
- <fo:page-sequence-master master-name="document">
252
- <fo:repeatable-page-master-alternatives>
253
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
254
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
255
- </fo:repeatable-page-master-alternatives>
256
- </fo:page-sequence-master>
257
-
258
- <fo:simple-page-master master-name="document_2024" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
259
- <xsl:if test="$isGenerateTableIF = 'true'">
260
- <xsl:attribute name="page-width"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
261
- <xsl:attribute name="page-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
262
- </xsl:if>
263
- <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
264
- fo:region-body/@margin-top = left margin
265
- fo:region-body/@margin-bottom = right margin
266
- fo:region-body/margin-left = bottom margin
267
- fo:region-body/margin-right = top margin
268
- -->
269
- <!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
270
- <fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="{$marginLeftRight2}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm"> <!-- background-color="rgb(240,240,240)" -->
271
- <xsl:if test="$isGenerateTableIF = 'false'">
272
- <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
273
- </xsl:if>
274
- </fo:region-body>
275
- <fo:region-before region-name="header" extent="{$marginTop}mm"/> <!-- background-color="yellow" -->
276
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/> <!-- background-color="green" -->
277
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/> <!-- background-color="blue" -->
278
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
279
- </fo:simple-page-master>
280
-
281
- <fo:simple-page-master master-name="document_2024_page" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
282
- <xsl:if test="$isGenerateTableIF = 'true'">
283
- <xsl:attribute name="page-width"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
284
- <xsl:attribute name="page-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
285
- </xsl:if>
286
- <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
287
- fo:region-body/@margin-top = left margin
288
- fo:region-body/@margin-bottom = right margin
289
- fo:region-body/margin-left = bottom margin
290
- fo:region-body/margin-right = top margin
291
- -->
292
- <!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
293
- <fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="{$marginLeftRight2}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm"> <!-- background-color="rgb(240,240,240)" -->
294
- <xsl:if test="$isGenerateTableIF = 'false'">
295
- <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
296
- </xsl:if>
297
- </fo:region-body>
298
- <fo:region-before region-name="header" extent="{$marginTop}mm"/> <!-- background-color="yellow" -->
299
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/> <!-- background-color="green" -->
300
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/> <!-- background-color="blue" -->
301
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
302
- </fo:simple-page-master>
303
- <fo:simple-page-master master-name="document_2024_last" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
304
- <xsl:if test="$isGenerateTableIF = 'true'">
305
- <xsl:attribute name="page-width"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
306
- <xsl:attribute name="page-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
307
- </xsl:if>
308
- <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
309
- fo:region-body/@margin-top = left margin
310
- fo:region-body/@margin-bottom = right margin
311
- fo:region-body/margin-left = bottom margin
312
- fo:region-body/margin-right = top margin
313
- -->
314
- <!-- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2 + 40}mm" writing-mode="tb-rl" background-color="rgb(240,240,240)"/> -->
315
- <fo:region-body margin-top="194mm" margin-bottom="{$marginLeftRight2}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm"> <!-- background-color="rgb(240,240,240)" -->
316
- <xsl:if test="$isGenerateTableIF = 'false'">
317
- <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
318
- </xsl:if>
319
- </fo:region-body>
320
- <fo:region-before region-name="header-last" extent="{$marginTop}mm"> <!-- background-color="yellow" -->
321
- <xsl:if test="$isGenerateTableIF = 'false'">
322
- <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
323
- </xsl:if>
324
- </fo:region-before>
325
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/> <!-- background-color="green" -->
326
- <!-- for boilerplate:
327
- reserve paper space in left-region, but text will render in the header
328
- -->
329
- <fo:region-start region-name="left-region" extent="194mm"/> <!-- background-color="blue" background-color="rgb(230,230,230)" -->
330
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
331
- </fo:simple-page-master>
332
-
333
- <fo:page-sequence-master master-name="document_2024_with_last">
334
- <fo:repeatable-page-master-alternatives>
335
- <fo:conditional-page-master-reference page-position="last" master-reference="document_2024_last"/>
336
- <fo:conditional-page-master-reference page-position="any" master-reference="document_2024_page"/>
337
- </fo:repeatable-page-master-alternatives>
338
- </fo:page-sequence-master>
339
-
340
- <fo:simple-page-master master-name="commentary_first_page_even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
341
- <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
342
- <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
343
- <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
344
- </xsl:if>
345
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
346
- <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
347
- <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
348
- </xsl:if>
349
- </fo:region-body>
350
- <fo:region-before region-name="header-commentary-even-first" extent="{$marginTop}mm"/>
351
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
352
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
353
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
354
- </fo:simple-page-master>
355
-
356
- <fo:simple-page-master master-name="commentary_first_page_odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
357
- <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
358
- <xsl:attribute name="page-width"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
359
- <xsl:attribute name="page-height"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
360
- </xsl:if>
361
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm">
362
- <xsl:if test="$vertical_layout = 'true' and $isGenerateTableIF = 'false'">
363
- <xsl:attribute name="writing-mode">tb-rl</xsl:attribute>
364
- </xsl:if>
365
- </fo:region-body>
366
- <fo:region-before region-name="header-commentary-odd-first" extent="{$marginTop}mm"/>
367
- <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
368
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
369
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
370
- </fo:simple-page-master>
371
-
372
- <fo:page-sequence-master master-name="document_commentary_section">
373
- <fo:repeatable-page-master-alternatives>
374
- <fo:conditional-page-master-reference page-position="first" odd-or-even="even" master-reference="commentary_first_page_even"/>
375
- <fo:conditional-page-master-reference page-position="first" odd-or-even="odd" master-reference="commentary_first_page_odd"/>
376
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
377
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
378
- </fo:repeatable-page-master-alternatives>
379
- </fo:page-sequence-master>
380
-
381
- <!-- landscape -->
382
- <fo:simple-page-master master-name="odd-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
383
- <fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="{$marginLeftRight2}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm"/>
384
- <fo:region-before region-name="header-odd" extent="{$marginLeftRight1}mm" precedence="true"/>
385
- <fo:region-after region-name="footer" extent="{$marginLeftRight2}mm" precedence="true"/>
386
- <fo:region-start region-name="left-region-landscape" extent="{$marginBottom}mm"/>
387
- <fo:region-end region-name="right-region-landscape" extent="{$marginTop}mm"/>
388
- </fo:simple-page-master>
389
- <fo:simple-page-master master-name="even-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
390
- <fo:region-body margin-top="{$marginLeftRight2}mm" margin-bottom="{$marginLeftRight1}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm"/>
391
- <fo:region-before region-name="header-even" extent="{$marginLeftRight2}mm" precedence="true"/>
392
- <fo:region-after region-name="footer" extent="{$marginLeftRight1}mm" precedence="true"/>
393
- <fo:region-start region-name="left-region-landscape" extent="{$marginBottom}mm"/>
394
- <fo:region-end region-name="right-region-landspace" extent="{$marginTop}mm"/>
395
- </fo:simple-page-master>
396
- <fo:page-sequence-master master-name="document-landscape">
397
- <fo:repeatable-page-master-alternatives>
398
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-landscape"/>
399
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-landscape"/>
400
- </fo:repeatable-page-master-alternatives>
401
- </fo:page-sequence-master>
402
-
403
- <fo:simple-page-master master-name="back-page_2024" page-width="{$pageWidthA5}mm" page-height="{$pageHeightA5}mm">
404
- <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
405
- fo:region-body/@margin-top = left margin
406
- fo:region-body/@margin-bottom = right margin
407
- fo:region-body/margin-left = bottom margin
408
- fo:region-body/margin-right = top margin
409
- -->
410
- <fo:region-body margin-top="5mm" margin-bottom="122mm" margin-left="6.5mm" margin-right="70mm" writing-mode="tb-rl"/>
411
- <fo:region-before region-name="header" extent="70mm"/>
412
- <fo:region-after region-name="footer" extent="6.5mm"/>
413
- <fo:region-start region-name="left-region" extent="5mm"/>
414
- <fo:region-end region-name="right-region" extent="122mm"/>
415
- </fo:simple-page-master>
416
- </fo:layout-master-set>
420
+ <xsl:call-template name="layout-master-set"/>
417
421
 
418
422
  <fo:declarations>
419
423
  <xsl:call-template name="addPDFUAmeta"/>
@@ -500,20 +504,9 @@
500
504
  <xsl:apply-templates select="xalan:nodeset($docidentifier__)/node()"/>
501
505
  </xsl:variable>
502
506
 
503
- <xsl:variable name="copyrightText_">
504
- <xsl:variable name="backpage_boilerplate_text" select="normalize-space(/*/mn:metanorma-extension/mn:presentation-metadata/mn:backpage-boilerplate-text)"/>
505
- <xsl:value-of select="$backpage_boilerplate_text"/>
506
- <xsl:if test="$backpage_boilerplate_text = ''">
507
- <xsl:call-template name="getLocalizedString">
508
- <xsl:with-param name="key">permission_footer</xsl:with-param>
509
- <xsl:with-param name="formatted" select="$vertical_layout"/> <!-- $vertical_layout = 'true' -->
510
- <xsl:with-param name="bibdata_updated" select="/*/mn:bibdata"/> <!-- $vertical_layout = 'true' -->
511
- </xsl:call-template>
512
- </xsl:if>
513
- </xsl:variable>
514
- <xsl:variable name="copyrightText" select="normalize-space($copyrightText_)"/>
507
+ <xsl:variable name="copyrightText"><xsl:call-template name="get_copyrightText"/></xsl:variable>
515
508
 
516
- <xsl:variable name="doctype" select="/*/mn:bibdata/mn:ext/mn:doctype"/>
509
+ <xsl:variable name="doctype"><xsl:call-template name="get_doctype"/></xsl:variable>
517
510
 
518
511
  <xsl:variable name="title_ja" select="/*/mn:bibdata/mn:title[@language = 'ja' and @type = 'main']"/>
519
512
  <xsl:variable name="title_en" select="/*/mn:bibdata/mn:title[@language = 'en' and @type = 'main']"/>
@@ -525,50 +518,21 @@
525
518
  </xsl:variable>
526
519
  <xsl:variable name="cover_header_footer_background" select="normalize-space($cover_header_footer_background_)"/>
527
520
 
528
- <xsl:variable name="docidentifier_JIS_" select="/*/mn:bibdata/mn:docidentifier[@type = 'JIS']"/>
529
- <xsl:variable name="docidentifier_JIS">
521
+ <xsl:variable name="docidentifier_JIS"><xsl:call-template name="get_docidentifier_JIS"/></xsl:variable>
522
+ <xsl:variable name="docidentifier_JIS_no_year">
530
523
  <xsl:choose>
531
- <xsl:when test="contains($docidentifier_JIS_, ':')"><xsl:value-of select="substring-before($docidentifier_JIS_, ':')"/></xsl:when>
532
- <xsl:otherwise><xsl:value-of select="$docidentifier_JIS_"/></xsl:otherwise>
524
+ <xsl:when test="contains($docidentifier_JIS, ':')"><xsl:value-of select="substring-before($docidentifier_JIS, ':')"/></xsl:when>
525
+ <xsl:otherwise><xsl:value-of select="$docidentifier_JIS"/></xsl:otherwise>
533
526
  </xsl:choose>
534
527
  </xsl:variable>
535
528
  <xsl:variable name="edition" select="/mn:metanorma/mn:bibdata/mn:edition[@language = 'ja' and @numberonly = 'true']"/>
536
529
 
537
- <xsl:variable name="doclang">
538
- <xsl:call-template name="getLang"/>
539
- </xsl:variable>
530
+ <xsl:variable name="doclang"><xsl:call-template name="getLang"/></xsl:variable>
540
531
 
541
- <xsl:if test="$isGenerateTableIF = 'false'">
542
- <xsl:choose>
543
- <xsl:when test="$vertical_layout = 'true'">
544
- <xsl:call-template name="insertCoverPage2024">
545
- <xsl:with-param name="num" select="$num"/>
546
- <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS_"/>
547
- </xsl:call-template>
548
- </xsl:when>
549
- <xsl:when test="$doctype = 'technical-specification'">
550
- <xsl:call-template name="insertCoverPageJSA">
551
- <xsl:with-param name="num" select="$num"/>
552
- <xsl:with-param name="doclang" select="$doclang"/>
553
- <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS_"/>
554
- </xsl:call-template>
555
- </xsl:when>
556
- <xsl:otherwise>
557
- <xsl:call-template name="insertCoverPage">
558
- <xsl:with-param name="num" select="$num"/>
559
- <xsl:with-param name="copyrightText" select="$copyrightText"/>
560
- <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS_"/>
561
- </xsl:call-template>
562
- </xsl:otherwise>
563
- </xsl:choose>
564
-
565
- <xsl:if test="not($vertical_layout = 'true')">
566
- <xsl:call-template name="insertInnerCoverPage">
532
+ <xsl:call-template name="cover-page">
533
+ <xsl:with-param name="num" select="$num"/>
567
534
  <xsl:with-param name="docidentifier" select="$docidentifier"/>
568
- <xsl:with-param name="copyrightText" select="$copyrightText"/>
569
535
  </xsl:call-template>
570
- </xsl:if>
571
- </xsl:if>
572
536
 
573
537
  <!-- ========================== -->
574
538
  <!-- Contents and preface pages -->
@@ -583,10 +547,10 @@
583
547
 
584
548
  <xsl:choose>
585
549
  <xsl:when test="self::mn:clause and @type = 'toc'">
586
- <fo:page-sequence master-reference="document_toc" force-page-count="no-force">
550
+ <fo:page-sequence master-reference="toc" force-page-count="no-force">
587
551
 
588
552
  <xsl:if test="$vertical_layout = 'true'">
589
- <xsl:attribute name="master-reference">document_toc_2024</xsl:attribute>
553
+ <xsl:attribute name="master-reference">toc_vertical_layout</xsl:attribute>
590
554
  <xsl:attribute name="format">一</xsl:attribute>
591
555
  </xsl:if>
592
556
 
@@ -600,8 +564,8 @@
600
564
  <xsl:with-param name="cover_header_footer_background" select="$cover_header_footer_background"/>
601
565
  <xsl:with-param name="title_ja" select="$title_ja"/>
602
566
  <xsl:with-param name="i18n_JIS" select="$i18n_JIS"/>
603
- <xsl:with-param name="docidentifier" select="concat('JIS ', $docidentifier_JIS)"/>
604
- <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS_"/>
567
+ <xsl:with-param name="docidentifier" select="concat('JIS ', $docidentifier_JIS_no_year)"/>
568
+ <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS"/>
605
569
  <xsl:with-param name="edition" select="$edition"/>
606
570
  <xsl:with-param name="copyrightText">
607
571
  <xsl:copy-of select="$copyrightText"/>
@@ -653,10 +617,10 @@
653
617
 
654
618
  <xsl:if test="$paged_xml_preface/mn:page and count($paged_xml_preface/mn:page/*) != 0">
655
619
  <!-- Preface pages -->
656
- <fo:page-sequence master-reference="document_preface" force-page-count="no-force">
620
+ <fo:page-sequence master-reference="preface" force-page-count="no-force">
657
621
 
658
622
  <xsl:if test="$vertical_layout = 'true'">
659
- <xsl:attribute name="master-reference">document_2024</xsl:attribute>
623
+ <xsl:attribute name="master-reference">document_vertical_layout</xsl:attribute>
660
624
  <xsl:attribute name="format">一</xsl:attribute>
661
625
  </xsl:if>
662
626
 
@@ -676,8 +640,8 @@
676
640
  <xsl:with-param name="cover_header_footer_background" select="$cover_header_footer_background"/>
677
641
  <xsl:with-param name="title_ja" select="$title_ja"/>
678
642
  <xsl:with-param name="i18n_JIS" select="$i18n_JIS"/>
679
- <xsl:with-param name="docidentifier" select="concat('JIS ', $docidentifier_JIS)"/>
680
- <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS_"/>
643
+ <xsl:with-param name="docidentifier" select="concat('JIS ', $docidentifier_JIS_no_year)"/>
644
+ <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS"/>
681
645
  <xsl:with-param name="edition" select="$edition"/>
682
646
  <xsl:with-param name="copyrightText">
683
647
  <xsl:copy-of select="$copyrightText"/>
@@ -715,7 +679,7 @@
715
679
  <xsl:if test="not($vertical_layout = 'true') and not($doctype = 'technical-specification')">
716
680
 
717
681
  <!-- Document type rendering -->
718
- <fo:page-sequence master-reference="document_preface" force-page-count="no-force">
682
+ <fo:page-sequence master-reference="preface" force-page-count="no-force">
719
683
  <xsl:call-template name="insertHeaderFooter">
720
684
  <xsl:with-param name="docidentifier" select="$docidentifier"/>
721
685
  <xsl:with-param name="copyrightText" select="$copyrightText"/>
@@ -794,11 +758,11 @@
794
758
  </xsl:for-each>
795
759
  </xsl:variable>
796
760
 
797
- <!-- <xsl:if test="$debug = 'true'">
761
+ <xsl:if test="$debug = 'true'">
798
762
  <redirect:write file="structured_xml_.xml">
799
763
  <xsl:copy-of select="$structured_xml"/>
800
764
  </redirect:write>
801
- </xsl:if> -->
765
+ </xsl:if>
802
766
 
803
767
  <xsl:variable name="paged_xml">
804
768
  <xsl:call-template name="makePagedXML">
@@ -815,9 +779,9 @@
815
779
 
816
780
  <xsl:choose>
817
781
  <xsl:when test="$vertical_layout = 'true'">
818
- <xsl:attribute name="master-reference">document_2024</xsl:attribute>
782
+ <xsl:attribute name="master-reference">document_vertical_layout</xsl:attribute>
819
783
  <xsl:if test="position() = last()">
820
- <xsl:attribute name="master-reference">document_2024_with_last</xsl:attribute>
784
+ <xsl:attribute name="master-reference">document_vertical_layout_with_last</xsl:attribute>
821
785
  </xsl:if>
822
786
 
823
787
  <xsl:attribute name="format">一</xsl:attribute>
@@ -872,8 +836,8 @@
872
836
  <xsl:with-param name="cover_header_footer_background" select="$cover_header_footer_background"/>
873
837
  <xsl:with-param name="title_ja" select="$title_ja"/>
874
838
  <xsl:with-param name="i18n_JIS" select="$i18n_JIS"/>
875
- <xsl:with-param name="docidentifier" select="concat('JIS ', $docidentifier_JIS)"/>
876
- <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS_"/>
839
+ <xsl:with-param name="docidentifier" select="concat('JIS ', $docidentifier_JIS_no_year)"/>
840
+ <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS"/>
877
841
  <xsl:with-param name="edition" select="$edition"/>
878
842
  <xsl:with-param name="copyrightText">
879
843
  <xsl:copy-of select="$copyrightText"/>
@@ -973,20 +937,18 @@
973
937
  <xsl:with-param name="num" select="$num"/>
974
938
  <xsl:with-param name="doclang" select="'en'"/>
975
939
  <xsl:with-param name="first">false</xsl:with-param>
976
- <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS_"/>
977
- </xsl:call-template>
978
- </xsl:if>
979
-
980
- <xsl:if test="$vertical_layout = 'true'">
981
- <xsl:call-template name="insertBackPage2024">
982
- <xsl:with-param name="num" select="$num"/>
983
- <xsl:with-param name="copyrightText">
984
- <xsl:copy-of select="$copyrightText"/>
985
- </xsl:with-param>
940
+ <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS"/>
986
941
  </xsl:call-template>
987
942
  </xsl:if>
988
943
  </xsl:if>
989
944
 
945
+ <xsl:call-template name="back-page">
946
+ <xsl:with-param name="num" select="$num"/>
947
+ <xsl:with-param name="copyrightText">
948
+ <xsl:copy-of select="$copyrightText"/>
949
+ </xsl:with-param>
950
+ </xsl:call-template>
951
+
990
952
  </xsl:for-each>
991
953
 
992
954
  </xsl:for-each>
@@ -1002,6 +964,68 @@
1002
964
  </fo:root>
1003
965
  </xsl:template>
1004
966
 
967
+ <xsl:template name="get_doctype">
968
+ <xsl:value-of select="/*/mn:bibdata/mn:ext/mn:doctype"/>
969
+ </xsl:template>
970
+ <xsl:template name="get_docidentifier_JIS">
971
+ <xsl:value-of select="/*/mn:bibdata/mn:docidentifier[@type = 'JIS']"/>
972
+ </xsl:template>
973
+
974
+ <xsl:template name="get_copyrightText">
975
+ <xsl:variable name="copyrightText_">
976
+ <xsl:variable name="backpage_boilerplate_text" select="normalize-space(/*/mn:metanorma-extension/mn:presentation-metadata/mn:backpage-boilerplate-text)"/>
977
+ <xsl:value-of select="$backpage_boilerplate_text"/>
978
+ <xsl:if test="$backpage_boilerplate_text = ''">
979
+ <xsl:call-template name="getLocalizedString">
980
+ <xsl:with-param name="key">permission_footer</xsl:with-param>
981
+ <xsl:with-param name="formatted" select="$vertical_layout"/> <!-- $vertical_layout = 'true' -->
982
+ <xsl:with-param name="bibdata_updated" select="/*/mn:bibdata"/> <!-- $vertical_layout = 'true' -->
983
+ </xsl:call-template>
984
+ </xsl:if>
985
+ </xsl:variable>
986
+ <xsl:value-of select="normalize-space($copyrightText_)"/>
987
+ </xsl:template>
988
+
989
+ <xsl:template name="cover-page">
990
+ <xsl:param name="num"/>
991
+ <xsl:param name="docidentifier"/>
992
+ <xsl:if test="$isGenerateTableIF = 'false'">
993
+ <xsl:variable name="doctype"><xsl:call-template name="get_doctype"/></xsl:variable>
994
+ <xsl:variable name="docidentifier_JIS"><xsl:call-template name="get_docidentifier_JIS"/></xsl:variable>
995
+ <xsl:variable name="doclang"><xsl:call-template name="getLang"/></xsl:variable>
996
+ <xsl:variable name="copyrightText"><xsl:call-template name="get_copyrightText"/></xsl:variable>
997
+ <xsl:choose>
998
+ <xsl:when test="$vertical_layout = 'true'">
999
+ <xsl:call-template name="insertCoverPageVerticalLayout">
1000
+ <xsl:with-param name="num" select="$num"/>
1001
+ <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS"/>
1002
+ </xsl:call-template>
1003
+ </xsl:when>
1004
+ <xsl:when test="$doctype = 'technical-specification'">
1005
+ <xsl:call-template name="insertCoverPageJSA">
1006
+ <xsl:with-param name="num" select="$num"/>
1007
+ <xsl:with-param name="doclang" select="$doclang"/>
1008
+ <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS"/>
1009
+ </xsl:call-template>
1010
+ </xsl:when>
1011
+ <xsl:otherwise>
1012
+ <xsl:call-template name="insertCoverPage">
1013
+ <xsl:with-param name="num" select="$num"/>
1014
+ <xsl:with-param name="copyrightText" select="$copyrightText"/>
1015
+ <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS"/>
1016
+ </xsl:call-template>
1017
+ </xsl:otherwise>
1018
+ </xsl:choose>
1019
+
1020
+ <xsl:if test="not($vertical_layout = 'true')">
1021
+ <xsl:call-template name="insertInnerCoverPage">
1022
+ <xsl:with-param name="docidentifier" select="$docidentifier"/>
1023
+ <xsl:with-param name="copyrightText" select="$copyrightText"/>
1024
+ </xsl:call-template>
1025
+ </xsl:if>
1026
+ </xsl:if>
1027
+ </xsl:template>
1028
+
1005
1029
  <xsl:template match="mn:references[not(@hidden = 'true')]" mode="linear_xml" priority="2">
1006
1030
  <xsl:copy>
1007
1031
  <xsl:apply-templates select="@*|node()" mode="linear_xml"/>
@@ -1016,7 +1040,7 @@
1016
1040
  <xsl:template match="mn:preface/mn:clause[@type = 'toc']" priority="4">
1017
1041
  <xsl:param name="num"/>
1018
1042
  <xsl:apply-templates/>
1019
- <xsl:if test="count(*) = 1 and mn:title"> <!-- if there isn't user ToC -->
1043
+ <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
1020
1044
  <!-- fill ToC -->
1021
1045
  <fo:block role="TOC">
1022
1046
  <xsl:if test="not($vertical_layout = 'true') and not($lang = 'en')">
@@ -1092,7 +1116,7 @@
1092
1116
  </xsl:if>
1093
1117
  </xsl:template>
1094
1118
 
1095
- <xsl:template match="mn:clause[@type = 'toc']/mn:title" priority="3">
1119
+ <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
1096
1120
  <fo:block text-align="center" font-size="14pt" margin-top="8.5mm">
1097
1121
  <xsl:if test="not($vertical_layout = 'true')">
1098
1122
  <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
@@ -1295,7 +1319,7 @@
1295
1319
  </xsl:variable>
1296
1320
  <xsl:variable name="i18n_JIS" select="normalize-space($i18n_JIS_)"/>
1297
1321
 
1298
- <xsl:template name="insertCoverPage2024">
1322
+ <xsl:template name="insertCoverPageVerticalLayout">
1299
1323
  <xsl:param name="num"/>
1300
1324
  <xsl:param name="docidentifier_jis"/>
1301
1325
 
@@ -1303,7 +1327,7 @@
1303
1327
  <xsl:variable name="docidentifier_number" select="java:replaceAll(java:java.lang.String.new($docidentifier_jis), '^(.*)(:)(.*)$', '$1')"/>
1304
1328
  <xsl:variable name="docidentifier_year" select="java:replaceAll(java:java.lang.String.new($docidentifier_jis), '^(.*)(:)(.*)$', '$3')"/>
1305
1329
 
1306
- <fo:page-sequence master-reference="cover-page_2024" force-page-count="no-force">
1330
+ <fo:page-sequence master-reference="cover-page_vertical_layout" force-page-count="no-force">
1307
1331
 
1308
1332
  <!-- <xsl:variable name="cover_page_background_1_value" select="normalize-space(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:color-cover-page-background-1)"/>
1309
1333
  <xsl:variable name="cover_page_background_1_">
@@ -1477,63 +1501,67 @@
1477
1501
 
1478
1502
  </fo:flow>
1479
1503
  </fo:page-sequence>
1480
- </xsl:template> <!-- insertCoverPage2024 -->
1504
+ </xsl:template> <!-- insertCoverPageVerticalLayout -->
1481
1505
 
1482
- <xsl:template name="insertBackPage2024">
1506
+ <xsl:template name="back-page">
1483
1507
  <xsl:param name="num"/>
1484
1508
  <xsl:param name="copyrightText"/>
1509
+ <xsl:if test="$isGenerateTableIF = 'false'">
1510
+ <xsl:if test="$vertical_layout = 'true'">
1485
1511
 
1486
- <fo:page-sequence master-reference="back-page_2024" force-page-count="no-force" font-family="Noto Serif JP" font-weight="500">
1512
+ <fo:page-sequence master-reference="back-page" force-page-count="no-force" font-family="Noto Serif JP" font-weight="500">
1487
1513
 
1488
- <fo:static-content flow-name="header">
1489
- <xsl:variable name="presentation_metadata_image_name">
1490
- <xsl:choose>
1491
- <xsl:when test="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'backpage-image']/mn:value/mn:image">backpage-image</xsl:when>
1492
- <xsl:otherwise>coverpage-image</xsl:otherwise>
1493
- </xsl:choose>
1494
- </xsl:variable>
1495
- <xsl:call-template name="insertBackgroundPageImage">
1496
- <xsl:with-param name="name" select="$presentation_metadata_image_name"/>
1497
- <xsl:with-param name="suffix">back</xsl:with-param>
1498
- </xsl:call-template>
1499
- </fo:static-content>
1514
+ <fo:static-content flow-name="header">
1515
+ <xsl:variable name="presentation_metadata_image_name">
1516
+ <xsl:choose>
1517
+ <xsl:when test="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'backpage-image']/mn:value/mn:image">backpage-image</xsl:when>
1518
+ <xsl:otherwise>coverpage-image</xsl:otherwise>
1519
+ </xsl:choose>
1520
+ </xsl:variable>
1521
+ <xsl:call-template name="insertBackgroundPageImage">
1522
+ <xsl:with-param name="name" select="$presentation_metadata_image_name"/>
1523
+ <xsl:with-param name="suffix">back</xsl:with-param>
1524
+ </xsl:call-template>
1525
+ </fo:static-content>
1500
1526
 
1501
- <fo:flow flow-name="xsl-region-body">
1502
- <!-- publication date -->
1503
- <fo:block font-size="8pt" margin-left="90mm" text-align-last="justify" letter-spacing="0.5mm">
1504
- <xsl:variable name="date_published"><xsl:apply-templates select="/*/mn:bibdata/mn:date[@type = 'published']/text()"/></xsl:variable>
1505
- <xsl:copy-of select="$date_published"/>
1506
- <xsl:choose>
1507
- <xsl:when test="normalize-space($date_published) != ''">
1508
- <fo:inline keep-together.within-line="always">
1509
- <fo:leader leader-pattern="space"/>
1510
- <xsl:text>発行</xsl:text>
1511
- </fo:inline>
1512
- </xsl:when>
1513
- <xsl:otherwise> </xsl:otherwise>
1514
- </xsl:choose>
1515
- </fo:block>
1516
- <!-- revision date -->
1517
- <fo:block font-size="8pt" margin-left="90mm" text-align-last="justify" letter-spacing="0.5mm">
1518
- <xsl:variable name="date_revised"><xsl:apply-templates select="/*/mn:bibdata/mn:date[@type = 'revised']/text()"/></xsl:variable>
1519
- <xsl:copy-of select="$date_revised"/>
1520
- <xsl:choose>
1521
- <xsl:when test="normalize-space($date_revised) != ''">
1522
- <fo:inline keep-together.within-line="always">
1523
- <fo:leader leader-pattern="space"/>
1524
- <xsl:text>改正</xsl:text>
1525
- </fo:inline>
1526
- </xsl:when>
1527
- <xsl:otherwise> </xsl:otherwise>
1528
- </xsl:choose>
1529
- </fo:block>
1530
- <fo:block font-size="12pt" margin-top="7mm" text-align="right">
1531
- <!-- <xsl:value-of select="$copyrightText"/> -->
1532
- <xsl:copy-of select="$copyrightText"/>
1533
- </fo:block>
1534
- </fo:flow>
1535
- </fo:page-sequence>
1536
- </xsl:template> <!-- insertBackPage2024 -->
1527
+ <fo:flow flow-name="xsl-region-body">
1528
+ <!-- publication date -->
1529
+ <fo:block font-size="8pt" margin-left="90mm" text-align-last="justify" letter-spacing="0.5mm">
1530
+ <xsl:variable name="date_published"><xsl:apply-templates select="/*/mn:bibdata/mn:date[@type = 'published']/text()"/></xsl:variable>
1531
+ <xsl:copy-of select="$date_published"/>
1532
+ <xsl:choose>
1533
+ <xsl:when test="normalize-space($date_published) != ''">
1534
+ <fo:inline keep-together.within-line="always">
1535
+ <fo:leader leader-pattern="space"/>
1536
+ <xsl:text>発行</xsl:text>
1537
+ </fo:inline>
1538
+ </xsl:when>
1539
+ <xsl:otherwise> </xsl:otherwise>
1540
+ </xsl:choose>
1541
+ </fo:block>
1542
+ <!-- revision date -->
1543
+ <fo:block font-size="8pt" margin-left="90mm" text-align-last="justify" letter-spacing="0.5mm">
1544
+ <xsl:variable name="date_revised"><xsl:apply-templates select="/*/mn:bibdata/mn:date[@type = 'revised']/text()"/></xsl:variable>
1545
+ <xsl:copy-of select="$date_revised"/>
1546
+ <xsl:choose>
1547
+ <xsl:when test="normalize-space($date_revised) != ''">
1548
+ <fo:inline keep-together.within-line="always">
1549
+ <fo:leader leader-pattern="space"/>
1550
+ <xsl:text>改正</xsl:text>
1551
+ </fo:inline>
1552
+ </xsl:when>
1553
+ <xsl:otherwise> </xsl:otherwise>
1554
+ </xsl:choose>
1555
+ </fo:block>
1556
+ <fo:block font-size="12pt" margin-top="7mm" text-align="right">
1557
+ <!-- <xsl:value-of select="$copyrightText"/> -->
1558
+ <xsl:copy-of select="$copyrightText"/>
1559
+ </fo:block>
1560
+ </fo:flow>
1561
+ </fo:page-sequence>
1562
+ </xsl:if>
1563
+ </xsl:if>
1564
+ </xsl:template> <!-- END: back-page -->
1537
1565
 
1538
1566
  <xsl:template name="insertBackgroundColor">
1539
1567
  <xsl:param name="opacity">1</xsl:param>
@@ -1846,7 +1874,7 @@
1846
1874
  <xsl:choose>
1847
1875
  <xsl:when test="self::mn:p and count(node()) = count(processing-instruction())"><!-- skip --></xsl:when> <!-- empty paragraph with processing-instruction -->
1848
1876
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
1849
- <xsl:when test="self::mn:title or self::mn:term">
1877
+ <xsl:when test="self::mn:fmt-title or self::mn:term">
1850
1878
  <xsl:apply-templates select="."/>
1851
1879
  </xsl:when>
1852
1880
  <xsl:when test="@mainsection = 'true'">
@@ -1873,7 +1901,7 @@
1873
1901
  </xsl:choose>
1874
1902
  </xsl:template>
1875
1903
 
1876
- <xsl:template match="mn:title" priority="2" name="title">
1904
+ <xsl:template match="mn:fmt-title" priority="2" name="title">
1877
1905
 
1878
1906
  <xsl:variable name="level">
1879
1907
  <xsl:call-template name="getLevel"/>
@@ -2113,7 +2141,7 @@
2113
2141
  </xsl:if>
2114
2142
  </fo:block>
2115
2143
  <fo:block>
2116
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
2144
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
2117
2145
  </fo:block>
2118
2146
  </xsl:template>
2119
2147
 
@@ -2137,7 +2165,7 @@
2137
2165
 
2138
2166
  <xsl:choose>
2139
2167
 
2140
- <xsl:when test="preceding-sibling::*[1][self::mn:title]/@inline-header = 'true' and $inline-header = 'false'"/> <!-- paragraph displayed in title template -->
2168
+ <xsl:when test="preceding-sibling::*[1][self::mn:fmt-title]/@inline-header = 'true' and $inline-header = 'false'"/> <!-- paragraph displayed in title template -->
2141
2169
 
2142
2170
  <xsl:otherwise>
2143
2171
 
@@ -2169,7 +2197,7 @@
2169
2197
  <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
2170
2198
  </xsl:if>
2171
2199
 
2172
- <xsl:if test="parent::mn:definition">
2200
+ <xsl:if test="parent::mn:fmt-definition">
2173
2201
  <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
2174
2202
  </xsl:if>
2175
2203
 
@@ -2208,12 +2236,12 @@
2208
2236
  <fo:list-item>
2209
2237
  <fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()">
2210
2238
  <fo:block xsl:use-attribute-sets="note-name-style">
2211
- <xsl:apply-templates select="mn:name"/>
2239
+ <xsl:apply-templates select="mn:fmt-name"/>
2212
2240
  </fo:block>
2213
2241
  </fo:list-item-label>
2214
2242
  <fo:list-item-body start-indent="body-start()">
2215
2243
  <fo:block>
2216
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
2244
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
2217
2245
  </fo:block>
2218
2246
  </fo:list-item-body>
2219
2247
  </fo:list-item>
@@ -2864,7 +2892,7 @@
2864
2892
  <xsl:choose>
2865
2893
  <xsl:when test="$vertical_layout = 'true'">
2866
2894
  <xsl:choose>
2867
- <xsl:when test="ancestor::mn:xref and (starts-with(., 'http:') or starts-with(., 'https') or starts-with(., 'www') or starts-with(., 'mailto') or starts-with(., 'ftp'))">
2895
+ <xsl:when test="(ancestor::mn:xref or ancestor::mn:fmt-xref) and (starts-with(., 'http:') or starts-with(., 'https') or starts-with(., 'www') or starts-with(., 'mailto') or starts-with(., 'ftp'))">
2868
2896
  <xsl:value-of select="."/>
2869
2897
  </xsl:when>
2870
2898
  <xsl:otherwise>
@@ -2933,7 +2961,8 @@
2933
2961
  </xsl:template>
2934
2962
  <!-- <xsl:template match="mn:example/mn:fmt-name[contains(normalize-space(), ' — ')]" mode="update_xml_step1"> -->
2935
2963
  <xsl:template match="mn:example/mn:fmt-name[contains(mn:span/text(), ' — ')]" mode="update_xml_step1" priority="2">
2936
- <xsl:element name="name" namespace="{$namespace_full}">
2964
+ <!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
2965
+ <xsl:copy>
2937
2966
  <xsl:copy-of select="@*"/>
2938
2967
  <!-- <xsl:variable name="example_name">
2939
2968
  <xsl:apply-templates select="." mode="update_xml_step1"/>
@@ -2941,7 +2970,8 @@
2941
2970
  <xsl:apply-templates select="xalan:nodeset($example_name)//text()[1]" mode="update_xml_step1"/>
2942
2971
  -->
2943
2972
  <xsl:apply-templates select="*[1]" mode="update_xml_step1"/>
2944
- </xsl:element>
2973
+ </xsl:copy>
2974
+ <!-- </xsl:element> -->
2945
2975
  </xsl:template>
2946
2976
  <xsl:template match="mn:example/mn:fmt-name//text()" mode="update_xml_step1">
2947
2977
  <xsl:variable name="example_name" select="."/>
@@ -3069,7 +3099,7 @@
3069
3099
  <fo:inline>
3070
3100
  <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
3071
3101
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3072
- <xsl:if test="ancestor::mn:preferred">
3102
+ <xsl:if test="ancestor::mn:fmt-preferred">
3073
3103
  <xsl:attribute name="font-weight">normal</xsl:attribute>
3074
3104
  </xsl:if>
3075
3105
  <xsl:apply-templates/>
@@ -3094,7 +3124,7 @@
3094
3124
  <xsl:if test="not(ancestor::mn:p[@class = 'zzSTDTitle2']) and not(ancestor::mn:span[@class = 'JIS'])">
3095
3125
  <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
3096
3126
  </xsl:if>
3097
- <xsl:if test="ancestor::mn:preferred">
3127
+ <xsl:if test="ancestor::mn:fmt-preferred">
3098
3128
  <xsl:attribute name="font-weight">normal</xsl:attribute>
3099
3129
  </xsl:if>
3100
3130
  <xsl:apply-templates/>
@@ -3113,7 +3143,7 @@
3113
3143
  <fo:inline>
3114
3144
  <xsl:if test="not(ancestor::mn:p[@class = 'zzSTDTitle2']) and not(ancestor::mn:span[@class = 'JIS'])">
3115
3145
  </xsl:if>
3116
- <xsl:if test="ancestor::mn:preferred">
3146
+ <xsl:if test="ancestor::mn:fmt-preferred">
3117
3147
  <xsl:attribute name="font-weight">normal</xsl:attribute>
3118
3148
  </xsl:if>
3119
3149
  <xsl:for-each select="node()">
@@ -3122,7 +3152,7 @@
3122
3152
  <!-- convert to vertical layout -->
3123
3153
  <xsl:variable name="text">
3124
3154
  <xsl:choose>
3125
- <xsl:when test="(ancestor::*[local-name(../..) = 'note'] or ancestor::*[local-name(../..) = 'example'] ) and ancestor::*[local-name(..) = 'name']">
3155
+ <xsl:when test="(ancestor::*[local-name(../..) = 'note'] or ancestor::*[local-name(../..) = 'example'] ) and ancestor::*[parent::mn:fmt-name]">
3126
3156
  <xsl:value-of select="concat(' ', normalize-space(.))"/>
3127
3157
  </xsl:when>
3128
3158
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
@@ -3172,7 +3202,7 @@
3172
3202
  </xsl:template>
3173
3203
 
3174
3204
  <!-- patch for correct list-item-label rendering: enclose each char in inline-container -->
3175
- <xsl:template match="*[self::mn:note or self::mn:example]/mn:name/text()" priority="3">
3205
+ <xsl:template match="*[self::mn:note or self::mn:example]/mn:fmt-name/text()" priority="3">
3176
3206
  <xsl:choose>
3177
3207
  <xsl:when test="not($vertical_layout = 'true')">
3178
3208
  <xsl:value-of select="."/>
@@ -3187,7 +3217,7 @@
3187
3217
  </xsl:choose>
3188
3218
  </xsl:template>
3189
3219
 
3190
- <xsl:template match="mn:figure/mn:name | mn:image/mn:name" priority="3">
3220
+ <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name" priority="3">
3191
3221
  <xsl:param name="process">false</xsl:param>
3192
3222
 
3193
3223
  <xsl:if test="normalize-space() != '' and (not($vertical_layout = 'true') or $process = 'true')">
@@ -3399,9 +3429,9 @@
3399
3429
  </fo:block>
3400
3430
  <fo:block margin-top="6.5mm" font-size="10pt" font-weight="bold" margin-left="16.5mm">
3401
3431
  <fo:inline padding-right="7mm"><xsl:value-of select="xalan:nodeset($bibdata)//mn:bibdata/mn:date[@type = 'published']"/></fo:inline>
3402
- <xsl:variable name="edition" select="xalan:nodeset($bibdata)//mn:edition[@language = 'ja'][1]"/>
3432
+ <xsl:variable name="edition_ja" select="xalan:nodeset($bibdata)//mn:edition[@language = 'ja'][1]"/>
3403
3433
  <!-- add spaced between characters -->
3404
- <fo:inline padding-right="6mm"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($edition), '(.)', '$1 ')"/></fo:inline>
3434
+ <fo:inline padding-right="6mm"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($edition_ja), '(.)', '$1 ')"/></fo:inline>
3405
3435
  発行
3406
3436
  </fo:block>
3407
3437
 
@@ -5711,10 +5741,6 @@
5711
5741
  <title-part lang="ru">
5712
5742
  </title-part>
5713
5743
  <title-part lang="zh">第 # 部分:</title-part>
5714
-
5715
- <title-subpart lang="en">Sub-part #</title-subpart>
5716
- <title-subpart lang="fr">Partie de sub #</title-subpart>
5717
-
5718
5744
  </xsl:variable>
5719
5745
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
5720
5746
 
@@ -6188,7 +6214,8 @@
6188
6214
  <xsl:template match="mn:stem" mode="update_xml_step1"/>
6189
6215
 
6190
6216
  <xsl:template match="mn:fmt-stem" mode="update_xml_step1">
6191
- <xsl:element name="stem" namespace="{$namespace_full}">
6217
+ <!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
6218
+ <xsl:copy>
6192
6219
  <xsl:copy-of select="@*"/>
6193
6220
  <xsl:choose>
6194
6221
  <xsl:when test="mn:semx and count(node()) = 1">
@@ -6212,7 +6239,8 @@
6212
6239
  </xsl:choose>
6213
6240
  </xsl:otherwise>
6214
6241
  </xsl:choose>
6215
- </xsl:element>
6242
+ </xsl:copy>
6243
+ <!-- </xsl:element> -->
6216
6244
  </xsl:template>
6217
6245
 
6218
6246
  <xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
@@ -6374,12 +6402,14 @@
6374
6402
  </xsl:template>
6375
6403
 
6376
6404
  <xsl:template match="mn:fmt-title" mode="update_xml_step1">
6377
- <xsl:element name="title" namespace="{$namespace_full}">
6405
+ <!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
6406
+ <xsl:copy>
6378
6407
  <xsl:copy-of select="@*"/>
6379
6408
  <xsl:call-template name="addNamedDestinationAttribute"/>
6380
6409
 
6381
6410
  <xsl:apply-templates mode="update_xml_step1"/>
6382
- </xsl:element>
6411
+ </xsl:copy>
6412
+ <!-- </xsl:element> -->
6383
6413
  </xsl:template>
6384
6414
 
6385
6415
  <xsl:template name="addNamedDestinationAttribute">
@@ -6391,12 +6421,14 @@
6391
6421
  <xsl:apply-templates mode="update_xml_step1"/>
6392
6422
  </xsl:when>
6393
6423
  <xsl:otherwise>
6394
- <xsl:element name="name" namespace="{$namespace_full}">
6424
+ <!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
6425
+ <xsl:copy>
6395
6426
  <xsl:copy-of select="@*"/>
6396
6427
  <xsl:call-template name="addNamedDestinationAttribute"/>
6397
6428
 
6398
6429
  <xsl:apply-templates mode="update_xml_step1"/>
6399
- </xsl:element>
6430
+ </xsl:copy>
6431
+ <!-- </xsl:element> -->
6400
6432
  </xsl:otherwise>
6401
6433
  </xsl:choose>
6402
6434
  </xsl:template>
@@ -6411,7 +6443,7 @@
6411
6443
  <xsl:apply-templates mode="update_xml_step1"/>
6412
6444
  </xsl:template>
6413
6445
  <xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="update_xml_step1">
6414
- <xsl:element name="preferred" namespace="{$namespace_full}">
6446
+ <xsl:element name="fmt-preferred" namespace="{$namespace_full}">
6415
6447
  <xsl:copy-of select="@*"/>
6416
6448
  <xsl:apply-templates mode="update_xml_step1"/>
6417
6449
  </xsl:element>
@@ -6421,7 +6453,7 @@
6421
6453
  <xsl:apply-templates mode="update_xml_step1"/>
6422
6454
  </xsl:template>
6423
6455
  <xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="update_xml_step1">
6424
- <xsl:element name="admitted" namespace="{$namespace_full}">
6456
+ <xsl:element name="fmt-admitted" namespace="{$namespace_full}">
6425
6457
  <xsl:copy-of select="@*"/>
6426
6458
  <xsl:apply-templates mode="update_xml_step1"/>
6427
6459
  </xsl:element>
@@ -6431,32 +6463,32 @@
6431
6463
  <xsl:apply-templates mode="update_xml_step1"/>
6432
6464
  </xsl:template>
6433
6465
  <xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="update_xml_step1">
6434
- <xsl:element name="deprecates" namespace="{$namespace_full}">
6466
+ <xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
6435
6467
  <xsl:copy-of select="@*"/>
6436
6468
  <xsl:apply-templates mode="update_xml_step1"/>
6437
6469
  </xsl:element>
6438
6470
  </xsl:template>
6439
6471
 
6440
- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
6472
+ <!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
6441
6473
  <xsl:element name="definition" namespace="{$namespace_full}">
6442
6474
  <xsl:copy-of select="@*"/>
6443
6475
  <xsl:apply-templates mode="update_xml_step1"/>
6444
6476
  </xsl:element>
6445
6477
  </xsl:template>
6446
-
6478
+
6447
6479
  <xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
6448
6480
  <xsl:element name="termsource" namespace="{$namespace_full}">
6449
6481
  <xsl:copy-of select="@*"/>
6450
6482
  <xsl:apply-templates mode="update_xml_step1"/>
6451
6483
  </xsl:element>
6452
6484
  </xsl:template>
6453
-
6485
+
6454
6486
  <xsl:template match="mn:fmt-source" mode="update_xml_step1">
6455
6487
  <xsl:element name="source" namespace="{$namespace_full}">
6456
6488
  <xsl:copy-of select="@*"/>
6457
6489
  <xsl:apply-templates mode="update_xml_step1"/>
6458
6490
  </xsl:element>
6459
- </xsl:template>
6491
+ </xsl:template> -->
6460
6492
 
6461
6493
  <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">
6462
6494
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -6479,12 +6511,12 @@
6479
6511
  </xsl:template>
6480
6512
 
6481
6513
  <xsl:template match="mn:identifier" mode="update_xml_step1"/>
6482
- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
6514
+ <!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
6483
6515
  <xsl:element name="identifier" namespace="{$namespace_full}">
6484
6516
  <xsl:copy-of select="@*"/>
6485
6517
  <xsl:apply-templates mode="update_xml_step1"/>
6486
6518
  </xsl:element>
6487
- </xsl:template>
6519
+ </xsl:template> -->
6488
6520
 
6489
6521
  <xsl:template match="mn:concept" mode="update_xml_step1"/>
6490
6522
 
@@ -6494,51 +6526,53 @@
6494
6526
 
6495
6527
  <xsl:template match="mn:eref" mode="update_xml_step1"/>
6496
6528
 
6497
- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
6529
+ <!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
6498
6530
  <xsl:element name="eref" namespace="{$namespace_full}">
6499
6531
  <xsl:copy-of select="@*"/>
6500
6532
  <xsl:apply-templates mode="update_xml_step1"/>
6501
6533
  </xsl:element>
6502
- </xsl:template>
6534
+ </xsl:template> -->
6503
6535
 
6504
6536
  <xsl:template match="mn:xref" mode="update_xml_step1"/>
6505
6537
 
6506
- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
6538
+ <!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
6507
6539
  <xsl:element name="xref" namespace="{$namespace_full}">
6508
6540
  <xsl:copy-of select="@*"/>
6509
6541
  <xsl:apply-templates mode="update_xml_step1"/>
6510
6542
  </xsl:element>
6511
- </xsl:template>
6543
+ </xsl:template> -->
6512
6544
 
6513
6545
  <xsl:template match="mn:link" mode="update_xml_step1"/>
6514
6546
 
6515
- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
6547
+ <!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
6516
6548
  <xsl:element name="link" namespace="{$namespace_full}">
6517
6549
  <xsl:copy-of select="@*"/>
6518
6550
  <xsl:apply-templates mode="update_xml_step1"/>
6519
6551
  </xsl:element>
6520
- </xsl:template>
6552
+ </xsl:template> -->
6521
6553
 
6522
6554
  <xsl:template match="mn:origin" mode="update_xml_step1"/>
6523
6555
 
6524
- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
6556
+ <!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
6525
6557
  <xsl:element name="origin" namespace="{$namespace_full}">
6526
6558
  <xsl:copy-of select="@*"/>
6527
6559
  <xsl:apply-templates mode="update_xml_step1"/>
6528
6560
  </xsl:element>
6529
- </xsl:template>
6561
+ </xsl:template> -->
6530
6562
 
6531
6563
  <xsl:template match="mn:erefstack" mode="update_xml_step1"/>
6532
6564
 
6533
6565
  <xsl:template match="mn:svgmap" mode="update_xml_step1"/>
6534
6566
 
6535
- <xsl:template match="mn:review-container" mode="update_xml_step1"/>
6567
+ <xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
6536
6568
 
6537
- <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
6538
- <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
6539
- <xsl:value-of select="."/>
6540
- </xsl:element>
6541
- </xsl:template>
6569
+ <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
6570
+ <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
6571
+ <xsl:value-of select="."/>
6572
+ </xsl:element>
6573
+ </xsl:template>
6574
+
6575
+ <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
6542
6576
 
6543
6577
  <!-- END: update new Presentation XML -->
6544
6578
 
@@ -6731,7 +6765,7 @@
6731
6765
  </xsl:variable>
6732
6766
 
6733
6767
  <!-- add 'fn' after eref and origin, to reference bibitem with note = 'Withdrawn.' or 'Cancelled and replaced...' -->
6734
- <xsl:template match="mn:eref | mn:origin" mode="update_xml_step2">
6768
+ <xsl:template match="mn:fmt-eref | mn:fmt-origin" mode="update_xml_step2">
6735
6769
  <xsl:copy-of select="."/>
6736
6770
 
6737
6771
  <xsl:variable name="bibitemid" select="@bibitemid"/>
@@ -6800,7 +6834,7 @@
6800
6834
  </xsl:call-template>
6801
6835
  </xsl:template>
6802
6836
 
6803
- <xsl:template match="mn:stem | mn:image" mode="update_xml_step2">
6837
+ <xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_step2">
6804
6838
  <xsl:copy-of select="."/>
6805
6839
  </xsl:template>
6806
6840
 
@@ -6837,7 +6871,7 @@
6837
6871
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
6838
6872
  <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>
6839
6873
 
6840
- <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">
6874
+ <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">
6841
6875
 
6842
6876
  <xsl:variable name="parent" select="local-name(..)"/>
6843
6877
 
@@ -6956,7 +6990,7 @@
6956
6990
  </xsl:if>
6957
6991
  </xsl:template>
6958
6992
 
6959
- <xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
6993
+ <xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
6960
6994
  <xsl:copy-of select="."/>
6961
6995
  </xsl:template>
6962
6996
 
@@ -7283,7 +7317,7 @@
7283
7317
  </fo:block>
7284
7318
  </xsl:template> <!-- copyright-statement -->
7285
7319
 
7286
- <xsl:template match="mn:copyright-statement//mn:title">
7320
+ <xsl:template match="mn:copyright-statement//mn:fmt-title">
7287
7321
  <!-- process in the template 'title' -->
7288
7322
  <xsl:call-template name="title"/>
7289
7323
  </xsl:template> <!-- copyright-statement//title -->
@@ -7299,7 +7333,7 @@
7299
7333
  </fo:block>
7300
7334
  </xsl:template> <!-- license-statement -->
7301
7335
 
7302
- <xsl:template match="mn:license-statement//mn:title">
7336
+ <xsl:template match="mn:license-statement//mn:fmt-title">
7303
7337
  <!-- process in the template 'title' -->
7304
7338
  <xsl:call-template name="title"/>
7305
7339
  </xsl:template> <!-- license-statement/title -->
@@ -7316,7 +7350,7 @@
7316
7350
  </fo:block>
7317
7351
  </xsl:template> <!-- legal-statement -->
7318
7352
 
7319
- <xsl:template match="mn:legal-statement//mn:title">
7353
+ <xsl:template match="mn:legal-statement//mn:fmt-title">
7320
7354
  <!-- process in the template 'title' -->
7321
7355
  <xsl:call-template name="title"/>
7322
7356
 
@@ -7336,7 +7370,7 @@
7336
7370
  </fo:block>
7337
7371
  </xsl:template> <!-- feedback-statement -->
7338
7372
 
7339
- <xsl:template match="mn:feedback-statement//mn:title">
7373
+ <xsl:template match="mn:feedback-statement//mn:fmt-title">
7340
7374
  <!-- process in the template 'title' -->
7341
7375
  <xsl:call-template name="title"/>
7342
7376
  </xsl:template>
@@ -7359,7 +7393,7 @@
7359
7393
  <xsl:template name="refine_link-style">
7360
7394
  </xsl:template> <!-- refine_link-style -->
7361
7395
 
7362
- <xsl:template match="mn:link" name="link">
7396
+ <xsl:template match="mn:fmt-link" name="link">
7363
7397
  <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
7364
7398
  <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
7365
7399
  <xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
@@ -7577,7 +7611,7 @@
7577
7611
  <xsl:value-of select="."/>
7578
7612
  </xsl:attribute>
7579
7613
  </xsl:for-each>
7580
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7614
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7581
7615
  </xsl:when>
7582
7616
 
7583
7617
  <xsl:otherwise>
@@ -7619,11 +7653,11 @@
7619
7653
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
7620
7654
  </xsl:if>
7621
7655
 
7622
- <xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
7656
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
7623
7657
  </fo:block>
7624
7658
 
7625
7659
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
7626
- <xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name AFTER content -->
7660
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
7627
7661
 
7628
7662
  </fo:block-container>
7629
7663
  </fo:block-container>
@@ -7924,7 +7958,7 @@
7924
7958
 
7925
7959
  <!-- end mode="syntax_highlight" -->
7926
7960
 
7927
- <xsl:template match="mn:sourcecode/mn:name">
7961
+ <xsl:template match="mn:sourcecode/mn:fmt-name">
7928
7962
  <xsl:if test="normalize-space() != ''">
7929
7963
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
7930
7964
  <xsl:apply-templates/>
@@ -7942,7 +7976,7 @@
7942
7976
  </xsl:choose>
7943
7977
  </xsl:template>
7944
7978
 
7945
- <xsl:template match="mn:annotation">
7979
+ <xsl:template match="mn:callout-annotation">
7946
7980
  <xsl:variable name="annotation-id" select="@id"/>
7947
7981
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
7948
7982
  <fo:block id="{$annotation-id}" white-space="nowrap">
@@ -7954,7 +7988,7 @@
7954
7988
  </fo:block>
7955
7989
  </xsl:template>
7956
7990
 
7957
- <xsl:template match="mn:annotation/mn:p">
7991
+ <xsl:template match="mn:callout-annotation/mn:p">
7958
7992
  <xsl:param name="callout"/>
7959
7993
  <fo:inline id="{@id}">
7960
7994
  <xsl:call-template name="setNamedDestination"/>
@@ -8107,7 +8141,7 @@
8107
8141
  <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
8108
8142
  <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
8109
8143
  <xsl:choose>
8110
- <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>
8144
+ <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>
8111
8145
  <xsl:otherwise>
8112
8146
  <xsl:variable name="tag">
8113
8147
  <xsl:call-template name="insertTag">
@@ -8516,12 +8550,12 @@
8516
8550
  <xsl:template match="mn:permission">
8517
8551
  <xsl:call-template name="setNamedDestination"/>
8518
8552
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
8519
- <xsl:apply-templates select="mn:name"/>
8520
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
8553
+ <xsl:apply-templates select="mn:fmt-name"/>
8554
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8521
8555
  </fo:block>
8522
8556
  </xsl:template>
8523
8557
 
8524
- <xsl:template match="mn:permission/mn:name">
8558
+ <xsl:template match="mn:permission/mn:fmt-name">
8525
8559
  <xsl:if test="normalize-space() != ''">
8526
8560
  <fo:block xsl:use-attribute-sets="permission-name-style">
8527
8561
  <xsl:apply-templates/>
@@ -8543,15 +8577,15 @@
8543
8577
  <xsl:template match="mn:requirement">
8544
8578
  <xsl:call-template name="setNamedDestination"/>
8545
8579
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
8546
- <xsl:apply-templates select="mn:name"/>
8580
+ <xsl:apply-templates select="mn:fmt-name"/>
8547
8581
  <xsl:apply-templates select="mn:label"/>
8548
8582
  <xsl:apply-templates select="@obligation"/>
8549
8583
  <xsl:apply-templates select="mn:subject"/>
8550
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:label) and not(self::mn:subject)]"/>
8584
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
8551
8585
  </fo:block>
8552
8586
  </xsl:template>
8553
8587
 
8554
- <xsl:template match="mn:requirement/mn:name">
8588
+ <xsl:template match="mn:requirement/mn:fmt-name">
8555
8589
  <xsl:if test="normalize-space() != ''">
8556
8590
 
8557
8591
  <fo:block xsl:use-attribute-sets="requirement-name-style">
@@ -8587,12 +8621,12 @@
8587
8621
  <xsl:template match="mn:recommendation">
8588
8622
  <xsl:call-template name="setNamedDestination"/>
8589
8623
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
8590
- <xsl:apply-templates select="mn:name"/>
8591
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
8624
+ <xsl:apply-templates select="mn:fmt-name"/>
8625
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8592
8626
  </fo:block>
8593
8627
  </xsl:template>
8594
8628
 
8595
- <xsl:template match="mn:recommendation/mn:name">
8629
+ <xsl:template match="mn:recommendation/mn:fmt-name">
8596
8630
  <xsl:if test="normalize-space() != ''">
8597
8631
 
8598
8632
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
@@ -8847,11 +8881,11 @@
8847
8881
 
8848
8882
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
8849
8883
  </xsl:if>
8850
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
8884
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8851
8885
  </fo:block>
8852
8886
  </xsl:template>
8853
8887
 
8854
- <xsl:template match="mn:term/mn:name">
8888
+ <xsl:template match="mn:term/mn:fmt-name">
8855
8889
  <xsl:if test="normalize-space() != ''">
8856
8890
  <!-- <xsl:variable name="level">
8857
8891
  <xsl:call-template name="getLevelTermName"/>
@@ -8870,7 +8904,7 @@
8870
8904
  <!-- origin -->
8871
8905
  <!-- modification -->
8872
8906
  <!-- ====== -->
8873
- <xsl:template match="mn:termsource" name="termsource">
8907
+ <xsl:template match="mn:fmt-termsource" name="termsource">
8874
8908
  <fo:block xsl:use-attribute-sets="termsource-style">
8875
8909
 
8876
8910
  <xsl:call-template name="refine_termsource-style"/>
@@ -8909,24 +8943,24 @@
8909
8943
  </fo:block>
8910
8944
  </xsl:template>
8911
8945
 
8912
- <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">
8946
+ <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">
8913
8947
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
8914
8948
  </xsl:template>
8915
8949
 
8916
- <xsl:template match="mn:termsource/text()">
8950
+ <xsl:template match="mn:fmt-termsource/text()">
8917
8951
  <xsl:if test="normalize-space() != ''">
8918
8952
  <xsl:value-of select="."/>
8919
8953
  </xsl:if>
8920
8954
  </xsl:template>
8921
8955
 
8922
8956
  <!-- text SOURCE: -->
8923
- <xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
8957
+ <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
8924
8958
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
8925
8959
  <xsl:value-of select="."/>
8926
8960
  </fo:inline>
8927
8961
  </xsl:template>
8928
8962
 
8929
- <xsl:template match="mn:origin">
8963
+ <xsl:template match="mn:fmt-origin">
8930
8964
  <xsl:call-template name="insert_basic_link">
8931
8965
  <xsl:with-param name="element">
8932
8966
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -8972,7 +9006,7 @@
8972
9006
  <!-- ====== -->
8973
9007
 
8974
9008
  <!-- Preferred, admitted, deprecated -->
8975
- <xsl:template match="mn:preferred">
9009
+ <xsl:template match="mn:fmt-preferred">
8976
9010
  <xsl:variable name="level">
8977
9011
  <xsl:call-template name="getLevel"/>
8978
9012
  </xsl:variable>
@@ -8987,18 +9021,18 @@
8987
9021
  <xsl:attribute name="margin-left">-6mm</xsl:attribute>
8988
9022
  </xsl:if>
8989
9023
 
8990
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
9024
+ <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
8991
9025
 
8992
9026
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
8993
9027
  <xsl:if test="not($vertical_layout = 'true')">
8994
9028
  <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
8995
9029
  </xsl:if>
8996
9030
 
8997
- <xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
9031
+ <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
8998
9032
  <xsl:call-template name="setIDforNamedDestination"/>
8999
9033
  </xsl:for-each>
9000
9034
 
9001
- <xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
9035
+ <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
9002
9036
  </fo:block>
9003
9037
  </xsl:if>
9004
9038
 
@@ -9030,13 +9064,13 @@
9030
9064
  <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
9031
9065
  <xsl:template match="mn:domain"/>
9032
9066
 
9033
- <xsl:template match="mn:admitted">
9067
+ <xsl:template match="mn:fmt-admitted">
9034
9068
  <fo:block xsl:use-attribute-sets="admitted-style">
9035
9069
  <xsl:apply-templates/>
9036
9070
  </fo:block>
9037
9071
  </xsl:template>
9038
9072
 
9039
- <xsl:template match="mn:deprecates">
9073
+ <xsl:template match="mn:fmt-deprecates">
9040
9074
  <fo:block xsl:use-attribute-sets="deprecates-style">
9041
9075
  <xsl:apply-templates/>
9042
9076
  </fo:block>
@@ -9050,7 +9084,7 @@
9050
9084
 
9051
9085
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
9052
9086
  <!-- in metanorma xml preferred terms delimited by semicolons -->
9053
- <xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
9087
+ <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
9054
9088
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
9055
9089
  </xsl:template>
9056
9090
  <!-- End Preferred, admitted, deprecated -->
@@ -9069,16 +9103,16 @@
9069
9103
  <!-- ========== -->
9070
9104
  <!-- definition -->
9071
9105
  <!-- ========== -->
9072
- <xsl:template match="mn:definition">
9106
+ <xsl:template match="mn:fmt-definition">
9073
9107
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
9074
9108
  <xsl:apply-templates/>
9075
9109
  </fo:block>
9076
9110
  </xsl:template>
9077
9111
 
9078
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]">
9112
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
9079
9113
  <xsl:apply-templates/>
9080
9114
  </xsl:template>
9081
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
9115
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
9082
9116
  <fo:inline> <xsl:apply-templates/></fo:inline>
9083
9117
  <fo:block/>
9084
9118
  </xsl:template>
@@ -9151,12 +9185,12 @@
9151
9185
  <xsl:call-template name="refine_termexample-style"/>
9152
9186
  <xsl:call-template name="setBlockSpanAll"/>
9153
9187
 
9154
- <xsl:apply-templates select="mn:name"/>
9155
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
9188
+ <xsl:apply-templates select="mn:fmt-name"/>
9189
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9156
9190
  </fo:block>
9157
9191
  </xsl:template>
9158
9192
 
9159
- <xsl:template match="mn:termexample/mn:name">
9193
+ <xsl:template match="mn:termexample/mn:fmt-name">
9160
9194
  <xsl:if test="normalize-space() != ''">
9161
9195
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
9162
9196
  <xsl:call-template name="refine_termexample-name-style"/>
@@ -9232,14 +9266,14 @@
9232
9266
  <xsl:attribute name="start-indent">0mm</xsl:attribute>
9233
9267
  </xsl:if>
9234
9268
  <fo:block>
9235
- <xsl:apply-templates select="mn:name">
9269
+ <xsl:apply-templates select="mn:fmt-name">
9236
9270
  <xsl:with-param name="fo_element">block</xsl:with-param>
9237
9271
  </xsl:apply-templates>
9238
9272
  </fo:block>
9239
9273
  </fo:list-item-label>
9240
9274
  <fo:list-item-body start-indent="body-start()">
9241
9275
  <fo:block>
9242
- <xsl:apply-templates select="node()[not(self::mn:name)]">
9276
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
9243
9277
  <xsl:with-param name="fo_element" select="'list'"/>
9244
9278
  </xsl:apply-templates>
9245
9279
  </fo:block>
@@ -9252,7 +9286,7 @@
9252
9286
  </xsl:template>
9253
9287
 
9254
9288
  <!-- example/name -->
9255
- <xsl:template match="mn:example/mn:name">
9289
+ <xsl:template match="mn:example/mn:fmt-name">
9256
9290
  <xsl:param name="fo_element">block</xsl:param>
9257
9291
 
9258
9292
  <xsl:choose>
@@ -9278,7 +9312,7 @@
9278
9312
  </xsl:template>
9279
9313
 
9280
9314
  <!-- table/example/name, table/tfoot//example/name -->
9281
- <xsl:template match="mn:table/mn:example/mn:name | mn:table/mn:tfoot//mn:example/mn:name">
9315
+ <xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
9282
9316
  <fo:inline xsl:use-attribute-sets="example-name-style">
9283
9317
  <xsl:if test="not($vertical_layout = 'true')">
9284
9318
  <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
@@ -9583,7 +9617,7 @@
9583
9617
 
9584
9618
  <!-- Display table's name before table as standalone block -->
9585
9619
  <!-- $namespace = 'iso' or -->
9586
- <xsl:apply-templates select="mn:name"/> <!-- table's title rendered before table -->
9620
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
9587
9621
  <xsl:call-template name="table_name_fn_display"/>
9588
9622
 
9589
9623
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
@@ -9625,7 +9659,7 @@
9625
9659
 
9626
9660
  <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
9627
9661
 
9628
- <xsl:for-each select="mn:name">
9662
+ <xsl:for-each select="mn:fmt-name">
9629
9663
  <xsl:call-template name="setIDforNamedDestination"/>
9630
9664
  </xsl:for-each>
9631
9665
 
@@ -9655,6 +9689,10 @@
9655
9689
  <xsl:with-param name="margin-side" select="$margin-side"/>
9656
9690
  </xsl:call-template>
9657
9691
 
9692
+ <xsl:call-template name="setTableStyles">
9693
+ <xsl:with-param name="scope">table</xsl:with-param>
9694
+ </xsl:call-template>
9695
+
9658
9696
  </xsl:element>
9659
9697
  </xsl:variable>
9660
9698
 
@@ -9675,7 +9713,7 @@
9675
9713
  </xsl:attribute>
9676
9714
  </xsl:for-each>
9677
9715
 
9678
- <xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[local-name(..) != 'name'] or ./mn:source"/>
9716
+ <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"/>
9679
9717
  <xsl:if test="$isNoteOrFnExist = 'true'">
9680
9718
  <!-- <xsl:choose>
9681
9719
  <xsl:when test="$namespace = 'plateau'"></xsl:when>
@@ -9731,7 +9769,7 @@
9731
9769
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
9732
9770
  </xsl:when>
9733
9771
  <xsl:otherwise>
9734
- <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 -->
9772
+ <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 -->
9735
9773
  </xsl:otherwise>
9736
9774
  </xsl:choose>
9737
9775
 
@@ -9828,7 +9866,7 @@
9828
9866
  </xsl:template>
9829
9867
 
9830
9868
  <!-- table/name-->
9831
- <xsl:template match="*[local-name()='table']/mn:name">
9869
+ <xsl:template match="*[local-name()='table']/mn:fmt-name">
9832
9870
  <xsl:param name="continued"/>
9833
9871
  <xsl:param name="cols-count"/>
9834
9872
  <xsl:if test="normalize-space() != ''">
@@ -9893,7 +9931,7 @@
9893
9931
  </xsl:template>
9894
9932
 
9895
9933
  <!-- SOURCE: ... -->
9896
- <xsl:template match="*[local-name()='table']/mn:source" priority="2">
9934
+ <xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
9897
9935
  <xsl:call-template name="termsource"/>
9898
9936
  </xsl:template>
9899
9937
 
@@ -10058,11 +10096,11 @@
10058
10096
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
10059
10097
  </xsl:template>
10060
10098
 
10061
- <xsl:template match="mn:termsource" mode="td_text">
10062
- <xsl:value-of select="*[local-name()='origin']/@citeas"/>
10099
+ <xsl:template match="mn:fmt-termsource" mode="td_text">
10100
+ <xsl:value-of select="mn:fmt-origin/@citeas"/>
10063
10101
  </xsl:template>
10064
10102
 
10065
- <xsl:template match="mn:link" mode="td_text">
10103
+ <xsl:template match="mn:fmt-link" mode="td_text">
10066
10104
  <xsl:value-of select="@target"/>
10067
10105
  </xsl:template>
10068
10106
 
@@ -10264,12 +10302,12 @@
10264
10302
 
10265
10303
  <xsl:call-template name="refine_table-header-title-style"/>
10266
10304
 
10267
- <xsl:apply-templates select="ancestor::mn:table/mn:name">
10305
+ <xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
10268
10306
  <xsl:with-param name="continued">true</xsl:with-param>
10269
10307
  <xsl:with-param name="cols-count" select="$cols-count"/>
10270
10308
  </xsl:apply-templates>
10271
10309
 
10272
- <xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
10310
+ <xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
10273
10311
  <fo:block role="SKIP"/>
10274
10312
  </xsl:if>
10275
10313
 
@@ -10304,7 +10342,7 @@
10304
10342
  <xsl:param name="colwidths"/>
10305
10343
  <xsl:param name="colgroup"/>
10306
10344
 
10307
- <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"/>
10345
+ <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"/>
10308
10346
 
10309
10347
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
10310
10348
  </xsl:variable>
@@ -10345,6 +10383,12 @@
10345
10383
  </xsl:choose>
10346
10384
  </xsl:for-each>
10347
10385
 
10386
+ <xsl:for-each select="ancestor::mn:table[1]">
10387
+ <xsl:call-template name="setTableStyles">
10388
+ <xsl:with-param name="scope">table</xsl:with-param>
10389
+ </xsl:call-template>
10390
+ </xsl:for-each>
10391
+
10348
10392
  <xsl:choose>
10349
10393
  <xsl:when test="xalan:nodeset($colgroup)//mn:col">
10350
10394
  <xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
@@ -10361,14 +10405,26 @@
10361
10405
 
10362
10406
  <fo:table-body role="SKIP">
10363
10407
  <fo:table-row role="SKIP">
10408
+ <xsl:for-each select="ancestor::mn:table[1]">
10409
+ <xsl:call-template name="setTableStyles">
10410
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
10411
+ </xsl:call-template>
10412
+ </xsl:for-each>
10413
+
10364
10414
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
10365
10415
 
10366
10416
  <xsl:call-template name="refine_table-footer-cell-style"/>
10367
10417
 
10418
+ <xsl:for-each select="ancestor::mn:table[1]">
10419
+ <xsl:call-template name="setTableStyles">
10420
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
10421
+ </xsl:call-template>
10422
+ </xsl:for-each>
10423
+
10368
10424
  <xsl:call-template name="setBordersTableArray"/>
10369
10425
 
10370
10426
  <!-- fn will be processed inside 'note' processing -->
10371
- <xsl:apply-templates select="../*[self::mn:p or self::mn:dl or (self::mn:note and not(@type = 'units')) or self::mn:example or self::mn:source]"/>
10427
+ <xsl:apply-templates select="../*[self::mn:p or self::mn:dl or (self::mn:note and not(@type = 'units')) or self::mn:example or self::mn:fmt-source]"/>
10372
10428
 
10373
10429
  <xsl:variable name="isDisplayRowSeparator">
10374
10430
  </xsl:variable>
@@ -10557,7 +10613,12 @@
10557
10613
 
10558
10614
  <xsl:template name="setTableRowAttributes">
10559
10615
 
10560
- <xsl:call-template name="setColors"/>
10616
+ <xsl:for-each select="ancestor::mn:table[1]">
10617
+ <xsl:call-template name="setTableStyles">
10618
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
10619
+ </xsl:call-template>
10620
+ </xsl:for-each>
10621
+ <xsl:call-template name="setTableStyles"/>
10561
10622
 
10562
10623
  </xsl:template> <!-- setTableRowAttributes -->
10563
10624
  <!-- ===================== -->
@@ -10610,7 +10671,13 @@
10610
10671
  </xsl:attribute>
10611
10672
  </xsl:if>
10612
10673
  <xsl:call-template name="display-align"/>
10613
- <xsl:call-template name="setColors"/>
10674
+
10675
+ <xsl:for-each select="ancestor::mn:table[1]">
10676
+ <xsl:call-template name="setTableStyles">
10677
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
10678
+ </xsl:call-template>
10679
+ </xsl:for-each>
10680
+ <xsl:call-template name="setTableStyles"/>
10614
10681
  </xsl:template>
10615
10682
 
10616
10683
  <xsl:template name="display-align">
@@ -10626,7 +10693,8 @@
10626
10693
  </xsl:if>
10627
10694
  </xsl:template>
10628
10695
 
10629
- <xsl:template name="setColors">
10696
+ <xsl:template name="setTableStyles">
10697
+ <xsl:param name="scope">cell</xsl:param>
10630
10698
  <xsl:variable name="styles__">
10631
10699
  <xsl:call-template name="split">
10632
10700
  <xsl:with-param name="pText" select="concat(@style,';')"/>
@@ -10635,19 +10703,35 @@
10635
10703
  </xsl:variable>
10636
10704
  <xsl:variable name="quot">"</xsl:variable>
10637
10705
  <xsl:variable name="styles_">
10706
+ <!-- PDF: Borderless tables https://github.com/metanorma/metanorma-jis/issues/344 -->
10707
+ <xsl:if test="@plain = 'true' or ancestor::mn:table/@plain = 'true'">
10708
+ <style name="border-top">none</style>
10709
+ <style name="border-right">none</style>
10710
+ <style name="border-left">none</style>
10711
+ <style name="border-bottom">none</style>
10712
+ <style name="color">inherit</style>
10713
+ <style name="background-color">transparent</style>
10714
+ </xsl:if>
10715
+
10638
10716
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
10639
10717
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
10640
10718
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
10641
- <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'">
10719
+ <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'">
10642
10720
  <style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
10643
10721
  </xsl:if>
10722
+ <xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
10723
+ <style name="{$key}-top"><xsl:value-of select="$value"/></style>
10724
+ <style name="{$key}-right"><xsl:value-of select="$value"/></style>
10725
+ <style name="{$key}-left"><xsl:value-of select="$value"/></style>
10726
+ <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
10727
+ </xsl:if>
10644
10728
  </xsl:for-each>
10645
10729
  </xsl:variable>
10646
10730
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
10647
10731
  <xsl:for-each select="$styles/style">
10648
10732
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
10649
10733
  </xsl:for-each>
10650
- </xsl:template> <!-- setColors -->
10734
+ </xsl:template> <!-- setTableStyles -->
10651
10735
 
10652
10736
  <!-- cell in table body, footer -->
10653
10737
  <xsl:template match="*[local-name()='td']" name="td">
@@ -10709,12 +10793,12 @@
10709
10793
  <fo:list-item>
10710
10794
  <fo:list-item-label start-indent="{$text_indent}mm" end-indent="label-end()">
10711
10795
  <fo:block>
10712
- <xsl:apply-templates select="mn:name"/>
10796
+ <xsl:apply-templates select="mn:fmt-name"/>
10713
10797
  </fo:block>
10714
10798
  </fo:list-item-label>
10715
10799
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="table-fn-body-style">
10716
10800
  <fo:block>
10717
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
10801
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
10718
10802
  </fo:block>
10719
10803
  </fo:list-item-body>
10720
10804
  </fo:list-item>
@@ -10889,7 +10973,7 @@
10889
10973
 
10890
10974
  <!-- footnotes for table's name rendering -->
10891
10975
  <xsl:template name="table_name_fn_display">
10892
- <xsl:for-each select="mn:name//mn:fn">
10976
+ <xsl:for-each select="mn:fmt-name//mn:fn">
10893
10977
  <xsl:variable name="reference" select="@reference"/>
10894
10978
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
10895
10979
  <fo:block margin-bottom="12pt">
@@ -11546,7 +11630,7 @@
11546
11630
  </xsl:if> -->
11547
11631
 
11548
11632
  <xsl:variable name="words">
11549
- <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
11633
+ <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
11550
11634
  <word>
11551
11635
  <xsl:copy-of select="."/>
11552
11636
  </word>
@@ -11605,7 +11689,7 @@
11605
11689
  </xsl:copy>
11606
11690
  </xsl:template>
11607
11691
 
11608
- <xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
11692
+ <xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
11609
11693
 
11610
11694
  <xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
11611
11695
  <xsl:variable name="formatting_tags">
@@ -11640,7 +11724,7 @@
11640
11724
  </xsl:call-template>
11641
11725
  </xsl:template>
11642
11726
 
11643
- <xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
11727
+ <xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
11644
11728
  <xsl:variable name="link">
11645
11729
  <link_updated>
11646
11730
  <xsl:variable name="target_text">
@@ -11854,7 +11938,7 @@
11854
11938
 
11855
11939
  <xsl:call-template name="refine_multicomponent_block_style"/>
11856
11940
 
11857
- <xsl:apply-templates select="mn:name">
11941
+ <xsl:apply-templates select="mn:fmt-name">
11858
11942
  <xsl:with-param name="process">true</xsl:with-param>
11859
11943
  </xsl:apply-templates>
11860
11944
 
@@ -12043,7 +12127,7 @@
12043
12127
  </xsl:template> <!-- refine_multicomponent_block_style -->
12044
12128
 
12045
12129
  <!-- dl/name -->
12046
- <xsl:template match="mn:dl/mn:name">
12130
+ <xsl:template match="mn:dl/mn:fmt-name">
12047
12131
  <xsl:param name="process">false</xsl:param>
12048
12132
  <xsl:if test="$process = 'true'">
12049
12133
  <fo:block xsl:use-attribute-sets="dl-name-style">
@@ -12462,12 +12546,12 @@
12462
12546
  <xsl:template match="mn:appendix">
12463
12547
  <xsl:call-template name="setNamedDestination"/>
12464
12548
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
12465
- <xsl:apply-templates select="mn:title"/>
12549
+ <xsl:apply-templates select="mn:fmt-title"/>
12466
12550
  </fo:block>
12467
- <xsl:apply-templates select="node()[not(local-name()='title')]"/>
12551
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
12468
12552
  </xsl:template>
12469
12553
 
12470
- <xsl:template match="mn:appendix/mn:title" priority="2">
12554
+ <xsl:template match="mn:appendix/mn:fmt-title" priority="2">
12471
12555
  <xsl:variable name="level">
12472
12556
  <xsl:call-template name="getLevel"/>
12473
12557
  </xsl:variable>
@@ -12480,15 +12564,15 @@
12480
12564
  <xsl:template match="mn:appendix//mn:example" priority="2">
12481
12565
  <xsl:call-template name="setNamedDestination"/>
12482
12566
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
12483
- <xsl:apply-templates select="mn:name"/>
12567
+ <xsl:apply-templates select="mn:fmt-name"/>
12484
12568
  </fo:block>
12485
- <xsl:apply-templates select="node()[not(local-name()='name')]"/>
12569
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
12486
12570
  </xsl:template>
12487
12571
 
12488
12572
  <xsl:attribute-set name="xref-style">
12489
12573
  </xsl:attribute-set>
12490
12574
 
12491
- <xsl:template match="mn:xref">
12575
+ <xsl:template match="mn:fmt-xref">
12492
12576
  <xsl:call-template name="insert_basic_link">
12493
12577
  <xsl:with-param name="element">
12494
12578
  <xsl:variable name="alt_text">
@@ -12511,7 +12595,7 @@
12511
12595
  </xsl:template> <!-- xref -->
12512
12596
 
12513
12597
  <!-- command between two xref points to non-standard bibitem -->
12514
- <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="."/>
12598
+ <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="."/>
12515
12599
  </xsl:template>
12516
12600
 
12517
12601
  <xsl:attribute-set name="eref-style">
@@ -12542,7 +12626,7 @@
12542
12626
  <!-- ====== -->
12543
12627
  <!-- eref -->
12544
12628
  <!-- ====== -->
12545
- <xsl:template match="mn:eref" name="eref">
12629
+ <xsl:template match="mn:fmt-eref" name="eref">
12546
12630
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
12547
12631
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
12548
12632
  <xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
@@ -12671,7 +12755,10 @@
12671
12755
 
12672
12756
  <xsl:template match="mn:note" name="note">
12673
12757
  <xsl:call-template name="setNamedDestination"/>
12674
- <fo:block id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
12758
+ <fo:block xsl:use-attribute-sets="note-style" role="SKIP">
12759
+ <xsl:if test="not(parent::mn:references)">
12760
+ <xsl:copy-of select="@id"/>
12761
+ </xsl:if>
12675
12762
  <xsl:call-template name="setBlockSpanAll"/>
12676
12763
 
12677
12764
  <xsl:call-template name="refine_note-style"/>
@@ -12680,7 +12767,7 @@
12680
12767
  <xsl:attribute name="provisional-distance-between-starts">
12681
12768
  <xsl:choose>
12682
12769
  <!-- if last char is digit -->
12683
- <xsl:when test="translate(substring(mn:name, string-length(mn:name)),'0123456789','') = ''"><xsl:value-of select="16 + $text_indent"/>mm</xsl:when>
12770
+ <xsl:when test="translate(substring(mn:fmt-name, string-length(mn:fmt-name)),'0123456789','') = ''"><xsl:value-of select="16 + $text_indent"/>mm</xsl:when>
12684
12771
  <xsl:otherwise><xsl:value-of select="10 + $text_indent"/>mm</xsl:otherwise>
12685
12772
  </xsl:choose>
12686
12773
  </xsl:attribute>
@@ -12691,12 +12778,12 @@
12691
12778
  </xsl:if>
12692
12779
  <fo:block xsl:use-attribute-sets="note-name-style">
12693
12780
  <xsl:call-template name="refine_note-name-style"/>
12694
- <xsl:apply-templates select="mn:name"/>
12781
+ <xsl:apply-templates select="mn:fmt-name"/>
12695
12782
  </fo:block>
12696
12783
  </fo:list-item-label>
12697
12784
  <fo:list-item-body start-indent="body-start()">
12698
12785
  <fo:block>
12699
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
12786
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
12700
12787
  </fo:block>
12701
12788
  </fo:list-item-body>
12702
12789
  </fo:list-item>
@@ -12738,19 +12825,19 @@
12738
12825
 
12739
12826
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
12740
12827
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
12741
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
12828
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
12742
12829
  <xsl:call-template name="append_add-style"/>
12743
12830
  </xsl:if>
12744
12831
 
12745
- <xsl:apply-templates select="mn:name"/>
12832
+ <xsl:apply-templates select="mn:fmt-name"/>
12746
12833
 
12747
12834
  </fo:inline>
12748
12835
 
12749
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
12836
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
12750
12837
  </fo:block>
12751
12838
  </xsl:template>
12752
12839
 
12753
- <xsl:template match="mn:note/mn:name">
12840
+ <xsl:template match="mn:note/mn:fmt-name">
12754
12841
  <xsl:param name="sfx"/>
12755
12842
  <xsl:variable name="suffix">
12756
12843
  <xsl:choose>
@@ -12777,7 +12864,7 @@
12777
12864
  </xsl:if>
12778
12865
  </xsl:template>
12779
12866
 
12780
- <xsl:template match="mn:termnote/mn:name">
12867
+ <xsl:template match="mn:termnote/mn:fmt-name">
12781
12868
  <xsl:param name="sfx"/>
12782
12869
  <xsl:variable name="suffix">
12783
12870
  <xsl:choose>
@@ -12862,15 +12949,15 @@
12862
12949
 
12863
12950
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
12864
12951
  <fo:block role="BlockQuote">
12865
- <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 -->
12952
+ <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 -->
12866
12953
  </fo:block>
12867
12954
  </fo:block-container>
12868
12955
  </fo:block-container>
12869
- <xsl:if test="mn:author or mn:source or mn:attribution">
12956
+ <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
12870
12957
  <fo:block xsl:use-attribute-sets="quote-source-style">
12871
12958
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
12872
12959
  <xsl:apply-templates select="mn:author"/>
12873
- <xsl:apply-templates select="mn:source"/>
12960
+ <xsl:apply-templates select="mn:fmt-source"/>
12874
12961
  <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
12875
12962
  <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
12876
12963
  </fo:block>
@@ -12884,17 +12971,32 @@
12884
12971
  </fo:block-container>
12885
12972
  </xsl:template>
12886
12973
 
12887
- <xsl:template match="mn:source">
12974
+ <xsl:template match="mn:fmt-source">
12888
12975
  <xsl:if test="../mn:author">
12889
12976
  <xsl:text>, </xsl:text>
12890
12977
  </xsl:if>
12891
- <xsl:call-template name="insert_basic_link">
12892
- <xsl:with-param name="element">
12893
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
12894
- <xsl:apply-templates/>
12895
- </fo:basic-link>
12896
- </xsl:with-param>
12897
- </xsl:call-template>
12978
+ <xsl:choose>
12979
+ <xsl:when test="not(parent::quote)">
12980
+ <fo:block>
12981
+ <xsl:call-template name="insert_basic_link">
12982
+ <xsl:with-param name="element">
12983
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
12984
+ <xsl:apply-templates/>
12985
+ </fo:basic-link>
12986
+ </xsl:with-param>
12987
+ </xsl:call-template>
12988
+ </fo:block>
12989
+ </xsl:when>
12990
+ <xsl:otherwise>
12991
+ <xsl:call-template name="insert_basic_link">
12992
+ <xsl:with-param name="element">
12993
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
12994
+ <xsl:apply-templates/>
12995
+ </fo:basic-link>
12996
+ </xsl:with-param>
12997
+ </xsl:call-template>
12998
+ </xsl:otherwise>
12999
+ </xsl:choose>
12898
13000
  </xsl:template>
12899
13001
 
12900
13002
  <xsl:template match="mn:author">
@@ -13041,7 +13143,7 @@
13041
13143
  <ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
13042
13144
  <xsl:choose>
13043
13145
  <!-- skip figure/name/fn -->
13044
- <xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
13146
+ <xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
13045
13147
  <xsl:otherwise>
13046
13148
  <xsl:element name="figure" namespace="{$namespace_full}">
13047
13149
  <xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
@@ -13242,17 +13344,17 @@
13242
13344
 
13243
13345
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
13244
13346
 
13245
- <xsl:for-each select="mn:name"> <!-- set context -->
13347
+ <xsl:for-each select="mn:fmt-name"> <!-- set context -->
13246
13348
  <xsl:call-template name="setIDforNamedDestination"/>
13247
13349
  </xsl:for-each>
13248
13350
 
13249
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
13351
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
13250
13352
  </fo:block>
13251
13353
 
13252
13354
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
13253
13355
  <xsl:call-template name="showFigureKey"/>
13254
13356
  </xsl:if>
13255
- <xsl:apply-templates select="mn:name"/> <!-- show figure's name AFTER image -->
13357
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
13256
13358
 
13257
13359
  </fo:block-container>
13258
13360
  <xsl:if test="$vertical_layout = 'true'">
@@ -13262,7 +13364,7 @@
13262
13364
  </xsl:apply-templates>
13263
13365
  <xsl:call-template name="showFigureKey"/>
13264
13366
  </fo:block>
13265
- <xsl:apply-templates select="mn:name">
13367
+ <xsl:apply-templates select="mn:fmt-name">
13266
13368
  <xsl:with-param name="process">true</xsl:with-param>
13267
13369
  </xsl:apply-templates>
13268
13370
  </xsl:if>
@@ -13289,9 +13391,9 @@
13289
13391
  <xsl:template match="mn:figure[@class = 'pseudocode']">
13290
13392
  <xsl:call-template name="setNamedDestination"/>
13291
13393
  <fo:block id="{@id}">
13292
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
13394
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
13293
13395
  </fo:block>
13294
- <xsl:apply-templates select="mn:name"/>
13396
+ <xsl:apply-templates select="mn:fmt-name"/>
13295
13397
  </xsl:template>
13296
13398
 
13297
13399
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
@@ -13302,7 +13404,7 @@
13302
13404
 
13303
13405
  <!-- SOURCE: ... -->
13304
13406
  <!-- figure/source -->
13305
- <xsl:template match="mn:figure/mn:source" priority="2">
13407
+ <xsl:template match="mn:figure/mn:fmt-source" priority="2">
13306
13408
  <xsl:call-template name="termsource"/>
13307
13409
  </xsl:template>
13308
13410
 
@@ -13312,7 +13414,7 @@
13312
13414
  <xsl:variable name="isAdded" select="../@added"/>
13313
13415
  <xsl:variable name="isDeleted" select="../@deleted"/>
13314
13416
  <xsl:choose>
13315
- <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) -->
13417
+ <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) -->
13316
13418
  <fo:inline padding-left="1mm" padding-right="1mm">
13317
13419
  <xsl:if test="not(parent::mn:figure) or parent::mn:p">
13318
13420
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -13333,13 +13435,26 @@
13333
13435
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
13334
13436
 
13335
13437
  <xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
13336
- <xsl:attribute name="width">100%</xsl:attribute>
13438
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
13439
+ <xsl:choose>
13440
+ <xsl:when test="@width and not(@height)">
13441
+ <xsl:attribute name="width">100%</xsl:attribute>
13442
+ <xsl:attribute name="content-height">100%</xsl:attribute>
13443
+ </xsl:when>
13444
+ <xsl:when test="@height and not(@width)">
13445
+ <xsl:attribute name="height">100%</xsl:attribute>
13446
+ <xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
13447
+ </xsl:when>
13448
+ <xsl:when test="not(@width) and not(@height)">
13449
+ <xsl:attribute name="content-height">100%</xsl:attribute>
13450
+ </xsl:when>
13451
+ </xsl:choose>
13452
+
13337
13453
  <xsl:if test="normalize-space($logo_width) != ''">
13338
13454
  <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
13339
13455
  </xsl:if>
13340
- <xsl:attribute name="content-height">100%</xsl:attribute>
13341
13456
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
13342
- <xsl:attribute name="scaling">uniform</xsl:attribute>
13457
+ <xsl:attribute name="vertical-align">top</xsl:attribute>
13343
13458
  </xsl:if>
13344
13459
 
13345
13460
  <xsl:variable name="width">
@@ -13636,7 +13751,7 @@
13636
13751
  <xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
13637
13752
  <xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
13638
13753
 
13639
- <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
13754
+ <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
13640
13755
  <xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
13641
13756
  <xsl:param name="name"/>
13642
13757
 
@@ -13646,8 +13761,8 @@
13646
13761
 
13647
13762
  <xsl:variable name="alt-text">
13648
13763
  <xsl:choose>
13649
- <xsl:when test="normalize-space(../mn:name) != ''">
13650
- <xsl:value-of select="../mn:name"/>
13764
+ <xsl:when test="normalize-space(../mn:fmt-name) != ''">
13765
+ <xsl:value-of select="../mn:fmt-name"/>
13651
13766
  </xsl:when>
13652
13767
  <xsl:when test="normalize-space($name) != ''">
13653
13768
  <xsl:value-of select="$name"/>
@@ -13656,7 +13771,7 @@
13656
13771
  </xsl:choose>
13657
13772
  </xsl:variable>
13658
13773
 
13659
- <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
13774
+ <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
13660
13775
 
13661
13776
  <xsl:choose>
13662
13777
  <xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
@@ -13705,9 +13820,9 @@
13705
13820
  <fo:table-cell column-number="2">
13706
13821
  <fo:block>
13707
13822
  <fo:block-container width="{$width_scale}px" height="{$height_scale}px">
13708
- <xsl:if test="../mn:name/mn:bookmark">
13823
+ <xsl:if test="../mn:fmt-name/mn:bookmark">
13709
13824
  <fo:block line-height="0" font-size="0">
13710
- <xsl:for-each select="../mn:name/mn:bookmark">
13825
+ <xsl:for-each select="../mn:fmt-name/mn:bookmark">
13711
13826
  <xsl:call-template name="bookmark"/>
13712
13827
  </xsl:for-each>
13713
13828
  </fo:block>
@@ -13947,7 +14062,7 @@
13947
14062
 
13948
14063
  <!-- image with svg and emf -->
13949
14064
  <xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
13950
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
14065
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
13951
14066
  <xsl:for-each select="*[local-name() = 'svg']">
13952
14067
  <xsl:call-template name="image_svg">
13953
14068
  <xsl:with-param name="name" select="$name"/>
@@ -13964,7 +14079,7 @@
13964
14079
 
13965
14080
  <xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
13966
14081
  <xsl:variable name="svg_content" select="document(@src)"/>
13967
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
14082
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
13968
14083
  <xsl:for-each select="xalan:nodeset($svg_content)/node()">
13969
14084
  <xsl:call-template name="image_svg">
13970
14085
  <xsl:with-param name="name" select="$name"/>
@@ -14087,7 +14202,7 @@
14087
14202
  <xsl:template match="mn:emf"/>
14088
14203
 
14089
14204
  <!-- figure/name -->
14090
- <xsl:template match="mn:figure/mn:name | mn:image/mn:name">
14205
+ <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
14091
14206
  <xsl:if test="normalize-space() != ''">
14092
14207
  <fo:block xsl:use-attribute-sets="figure-name-style">
14093
14208
 
@@ -14157,25 +14272,25 @@
14157
14272
  <fo:block-container margin-left="0mm" role="SKIP">
14158
14273
  <xsl:call-template name="setNamedDestination"/>
14159
14274
  <fo:block id="{@id}">
14160
- <xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
14275
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
14161
14276
  </fo:block>
14162
14277
  </fo:block-container>
14163
14278
  </fo:block-container>
14164
14279
  </xsl:template>
14165
14280
 
14166
- <xsl:template match="mn:formula/mn:dt/mn:stem">
14281
+ <xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
14167
14282
  <fo:inline>
14168
14283
  <xsl:apply-templates/>
14169
14284
  </fo:inline>
14170
14285
  </xsl:template>
14171
14286
 
14172
- <xsl:template match="mn:admitted/mn:stem">
14287
+ <xsl:template match="mn:fmt-admitted/mn:fmt-stem">
14173
14288
  <fo:inline>
14174
14289
  <xsl:apply-templates/>
14175
14290
  </fo:inline>
14176
14291
  </xsl:template>
14177
14292
 
14178
- <xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
14293
+ <xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
14179
14294
  <!-- https://github.com/metanorma/isodoc/issues/607
14180
14295
  <xsl:if test="normalize-space() != ''">
14181
14296
  <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
@@ -14184,7 +14299,7 @@
14184
14299
  </xsl:template>
14185
14300
 
14186
14301
  <!-- stem inside formula with name (with formula's number) -->
14187
- <xsl:template match="mn:formula[mn:name]/mn:stem">
14302
+ <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
14188
14303
  <fo:block xsl:use-attribute-sets="formula-style">
14189
14304
 
14190
14305
  <fo:table table-layout="fixed" width="100%">
@@ -14204,13 +14319,13 @@
14204
14319
 
14205
14320
  <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
14206
14321
 
14207
- <xsl:for-each select="../mn:name">
14322
+ <xsl:for-each select="../mn:fmt-name">
14208
14323
  <xsl:call-template name="setIDforNamedDestination"/>
14209
14324
  </xsl:for-each>
14210
14325
 
14211
14326
  <xsl:call-template name="refine_formula-stem-number-style"/>
14212
14327
 
14213
- <xsl:apply-templates select="../mn:name"/>
14328
+ <xsl:apply-templates select="../mn:fmt-name"/>
14214
14329
  </fo:block>
14215
14330
  </fo:table-cell>
14216
14331
  </fo:table-row>
@@ -14220,7 +14335,7 @@
14220
14335
  </xsl:template>
14221
14336
 
14222
14337
  <!-- stem inside formula without name (without formula's number) -->
14223
- <xsl:template match="mn:formula[not(mn:name)]/mn:stem">
14338
+ <xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
14224
14339
  <fo:block xsl:use-attribute-sets="formula-style">
14225
14340
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
14226
14341
  <xsl:apply-templates/>
@@ -14574,7 +14689,7 @@
14574
14689
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
14575
14690
  <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
14576
14691
  -->
14577
- <xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
14692
+ <xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
14578
14693
  <fo:inline xsl:use-attribute-sets="mathml-style">
14579
14694
 
14580
14695
  <xsl:call-template name="refine_mathml-style"/>
@@ -14865,7 +14980,7 @@
14865
14980
 
14866
14981
  <xsl:template match="mn:ul | mn:ol" mode="list" name="list">
14867
14982
 
14868
- <xsl:apply-templates select="mn:name">
14983
+ <xsl:apply-templates select="mn:fmt-name">
14869
14984
  <xsl:with-param name="process">true</xsl:with-param>
14870
14985
  </xsl:apply-templates>
14871
14986
 
@@ -14911,7 +15026,7 @@
14911
15026
 
14912
15027
  <xsl:call-template name="refine_list-style"/>
14913
15028
 
14914
- <xsl:if test="mn:name">
15029
+ <xsl:if test="mn:fmt-name">
14915
15030
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
14916
15031
  </xsl:if>
14917
15032
 
@@ -14929,7 +15044,7 @@
14929
15044
  </xsl:if>
14930
15045
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
14931
15046
 
14932
- <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
15047
+ <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
14933
15048
  <xsl:param name="process">false</xsl:param>
14934
15049
  <xsl:if test="$process = 'true'">
14935
15050
  <fo:block xsl:use-attribute-sets="list-name-style">
@@ -15072,7 +15187,7 @@
15072
15187
  -->
15073
15188
  <!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
15074
15189
  <!-- fn in text -->
15075
- <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))]" priority="2" name="fn">
15190
+ <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))]" priority="2" name="fn">
15076
15191
  <xsl:param name="footnote_body_from_table">false</xsl:param>
15077
15192
 
15078
15193
  <!-- list of unique footnotes -->
@@ -15264,7 +15379,7 @@
15264
15379
  <!-- commented:
15265
15380
  .//mn:bibitem[ancestor::mn:references]/mn:note |
15266
15381
  because 'fn' there is in biblio-tag -->
15267
- <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])]">
15382
+ <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])]">
15268
15383
  <!-- copy unique fn -->
15269
15384
  <fn gen_id="{generate-id(.)}">
15270
15385
  <xsl:copy-of select="@*"/>
@@ -15329,7 +15444,7 @@
15329
15444
  <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
15330
15445
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
15331
15446
  <fo:block>
15332
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
15447
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
15333
15448
  </fo:block>
15334
15449
  </fo:block-container>
15335
15450
  </fo:block-container>
@@ -15355,7 +15470,7 @@
15355
15470
  </xsl:otherwise>
15356
15471
  </xsl:choose> -->
15357
15472
  <xsl:variable name="name">
15358
- <xsl:apply-templates select="mn:name"/>
15473
+ <xsl:apply-templates select="mn:fmt-name"/>
15359
15474
  </xsl:variable>
15360
15475
  <xsl:copy-of select="$name"/>
15361
15476
  <xsl:if test="normalize-space($name) != ''">
@@ -15363,7 +15478,7 @@
15363
15478
  </xsl:if>
15364
15479
  </xsl:template>
15365
15480
 
15366
- <xsl:template match="mn:admonition/mn:name">
15481
+ <xsl:template match="mn:admonition/mn:fmt-name">
15367
15482
  <xsl:apply-templates/>
15368
15483
  </xsl:template>
15369
15484
 
@@ -15496,10 +15611,10 @@
15496
15611
  <xsl:call-template name="setNamedDestination"/>
15497
15612
  <fo:block id="{@id}"/>
15498
15613
 
15499
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
15614
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
15500
15615
 
15501
15616
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
15502
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
15617
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
15503
15618
  <!-- render footnotes after references -->
15504
15619
  <xsl:apply-templates select=".//mn:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
15505
15620
  <xsl:with-param name="ancestor">references</xsl:with-param>
@@ -15526,8 +15641,8 @@
15526
15641
  </xsl:template> <!-- bibitem -->
15527
15642
 
15528
15643
  <!-- Bibliography (non-normative references) -->
15529
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
15530
- <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
15644
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
15645
+ <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 --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
15531
15646
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
15532
15647
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
15533
15648
  <xsl:call-template name="setNamedDestination"/>
@@ -15579,7 +15694,7 @@
15579
15694
  </fo:list-item>
15580
15695
  </xsl:otherwise>
15581
15696
  </xsl:choose>
15582
- <xsl:apply-templates select="following-sibling::*[1][self::mn:bibitem]">
15697
+ <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
15583
15698
  <xsl:with-param name="skip">false</xsl:with-param>
15584
15699
  </xsl:apply-templates>
15585
15700
  </xsl:template>
@@ -15599,8 +15714,25 @@
15599
15714
  </fo:inline>
15600
15715
  <xsl:apply-templates select="mn:formattedref"/>
15601
15716
 
15717
+ <xsl:call-template name="processBibliographyNote"/>
15602
15718
  </xsl:template> <!-- processBibitem (bibitem) -->
15603
15719
 
15720
+ <xsl:template name="processBibliographyNote">
15721
+ <xsl:if test="self::mn:note">
15722
+ <xsl:variable name="note_node">
15723
+ <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
15724
+ <xsl:copy> <!-- skip @id -->
15725
+ <xsl:copy-of select="node()"/>
15726
+ </xsl:copy>
15727
+ </xsl:element>
15728
+ </xsl:variable>
15729
+ <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
15730
+ <xsl:call-template name="note"/>
15731
+ </xsl:for-each> -->
15732
+ <xsl:call-template name="note"/>
15733
+ </xsl:if>
15734
+ </xsl:template>
15735
+
15604
15736
  <xsl:template match="mn:title" mode="title">
15605
15737
  <fo:inline><xsl:apply-templates/></fo:inline>
15606
15738
  </xsl:template>
@@ -15826,7 +15958,8 @@
15826
15958
  </xsl:copy>
15827
15959
  </xsl:template>
15828
15960
 
15829
- <xsl:template match="mn:xref" mode="index_add_id">
15961
+ <xsl:template match="mn:xref" mode="index_add_id"/>
15962
+ <xsl:template match="mn:fmt-xref" mode="index_add_id">
15830
15963
  <xsl:param name="docid"/>
15831
15964
  <xsl:variable name="id">
15832
15965
  <xsl:call-template name="generateIndexXrefId">
@@ -15868,7 +16001,7 @@
15868
16001
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
15869
16002
  <xsl:copy>
15870
16003
  <xsl:apply-templates select="@*" mode="index_update"/>
15871
- <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
16004
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
15872
16005
  </xsl:copy>
15873
16006
  </xsl:template>
15874
16007
 
@@ -15889,11 +16022,11 @@
15889
16022
  <xsl:value-of select="."/>
15890
16023
  <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
15891
16024
  </xsl:when>
15892
- <xsl:when test="self::* and local-name(.) = 'xref'">
16025
+ <xsl:when test="self::* and local-name(.) = 'fmt-xref'">
15893
16026
  <xsl:variable name="id" select="@id"/>
15894
16027
 
15895
- <xsl:variable name="id_next" select="following-sibling::mn:xref[1]/@id"/>
15896
- <xsl:variable name="id_prev" select="preceding-sibling::mn:xref[1]/@id"/>
16028
+ <xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
16029
+ <xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
15897
16030
 
15898
16031
  <xsl:variable name="pages_">
15899
16032
  <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
@@ -15989,18 +16122,18 @@
15989
16122
  <xsl:variable name="item_number">
15990
16123
  <xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
15991
16124
  </xsl:variable>
15992
- <xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
16125
+ <xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
15993
16126
  <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
15994
16127
  </xsl:template>
15995
16128
 
15996
- <xsl:template match="mn:indexsect/mn:title" priority="4">
16129
+ <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
15997
16130
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
15998
16131
  <!-- Index -->
15999
16132
  <xsl:apply-templates/>
16000
16133
  </fo:block>
16001
16134
  </xsl:template>
16002
16135
 
16003
- <xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
16136
+ <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
16004
16137
  <!-- Letter A, B, C, ... -->
16005
16138
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
16006
16139
  <xsl:apply-templates/>
@@ -16041,12 +16174,12 @@
16041
16174
  <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"/>
16042
16175
  <bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
16043
16176
  <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"/> -->
16044
- <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]">
16177
+ <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]">
16045
16178
  <!-- skip here, see the template 'fmt-review-start' -->
16046
16179
  </xsl:when>
16047
16180
  <xsl:otherwise>
16048
16181
  <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
16049
- <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>
16182
+ <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>
16050
16183
  <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
16051
16184
  <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
16052
16185
  </xsl:otherwise>
@@ -16145,6 +16278,48 @@
16145
16278
  <!-- End Form's elements processing -->
16146
16279
  <!-- =================== -->
16147
16280
 
16281
+ <xsl:attribute-set name="toc-style">
16282
+ </xsl:attribute-set>
16283
+
16284
+ <xsl:template name="refine_toc-style">
16285
+ </xsl:template>
16286
+
16287
+ <xsl:attribute-set name="toc-title-style">
16288
+ </xsl:attribute-set>
16289
+
16290
+ <xsl:attribute-set name="toc-title-page-style">
16291
+ </xsl:attribute-set> <!-- toc-title-page-style -->
16292
+
16293
+ <xsl:attribute-set name="toc-item-block-style">
16294
+ </xsl:attribute-set>
16295
+
16296
+ <xsl:template name="refine_toc-item-block-style">
16297
+ </xsl:template>
16298
+
16299
+ <xsl:attribute-set name="toc-item-style">
16300
+ <xsl:attribute name="role">TOCI</xsl:attribute>
16301
+ </xsl:attribute-set> <!-- END: toc-item-style -->
16302
+
16303
+ <xsl:template name="refine_toc-item-style">
16304
+ </xsl:template> <!-- END: refine_toc-item-style -->
16305
+
16306
+ <xsl:attribute-set name="toc-leader-style">
16307
+ </xsl:attribute-set> <!-- END: toc-leader-style -->
16308
+
16309
+ <xsl:attribute-set name="toc-pagenumber-style">
16310
+ </xsl:attribute-set>
16311
+
16312
+ <!-- List of Figures, Tables -->
16313
+ <xsl:attribute-set name="toc-listof-title-style">
16314
+ </xsl:attribute-set>
16315
+
16316
+ <xsl:attribute-set name="toc-listof-item-block-style">
16317
+ </xsl:attribute-set>
16318
+
16319
+ <xsl:attribute-set name="toc-listof-item-style">
16320
+ <xsl:attribute name="role">TOCI</xsl:attribute>
16321
+ </xsl:attribute-set>
16322
+
16148
16323
  <xsl:template name="processPrefaceSectionsDefault_Contents">
16149
16324
  <xsl:variable name="nodes_preface_">
16150
16325
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -16210,7 +16385,7 @@
16210
16385
 
16211
16386
  <xsl:template name="processTables_Contents">
16212
16387
  <mnx:tables>
16213
- <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
16388
+ <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
16214
16389
  <xsl:choose>
16215
16390
  <xsl:when test="mn:fmt-name">
16216
16391
  <xsl:variable name="fmt_name">
@@ -16232,7 +16407,7 @@
16232
16407
 
16233
16408
  <xsl:template name="processFigures_Contents">
16234
16409
  <mnx:figures>
16235
- <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) != '']">
16410
+ <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) != '']">
16236
16411
  <xsl:choose>
16237
16412
  <xsl:when test="mn:fmt-name">
16238
16413
  <xsl:variable name="fmt_name">
@@ -16261,7 +16436,7 @@
16261
16436
 
16262
16437
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
16263
16438
 
16264
- <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">
16439
+ <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">
16265
16440
  <xsl:apply-templates mode="contents"/>
16266
16441
  <xsl:text> </xsl:text>
16267
16442
  </xsl:template>
@@ -16273,7 +16448,7 @@
16273
16448
  </xsl:if>
16274
16449
  </xsl:template>
16275
16450
 
16276
- <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">
16451
+ <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">
16277
16452
  <xsl:apply-templates mode="bookmarks"/>
16278
16453
  <xsl:text> </xsl:text>
16279
16454
  </xsl:template>
@@ -16284,7 +16459,7 @@
16284
16459
  </xsl:if>
16285
16460
  </xsl:template>
16286
16461
 
16287
- <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">
16462
+ <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">
16288
16463
  <xsl:value-of select="."/>
16289
16464
  </xsl:template>
16290
16465
 
@@ -16294,7 +16469,7 @@
16294
16469
  </xsl:if>
16295
16470
  </xsl:template>
16296
16471
 
16297
- <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">
16472
+ <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">
16298
16473
  <xsl:value-of select="."/>
16299
16474
  </xsl:template>
16300
16475
 
@@ -16755,7 +16930,7 @@
16755
16930
  <xsl:value-of select="."/>
16756
16931
  </xsl:template>
16757
16932
 
16758
- <xsl:template match="mn:review" mode="contents_item"/>
16933
+ <xsl:template match="mn:annotation" mode="contents_item"/>
16759
16934
 
16760
16935
  <xsl:template match="mn:tab" mode="contents_item">
16761
16936
  <xsl:text> </xsl:text>
@@ -16910,7 +17085,7 @@
16910
17085
  <xsl:apply-templates/>
16911
17086
  </xsl:template>
16912
17087
 
16913
- <xsl:template match="mn:toc//mn:xref" priority="3">
17088
+ <xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
16914
17089
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
16915
17090
  <!-- New format: one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
16916
17091
  <!-- <test><xsl:copy-of select="."/></test> -->
@@ -16978,8 +17153,8 @@
16978
17153
  <xsl:apply-templates mode="toc_table_width"/>
16979
17154
  </xsl:template>
16980
17155
 
16981
- <xsl:template match="mn:clause[@type = 'toc']/mn:title" mode="toc_table_width"/>
16982
- <xsl:template match="mn:clause[not(@type = 'toc')]/mn:title" mode="toc_table_width"/>
17156
+ <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
17157
+ <xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
16983
17158
 
16984
17159
  <xsl:template match="mn:li" mode="toc_table_width">
16985
17160
  <mn:tr>
@@ -16987,7 +17162,7 @@
16987
17162
  </mn:tr>
16988
17163
  </xsl:template>
16989
17164
 
16990
- <xsl:template match="mn:xref" mode="toc_table_width">
17165
+ <xsl:template match="mn:fmt-xref" mode="toc_table_width">
16991
17166
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
16992
17167
  <!-- New format - one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
16993
17168
  <xsl:for-each select="mn:tab">
@@ -17061,10 +17236,10 @@
17061
17236
 
17062
17237
  </xsl:template> <!-- tab -->
17063
17238
 
17064
- <xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
17065
- <xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
17239
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
17240
+ <xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
17066
17241
 
17067
- <xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
17242
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
17068
17243
  </xsl:template>
17069
17244
 
17070
17245
  <xsl:template name="insertNonBreakSpaces">
@@ -17078,13 +17253,13 @@
17078
17253
  </xsl:template>
17079
17254
 
17080
17255
  <xsl:variable name="reviews_">
17081
- <xsl:for-each select="//mn:review[not(parent::mn:review-container)][@from]">
17256
+ <xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
17082
17257
  <xsl:copy>
17083
17258
  <xsl:copy-of select="@from"/>
17084
17259
  <xsl:copy-of select="@id"/>
17085
17260
  </xsl:copy>
17086
17261
  </xsl:for-each>
17087
- <xsl:for-each select="//mn:fmt-review-start[@source]">
17262
+ <xsl:for-each select="//mn:fmt-annotation-start[@source]">
17088
17263
  <xsl:copy>
17089
17264
  <xsl:copy-of select="@source"/>
17090
17265
  <xsl:copy-of select="@id"/>
@@ -17098,7 +17273,7 @@
17098
17273
  <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
17099
17274
  <xsl:variable name="curr_id" select="@id"/>
17100
17275
  <!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
17101
- <xsl:for-each select="$reviews//mn:review[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
17276
+ <xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
17102
17277
  <xsl:variable name="review_id" select="normalize-space(@id)"/>
17103
17278
  <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
17104
17279
  <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>
@@ -17113,7 +17288,7 @@
17113
17288
 
17114
17289
  <!-- document text (not figures, or tables) footnotes -->
17115
17290
  <xsl:variable name="reviews_container_">
17116
- <xsl:for-each select="//mn:review-container/mn:fmt-review-body">
17291
+ <xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
17117
17292
  <xsl:variable name="update_xml_step1">
17118
17293
  <xsl:apply-templates select="." mode="update_xml_step1"/>
17119
17294
  </xsl:variable>
@@ -17122,10 +17297,10 @@
17122
17297
  </xsl:variable>
17123
17298
  <xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
17124
17299
 
17125
- <xsl:template match="mn:review-container"/>
17300
+ <xsl:template match="mn:annotation-container"/>
17126
17301
 
17127
17302
  <!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
17128
- <xsl:template match="mn:review[not(parent::mn:review-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
17303
+ <xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
17129
17304
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
17130
17305
  <xsl:if test="$isGenerateTableIF = 'false'">
17131
17306
  <xsl:choose>
@@ -17145,7 +17320,7 @@
17145
17320
  </xsl:template>
17146
17321
 
17147
17322
  <!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
17148
- <xsl:template match="mn:fmt-review-start" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
17323
+ <xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
17149
17324
  <!-- comment 2019-11-29 -->
17150
17325
  <!-- <fo:block font-weight="bold">Review:</fo:block>
17151
17326
  <xsl:apply-templates /> -->
@@ -17201,7 +17376,7 @@
17201
17376
  </xsl:template>
17202
17377
 
17203
17378
  <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
17204
- <xsl:template match="mn:review[@type = 'other']"/>
17379
+ <xsl:template match="mn:annotation[@type = 'other']"/>
17205
17380
 
17206
17381
  <!-- ============ -->
17207
17382
  <!-- errata -->
@@ -17594,9 +17769,12 @@
17594
17769
  <xsl:choose>
17595
17770
  <xsl:when test="mn:fmt-title">
17596
17771
  <xsl:variable name="fmt_title_section">
17597
- <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:review)]"/>
17772
+ <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
17598
17773
  </xsl:variable>
17599
17774
  <xsl:value-of select="normalize-space($fmt_title_section)"/>
17775
+ <xsl:if test="normalize-space($fmt_title_section) = ''">
17776
+ <xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
17777
+ </xsl:if>
17600
17778
  </xsl:when>
17601
17779
  <xsl:otherwise>
17602
17780
  <xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
@@ -17609,6 +17787,9 @@
17609
17787
  <xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
17610
17788
  <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
17611
17789
  </xsl:when>
17790
+ <xsl:when test="mn:fmt-title/mn:tab">
17791
+ <xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
17792
+ </xsl:when>
17612
17793
  <xsl:when test="mn:fmt-title">
17613
17794
  <xsl:copy-of select="mn:fmt-title/node()"/>
17614
17795
  </xsl:when>
@@ -17746,10 +17927,10 @@
17746
17927
 
17747
17928
  </fo:block>
17748
17929
 
17749
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
17930
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
17750
17931
 
17751
17932
  <fo:block>
17752
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
17933
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
17753
17934
  </fo:block>
17754
17935
  </xsl:otherwise>
17755
17936
  </xsl:choose>
@@ -17758,7 +17939,7 @@
17758
17939
  <xsl:template name="refine_annex_style">
17759
17940
  </xsl:template>
17760
17941
 
17761
- <xsl:template match="mn:name/text()">
17942
+ <xsl:template match="mn:name/text() | mn:fmt-name/text()">
17762
17943
  <!-- 0xA0 to space replacement -->
17763
17944
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
17764
17945
  </xsl:template>
@@ -17814,28 +17995,28 @@
17814
17995
  <xsl:template match="mn:amend"/>
17815
17996
 
17816
17997
  <!-- fmt-title renamed to title in update_xml_step1 -->
17817
- <xsl:template match="mn:fmt-title"/>
17998
+ <!-- <xsl:template match="mn:fmt-title" /> -->
17818
17999
 
17819
18000
  <!-- fmt-name renamed to name in update_xml_step1 -->
17820
- <xsl:template match="mn:fmt-name"/>
18001
+ <!-- <xsl:template match="mn:fmt-name" /> -->
17821
18002
 
17822
18003
  <!-- fmt-preferred renamed to preferred in update_xml_step1 -->
17823
- <xsl:template match="mn:fmt-preferred"/>
18004
+ <!-- <xsl:template match="mn:fmt-preferred" /> -->
17824
18005
 
17825
18006
  <!-- fmt-admitted renamed to admitted in update_xml_step1 -->
17826
- <xsl:template match="mn:fmt-admitted"/>
18007
+ <!-- <xsl:template match="mn:fmt-admitted" /> -->
17827
18008
 
17828
18009
  <!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
17829
- <xsl:template match="mn:fmt-deprecates"/>
18010
+ <!-- <xsl:template match="mn:fmt-deprecates" /> -->
17830
18011
 
17831
18012
  <!-- fmt-definition renamed to definition in update_xml_step1 -->
17832
- <xsl:template match="mn:fmt-definition"/>
18013
+ <!-- <xsl:template match="mn:fmt-definition" /> -->
17833
18014
 
17834
18015
  <!-- fmt-termsource renamed to termsource in update_xml_step1 -->
17835
- <xsl:template match="mn:fmt-termsource"/>
18016
+ <!-- <xsl:template match="mn:fmt-termsource" /> -->
17836
18017
 
17837
18018
  <!-- fmt-source renamed to source in update_xml_step1 -->
17838
- <xsl:template match="mn:fmt-source"/>
18019
+ <!-- <xsl:template match="mn:fmt-source" /> -->
17839
18020
 
17840
18021
  <xsl:template match="mn:semx">
17841
18022
  <xsl:apply-templates/>
@@ -18304,12 +18485,12 @@
18304
18485
  <xsl:when test="ancestor::mn:preface">
18305
18486
  <xsl:value-of select="$level_total - 2"/>
18306
18487
  </xsl:when>
18307
- <xsl:when test="ancestor::mn:sections and self::mn:title">
18488
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
18308
18489
  <!-- determine 'depth' depends on upper clause with title/@depth -->
18309
18490
  <!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
18310
- <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:title/@depth][1]/mn:title/@depth"/>
18491
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
18311
18492
  <!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
18312
- <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:title/@depth][1]/ancestor::*)"/>
18493
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
18313
18494
  <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
18314
18495
  <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
18315
18496
  <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
@@ -18325,8 +18506,8 @@
18325
18506
  </xsl:otherwise>
18326
18507
  </xsl:choose>
18327
18508
  </xsl:when>
18328
- <xsl:when test="ancestor::mn:sections and self::mn:name and parent::mn:term">
18329
- <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:title/@depth)"/>
18509
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
18510
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
18330
18511
  <xsl:choose>
18331
18512
  <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
18332
18513
  <xsl:value-of select="number($upper_terms_depth + 1)"/>
@@ -18337,7 +18518,7 @@
18337
18518
  </xsl:choose>
18338
18519
  </xsl:when>
18339
18520
  <xsl:when test="ancestor::mn:sections">
18340
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:title/@depth)"/>
18521
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
18341
18522
  <xsl:choose>
18342
18523
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
18343
18524
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -18353,8 +18534,8 @@
18353
18534
  <xsl:when test="parent::mn:annex">
18354
18535
  <xsl:value-of select="$level_total - 1"/>
18355
18536
  </xsl:when>
18356
- <xsl:when test="ancestor::mn:annex and self::mn:title">
18357
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:title/@depth)"/>
18537
+ <xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
18538
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
18358
18539
  <xsl:choose>
18359
18540
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
18360
18541
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -18387,7 +18568,7 @@
18387
18568
  </xsl:when>
18388
18569
  <xsl:otherwise>
18389
18570
  <xsl:variable name="title_level_">
18390
- <xsl:for-each select="../preceding-sibling::mn:title[1]">
18571
+ <xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
18391
18572
  <xsl:call-template name="getLevel"/>
18392
18573
  </xsl:for-each>
18393
18574
  </xsl:variable>
@@ -18464,15 +18645,17 @@
18464
18645
  </xsl:template>
18465
18646
 
18466
18647
  <xsl:template name="setNamedDestination">
18467
- <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
18468
- <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'">
18469
- <fox:destination internal-destination="{@id}"/>
18470
- </xsl:if>
18471
- <xsl:for-each select=". | mn:title | mn:name">
18472
- <xsl:if test="@named_dest">
18473
- <fox:destination internal-destination="{@named_dest}"/>
18648
+ <xsl:if test="$isGenerateTableIF = 'false'">
18649
+ <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
18650
+ <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'">
18651
+ <fox:destination internal-destination="{@id}"/>
18474
18652
  </xsl:if>
18475
- </xsl:for-each>
18653
+ <xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
18654
+ <xsl:if test="@named_dest">
18655
+ <fox:destination internal-destination="{@named_dest}"/>
18656
+ </xsl:if>
18657
+ </xsl:for-each>
18658
+ </xsl:if>
18476
18659
  </xsl:template>
18477
18660
 
18478
18661
  <xsl:template name="add-letter-spacing">
@@ -18820,7 +19003,7 @@
18820
19003
  </xsl:when>
18821
19004
  <xsl:otherwise>
18822
19005
  <!-- namespace-uri(ancestor::mn:title) != '' to skip title from $contents -->
18823
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
19006
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
18824
19007
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
18825
19008
  </xsl:if>
18826
19009
  <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">
@@ -18854,7 +19037,7 @@
18854
19037
  </fo:block>
18855
19038
  </fo:block-container>
18856
19039
  </fo:inline-container>
18857
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
19040
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
18858
19041
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
18859
19042
  </xsl:if>
18860
19043
  </xsl:otherwise>
@@ -19260,7 +19443,7 @@
19260
19443
  <xsl:apply-templates select="mn:term" mode="linear_xml"/>
19261
19444
  </xsl:template>
19262
19445
 
19263
- <xsl:template match="mn:introduction//mn:title | mn:foreword//mn:title | mn:preface//mn:title | mn:sections//mn:title | mn:annex//mn:title | mn:bibliography/mn:clause/mn:title | mn:references/mn:title | mn:colophon//mn:title" mode="linear_xml" priority="2">
19446
+ <xsl:template match="mn:introduction//mn:fmt-title | mn:foreword//mn:fmt-title | mn:preface//mn:fmt-title | mn:sections//mn:fmt-title | mn:annex//mn:fmt-title | mn:bibliography/mn:clause/mn:fmt-title | mn:references/mn:fmt-title | mn:colophon//mn:fmt-title" mode="linear_xml" priority="2">
19264
19447
  <xsl:copy>
19265
19448
  <xsl:apply-templates select="@*" mode="linear_xml"/>
19266
19449
 
@@ -19324,7 +19507,7 @@
19324
19507
 
19325
19508
  <!-- add @to = figure, table, clause -->
19326
19509
  <!-- add @depth = from -->
19327
- <xsl:template match="mn:xref" mode="linear_xml">
19510
+ <xsl:template match="mn:fmt-xref" mode="linear_xml">
19328
19511
  <xsl:copy>
19329
19512
  <xsl:apply-templates select="@*" mode="linear_xml"/>
19330
19513
  <xsl:variable name="target" select="@target"/>
@@ -19332,7 +19515,7 @@
19332
19515
  <xsl:value-of select="local-name(//*[@id = current()/@target][1])"/>
19333
19516
  </xsl:attribute>
19334
19517
  <xsl:attribute name="depth">
19335
- <xsl:value-of select="//*[@id = current()/@target][1]/mn:title/@depth"/>
19518
+ <xsl:value-of select="//*[@id = current()/@target][1]/mn:fmt-title/@depth"/>
19336
19519
  </xsl:attribute>
19337
19520
  <xsl:apply-templates select="node()" mode="linear_xml"/>
19338
19521
  </xsl:copy>
@@ -19358,7 +19541,7 @@
19358
19541
  </fn>
19359
19542
  -->
19360
19543
  <!-- fn in text -->
19361
- <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))]" mode="linear_xml" name="linear_xml_fn">
19544
+ <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))]" mode="linear_xml" name="linear_xml_fn">
19362
19545
  <xsl:variable name="p_fn_">
19363
19546
  <xsl:call-template name="get_fn_list"/>
19364
19547
  <!-- <xsl:choose>