metanorma-bipm 2.6.10 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@
4
4
 
5
5
  <xsl:param name="align-cross-elements"/>
6
6
 
7
- <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"/>
7
+ <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"/>
8
8
 
9
9
  <xsl:variable name="align_cross_elements_default">clause</xsl:variable>
10
10
  <xsl:variable name="align_cross_elements_doc">
@@ -147,6 +147,79 @@
147
147
  </xsl:for-each>
148
148
  </xsl:variable>
149
149
 
150
+ <xsl:template name="layout-master-set">
151
+ <fo:layout-master-set>
152
+ <!-- cover page -->
153
+ <fo:simple-page-master master-name="cover-page-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
154
+ <fo:region-body margin-top="85mm" margin-bottom="30mm" margin-left="100mm" margin-right="19mm"/>
155
+ <fo:region-before extent="85mm"/>
156
+ <fo:region-after region-name="cover-page-jcgm-footer" extent="30mm"/>
157
+ <fo:region-start extent="100mm"/>
158
+ <fo:region-end extent="19mm"/>
159
+ </fo:simple-page-master>
160
+ <!-- internal cover page -->
161
+ <fo:simple-page-master master-name="internal-cover-page-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
162
+ <fo:region-body margin-top="11mm" margin-bottom="21mm" margin-left="25mm" margin-right="19mm"/>
163
+ <fo:region-before region-name="header" extent="11mm"/>
164
+ <fo:region-after region-name="internal-cover-page-jcgm-footer" extent="21mm"/>
165
+ <fo:region-start extent="25mm"/>
166
+ <fo:region-end extent="19mm"/>
167
+ </fo:simple-page-master>
168
+
169
+ <!-- blank page -->
170
+ <fo:simple-page-master master-name="blankpage" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
171
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
172
+ <fo:region-before region-name="header-blank" extent="{$marginTop}mm"/>
173
+ <fo:region-after region-name="footer-blank" extent="{$marginBottom}mm"/>
174
+ <fo:region-start region-name="left-region" extent="17mm"/>
175
+ <fo:region-end region-name="right-region" extent="26.5mm"/>
176
+ </fo:simple-page-master>
177
+
178
+ <fo:simple-page-master master-name="odd-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
179
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
180
+ <fo:region-before region-name="header-odd-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
181
+ <fo:region-after region-name="footer-odd-jcgm" extent="{$marginBottom}mm"/>
182
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
183
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
184
+ </fo:simple-page-master>
185
+ <fo:simple-page-master master-name="odd-jcgm-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
186
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
187
+ <fo:region-before region-name="header-odd-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
188
+ <fo:region-after region-name="footer-odd-jcgm" extent="{$marginBottom}mm"/>
189
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
190
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
191
+ </fo:simple-page-master>
192
+ <fo:simple-page-master master-name="even-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
193
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
194
+ <fo:region-before region-name="header-even-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
195
+ <fo:region-after region-name="footer-even-jcgm" extent="{$marginBottom}mm"/>
196
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
197
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
198
+ </fo:simple-page-master>
199
+ <fo:simple-page-master master-name="even-jcgm-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
200
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
201
+ <fo:region-before region-name="header-even-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
202
+ <fo:region-after region-name="footer-even-jcgm" extent="{$marginBottom}mm"/>
203
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
204
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
205
+ </fo:simple-page-master>
206
+ <fo:page-sequence-master master-name="document-jcgm">
207
+ <fo:repeatable-page-master-alternatives>
208
+ <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
209
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-jcgm"/>
210
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-jcgm"/>
211
+ </fo:repeatable-page-master-alternatives>
212
+ </fo:page-sequence-master>
213
+ <fo:page-sequence-master master-name="document-jcgm-landscape">
214
+ <fo:repeatable-page-master-alternatives>
215
+ <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
216
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-jcgm-landscape"/>
217
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-jcgm-landscape"/>
218
+ </fo:repeatable-page-master-alternatives>
219
+ </fo:page-sequence-master>
220
+ </fo:layout-master-set>
221
+ </xsl:template> <!-- END: layout-master-set -->
222
+
150
223
  <xsl:template match="/">
151
224
  <fo:root xml:lang="{$lang}">
152
225
  <xsl:variable name="root-style">
@@ -155,76 +228,8 @@
155
228
  <xsl:call-template name="insertRootStyle">
156
229
  <xsl:with-param name="root-style" select="$root-style"/>
157
230
  </xsl:call-template>
158
- <fo:layout-master-set>
159
- <!-- cover page -->
160
- <fo:simple-page-master master-name="cover-page-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
161
- <fo:region-body margin-top="85mm" margin-bottom="30mm" margin-left="100mm" margin-right="19mm"/>
162
- <fo:region-before extent="85mm"/>
163
- <fo:region-after region-name="cover-page-jcgm-footer" extent="30mm"/>
164
- <fo:region-start extent="100mm"/>
165
- <fo:region-end extent="19mm"/>
166
- </fo:simple-page-master>
167
- <!-- internal cover page -->
168
- <fo:simple-page-master master-name="internal-cover-page-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
169
- <fo:region-body margin-top="11mm" margin-bottom="21mm" margin-left="25mm" margin-right="19mm"/>
170
- <fo:region-before region-name="header" extent="11mm"/>
171
- <fo:region-after region-name="internal-cover-page-jcgm-footer" extent="21mm"/>
172
- <fo:region-start extent="25mm"/>
173
- <fo:region-end extent="19mm"/>
174
- </fo:simple-page-master>
175
-
176
- <!-- blank page -->
177
- <fo:simple-page-master master-name="blankpage" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
178
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
179
- <fo:region-before region-name="header-blank" extent="{$marginTop}mm"/>
180
- <fo:region-after region-name="footer-blank" extent="{$marginBottom}mm"/>
181
- <fo:region-start region-name="left-region" extent="17mm"/>
182
- <fo:region-end region-name="right-region" extent="26.5mm"/>
183
- </fo:simple-page-master>
184
-
185
- <fo:simple-page-master master-name="odd-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
186
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
187
- <fo:region-before region-name="header-odd-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
188
- <fo:region-after region-name="footer-odd-jcgm" extent="{$marginBottom}mm"/>
189
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
190
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
191
- </fo:simple-page-master>
192
- <fo:simple-page-master master-name="odd-jcgm-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
193
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
194
- <fo:region-before region-name="header-odd-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
195
- <fo:region-after region-name="footer-odd-jcgm" extent="{$marginBottom}mm"/>
196
- <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
197
- <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
198
- </fo:simple-page-master>
199
- <fo:simple-page-master master-name="even-jcgm" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
200
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
201
- <fo:region-before region-name="header-even-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
202
- <fo:region-after region-name="footer-even-jcgm" extent="{$marginBottom}mm"/>
203
- <fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
204
- <fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
205
- </fo:simple-page-master>
206
- <fo:simple-page-master master-name="even-jcgm-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
207
- <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight2}mm" margin-right="{$marginLeftRight1}mm"/>
208
- <fo:region-before region-name="header-even-jcgm" extent="{$marginTop}mm"/> <!-- display-align="center" -->
209
- <fo:region-after region-name="footer-even-jcgm" extent="{$marginBottom}mm"/>
210
- <fo:region-start region-name="left-region" extent="{$marginLeftRight2}mm"/>
211
- <fo:region-end region-name="right-region" extent="{$marginLeftRight1}mm"/>
212
- </fo:simple-page-master>
213
- <fo:page-sequence-master master-name="document-jcgm">
214
- <fo:repeatable-page-master-alternatives>
215
- <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
216
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-jcgm"/>
217
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-jcgm"/>
218
- </fo:repeatable-page-master-alternatives>
219
- </fo:page-sequence-master>
220
- <fo:page-sequence-master master-name="document-jcgm-landscape">
221
- <fo:repeatable-page-master-alternatives>
222
- <fo:conditional-page-master-reference master-reference="blankpage" blank-or-not-blank="blank"/>
223
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-jcgm-landscape"/>
224
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-jcgm-landscape"/>
225
- </fo:repeatable-page-master-alternatives>
226
- </fo:page-sequence-master>
227
- </fo:layout-master-set>
231
+
232
+ <xsl:call-template name="layout-master-set"/>
228
233
 
229
234
  <fo:declarations>
230
235
  <xsl:call-template name="addPDFUAmeta"/>
@@ -240,112 +245,7 @@
240
245
  <xsl:with-param name="contents" select="$contents"/>
241
246
  </xsl:call-template>
242
247
 
243
- <fo:page-sequence master-reference="cover-page-jcgm" font-family="Arial" font-size="10.5pt" force-page-count="no-force">
244
- <fo:static-content flow-name="cover-page-jcgm-footer" font-size="10pt">
245
- <fo:block font-size="10pt" border-bottom="0.5pt solid black" padding-bottom="2.5mm" margin-left="-1mm" space-after="4mm">
246
- <!-- Example: First edition July 2009 -->
247
- <xsl:call-template name="printEdition"/>
248
- <xsl:text>   </xsl:text>
249
- <xsl:call-template name="convertDate">
250
- <xsl:with-param name="date" select="(//mn:metanorma)[1]/mn:bibdata/mn:date[@type = 'published']/mn:on"/>
251
- </xsl:call-template>
252
- </fo:block>
253
- <!-- Example © JCGM 2009 -->
254
- <fo:block font-size="11pt">
255
- <fo:inline font-family="Times New Roman" font-size="12pt"><xsl:text>© </xsl:text></fo:inline>
256
- <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/>
257
- <xsl:text> </xsl:text>
258
- <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from"/>
259
- </fo:block>
260
- </fo:static-content>
261
- <fo:flow flow-name="xsl-region-body">
262
- <xsl:call-template name="insert_Logo-BIPM-Metro"/>
263
- <xsl:call-template name="insertDraftWatermark"/>
264
- <fo:block-container font-weight="bold">
265
- <fo:block font-size="16.5pt">
266
- <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/>
267
- <xsl:text> </xsl:text>
268
- <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:docnumber"/>
269
- <fo:inline font-weight="normal">:</fo:inline>
270
- <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from"/>
271
- </fo:block>
272
- <fo:block font-size="13pt" font-weight="normal" space-after="19.5mm">
273
- <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@type = 'title-provenance']"/>
274
- </fo:block>
275
- <fo:block border-bottom="1pt solid black"> </fo:block>
276
- <fo:block font-size="16.5pt" margin-left="-0.5mm" padding-top="3.5mm" space-after="7mm" margin-right="7mm" line-height="105%" role="H1">
277
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-main']" mode="title"/>
278
- <xsl:variable name="title_part">
279
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-part']" mode="title"/>
280
- </xsl:variable>
281
- <xsl:if test="normalize-space($title_part) != ''">
282
- <xsl:text> — </xsl:text>
283
- <xsl:copy-of select="$title_part"/>
284
- </xsl:if>
285
- </fo:block>
286
- <fo:block font-size="12pt" font-style="italic" line-height="140%" role="H1">
287
- <xsl:variable name="secondLang" select="(//mn:metanorma)[1]/mn:bibdata/mn:title/@language[. != $lang]"/>
288
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-main']" mode="title"/>
289
- <xsl:variable name="title_part">
290
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-part']" mode="title"/>
291
- </xsl:variable>
292
- <xsl:if test="normalize-space($title_part) != ''">
293
- <xsl:text> — </xsl:text>
294
- <xsl:copy-of select="$title_part"/>
295
- </xsl:if>
296
- </fo:block>
297
- </fo:block-container>
298
- </fo:flow>
299
- </fo:page-sequence>
300
-
301
- <fo:page-sequence master-reference="internal-cover-page-jcgm" force-page-count="no-force">
302
- <fo:static-content flow-name="internal-cover-page-jcgm-footer" font-size="9pt">
303
- <!-- example: (c) JCGM 2009— All rights reserved -->
304
- <fo:block text-align="right">
305
- <xsl:value-of select="$copyrightText"/>
306
- </fo:block>
307
- </fo:static-content>
308
- <fo:flow flow-name="xsl-region-body">
309
- <xsl:call-template name="insertDraftWatermark"/>
310
- <fo:table table-layout="fixed" width="100%" font-size="13pt">
311
- <fo:table-column column-width="134mm"/>
312
- <fo:table-column column-width="30mm"/>
313
- <fo:table-body>
314
- <fo:table-row>
315
- <fo:table-cell>
316
- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/></fo:block>
317
- </fo:table-cell>
318
- <fo:table-cell line-height="140%">
319
- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/></fo:block>
320
- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:docnumber"/></fo:block>
321
- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from"/></fo:block>
322
- </fo:table-cell>
323
- </fo:table-row>
324
- </fo:table-body>
325
- </fo:table>
326
- <fo:block font-size="18pt" space-before="70mm" role="H1">
327
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-main']" mode="title"/>
328
- <xsl:variable name="title_part">
329
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-part']" mode="title"/>
330
- </xsl:variable>
331
- <xsl:if test="normalize-space($title_part) != ''">
332
- <xsl:text> — </xsl:text>
333
- <xsl:copy-of select="$title_part"/>
334
- </xsl:if>
335
- </fo:block>
336
- <fo:block font-size="13pt" space-before="35mm" role="H1">
337
- <xsl:variable name="secondLang" select="(//mn:metanorma)[1]/mn:bibdata/mn:title/@language[. != $lang]"/>
338
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-main']" mode="title"/>
339
- <xsl:variable name="title_part">
340
- <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-part']" mode="title"/>
341
- </xsl:variable>
342
- <xsl:if test="normalize-space($title_part) != ''">
343
- <xsl:text> — </xsl:text>
344
- <xsl:copy-of select="$title_part"/>
345
- </xsl:if>
346
- </fo:block>
347
- </fo:flow>
348
- </fo:page-sequence> <!-- END: internal-cover-page-jcgm -->
248
+ <xsl:call-template name="cover-page"/>
349
249
 
350
250
  <xsl:variable name="updated_xml">
351
251
  <xsl:call-template name="updateXML"/>
@@ -467,6 +367,115 @@
467
367
  </fo:root>
468
368
  </xsl:template>
469
369
 
370
+ <xsl:template name="cover-page">
371
+ <fo:page-sequence master-reference="cover-page-jcgm" font-family="Arial" font-size="10.5pt" force-page-count="no-force">
372
+ <fo:static-content flow-name="cover-page-jcgm-footer" font-size="10pt">
373
+ <fo:block font-size="10pt" border-bottom="0.5pt solid black" padding-bottom="2.5mm" margin-left="-1mm" space-after="4mm">
374
+ <!-- Example: First edition July 2009 -->
375
+ <xsl:call-template name="printEdition"/>
376
+ <xsl:text>   </xsl:text>
377
+ <xsl:call-template name="convertDate">
378
+ <xsl:with-param name="date" select="(//mn:metanorma)[1]/mn:bibdata/mn:date[@type = 'published']/mn:on"/>
379
+ </xsl:call-template>
380
+ </fo:block>
381
+ <!-- Example © JCGM 2009 -->
382
+ <fo:block font-size="11pt">
383
+ <fo:inline font-family="Times New Roman" font-size="12pt"><xsl:text>© </xsl:text></fo:inline>
384
+ <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/>
385
+ <xsl:text> </xsl:text>
386
+ <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from"/>
387
+ </fo:block>
388
+ </fo:static-content>
389
+ <fo:flow flow-name="xsl-region-body">
390
+ <xsl:call-template name="insert_Logo-BIPM-Metro"/>
391
+ <xsl:call-template name="insertDraftWatermark"/>
392
+ <fo:block-container font-weight="bold">
393
+ <fo:block font-size="16.5pt">
394
+ <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/>
395
+ <xsl:text> </xsl:text>
396
+ <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:docnumber"/>
397
+ <fo:inline font-weight="normal">:</fo:inline>
398
+ <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from"/>
399
+ </fo:block>
400
+ <fo:block font-size="13pt" font-weight="normal" space-after="19.5mm">
401
+ <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@type = 'title-provenance']"/>
402
+ </fo:block>
403
+ <fo:block border-bottom="1pt solid black"> </fo:block>
404
+ <fo:block font-size="16.5pt" margin-left="-0.5mm" padding-top="3.5mm" space-after="7mm" margin-right="7mm" line-height="105%" role="H1">
405
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-main']" mode="title"/>
406
+ <xsl:variable name="title_part">
407
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-part']" mode="title"/>
408
+ </xsl:variable>
409
+ <xsl:if test="normalize-space($title_part) != ''">
410
+ <xsl:text> — </xsl:text>
411
+ <xsl:copy-of select="$title_part"/>
412
+ </xsl:if>
413
+ </fo:block>
414
+ <fo:block font-size="12pt" font-style="italic" line-height="140%" role="H1">
415
+ <xsl:variable name="secondLang" select="(//mn:metanorma)[1]/mn:bibdata/mn:title/@language[. != $lang]"/>
416
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-main']" mode="title"/>
417
+ <xsl:variable name="title_part">
418
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-part']" mode="title"/>
419
+ </xsl:variable>
420
+ <xsl:if test="normalize-space($title_part) != ''">
421
+ <xsl:text> — </xsl:text>
422
+ <xsl:copy-of select="$title_part"/>
423
+ </xsl:if>
424
+ </fo:block>
425
+ </fo:block-container>
426
+ </fo:flow>
427
+ </fo:page-sequence>
428
+
429
+ <fo:page-sequence master-reference="internal-cover-page-jcgm" force-page-count="no-force">
430
+ <fo:static-content flow-name="internal-cover-page-jcgm-footer" font-size="9pt">
431
+ <!-- example: (c) JCGM 2009— All rights reserved -->
432
+ <fo:block text-align="right">
433
+ <xsl:value-of select="$copyrightText"/>
434
+ </fo:block>
435
+ </fo:static-content>
436
+ <fo:flow flow-name="xsl-region-body">
437
+ <xsl:call-template name="insertDraftWatermark"/>
438
+ <fo:table table-layout="fixed" width="100%" font-size="13pt">
439
+ <fo:table-column column-width="134mm"/>
440
+ <fo:table-column column-width="30mm"/>
441
+ <fo:table-body>
442
+ <fo:table-row>
443
+ <fo:table-cell>
444
+ <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/></fo:block>
445
+ </fo:table-cell>
446
+ <fo:table-cell line-height="140%">
447
+ <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/></fo:block>
448
+ <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:docnumber"/></fo:block>
449
+ <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from"/></fo:block>
450
+ </fo:table-cell>
451
+ </fo:table-row>
452
+ </fo:table-body>
453
+ </fo:table>
454
+ <fo:block font-size="18pt" space-before="70mm" role="H1">
455
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-main']" mode="title"/>
456
+ <xsl:variable name="title_part">
457
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $lang and @type = 'title-part']" mode="title"/>
458
+ </xsl:variable>
459
+ <xsl:if test="normalize-space($title_part) != ''">
460
+ <xsl:text> — </xsl:text>
461
+ <xsl:copy-of select="$title_part"/>
462
+ </xsl:if>
463
+ </fo:block>
464
+ <fo:block font-size="13pt" space-before="35mm" role="H1">
465
+ <xsl:variable name="secondLang" select="(//mn:metanorma)[1]/mn:bibdata/mn:title/@language[. != $lang]"/>
466
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-main']" mode="title"/>
467
+ <xsl:variable name="title_part">
468
+ <xsl:apply-templates select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@language = $secondLang and @type = 'title-part']" mode="title"/>
469
+ </xsl:variable>
470
+ <xsl:if test="normalize-space($title_part) != ''">
471
+ <xsl:text> — </xsl:text>
472
+ <xsl:copy-of select="$title_part"/>
473
+ </xsl:if>
474
+ </fo:block>
475
+ </fo:flow>
476
+ </fo:page-sequence> <!-- END: internal-cover-page-jcgm -->
477
+ </xsl:template> <!-- END: cover-page -->
478
+
470
479
  <xsl:template name="processPrefaceAndMainSectionsJCGM_items">
471
480
 
472
481
  <xsl:variable name="updated_xml_step_move_pagebreak">
@@ -593,7 +602,7 @@
593
602
 
594
603
  <xsl:apply-templates/>
595
604
 
596
- <xsl:if test="count(*) = 1 and mn:title"> <!-- if there isn't user ToC -->
605
+ <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
597
606
 
598
607
  <xsl:variable name="docid">
599
608
  <xsl:call-template name="getDocumentId"/>
@@ -634,7 +643,7 @@
634
643
  </fo:block-container>
635
644
  </xsl:template>
636
645
 
637
- <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:title" priority="3">
646
+ <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
638
647
  <fo:block text-align-last="justify">
639
648
  <fo:inline font-size="15pt" font-weight="bold" role="H1">
640
649
  <xsl:call-template name="getLocalizedString">
@@ -766,8 +775,8 @@
766
775
  <xsl:variable name="element-name">
767
776
  <xsl:choose>
768
777
  <xsl:when test="$inline = 'true'">fo:inline</xsl:when>
769
- <xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
770
- <xsl:when test="preceding-sibling::*[1]/@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title, for two columns layout -->
778
+ <xsl:when test="../@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
779
+ <xsl:when test="preceding-sibling::*[1]/@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title, for two columns layout -->
771
780
  <xsl:when test="parent::mn:admonition">fo:inline</xsl:when>
772
781
  <xsl:otherwise>fo:block</xsl:otherwise>
773
782
  </xsl:choose>
@@ -824,7 +833,7 @@
824
833
  </fo:list-block>
825
834
  </xsl:template>
826
835
 
827
- <xsl:template match="mn:preferred[not(parent::mn:term)]" priority="2">
836
+ <xsl:template match="mn:fmt-preferred[not(parent::mn:term)]" priority="2">
828
837
  <xsl:variable name="levelTerm">
829
838
  <xsl:call-template name="getLevelTermName"/>
830
839
  </xsl:variable>
@@ -858,7 +867,7 @@
858
867
  </fo:block>
859
868
  </xsl:template>
860
869
 
861
- <xsl:template match="mn:definition/mn:p" priority="2">
870
+ <xsl:template match="mn:fmt-definition/mn:p" priority="2">
862
871
  <fo:block widows="1" orphans="1"><xsl:apply-templates/></fo:block>
863
872
  </xsl:template>
864
873
 
@@ -942,7 +951,7 @@
942
951
  </xsl:if>
943
952
  </xsl:template>
944
953
 
945
- <xsl:template match="*[self::mn:td or self::mn:th]/mn:formula/mn:stem" priority="2">
954
+ <xsl:template match="*[self::mn:td or self::mn:th]/mn:formula/mn:fmt-stem" priority="2">
946
955
  <fo:block>
947
956
  <xsl:if test="ancestor::*[self::mn:td or self::mn:th][1][@align]">
948
957
  <xsl:attribute name="text-align">
@@ -1101,7 +1110,7 @@
1101
1110
  </xsl:if>
1102
1111
  </xsl:template>
1103
1112
 
1104
- <xsl:template match="mn:title" name="title">
1113
+ <xsl:template match="mn:fmt-title" name="title">
1105
1114
 
1106
1115
  <xsl:variable name="level">
1107
1116
  <xsl:call-template name="getLevel"/>
@@ -1143,7 +1152,7 @@
1143
1152
  <xsl:choose>
1144
1153
  <xsl:when test="ancestor::mn:preface">12pt</xsl:when>
1145
1154
  <xsl:when test="parent::mn:annex">30pt</xsl:when>
1146
- <xsl:when test="following-sibling::*[1][self::mn:admitted]">0pt</xsl:when>
1155
+ <xsl:when test="following-sibling::*[1][self::mn:fmt-admitted]">0pt</xsl:when>
1147
1156
  <!-- <xsl:otherwise>12pt</xsl:otherwise> -->
1148
1157
  <xsl:otherwise>12pt</xsl:otherwise>
1149
1158
  </xsl:choose>
@@ -1238,7 +1247,7 @@
1238
1247
  <!-- End of Index processing -->
1239
1248
  <!-- =================== -->
1240
1249
 
1241
- <xsl:template match="mn:xref" priority="2">
1250
+ <xsl:template match="mn:xref | mn:fmt-xref" priority="2">
1242
1251
  <xsl:call-template name="insert_basic_link">
1243
1252
  <xsl:with-param name="element">
1244
1253
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
@@ -1514,7 +1523,8 @@
1514
1523
  <!-- allow cross-align for element title -->
1515
1524
  <xsl:template match="mn:sections//mn:title | mn:annex//mn:title" mode="flatxml_step1"/>
1516
1525
  <xsl:template match="mn:sections//mn:fmt-title | mn:annex//mn:fmt-title" mode="flatxml_step1">
1517
- <xsl:element name="title" namespace="{$namespace_full}">
1526
+ <!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
1527
+ <xsl:copy>
1518
1528
  <xsl:apply-templates select="@*" mode="flatxml_step1"/>
1519
1529
  <xsl:call-template name="setCrossAlignAttributes"/>
1520
1530
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -1525,7 +1535,8 @@
1525
1535
  <xsl:copy-of select="../@inline-header"/>
1526
1536
  </xsl:if>
1527
1537
  <xsl:apply-templates mode="flatxml_step1"/>
1528
- </xsl:element>
1538
+ </xsl:copy>
1539
+ <!-- </xsl:element> -->
1529
1540
  </xsl:template>
1530
1541
 
1531
1542
  <xsl:template match="mn:annex" mode="flatxml_step1">
@@ -1642,11 +1653,13 @@
1642
1653
  </xsl:copy>
1643
1654
  </xsl:template>
1644
1655
  <xsl:template match="mn:sections//mn:fmt-termsource | mn:annex//mn:fmt-termsource" mode="flatxml_step1">
1645
- <xsl:element name="termsource" namespace="{$namespace_full}">
1656
+ <!-- <xsl:element name="fmt-termsource" namespace="{$namespace_full}"> -->
1657
+ <xsl:copy>
1646
1658
  <xsl:apply-templates select="@*" mode="flatxml_step1"/>
1647
1659
  <xsl:call-template name="setCrossAlignAttributes"/>
1648
1660
  <xsl:apply-templates mode="flatxml_step1"/>
1649
- </xsl:element>
1661
+ </xsl:copy>
1662
+ <!-- </xsl:element> -->
1650
1663
  </xsl:template>
1651
1664
 
1652
1665
  <xsl:template match="mn:preferred" mode="flatxml_step1"/>
@@ -1659,7 +1672,7 @@
1659
1672
  <xsl:apply-templates mode="flatxml_step1"/>
1660
1673
  </xsl:template>
1661
1674
  <xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="flatxml_step1">
1662
- <xsl:element name="preferred" namespace="{$namespace_full}">
1675
+ <xsl:element name="fmt-preferred" namespace="{$namespace_full}">
1663
1676
  <xsl:copy-of select="@*"/>
1664
1677
  <xsl:apply-templates mode="flatxml_step1"/>
1665
1678
  </xsl:element>
@@ -1668,7 +1681,7 @@
1668
1681
  <xsl:apply-templates mode="flatxml_step1"/>
1669
1682
  </xsl:template>
1670
1683
  <xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="flatxml_step1">
1671
- <xsl:element name="admitted" namespace="{$namespace_full}">
1684
+ <xsl:element name="fmt-admitted" namespace="{$namespace_full}">
1672
1685
  <xsl:copy-of select="@*"/>
1673
1686
  <xsl:apply-templates mode="flatxml_step1"/>
1674
1687
  </xsl:element>
@@ -1677,17 +1690,17 @@
1677
1690
  <xsl:apply-templates mode="flatxml_step1"/>
1678
1691
  </xsl:template>
1679
1692
  <xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="flatxml_step1">
1680
- <xsl:element name="deprecates" namespace="{$namespace_full}">
1693
+ <xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
1681
1694
  <xsl:copy-of select="@*"/>
1682
1695
  <xsl:apply-templates mode="flatxml_step1"/>
1683
1696
  </xsl:element>
1684
1697
  </xsl:template>
1685
- <xsl:template match="mn:fmt-definition" mode="flatxml_step1">
1698
+ <!-- <xsl:template match="mn:fmt-definition" mode="flatxml_step1">
1686
1699
  <xsl:element name="definition" namespace="{$namespace_full}">
1687
1700
  <xsl:copy-of select="@*"/>
1688
1701
  <xsl:apply-templates mode="flatxml_step1"/>
1689
1702
  </xsl:element>
1690
- </xsl:template>
1703
+ </xsl:template> -->
1691
1704
 
1692
1705
  <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="flatxml_step1" priority="3">
1693
1706
  <xsl:apply-templates mode="flatxml_step1"/>
@@ -1702,7 +1715,8 @@
1702
1715
  <xsl:template match="mn:stem" mode="flatxml_step1"/>
1703
1716
 
1704
1717
  <xsl:template match="mn:fmt-stem[not(.//mn:passthrough) and not(.//*[@linebreak])]" mode="flatxml_step1">
1705
- <xsl:element name="stem" namespace="{$namespace_full}">
1718
+ <!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
1719
+ <xsl:copy>
1706
1720
  <xsl:copy-of select="@*"/>
1707
1721
  <xsl:choose>
1708
1722
  <xsl:when test="mn:semx and count(node()) = 1">
@@ -1712,7 +1726,8 @@
1712
1726
  <xsl:copy-of select="node()"/>
1713
1727
  </xsl:otherwise>
1714
1728
  </xsl:choose>
1715
- </xsl:element>
1729
+ </xsl:copy>
1730
+ <!-- </xsl:element> -->
1716
1731
  </xsl:template>
1717
1732
 
1718
1733
  <xsl:template match="mn:concept" mode="flatxml_step1"/>
@@ -1723,39 +1738,39 @@
1723
1738
 
1724
1739
  <xsl:template match="mn:eref" mode="flatxml_step1"/>
1725
1740
 
1726
- <xsl:template match="mn:fmt-eref" mode="flatxml_step1">
1741
+ <!-- <xsl:template match="mn:fmt-eref" mode="flatxml_step1">
1727
1742
  <xsl:element name="eref" namespace="{$namespace_full}">
1728
1743
  <xsl:copy-of select="@*"/>
1729
1744
  <xsl:apply-templates mode="flatxml_step1"/>
1730
1745
  </xsl:element>
1731
- </xsl:template>
1746
+ </xsl:template> -->
1732
1747
 
1733
1748
  <xsl:template match="mn:xref" mode="flatxml_step1"/>
1734
1749
 
1735
- <xsl:template match="mn:fmt-xref" mode="flatxml_step1">
1750
+ <!-- <xsl:template match="mn:fmt-xref" mode="flatxml_step1">
1736
1751
  <xsl:element name="xref" namespace="{$namespace_full}">
1737
1752
  <xsl:copy-of select="@*"/>
1738
1753
  <xsl:apply-templates mode="flatxml_step1"/>
1739
1754
  </xsl:element>
1740
- </xsl:template>
1755
+ </xsl:template>-->
1741
1756
 
1742
1757
  <xsl:template match="mn:link" mode="flatxml_step1"/>
1743
1758
 
1744
- <xsl:template match="mn:fmt-link" mode="flatxml_step1">
1759
+ <!-- <xsl:template match="mn:fmt-link" mode="flatxml_step1">
1745
1760
  <xsl:element name="link" namespace="{$namespace_full}">
1746
1761
  <xsl:copy-of select="@*"/>
1747
1762
  <xsl:apply-templates mode="flatxml_step1"/>
1748
1763
  </xsl:element>
1749
- </xsl:template>
1764
+ </xsl:template> -->
1750
1765
 
1751
1766
  <xsl:template match="mn:origin" mode="flatxml_step1"/>
1752
1767
 
1753
- <xsl:template match="mn:fmt-origin" mode="flatxml_step1">
1768
+ <!-- <xsl:template match="mn:fmt-origin" mode="flatxml_step1">
1754
1769
  <xsl:element name="origin" namespace="{$namespace_full}">
1755
1770
  <xsl:copy-of select="@*"/>
1756
1771
  <xsl:apply-templates mode="flatxml_step1"/>
1757
1772
  </xsl:element>
1758
- </xsl:template>
1773
+ </xsl:template> -->
1759
1774
 
1760
1775
  <xsl:template match="mn:erefstack" mode="flatxml_step1"/>
1761
1776
 
@@ -1793,13 +1808,13 @@
1793
1808
  <!-- https://github.com/metanorma/isodoc/issues/687 -->
1794
1809
  <xsl:template match="mn:source" mode="flatxml_step1"/>
1795
1810
 
1796
- <xsl:template match="mn:fmt-source"/>
1797
- <xsl:template match="mn:fmt-source" mode="flatxml_step1">
1811
+ <!-- <xsl:template match="mn:fmt-source" /> -->
1812
+ <!-- <xsl:template match="mn:fmt-source" mode="flatxml_step1">
1798
1813
  <xsl:element name="source" namespace="{$namespace_full}">
1799
1814
  <xsl:copy-of select="@*"/>
1800
1815
  <xsl:apply-templates mode="flatxml_step1"/>
1801
1816
  </xsl:element>
1802
- </xsl:template>
1817
+ </xsl:template> -->
1803
1818
 
1804
1819
  <xsl:template name="setCrossAlignAttributes">
1805
1820
  <xsl:variable name="is_cross_aligned">
@@ -1897,7 +1912,7 @@
1897
1912
  <xsl:if test="self::mn:clause">
1898
1913
  <xsl:copy-of select="@keep-with-next"/>
1899
1914
  </xsl:if>
1900
- <xsl:if test="self::mn:title">
1915
+ <xsl:if test="self::mn:fmt-title">
1901
1916
  <xsl:copy-of select="@keep-with-next"/>
1902
1917
  </xsl:if>
1903
1918
  <xsl:copy-of select="@multilingual-rendering"/>
@@ -2086,10 +2101,6 @@
2086
2101
  <title-part lang="ru">
2087
2102
  </title-part>
2088
2103
  <title-part lang="zh">第 # 部分:</title-part>
2089
-
2090
- <title-subpart lang="en">Sub-part #</title-subpart>
2091
- <title-subpart lang="fr">Partie de sub #</title-subpart>
2092
-
2093
2104
  </xsl:variable>
2094
2105
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
2095
2106
 
@@ -2542,7 +2553,8 @@
2542
2553
  <xsl:template match="mn:stem" mode="update_xml_step1"/>
2543
2554
 
2544
2555
  <xsl:template match="mn:fmt-stem" mode="update_xml_step1">
2545
- <xsl:element name="stem" namespace="{$namespace_full}">
2556
+ <!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
2557
+ <xsl:copy>
2546
2558
  <xsl:copy-of select="@*"/>
2547
2559
  <xsl:choose>
2548
2560
  <xsl:when test="mn:semx and count(node()) = 1">
@@ -2566,7 +2578,8 @@
2566
2578
  </xsl:choose>
2567
2579
  </xsl:otherwise>
2568
2580
  </xsl:choose>
2569
- </xsl:element>
2581
+ </xsl:copy>
2582
+ <!-- </xsl:element> -->
2570
2583
  </xsl:template>
2571
2584
 
2572
2585
  <xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
@@ -2728,12 +2741,14 @@
2728
2741
  </xsl:template>
2729
2742
 
2730
2743
  <xsl:template match="mn:fmt-title" mode="update_xml_step1">
2731
- <xsl:element name="title" namespace="{$namespace_full}">
2744
+ <!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
2745
+ <xsl:copy>
2732
2746
  <xsl:copy-of select="@*"/>
2733
2747
  <xsl:call-template name="addNamedDestinationAttribute"/>
2734
2748
 
2735
2749
  <xsl:apply-templates mode="update_xml_step1"/>
2736
- </xsl:element>
2750
+ </xsl:copy>
2751
+ <!-- </xsl:element> -->
2737
2752
  </xsl:template>
2738
2753
 
2739
2754
  <xsl:template name="addNamedDestinationAttribute">
@@ -2745,12 +2760,14 @@
2745
2760
  <xsl:apply-templates mode="update_xml_step1"/>
2746
2761
  </xsl:when>
2747
2762
  <xsl:otherwise>
2748
- <xsl:element name="name" namespace="{$namespace_full}">
2763
+ <!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
2764
+ <xsl:copy>
2749
2765
  <xsl:copy-of select="@*"/>
2750
2766
  <xsl:call-template name="addNamedDestinationAttribute"/>
2751
2767
 
2752
2768
  <xsl:apply-templates mode="update_xml_step1"/>
2753
- </xsl:element>
2769
+ </xsl:copy>
2770
+ <!-- </xsl:element> -->
2754
2771
  </xsl:otherwise>
2755
2772
  </xsl:choose>
2756
2773
  </xsl:template>
@@ -2765,7 +2782,7 @@
2765
2782
  <xsl:apply-templates mode="update_xml_step1"/>
2766
2783
  </xsl:template>
2767
2784
  <xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="update_xml_step1">
2768
- <xsl:element name="preferred" namespace="{$namespace_full}">
2785
+ <xsl:element name="fmt-preferred" namespace="{$namespace_full}">
2769
2786
  <xsl:copy-of select="@*"/>
2770
2787
  <xsl:apply-templates mode="update_xml_step1"/>
2771
2788
  </xsl:element>
@@ -2775,7 +2792,7 @@
2775
2792
  <xsl:apply-templates mode="update_xml_step1"/>
2776
2793
  </xsl:template>
2777
2794
  <xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="update_xml_step1">
2778
- <xsl:element name="admitted" namespace="{$namespace_full}">
2795
+ <xsl:element name="fmt-admitted" namespace="{$namespace_full}">
2779
2796
  <xsl:copy-of select="@*"/>
2780
2797
  <xsl:apply-templates mode="update_xml_step1"/>
2781
2798
  </xsl:element>
@@ -2785,32 +2802,32 @@
2785
2802
  <xsl:apply-templates mode="update_xml_step1"/>
2786
2803
  </xsl:template>
2787
2804
  <xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="update_xml_step1">
2788
- <xsl:element name="deprecates" namespace="{$namespace_full}">
2805
+ <xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
2789
2806
  <xsl:copy-of select="@*"/>
2790
2807
  <xsl:apply-templates mode="update_xml_step1"/>
2791
2808
  </xsl:element>
2792
2809
  </xsl:template>
2793
2810
 
2794
- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
2811
+ <!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
2795
2812
  <xsl:element name="definition" namespace="{$namespace_full}">
2796
2813
  <xsl:copy-of select="@*"/>
2797
2814
  <xsl:apply-templates mode="update_xml_step1"/>
2798
2815
  </xsl:element>
2799
2816
  </xsl:template>
2800
-
2817
+
2801
2818
  <xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
2802
2819
  <xsl:element name="termsource" namespace="{$namespace_full}">
2803
2820
  <xsl:copy-of select="@*"/>
2804
2821
  <xsl:apply-templates mode="update_xml_step1"/>
2805
2822
  </xsl:element>
2806
2823
  </xsl:template>
2807
-
2824
+
2808
2825
  <xsl:template match="mn:fmt-source" mode="update_xml_step1">
2809
2826
  <xsl:element name="source" namespace="{$namespace_full}">
2810
2827
  <xsl:copy-of select="@*"/>
2811
2828
  <xsl:apply-templates mode="update_xml_step1"/>
2812
2829
  </xsl:element>
2813
- </xsl:template>
2830
+ </xsl:template> -->
2814
2831
 
2815
2832
  <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">
2816
2833
  <xsl:apply-templates mode="update_xml_step1"/>
@@ -2833,12 +2850,12 @@
2833
2850
  </xsl:template>
2834
2851
 
2835
2852
  <xsl:template match="mn:identifier" mode="update_xml_step1"/>
2836
- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
2853
+ <!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
2837
2854
  <xsl:element name="identifier" namespace="{$namespace_full}">
2838
2855
  <xsl:copy-of select="@*"/>
2839
2856
  <xsl:apply-templates mode="update_xml_step1"/>
2840
2857
  </xsl:element>
2841
- </xsl:template>
2858
+ </xsl:template> -->
2842
2859
 
2843
2860
  <xsl:template match="mn:concept" mode="update_xml_step1"/>
2844
2861
 
@@ -2848,51 +2865,53 @@
2848
2865
 
2849
2866
  <xsl:template match="mn:eref" mode="update_xml_step1"/>
2850
2867
 
2851
- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
2868
+ <!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
2852
2869
  <xsl:element name="eref" namespace="{$namespace_full}">
2853
2870
  <xsl:copy-of select="@*"/>
2854
2871
  <xsl:apply-templates mode="update_xml_step1"/>
2855
2872
  </xsl:element>
2856
- </xsl:template>
2873
+ </xsl:template> -->
2857
2874
 
2858
2875
  <xsl:template match="mn:xref" mode="update_xml_step1"/>
2859
2876
 
2860
- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
2877
+ <!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
2861
2878
  <xsl:element name="xref" namespace="{$namespace_full}">
2862
2879
  <xsl:copy-of select="@*"/>
2863
2880
  <xsl:apply-templates mode="update_xml_step1"/>
2864
2881
  </xsl:element>
2865
- </xsl:template>
2882
+ </xsl:template> -->
2866
2883
 
2867
2884
  <xsl:template match="mn:link" mode="update_xml_step1"/>
2868
2885
 
2869
- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
2886
+ <!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
2870
2887
  <xsl:element name="link" namespace="{$namespace_full}">
2871
2888
  <xsl:copy-of select="@*"/>
2872
2889
  <xsl:apply-templates mode="update_xml_step1"/>
2873
2890
  </xsl:element>
2874
- </xsl:template>
2891
+ </xsl:template> -->
2875
2892
 
2876
2893
  <xsl:template match="mn:origin" mode="update_xml_step1"/>
2877
2894
 
2878
- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
2895
+ <!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
2879
2896
  <xsl:element name="origin" namespace="{$namespace_full}">
2880
2897
  <xsl:copy-of select="@*"/>
2881
2898
  <xsl:apply-templates mode="update_xml_step1"/>
2882
2899
  </xsl:element>
2883
- </xsl:template>
2900
+ </xsl:template> -->
2884
2901
 
2885
2902
  <xsl:template match="mn:erefstack" mode="update_xml_step1"/>
2886
2903
 
2887
2904
  <xsl:template match="mn:svgmap" mode="update_xml_step1"/>
2888
2905
 
2889
- <xsl:template match="mn:review-container" mode="update_xml_step1"/>
2906
+ <xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
2890
2907
 
2891
- <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
2892
- <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
2893
- <xsl:value-of select="."/>
2894
- </xsl:element>
2895
- </xsl:template>
2908
+ <xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
2909
+ <xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
2910
+ <xsl:value-of select="."/>
2911
+ </xsl:element>
2912
+ </xsl:template>
2913
+
2914
+ <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
2896
2915
 
2897
2916
  <!-- END: update new Presentation XML -->
2898
2917
 
@@ -3088,7 +3107,7 @@
3088
3107
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
3089
3108
  <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>
3090
3109
 
3091
- <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">
3110
+ <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">
3092
3111
 
3093
3112
  <xsl:variable name="parent" select="local-name(..)"/>
3094
3113
 
@@ -3207,7 +3226,7 @@
3207
3226
  </xsl:if>
3208
3227
  </xsl:template>
3209
3228
 
3210
- <xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
3229
+ <xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
3211
3230
  <xsl:copy-of select="."/>
3212
3231
  </xsl:template>
3213
3232
 
@@ -3534,7 +3553,7 @@
3534
3553
  </fo:block>
3535
3554
  </xsl:template> <!-- copyright-statement -->
3536
3555
 
3537
- <xsl:template match="mn:copyright-statement//mn:title">
3556
+ <xsl:template match="mn:copyright-statement//mn:fmt-title">
3538
3557
  <!-- process in the template 'title' -->
3539
3558
  <xsl:call-template name="title"/>
3540
3559
  </xsl:template> <!-- copyright-statement//title -->
@@ -3550,7 +3569,7 @@
3550
3569
  </fo:block>
3551
3570
  </xsl:template> <!-- license-statement -->
3552
3571
 
3553
- <xsl:template match="mn:license-statement//mn:title">
3572
+ <xsl:template match="mn:license-statement//mn:fmt-title">
3554
3573
  <!-- process in the template 'title' -->
3555
3574
  <xsl:call-template name="title"/>
3556
3575
  </xsl:template> <!-- license-statement/title -->
@@ -3567,7 +3586,7 @@
3567
3586
  </fo:block>
3568
3587
  </xsl:template> <!-- legal-statement -->
3569
3588
 
3570
- <xsl:template match="mn:legal-statement//mn:title">
3589
+ <xsl:template match="mn:legal-statement//mn:fmt-title">
3571
3590
  <!-- process in the template 'title' -->
3572
3591
  <xsl:call-template name="title"/>
3573
3592
 
@@ -3587,7 +3606,7 @@
3587
3606
  </fo:block>
3588
3607
  </xsl:template> <!-- feedback-statement -->
3589
3608
 
3590
- <xsl:template match="mn:feedback-statement//mn:title">
3609
+ <xsl:template match="mn:feedback-statement//mn:fmt-title">
3591
3610
  <!-- process in the template 'title' -->
3592
3611
  <xsl:call-template name="title"/>
3593
3612
  </xsl:template>
@@ -3612,7 +3631,7 @@
3612
3631
  <xsl:template name="refine_link-style">
3613
3632
  </xsl:template> <!-- refine_link-style -->
3614
3633
 
3615
- <xsl:template match="mn:link" name="link">
3634
+ <xsl:template match="mn:fmt-link" name="link">
3616
3635
  <xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
3617
3636
  <xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
3618
3637
  <xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
@@ -3832,7 +3851,7 @@
3832
3851
  <xsl:value-of select="."/>
3833
3852
  </xsl:attribute>
3834
3853
  </xsl:for-each>
3835
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
3854
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
3836
3855
  </xsl:when>
3837
3856
 
3838
3857
  <xsl:otherwise>
@@ -3874,11 +3893,11 @@
3874
3893
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3875
3894
  </xsl:if>
3876
3895
 
3877
- <xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
3896
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
3878
3897
  </fo:block>
3879
3898
 
3880
3899
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
3881
- <xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name AFTER content -->
3900
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
3882
3901
 
3883
3902
  </fo:block-container>
3884
3903
  </fo:block-container>
@@ -4179,7 +4198,7 @@
4179
4198
 
4180
4199
  <!-- end mode="syntax_highlight" -->
4181
4200
 
4182
- <xsl:template match="mn:sourcecode/mn:name">
4201
+ <xsl:template match="mn:sourcecode/mn:fmt-name">
4183
4202
  <xsl:if test="normalize-space() != ''">
4184
4203
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4185
4204
  <xsl:apply-templates/>
@@ -4197,7 +4216,7 @@
4197
4216
  </xsl:choose>
4198
4217
  </xsl:template>
4199
4218
 
4200
- <xsl:template match="mn:annotation">
4219
+ <xsl:template match="mn:callout-annotation">
4201
4220
  <xsl:variable name="annotation-id" select="@id"/>
4202
4221
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
4203
4222
  <fo:block id="{$annotation-id}" white-space="nowrap">
@@ -4209,7 +4228,7 @@
4209
4228
  </fo:block>
4210
4229
  </xsl:template>
4211
4230
 
4212
- <xsl:template match="mn:annotation/mn:p">
4231
+ <xsl:template match="mn:callout-annotation/mn:p">
4213
4232
  <xsl:param name="callout"/>
4214
4233
  <fo:inline id="{@id}">
4215
4234
  <xsl:call-template name="setNamedDestination"/>
@@ -4361,7 +4380,7 @@
4361
4380
  <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
4362
4381
  <change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
4363
4382
  <xsl:choose>
4364
- <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>
4383
+ <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>
4365
4384
  <xsl:otherwise>
4366
4385
  <xsl:variable name="tag">
4367
4386
  <xsl:call-template name="insertTag">
@@ -4762,12 +4781,12 @@
4762
4781
  <xsl:template match="mn:permission">
4763
4782
  <xsl:call-template name="setNamedDestination"/>
4764
4783
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
4765
- <xsl:apply-templates select="mn:name"/>
4766
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4784
+ <xsl:apply-templates select="mn:fmt-name"/>
4785
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4767
4786
  </fo:block>
4768
4787
  </xsl:template>
4769
4788
 
4770
- <xsl:template match="mn:permission/mn:name">
4789
+ <xsl:template match="mn:permission/mn:fmt-name">
4771
4790
  <xsl:if test="normalize-space() != ''">
4772
4791
  <fo:block xsl:use-attribute-sets="permission-name-style">
4773
4792
  <xsl:apply-templates/>
@@ -4789,15 +4808,15 @@
4789
4808
  <xsl:template match="mn:requirement">
4790
4809
  <xsl:call-template name="setNamedDestination"/>
4791
4810
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
4792
- <xsl:apply-templates select="mn:name"/>
4811
+ <xsl:apply-templates select="mn:fmt-name"/>
4793
4812
  <xsl:apply-templates select="mn:label"/>
4794
4813
  <xsl:apply-templates select="@obligation"/>
4795
4814
  <xsl:apply-templates select="mn:subject"/>
4796
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:label) and not(self::mn:subject)]"/>
4815
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
4797
4816
  </fo:block>
4798
4817
  </xsl:template>
4799
4818
 
4800
- <xsl:template match="mn:requirement/mn:name">
4819
+ <xsl:template match="mn:requirement/mn:fmt-name">
4801
4820
  <xsl:if test="normalize-space() != ''">
4802
4821
 
4803
4822
  <fo:block xsl:use-attribute-sets="requirement-name-style">
@@ -4833,12 +4852,12 @@
4833
4852
  <xsl:template match="mn:recommendation">
4834
4853
  <xsl:call-template name="setNamedDestination"/>
4835
4854
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
4836
- <xsl:apply-templates select="mn:name"/>
4837
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
4855
+ <xsl:apply-templates select="mn:fmt-name"/>
4856
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
4838
4857
  </fo:block>
4839
4858
  </xsl:template>
4840
4859
 
4841
- <xsl:template match="mn:recommendation/mn:name">
4860
+ <xsl:template match="mn:recommendation/mn:fmt-name">
4842
4861
  <xsl:if test="normalize-space() != ''">
4843
4862
 
4844
4863
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
@@ -5092,11 +5111,11 @@
5092
5111
 
5093
5112
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
5094
5113
  </xsl:if>
5095
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5114
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5096
5115
  </fo:block>
5097
5116
  </xsl:template>
5098
5117
 
5099
- <xsl:template match="mn:term/mn:name">
5118
+ <xsl:template match="mn:term/mn:fmt-name">
5100
5119
  <xsl:if test="normalize-space() != ''">
5101
5120
  <!-- <xsl:variable name="level">
5102
5121
  <xsl:call-template name="getLevelTermName"/>
@@ -5115,7 +5134,7 @@
5115
5134
  <!-- origin -->
5116
5135
  <!-- modification -->
5117
5136
  <!-- ====== -->
5118
- <xsl:template match="mn:termsource" name="termsource">
5137
+ <xsl:template match="mn:fmt-termsource" name="termsource">
5119
5138
  <fo:block xsl:use-attribute-sets="termsource-style">
5120
5139
 
5121
5140
  <xsl:call-template name="refine_termsource-style"/>
@@ -5154,24 +5173,24 @@
5154
5173
  </fo:block>
5155
5174
  </xsl:template>
5156
5175
 
5157
- <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">
5176
+ <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">
5158
5177
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
5159
5178
  </xsl:template>
5160
5179
 
5161
- <xsl:template match="mn:termsource/text()">
5180
+ <xsl:template match="mn:fmt-termsource/text()">
5162
5181
  <xsl:if test="normalize-space() != ''">
5163
5182
  <xsl:value-of select="."/>
5164
5183
  </xsl:if>
5165
5184
  </xsl:template>
5166
5185
 
5167
5186
  <!-- text SOURCE: -->
5168
- <xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
5187
+ <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
5169
5188
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
5170
5189
  <xsl:value-of select="."/>
5171
5190
  </fo:inline>
5172
5191
  </xsl:template>
5173
5192
 
5174
- <xsl:template match="mn:origin">
5193
+ <xsl:template match="mn:fmt-origin">
5175
5194
  <xsl:call-template name="insert_basic_link">
5176
5195
  <xsl:with-param name="element">
5177
5196
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -5217,7 +5236,7 @@
5217
5236
  <!-- ====== -->
5218
5237
 
5219
5238
  <!-- Preferred, admitted, deprecated -->
5220
- <xsl:template match="mn:preferred">
5239
+ <xsl:template match="mn:fmt-preferred">
5221
5240
  <xsl:variable name="level">
5222
5241
  <xsl:call-template name="getLevel"/>
5223
5242
  </xsl:variable>
@@ -5228,15 +5247,15 @@
5228
5247
  </xsl:variable>
5229
5248
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
5230
5249
 
5231
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
5250
+ <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
5232
5251
 
5233
5252
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
5234
5253
 
5235
- <xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
5254
+ <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
5236
5255
  <xsl:call-template name="setIDforNamedDestination"/>
5237
5256
  </xsl:for-each>
5238
5257
 
5239
- <xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
5258
+ <xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
5240
5259
  </fo:block>
5241
5260
  </xsl:if>
5242
5261
 
@@ -5260,13 +5279,13 @@
5260
5279
  <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
5261
5280
  <xsl:template match="mn:domain"/>
5262
5281
 
5263
- <xsl:template match="mn:admitted">
5282
+ <xsl:template match="mn:fmt-admitted">
5264
5283
  <fo:block xsl:use-attribute-sets="admitted-style">
5265
5284
  <xsl:apply-templates/>
5266
5285
  </fo:block>
5267
5286
  </xsl:template>
5268
5287
 
5269
- <xsl:template match="mn:deprecates">
5288
+ <xsl:template match="mn:fmt-deprecates">
5270
5289
  <fo:block xsl:use-attribute-sets="deprecates-style">
5271
5290
  <xsl:apply-templates/>
5272
5291
  </fo:block>
@@ -5280,7 +5299,7 @@
5280
5299
 
5281
5300
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
5282
5301
  <!-- in metanorma xml preferred terms delimited by semicolons -->
5283
- <xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
5302
+ <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
5284
5303
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
5285
5304
  </xsl:template>
5286
5305
  <!-- End Preferred, admitted, deprecated -->
@@ -5299,16 +5318,16 @@
5299
5318
  <!-- ========== -->
5300
5319
  <!-- definition -->
5301
5320
  <!-- ========== -->
5302
- <xsl:template match="mn:definition">
5321
+ <xsl:template match="mn:fmt-definition">
5303
5322
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
5304
5323
  <xsl:apply-templates/>
5305
5324
  </fo:block>
5306
5325
  </xsl:template>
5307
5326
 
5308
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]">
5327
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
5309
5328
  <xsl:apply-templates/>
5310
5329
  </xsl:template>
5311
- <xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
5330
+ <xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
5312
5331
  <fo:inline> <xsl:apply-templates/></fo:inline>
5313
5332
  <fo:block/>
5314
5333
  </xsl:template>
@@ -5378,12 +5397,12 @@
5378
5397
  <xsl:call-template name="refine_termexample-style"/>
5379
5398
  <xsl:call-template name="setBlockSpanAll"/>
5380
5399
 
5381
- <xsl:apply-templates select="mn:name"/>
5382
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
5400
+ <xsl:apply-templates select="mn:fmt-name"/>
5401
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
5383
5402
  </fo:block>
5384
5403
  </xsl:template>
5385
5404
 
5386
- <xsl:template match="mn:termexample/mn:name">
5405
+ <xsl:template match="mn:termexample/mn:fmt-name">
5387
5406
  <xsl:if test="normalize-space() != ''">
5388
5407
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
5389
5408
  <xsl:call-template name="refine_termexample-name-style"/>
@@ -5434,7 +5453,7 @@
5434
5453
  <xsl:call-template name="refine_example-style"/>
5435
5454
 
5436
5455
  <xsl:variable name="fo_element">
5437
- <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:name)][1][self::mn:sourcecode]">block</xsl:if>inline
5456
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>inline
5438
5457
  </xsl:variable>
5439
5458
 
5440
5459
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -5445,7 +5464,7 @@
5445
5464
 
5446
5465
  <!-- display name 'EXAMPLE' in a separate block -->
5447
5466
  <fo:block>
5448
- <xsl:apply-templates select="mn:name">
5467
+ <xsl:apply-templates select="mn:fmt-name">
5449
5468
  <xsl:with-param name="fo_element" select="$fo_element"/>
5450
5469
  </xsl:apply-templates>
5451
5470
  </fo:block>
@@ -5453,7 +5472,7 @@
5453
5472
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
5454
5473
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
5455
5474
  <xsl:variable name="example_body">
5456
- <xsl:apply-templates select="node()[not(self::mn:name)]">
5475
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
5457
5476
  <xsl:with-param name="fo_element" select="$fo_element"/>
5458
5477
  </xsl:apply-templates>
5459
5478
  </xsl:variable>
@@ -5480,14 +5499,14 @@
5480
5499
  <fo:list-item>
5481
5500
  <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
5482
5501
  <fo:block>
5483
- <xsl:apply-templates select="mn:name">
5502
+ <xsl:apply-templates select="mn:fmt-name">
5484
5503
  <xsl:with-param name="fo_element">block</xsl:with-param>
5485
5504
  </xsl:apply-templates>
5486
5505
  </fo:block>
5487
5506
  </fo:list-item-label>
5488
5507
  <fo:list-item-body start-indent="body-start()">
5489
5508
  <fo:block>
5490
- <xsl:apply-templates select="node()[not(self::mn:name)]">
5509
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
5491
5510
  <xsl:with-param name="fo_element" select="$fo_element"/>
5492
5511
  </xsl:apply-templates>
5493
5512
  </fo:block>
@@ -5500,21 +5519,21 @@
5500
5519
 
5501
5520
  <!-- display 'EXAMPLE' and first element in the same line -->
5502
5521
  <fo:block>
5503
- <xsl:apply-templates select="mn:name">
5522
+ <xsl:apply-templates select="mn:fmt-name">
5504
5523
  <xsl:with-param name="fo_element" select="$fo_element"/>
5505
5524
  </xsl:apply-templates>
5506
5525
  <fo:inline>
5507
- <xsl:apply-templates select="*[not(self::mn:name)][1]">
5526
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
5508
5527
  <xsl:with-param name="fo_element" select="$fo_element"/>
5509
5528
  </xsl:apply-templates>
5510
5529
  </fo:inline>
5511
5530
  </fo:block>
5512
5531
 
5513
- <xsl:if test="*[not(self::mn:name)][position() &gt; 1]">
5532
+ <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
5514
5533
  <!-- display further elements in blocks -->
5515
5534
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
5516
5535
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
5517
- <xsl:apply-templates select="*[not(self::mn:name)][position() &gt; 1]">
5536
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
5518
5537
  <xsl:with-param name="fo_element" select="'block'"/>
5519
5538
  </xsl:apply-templates>
5520
5539
  </fo:block-container>
@@ -5528,7 +5547,7 @@
5528
5547
  </xsl:template>
5529
5548
 
5530
5549
  <!-- example/name -->
5531
- <xsl:template match="mn:example/mn:name">
5550
+ <xsl:template match="mn:example/mn:fmt-name">
5532
5551
  <xsl:param name="fo_element">block</xsl:param>
5533
5552
 
5534
5553
  <xsl:choose>
@@ -5553,7 +5572,7 @@
5553
5572
  </xsl:template>
5554
5573
 
5555
5574
  <!-- table/example/name, table/tfoot//example/name -->
5556
- <xsl:template match="mn:table/mn:example/mn:name | mn:table/mn:tfoot//mn:example/mn:name">
5575
+ <xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
5557
5576
  <fo:inline xsl:use-attribute-sets="example-name-style">
5558
5577
  <xsl:apply-templates/>
5559
5578
  </fo:inline>
@@ -5734,7 +5753,7 @@
5734
5753
  </xsl:if>
5735
5754
 
5736
5755
  <xsl:call-template name="setBordersTableArray"/>
5737
- <xsl:if test="count(*) = 1 and (local-name(*[1]) = 'stem' or local-name(*[1]) = 'figure')">
5756
+ <xsl:if test="count(*) = 1 and (*[1][self::mn:fmt-stem] or *[1][self::mn:figure])">
5738
5757
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
5739
5758
  </xsl:if>
5740
5759
  <xsl:if test="ancestor::mn:tfoot">
@@ -5895,7 +5914,7 @@
5895
5914
 
5896
5915
  <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
5897
5916
 
5898
- <xsl:for-each select="mn:name">
5917
+ <xsl:for-each select="mn:fmt-name">
5899
5918
  <xsl:call-template name="setIDforNamedDestination"/>
5900
5919
  </xsl:for-each>
5901
5920
 
@@ -5925,6 +5944,10 @@
5925
5944
  <xsl:with-param name="margin-side" select="$margin-side"/>
5926
5945
  </xsl:call-template>
5927
5946
 
5947
+ <xsl:call-template name="setTableStyles">
5948
+ <xsl:with-param name="scope">table</xsl:with-param>
5949
+ </xsl:call-template>
5950
+
5928
5951
  </xsl:element>
5929
5952
  </xsl:variable>
5930
5953
 
@@ -5945,7 +5968,7 @@
5945
5968
  </xsl:attribute>
5946
5969
  </xsl:for-each>
5947
5970
 
5948
- <xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[local-name(..) != 'name'] or ./mn:source"/>
5971
+ <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"/>
5949
5972
  <xsl:if test="$isNoteOrFnExist = 'true'">
5950
5973
  <!-- <xsl:choose>
5951
5974
  <xsl:when test="$namespace = 'plateau'"></xsl:when>
@@ -6001,7 +6024,7 @@
6001
6024
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
6002
6025
  </xsl:when>
6003
6026
  <xsl:otherwise>
6004
- <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 -->
6027
+ <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 -->
6005
6028
  </xsl:otherwise>
6006
6029
  </xsl:choose>
6007
6030
 
@@ -6098,7 +6121,7 @@
6098
6121
  </xsl:template>
6099
6122
 
6100
6123
  <!-- table/name-->
6101
- <xsl:template match="*[local-name()='table']/mn:name">
6124
+ <xsl:template match="*[local-name()='table']/mn:fmt-name">
6102
6125
  <xsl:param name="continued"/>
6103
6126
  <xsl:param name="cols-count"/>
6104
6127
  <xsl:if test="normalize-space() != ''">
@@ -6164,7 +6187,7 @@
6164
6187
  </xsl:template>
6165
6188
 
6166
6189
  <!-- SOURCE: ... -->
6167
- <xsl:template match="*[local-name()='table']/mn:source" priority="2">
6190
+ <xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
6168
6191
  <xsl:call-template name="termsource"/>
6169
6192
  </xsl:template>
6170
6193
 
@@ -6329,11 +6352,11 @@
6329
6352
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
6330
6353
  </xsl:template>
6331
6354
 
6332
- <xsl:template match="mn:termsource" mode="td_text">
6333
- <xsl:value-of select="*[local-name()='origin']/@citeas"/>
6355
+ <xsl:template match="mn:fmt-termsource" mode="td_text">
6356
+ <xsl:value-of select="mn:fmt-origin/@citeas"/>
6334
6357
  </xsl:template>
6335
6358
 
6336
- <xsl:template match="mn:link" mode="td_text">
6359
+ <xsl:template match="mn:fmt-link" mode="td_text">
6337
6360
  <xsl:value-of select="@target"/>
6338
6361
  </xsl:template>
6339
6362
 
@@ -6538,12 +6561,12 @@
6538
6561
 
6539
6562
  <xsl:call-template name="refine_table-header-title-style"/>
6540
6563
 
6541
- <xsl:apply-templates select="ancestor::mn:table/mn:name">
6564
+ <xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
6542
6565
  <xsl:with-param name="continued">true</xsl:with-param>
6543
6566
  <xsl:with-param name="cols-count" select="$cols-count"/>
6544
6567
  </xsl:apply-templates>
6545
6568
 
6546
- <xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
6569
+ <xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
6547
6570
  <fo:block role="SKIP"/>
6548
6571
  </xsl:if>
6549
6572
  <xsl:for-each select="ancestor::*[local-name()='table'][1]">
@@ -6586,7 +6609,7 @@
6586
6609
  <xsl:param name="colwidths"/>
6587
6610
  <xsl:param name="colgroup"/>
6588
6611
 
6589
- <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"/>
6612
+ <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"/>
6590
6613
 
6591
6614
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
6592
6615
  </xsl:variable>
@@ -6627,6 +6650,12 @@
6627
6650
  </xsl:choose>
6628
6651
  </xsl:for-each>
6629
6652
 
6653
+ <xsl:for-each select="ancestor::mn:table[1]">
6654
+ <xsl:call-template name="setTableStyles">
6655
+ <xsl:with-param name="scope">table</xsl:with-param>
6656
+ </xsl:call-template>
6657
+ </xsl:for-each>
6658
+
6630
6659
  <xsl:choose>
6631
6660
  <xsl:when test="xalan:nodeset($colgroup)//mn:col">
6632
6661
  <xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
@@ -6643,10 +6672,22 @@
6643
6672
 
6644
6673
  <fo:table-body role="SKIP">
6645
6674
  <fo:table-row role="SKIP">
6675
+ <xsl:for-each select="ancestor::mn:table[1]">
6676
+ <xsl:call-template name="setTableStyles">
6677
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
6678
+ </xsl:call-template>
6679
+ </xsl:for-each>
6680
+
6646
6681
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
6647
6682
 
6648
6683
  <xsl:call-template name="refine_table-footer-cell-style"/>
6649
6684
 
6685
+ <xsl:for-each select="ancestor::mn:table[1]">
6686
+ <xsl:call-template name="setTableStyles">
6687
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
6688
+ </xsl:call-template>
6689
+ </xsl:for-each>
6690
+
6650
6691
  <xsl:call-template name="setBordersTableArray"/>
6651
6692
 
6652
6693
  <!-- fn will be processed inside 'note' processing -->
@@ -6654,7 +6695,7 @@
6654
6695
  <xsl:apply-templates select="../mn:dl"/>
6655
6696
  <xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
6656
6697
  <xsl:apply-templates select="../mn:example"/>
6657
- <xsl:apply-templates select="../mn:source"/>
6698
+ <xsl:apply-templates select="../mn:fmt-source"/>
6658
6699
 
6659
6700
  <xsl:variable name="isDisplayRowSeparator">
6660
6701
  </xsl:variable>
@@ -6704,7 +6745,7 @@
6704
6745
  </xsl:choose>
6705
6746
  </xsl:variable>
6706
6747
  <!-- if there isn't 'thead' and there is a table's title -->
6707
- <xsl:if test="not(ancestor::mn:table/mn:thead) and ancestor::mn:table/mn:name">
6748
+ <xsl:if test="not(ancestor::mn:table/mn:thead) and ancestor::mn:table/mn:fmt-name">
6708
6749
  <fo:table-header>
6709
6750
  <xsl:attribute name="role">Caption</xsl:attribute>
6710
6751
  <xsl:call-template name="table-header-title">
@@ -6732,7 +6773,7 @@
6732
6773
  <xsl:variable name="title_continued"><xsl:value-of select="$title_continued_in_parenthesis"/>
6733
6774
  </xsl:variable>
6734
6775
 
6735
- <xsl:variable name="title_start" select="ancestor::mn:table[1]/mn:name/node()[1][self::text()]"/>
6776
+ <xsl:variable name="title_start" select="ancestor::mn:table[1]/mn:fmt-name/node()[1][self::text()]"/>
6736
6777
  <xsl:variable name="table_number" select="substring-before($title_start, '—')"/>
6737
6778
 
6738
6779
  <fo:table-row height="0" keep-with-next.within-page="always" role="SKIP">
@@ -6880,7 +6921,12 @@
6880
6921
 
6881
6922
  <xsl:template name="setTableRowAttributes">
6882
6923
 
6883
- <xsl:call-template name="setColors"/>
6924
+ <xsl:for-each select="ancestor::mn:table[1]">
6925
+ <xsl:call-template name="setTableStyles">
6926
+ <xsl:with-param name="scope">ancestor_table</xsl:with-param>
6927
+ </xsl:call-template>
6928
+ </xsl:for-each>
6929
+ <xsl:call-template name="setTableStyles"/>
6884
6930
 
6885
6931
  </xsl:template> <!-- setTableRowAttributes -->
6886
6932
  <!-- ===================== -->
@@ -6933,7 +6979,13 @@
6933
6979
  </xsl:attribute>
6934
6980
  </xsl:if>
6935
6981
  <xsl:call-template name="display-align"/>
6936
- <xsl:call-template name="setColors"/>
6982
+
6983
+ <xsl:for-each select="ancestor::mn:table[1]">
6984
+ <xsl:call-template name="setTableStyles">
6985
+ <xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
6986
+ </xsl:call-template>
6987
+ </xsl:for-each>
6988
+ <xsl:call-template name="setTableStyles"/>
6937
6989
  </xsl:template>
6938
6990
 
6939
6991
  <xsl:template name="display-align">
@@ -6949,7 +7001,8 @@
6949
7001
  </xsl:if>
6950
7002
  </xsl:template>
6951
7003
 
6952
- <xsl:template name="setColors">
7004
+ <xsl:template name="setTableStyles">
7005
+ <xsl:param name="scope">cell</xsl:param>
6953
7006
  <xsl:variable name="styles__">
6954
7007
  <xsl:call-template name="split">
6955
7008
  <xsl:with-param name="pText" select="concat(@style,';')"/>
@@ -6961,16 +7014,22 @@
6961
7014
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
6962
7015
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
6963
7016
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
6964
- <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'">
7017
+ <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'">
6965
7018
  <style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
6966
7019
  </xsl:if>
7020
+ <xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
7021
+ <style name="{$key}-top"><xsl:value-of select="$value"/></style>
7022
+ <style name="{$key}-right"><xsl:value-of select="$value"/></style>
7023
+ <style name="{$key}-left"><xsl:value-of select="$value"/></style>
7024
+ <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
7025
+ </xsl:if>
6967
7026
  </xsl:for-each>
6968
7027
  </xsl:variable>
6969
7028
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
6970
7029
  <xsl:for-each select="$styles/style">
6971
7030
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
6972
7031
  </xsl:for-each>
6973
- </xsl:template> <!-- setColors -->
7032
+ </xsl:template> <!-- setTableStyles -->
6974
7033
 
6975
7034
  <!-- cell in table body, footer -->
6976
7035
  <xsl:template match="*[local-name()='td']" name="td">
@@ -7034,11 +7093,11 @@
7034
7093
 
7035
7094
  <xsl:call-template name="refine_table-note-name-style"/>
7036
7095
 
7037
- <xsl:apply-templates select="mn:name"/>
7096
+ <xsl:apply-templates select="mn:fmt-name"/>
7038
7097
 
7039
7098
  </fo:inline>
7040
7099
 
7041
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
7100
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7042
7101
  </fo:block>
7043
7102
  </xsl:template> <!-- table/note -->
7044
7103
 
@@ -7177,7 +7236,7 @@
7177
7236
 
7178
7237
  <!-- footnotes for table's name rendering -->
7179
7238
  <xsl:template name="table_name_fn_display">
7180
- <xsl:for-each select="mn:name//mn:fn">
7239
+ <xsl:for-each select="mn:fmt-name//mn:fn">
7181
7240
  <xsl:variable name="reference" select="@reference"/>
7182
7241
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
7183
7242
  <fo:block margin-bottom="12pt">
@@ -7834,7 +7893,7 @@
7834
7893
  </xsl:if> -->
7835
7894
 
7836
7895
  <xsl:variable name="words">
7837
- <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
7896
+ <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
7838
7897
  <word>
7839
7898
  <xsl:copy-of select="."/>
7840
7899
  </word>
@@ -7893,7 +7952,7 @@
7893
7952
  </xsl:copy>
7894
7953
  </xsl:template>
7895
7954
 
7896
- <xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
7955
+ <xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
7897
7956
 
7898
7957
  <xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
7899
7958
  <xsl:variable name="formatting_tags">
@@ -7928,7 +7987,7 @@
7928
7987
  </xsl:call-template>
7929
7988
  </xsl:template>
7930
7989
 
7931
- <xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
7990
+ <xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
7932
7991
  <xsl:variable name="link">
7933
7992
  <link_updated>
7934
7993
  <xsl:variable name="target_text">
@@ -8144,7 +8203,7 @@
8144
8203
 
8145
8204
  <xsl:call-template name="refine_multicomponent_block_style"/>
8146
8205
 
8147
- <xsl:apply-templates select="mn:name">
8206
+ <xsl:apply-templates select="mn:fmt-name">
8148
8207
  <xsl:with-param name="process">true</xsl:with-param>
8149
8208
  </xsl:apply-templates>
8150
8209
 
@@ -8332,7 +8391,7 @@
8332
8391
  </xsl:template> <!-- refine_multicomponent_block_style -->
8333
8392
 
8334
8393
  <!-- dl/name -->
8335
- <xsl:template match="mn:dl/mn:name">
8394
+ <xsl:template match="mn:dl/mn:fmt-name">
8336
8395
  <xsl:param name="process">false</xsl:param>
8337
8396
  <xsl:if test="$process = 'true'">
8338
8397
  <fo:block xsl:use-attribute-sets="dl-name-style">
@@ -8750,12 +8809,12 @@
8750
8809
  <xsl:template match="mn:appendix">
8751
8810
  <xsl:call-template name="setNamedDestination"/>
8752
8811
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
8753
- <xsl:apply-templates select="mn:title"/>
8812
+ <xsl:apply-templates select="mn:fmt-title"/>
8754
8813
  </fo:block>
8755
- <xsl:apply-templates select="node()[not(local-name()='title')]"/>
8814
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
8756
8815
  </xsl:template>
8757
8816
 
8758
- <xsl:template match="mn:appendix/mn:title" priority="2">
8817
+ <xsl:template match="mn:appendix/mn:fmt-title" priority="2">
8759
8818
  <xsl:variable name="level">
8760
8819
  <xsl:call-template name="getLevel"/>
8761
8820
  </xsl:variable>
@@ -8768,9 +8827,9 @@
8768
8827
  <xsl:template match="mn:appendix//mn:example" priority="2">
8769
8828
  <xsl:call-template name="setNamedDestination"/>
8770
8829
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
8771
- <xsl:apply-templates select="mn:name"/>
8830
+ <xsl:apply-templates select="mn:fmt-name"/>
8772
8831
  </fo:block>
8773
- <xsl:apply-templates select="node()[not(local-name()='name')]"/>
8832
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8774
8833
  </xsl:template>
8775
8834
 
8776
8835
  <xsl:attribute-set name="xref-style">
@@ -8778,7 +8837,7 @@
8778
8837
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
8779
8838
  </xsl:attribute-set>
8780
8839
 
8781
- <xsl:template match="mn:xref">
8840
+ <xsl:template match="mn:fmt-xref">
8782
8841
  <xsl:call-template name="insert_basic_link">
8783
8842
  <xsl:with-param name="element">
8784
8843
  <xsl:variable name="alt_text">
@@ -8798,7 +8857,7 @@
8798
8857
  </xsl:template> <!-- xref -->
8799
8858
 
8800
8859
  <!-- command between two xref points to non-standard bibitem -->
8801
- <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="."/>
8860
+ <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="."/>
8802
8861
  </xsl:template>
8803
8862
 
8804
8863
  <xsl:attribute-set name="eref-style">
@@ -8829,7 +8888,7 @@
8829
8888
  <!-- ====== -->
8830
8889
  <!-- eref -->
8831
8890
  <!-- ====== -->
8832
- <xsl:template match="mn:eref" name="eref">
8891
+ <xsl:template match="mn:fmt-eref" name="eref">
8833
8892
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
8834
8893
  <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
8835
8894
  <xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
@@ -8969,28 +9028,28 @@
8969
9028
 
8970
9029
  <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8971
9030
 
8972
- <xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
9031
+ <xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
8973
9032
 
8974
9033
  <xsl:call-template name="refine_note-name-style"/>
8975
9034
 
8976
9035
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8977
9036
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8978
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9037
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
8979
9038
  <xsl:call-template name="append_add-style"/>
8980
9039
  </xsl:if>
8981
9040
 
8982
9041
  <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8983
- <xsl:if test="count(*[not(self::mn:name)]) = 1 and *[not(self::mn:name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
8984
- <xsl:apply-templates select="*[not(self::mn:name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
9042
+ <xsl:if test="count(*[not(self::mn:fmt-name)]) = 1 and *[not(self::mn:fmt-name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
9043
+ <xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
8985
9044
  <xsl:with-param name="skip">false</xsl:with-param>
8986
9045
  </xsl:apply-templates>
8987
9046
  </xsl:if>
8988
9047
 
8989
- <xsl:apply-templates select="mn:name"/>
9048
+ <xsl:apply-templates select="mn:fmt-name"/>
8990
9049
 
8991
9050
  </fo:inline>
8992
9051
 
8993
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
9052
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
8994
9053
  </fo:block>
8995
9054
  </fo:block-container>
8996
9055
  </fo:block-container>
@@ -9029,19 +9088,19 @@
9029
9088
 
9030
9089
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9031
9090
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9032
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9091
+ <xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
9033
9092
  <xsl:call-template name="append_add-style"/>
9034
9093
  </xsl:if>
9035
9094
 
9036
- <xsl:apply-templates select="mn:name"/>
9095
+ <xsl:apply-templates select="mn:fmt-name"/>
9037
9096
 
9038
9097
  </fo:inline>
9039
9098
 
9040
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
9099
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9041
9100
  </fo:block>
9042
9101
  </xsl:template>
9043
9102
 
9044
- <xsl:template match="mn:note/mn:name">
9103
+ <xsl:template match="mn:note/mn:fmt-name">
9045
9104
  <xsl:param name="sfx"/>
9046
9105
  <xsl:variable name="suffix">
9047
9106
  <xsl:choose>
@@ -9068,7 +9127,7 @@
9068
9127
  </xsl:if>
9069
9128
  </xsl:template>
9070
9129
 
9071
- <xsl:template match="mn:termnote/mn:name">
9130
+ <xsl:template match="mn:termnote/mn:fmt-name">
9072
9131
  <xsl:param name="sfx"/>
9073
9132
  <xsl:variable name="suffix">
9074
9133
  <xsl:choose>
@@ -9159,15 +9218,15 @@
9159
9218
 
9160
9219
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9161
9220
  <fo:block role="BlockQuote">
9162
- <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 -->
9221
+ <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 -->
9163
9222
  </fo:block>
9164
9223
  </fo:block-container>
9165
9224
  </fo:block-container>
9166
- <xsl:if test="mn:author or mn:source or mn:attribution">
9225
+ <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
9167
9226
  <fo:block xsl:use-attribute-sets="quote-source-style">
9168
9227
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
9169
9228
  <xsl:apply-templates select="mn:author"/>
9170
- <xsl:apply-templates select="mn:source"/>
9229
+ <xsl:apply-templates select="mn:fmt-source"/>
9171
9230
  <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
9172
9231
  <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
9173
9232
  </fo:block>
@@ -9177,17 +9236,32 @@
9177
9236
  </fo:block-container>
9178
9237
  </xsl:template>
9179
9238
 
9180
- <xsl:template match="mn:source">
9239
+ <xsl:template match="mn:fmt-source">
9181
9240
  <xsl:if test="../mn:author">
9182
9241
  <xsl:text>, </xsl:text>
9183
9242
  </xsl:if>
9184
- <xsl:call-template name="insert_basic_link">
9185
- <xsl:with-param name="element">
9186
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
9187
- <xsl:apply-templates/>
9188
- </fo:basic-link>
9189
- </xsl:with-param>
9190
- </xsl:call-template>
9243
+ <xsl:choose>
9244
+ <xsl:when test="not(parent::quote)">
9245
+ <fo:block>
9246
+ <xsl:call-template name="insert_basic_link">
9247
+ <xsl:with-param name="element">
9248
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
9249
+ <xsl:apply-templates/>
9250
+ </fo:basic-link>
9251
+ </xsl:with-param>
9252
+ </xsl:call-template>
9253
+ </fo:block>
9254
+ </xsl:when>
9255
+ <xsl:otherwise>
9256
+ <xsl:call-template name="insert_basic_link">
9257
+ <xsl:with-param name="element">
9258
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
9259
+ <xsl:apply-templates/>
9260
+ </fo:basic-link>
9261
+ </xsl:with-param>
9262
+ </xsl:call-template>
9263
+ </xsl:otherwise>
9264
+ </xsl:choose>
9191
9265
  </xsl:template>
9192
9266
 
9193
9267
  <xsl:template match="mn:author">
@@ -9263,7 +9337,7 @@
9263
9337
  <ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
9264
9338
  <xsl:choose>
9265
9339
  <!-- skip figure/name/fn -->
9266
- <xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
9340
+ <xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
9267
9341
  <xsl:otherwise>
9268
9342
  <xsl:element name="figure" namespace="{$namespace_full}">
9269
9343
  <xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
@@ -9461,17 +9535,17 @@
9461
9535
 
9462
9536
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
9463
9537
 
9464
- <xsl:for-each select="mn:name"> <!-- set context -->
9538
+ <xsl:for-each select="mn:fmt-name"> <!-- set context -->
9465
9539
  <xsl:call-template name="setIDforNamedDestination"/>
9466
9540
  </xsl:for-each>
9467
9541
 
9468
- <xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
9542
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
9469
9543
  </fo:block>
9470
9544
 
9471
9545
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
9472
9546
  <xsl:call-template name="showFigureKey"/>
9473
9547
  </xsl:if>
9474
- <xsl:apply-templates select="mn:name"/> <!-- show figure's name AFTER image -->
9548
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
9475
9549
 
9476
9550
  </fo:block-container>
9477
9551
  </xsl:template>
@@ -9497,9 +9571,9 @@
9497
9571
  <xsl:template match="mn:figure[@class = 'pseudocode']">
9498
9572
  <xsl:call-template name="setNamedDestination"/>
9499
9573
  <fo:block id="{@id}">
9500
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
9574
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
9501
9575
  </fo:block>
9502
- <xsl:apply-templates select="mn:name"/>
9576
+ <xsl:apply-templates select="mn:fmt-name"/>
9503
9577
  </xsl:template>
9504
9578
 
9505
9579
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
@@ -9510,7 +9584,7 @@
9510
9584
 
9511
9585
  <!-- SOURCE: ... -->
9512
9586
  <!-- figure/source -->
9513
- <xsl:template match="mn:figure/mn:source" priority="2">
9587
+ <xsl:template match="mn:figure/mn:fmt-source" priority="2">
9514
9588
  <xsl:call-template name="termsource"/>
9515
9589
  </xsl:template>
9516
9590
 
@@ -9520,7 +9594,7 @@
9520
9594
  <xsl:variable name="isAdded" select="../@added"/>
9521
9595
  <xsl:variable name="isDeleted" select="../@deleted"/>
9522
9596
  <xsl:choose>
9523
- <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) -->
9597
+ <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) -->
9524
9598
  <fo:inline padding-left="1mm" padding-right="1mm">
9525
9599
  <xsl:if test="not(parent::mn:figure) or parent::mn:p">
9526
9600
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -9541,13 +9615,26 @@
9541
9615
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
9542
9616
 
9543
9617
  <xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
9544
- <xsl:attribute name="width">100%</xsl:attribute>
9618
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
9619
+ <xsl:choose>
9620
+ <xsl:when test="@width and not(@height)">
9621
+ <xsl:attribute name="width">100%</xsl:attribute>
9622
+ <xsl:attribute name="content-height">100%</xsl:attribute>
9623
+ </xsl:when>
9624
+ <xsl:when test="@height and not(@width)">
9625
+ <xsl:attribute name="height">100%</xsl:attribute>
9626
+ <xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
9627
+ </xsl:when>
9628
+ <xsl:when test="not(@width) and not(@height)">
9629
+ <xsl:attribute name="content-height">100%</xsl:attribute>
9630
+ </xsl:when>
9631
+ </xsl:choose>
9632
+
9545
9633
  <xsl:if test="normalize-space($logo_width) != ''">
9546
9634
  <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
9547
9635
  </xsl:if>
9548
- <xsl:attribute name="content-height">100%</xsl:attribute>
9549
9636
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
9550
- <xsl:attribute name="scaling">uniform</xsl:attribute>
9637
+ <xsl:attribute name="vertical-align">top</xsl:attribute>
9551
9638
  </xsl:if>
9552
9639
 
9553
9640
  <xsl:variable name="width">
@@ -9836,7 +9923,7 @@
9836
9923
  <xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
9837
9924
  <xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
9838
9925
 
9839
- <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
9926
+ <xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
9840
9927
  <xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
9841
9928
  <xsl:param name="name"/>
9842
9929
 
@@ -9846,8 +9933,8 @@
9846
9933
 
9847
9934
  <xsl:variable name="alt-text">
9848
9935
  <xsl:choose>
9849
- <xsl:when test="normalize-space(../mn:name) != ''">
9850
- <xsl:value-of select="../mn:name"/>
9936
+ <xsl:when test="normalize-space(../mn:fmt-name) != ''">
9937
+ <xsl:value-of select="../mn:fmt-name"/>
9851
9938
  </xsl:when>
9852
9939
  <xsl:when test="normalize-space($name) != ''">
9853
9940
  <xsl:value-of select="$name"/>
@@ -9856,7 +9943,7 @@
9856
9943
  </xsl:choose>
9857
9944
  </xsl:variable>
9858
9945
 
9859
- <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
9946
+ <xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
9860
9947
 
9861
9948
  <xsl:choose>
9862
9949
  <xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
@@ -9905,9 +9992,9 @@
9905
9992
  <fo:table-cell column-number="2">
9906
9993
  <fo:block>
9907
9994
  <fo:block-container width="{$width_scale}px" height="{$height_scale}px">
9908
- <xsl:if test="../mn:name/mn:bookmark">
9995
+ <xsl:if test="../mn:fmt-name/mn:bookmark">
9909
9996
  <fo:block line-height="0" font-size="0">
9910
- <xsl:for-each select="../mn:name/mn:bookmark">
9997
+ <xsl:for-each select="../mn:fmt-name/mn:bookmark">
9911
9998
  <xsl:call-template name="bookmark"/>
9912
9999
  </xsl:for-each>
9913
10000
  </fo:block>
@@ -10147,7 +10234,7 @@
10147
10234
 
10148
10235
  <!-- image with svg and emf -->
10149
10236
  <xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
10150
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
10237
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
10151
10238
  <xsl:for-each select="*[local-name() = 'svg']">
10152
10239
  <xsl:call-template name="image_svg">
10153
10240
  <xsl:with-param name="name" select="$name"/>
@@ -10164,7 +10251,7 @@
10164
10251
 
10165
10252
  <xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
10166
10253
  <xsl:variable name="svg_content" select="document(@src)"/>
10167
- <xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
10254
+ <xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
10168
10255
  <xsl:for-each select="xalan:nodeset($svg_content)/node()">
10169
10256
  <xsl:call-template name="image_svg">
10170
10257
  <xsl:with-param name="name" select="$name"/>
@@ -10287,7 +10374,7 @@
10287
10374
  <xsl:template match="mn:emf"/>
10288
10375
 
10289
10376
  <!-- figure/name -->
10290
- <xsl:template match="mn:figure/mn:name | mn:image/mn:name">
10377
+ <xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
10291
10378
  <xsl:if test="normalize-space() != ''">
10292
10379
  <fo:block xsl:use-attribute-sets="figure-name-style">
10293
10380
 
@@ -10360,25 +10447,25 @@
10360
10447
  <fo:block-container margin-left="0mm" role="SKIP">
10361
10448
  <xsl:call-template name="setNamedDestination"/>
10362
10449
  <fo:block id="{@id}">
10363
- <xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
10450
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
10364
10451
  </fo:block>
10365
10452
  </fo:block-container>
10366
10453
  </fo:block-container>
10367
10454
  </xsl:template>
10368
10455
 
10369
- <xsl:template match="mn:formula/mn:dt/mn:stem">
10456
+ <xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
10370
10457
  <fo:inline>
10371
10458
  <xsl:apply-templates/>
10372
10459
  </fo:inline>
10373
10460
  </xsl:template>
10374
10461
 
10375
- <xsl:template match="mn:admitted/mn:stem">
10462
+ <xsl:template match="mn:fmt-admitted/mn:fmt-stem">
10376
10463
  <fo:inline>
10377
10464
  <xsl:apply-templates/>
10378
10465
  </fo:inline>
10379
10466
  </xsl:template>
10380
10467
 
10381
- <xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
10468
+ <xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
10382
10469
  <!-- https://github.com/metanorma/isodoc/issues/607
10383
10470
  <xsl:if test="normalize-space() != ''">
10384
10471
  <xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
@@ -10387,7 +10474,7 @@
10387
10474
  </xsl:template>
10388
10475
 
10389
10476
  <!-- stem inside formula with name (with formula's number) -->
10390
- <xsl:template match="mn:formula[mn:name]/mn:stem">
10477
+ <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
10391
10478
  <fo:block xsl:use-attribute-sets="formula-style">
10392
10479
 
10393
10480
  <fo:table table-layout="fixed" width="100%">
@@ -10407,13 +10494,13 @@
10407
10494
 
10408
10495
  <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
10409
10496
 
10410
- <xsl:for-each select="../mn:name">
10497
+ <xsl:for-each select="../mn:fmt-name">
10411
10498
  <xsl:call-template name="setIDforNamedDestination"/>
10412
10499
  </xsl:for-each>
10413
10500
 
10414
10501
  <xsl:call-template name="refine_formula-stem-number-style"/>
10415
10502
 
10416
- <xsl:apply-templates select="../mn:name"/>
10503
+ <xsl:apply-templates select="../mn:fmt-name"/>
10417
10504
  </fo:block>
10418
10505
  </fo:table-cell>
10419
10506
  </fo:table-row>
@@ -10423,7 +10510,7 @@
10423
10510
  </xsl:template>
10424
10511
 
10425
10512
  <!-- stem inside formula without name (without formula's number) -->
10426
- <xsl:template match="mn:formula[not(mn:name)]/mn:stem">
10513
+ <xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
10427
10514
  <fo:block xsl:use-attribute-sets="formula-style">
10428
10515
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
10429
10516
  <xsl:apply-templates/>
@@ -10783,7 +10870,7 @@
10783
10870
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
10784
10871
  <stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
10785
10872
  -->
10786
- <xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
10873
+ <xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
10787
10874
  <fo:inline xsl:use-attribute-sets="mathml-style">
10788
10875
 
10789
10876
  <xsl:call-template name="refine_mathml-style"/>
@@ -11050,7 +11137,7 @@
11050
11137
 
11051
11138
  <xsl:template match="mn:ul | mn:ol" mode="list" name="list">
11052
11139
 
11053
- <xsl:apply-templates select="mn:name">
11140
+ <xsl:apply-templates select="mn:fmt-name">
11054
11141
  <xsl:with-param name="process">true</xsl:with-param>
11055
11142
  </xsl:apply-templates>
11056
11143
 
@@ -11096,7 +11183,7 @@
11096
11183
 
11097
11184
  <xsl:call-template name="refine_list-style"/>
11098
11185
 
11099
- <xsl:if test="mn:name">
11186
+ <xsl:if test="mn:fmt-name">
11100
11187
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
11101
11188
  </xsl:if>
11102
11189
 
@@ -11111,7 +11198,7 @@
11111
11198
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
11112
11199
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
11113
11200
 
11114
- <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
11201
+ <xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
11115
11202
  <xsl:param name="process">false</xsl:param>
11116
11203
  <xsl:if test="$process = 'true'">
11117
11204
  <fo:block xsl:use-attribute-sets="list-name-style">
@@ -11245,7 +11332,7 @@
11245
11332
  -->
11246
11333
  <!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
11247
11334
  <!-- fn in text -->
11248
- <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))]" priority="2" name="fn">
11335
+ <xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))]" priority="2" name="fn">
11249
11336
  <xsl:param name="footnote_body_from_table">false</xsl:param>
11250
11337
 
11251
11338
  <!-- list of unique footnotes -->
@@ -11369,7 +11456,7 @@
11369
11456
  <!-- commented:
11370
11457
  .//mn:bibitem[ancestor::mn:references]/mn:note |
11371
11458
  because 'fn' there is in biblio-tag -->
11372
- <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])]">
11459
+ <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])]">
11373
11460
  <!-- copy unique fn -->
11374
11461
  <fn gen_id="{generate-id(.)}">
11375
11462
  <xsl:copy-of select="@*"/>
@@ -11447,7 +11534,7 @@
11447
11534
  <xsl:with-param name="sep"> — </xsl:with-param>
11448
11535
  </xsl:call-template>
11449
11536
 
11450
- <xsl:apply-templates select="node()[not(self::mn:name)]"/>
11537
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
11451
11538
  </fo:block>
11452
11539
 
11453
11540
  </xsl:template>
@@ -11471,7 +11558,7 @@
11471
11558
  </xsl:otherwise>
11472
11559
  </xsl:choose> -->
11473
11560
  <xsl:variable name="name">
11474
- <xsl:apply-templates select="mn:name"/>
11561
+ <xsl:apply-templates select="mn:fmt-name"/>
11475
11562
  </xsl:variable>
11476
11563
  <xsl:copy-of select="$name"/>
11477
11564
  <xsl:if test="normalize-space($name) != ''">
@@ -11479,7 +11566,7 @@
11479
11566
  </xsl:if>
11480
11567
  </xsl:template>
11481
11568
 
11482
- <xsl:template match="mn:admonition/mn:name">
11569
+ <xsl:template match="mn:admonition/mn:fmt-name">
11483
11570
  <xsl:apply-templates/>
11484
11571
  </xsl:template>
11485
11572
 
@@ -11605,10 +11692,10 @@
11605
11692
  <xsl:call-template name="setNamedDestination"/>
11606
11693
  <fo:block id="{@id}"/>
11607
11694
 
11608
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
11695
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
11609
11696
 
11610
11697
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
11611
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
11698
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
11612
11699
  </fo:block>
11613
11700
  </xsl:template> <!-- references -->
11614
11701
 
@@ -11932,7 +12019,8 @@
11932
12019
  </xsl:copy>
11933
12020
  </xsl:template>
11934
12021
 
11935
- <xsl:template match="mn:xref" mode="index_add_id">
12022
+ <xsl:template match="mn:xref" mode="index_add_id"/>
12023
+ <xsl:template match="mn:fmt-xref" mode="index_add_id">
11936
12024
  <xsl:param name="docid"/>
11937
12025
  <xsl:variable name="id">
11938
12026
  <xsl:call-template name="generateIndexXrefId">
@@ -11974,7 +12062,7 @@
11974
12062
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
11975
12063
  <xsl:copy>
11976
12064
  <xsl:apply-templates select="@*" mode="index_update"/>
11977
- <xsl:apply-templates select="node()[1]" mode="process_li_element"/>
12065
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
11978
12066
  </xsl:copy>
11979
12067
  </xsl:template>
11980
12068
 
@@ -11995,11 +12083,11 @@
11995
12083
  <xsl:value-of select="."/>
11996
12084
  <xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
11997
12085
  </xsl:when>
11998
- <xsl:when test="self::* and local-name(.) = 'xref'">
12086
+ <xsl:when test="self::* and local-name(.) = 'fmt-xref'">
11999
12087
  <xsl:variable name="id" select="@id"/>
12000
12088
 
12001
- <xsl:variable name="id_next" select="following-sibling::mn:xref[1]/@id"/>
12002
- <xsl:variable name="id_prev" select="preceding-sibling::mn:xref[1]/@id"/>
12089
+ <xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
12090
+ <xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
12003
12091
 
12004
12092
  <xsl:variable name="pages_">
12005
12093
  <xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
@@ -12095,18 +12183,18 @@
12095
12183
  <xsl:variable name="item_number">
12096
12184
  <xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
12097
12185
  </xsl:variable>
12098
- <xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
12186
+ <xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
12099
12187
  <xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
12100
12188
  </xsl:template>
12101
12189
 
12102
- <xsl:template match="mn:indexsect/mn:title" priority="4">
12190
+ <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
12103
12191
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
12104
12192
  <!-- Index -->
12105
12193
  <xsl:apply-templates/>
12106
12194
  </fo:block>
12107
12195
  </xsl:template>
12108
12196
 
12109
- <xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
12197
+ <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
12110
12198
  <!-- Letter A, B, C, ... -->
12111
12199
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
12112
12200
  <xsl:apply-templates/>
@@ -12147,12 +12235,12 @@
12147
12235
  <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"/>
12148
12236
  <bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
12149
12237
  <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"/> -->
12150
- <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]">
12238
+ <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]">
12151
12239
  <!-- skip here, see the template 'fmt-review-start' -->
12152
12240
  </xsl:when>
12153
12241
  <xsl:otherwise>
12154
12242
  <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
12155
- <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>
12243
+ <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>
12156
12244
  <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
12157
12245
  <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
12158
12246
  </xsl:otherwise>
@@ -12316,7 +12404,7 @@
12316
12404
 
12317
12405
  <xsl:template name="processTables_Contents">
12318
12406
  <mnx:tables>
12319
- <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
12407
+ <xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
12320
12408
  <xsl:choose>
12321
12409
  <xsl:when test="mn:fmt-name">
12322
12410
  <xsl:variable name="fmt_name">
@@ -12338,7 +12426,7 @@
12338
12426
 
12339
12427
  <xsl:template name="processFigures_Contents">
12340
12428
  <mnx:figures>
12341
- <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) != '']">
12429
+ <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) != '']">
12342
12430
  <xsl:choose>
12343
12431
  <xsl:when test="mn:fmt-name">
12344
12432
  <xsl:variable name="fmt_name">
@@ -12367,7 +12455,7 @@
12367
12455
 
12368
12456
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
12369
12457
 
12370
- <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">
12458
+ <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">
12371
12459
  <xsl:apply-templates mode="contents"/>
12372
12460
  <xsl:text> </xsl:text>
12373
12461
  </xsl:template>
@@ -12379,7 +12467,7 @@
12379
12467
  </xsl:if>
12380
12468
  </xsl:template>
12381
12469
 
12382
- <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">
12470
+ <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">
12383
12471
  <xsl:apply-templates mode="bookmarks"/>
12384
12472
  <xsl:text> </xsl:text>
12385
12473
  </xsl:template>
@@ -12390,7 +12478,7 @@
12390
12478
  </xsl:if>
12391
12479
  </xsl:template>
12392
12480
 
12393
- <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">
12481
+ <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">
12394
12482
  <xsl:value-of select="."/>
12395
12483
  </xsl:template>
12396
12484
 
@@ -12400,7 +12488,7 @@
12400
12488
  </xsl:if>
12401
12489
  </xsl:template>
12402
12490
 
12403
- <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">
12491
+ <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">
12404
12492
  <xsl:value-of select="."/>
12405
12493
  </xsl:template>
12406
12494
 
@@ -12861,7 +12949,7 @@
12861
12949
  <xsl:value-of select="."/>
12862
12950
  </xsl:template>
12863
12951
 
12864
- <xsl:template match="mn:review" mode="contents_item"/>
12952
+ <xsl:template match="mn:annotation" mode="contents_item"/>
12865
12953
 
12866
12954
  <xsl:template match="mn:tab" mode="contents_item">
12867
12955
  <xsl:text> </xsl:text>
@@ -13016,7 +13104,7 @@
13016
13104
  <xsl:apply-templates/>
13017
13105
  </xsl:template>
13018
13106
 
13019
- <xsl:template match="mn:toc//mn:xref" priority="3">
13107
+ <xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
13020
13108
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13021
13109
  <!-- New format: one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13022
13110
  <!-- <test><xsl:copy-of select="."/></test> -->
@@ -13084,8 +13172,8 @@
13084
13172
  <xsl:apply-templates mode="toc_table_width"/>
13085
13173
  </xsl:template>
13086
13174
 
13087
- <xsl:template match="mn:clause[@type = 'toc']/mn:title" mode="toc_table_width"/>
13088
- <xsl:template match="mn:clause[not(@type = 'toc')]/mn:title" mode="toc_table_width"/>
13175
+ <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
13176
+ <xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
13089
13177
 
13090
13178
  <xsl:template match="mn:li" mode="toc_table_width">
13091
13179
  <mn:tr>
@@ -13093,7 +13181,7 @@
13093
13181
  </mn:tr>
13094
13182
  </xsl:template>
13095
13183
 
13096
- <xsl:template match="mn:xref" mode="toc_table_width">
13184
+ <xsl:template match="mn:fmt-xref" mode="toc_table_width">
13097
13185
  <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13098
13186
  <!-- New format - one tab <xref target="cgpm9th1948r6">&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
13099
13187
  <xsl:for-each select="mn:tab">
@@ -13171,10 +13259,10 @@
13171
13259
 
13172
13260
  </xsl:template> <!-- tab -->
13173
13261
 
13174
- <xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
13175
- <xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
13262
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
13263
+ <xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
13176
13264
 
13177
- <xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
13265
+ <xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
13178
13266
  <xsl:attribute name="padding-right">6mm</xsl:attribute>
13179
13267
  </xsl:template>
13180
13268
 
@@ -13189,13 +13277,13 @@
13189
13277
  </xsl:template>
13190
13278
 
13191
13279
  <xsl:variable name="reviews_">
13192
- <xsl:for-each select="//mn:review[not(parent::mn:review-container)][@from]">
13280
+ <xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
13193
13281
  <xsl:copy>
13194
13282
  <xsl:copy-of select="@from"/>
13195
13283
  <xsl:copy-of select="@id"/>
13196
13284
  </xsl:copy>
13197
13285
  </xsl:for-each>
13198
- <xsl:for-each select="//mn:fmt-review-start[@source]">
13286
+ <xsl:for-each select="//mn:fmt-annotation-start[@source]">
13199
13287
  <xsl:copy>
13200
13288
  <xsl:copy-of select="@source"/>
13201
13289
  <xsl:copy-of select="@id"/>
@@ -13209,7 +13297,7 @@
13209
13297
  <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
13210
13298
  <xsl:variable name="curr_id" select="@id"/>
13211
13299
  <!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
13212
- <xsl:for-each select="$reviews//mn:review[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
13300
+ <xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
13213
13301
  <xsl:variable name="review_id" select="normalize-space(@id)"/>
13214
13302
  <xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
13215
13303
  <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>
@@ -13224,7 +13312,7 @@
13224
13312
 
13225
13313
  <!-- document text (not figures, or tables) footnotes -->
13226
13314
  <xsl:variable name="reviews_container_">
13227
- <xsl:for-each select="//mn:review-container/mn:fmt-review-body">
13315
+ <xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
13228
13316
  <xsl:variable name="update_xml_step1">
13229
13317
  <xsl:apply-templates select="." mode="update_xml_step1"/>
13230
13318
  </xsl:variable>
@@ -13233,10 +13321,10 @@
13233
13321
  </xsl:variable>
13234
13322
  <xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
13235
13323
 
13236
- <xsl:template match="mn:review-container"/>
13324
+ <xsl:template match="mn:annotation-container"/>
13237
13325
 
13238
13326
  <!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
13239
- <xsl:template match="mn:review[not(parent::mn:review-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13327
+ <xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13240
13328
  <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
13241
13329
  <xsl:if test="$isGenerateTableIF = 'false'">
13242
13330
  <xsl:choose>
@@ -13256,7 +13344,7 @@
13256
13344
  </xsl:template>
13257
13345
 
13258
13346
  <!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
13259
- <xsl:template match="mn:fmt-review-start" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13347
+ <xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
13260
13348
  <!-- comment 2019-11-29 -->
13261
13349
  <!-- <fo:block font-weight="bold">Review:</fo:block>
13262
13350
  <xsl:apply-templates /> -->
@@ -13312,7 +13400,7 @@
13312
13400
  </xsl:template>
13313
13401
 
13314
13402
  <!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
13315
- <xsl:template match="mn:review[@type = 'other']"/>
13403
+ <xsl:template match="mn:annotation[@type = 'other']"/>
13316
13404
 
13317
13405
  <!-- ============ -->
13318
13406
  <!-- errata -->
@@ -13705,9 +13793,12 @@
13705
13793
  <xsl:choose>
13706
13794
  <xsl:when test="mn:fmt-title">
13707
13795
  <xsl:variable name="fmt_title_section">
13708
- <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:review)]"/>
13796
+ <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
13709
13797
  </xsl:variable>
13710
13798
  <xsl:value-of select="normalize-space($fmt_title_section)"/>
13799
+ <xsl:if test="normalize-space($fmt_title_section) = ''">
13800
+ <xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
13801
+ </xsl:if>
13711
13802
  </xsl:when>
13712
13803
  <xsl:otherwise>
13713
13804
  <xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
@@ -13720,6 +13811,9 @@
13720
13811
  <xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
13721
13812
  <xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
13722
13813
  </xsl:when>
13814
+ <xsl:when test="mn:fmt-title/mn:tab">
13815
+ <xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
13816
+ </xsl:when>
13723
13817
  <xsl:when test="mn:fmt-title">
13724
13818
  <xsl:copy-of select="mn:fmt-title/node()"/>
13725
13819
  </xsl:when>
@@ -13863,10 +13957,10 @@
13863
13957
 
13864
13958
  </fo:block>
13865
13959
 
13866
- <xsl:apply-templates select="mn:title[@columns = 1]"/>
13960
+ <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
13867
13961
 
13868
13962
  <fo:block>
13869
- <xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
13963
+ <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
13870
13964
  </fo:block>
13871
13965
  </xsl:otherwise>
13872
13966
  </xsl:choose>
@@ -13875,7 +13969,7 @@
13875
13969
  <xsl:template name="refine_annex_style">
13876
13970
  </xsl:template>
13877
13971
 
13878
- <xsl:template match="mn:name/text()">
13972
+ <xsl:template match="mn:name/text() | mn:fmt-name/text()">
13879
13973
  <!-- 0xA0 to space replacement -->
13880
13974
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
13881
13975
  </xsl:template>
@@ -13931,28 +14025,28 @@
13931
14025
  <xsl:template match="mn:amend"/>
13932
14026
 
13933
14027
  <!-- fmt-title renamed to title in update_xml_step1 -->
13934
- <xsl:template match="mn:fmt-title"/>
14028
+ <!-- <xsl:template match="mn:fmt-title" /> -->
13935
14029
 
13936
14030
  <!-- fmt-name renamed to name in update_xml_step1 -->
13937
- <xsl:template match="mn:fmt-name"/>
14031
+ <!-- <xsl:template match="mn:fmt-name" /> -->
13938
14032
 
13939
14033
  <!-- fmt-preferred renamed to preferred in update_xml_step1 -->
13940
- <xsl:template match="mn:fmt-preferred"/>
14034
+ <!-- <xsl:template match="mn:fmt-preferred" /> -->
13941
14035
 
13942
14036
  <!-- fmt-admitted renamed to admitted in update_xml_step1 -->
13943
- <xsl:template match="mn:fmt-admitted"/>
14037
+ <!-- <xsl:template match="mn:fmt-admitted" /> -->
13944
14038
 
13945
14039
  <!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
13946
- <xsl:template match="mn:fmt-deprecates"/>
14040
+ <!-- <xsl:template match="mn:fmt-deprecates" /> -->
13947
14041
 
13948
14042
  <!-- fmt-definition renamed to definition in update_xml_step1 -->
13949
- <xsl:template match="mn:fmt-definition"/>
14043
+ <!-- <xsl:template match="mn:fmt-definition" /> -->
13950
14044
 
13951
14045
  <!-- fmt-termsource renamed to termsource in update_xml_step1 -->
13952
- <xsl:template match="mn:fmt-termsource"/>
14046
+ <!-- <xsl:template match="mn:fmt-termsource" /> -->
13953
14047
 
13954
14048
  <!-- fmt-source renamed to source in update_xml_step1 -->
13955
- <xsl:template match="mn:fmt-source"/>
14049
+ <!-- <xsl:template match="mn:fmt-source" /> -->
13956
14050
 
13957
14051
  <xsl:template match="mn:semx">
13958
14052
  <xsl:apply-templates/>
@@ -14396,12 +14490,12 @@
14396
14490
  <xsl:when test="ancestor::mn:preface">
14397
14491
  <xsl:value-of select="$level_total - 2"/>
14398
14492
  </xsl:when>
14399
- <xsl:when test="ancestor::mn:sections and self::mn:title">
14493
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
14400
14494
  <!-- determine 'depth' depends on upper clause with title/@depth -->
14401
14495
  <!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
14402
- <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:title/@depth][1]/mn:title/@depth"/>
14496
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
14403
14497
  <!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
14404
- <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:title/@depth][1]/ancestor::*)"/>
14498
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
14405
14499
  <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
14406
14500
  <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
14407
14501
  <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
@@ -14417,8 +14511,8 @@
14417
14511
  </xsl:otherwise>
14418
14512
  </xsl:choose>
14419
14513
  </xsl:when>
14420
- <xsl:when test="ancestor::mn:sections and self::mn:name and parent::mn:term">
14421
- <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:title/@depth)"/>
14514
+ <xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
14515
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
14422
14516
  <xsl:choose>
14423
14517
  <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
14424
14518
  <xsl:value-of select="number($upper_terms_depth + 1)"/>
@@ -14429,7 +14523,7 @@
14429
14523
  </xsl:choose>
14430
14524
  </xsl:when>
14431
14525
  <xsl:when test="ancestor::mn:sections">
14432
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:title/@depth)"/>
14526
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
14433
14527
  <xsl:choose>
14434
14528
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
14435
14529
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -14445,8 +14539,8 @@
14445
14539
  <xsl:when test="parent::mn:annex">
14446
14540
  <xsl:value-of select="$level_total - 1"/>
14447
14541
  </xsl:when>
14448
- <xsl:when test="ancestor::mn:annex and self::mn:title">
14449
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:title/@depth)"/>
14542
+ <xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
14543
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
14450
14544
  <xsl:choose>
14451
14545
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
14452
14546
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -14479,7 +14573,7 @@
14479
14573
  </xsl:when>
14480
14574
  <xsl:otherwise>
14481
14575
  <xsl:variable name="title_level_">
14482
- <xsl:for-each select="../preceding-sibling::mn:title[1]">
14576
+ <xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
14483
14577
  <xsl:call-template name="getLevel"/>
14484
14578
  </xsl:for-each>
14485
14579
  </xsl:variable>
@@ -14556,15 +14650,17 @@
14556
14650
  </xsl:template>
14557
14651
 
14558
14652
  <xsl:template name="setNamedDestination">
14559
- <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
14560
- <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'">
14561
- <fox:destination internal-destination="{@id}"/>
14562
- </xsl:if>
14563
- <xsl:for-each select=". | mn:title | mn:name">
14564
- <xsl:if test="@named_dest">
14565
- <fox:destination internal-destination="{@named_dest}"/>
14653
+ <xsl:if test="$isGenerateTableIF = 'false'">
14654
+ <!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
14655
+ <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'">
14656
+ <fox:destination internal-destination="{@id}"/>
14566
14657
  </xsl:if>
14567
- </xsl:for-each>
14658
+ <xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
14659
+ <xsl:if test="@named_dest">
14660
+ <fox:destination internal-destination="{@named_dest}"/>
14661
+ </xsl:if>
14662
+ </xsl:for-each>
14663
+ </xsl:if>
14568
14664
  </xsl:template>
14569
14665
 
14570
14666
  <xsl:template name="add-letter-spacing">
@@ -14912,7 +15008,7 @@
14912
15008
  </xsl:when>
14913
15009
  <xsl:otherwise>
14914
15010
  <!-- namespace-uri(ancestor::mn:title) != '' to skip title from $contents -->
14915
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
15011
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
14916
15012
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
14917
15013
  </xsl:if>
14918
15014
  <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">
@@ -14946,7 +15042,7 @@
14946
15042
  </fo:block>
14947
15043
  </fo:block-container>
14948
15044
  </fo:inline-container>
14949
- <xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
15045
+ <xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
14950
15046
  <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
14951
15047
  </xsl:if>
14952
15048
  </xsl:otherwise>