metanorma-ogc 2.7.9 → 2.8.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.
- checksums.yaml +4 -4
- data/lib/isodoc/ogc/base_convert.rb +2 -3
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +763 -593
- data/lib/isodoc/ogc/ogc.best-practice.xsl +763 -593
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +763 -593
- data/lib/isodoc/ogc/ogc.community-practice.xsl +763 -593
- data/lib/isodoc/ogc/ogc.community-standard.xsl +763 -593
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +763 -593
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +763 -593
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +763 -593
- data/lib/isodoc/ogc/ogc.other.xsl +763 -593
- data/lib/isodoc/ogc/ogc.policy.xsl +763 -593
- data/lib/isodoc/ogc/ogc.reference-model.xsl +763 -593
- data/lib/isodoc/ogc/ogc.release-notes.xsl +763 -593
- data/lib/isodoc/ogc/ogc.standard.xsl +763 -593
- data/lib/isodoc/ogc/ogc.test-suite.xsl +763 -593
- data/lib/isodoc/ogc/ogc.user-guide.xsl +763 -593
- data/lib/isodoc/ogc/ogc.white-paper.xsl +548 -376
- data/lib/isodoc/ogc/presentation_sections.rb +3 -2
- data/lib/metanorma/ogc/basicdoc.rng +5 -5
- data/lib/metanorma/ogc/isodoc.rng +57 -6
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
5
|
-
<xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:name))]" use="@reference"/>
|
5
|
+
<xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:fmt-name))]" use="@reference"/>
|
6
6
|
|
7
7
|
<xsl:variable name="debug">false</xsl:variable>
|
8
8
|
|
@@ -233,6 +233,52 @@
|
|
233
233
|
</xsl:variable>
|
234
234
|
<xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
|
235
235
|
|
236
|
+
<xsl:template name="layout-master-set">
|
237
|
+
<fo:layout-master-set>
|
238
|
+
<!-- Cover page -->
|
239
|
+
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
240
|
+
<fo:region-body margin-top="16.5mm" margin-bottom="10mm" margin-left="16.5mm" margin-right="14mm"/>
|
241
|
+
<fo:region-before region-name="cover-page-header" extent="16.5mm"/>
|
242
|
+
<fo:region-after extent="10mm"/>
|
243
|
+
<fo:region-start extent="16.5mm"/>
|
244
|
+
<fo:region-end extent="14mm"/>
|
245
|
+
</fo:simple-page-master>
|
246
|
+
|
247
|
+
<!-- Preface pages -->
|
248
|
+
<fo:simple-page-master master-name="preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
249
|
+
<fo:region-body margin-top="16.5mm" margin-bottom="22.5mm" margin-left="16.5mm" margin-right="16.5mm"/>
|
250
|
+
<fo:region-before region-name="header" extent="16.5mm"/>
|
251
|
+
<fo:region-after region-name="footer" extent="22.5mm"/>
|
252
|
+
<fo:region-start region-name="left-region" extent="16.5mm"/>
|
253
|
+
<fo:region-end region-name="right-region" extent="16.5mm"/>
|
254
|
+
</fo:simple-page-master>
|
255
|
+
<fo:simple-page-master master-name="preface-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
256
|
+
<fo:region-body margin-top="16.5mm" margin-bottom="22.5mm" margin-left="16.5mm" margin-right="16.5mm"/>
|
257
|
+
<fo:region-before region-name="header" extent="16.5mm"/>
|
258
|
+
<fo:region-after region-name="footer" extent="22.5mm"/>
|
259
|
+
<fo:region-start region-name="left-region" extent="16.5mm"/>
|
260
|
+
<fo:region-end region-name="right-region" extent="16.5mm"/>
|
261
|
+
</fo:simple-page-master>
|
262
|
+
|
263
|
+
<!-- Document pages -->
|
264
|
+
<fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
265
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
266
|
+
<fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
267
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
268
|
+
<fo:region-start region-name="left-region" extent="16.5mm"/>
|
269
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
270
|
+
</fo:simple-page-master>
|
271
|
+
<fo:simple-page-master master-name="document-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
272
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
273
|
+
<fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
274
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
275
|
+
<fo:region-start region-name="left-region" extent="16.5mm"/>
|
276
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
277
|
+
</fo:simple-page-master>
|
278
|
+
|
279
|
+
</fo:layout-master-set>
|
280
|
+
</xsl:template> <!-- END: layout-master-set -->
|
281
|
+
|
236
282
|
<xsl:template match="/">
|
237
283
|
|
238
284
|
<fo:root xml:lang="{$lang}">
|
@@ -242,49 +288,8 @@
|
|
242
288
|
<xsl:call-template name="insertRootStyle">
|
243
289
|
<xsl:with-param name="root-style" select="$root-style"/>
|
244
290
|
</xsl:call-template>
|
245
|
-
|
246
|
-
|
247
|
-
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
248
|
-
<fo:region-body margin-top="16.5mm" margin-bottom="10mm" margin-left="16.5mm" margin-right="14mm"/>
|
249
|
-
<fo:region-before region-name="cover-page-header" extent="16.5mm"/>
|
250
|
-
<fo:region-after extent="10mm"/>
|
251
|
-
<fo:region-start extent="16.5mm"/>
|
252
|
-
<fo:region-end extent="14mm"/>
|
253
|
-
</fo:simple-page-master>
|
254
|
-
|
255
|
-
<!-- Preface pages -->
|
256
|
-
<fo:simple-page-master master-name="preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
257
|
-
<fo:region-body margin-top="16.5mm" margin-bottom="22.5mm" margin-left="16.5mm" margin-right="16.5mm"/>
|
258
|
-
<fo:region-before region-name="header" extent="16.5mm"/>
|
259
|
-
<fo:region-after region-name="footer" extent="22.5mm"/>
|
260
|
-
<fo:region-start region-name="left-region" extent="16.5mm"/>
|
261
|
-
<fo:region-end region-name="right-region" extent="16.5mm"/>
|
262
|
-
</fo:simple-page-master>
|
263
|
-
<fo:simple-page-master master-name="preface-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
264
|
-
<fo:region-body margin-top="16.5mm" margin-bottom="22.5mm" margin-left="16.5mm" margin-right="16.5mm"/>
|
265
|
-
<fo:region-before region-name="header" extent="16.5mm"/>
|
266
|
-
<fo:region-after region-name="footer" extent="22.5mm"/>
|
267
|
-
<fo:region-start region-name="left-region" extent="16.5mm"/>
|
268
|
-
<fo:region-end region-name="right-region" extent="16.5mm"/>
|
269
|
-
</fo:simple-page-master>
|
270
|
-
|
271
|
-
<!-- Document pages -->
|
272
|
-
<fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
273
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
274
|
-
<fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
275
|
-
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
276
|
-
<fo:region-start region-name="left-region" extent="16.5mm"/>
|
277
|
-
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
278
|
-
</fo:simple-page-master>
|
279
|
-
<fo:simple-page-master master-name="document-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
|
280
|
-
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
281
|
-
<fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
282
|
-
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
283
|
-
<fo:region-start region-name="left-region" extent="16.5mm"/>
|
284
|
-
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
285
|
-
</fo:simple-page-master>
|
286
|
-
|
287
|
-
</fo:layout-master-set>
|
291
|
+
|
292
|
+
<xsl:call-template name="layout-master-set"/>
|
288
293
|
|
289
294
|
<fo:declarations>
|
290
295
|
<xsl:call-template name="addPDFUAmeta"/>
|
@@ -307,7 +312,7 @@
|
|
307
312
|
<xsl:for-each select="$contents//mnx:tables/mnx:table">
|
308
313
|
<fo:bookmark internal-destination="{@id}">
|
309
314
|
<xsl:variable name="title">
|
310
|
-
<xsl:apply-templates select="mn:name" mode="bookmarks"/>
|
315
|
+
<xsl:apply-templates select="mn:name | mn:fmt-name" mode="bookmarks"/>
|
311
316
|
</xsl:variable>
|
312
317
|
<fo:bookmark-title><xsl:value-of select="$title"/></fo:bookmark-title>
|
313
318
|
</fo:bookmark>
|
@@ -323,7 +328,7 @@
|
|
323
328
|
<xsl:for-each select="$contents//mnx:figures/mnx:figure">
|
324
329
|
<fo:bookmark internal-destination="{@id}">
|
325
330
|
<xsl:variable name="title">
|
326
|
-
<xsl:apply-templates select="mn:name" mode="bookmarks"/>
|
331
|
+
<xsl:apply-templates select="mn:name | mn:fmt-name" mode="bookmarks"/>
|
327
332
|
</xsl:variable>
|
328
333
|
<fo:bookmark-title><xsl:value-of select="$title"/></fo:bookmark-title>
|
329
334
|
</fo:bookmark>
|
@@ -346,254 +351,7 @@
|
|
346
351
|
</xsl:with-param>
|
347
352
|
</xsl:call-template>
|
348
353
|
|
349
|
-
|
350
|
-
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
351
|
-
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
352
|
-
|
353
|
-
<fo:flow flow-name="xsl-region-body" color="white">
|
354
|
-
|
355
|
-
<xsl:variable name="curr_lang" select="/mn:metanorma/mn:bibdata/mn:language[@current = 'true']"/>
|
356
|
-
<xsl:variable name="stage" select="/mn:metanorma/mn:bibdata/mn:status/mn:stage[@language = $curr_lang] | /mn:metanorma/mn:bibdata/mn:status/mn:stage[not(@language)]"/>
|
357
|
-
<xsl:variable name="isLegacy" select="normalize-space($stage = 'deprecated' or $stage = 'legacy' or $stage = 'retired' or $stage = 'rescinded')"/>
|
358
|
-
|
359
|
-
<!-- background image -->
|
360
|
-
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
|
361
|
-
<fo:block>
|
362
|
-
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
363
|
-
</fo:block>
|
364
|
-
</fo:block-container>
|
365
|
-
|
366
|
-
<xsl:call-template name="insertBackgroundColor">
|
367
|
-
<xsl:with-param name="opacity">0.85</xsl:with-param>
|
368
|
-
</xsl:call-template>
|
369
|
-
|
370
|
-
<xsl:call-template name="insertCrossingLines"/>
|
371
|
-
|
372
|
-
<!-- title and logo -->
|
373
|
-
<fo:block>
|
374
|
-
<fo:table table-layout="fixed" width="100%">
|
375
|
-
<fo:table-column column-width="75%"/>
|
376
|
-
<fo:table-column column-width="25%"/>
|
377
|
-
<fo:table-body>
|
378
|
-
<fo:table-row>
|
379
|
-
<fo:table-cell font-weight="bold">
|
380
|
-
<fo:block font-size="16pt" color="{$color_design}" margin-bottom="4pt">
|
381
|
-
<xsl:variable name="ogc_document" select="concat('OGC® DOCUMENT: ', $docnumber)"/>
|
382
|
-
<xsl:call-template name="addLetterSpacing">
|
383
|
-
<xsl:with-param name="text" select="$ogc_document"/>
|
384
|
-
<xsl:with-param name="letter-spacing" select="0.3"/>
|
385
|
-
</xsl:call-template>
|
386
|
-
</fo:block>
|
387
|
-
<xsl:variable name="ogc_external" select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type='ogc-external']"/>
|
388
|
-
<xsl:if test="normalize-space($ogc_external) != ''">
|
389
|
-
<fo:block font-size="10pt">External identifier of this OGC<fo:inline font-size="58%" baseline-shift="30%">®</fo:inline> document: <fo:inline font-weight="normal"><xsl:value-of select="$ogc_external"/></fo:inline></fo:block>
|
390
|
-
</xsl:if>
|
391
|
-
</fo:table-cell>
|
392
|
-
<fo:table-cell text-align="right">
|
393
|
-
<fo:block>
|
394
|
-
<xsl:call-template name="insertLogo"/>
|
395
|
-
</fo:block>
|
396
|
-
</fo:table-cell>
|
397
|
-
</fo:table-row>
|
398
|
-
</fo:table-body>
|
399
|
-
</fo:table>
|
400
|
-
</fo:block>
|
401
|
-
|
402
|
-
<!-- <fo:block-container absolute-position="fixed" left="16.5mm" top="83mm" height="90mm"> -->
|
403
|
-
<fo:block-container absolute-position="fixed" left="16.5mm" top="40mm" height="170mm">
|
404
|
-
<fo:block-container width="155mm" height="99%" display-align="center">
|
405
|
-
<fo:block font-size="33pt" role="H1">
|
406
|
-
<xsl:variable name="length_title" select="string-length($doctitle)"/>
|
407
|
-
<xsl:variable name="fit_font-size">
|
408
|
-
<xsl:choose>
|
409
|
-
<xsl:when test="$length_title > 230">20</xsl:when>
|
410
|
-
<xsl:when test="$length_title > 170">26</xsl:when>
|
411
|
-
<xsl:when test="$length_title > 155">28</xsl:when>
|
412
|
-
<xsl:when test="$length_title > 130">30</xsl:when>
|
413
|
-
</xsl:choose>
|
414
|
-
</xsl:variable>
|
415
|
-
<xsl:if test="normalize-space($fit_font-size) != ''">
|
416
|
-
<xsl:attribute name="font-size"><xsl:value-of select="$fit_font-size"/>pt</xsl:attribute>
|
417
|
-
</xsl:if>
|
418
|
-
<xsl:call-template name="addLetterSpacing">
|
419
|
-
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctitle))"/>
|
420
|
-
<xsl:with-param name="letter-spacing" select="1.1"/>
|
421
|
-
</xsl:call-template>
|
422
|
-
</fo:block>
|
423
|
-
<fo:block-container width="22.5mm" border-bottom="2pt solid {$color_design}" margin-bottom="24pt">
|
424
|
-
<fo:block margin-top="4pt"> </fo:block>
|
425
|
-
</fo:block-container>
|
426
|
-
<fo:block color="{$color_design}">
|
427
|
-
<fo:block font-size="17pt">
|
428
|
-
<xsl:call-template name="addLetterSpacing">
|
429
|
-
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctype))"/>
|
430
|
-
</xsl:call-template>
|
431
|
-
<xsl:value-of select="$linebreak"/>
|
432
|
-
<xsl:variable name="docsubtype" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:subdoctype)"/>
|
433
|
-
<xsl:variable name="docsubtype_str">
|
434
|
-
<xsl:choose>
|
435
|
-
<xsl:when test="$docsubtype = 'implementation'">Implementation</xsl:when>
|
436
|
-
<xsl:when test="$docsubtype = 'conceptual-model'">Conceptual model</xsl:when>
|
437
|
-
<xsl:when test="$docsubtype = 'conceptual-model-and-encoding'">Conceptual model & encoding</xsl:when>
|
438
|
-
<xsl:when test="$docsubtype = 'conceptual-model-and-implementation'">Conceptual model & implementation</xsl:when>
|
439
|
-
<xsl:when test="$docsubtype = 'encoding'">Encoding</xsl:when>
|
440
|
-
<xsl:when test="$docsubtype = 'extension'">Extension</xsl:when>
|
441
|
-
<xsl:when test="$docsubtype = 'profile'">Profile</xsl:when>
|
442
|
-
<xsl:when test="$docsubtype = 'profile-with-extension'">Profile with extension</xsl:when>
|
443
|
-
<xsl:when test="$docsubtype = 'general'">General</xsl:when>
|
444
|
-
</xsl:choose>
|
445
|
-
</xsl:variable>
|
446
|
-
<xsl:call-template name="addLetterSpacing">
|
447
|
-
<xsl:with-param name="text" select="$docsubtype_str"/>
|
448
|
-
<xsl:with-param name="letter-spacing" select="0.25"/>
|
449
|
-
</xsl:call-template>
|
450
|
-
</fo:block>
|
451
|
-
<xsl:variable name="stage_uc" select="java:toUpperCase(java:java.lang.String.new($stage))"/>
|
452
|
-
|
453
|
-
<xsl:choose>
|
454
|
-
<xsl:when test="$isLegacy = 'true'">
|
455
|
-
<fo:block-container font-size="17pt" background-color="{$color_background_blue}" margin-left="-2.5mm" height="11.5mm" width="56mm" display-align="center" margin-top="0.5mm">
|
456
|
-
<fo:block-container margin-left="2.5mm">
|
457
|
-
<fo:block-container margin-left="0mm">
|
458
|
-
<fo:block margin-top="1mm">
|
459
|
-
<xsl:call-template name="addLetterSpacing">
|
460
|
-
<xsl:with-param name="text" select="$stage_uc"/>
|
461
|
-
</xsl:call-template>
|
462
|
-
</fo:block>
|
463
|
-
</fo:block-container>
|
464
|
-
</fo:block-container>
|
465
|
-
</fo:block-container>
|
466
|
-
</xsl:when>
|
467
|
-
<xsl:otherwise>
|
468
|
-
<fo:block font-size="12pt" font-weight="bold" margin-top="14pt">
|
469
|
-
<xsl:call-template name="addLetterSpacing">
|
470
|
-
<xsl:with-param name="text" select="$stage_uc"/>
|
471
|
-
</xsl:call-template>
|
472
|
-
</fo:block>
|
473
|
-
</xsl:otherwise>
|
474
|
-
</xsl:choose>
|
475
|
-
|
476
|
-
</fo:block>
|
477
|
-
</fo:block-container>
|
478
|
-
</fo:block-container>
|
479
|
-
|
480
|
-
<fo:block-container absolute-position="fixed" left="16.5mm" top="204mm" height="60mm" width="180mm" display-align="after" font-size="10pt">
|
481
|
-
<fo:block line-height="140%">
|
482
|
-
<xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = '']"/>
|
483
|
-
<fo:block>
|
484
|
-
<fo:inline font-weight="bold">
|
485
|
-
<!-- Submission Date: -->
|
486
|
-
<xsl:call-template name="getLocalizedString">
|
487
|
-
<xsl:with-param name="key">submission_date</xsl:with-param>
|
488
|
-
</xsl:call-template><xsl:text>: </xsl:text>
|
489
|
-
</fo:inline>
|
490
|
-
<xsl:choose>
|
491
|
-
<xsl:when test="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on">
|
492
|
-
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on"/>
|
493
|
-
</xsl:when>
|
494
|
-
<xsl:otherwise>XXX</xsl:otherwise>
|
495
|
-
</xsl:choose>
|
496
|
-
</fo:block>
|
497
|
-
<fo:block>
|
498
|
-
<fo:inline font-weight="bold">
|
499
|
-
<!-- Approval Date: -->
|
500
|
-
<xsl:call-template name="getLocalizedString">
|
501
|
-
<xsl:with-param name="key">approval_date</xsl:with-param>
|
502
|
-
</xsl:call-template><xsl:text>: </xsl:text>
|
503
|
-
</fo:inline>
|
504
|
-
<xsl:choose>
|
505
|
-
<xsl:when test="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on">
|
506
|
-
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on"/>
|
507
|
-
</xsl:when>
|
508
|
-
<xsl:otherwise>XXX</xsl:otherwise>
|
509
|
-
</xsl:choose>
|
510
|
-
</fo:block>
|
511
|
-
<fo:block>
|
512
|
-
<fo:inline font-weight="bold">
|
513
|
-
<!-- Publication Date: -->
|
514
|
-
<xsl:call-template name="getLocalizedString">
|
515
|
-
<xsl:with-param name="key">publication_date</xsl:with-param>
|
516
|
-
</xsl:call-template><xsl:text>: </xsl:text>
|
517
|
-
</fo:inline>
|
518
|
-
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']/mn:on"/>
|
519
|
-
</fo:block>
|
520
|
-
|
521
|
-
<fo:block margin-bottom="12pt">
|
522
|
-
<xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
|
523
|
-
<fo:block>
|
524
|
-
<fo:inline font-weight="bold">
|
525
|
-
<!-- Author: -->
|
526
|
-
<xsl:call-template name="getLocalizedString">
|
527
|
-
<xsl:with-param name="key">author</xsl:with-param>
|
528
|
-
</xsl:call-template><xsl:text>: </xsl:text>
|
529
|
-
</fo:inline>
|
530
|
-
<xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
|
531
|
-
<xsl:value-of select="."/>
|
532
|
-
<xsl:if test="position() != last()">, </xsl:if>
|
533
|
-
</xsl:for-each>
|
534
|
-
</fo:block>
|
535
|
-
</xsl:if>
|
536
|
-
<xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
|
537
|
-
<fo:block>
|
538
|
-
<fo:inline font-weight="bold">
|
539
|
-
<!-- Editor: -->
|
540
|
-
<xsl:call-template name="getLocalizedString">
|
541
|
-
<xsl:with-param name="key">editor_full</xsl:with-param>
|
542
|
-
</xsl:call-template><xsl:text>: </xsl:text>
|
543
|
-
</fo:inline>
|
544
|
-
<xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
|
545
|
-
<xsl:value-of select="."/>
|
546
|
-
<xsl:if test="position() != last()">, </xsl:if>
|
547
|
-
</xsl:for-each>
|
548
|
-
</fo:block>
|
549
|
-
</xsl:if>
|
550
|
-
<xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='contributor']/mn:person/mn:name/mn:completename">
|
551
|
-
<fo:block>
|
552
|
-
<fo:inline font-weight="bold">
|
553
|
-
<!-- Contributor: -->
|
554
|
-
<xsl:call-template name="getLocalizedString">
|
555
|
-
<xsl:with-param name="key">contributor</xsl:with-param>
|
556
|
-
</xsl:call-template><xsl:text>: </xsl:text>
|
557
|
-
</fo:inline>
|
558
|
-
<xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='contributor']/mn:person/mn:name/mn:completename">
|
559
|
-
<xsl:value-of select="."/>
|
560
|
-
<xsl:if test="position() != last()">, </xsl:if>
|
561
|
-
</xsl:for-each>
|
562
|
-
</fo:block>
|
563
|
-
</xsl:if>
|
564
|
-
</fo:block>
|
565
|
-
</fo:block>
|
566
|
-
|
567
|
-
<xsl:choose>
|
568
|
-
<xsl:when test="$isLegacy = 'true'">
|
569
|
-
<fo:block-container margin-left="-7mm" color="{$color_design}" background-color="{$color_background_blue}" width="202mm">
|
570
|
-
<fo:block-container margin-left="2.5mm" margin-right="1mm" padding-top="0.5mm" padding-bottom="0.5mm">
|
571
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
572
|
-
<fo:block>
|
573
|
-
<xsl:variable name="legal_statement">
|
574
|
-
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
|
575
|
-
</xsl:variable>
|
576
|
-
<xsl:apply-templates select="xalan:nodeset($legal_statement)/*">
|
577
|
-
<xsl:with-param name="isLegacy" select="$isLegacy"/>
|
578
|
-
</xsl:apply-templates>
|
579
|
-
</fo:block>
|
580
|
-
</fo:block-container>
|
581
|
-
</fo:block-container>
|
582
|
-
</fo:block-container>
|
583
|
-
</xsl:when>
|
584
|
-
<xsl:otherwise>
|
585
|
-
<xsl:variable name="legal_statement">
|
586
|
-
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
|
587
|
-
</xsl:variable>
|
588
|
-
<xsl:apply-templates select="xalan:nodeset($legal_statement)/*"/>
|
589
|
-
</xsl:otherwise>
|
590
|
-
</xsl:choose>
|
591
|
-
|
592
|
-
</fo:block-container>
|
593
|
-
|
594
|
-
</fo:flow>
|
595
|
-
</fo:page-sequence>
|
596
|
-
<!-- End Cover Page -->
|
354
|
+
<xsl:call-template name="cover-page"/>
|
597
355
|
|
598
356
|
<!-- Copyright, Content, Foreword, etc. pages -->
|
599
357
|
<fo:page-sequence master-reference="preface" initial-page-number="2" format="i" force-page-count="no-force">
|
@@ -773,6 +531,256 @@
|
|
773
531
|
|
774
532
|
</xsl:template>
|
775
533
|
|
534
|
+
<xsl:template name="cover-page">
|
535
|
+
<!-- Cover Page -->
|
536
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
537
|
+
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
538
|
+
|
539
|
+
<fo:flow flow-name="xsl-region-body" color="white">
|
540
|
+
|
541
|
+
<xsl:variable name="curr_lang" select="/mn:metanorma/mn:bibdata/mn:language[@current = 'true']"/>
|
542
|
+
<xsl:variable name="stage" select="/mn:metanorma/mn:bibdata/mn:status/mn:stage[@language = $curr_lang] | /mn:metanorma/mn:bibdata/mn:status/mn:stage[not(@language)]"/>
|
543
|
+
<xsl:variable name="isLegacy" select="normalize-space($stage = 'deprecated' or $stage = 'legacy' or $stage = 'retired' or $stage = 'rescinded')"/>
|
544
|
+
|
545
|
+
<!-- background image -->
|
546
|
+
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
|
547
|
+
<fo:block>
|
548
|
+
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
549
|
+
</fo:block>
|
550
|
+
</fo:block-container>
|
551
|
+
|
552
|
+
<xsl:call-template name="insertBackgroundColor">
|
553
|
+
<xsl:with-param name="opacity">0.85</xsl:with-param>
|
554
|
+
</xsl:call-template>
|
555
|
+
|
556
|
+
<xsl:call-template name="insertCrossingLines"/>
|
557
|
+
|
558
|
+
<!-- title and logo -->
|
559
|
+
<fo:block>
|
560
|
+
<fo:table table-layout="fixed" width="100%">
|
561
|
+
<fo:table-column column-width="75%"/>
|
562
|
+
<fo:table-column column-width="25%"/>
|
563
|
+
<fo:table-body>
|
564
|
+
<fo:table-row>
|
565
|
+
<fo:table-cell font-weight="bold">
|
566
|
+
<fo:block font-size="16pt" color="{$color_design}" margin-bottom="4pt">
|
567
|
+
<xsl:variable name="ogc_document" select="concat('OGC® DOCUMENT: ', $docnumber)"/>
|
568
|
+
<xsl:call-template name="addLetterSpacing">
|
569
|
+
<xsl:with-param name="text" select="$ogc_document"/>
|
570
|
+
<xsl:with-param name="letter-spacing" select="0.3"/>
|
571
|
+
</xsl:call-template>
|
572
|
+
</fo:block>
|
573
|
+
<xsl:variable name="ogc_external" select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type='ogc-external']"/>
|
574
|
+
<xsl:if test="normalize-space($ogc_external) != ''">
|
575
|
+
<fo:block font-size="10pt">External identifier of this OGC<fo:inline font-size="58%" baseline-shift="30%">®</fo:inline> document: <fo:inline font-weight="normal"><xsl:value-of select="$ogc_external"/></fo:inline></fo:block>
|
576
|
+
</xsl:if>
|
577
|
+
</fo:table-cell>
|
578
|
+
<fo:table-cell text-align="right">
|
579
|
+
<fo:block>
|
580
|
+
<xsl:call-template name="insertLogo"/>
|
581
|
+
</fo:block>
|
582
|
+
</fo:table-cell>
|
583
|
+
</fo:table-row>
|
584
|
+
</fo:table-body>
|
585
|
+
</fo:table>
|
586
|
+
</fo:block>
|
587
|
+
|
588
|
+
<!-- <fo:block-container absolute-position="fixed" left="16.5mm" top="83mm" height="90mm"> -->
|
589
|
+
<fo:block-container absolute-position="fixed" left="16.5mm" top="40mm" height="170mm">
|
590
|
+
<fo:block-container width="155mm" height="99%" display-align="center">
|
591
|
+
<fo:block font-size="33pt" role="H1">
|
592
|
+
<xsl:variable name="length_title" select="string-length($doctitle)"/>
|
593
|
+
<xsl:variable name="fit_font-size">
|
594
|
+
<xsl:choose>
|
595
|
+
<xsl:when test="$length_title > 230">20</xsl:when>
|
596
|
+
<xsl:when test="$length_title > 170">26</xsl:when>
|
597
|
+
<xsl:when test="$length_title > 155">28</xsl:when>
|
598
|
+
<xsl:when test="$length_title > 130">30</xsl:when>
|
599
|
+
</xsl:choose>
|
600
|
+
</xsl:variable>
|
601
|
+
<xsl:if test="normalize-space($fit_font-size) != ''">
|
602
|
+
<xsl:attribute name="font-size"><xsl:value-of select="$fit_font-size"/>pt</xsl:attribute>
|
603
|
+
</xsl:if>
|
604
|
+
<xsl:call-template name="addLetterSpacing">
|
605
|
+
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctitle))"/>
|
606
|
+
<xsl:with-param name="letter-spacing" select="1.1"/>
|
607
|
+
</xsl:call-template>
|
608
|
+
</fo:block>
|
609
|
+
<fo:block-container width="22.5mm" border-bottom="2pt solid {$color_design}" margin-bottom="24pt">
|
610
|
+
<fo:block margin-top="4pt"> </fo:block>
|
611
|
+
</fo:block-container>
|
612
|
+
<fo:block color="{$color_design}">
|
613
|
+
<fo:block font-size="17pt">
|
614
|
+
<xsl:call-template name="addLetterSpacing">
|
615
|
+
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctype))"/>
|
616
|
+
</xsl:call-template>
|
617
|
+
<xsl:value-of select="$linebreak"/>
|
618
|
+
<xsl:variable name="docsubtype" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:subdoctype)"/>
|
619
|
+
<xsl:variable name="docsubtype_str">
|
620
|
+
<xsl:choose>
|
621
|
+
<xsl:when test="$docsubtype = 'implementation'">Implementation</xsl:when>
|
622
|
+
<xsl:when test="$docsubtype = 'conceptual-model'">Conceptual model</xsl:when>
|
623
|
+
<xsl:when test="$docsubtype = 'conceptual-model-and-encoding'">Conceptual model & encoding</xsl:when>
|
624
|
+
<xsl:when test="$docsubtype = 'conceptual-model-and-implementation'">Conceptual model & implementation</xsl:when>
|
625
|
+
<xsl:when test="$docsubtype = 'encoding'">Encoding</xsl:when>
|
626
|
+
<xsl:when test="$docsubtype = 'extension'">Extension</xsl:when>
|
627
|
+
<xsl:when test="$docsubtype = 'profile'">Profile</xsl:when>
|
628
|
+
<xsl:when test="$docsubtype = 'profile-with-extension'">Profile with extension</xsl:when>
|
629
|
+
<xsl:when test="$docsubtype = 'general'">General</xsl:when>
|
630
|
+
</xsl:choose>
|
631
|
+
</xsl:variable>
|
632
|
+
<xsl:call-template name="addLetterSpacing">
|
633
|
+
<xsl:with-param name="text" select="$docsubtype_str"/>
|
634
|
+
<xsl:with-param name="letter-spacing" select="0.25"/>
|
635
|
+
</xsl:call-template>
|
636
|
+
</fo:block>
|
637
|
+
<xsl:variable name="stage_uc" select="java:toUpperCase(java:java.lang.String.new($stage))"/>
|
638
|
+
|
639
|
+
<xsl:choose>
|
640
|
+
<xsl:when test="$isLegacy = 'true'">
|
641
|
+
<fo:block-container font-size="17pt" background-color="{$color_background_blue}" margin-left="-2.5mm" height="11.5mm" width="56mm" display-align="center" margin-top="0.5mm">
|
642
|
+
<fo:block-container margin-left="2.5mm">
|
643
|
+
<fo:block-container margin-left="0mm">
|
644
|
+
<fo:block margin-top="1mm">
|
645
|
+
<xsl:call-template name="addLetterSpacing">
|
646
|
+
<xsl:with-param name="text" select="$stage_uc"/>
|
647
|
+
</xsl:call-template>
|
648
|
+
</fo:block>
|
649
|
+
</fo:block-container>
|
650
|
+
</fo:block-container>
|
651
|
+
</fo:block-container>
|
652
|
+
</xsl:when>
|
653
|
+
<xsl:otherwise>
|
654
|
+
<fo:block font-size="12pt" font-weight="bold" margin-top="14pt">
|
655
|
+
<xsl:call-template name="addLetterSpacing">
|
656
|
+
<xsl:with-param name="text" select="$stage_uc"/>
|
657
|
+
</xsl:call-template>
|
658
|
+
</fo:block>
|
659
|
+
</xsl:otherwise>
|
660
|
+
</xsl:choose>
|
661
|
+
|
662
|
+
</fo:block>
|
663
|
+
</fo:block-container>
|
664
|
+
</fo:block-container>
|
665
|
+
|
666
|
+
<fo:block-container absolute-position="fixed" left="16.5mm" top="204mm" height="60mm" width="180mm" display-align="after" font-size="10pt">
|
667
|
+
<fo:block line-height="140%">
|
668
|
+
<xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = '']"/>
|
669
|
+
<fo:block>
|
670
|
+
<fo:inline font-weight="bold">
|
671
|
+
<!-- Submission Date: -->
|
672
|
+
<xsl:call-template name="getLocalizedString">
|
673
|
+
<xsl:with-param name="key">submission_date</xsl:with-param>
|
674
|
+
</xsl:call-template><xsl:text>: </xsl:text>
|
675
|
+
</fo:inline>
|
676
|
+
<xsl:choose>
|
677
|
+
<xsl:when test="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on">
|
678
|
+
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'received']/mn:on"/>
|
679
|
+
</xsl:when>
|
680
|
+
<xsl:otherwise>XXX</xsl:otherwise>
|
681
|
+
</xsl:choose>
|
682
|
+
</fo:block>
|
683
|
+
<fo:block>
|
684
|
+
<fo:inline font-weight="bold">
|
685
|
+
<!-- Approval Date: -->
|
686
|
+
<xsl:call-template name="getLocalizedString">
|
687
|
+
<xsl:with-param name="key">approval_date</xsl:with-param>
|
688
|
+
</xsl:call-template><xsl:text>: </xsl:text>
|
689
|
+
</fo:inline>
|
690
|
+
<xsl:choose>
|
691
|
+
<xsl:when test="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on">
|
692
|
+
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']/mn:on"/>
|
693
|
+
</xsl:when>
|
694
|
+
<xsl:otherwise>XXX</xsl:otherwise>
|
695
|
+
</xsl:choose>
|
696
|
+
</fo:block>
|
697
|
+
<fo:block>
|
698
|
+
<fo:inline font-weight="bold">
|
699
|
+
<!-- Publication Date: -->
|
700
|
+
<xsl:call-template name="getLocalizedString">
|
701
|
+
<xsl:with-param name="key">publication_date</xsl:with-param>
|
702
|
+
</xsl:call-template><xsl:text>: </xsl:text>
|
703
|
+
</fo:inline>
|
704
|
+
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:date[@type = 'published']/mn:on"/>
|
705
|
+
</fo:block>
|
706
|
+
|
707
|
+
<fo:block margin-bottom="12pt">
|
708
|
+
<xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
|
709
|
+
<fo:block>
|
710
|
+
<fo:inline font-weight="bold">
|
711
|
+
<!-- Author: -->
|
712
|
+
<xsl:call-template name="getLocalizedString">
|
713
|
+
<xsl:with-param name="key">author</xsl:with-param>
|
714
|
+
</xsl:call-template><xsl:text>: </xsl:text>
|
715
|
+
</fo:inline>
|
716
|
+
<xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='author']/mn:person/mn:name/mn:completename">
|
717
|
+
<xsl:value-of select="."/>
|
718
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
719
|
+
</xsl:for-each>
|
720
|
+
</fo:block>
|
721
|
+
</xsl:if>
|
722
|
+
<xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
|
723
|
+
<fo:block>
|
724
|
+
<fo:inline font-weight="bold">
|
725
|
+
<!-- Editor: -->
|
726
|
+
<xsl:call-template name="getLocalizedString">
|
727
|
+
<xsl:with-param name="key">editor_full</xsl:with-param>
|
728
|
+
</xsl:call-template><xsl:text>: </xsl:text>
|
729
|
+
</fo:inline>
|
730
|
+
<xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='editor']/mn:person/mn:name/mn:completename">
|
731
|
+
<xsl:value-of select="."/>
|
732
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
733
|
+
</xsl:for-each>
|
734
|
+
</fo:block>
|
735
|
+
</xsl:if>
|
736
|
+
<xsl:if test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='contributor']/mn:person/mn:name/mn:completename">
|
737
|
+
<fo:block>
|
738
|
+
<fo:inline font-weight="bold">
|
739
|
+
<!-- Contributor: -->
|
740
|
+
<xsl:call-template name="getLocalizedString">
|
741
|
+
<xsl:with-param name="key">contributor</xsl:with-param>
|
742
|
+
</xsl:call-template><xsl:text>: </xsl:text>
|
743
|
+
</fo:inline>
|
744
|
+
<xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type='contributor']/mn:person/mn:name/mn:completename">
|
745
|
+
<xsl:value-of select="."/>
|
746
|
+
<xsl:if test="position() != last()">, </xsl:if>
|
747
|
+
</xsl:for-each>
|
748
|
+
</fo:block>
|
749
|
+
</xsl:if>
|
750
|
+
</fo:block>
|
751
|
+
</fo:block>
|
752
|
+
|
753
|
+
<xsl:choose>
|
754
|
+
<xsl:when test="$isLegacy = 'true'">
|
755
|
+
<fo:block-container margin-left="-7mm" color="{$color_design}" background-color="{$color_background_blue}" width="202mm">
|
756
|
+
<fo:block-container margin-left="2.5mm" margin-right="1mm" padding-top="0.5mm" padding-bottom="0.5mm">
|
757
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
758
|
+
<fo:block>
|
759
|
+
<xsl:variable name="legal_statement">
|
760
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
|
761
|
+
</xsl:variable>
|
762
|
+
<xsl:apply-templates select="xalan:nodeset($legal_statement)/*">
|
763
|
+
<xsl:with-param name="isLegacy" select="$isLegacy"/>
|
764
|
+
</xsl:apply-templates>
|
765
|
+
</fo:block>
|
766
|
+
</fo:block-container>
|
767
|
+
</fo:block-container>
|
768
|
+
</fo:block-container>
|
769
|
+
</xsl:when>
|
770
|
+
<xsl:otherwise>
|
771
|
+
<xsl:variable name="legal_statement">
|
772
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement" mode="update_xml_step1"/>
|
773
|
+
</xsl:variable>
|
774
|
+
<xsl:apply-templates select="xalan:nodeset($legal_statement)/*"/>
|
775
|
+
</xsl:otherwise>
|
776
|
+
</xsl:choose>
|
777
|
+
|
778
|
+
</fo:block-container>
|
779
|
+
|
780
|
+
</fo:flow>
|
781
|
+
</fo:page-sequence>
|
782
|
+
</xsl:template> <!-- END: cover-page -->
|
783
|
+
|
776
784
|
<xsl:template name="processPrefaceAndMainSectionsOGC_items">
|
777
785
|
<xsl:variable name="updated_xml_step_move_pagebreak">
|
778
786
|
|
@@ -830,7 +838,7 @@
|
|
830
838
|
|
831
839
|
<xsl:template name="insertListOf_Title">
|
832
840
|
<xsl:param name="title"/>
|
833
|
-
<fo:block-container
|
841
|
+
<fo:block-container xsl:use-attribute-sets="toc-listof-title-style">
|
834
842
|
<fo:block-container margin-left="0mm" role="H2">
|
835
843
|
<xsl:call-template name="insertSectionTitle">
|
836
844
|
<xsl:with-param name="title" select="$title"/>
|
@@ -840,7 +848,7 @@
|
|
840
848
|
</xsl:template>
|
841
849
|
|
842
850
|
<xsl:template name="insertListOf_Item">
|
843
|
-
<fo:block
|
851
|
+
<fo:block xsl:use-attribute-sets="toc-listof-item-style">
|
844
852
|
<fo:basic-link internal-destination="{@id}">
|
845
853
|
<xsl:call-template name="setAltText">
|
846
854
|
<xsl:with-param name="value" select="@alt-text"/>
|
@@ -848,34 +856,27 @@
|
|
848
856
|
<!-- <xsl:copy-of select="node()"/> -->
|
849
857
|
<xsl:apply-templates select="." mode="contents"/>
|
850
858
|
<fo:inline keep-together.within-line="always">
|
851
|
-
<fo:leader
|
859
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
852
860
|
<fo:page-number-citation ref-id="{@id}"/>
|
853
861
|
</fo:inline>
|
854
862
|
</fo:basic-link>
|
855
863
|
</fo:block>
|
856
864
|
</xsl:template>
|
857
865
|
|
858
|
-
<xsl:template match="mn:preface//mn:clause[@type = 'toc']" priority="4">
|
866
|
+
<xsl:template match="mn:preface//mn:clause[@type = 'toc']" name="toc" priority="4">
|
859
867
|
<fo:block color="{$color_text_title}">
|
860
868
|
|
861
869
|
<xsl:apply-templates/>
|
862
870
|
|
863
|
-
<xsl:if test="count(*) = 1 and mn:title"> <!-- if there isn't user ToC -->
|
871
|
+
<xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
|
864
872
|
|
865
873
|
<fo:block-container line-height="130%">
|
866
874
|
<fo:block role="TOC">
|
867
875
|
<xsl:for-each select="$contents//mnx:item[@display = 'true' and normalize-space(@id) != '']">
|
868
876
|
|
869
|
-
<fo:block
|
870
|
-
|
871
|
-
|
872
|
-
</xsl:if>
|
873
|
-
<xsl:if test="@level = 1 or @parent = 'annex'">
|
874
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
875
|
-
</xsl:if>
|
876
|
-
<xsl:if test="@level >= 2"> <!-- and not(@parent = 'annex') -->
|
877
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
878
|
-
</xsl:if>
|
877
|
+
<fo:block xsl:use-attribute-sets="toc-item-style">
|
878
|
+
|
879
|
+
<xsl:call-template name="refine_toc-item-style"/>
|
879
880
|
|
880
881
|
<xsl:choose>
|
881
882
|
<xsl:when test="@level = 1">
|
@@ -901,7 +902,7 @@
|
|
901
902
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($sectionTitle))"/>
|
902
903
|
<xsl:text> </xsl:text>
|
903
904
|
<fo:inline keep-together.within-line="always">
|
904
|
-
<fo:leader
|
905
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
905
906
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
906
907
|
</fo:inline>
|
907
908
|
</fo:basic-link>
|
@@ -927,7 +928,7 @@
|
|
927
928
|
<xsl:apply-templates select="mnx:title"/>
|
928
929
|
<xsl:text> </xsl:text>
|
929
930
|
<fo:inline keep-together.within-line="always">
|
930
|
-
<fo:leader
|
931
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
931
932
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
932
933
|
</fo:inline>
|
933
934
|
</fo:basic-link>
|
@@ -979,7 +980,7 @@
|
|
979
980
|
<xsl:copy-of select="title/node()"/>
|
980
981
|
<xsl:text> </xsl:text>
|
981
982
|
<fo:inline keep-together.within-line="always">
|
982
|
-
<fo:leader
|
983
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
983
984
|
<fo:page-number-citation ref-id="{@id}"/>
|
984
985
|
</fo:inline>
|
985
986
|
</fo:basic-link>
|
@@ -994,25 +995,20 @@
|
|
994
995
|
|
995
996
|
</xsl:template>
|
996
997
|
|
997
|
-
<xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:title" priority="3">
|
998
|
+
<xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
|
998
999
|
<xsl:variable name="title-toc">
|
999
1000
|
<xsl:apply-templates/>
|
1000
|
-
<!-- <xsl:call-template name="getTitle">
|
1001
|
-
<xsl:with-param name="name" select="'title-toc'"/>
|
1002
|
-
</xsl:call-template> -->
|
1003
1001
|
</xsl:variable>
|
1004
1002
|
|
1005
|
-
<fo:block-container margin-left="-18mm">
|
1003
|
+
<fo:block-container margin-left="-18mm" margin-bottom="40pt">
|
1006
1004
|
<fo:block-container margin-left="0mm">
|
1007
|
-
<fo:block
|
1008
|
-
<
|
1009
|
-
<xsl:
|
1010
|
-
|
1011
|
-
|
1012
|
-
</xsl:call-template>
|
1013
|
-
</fo:block>
|
1014
|
-
<xsl:call-template name="insertBigHorizontalLine"/>
|
1005
|
+
<fo:block xsl:use-attribute-sets="toc-title-style">
|
1006
|
+
<xsl:call-template name="addLetterSpacing">
|
1007
|
+
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($title-toc))"/>
|
1008
|
+
<xsl:with-param name="letter-spacing" select="1.1"/>
|
1009
|
+
</xsl:call-template>
|
1015
1010
|
</fo:block>
|
1011
|
+
<xsl:call-template name="insertBigHorizontalLine"/>
|
1016
1012
|
</fo:block-container>
|
1017
1013
|
</fo:block-container>
|
1018
1014
|
</xsl:template>
|
@@ -1266,7 +1262,7 @@
|
|
1266
1262
|
</fo:block>
|
1267
1263
|
</xsl:template>
|
1268
1264
|
|
1269
|
-
<xsl:template match="mn:legal-statement//mn:title" priority="2">
|
1265
|
+
<xsl:template match="mn:legal-statement//mn:fmt-title" priority="2">
|
1270
1266
|
<xsl:variable name="level">
|
1271
1267
|
<xsl:call-template name="getLevel"/>
|
1272
1268
|
</xsl:variable>
|
@@ -1276,7 +1272,7 @@
|
|
1276
1272
|
</fo:inline>
|
1277
1273
|
</xsl:template>
|
1278
1274
|
|
1279
|
-
<xsl:template match="mn:legal-statement//mn:title/text() | mn:license-statement//mn:title/text() | mn:copyright-statement//mn:title/text()">
|
1275
|
+
<xsl:template match="mn:legal-statement//mn:fmt-title/text() | mn:license-statement//mn:fmt-title/text() | mn:copyright-statement//mn:fmt-title/text()">
|
1280
1276
|
<xsl:call-template name="addLetterSpacing">
|
1281
1277
|
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new(.))"/>
|
1282
1278
|
</xsl:call-template>
|
@@ -1310,7 +1306,7 @@
|
|
1310
1306
|
<!-- ====== -->
|
1311
1307
|
<!-- title -->
|
1312
1308
|
<!-- ====== -->
|
1313
|
-
<xsl:template match="mn:title" name="title">
|
1309
|
+
<xsl:template match="mn:fmt-title" name="title">
|
1314
1310
|
|
1315
1311
|
<xsl:variable name="level">
|
1316
1312
|
<xsl:call-template name="getLevel"/>
|
@@ -1433,7 +1429,7 @@
|
|
1433
1429
|
<xsl:variable name="element-name">
|
1434
1430
|
<xsl:choose>
|
1435
1431
|
<xsl:when test="$inline = 'true'">fo:inline</xsl:when>
|
1436
|
-
<xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
|
1432
|
+
<xsl:when test="../@inline-header = 'true' and $previous-element = 'fmt-title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
|
1437
1433
|
<xsl:when test="parent::mn:admonition">fo:inline</xsl:when>
|
1438
1434
|
<xsl:otherwise>fo:block</xsl:otherwise>
|
1439
1435
|
</xsl:choose>
|
@@ -1525,14 +1521,14 @@
|
|
1525
1521
|
<fo:list-item-label><fo:block/></fo:list-item-label>
|
1526
1522
|
<fo:list-item-body>
|
1527
1523
|
<fo:block>
|
1528
|
-
<xsl:apply-templates select="mn:name"/>
|
1529
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
1524
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
1525
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
1530
1526
|
</fo:block>
|
1531
1527
|
</fo:list-item-body>
|
1532
1528
|
</fo:list-item>
|
1533
1529
|
</xsl:template>
|
1534
1530
|
|
1535
|
-
<xsl:template match="mn:term/mn:name" priority="2">
|
1531
|
+
<xsl:template match="mn:term/mn:fmt-name" priority="2">
|
1536
1532
|
<xsl:variable name="levelTerm">
|
1537
1533
|
<xsl:call-template name="getLevelTermName"/>
|
1538
1534
|
</xsl:variable>
|
@@ -1544,7 +1540,7 @@
|
|
1544
1540
|
</fo:list-item-label>
|
1545
1541
|
<fo:list-item-body start-indent="body-start()">
|
1546
1542
|
<fo:block>
|
1547
|
-
<xsl:apply-templates select="../mn:preferred | ../mn:deprecated | ../mn:deprecates | ../mn:admitted" mode="term_name"/>
|
1543
|
+
<xsl:apply-templates select="../mn:fmt-preferred | ../mn:fmt-deprecated | ../mn:fmt-deprecates | ../mn:fmt-admitted" mode="term_name"/>
|
1548
1544
|
</fo:block>
|
1549
1545
|
</fo:list-item-body>
|
1550
1546
|
</fo:list-item>
|
@@ -1553,17 +1549,17 @@
|
|
1553
1549
|
</fo:block>
|
1554
1550
|
</xsl:template>
|
1555
1551
|
|
1556
|
-
<xsl:template match="mn:preferred | mn:deprecated | mn:deprecates | mn:admitted" priority="2"/>
|
1552
|
+
<xsl:template match="mn:fmt-preferred | mn:fmt-deprecated | mn:fmt-deprecates | mn:fmt-admitted" priority="2"/>
|
1557
1553
|
|
1558
1554
|
<!-- first preferred displays on the same line as term/name -->
|
1559
|
-
<xsl:template match="mn:preferred[not(preceding-sibling::mn:preferred)]" mode="term_name" priority="2">
|
1555
|
+
<xsl:template match="mn:fmt-preferred[not(preceding-sibling::mn:fmt-preferred)]" mode="term_name" priority="2">
|
1560
1556
|
<fo:inline font-size="18pt" padding-right="3mm"><xsl:call-template name="setStyle_preferred"/><xsl:apply-templates/></fo:inline>
|
1561
1557
|
<fo:inline padding-right="2mm"> </fo:inline>
|
1562
1558
|
</xsl:template>
|
1563
1559
|
|
1564
|
-
<xsl:template match="mn:preferred | mn:deprecated | mn:deprecates | mn:admitted" mode="term_name">
|
1560
|
+
<xsl:template match="mn:fmt-preferred | mn:fmt-deprecated | mn:fmt-deprecates | mn:fmt-admitted" mode="term_name">
|
1565
1561
|
<xsl:choose>
|
1566
|
-
<xsl:when test="preceding-sibling::*[self::mn:preferred or self::mn:deprecated or self::mn:deprecates or self::admitted]">
|
1562
|
+
<xsl:when test="preceding-sibling::*[self::mn:fmt-preferred or self::mn:fmt-deprecated or self::mn:fmt-deprecates or self::mn:fmt-admitted]">
|
1567
1563
|
<fo:block space-before="6pt"><xsl:call-template name="displayTerm"/></fo:block> <!-- block wrapper -->
|
1568
1564
|
</xsl:when>
|
1569
1565
|
<xsl:otherwise><xsl:call-template name="displayTerm"/></xsl:otherwise>
|
@@ -1585,7 +1581,7 @@
|
|
1585
1581
|
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($kind))"/>
|
1586
1582
|
</xsl:call-template>
|
1587
1583
|
</fo:inline> -->
|
1588
|
-
<xsl:if test="following-sibling::*[self::mn:preferred or self::mn:deprecated or self::mn:deprecates or self::mn:admitted]">
|
1584
|
+
<xsl:if test="following-sibling::*[self::mn:fmt-preferred or self::mn:fmt-deprecated or self::mn:fmt-deprecates or self::mn:fmt-admitted]">
|
1589
1585
|
<fo:inline padding-right="2mm"> </fo:inline>
|
1590
1586
|
</xsl:if>
|
1591
1587
|
</xsl:template>
|
@@ -1630,7 +1626,7 @@
|
|
1630
1626
|
<fo:block-container id="{@id}" margin-top="12pt" margin-bottom="12pt">
|
1631
1627
|
<fo:block>
|
1632
1628
|
<xsl:apply-templates select="mn:note[@type = 'units']"/>
|
1633
|
-
<xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]">
|
1629
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]">
|
1634
1630
|
<xsl:with-param name="indent" select="$indent"/>
|
1635
1631
|
</xsl:apply-templates>
|
1636
1632
|
</fo:block>
|
@@ -1638,7 +1634,7 @@
|
|
1638
1634
|
<xsl:for-each select="mn:note[not(@type = 'units')]">
|
1639
1635
|
<xsl:call-template name="note"/>
|
1640
1636
|
</xsl:for-each>
|
1641
|
-
<xsl:apply-templates select="mn:name"/>
|
1637
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
1642
1638
|
</fo:block-container>
|
1643
1639
|
</xsl:template>
|
1644
1640
|
|
@@ -1930,7 +1926,7 @@
|
|
1930
1926
|
<xsl:value-of select="$linebreak"/>
|
1931
1927
|
</xsl:template>
|
1932
1928
|
|
1933
|
-
<xsl:template match="mn:name/text()[1]" priority="2">
|
1929
|
+
<xsl:template match="mn:fmt-name/text()[1]" priority="2">
|
1934
1930
|
<!-- 0xA0 to space replacement -->
|
1935
1931
|
<xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
1936
1932
|
<xsl:variable name="separator" select="' — '"/>
|
@@ -2106,10 +2102,6 @@
|
|
2106
2102
|
<title-part lang="ru">
|
2107
2103
|
</title-part>
|
2108
2104
|
<title-part lang="zh">第 # 部分:</title-part>
|
2109
|
-
|
2110
|
-
<title-subpart lang="en">Sub-part #</title-subpart>
|
2111
|
-
<title-subpart lang="fr">Partie de sub #</title-subpart>
|
2112
|
-
|
2113
2105
|
</xsl:variable>
|
2114
2106
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
2115
2107
|
|
@@ -2563,7 +2555,8 @@
|
|
2563
2555
|
<xsl:template match="mn:stem" mode="update_xml_step1"/>
|
2564
2556
|
|
2565
2557
|
<xsl:template match="mn:fmt-stem" mode="update_xml_step1">
|
2566
|
-
<xsl:element name="stem" namespace="{$namespace_full}">
|
2558
|
+
<!-- <xsl:element name="stem" namespace="{$namespace_full}"> -->
|
2559
|
+
<xsl:copy>
|
2567
2560
|
<xsl:copy-of select="@*"/>
|
2568
2561
|
<xsl:choose>
|
2569
2562
|
<xsl:when test="mn:semx and count(node()) = 1">
|
@@ -2587,7 +2580,8 @@
|
|
2587
2580
|
</xsl:choose>
|
2588
2581
|
</xsl:otherwise>
|
2589
2582
|
</xsl:choose>
|
2590
|
-
</xsl:
|
2583
|
+
</xsl:copy>
|
2584
|
+
<!-- </xsl:element> -->
|
2591
2585
|
</xsl:template>
|
2592
2586
|
|
2593
2587
|
<xsl:template match="mn:image[not(.//mn:passthrough)] | mn:bibdata[not(.//mn:passthrough)] | mn:localized-strings" mode="update_xml_step1">
|
@@ -2749,12 +2743,14 @@
|
|
2749
2743
|
</xsl:template>
|
2750
2744
|
|
2751
2745
|
<xsl:template match="mn:fmt-title" mode="update_xml_step1">
|
2752
|
-
<xsl:element name="title" namespace="{$namespace_full}">
|
2746
|
+
<!-- <xsl:element name="title" namespace="{$namespace_full}"> -->
|
2747
|
+
<xsl:copy>
|
2753
2748
|
<xsl:copy-of select="@*"/>
|
2754
2749
|
<xsl:call-template name="addNamedDestinationAttribute"/>
|
2755
2750
|
|
2756
2751
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2757
|
-
</xsl:
|
2752
|
+
</xsl:copy>
|
2753
|
+
<!-- </xsl:element> -->
|
2758
2754
|
</xsl:template>
|
2759
2755
|
|
2760
2756
|
<xsl:template name="addNamedDestinationAttribute">
|
@@ -2766,12 +2762,14 @@
|
|
2766
2762
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2767
2763
|
</xsl:when>
|
2768
2764
|
<xsl:otherwise>
|
2769
|
-
<xsl:element name="name" namespace="{$namespace_full}">
|
2765
|
+
<!-- <xsl:element name="name" namespace="{$namespace_full}"> -->
|
2766
|
+
<xsl:copy>
|
2770
2767
|
<xsl:copy-of select="@*"/>
|
2771
2768
|
<xsl:call-template name="addNamedDestinationAttribute"/>
|
2772
2769
|
|
2773
2770
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2774
|
-
</xsl:
|
2771
|
+
</xsl:copy>
|
2772
|
+
<!-- </xsl:element> -->
|
2775
2773
|
</xsl:otherwise>
|
2776
2774
|
</xsl:choose>
|
2777
2775
|
</xsl:template>
|
@@ -2786,7 +2784,7 @@
|
|
2786
2784
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2787
2785
|
</xsl:template>
|
2788
2786
|
<xsl:template match="mn:fmt-preferred[not(mn:p)] | mn:fmt-preferred/mn:p" mode="update_xml_step1">
|
2789
|
-
<xsl:element name="preferred" namespace="{$namespace_full}">
|
2787
|
+
<xsl:element name="fmt-preferred" namespace="{$namespace_full}">
|
2790
2788
|
<xsl:copy-of select="@*"/>
|
2791
2789
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2792
2790
|
</xsl:element>
|
@@ -2796,7 +2794,7 @@
|
|
2796
2794
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2797
2795
|
</xsl:template>
|
2798
2796
|
<xsl:template match="mn:fmt-admitted[not(mn:p)] | mn:fmt-admitted/mn:p" mode="update_xml_step1">
|
2799
|
-
<xsl:element name="admitted" namespace="{$namespace_full}">
|
2797
|
+
<xsl:element name="fmt-admitted" namespace="{$namespace_full}">
|
2800
2798
|
<xsl:copy-of select="@*"/>
|
2801
2799
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2802
2800
|
</xsl:element>
|
@@ -2806,32 +2804,32 @@
|
|
2806
2804
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2807
2805
|
</xsl:template>
|
2808
2806
|
<xsl:template match="mn:fmt-deprecates[not(mn:p)] | mn:fmt-deprecates/mn:p" mode="update_xml_step1">
|
2809
|
-
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
2807
|
+
<xsl:element name="fmt-deprecates" namespace="{$namespace_full}">
|
2810
2808
|
<xsl:copy-of select="@*"/>
|
2811
2809
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2812
2810
|
</xsl:element>
|
2813
2811
|
</xsl:template>
|
2814
2812
|
|
2815
|
-
<xsl:template match="mn:fmt-definition" mode="update_xml_step1">
|
2813
|
+
<!-- <xsl:template match="mn:fmt-definition" mode="update_xml_step1">
|
2816
2814
|
<xsl:element name="definition" namespace="{$namespace_full}">
|
2817
2815
|
<xsl:copy-of select="@*"/>
|
2818
2816
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2819
2817
|
</xsl:element>
|
2820
2818
|
</xsl:template>
|
2821
|
-
|
2819
|
+
|
2822
2820
|
<xsl:template match="mn:fmt-termsource" mode="update_xml_step1">
|
2823
2821
|
<xsl:element name="termsource" namespace="{$namespace_full}">
|
2824
2822
|
<xsl:copy-of select="@*"/>
|
2825
2823
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2826
2824
|
</xsl:element>
|
2827
2825
|
</xsl:template>
|
2828
|
-
|
2826
|
+
|
2829
2827
|
<xsl:template match="mn:fmt-source" mode="update_xml_step1">
|
2830
2828
|
<xsl:element name="source" namespace="{$namespace_full}">
|
2831
2829
|
<xsl:copy-of select="@*"/>
|
2832
2830
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2833
2831
|
</xsl:element>
|
2834
|
-
</xsl:template>
|
2832
|
+
</xsl:template> -->
|
2835
2833
|
|
2836
2834
|
<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">
|
2837
2835
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -2854,12 +2852,12 @@
|
|
2854
2852
|
</xsl:template>
|
2855
2853
|
|
2856
2854
|
<xsl:template match="mn:identifier" mode="update_xml_step1"/>
|
2857
|
-
<xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
|
2855
|
+
<!-- <xsl:template match="mn:fmt-identifier" mode="update_xml_step1">
|
2858
2856
|
<xsl:element name="identifier" namespace="{$namespace_full}">
|
2859
2857
|
<xsl:copy-of select="@*"/>
|
2860
2858
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2861
2859
|
</xsl:element>
|
2862
|
-
</xsl:template>
|
2860
|
+
</xsl:template> -->
|
2863
2861
|
|
2864
2862
|
<xsl:template match="mn:concept" mode="update_xml_step1"/>
|
2865
2863
|
|
@@ -2869,51 +2867,53 @@
|
|
2869
2867
|
|
2870
2868
|
<xsl:template match="mn:eref" mode="update_xml_step1"/>
|
2871
2869
|
|
2872
|
-
<xsl:template match="mn:fmt-eref" mode="update_xml_step1">
|
2870
|
+
<!-- <xsl:template match="mn:fmt-eref" mode="update_xml_step1">
|
2873
2871
|
<xsl:element name="eref" namespace="{$namespace_full}">
|
2874
2872
|
<xsl:copy-of select="@*"/>
|
2875
2873
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2876
2874
|
</xsl:element>
|
2877
|
-
</xsl:template>
|
2875
|
+
</xsl:template> -->
|
2878
2876
|
|
2879
2877
|
<xsl:template match="mn:xref" mode="update_xml_step1"/>
|
2880
2878
|
|
2881
|
-
<xsl:template match="mn:fmt-xref" mode="update_xml_step1">
|
2879
|
+
<!-- <xsl:template match="mn:fmt-xref" mode="update_xml_step1">
|
2882
2880
|
<xsl:element name="xref" namespace="{$namespace_full}">
|
2883
2881
|
<xsl:copy-of select="@*"/>
|
2884
2882
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2885
2883
|
</xsl:element>
|
2886
|
-
</xsl:template>
|
2884
|
+
</xsl:template> -->
|
2887
2885
|
|
2888
2886
|
<xsl:template match="mn:link" mode="update_xml_step1"/>
|
2889
2887
|
|
2890
|
-
<xsl:template match="mn:fmt-link" mode="update_xml_step1">
|
2888
|
+
<!-- <xsl:template match="mn:fmt-link" mode="update_xml_step1">
|
2891
2889
|
<xsl:element name="link" namespace="{$namespace_full}">
|
2892
2890
|
<xsl:copy-of select="@*"/>
|
2893
2891
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2894
2892
|
</xsl:element>
|
2895
|
-
</xsl:template>
|
2893
|
+
</xsl:template> -->
|
2896
2894
|
|
2897
2895
|
<xsl:template match="mn:origin" mode="update_xml_step1"/>
|
2898
2896
|
|
2899
|
-
<xsl:template match="mn:fmt-origin" mode="update_xml_step1">
|
2897
|
+
<!-- <xsl:template match="mn:fmt-origin" mode="update_xml_step1">
|
2900
2898
|
<xsl:element name="origin" namespace="{$namespace_full}">
|
2901
2899
|
<xsl:copy-of select="@*"/>
|
2902
2900
|
<xsl:apply-templates mode="update_xml_step1"/>
|
2903
2901
|
</xsl:element>
|
2904
|
-
</xsl:template>
|
2902
|
+
</xsl:template> -->
|
2905
2903
|
|
2906
2904
|
<xsl:template match="mn:erefstack" mode="update_xml_step1"/>
|
2907
2905
|
|
2908
2906
|
<xsl:template match="mn:svgmap" mode="update_xml_step1"/>
|
2909
2907
|
|
2910
|
-
<xsl:template match="mn:
|
2908
|
+
<xsl:template match="mn:annotation-container" mode="update_xml_step1"/>
|
2911
2909
|
|
2912
|
-
|
2913
|
-
|
2914
|
-
|
2915
|
-
|
2916
|
-
|
2910
|
+
<xsl:template match="mn:fmt-identifier[not(ancestor::*[local-name() = 'bibdata'])]//text()" mode="update_xml_step1">
|
2911
|
+
<xsl:element name="{$element_name_keep-together_within-line}" namespace="{$namespace_full}">
|
2912
|
+
<xsl:value-of select="."/>
|
2913
|
+
</xsl:element>
|
2914
|
+
</xsl:template>
|
2915
|
+
|
2916
|
+
<xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
|
2917
2917
|
|
2918
2918
|
<!-- END: update new Presentation XML -->
|
2919
2919
|
|
@@ -3109,7 +3109,7 @@
|
|
3109
3109
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
3110
3110
|
<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>
|
3111
3111
|
|
3112
|
-
<xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:link[not(contains(
|
3112
|
+
<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">
|
3113
3113
|
|
3114
3114
|
<xsl:variable name="parent" select="local-name(..)"/>
|
3115
3115
|
|
@@ -3228,7 +3228,7 @@
|
|
3228
3228
|
</xsl:if>
|
3229
3229
|
</xsl:template>
|
3230
3230
|
|
3231
|
-
<xsl:template match="mn:stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
|
3231
|
+
<xsl:template match="mn:fmt-stem | mn:image" mode="update_xml_enclose_keep-together_within-line">
|
3232
3232
|
<xsl:copy-of select="."/>
|
3233
3233
|
</xsl:template>
|
3234
3234
|
|
@@ -3570,7 +3570,7 @@
|
|
3570
3570
|
</fo:block>
|
3571
3571
|
</xsl:template> <!-- copyright-statement -->
|
3572
3572
|
|
3573
|
-
<xsl:template match="mn:copyright-statement//mn:title">
|
3573
|
+
<xsl:template match="mn:copyright-statement//mn:fmt-title">
|
3574
3574
|
<xsl:variable name="level">
|
3575
3575
|
<xsl:call-template name="getLevel"/>
|
3576
3576
|
</xsl:variable>
|
@@ -3594,7 +3594,7 @@
|
|
3594
3594
|
</fo:block>
|
3595
3595
|
</xsl:template> <!-- license-statement -->
|
3596
3596
|
|
3597
|
-
<xsl:template match="mn:license-statement//mn:title">
|
3597
|
+
<xsl:template match="mn:license-statement//mn:fmt-title">
|
3598
3598
|
<xsl:variable name="level">
|
3599
3599
|
<xsl:call-template name="getLevel"/>
|
3600
3600
|
</xsl:variable>
|
@@ -3622,7 +3622,7 @@
|
|
3622
3622
|
</fo:block>
|
3623
3623
|
</xsl:template> <!-- legal-statement -->
|
3624
3624
|
|
3625
|
-
<xsl:template match="mn:legal-statement//mn:title">
|
3625
|
+
<xsl:template match="mn:legal-statement//mn:fmt-title">
|
3626
3626
|
<!-- process in the template 'title' -->
|
3627
3627
|
<xsl:call-template name="title"/>
|
3628
3628
|
|
@@ -3642,7 +3642,7 @@
|
|
3642
3642
|
</fo:block>
|
3643
3643
|
</xsl:template> <!-- feedback-statement -->
|
3644
3644
|
|
3645
|
-
<xsl:template match="mn:feedback-statement//mn:title">
|
3645
|
+
<xsl:template match="mn:feedback-statement//mn:fmt-title">
|
3646
3646
|
<!-- process in the template 'title' -->
|
3647
3647
|
<xsl:call-template name="title"/>
|
3648
3648
|
</xsl:template>
|
@@ -3666,7 +3666,7 @@
|
|
3666
3666
|
<xsl:template name="refine_link-style">
|
3667
3667
|
</xsl:template> <!-- refine_link-style -->
|
3668
3668
|
|
3669
|
-
<xsl:template match="mn:link" name="link">
|
3669
|
+
<xsl:template match="mn:fmt-link" name="link">
|
3670
3670
|
<xsl:variable name="target_normalized" select="translate(@target, '\', '/')"/>
|
3671
3671
|
<xsl:variable name="target_attachment_name" select="substring-after($target_normalized, '_attachments/')"/>
|
3672
3672
|
<xsl:variable name="isLinkToEmbeddedFile" select="normalize-space(@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target])"/>
|
@@ -3894,7 +3894,7 @@
|
|
3894
3894
|
<xsl:value-of select="."/>
|
3895
3895
|
</xsl:attribute>
|
3896
3896
|
</xsl:for-each>
|
3897
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
3897
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
3898
3898
|
</xsl:when>
|
3899
3899
|
|
3900
3900
|
<xsl:otherwise>
|
@@ -3939,11 +3939,11 @@
|
|
3939
3939
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3940
3940
|
</xsl:if>
|
3941
3941
|
|
3942
|
-
<xsl:apply-templates select="node()[not(self::mn:name or self::mn:dl)]"/>
|
3942
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
|
3943
3943
|
</fo:block>
|
3944
3944
|
|
3945
3945
|
<xsl:apply-templates select="mn:dl"/> <!-- Key table -->
|
3946
|
-
<xsl:apply-templates select="mn:name"/> <!-- show sourcecode's name AFTER content -->
|
3946
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
|
3947
3947
|
<xsl:if test="parent::mn:example">
|
3948
3948
|
<fo:block font-size="1pt" line-height="10%" space-before="6pt"> </fo:block>
|
3949
3949
|
</xsl:if>
|
@@ -4247,7 +4247,7 @@
|
|
4247
4247
|
|
4248
4248
|
<!-- end mode="syntax_highlight" -->
|
4249
4249
|
|
4250
|
-
<xsl:template match="mn:sourcecode/mn:name">
|
4250
|
+
<xsl:template match="mn:sourcecode/mn:fmt-name">
|
4251
4251
|
<xsl:if test="normalize-space() != ''">
|
4252
4252
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4253
4253
|
<xsl:apply-templates/>
|
@@ -4265,11 +4265,11 @@
|
|
4265
4265
|
</xsl:choose>
|
4266
4266
|
</xsl:template>
|
4267
4267
|
|
4268
|
-
<xsl:template match="mn:annotation">
|
4268
|
+
<xsl:template match="mn:callout-annotation">
|
4269
4269
|
<xsl:variable name="annotation-id" select="@id"/>
|
4270
4270
|
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
4271
4271
|
<fo:block id="{$annotation-id}" white-space="nowrap">
|
4272
|
-
<xsl:if test="not(preceding-sibling::mn:annotation)">
|
4272
|
+
<xsl:if test="not(preceding-sibling::mn:callout-annotation)">
|
4273
4273
|
<xsl:attribute name="space-before">6pt</xsl:attribute>
|
4274
4274
|
</xsl:if>
|
4275
4275
|
<fo:inline>
|
@@ -4280,7 +4280,7 @@
|
|
4280
4280
|
</fo:block>
|
4281
4281
|
</xsl:template>
|
4282
4282
|
|
4283
|
-
<xsl:template match="mn:annotation/mn:p">
|
4283
|
+
<xsl:template match="mn:callout-annotation/mn:p">
|
4284
4284
|
<xsl:param name="callout"/>
|
4285
4285
|
<fo:inline id="{@id}">
|
4286
4286
|
<xsl:call-template name="setNamedDestination"/>
|
@@ -4437,7 +4437,7 @@
|
|
4437
4437
|
<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
|
4438
4438
|
<change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
|
4439
4439
|
<xsl:choose>
|
4440
|
-
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (
|
4440
|
+
<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>
|
4441
4441
|
<xsl:otherwise>
|
4442
4442
|
<xsl:variable name="tag">
|
4443
4443
|
<xsl:call-template name="insertTag">
|
@@ -4867,12 +4867,12 @@
|
|
4867
4867
|
<xsl:template match="mn:permission">
|
4868
4868
|
<xsl:call-template name="setNamedDestination"/>
|
4869
4869
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
4870
|
-
<xsl:apply-templates select="mn:name"/>
|
4871
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
4870
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
4871
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4872
4872
|
</fo:block>
|
4873
4873
|
</xsl:template>
|
4874
4874
|
|
4875
|
-
<xsl:template match="mn:permission/mn:name">
|
4875
|
+
<xsl:template match="mn:permission/mn:fmt-name">
|
4876
4876
|
<xsl:if test="normalize-space() != ''">
|
4877
4877
|
<fo:block xsl:use-attribute-sets="permission-name-style">
|
4878
4878
|
<xsl:apply-templates/>
|
@@ -4895,15 +4895,15 @@
|
|
4895
4895
|
<xsl:template match="mn:requirement">
|
4896
4896
|
<xsl:call-template name="setNamedDestination"/>
|
4897
4897
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
4898
|
-
<xsl:apply-templates select="mn:name"/>
|
4898
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
4899
4899
|
<xsl:apply-templates select="mn:label"/>
|
4900
4900
|
<xsl:apply-templates select="@obligation"/>
|
4901
4901
|
<xsl:apply-templates select="mn:subject"/>
|
4902
|
-
<xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:label) and not(self::mn:subject)]"/>
|
4902
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:label) and not(self::mn:subject)]"/>
|
4903
4903
|
</fo:block>
|
4904
4904
|
</xsl:template>
|
4905
4905
|
|
4906
|
-
<xsl:template match="mn:requirement/mn:name">
|
4906
|
+
<xsl:template match="mn:requirement/mn:fmt-name">
|
4907
4907
|
<xsl:if test="normalize-space() != ''">
|
4908
4908
|
|
4909
4909
|
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
@@ -4943,12 +4943,12 @@
|
|
4943
4943
|
<xsl:template match="mn:recommendation">
|
4944
4944
|
<xsl:call-template name="setNamedDestination"/>
|
4945
4945
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
4946
|
-
<xsl:apply-templates select="mn:name"/>
|
4947
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
4946
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
4947
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4948
4948
|
</fo:block>
|
4949
4949
|
</xsl:template>
|
4950
4950
|
|
4951
|
-
<xsl:template match="mn:recommendation/mn:name">
|
4951
|
+
<xsl:template match="mn:recommendation/mn:fmt-name">
|
4952
4952
|
<xsl:if test="normalize-space() != ''">
|
4953
4953
|
|
4954
4954
|
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
@@ -5211,15 +5211,15 @@
|
|
5211
5211
|
<xsl:template match="mn:term">
|
5212
5212
|
<xsl:call-template name="setNamedDestination"/>
|
5213
5213
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
5214
|
-
<xsl:apply-templates select="mn:name"/>
|
5214
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
5215
5215
|
|
5216
5216
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
5217
5217
|
</xsl:if>
|
5218
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
5218
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
5219
5219
|
</fo:block>
|
5220
5220
|
</xsl:template>
|
5221
5221
|
|
5222
|
-
<xsl:template match="mn:term/mn:name">
|
5222
|
+
<xsl:template match="mn:term/mn:fmt-name">
|
5223
5223
|
<xsl:if test="normalize-space() != ''">
|
5224
5224
|
<!-- <xsl:variable name="level">
|
5225
5225
|
<xsl:call-template name="getLevelTermName"/>
|
@@ -5238,7 +5238,7 @@
|
|
5238
5238
|
<!-- origin -->
|
5239
5239
|
<!-- modification -->
|
5240
5240
|
<!-- ====== -->
|
5241
|
-
<xsl:template match="mn:termsource" name="termsource">
|
5241
|
+
<xsl:template match="mn:fmt-termsource" name="termsource">
|
5242
5242
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
5243
5243
|
|
5244
5244
|
<xsl:call-template name="refine_termsource-style"/>
|
@@ -5277,24 +5277,24 @@
|
|
5277
5277
|
</fo:block>
|
5278
5278
|
</xsl:template>
|
5279
5279
|
|
5280
|
-
<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">
|
5280
|
+
<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">
|
5281
5281
|
<xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
|
5282
5282
|
</xsl:template>
|
5283
5283
|
|
5284
|
-
<xsl:template match="mn:termsource/text()">
|
5284
|
+
<xsl:template match="mn:fmt-termsource/text()">
|
5285
5285
|
<xsl:if test="normalize-space() != ''">
|
5286
5286
|
<xsl:value-of select="."/>
|
5287
5287
|
</xsl:if>
|
5288
5288
|
</xsl:template>
|
5289
5289
|
|
5290
5290
|
<!-- text SOURCE: -->
|
5291
|
-
<xsl:template match="mn:termsource/mn:strong[1][following-sibling::*[1][self::mn:origin]]/text()">
|
5291
|
+
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
5292
5292
|
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
5293
5293
|
<xsl:value-of select="."/>
|
5294
5294
|
</fo:inline>
|
5295
5295
|
</xsl:template>
|
5296
5296
|
|
5297
|
-
<xsl:template match="mn:origin">
|
5297
|
+
<xsl:template match="mn:fmt-origin">
|
5298
5298
|
<xsl:call-template name="insert_basic_link">
|
5299
5299
|
<xsl:with-param name="element">
|
5300
5300
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -5340,7 +5340,7 @@
|
|
5340
5340
|
<!-- ====== -->
|
5341
5341
|
|
5342
5342
|
<!-- Preferred, admitted, deprecated -->
|
5343
|
-
<xsl:template match="mn:preferred">
|
5343
|
+
<xsl:template match="mn:fmt-preferred">
|
5344
5344
|
<xsl:variable name="level">
|
5345
5345
|
<xsl:call-template name="getLevel"/>
|
5346
5346
|
</xsl:variable>
|
@@ -5351,15 +5351,15 @@
|
|
5351
5351
|
</xsl:variable>
|
5352
5352
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
5353
5353
|
|
5354
|
-
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:preferred)"> <!-- if first preffered in term, then display term's name -->
|
5354
|
+
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
5355
5355
|
|
5356
5356
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
5357
5357
|
|
5358
|
-
<xsl:for-each select="ancestor::mn:term[1]/mn:name"><!-- change context -->
|
5358
|
+
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
5359
5359
|
<xsl:call-template name="setIDforNamedDestination"/>
|
5360
5360
|
</xsl:for-each>
|
5361
5361
|
|
5362
|
-
<xsl:apply-templates select="ancestor::mn:term[1]/mn:name"/>
|
5362
|
+
<xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
|
5363
5363
|
</fo:block>
|
5364
5364
|
</xsl:if>
|
5365
5365
|
|
@@ -5383,13 +5383,13 @@
|
|
5383
5383
|
<!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
|
5384
5384
|
<xsl:template match="mn:domain"/>
|
5385
5385
|
|
5386
|
-
<xsl:template match="mn:admitted">
|
5386
|
+
<xsl:template match="mn:fmt-admitted">
|
5387
5387
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
5388
5388
|
<xsl:apply-templates/>
|
5389
5389
|
</fo:block>
|
5390
5390
|
</xsl:template>
|
5391
5391
|
|
5392
|
-
<xsl:template match="mn:deprecates">
|
5392
|
+
<xsl:template match="mn:fmt-deprecates">
|
5393
5393
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
5394
5394
|
<xsl:apply-templates/>
|
5395
5395
|
</fo:block>
|
@@ -5403,7 +5403,7 @@
|
|
5403
5403
|
|
5404
5404
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
5405
5405
|
<!-- in metanorma xml preferred terms delimited by semicolons -->
|
5406
|
-
<xsl:template match="mn:preferred/text()[contains(., ';')] | mn:preferred/mn:strong/text()[contains(., ';')]">
|
5406
|
+
<xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
|
5407
5407
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
|
5408
5408
|
</xsl:template>
|
5409
5409
|
<!-- End Preferred, admitted, deprecated -->
|
@@ -5422,16 +5422,16 @@
|
|
5422
5422
|
<!-- ========== -->
|
5423
5423
|
<!-- definition -->
|
5424
5424
|
<!-- ========== -->
|
5425
|
-
<xsl:template match="mn:definition">
|
5425
|
+
<xsl:template match="mn:fmt-definition">
|
5426
5426
|
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
5427
5427
|
<xsl:apply-templates/>
|
5428
5428
|
</fo:block>
|
5429
5429
|
</xsl:template>
|
5430
5430
|
|
5431
|
-
<xsl:template match="mn:definition[preceding-sibling::mn:domain]">
|
5431
|
+
<xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]">
|
5432
5432
|
<xsl:apply-templates/>
|
5433
5433
|
</xsl:template>
|
5434
|
-
<xsl:template match="mn:definition[preceding-sibling::mn:domain]/mn:p[1]">
|
5434
|
+
<xsl:template match="mn:fmt-definition[preceding-sibling::mn:domain]/mn:p[1]">
|
5435
5435
|
<fo:inline> <xsl:apply-templates/></fo:inline>
|
5436
5436
|
<fo:block/>
|
5437
5437
|
</xsl:template>
|
@@ -5496,12 +5496,12 @@
|
|
5496
5496
|
<xsl:call-template name="refine_termexample-style"/>
|
5497
5497
|
<xsl:call-template name="setBlockSpanAll"/>
|
5498
5498
|
|
5499
|
-
<xsl:apply-templates select="mn:name"/>
|
5500
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
5499
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
5500
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
5501
5501
|
</fo:block>
|
5502
5502
|
</xsl:template>
|
5503
5503
|
|
5504
|
-
<xsl:template match="mn:termexample/mn:name">
|
5504
|
+
<xsl:template match="mn:termexample/mn:fmt-name">
|
5505
5505
|
<xsl:if test="normalize-space() != ''">
|
5506
5506
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
5507
5507
|
<xsl:call-template name="refine_termexample-name-style"/>
|
@@ -5552,7 +5552,7 @@
|
|
5552
5552
|
<xsl:call-template name="refine_example-style"/>
|
5553
5553
|
|
5554
5554
|
<xsl:variable name="fo_element">
|
5555
|
-
<xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:name)][1][self::mn:sourcecode]">block</xsl:if>inline
|
5555
|
+
<xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>inline
|
5556
5556
|
</xsl:variable>
|
5557
5557
|
|
5558
5558
|
<fo:block-container margin-left="0mm" role="SKIP">
|
@@ -5563,7 +5563,7 @@
|
|
5563
5563
|
|
5564
5564
|
<!-- display name 'EXAMPLE' in a separate block -->
|
5565
5565
|
<fo:block>
|
5566
|
-
<xsl:apply-templates select="mn:name">
|
5566
|
+
<xsl:apply-templates select="mn:fmt-name">
|
5567
5567
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5568
5568
|
</xsl:apply-templates>
|
5569
5569
|
</fo:block>
|
@@ -5571,7 +5571,7 @@
|
|
5571
5571
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
5572
5572
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
5573
5573
|
<xsl:variable name="example_body">
|
5574
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]">
|
5574
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
5575
5575
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5576
5576
|
</xsl:apply-templates>
|
5577
5577
|
</xsl:variable>
|
@@ -5598,14 +5598,14 @@
|
|
5598
5598
|
<fo:list-item>
|
5599
5599
|
<fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
|
5600
5600
|
<fo:block>
|
5601
|
-
<xsl:apply-templates select="mn:name">
|
5601
|
+
<xsl:apply-templates select="mn:fmt-name">
|
5602
5602
|
<xsl:with-param name="fo_element">block</xsl:with-param>
|
5603
5603
|
</xsl:apply-templates>
|
5604
5604
|
</fo:block>
|
5605
5605
|
</fo:list-item-label>
|
5606
5606
|
<fo:list-item-body start-indent="body-start()">
|
5607
5607
|
<fo:block>
|
5608
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]">
|
5608
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
5609
5609
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5610
5610
|
</xsl:apply-templates>
|
5611
5611
|
</fo:block>
|
@@ -5618,21 +5618,21 @@
|
|
5618
5618
|
|
5619
5619
|
<!-- display 'EXAMPLE' and first element in the same line -->
|
5620
5620
|
<fo:block>
|
5621
|
-
<xsl:apply-templates select="mn:name">
|
5621
|
+
<xsl:apply-templates select="mn:fmt-name">
|
5622
5622
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5623
5623
|
</xsl:apply-templates>
|
5624
5624
|
<fo:inline>
|
5625
|
-
<xsl:apply-templates select="*[not(self::mn:name)][1]">
|
5625
|
+
<xsl:apply-templates select="*[not(self::mn:fmt-name)][1]">
|
5626
5626
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5627
5627
|
</xsl:apply-templates>
|
5628
5628
|
</fo:inline>
|
5629
5629
|
</fo:block>
|
5630
5630
|
|
5631
|
-
<xsl:if test="*[not(self::mn:name)][position() > 1]">
|
5631
|
+
<xsl:if test="*[not(self::mn:fmt-name)][position() > 1]">
|
5632
5632
|
<!-- display further elements in blocks -->
|
5633
5633
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
5634
5634
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
5635
|
-
<xsl:apply-templates select="*[not(self::mn:name)][position() > 1]">
|
5635
|
+
<xsl:apply-templates select="*[not(self::mn:fmt-name)][position() > 1]">
|
5636
5636
|
<xsl:with-param name="fo_element" select="'block'"/>
|
5637
5637
|
</xsl:apply-templates>
|
5638
5638
|
</fo:block-container>
|
@@ -5646,7 +5646,7 @@
|
|
5646
5646
|
</xsl:template>
|
5647
5647
|
|
5648
5648
|
<!-- example/name -->
|
5649
|
-
<xsl:template match="mn:example/mn:name">
|
5649
|
+
<xsl:template match="mn:example/mn:fmt-name">
|
5650
5650
|
<xsl:param name="fo_element">block</xsl:param>
|
5651
5651
|
|
5652
5652
|
<xsl:choose>
|
@@ -5671,7 +5671,7 @@
|
|
5671
5671
|
</xsl:template>
|
5672
5672
|
|
5673
5673
|
<!-- table/example/name, table/tfoot//example/name -->
|
5674
|
-
<xsl:template match="mn:table/mn:example/mn:name | mn:table/mn:tfoot//mn:example/mn:name">
|
5674
|
+
<xsl:template match="mn:table/mn:example/mn:fmt-name | mn:table/mn:tfoot//mn:example/mn:fmt-name">
|
5675
5675
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
5676
5676
|
<xsl:apply-templates/>
|
5677
5677
|
</fo:inline>
|
@@ -5960,7 +5960,7 @@
|
|
5960
5960
|
|
5961
5961
|
<!-- Display table's name before table as standalone block -->
|
5962
5962
|
<!-- $namespace = 'iso' or -->
|
5963
|
-
<xsl:apply-templates select="mn:name"/> <!-- table's title rendered before table -->
|
5963
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
|
5964
5964
|
<xsl:call-template name="table_name_fn_display"/>
|
5965
5965
|
|
5966
5966
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
|
@@ -6002,7 +6002,7 @@
|
|
6002
6002
|
|
6003
6003
|
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
6004
6004
|
|
6005
|
-
<xsl:for-each select="mn:name">
|
6005
|
+
<xsl:for-each select="mn:fmt-name">
|
6006
6006
|
<xsl:call-template name="setIDforNamedDestination"/>
|
6007
6007
|
</xsl:for-each>
|
6008
6008
|
|
@@ -6038,6 +6038,10 @@
|
|
6038
6038
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
6039
6039
|
</xsl:call-template>
|
6040
6040
|
|
6041
|
+
<xsl:call-template name="setTableStyles">
|
6042
|
+
<xsl:with-param name="scope">table</xsl:with-param>
|
6043
|
+
</xsl:call-template>
|
6044
|
+
|
6041
6045
|
</xsl:element>
|
6042
6046
|
</xsl:variable>
|
6043
6047
|
|
@@ -6058,7 +6062,7 @@
|
|
6058
6062
|
</xsl:attribute>
|
6059
6063
|
</xsl:for-each>
|
6060
6064
|
|
6061
|
-
<xsl:variable name="isNoteOrFnExist" select="./mn:note[not(@type = 'units')] or ./mn:example or .//mn:fn[
|
6065
|
+
<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"/>
|
6062
6066
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
6063
6067
|
<!-- <xsl:choose>
|
6064
6068
|
<xsl:when test="$namespace = 'plateau'"></xsl:when>
|
@@ -6114,7 +6118,7 @@
|
|
6114
6118
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
6115
6119
|
</xsl:when>
|
6116
6120
|
<xsl:otherwise>
|
6117
|
-
<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 -->
|
6121
|
+
<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 -->
|
6118
6122
|
</xsl:otherwise>
|
6119
6123
|
</xsl:choose>
|
6120
6124
|
|
@@ -6208,7 +6212,7 @@
|
|
6208
6212
|
</xsl:template>
|
6209
6213
|
|
6210
6214
|
<!-- table/name-->
|
6211
|
-
<xsl:template match="*[local-name()='table']/mn:name">
|
6215
|
+
<xsl:template match="*[local-name()='table']/mn:fmt-name">
|
6212
6216
|
<xsl:param name="continued"/>
|
6213
6217
|
<xsl:param name="cols-count"/>
|
6214
6218
|
<xsl:if test="normalize-space() != ''">
|
@@ -6273,7 +6277,7 @@
|
|
6273
6277
|
</xsl:template>
|
6274
6278
|
|
6275
6279
|
<!-- SOURCE: ... -->
|
6276
|
-
<xsl:template match="*[local-name()='table']/mn:source" priority="2">
|
6280
|
+
<xsl:template match="*[local-name()='table']/mn:fmt-source" priority="2">
|
6277
6281
|
<xsl:call-template name="termsource"/>
|
6278
6282
|
</xsl:template>
|
6279
6283
|
|
@@ -6438,11 +6442,11 @@
|
|
6438
6442
|
<xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
|
6439
6443
|
</xsl:template>
|
6440
6444
|
|
6441
|
-
<xsl:template match="mn:termsource" mode="td_text">
|
6442
|
-
<xsl:value-of select="
|
6445
|
+
<xsl:template match="mn:fmt-termsource" mode="td_text">
|
6446
|
+
<xsl:value-of select="mn:fmt-origin/@citeas"/>
|
6443
6447
|
</xsl:template>
|
6444
6448
|
|
6445
|
-
<xsl:template match="mn:link" mode="td_text">
|
6449
|
+
<xsl:template match="mn:fmt-link" mode="td_text">
|
6446
6450
|
<xsl:value-of select="@target"/>
|
6447
6451
|
</xsl:template>
|
6448
6452
|
|
@@ -6644,12 +6648,12 @@
|
|
6644
6648
|
|
6645
6649
|
<xsl:call-template name="refine_table-header-title-style"/>
|
6646
6650
|
|
6647
|
-
<xsl:apply-templates select="ancestor::mn:table/mn:name">
|
6651
|
+
<xsl:apply-templates select="ancestor::mn:table/mn:fmt-name">
|
6648
6652
|
<xsl:with-param name="continued">true</xsl:with-param>
|
6649
6653
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
6650
6654
|
</xsl:apply-templates>
|
6651
6655
|
|
6652
|
-
<xsl:if test="not(ancestor::mn:table/mn:name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
6656
|
+
<xsl:if test="not(ancestor::mn:table/mn:fmt-name)"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
6653
6657
|
<fo:block role="SKIP"/>
|
6654
6658
|
</xsl:if>
|
6655
6659
|
|
@@ -6684,7 +6688,7 @@
|
|
6684
6688
|
<xsl:param name="colwidths"/>
|
6685
6689
|
<xsl:param name="colgroup"/>
|
6686
6690
|
|
6687
|
-
<xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ..//mn:fn[
|
6691
|
+
<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"/>
|
6688
6692
|
|
6689
6693
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
6690
6694
|
</xsl:variable>
|
@@ -6725,6 +6729,12 @@
|
|
6725
6729
|
</xsl:choose>
|
6726
6730
|
</xsl:for-each>
|
6727
6731
|
|
6732
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
6733
|
+
<xsl:call-template name="setTableStyles">
|
6734
|
+
<xsl:with-param name="scope">table</xsl:with-param>
|
6735
|
+
</xsl:call-template>
|
6736
|
+
</xsl:for-each>
|
6737
|
+
|
6728
6738
|
<xsl:choose>
|
6729
6739
|
<xsl:when test="xalan:nodeset($colgroup)//mn:col">
|
6730
6740
|
<xsl:for-each select="xalan:nodeset($colgroup)//mn:col">
|
@@ -6741,10 +6751,22 @@
|
|
6741
6751
|
|
6742
6752
|
<fo:table-body role="SKIP">
|
6743
6753
|
<fo:table-row role="SKIP">
|
6754
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
6755
|
+
<xsl:call-template name="setTableStyles">
|
6756
|
+
<xsl:with-param name="scope">ancestor_table</xsl:with-param>
|
6757
|
+
</xsl:call-template>
|
6758
|
+
</xsl:for-each>
|
6759
|
+
|
6744
6760
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
|
6745
6761
|
|
6746
6762
|
<xsl:call-template name="refine_table-footer-cell-style"/>
|
6747
6763
|
|
6764
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
6765
|
+
<xsl:call-template name="setTableStyles">
|
6766
|
+
<xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
|
6767
|
+
</xsl:call-template>
|
6768
|
+
</xsl:for-each>
|
6769
|
+
|
6748
6770
|
<xsl:call-template name="setBordersTableArray"/>
|
6749
6771
|
|
6750
6772
|
<!-- fn will be processed inside 'note' processing -->
|
@@ -6752,7 +6774,7 @@
|
|
6752
6774
|
<xsl:apply-templates select="../mn:dl"/>
|
6753
6775
|
<xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
|
6754
6776
|
<xsl:apply-templates select="../mn:example"/>
|
6755
|
-
<xsl:apply-templates select="../mn:source"/>
|
6777
|
+
<xsl:apply-templates select="../mn:fmt-source"/>
|
6756
6778
|
|
6757
6779
|
<xsl:variable name="isDisplayRowSeparator">
|
6758
6780
|
</xsl:variable>
|
@@ -6941,7 +6963,12 @@
|
|
6941
6963
|
|
6942
6964
|
<xsl:template name="setTableRowAttributes">
|
6943
6965
|
|
6944
|
-
<xsl:
|
6966
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
6967
|
+
<xsl:call-template name="setTableStyles">
|
6968
|
+
<xsl:with-param name="scope">ancestor_table</xsl:with-param>
|
6969
|
+
</xsl:call-template>
|
6970
|
+
</xsl:for-each>
|
6971
|
+
<xsl:call-template name="setTableStyles"/>
|
6945
6972
|
|
6946
6973
|
</xsl:template> <!-- setTableRowAttributes -->
|
6947
6974
|
<!-- ===================== -->
|
@@ -6994,7 +7021,13 @@
|
|
6994
7021
|
</xsl:attribute>
|
6995
7022
|
</xsl:if>
|
6996
7023
|
<xsl:call-template name="display-align"/>
|
6997
|
-
|
7024
|
+
|
7025
|
+
<xsl:for-each select="ancestor::mn:table[1]">
|
7026
|
+
<xsl:call-template name="setTableStyles">
|
7027
|
+
<xsl:with-param name="scope">ancestor_table_borders_only</xsl:with-param>
|
7028
|
+
</xsl:call-template>
|
7029
|
+
</xsl:for-each>
|
7030
|
+
<xsl:call-template name="setTableStyles"/>
|
6998
7031
|
</xsl:template>
|
6999
7032
|
|
7000
7033
|
<xsl:template name="display-align">
|
@@ -7010,7 +7043,8 @@
|
|
7010
7043
|
</xsl:if>
|
7011
7044
|
</xsl:template>
|
7012
7045
|
|
7013
|
-
<xsl:template name="
|
7046
|
+
<xsl:template name="setTableStyles">
|
7047
|
+
<xsl:param name="scope">cell</xsl:param>
|
7014
7048
|
<xsl:variable name="styles__">
|
7015
7049
|
<xsl:call-template name="split">
|
7016
7050
|
<xsl:with-param name="pText" select="concat(@style,';')"/>
|
@@ -7019,19 +7053,35 @@
|
|
7019
7053
|
</xsl:variable>
|
7020
7054
|
<xsl:variable name="quot">"</xsl:variable>
|
7021
7055
|
<xsl:variable name="styles_">
|
7056
|
+
<!-- PDF: Borderless tables https://github.com/metanorma/metanorma-jis/issues/344 -->
|
7057
|
+
<xsl:if test="@plain = 'true' or ancestor::mn:table/@plain = 'true'">
|
7058
|
+
<style name="border-top">none</style>
|
7059
|
+
<style name="border-right">none</style>
|
7060
|
+
<style name="border-left">none</style>
|
7061
|
+
<style name="border-bottom">none</style>
|
7062
|
+
<style name="color">inherit</style>
|
7063
|
+
<style name="background-color">transparent</style>
|
7064
|
+
</xsl:if>
|
7065
|
+
|
7022
7066
|
<xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
|
7023
7067
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
7024
7068
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
7025
|
-
<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'">
|
7069
|
+
<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'">
|
7026
7070
|
<style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
|
7027
7071
|
</xsl:if>
|
7072
|
+
<xsl:if test="$key = 'border' and ($scope = 'table' or $scope = 'ancestor_table' or $scope = 'ancestor_table_borders_only')">
|
7073
|
+
<style name="{$key}-top"><xsl:value-of select="$value"/></style>
|
7074
|
+
<style name="{$key}-right"><xsl:value-of select="$value"/></style>
|
7075
|
+
<style name="{$key}-left"><xsl:value-of select="$value"/></style>
|
7076
|
+
<style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
|
7077
|
+
</xsl:if>
|
7028
7078
|
</xsl:for-each>
|
7029
7079
|
</xsl:variable>
|
7030
7080
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
7031
7081
|
<xsl:for-each select="$styles/style">
|
7032
7082
|
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
7033
7083
|
</xsl:for-each>
|
7034
|
-
</xsl:template> <!--
|
7084
|
+
</xsl:template> <!-- setTableStyles -->
|
7035
7085
|
|
7036
7086
|
<!-- cell in table body, footer -->
|
7037
7087
|
<xsl:template match="*[local-name()='td']" name="td">
|
@@ -7095,11 +7145,11 @@
|
|
7095
7145
|
|
7096
7146
|
<xsl:call-template name="refine_table-note-name-style"/>
|
7097
7147
|
|
7098
|
-
<xsl:apply-templates select="mn:name"/>
|
7148
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
7099
7149
|
|
7100
7150
|
</fo:inline>
|
7101
7151
|
|
7102
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
7152
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
7103
7153
|
</fo:block>
|
7104
7154
|
</xsl:template> <!-- table/note -->
|
7105
7155
|
|
@@ -7238,7 +7288,7 @@
|
|
7238
7288
|
|
7239
7289
|
<!-- footnotes for table's name rendering -->
|
7240
7290
|
<xsl:template name="table_name_fn_display">
|
7241
|
-
<xsl:for-each select="mn:name//mn:fn">
|
7291
|
+
<xsl:for-each select="mn:fmt-name//mn:fn">
|
7242
7292
|
<xsl:variable name="reference" select="@reference"/>
|
7243
7293
|
<fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
|
7244
7294
|
<fo:block margin-bottom="12pt">
|
@@ -7895,7 +7945,7 @@
|
|
7895
7945
|
</xsl:if> -->
|
7896
7946
|
|
7897
7947
|
<xsl:variable name="words">
|
7898
|
-
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
|
7948
|
+
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'fmt-stem']">
|
7899
7949
|
<word>
|
7900
7950
|
<xsl:copy-of select="."/>
|
7901
7951
|
</word>
|
@@ -7954,7 +8004,7 @@
|
|
7954
8004
|
</xsl:copy>
|
7955
8005
|
</xsl:template>
|
7956
8006
|
|
7957
|
-
<xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
|
8007
|
+
<xsl:template match="*[local-name() = 'fmt-stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
|
7958
8008
|
|
7959
8009
|
<xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
|
7960
8010
|
<xsl:variable name="formatting_tags">
|
@@ -7989,7 +8039,7 @@
|
|
7989
8039
|
</xsl:call-template>
|
7990
8040
|
</xsl:template>
|
7991
8041
|
|
7992
|
-
<xsl:template match="mn:link[normalize-space() = '']" mode="td_text_with_formatting">
|
8042
|
+
<xsl:template match="mn:fmt-link[normalize-space() = '']" mode="td_text_with_formatting">
|
7993
8043
|
<xsl:variable name="link">
|
7994
8044
|
<link_updated>
|
7995
8045
|
<xsl:variable name="target_text">
|
@@ -8224,7 +8274,7 @@
|
|
8224
8274
|
|
8225
8275
|
<xsl:call-template name="refine_multicomponent_block_style"/>
|
8226
8276
|
|
8227
|
-
<xsl:apply-templates select="mn:name">
|
8277
|
+
<xsl:apply-templates select="mn:fmt-name">
|
8228
8278
|
<xsl:with-param name="process">true</xsl:with-param>
|
8229
8279
|
</xsl:apply-templates>
|
8230
8280
|
|
@@ -8407,7 +8457,7 @@
|
|
8407
8457
|
</xsl:template> <!-- refine_multicomponent_block_style -->
|
8408
8458
|
|
8409
8459
|
<!-- dl/name -->
|
8410
|
-
<xsl:template match="mn:dl/mn:name">
|
8460
|
+
<xsl:template match="mn:dl/mn:fmt-name">
|
8411
8461
|
<xsl:param name="process">false</xsl:param>
|
8412
8462
|
<xsl:if test="$process = 'true'">
|
8413
8463
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
@@ -8830,12 +8880,12 @@
|
|
8830
8880
|
<xsl:template match="mn:appendix">
|
8831
8881
|
<xsl:call-template name="setNamedDestination"/>
|
8832
8882
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
8833
|
-
<xsl:apply-templates select="mn:title"/>
|
8883
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
8834
8884
|
</fo:block>
|
8835
|
-
<xsl:apply-templates select="node()[not(
|
8885
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
8836
8886
|
</xsl:template>
|
8837
8887
|
|
8838
|
-
<xsl:template match="mn:appendix/mn:title" priority="2">
|
8888
|
+
<xsl:template match="mn:appendix/mn:fmt-title" priority="2">
|
8839
8889
|
<xsl:variable name="level">
|
8840
8890
|
<xsl:call-template name="getLevel"/>
|
8841
8891
|
</xsl:variable>
|
@@ -8848,15 +8898,15 @@
|
|
8848
8898
|
<xsl:template match="mn:appendix//mn:example" priority="2">
|
8849
8899
|
<xsl:call-template name="setNamedDestination"/>
|
8850
8900
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
8851
|
-
<xsl:apply-templates select="mn:name"/>
|
8901
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
8852
8902
|
</fo:block>
|
8853
|
-
<xsl:apply-templates select="node()[not(
|
8903
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
8854
8904
|
</xsl:template>
|
8855
8905
|
|
8856
8906
|
<xsl:attribute-set name="xref-style">
|
8857
8907
|
</xsl:attribute-set>
|
8858
8908
|
|
8859
|
-
<xsl:template match="mn:xref">
|
8909
|
+
<xsl:template match="mn:fmt-xref">
|
8860
8910
|
<xsl:call-template name="insert_basic_link">
|
8861
8911
|
<xsl:with-param name="element">
|
8862
8912
|
<xsl:variable name="alt_text">
|
@@ -8876,7 +8926,7 @@
|
|
8876
8926
|
</xsl:template> <!-- xref -->
|
8877
8927
|
|
8878
8928
|
<!-- command between two xref points to non-standard bibitem -->
|
8879
|
-
<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="."/>
|
8929
|
+
<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="."/>
|
8880
8930
|
</xsl:template>
|
8881
8931
|
|
8882
8932
|
<xsl:attribute-set name="eref-style">
|
@@ -8907,7 +8957,7 @@
|
|
8907
8957
|
<!-- ====== -->
|
8908
8958
|
<!-- eref -->
|
8909
8959
|
<!-- ====== -->
|
8910
|
-
<xsl:template match="mn:eref" name="eref">
|
8960
|
+
<xsl:template match="mn:fmt-eref" name="eref">
|
8911
8961
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
8912
8962
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/mn:uri[@type = 'citation'])"/> -->
|
8913
8963
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/mn:bibitem[@id = $current_bibitemid]/mn:uri[@type = 'citation'])"/>
|
@@ -9037,7 +9087,10 @@
|
|
9037
9087
|
|
9038
9088
|
<xsl:call-template name="setNamedDestination"/>
|
9039
9089
|
|
9040
|
-
<fo:block-container
|
9090
|
+
<fo:block-container xsl:use-attribute-sets="note-style" role="SKIP">
|
9091
|
+
<xsl:if test="not(parent::mn:references)">
|
9092
|
+
<xsl:copy-of select="@id"/>
|
9093
|
+
</xsl:if>
|
9041
9094
|
|
9042
9095
|
<xsl:call-template name="setBlockSpanAll"/>
|
9043
9096
|
|
@@ -9050,28 +9103,28 @@
|
|
9050
9103
|
|
9051
9104
|
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
9052
9105
|
|
9053
|
-
<xsl:apply-templates select="mn:name/mn:tab" mode="tab"/>
|
9106
|
+
<xsl:apply-templates select="mn:fmt-name/mn:tab" mode="tab"/>
|
9054
9107
|
|
9055
9108
|
<xsl:call-template name="refine_note-name-style"/>
|
9056
9109
|
|
9057
9110
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
9058
9111
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
9059
|
-
<xsl:if test="*[not(
|
9112
|
+
<xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
|
9060
9113
|
<xsl:call-template name="append_add-style"/>
|
9061
9114
|
</xsl:if>
|
9062
9115
|
|
9063
9116
|
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
9064
|
-
<xsl:if test="count(*[not(self::mn:name)]) = 1 and *[not(self::mn:name)]/node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
|
9065
|
-
<xsl:apply-templates select="*[not(self::mn:name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
|
9117
|
+
<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)]">
|
9118
|
+
<xsl:apply-templates select="*[not(self::mn:fmt-name)]/node()[1][self::mn:add][starts-with(text(), $ace_tag)]">
|
9066
9119
|
<xsl:with-param name="skip">false</xsl:with-param>
|
9067
9120
|
</xsl:apply-templates>
|
9068
9121
|
</xsl:if>
|
9069
9122
|
|
9070
|
-
<xsl:apply-templates select="mn:name"/>
|
9123
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
9071
9124
|
|
9072
9125
|
</fo:inline>
|
9073
9126
|
|
9074
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
9127
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
9075
9128
|
</fo:block>
|
9076
9129
|
</fo:block-container>
|
9077
9130
|
</fo:block-container>
|
@@ -9110,19 +9163,19 @@
|
|
9110
9163
|
|
9111
9164
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
9112
9165
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
9113
|
-
<xsl:if test="*[not(
|
9166
|
+
<xsl:if test="*[not(self::mn:fmt-name)][1][count(node()[normalize-space() != '']) = 1 and mn:add]">
|
9114
9167
|
<xsl:call-template name="append_add-style"/>
|
9115
9168
|
</xsl:if>
|
9116
9169
|
|
9117
|
-
<xsl:apply-templates select="mn:name"/>
|
9170
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
9118
9171
|
|
9119
9172
|
</fo:inline>
|
9120
9173
|
|
9121
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
9174
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
9122
9175
|
</fo:block>
|
9123
9176
|
</xsl:template>
|
9124
9177
|
|
9125
|
-
<xsl:template match="mn:note/mn:name">
|
9178
|
+
<xsl:template match="mn:note/mn:fmt-name">
|
9126
9179
|
<xsl:param name="sfx"/>
|
9127
9180
|
<xsl:variable name="suffix">
|
9128
9181
|
<xsl:choose>
|
@@ -9149,7 +9202,7 @@
|
|
9149
9202
|
</xsl:if>
|
9150
9203
|
</xsl:template>
|
9151
9204
|
|
9152
|
-
<xsl:template match="mn:termnote/mn:name">
|
9205
|
+
<xsl:template match="mn:termnote/mn:fmt-name">
|
9153
9206
|
<xsl:param name="sfx"/>
|
9154
9207
|
<xsl:variable name="suffix">
|
9155
9208
|
<xsl:choose>
|
@@ -9232,15 +9285,15 @@
|
|
9232
9285
|
|
9233
9286
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
9234
9287
|
<fo:block role="BlockQuote">
|
9235
|
-
<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 -->
|
9288
|
+
<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 -->
|
9236
9289
|
</fo:block>
|
9237
9290
|
</fo:block-container>
|
9238
9291
|
</fo:block-container>
|
9239
|
-
<xsl:if test="mn:author or mn:source or mn:attribution">
|
9292
|
+
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
9240
9293
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
9241
9294
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
9242
9295
|
<xsl:apply-templates select="mn:author"/>
|
9243
|
-
<xsl:apply-templates select="mn:source"/>
|
9296
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
9244
9297
|
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
9245
9298
|
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
9246
9299
|
</fo:block>
|
@@ -9250,17 +9303,32 @@
|
|
9250
9303
|
</fo:block-container>
|
9251
9304
|
</xsl:template>
|
9252
9305
|
|
9253
|
-
<xsl:template match="mn:source">
|
9306
|
+
<xsl:template match="mn:fmt-source">
|
9254
9307
|
<xsl:if test="../mn:author">
|
9255
9308
|
<xsl:text>, </xsl:text>
|
9256
9309
|
</xsl:if>
|
9257
|
-
<xsl:
|
9258
|
-
<xsl:
|
9259
|
-
<fo:
|
9260
|
-
<xsl:
|
9261
|
-
|
9262
|
-
|
9263
|
-
|
9310
|
+
<xsl:choose>
|
9311
|
+
<xsl:when test="not(parent::quote)">
|
9312
|
+
<fo:block>
|
9313
|
+
<xsl:call-template name="insert_basic_link">
|
9314
|
+
<xsl:with-param name="element">
|
9315
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
9316
|
+
<xsl:apply-templates/>
|
9317
|
+
</fo:basic-link>
|
9318
|
+
</xsl:with-param>
|
9319
|
+
</xsl:call-template>
|
9320
|
+
</fo:block>
|
9321
|
+
</xsl:when>
|
9322
|
+
<xsl:otherwise>
|
9323
|
+
<xsl:call-template name="insert_basic_link">
|
9324
|
+
<xsl:with-param name="element">
|
9325
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
9326
|
+
<xsl:apply-templates/>
|
9327
|
+
</fo:basic-link>
|
9328
|
+
</xsl:with-param>
|
9329
|
+
</xsl:call-template>
|
9330
|
+
</xsl:otherwise>
|
9331
|
+
</xsl:choose>
|
9264
9332
|
</xsl:template>
|
9265
9333
|
|
9266
9334
|
<xsl:template match="mn:author">
|
@@ -9340,7 +9408,7 @@
|
|
9340
9408
|
<ancestor><xsl:copy-of select="ancestor::mn:figure[.//mn:name[.//mn:fn]]"/></ancestor> -->
|
9341
9409
|
<xsl:choose>
|
9342
9410
|
<!-- skip figure/name/fn -->
|
9343
|
-
<xsl:when test="ancestor::mn:figure[.//mn:name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
|
9411
|
+
<xsl:when test="ancestor::mn:figure[.//mn:fmt-name[.//mn:fn[@target = $curr_id]]]"><!-- skip --></xsl:when>
|
9344
9412
|
<xsl:otherwise>
|
9345
9413
|
<xsl:element name="figure" namespace="{$namespace_full}">
|
9346
9414
|
<xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
|
@@ -9536,17 +9604,17 @@
|
|
9536
9604
|
|
9537
9605
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
9538
9606
|
|
9539
|
-
<xsl:for-each select="mn:name"> <!-- set context -->
|
9607
|
+
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
9540
9608
|
<xsl:call-template name="setIDforNamedDestination"/>
|
9541
9609
|
</xsl:for-each>
|
9542
9610
|
|
9543
|
-
<xsl:apply-templates select="node()[not(self::mn:name) and not(self::mn:note and @type = 'units')]"/>
|
9611
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note and @type = 'units')]"/>
|
9544
9612
|
</fo:block>
|
9545
9613
|
|
9546
9614
|
<xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
|
9547
9615
|
<xsl:call-template name="showFigureKey"/>
|
9548
9616
|
</xsl:if>
|
9549
|
-
<xsl:apply-templates select="mn:name"/> <!-- show figure's name AFTER image -->
|
9617
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
|
9550
9618
|
|
9551
9619
|
</fo:block-container>
|
9552
9620
|
</xsl:template>
|
@@ -9572,9 +9640,9 @@
|
|
9572
9640
|
<xsl:template match="mn:figure[@class = 'pseudocode']">
|
9573
9641
|
<xsl:call-template name="setNamedDestination"/>
|
9574
9642
|
<fo:block id="{@id}">
|
9575
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
9643
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
9576
9644
|
</fo:block>
|
9577
|
-
<xsl:apply-templates select="mn:name"/>
|
9645
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
9578
9646
|
</xsl:template>
|
9579
9647
|
|
9580
9648
|
<xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
|
@@ -9585,7 +9653,7 @@
|
|
9585
9653
|
|
9586
9654
|
<!-- SOURCE: ... -->
|
9587
9655
|
<!-- figure/source -->
|
9588
|
-
<xsl:template match="mn:figure/mn:source" priority="2">
|
9656
|
+
<xsl:template match="mn:figure/mn:fmt-source" priority="2">
|
9589
9657
|
<xsl:call-template name="termsource"/>
|
9590
9658
|
</xsl:template>
|
9591
9659
|
|
@@ -9595,7 +9663,7 @@
|
|
9595
9663
|
<xsl:variable name="isAdded" select="../@added"/>
|
9596
9664
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
9597
9665
|
<xsl:choose>
|
9598
|
-
<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) -->
|
9666
|
+
<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) -->
|
9599
9667
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
9600
9668
|
<xsl:if test="not(parent::mn:figure) or parent::mn:p">
|
9601
9669
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -9616,13 +9684,26 @@
|
|
9616
9684
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
|
9617
9685
|
|
9618
9686
|
<xsl:if test="parent::mn:logo"> <!-- publisher's logo -->
|
9619
|
-
<xsl:attribute name="
|
9687
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
9688
|
+
<xsl:choose>
|
9689
|
+
<xsl:when test="@width and not(@height)">
|
9690
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
9691
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
9692
|
+
</xsl:when>
|
9693
|
+
<xsl:when test="@height and not(@width)">
|
9694
|
+
<xsl:attribute name="height">100%</xsl:attribute>
|
9695
|
+
<xsl:attribute name="content-height"><xsl:value-of select="@height"/></xsl:attribute>
|
9696
|
+
</xsl:when>
|
9697
|
+
<xsl:when test="not(@width) and not(@height)">
|
9698
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
9699
|
+
</xsl:when>
|
9700
|
+
</xsl:choose>
|
9701
|
+
|
9620
9702
|
<xsl:if test="normalize-space($logo_width) != ''">
|
9621
9703
|
<xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
|
9622
9704
|
</xsl:if>
|
9623
|
-
<xsl:attribute name="content-height">100%</xsl:attribute>
|
9624
9705
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
9625
|
-
<xsl:attribute name="
|
9706
|
+
<xsl:attribute name="vertical-align">top</xsl:attribute>
|
9626
9707
|
</xsl:if>
|
9627
9708
|
|
9628
9709
|
<xsl:variable name="width">
|
@@ -9911,7 +9992,7 @@
|
|
9911
9992
|
<xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
|
9912
9993
|
<xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
|
9913
9994
|
|
9914
|
-
<xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:name/mn:bookmark" priority="2"/>
|
9995
|
+
<xsl:template match="mn:figure[not(mn:image) and *[local-name() = 'svg']]/mn:fmt-name/mn:bookmark" priority="2"/>
|
9915
9996
|
<xsl:template match="mn:figure[not(mn:image)]/*[local-name() = 'svg']" priority="2" name="image_svg">
|
9916
9997
|
<xsl:param name="name"/>
|
9917
9998
|
|
@@ -9921,8 +10002,8 @@
|
|
9921
10002
|
|
9922
10003
|
<xsl:variable name="alt-text">
|
9923
10004
|
<xsl:choose>
|
9924
|
-
<xsl:when test="normalize-space(../mn:name) != ''">
|
9925
|
-
<xsl:value-of select="../mn:name"/>
|
10005
|
+
<xsl:when test="normalize-space(../mn:fmt-name) != ''">
|
10006
|
+
<xsl:value-of select="../mn:fmt-name"/>
|
9926
10007
|
</xsl:when>
|
9927
10008
|
<xsl:when test="normalize-space($name) != ''">
|
9928
10009
|
<xsl:value-of select="$name"/>
|
@@ -9931,7 +10012,7 @@
|
|
9931
10012
|
</xsl:choose>
|
9932
10013
|
</xsl:variable>
|
9933
10014
|
|
9934
|
-
<xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:title] and 1 = 1)"/>
|
10015
|
+
<xsl:variable name="isPrecedingTitle" select="normalize-space(ancestor::mn:figure/preceding-sibling::*[1][self::mn:fmt-title] and 1 = 1)"/>
|
9935
10016
|
|
9936
10017
|
<xsl:choose>
|
9937
10018
|
<xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
|
@@ -9980,9 +10061,9 @@
|
|
9980
10061
|
<fo:table-cell column-number="2">
|
9981
10062
|
<fo:block>
|
9982
10063
|
<fo:block-container width="{$width_scale}px" height="{$height_scale}px">
|
9983
|
-
<xsl:if test="../mn:name/mn:bookmark">
|
10064
|
+
<xsl:if test="../mn:fmt-name/mn:bookmark">
|
9984
10065
|
<fo:block line-height="0" font-size="0">
|
9985
|
-
<xsl:for-each select="../mn:name/mn:bookmark">
|
10066
|
+
<xsl:for-each select="../mn:fmt-name/mn:bookmark">
|
9986
10067
|
<xsl:call-template name="bookmark"/>
|
9987
10068
|
</xsl:for-each>
|
9988
10069
|
</fo:block>
|
@@ -10222,7 +10303,7 @@
|
|
10222
10303
|
|
10223
10304
|
<!-- image with svg and emf -->
|
10224
10305
|
<xsl:template match="mn:figure/mn:image[*[local-name() = 'svg']]" priority="3">
|
10225
|
-
<xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
|
10306
|
+
<xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
|
10226
10307
|
<xsl:for-each select="*[local-name() = 'svg']">
|
10227
10308
|
<xsl:call-template name="image_svg">
|
10228
10309
|
<xsl:with-param name="name" select="$name"/>
|
@@ -10239,7 +10320,7 @@
|
|
10239
10320
|
|
10240
10321
|
<xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
10241
10322
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
10242
|
-
<xsl:variable name="name" select="ancestor::mn:figure/mn:name"/>
|
10323
|
+
<xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
|
10243
10324
|
<xsl:for-each select="xalan:nodeset($svg_content)/node()">
|
10244
10325
|
<xsl:call-template name="image_svg">
|
10245
10326
|
<xsl:with-param name="name" select="$name"/>
|
@@ -10362,7 +10443,7 @@
|
|
10362
10443
|
<xsl:template match="mn:emf"/>
|
10363
10444
|
|
10364
10445
|
<!-- figure/name -->
|
10365
|
-
<xsl:template match="mn:figure/mn:name | mn:image/mn:name">
|
10446
|
+
<xsl:template match="mn:figure/mn:fmt-name | mn:image/mn:fmt-name">
|
10366
10447
|
<xsl:if test="normalize-space() != ''">
|
10367
10448
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
10368
10449
|
|
@@ -10433,25 +10514,25 @@
|
|
10433
10514
|
<fo:block-container margin-left="0mm" role="SKIP">
|
10434
10515
|
<xsl:call-template name="setNamedDestination"/>
|
10435
10516
|
<fo:block id="{@id}">
|
10436
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/> <!-- formula's number will be process in 'stem' template -->
|
10517
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/> <!-- formula's number will be process in 'stem' template -->
|
10437
10518
|
</fo:block>
|
10438
10519
|
</fo:block-container>
|
10439
10520
|
</fo:block-container>
|
10440
10521
|
</xsl:template>
|
10441
10522
|
|
10442
|
-
<xsl:template match="mn:formula/mn:dt/mn:stem">
|
10523
|
+
<xsl:template match="mn:formula/mn:dt/mn:fmt-stem">
|
10443
10524
|
<fo:inline>
|
10444
10525
|
<xsl:apply-templates/>
|
10445
10526
|
</fo:inline>
|
10446
10527
|
</xsl:template>
|
10447
10528
|
|
10448
|
-
<xsl:template match="mn:admitted/mn:stem">
|
10529
|
+
<xsl:template match="mn:fmt-admitted/mn:fmt-stem">
|
10449
10530
|
<fo:inline>
|
10450
10531
|
<xsl:apply-templates/>
|
10451
10532
|
</fo:inline>
|
10452
10533
|
</xsl:template>
|
10453
10534
|
|
10454
|
-
<xsl:template match="mn:formula/mn:name"> <!-- show in 'stem' template -->
|
10535
|
+
<xsl:template match="mn:formula/mn:fmt-name"> <!-- show in 'stem' template -->
|
10455
10536
|
<!-- https://github.com/metanorma/isodoc/issues/607
|
10456
10537
|
<xsl:if test="normalize-space() != ''">
|
10457
10538
|
<xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
|
@@ -10460,7 +10541,7 @@
|
|
10460
10541
|
</xsl:template>
|
10461
10542
|
|
10462
10543
|
<!-- stem inside formula with name (with formula's number) -->
|
10463
|
-
<xsl:template match="mn:formula[mn:name]/mn:stem">
|
10544
|
+
<xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
|
10464
10545
|
<fo:block xsl:use-attribute-sets="formula-style">
|
10465
10546
|
|
10466
10547
|
<fo:table table-layout="fixed" width="100%">
|
@@ -10480,13 +10561,13 @@
|
|
10480
10561
|
|
10481
10562
|
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
10482
10563
|
|
10483
|
-
<xsl:for-each select="../mn:name">
|
10564
|
+
<xsl:for-each select="../mn:fmt-name">
|
10484
10565
|
<xsl:call-template name="setIDforNamedDestination"/>
|
10485
10566
|
</xsl:for-each>
|
10486
10567
|
|
10487
10568
|
<xsl:call-template name="refine_formula-stem-number-style"/>
|
10488
10569
|
|
10489
|
-
<xsl:apply-templates select="../mn:name"/>
|
10570
|
+
<xsl:apply-templates select="../mn:fmt-name"/>
|
10490
10571
|
</fo:block>
|
10491
10572
|
</fo:table-cell>
|
10492
10573
|
</fo:table-row>
|
@@ -10496,7 +10577,7 @@
|
|
10496
10577
|
</xsl:template>
|
10497
10578
|
|
10498
10579
|
<!-- stem inside formula without name (without formula's number) -->
|
10499
|
-
<xsl:template match="mn:formula[not(mn:name)]/mn:stem">
|
10580
|
+
<xsl:template match="mn:formula[not(mn:fmt-name)]/mn:fmt-stem">
|
10500
10581
|
<fo:block xsl:use-attribute-sets="formula-style">
|
10501
10582
|
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
10502
10583
|
<xsl:apply-templates/>
|
@@ -10850,7 +10931,7 @@
|
|
10850
10931
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
10851
10932
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
|
10852
10933
|
-->
|
10853
|
-
<xsl:template match="mn:stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
|
10934
|
+
<xsl:template match="mn:fmt-stem[@type = 'AsciiMath'][count(*) = 0]/text() | mn:fmt-stem[@type = 'AsciiMath'][mn:asciimath]" priority="3">
|
10854
10935
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
10855
10936
|
|
10856
10937
|
<xsl:call-template name="refine_mathml-style"/>
|
@@ -11124,7 +11205,7 @@
|
|
11124
11205
|
|
11125
11206
|
<xsl:template match="mn:ul | mn:ol" mode="list" name="list">
|
11126
11207
|
|
11127
|
-
<xsl:apply-templates select="mn:name">
|
11208
|
+
<xsl:apply-templates select="mn:fmt-name">
|
11128
11209
|
<xsl:with-param name="process">true</xsl:with-param>
|
11129
11210
|
</xsl:apply-templates>
|
11130
11211
|
|
@@ -11170,7 +11251,7 @@
|
|
11170
11251
|
|
11171
11252
|
<xsl:call-template name="refine_list-style"/>
|
11172
11253
|
|
11173
|
-
<xsl:if test="mn:name">
|
11254
|
+
<xsl:if test="mn:fmt-name">
|
11174
11255
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
11175
11256
|
</xsl:if>
|
11176
11257
|
|
@@ -11185,7 +11266,7 @@
|
|
11185
11266
|
<xsl:template name="refine_list-style_provisional-distance-between-starts">
|
11186
11267
|
</xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
|
11187
11268
|
|
11188
|
-
<xsl:template match="*[self::mn:ol or self::mn:ul]/mn:name">
|
11269
|
+
<xsl:template match="*[self::mn:ol or self::mn:ul]/mn:fmt-name">
|
11189
11270
|
<xsl:param name="process">false</xsl:param>
|
11190
11271
|
<xsl:if test="$process = 'true'">
|
11191
11272
|
<fo:block xsl:use-attribute-sets="list-name-style">
|
@@ -11316,7 +11397,7 @@
|
|
11316
11397
|
-->
|
11317
11398
|
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
11318
11399
|
<!-- fn in text -->
|
11319
|
-
<xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:name))]" priority="2" name="fn">
|
11400
|
+
<xsl:template match="mn:fn[not(ancestor::*[(self::mn:table or self::mn:figure)] and not(ancestor::mn:fmt-name))]" priority="2" name="fn">
|
11320
11401
|
<xsl:param name="footnote_body_from_table">false</xsl:param>
|
11321
11402
|
|
11322
11403
|
<!-- list of unique footnotes -->
|
@@ -11440,7 +11521,7 @@
|
|
11440
11521
|
<!-- commented:
|
11441
11522
|
.//mn:bibitem[ancestor::mn:references]/mn:note |
|
11442
11523
|
because 'fn' there is in biblio-tag -->
|
11443
|
-
<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])]">
|
11524
|
+
<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])]">
|
11444
11525
|
<!-- copy unique fn -->
|
11445
11526
|
<fn gen_id="{generate-id(.)}">
|
11446
11527
|
<xsl:copy-of select="@*"/>
|
@@ -11525,7 +11606,7 @@
|
|
11525
11606
|
<xsl:call-template name="displayAdmonitionName"/>
|
11526
11607
|
</fo:block>
|
11527
11608
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
11528
|
-
<xsl:apply-templates select="node()[not(self::mn:name)]"/>
|
11609
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
11529
11610
|
</fo:block>
|
11530
11611
|
|
11531
11612
|
</fo:block-container>
|
@@ -11551,7 +11632,7 @@
|
|
11551
11632
|
</xsl:otherwise>
|
11552
11633
|
</xsl:choose> -->
|
11553
11634
|
<xsl:variable name="name">
|
11554
|
-
<xsl:apply-templates select="mn:name"/>
|
11635
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
11555
11636
|
</xsl:variable>
|
11556
11637
|
<xsl:copy-of select="$name"/>
|
11557
11638
|
<xsl:if test="normalize-space($name) != ''">
|
@@ -11559,7 +11640,7 @@
|
|
11559
11640
|
</xsl:if>
|
11560
11641
|
</xsl:template>
|
11561
11642
|
|
11562
|
-
<xsl:template match="mn:admonition/mn:name">
|
11643
|
+
<xsl:template match="mn:admonition/mn:fmt-name">
|
11563
11644
|
<xsl:apply-templates/>
|
11564
11645
|
</xsl:template>
|
11565
11646
|
|
@@ -11687,10 +11768,10 @@
|
|
11687
11768
|
<xsl:call-template name="setNamedDestination"/>
|
11688
11769
|
<fo:block id="{@id}"/>
|
11689
11770
|
|
11690
|
-
<xsl:apply-templates select="mn:title[@columns = 1]"/>
|
11771
|
+
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
11691
11772
|
|
11692
11773
|
<fo:block xsl:use-attribute-sets="references-non-normative-style">
|
11693
|
-
<xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
|
11774
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
11694
11775
|
</fo:block>
|
11695
11776
|
</xsl:template> <!-- references -->
|
11696
11777
|
|
@@ -11709,8 +11790,8 @@
|
|
11709
11790
|
</xsl:template> <!-- bibitem -->
|
11710
11791
|
|
11711
11792
|
<!-- Bibliography (non-normative references) -->
|
11712
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
11713
|
-
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
11793
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
|
11794
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
11714
11795
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
11715
11796
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
11716
11797
|
<xsl:call-template name="setNamedDestination"/>
|
@@ -11762,7 +11843,7 @@
|
|
11762
11843
|
</fo:list-item>
|
11763
11844
|
</xsl:otherwise>
|
11764
11845
|
</xsl:choose>
|
11765
|
-
<xsl:apply-templates select="following-sibling::*[1][self::mn:bibitem]
|
11846
|
+
<xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
|
11766
11847
|
<xsl:with-param name="skip">false</xsl:with-param>
|
11767
11848
|
</xsl:apply-templates>
|
11768
11849
|
</xsl:template>
|
@@ -11779,8 +11860,26 @@
|
|
11779
11860
|
</xsl:apply-templates>
|
11780
11861
|
<xsl:apply-templates select="mn:formattedref"/>
|
11781
11862
|
<!-- end bibitem processing -->
|
11863
|
+
|
11864
|
+
<xsl:call-template name="processBibliographyNote"/>
|
11782
11865
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
11783
11866
|
|
11867
|
+
<xsl:template name="processBibliographyNote">
|
11868
|
+
<xsl:if test="self::mn:note">
|
11869
|
+
<xsl:variable name="note_node">
|
11870
|
+
<xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
|
11871
|
+
<xsl:copy> <!-- skip @id -->
|
11872
|
+
<xsl:copy-of select="node()"/>
|
11873
|
+
</xsl:copy>
|
11874
|
+
</xsl:element>
|
11875
|
+
</xsl:variable>
|
11876
|
+
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
11877
|
+
<xsl:call-template name="note"/>
|
11878
|
+
</xsl:for-each> -->
|
11879
|
+
<xsl:call-template name="note"/>
|
11880
|
+
</xsl:if>
|
11881
|
+
</xsl:template>
|
11882
|
+
|
11784
11883
|
<xsl:template match="mn:title" mode="title">
|
11785
11884
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
11786
11885
|
</xsl:template>
|
@@ -12006,7 +12105,8 @@
|
|
12006
12105
|
</xsl:copy>
|
12007
12106
|
</xsl:template>
|
12008
12107
|
|
12009
|
-
<xsl:template match="mn:xref" mode="index_add_id"
|
12108
|
+
<xsl:template match="mn:xref" mode="index_add_id"/>
|
12109
|
+
<xsl:template match="mn:fmt-xref" mode="index_add_id">
|
12010
12110
|
<xsl:param name="docid"/>
|
12011
12111
|
<xsl:variable name="id">
|
12012
12112
|
<xsl:call-template name="generateIndexXrefId">
|
@@ -12048,7 +12148,7 @@
|
|
12048
12148
|
<xsl:template match="mn:indexsect//mn:li" mode="index_update">
|
12049
12149
|
<xsl:copy>
|
12050
12150
|
<xsl:apply-templates select="@*" mode="index_update"/>
|
12051
|
-
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
12151
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
|
12052
12152
|
</xsl:copy>
|
12053
12153
|
</xsl:template>
|
12054
12154
|
|
@@ -12069,11 +12169,11 @@
|
|
12069
12169
|
<xsl:value-of select="."/>
|
12070
12170
|
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
12071
12171
|
</xsl:when>
|
12072
|
-
<xsl:when test="self::* and local-name(.) = 'xref'">
|
12172
|
+
<xsl:when test="self::* and local-name(.) = 'fmt-xref'">
|
12073
12173
|
<xsl:variable name="id" select="@id"/>
|
12074
12174
|
|
12075
|
-
<xsl:variable name="id_next" select="following-sibling::mn:xref[1]/@id"/>
|
12076
|
-
<xsl:variable name="id_prev" select="preceding-sibling::mn:xref[1]/@id"/>
|
12175
|
+
<xsl:variable name="id_next" select="following-sibling::mn:fmt-xref[1]/@id"/>
|
12176
|
+
<xsl:variable name="id_prev" select="preceding-sibling::mn:fmt-xref[1]/@id"/>
|
12077
12177
|
|
12078
12178
|
<xsl:variable name="pages_">
|
12079
12179
|
<xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
|
@@ -12169,18 +12269,18 @@
|
|
12169
12269
|
<xsl:variable name="item_number">
|
12170
12270
|
<xsl:number count="mn:li[ancestor::mn:indexsect]" level="any"/>
|
12171
12271
|
</xsl:variable>
|
12172
|
-
<xsl:variable name="xref_number"><xsl:number count="mn:xref"/></xsl:variable>
|
12272
|
+
<xsl:variable name="xref_number"><xsl:number count="mn:fmt-xref"/></xsl:variable>
|
12173
12273
|
<xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
12174
12274
|
</xsl:template>
|
12175
12275
|
|
12176
|
-
<xsl:template match="mn:indexsect/mn:title" priority="4">
|
12276
|
+
<xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
|
12177
12277
|
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
12178
12278
|
<!-- Index -->
|
12179
12279
|
<xsl:apply-templates/>
|
12180
12280
|
</fo:block>
|
12181
12281
|
</xsl:template>
|
12182
12282
|
|
12183
|
-
<xsl:template match="mn:indexsect/mn:clause/mn:title" priority="4">
|
12283
|
+
<xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
|
12184
12284
|
<!-- Letter A, B, C, ... -->
|
12185
12285
|
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
12186
12286
|
<xsl:apply-templates/>
|
@@ -12221,12 +12321,12 @@
|
|
12221
12321
|
<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"/>
|
12222
12322
|
<bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
|
12223
12323
|
<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"/> -->
|
12224
|
-
<xsl:when test="1 = 2 and preceding-sibling::node()[self::mn:fmt-
|
12324
|
+
<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]">
|
12225
12325
|
<!-- skip here, see the template 'fmt-review-start' -->
|
12226
12326
|
</xsl:when>
|
12227
12327
|
<xsl:otherwise>
|
12228
12328
|
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
12229
|
-
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-
|
12329
|
+
<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>
|
12230
12330
|
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
12231
12331
|
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
12232
12332
|
</xsl:otherwise>
|
@@ -12325,6 +12425,68 @@
|
|
12325
12425
|
<!-- End Form's elements processing -->
|
12326
12426
|
<!-- =================== -->
|
12327
12427
|
|
12428
|
+
<xsl:attribute-set name="toc-style">
|
12429
|
+
</xsl:attribute-set>
|
12430
|
+
|
12431
|
+
<xsl:template name="refine_toc-style">
|
12432
|
+
</xsl:template>
|
12433
|
+
|
12434
|
+
<xsl:attribute-set name="toc-title-style">
|
12435
|
+
<xsl:attribute name="font-size">33pt</xsl:attribute>
|
12436
|
+
<xsl:attribute name="margin-bottom">4pt</xsl:attribute>
|
12437
|
+
<xsl:attribute name="role">H1</xsl:attribute>
|
12438
|
+
</xsl:attribute-set>
|
12439
|
+
|
12440
|
+
<xsl:attribute-set name="toc-title-page-style">
|
12441
|
+
</xsl:attribute-set> <!-- toc-title-page-style -->
|
12442
|
+
|
12443
|
+
<xsl:attribute-set name="toc-item-block-style">
|
12444
|
+
</xsl:attribute-set>
|
12445
|
+
|
12446
|
+
<xsl:template name="refine_toc-item-block-style">
|
12447
|
+
</xsl:template>
|
12448
|
+
|
12449
|
+
<xsl:attribute-set name="toc-item-style">
|
12450
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
12451
|
+
</xsl:attribute-set> <!-- END: toc-item-style -->
|
12452
|
+
|
12453
|
+
<xsl:template name="refine_toc-item-style">
|
12454
|
+
<xsl:if test="@level = 1">
|
12455
|
+
<xsl:attribute name="margin-top">14pt</xsl:attribute>
|
12456
|
+
</xsl:if>
|
12457
|
+
<xsl:if test="@level = 1 or @parent = 'annex'">
|
12458
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
12459
|
+
</xsl:if>
|
12460
|
+
<xsl:if test="@level >= 2"> <!-- and not(@parent = 'annex') -->
|
12461
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
12462
|
+
</xsl:if>
|
12463
|
+
</xsl:template> <!-- END: refine_toc-item-style -->
|
12464
|
+
|
12465
|
+
<xsl:attribute-set name="toc-leader-style">
|
12466
|
+
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
12467
|
+
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
12468
|
+
|
12469
|
+
<xsl:attribute-set name="toc-pagenumber-style">
|
12470
|
+
</xsl:attribute-set>
|
12471
|
+
|
12472
|
+
<!-- List of Figures, Tables -->
|
12473
|
+
<xsl:attribute-set name="toc-listof-title-style">
|
12474
|
+
<xsl:attribute name="margin-left">-18mm</xsl:attribute>
|
12475
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
12476
|
+
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
12477
|
+
<xsl:attribute name="space-before">36pt</xsl:attribute>
|
12478
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
12479
|
+
</xsl:attribute-set>
|
12480
|
+
|
12481
|
+
<xsl:attribute-set name="toc-listof-item-block-style">
|
12482
|
+
</xsl:attribute-set>
|
12483
|
+
|
12484
|
+
<xsl:attribute-set name="toc-listof-item-style">
|
12485
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
12486
|
+
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
12487
|
+
<xsl:attribute name="margin-top">2pt</xsl:attribute>
|
12488
|
+
</xsl:attribute-set>
|
12489
|
+
|
12328
12490
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
12329
12491
|
<xsl:variable name="nodes_preface_">
|
12330
12492
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -12390,7 +12552,7 @@
|
|
12390
12552
|
|
12391
12553
|
<xsl:template name="processTables_Contents">
|
12392
12554
|
<mnx:tables>
|
12393
|
-
<xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:name and normalize-space(@id) != '']">
|
12555
|
+
<xsl:for-each select="//mn:table[not(ancestor::mn:metanorma-extension)][@id and mn:fmt-name and normalize-space(@id) != '']">
|
12394
12556
|
<xsl:choose>
|
12395
12557
|
<xsl:when test="mn:fmt-name">
|
12396
12558
|
<xsl:variable name="fmt_name">
|
@@ -12412,7 +12574,7 @@
|
|
12412
12574
|
|
12413
12575
|
<xsl:template name="processFigures_Contents">
|
12414
12576
|
<mnx:figures>
|
12415
|
-
<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) != '']">
|
12577
|
+
<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) != '']">
|
12416
12578
|
<xsl:choose>
|
12417
12579
|
<xsl:when test="mn:fmt-name">
|
12418
12580
|
<xsl:variable name="fmt_name">
|
@@ -12441,7 +12603,7 @@
|
|
12441
12603
|
|
12442
12604
|
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
|
12443
12605
|
|
12444
|
-
<xsl:template match="mn:figure/mn:fmt-name |
|
12606
|
+
<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">
|
12445
12607
|
<xsl:apply-templates mode="contents"/>
|
12446
12608
|
<xsl:text> </xsl:text>
|
12447
12609
|
</xsl:template>
|
@@ -12453,7 +12615,7 @@
|
|
12453
12615
|
</xsl:if>
|
12454
12616
|
</xsl:template>
|
12455
12617
|
|
12456
|
-
<xsl:template match="mn:figure/mn:fmt-name | mn:table/mn:fmt-name |
|
12618
|
+
<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">
|
12457
12619
|
<xsl:apply-templates mode="bookmarks"/>
|
12458
12620
|
<xsl:text> </xsl:text>
|
12459
12621
|
</xsl:template>
|
@@ -12464,7 +12626,7 @@
|
|
12464
12626
|
</xsl:if>
|
12465
12627
|
</xsl:template>
|
12466
12628
|
|
12467
|
-
<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">
|
12629
|
+
<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">
|
12468
12630
|
<xsl:value-of select="."/>
|
12469
12631
|
</xsl:template>
|
12470
12632
|
|
@@ -12474,7 +12636,7 @@
|
|
12474
12636
|
</xsl:if>
|
12475
12637
|
</xsl:template>
|
12476
12638
|
|
12477
|
-
<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">
|
12639
|
+
<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">
|
12478
12640
|
<xsl:value-of select="."/>
|
12479
12641
|
</xsl:template>
|
12480
12642
|
|
@@ -12904,7 +13066,7 @@
|
|
12904
13066
|
<xsl:value-of select="."/>
|
12905
13067
|
</xsl:template>
|
12906
13068
|
|
12907
|
-
<xsl:template match="mn:
|
13069
|
+
<xsl:template match="mn:annotation" mode="contents_item"/>
|
12908
13070
|
|
12909
13071
|
<xsl:template match="mn:tab" mode="contents_item">
|
12910
13072
|
<xsl:text> </xsl:text>
|
@@ -13059,7 +13221,7 @@
|
|
13059
13221
|
<xsl:apply-templates/>
|
13060
13222
|
</xsl:template>
|
13061
13223
|
|
13062
|
-
<xsl:template match="mn:toc//mn:xref" priority="3">
|
13224
|
+
<xsl:template match="mn:toc//mn:xref | mn:toc//mn:fmt-xref" priority="3">
|
13063
13225
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13064
13226
|
<!-- New format: one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13065
13227
|
<!-- <test><xsl:copy-of select="."/></test> -->
|
@@ -13127,8 +13289,8 @@
|
|
13127
13289
|
<xsl:apply-templates mode="toc_table_width"/>
|
13128
13290
|
</xsl:template>
|
13129
13291
|
|
13130
|
-
<xsl:template match="mn:clause[@type = 'toc']/mn:title" mode="toc_table_width"/>
|
13131
|
-
<xsl:template match="mn:clause[not(@type = 'toc')]/mn:title" mode="toc_table_width"/>
|
13292
|
+
<xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" mode="toc_table_width"/>
|
13293
|
+
<xsl:template match="mn:clause[not(@type = 'toc')]/mn:fmt-title" mode="toc_table_width"/>
|
13132
13294
|
|
13133
13295
|
<xsl:template match="mn:li" mode="toc_table_width">
|
13134
13296
|
<mn:tr>
|
@@ -13136,7 +13298,7 @@
|
|
13136
13298
|
</mn:tr>
|
13137
13299
|
</xsl:template>
|
13138
13300
|
|
13139
|
-
<xsl:template match="mn:xref" mode="toc_table_width">
|
13301
|
+
<xsl:template match="mn:fmt-xref" mode="toc_table_width">
|
13140
13302
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13141
13303
|
<!-- New format - one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13142
13304
|
<xsl:for-each select="mn:tab">
|
@@ -13182,7 +13344,7 @@
|
|
13182
13344
|
|
13183
13345
|
<xsl:variable name="padding">
|
13184
13346
|
<xsl:choose>
|
13185
|
-
<xsl:when test="ancestor::mn:note and ancestor::mn:name">1</xsl:when>
|
13347
|
+
<xsl:when test="ancestor::mn:note and ancestor::mn:fmt-name">1</xsl:when>
|
13186
13348
|
<xsl:when test="$depth = 2">2</xsl:when>
|
13187
13349
|
<xsl:otherwise>1</xsl:otherwise>
|
13188
13350
|
</xsl:choose>
|
@@ -13215,10 +13377,10 @@
|
|
13215
13377
|
|
13216
13378
|
</xsl:template> <!-- tab -->
|
13217
13379
|
|
13218
|
-
<xsl:template match="mn:note/mn:name/mn:tab" priority="2"/>
|
13219
|
-
<xsl:template match="mn:termnote/mn:name/mn:tab" priority="2"/>
|
13380
|
+
<xsl:template match="mn:note/mn:fmt-name/mn:tab" priority="2"/>
|
13381
|
+
<xsl:template match="mn:termnote/mn:fmt-name/mn:tab" priority="2"/>
|
13220
13382
|
|
13221
|
-
<xsl:template match="mn:note/mn:name/mn:tab" mode="tab">
|
13383
|
+
<xsl:template match="mn:note/mn:fmt-name/mn:tab" mode="tab">
|
13222
13384
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
13223
13385
|
</xsl:template>
|
13224
13386
|
|
@@ -13233,13 +13395,13 @@
|
|
13233
13395
|
</xsl:template>
|
13234
13396
|
|
13235
13397
|
<xsl:variable name="reviews_">
|
13236
|
-
<xsl:for-each select="//mn:
|
13398
|
+
<xsl:for-each select="//mn:annotation[not(parent::mn:annotation-container)][@from]">
|
13237
13399
|
<xsl:copy>
|
13238
13400
|
<xsl:copy-of select="@from"/>
|
13239
13401
|
<xsl:copy-of select="@id"/>
|
13240
13402
|
</xsl:copy>
|
13241
13403
|
</xsl:for-each>
|
13242
|
-
<xsl:for-each select="//mn:fmt-
|
13404
|
+
<xsl:for-each select="//mn:fmt-annotation-start[@source]">
|
13243
13405
|
<xsl:copy>
|
13244
13406
|
<xsl:copy-of select="@source"/>
|
13245
13407
|
<xsl:copy-of select="@id"/>
|
@@ -13253,7 +13415,7 @@
|
|
13253
13415
|
<!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
|
13254
13416
|
<xsl:variable name="curr_id" select="@id"/>
|
13255
13417
|
<!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
|
13256
|
-
<xsl:for-each select="$reviews//mn:
|
13418
|
+
<xsl:for-each select="$reviews//mn:annotation[@from = $curr_id]"> <!-- $reviews//mn:fmt-review-start[@source = $curr_id] -->
|
13257
13419
|
<xsl:variable name="review_id" select="normalize-space(@id)"/>
|
13258
13420
|
<xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
|
13259
13421
|
<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>
|
@@ -13268,7 +13430,7 @@
|
|
13268
13430
|
|
13269
13431
|
<!-- document text (not figures, or tables) footnotes -->
|
13270
13432
|
<xsl:variable name="reviews_container_">
|
13271
|
-
<xsl:for-each select="//mn:
|
13433
|
+
<xsl:for-each select="//mn:annotation-container/mn:fmt-annotation-body">
|
13272
13434
|
<xsl:variable name="update_xml_step1">
|
13273
13435
|
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
13274
13436
|
</xsl:variable>
|
@@ -13277,10 +13439,10 @@
|
|
13277
13439
|
</xsl:variable>
|
13278
13440
|
<xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
|
13279
13441
|
|
13280
|
-
<xsl:template match="mn:
|
13442
|
+
<xsl:template match="mn:annotation-container"/>
|
13281
13443
|
|
13282
13444
|
<!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
|
13283
|
-
<xsl:template match="mn:
|
13445
|
+
<xsl:template match="mn:annotation[not(parent::mn:annotation-container)]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
13284
13446
|
<xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
13285
13447
|
<xsl:if test="$isGenerateTableIF = 'false'">
|
13286
13448
|
<xsl:choose>
|
@@ -13300,7 +13462,7 @@
|
|
13300
13462
|
</xsl:template>
|
13301
13463
|
|
13302
13464
|
<!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
|
13303
|
-
<xsl:template match="mn:fmt-
|
13465
|
+
<xsl:template match="mn:fmt-annotation-start" name="fmt-annotation-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
13304
13466
|
<!-- comment 2019-11-29 -->
|
13305
13467
|
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
13306
13468
|
<xsl:apply-templates /> -->
|
@@ -13356,7 +13518,7 @@
|
|
13356
13518
|
</xsl:template>
|
13357
13519
|
|
13358
13520
|
<!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
|
13359
|
-
<xsl:template match="mn:
|
13521
|
+
<xsl:template match="mn:annotation[@type = 'other']"/>
|
13360
13522
|
|
13361
13523
|
<!-- ============ -->
|
13362
13524
|
<!-- errata -->
|
@@ -13749,9 +13911,12 @@
|
|
13749
13911
|
<xsl:choose>
|
13750
13912
|
<xsl:when test="mn:fmt-title">
|
13751
13913
|
<xsl:variable name="fmt_title_section">
|
13752
|
-
<xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:
|
13914
|
+
<xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/preceding-sibling::node()[not(self::mn:annotation)]"/>
|
13753
13915
|
</xsl:variable>
|
13754
13916
|
<xsl:value-of select="normalize-space($fmt_title_section)"/>
|
13917
|
+
<xsl:if test="normalize-space($fmt_title_section) = ''">
|
13918
|
+
<xsl:value-of select="mn:fmt-title/mn:tab[1]/preceding-sibling::node()"/>
|
13919
|
+
</xsl:if>
|
13755
13920
|
</xsl:when>
|
13756
13921
|
<xsl:otherwise>
|
13757
13922
|
<xsl:value-of select="mn:title/mn:tab[1]/preceding-sibling::node()"/>
|
@@ -13764,6 +13929,9 @@
|
|
13764
13929
|
<xsl:when test="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab]">
|
13765
13930
|
<xsl:copy-of select="mn:fmt-title//mn:span[@class = 'fmt-caption-delim'][mn:tab][1]/following-sibling::node()"/>
|
13766
13931
|
</xsl:when>
|
13932
|
+
<xsl:when test="mn:fmt-title/mn:tab">
|
13933
|
+
<xsl:copy-of select="mn:fmt-title/mn:tab[1]/following-sibling::node()"/>
|
13934
|
+
</xsl:when>
|
13767
13935
|
<xsl:when test="mn:fmt-title">
|
13768
13936
|
<xsl:copy-of select="mn:fmt-title/node()"/>
|
13769
13937
|
</xsl:when>
|
@@ -13905,10 +14073,10 @@
|
|
13905
14073
|
|
13906
14074
|
</fo:block>
|
13907
14075
|
|
13908
|
-
<xsl:apply-templates select="mn:title[@columns = 1]"/>
|
14076
|
+
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
13909
14077
|
|
13910
14078
|
<fo:block>
|
13911
|
-
<xsl:apply-templates select="node()[not(self::mn:title and @columns = 1)]"/>
|
14079
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
13912
14080
|
</fo:block>
|
13913
14081
|
</xsl:otherwise>
|
13914
14082
|
</xsl:choose>
|
@@ -13917,7 +14085,7 @@
|
|
13917
14085
|
<xsl:template name="refine_annex_style">
|
13918
14086
|
</xsl:template>
|
13919
14087
|
|
13920
|
-
<xsl:template match="mn:name/text()">
|
14088
|
+
<xsl:template match="mn:name/text() | mn:fmt-name/text()">
|
13921
14089
|
<!-- 0xA0 to space replacement -->
|
13922
14090
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
13923
14091
|
</xsl:template>
|
@@ -13973,28 +14141,28 @@
|
|
13973
14141
|
<xsl:template match="mn:amend"/>
|
13974
14142
|
|
13975
14143
|
<!-- fmt-title renamed to title in update_xml_step1 -->
|
13976
|
-
<xsl:template match="mn:fmt-title"/>
|
14144
|
+
<!-- <xsl:template match="mn:fmt-title" /> -->
|
13977
14145
|
|
13978
14146
|
<!-- fmt-name renamed to name in update_xml_step1 -->
|
13979
|
-
<xsl:template match="mn:fmt-name"/>
|
14147
|
+
<!-- <xsl:template match="mn:fmt-name" /> -->
|
13980
14148
|
|
13981
14149
|
<!-- fmt-preferred renamed to preferred in update_xml_step1 -->
|
13982
|
-
<xsl:template match="mn:fmt-preferred"/>
|
14150
|
+
<!-- <xsl:template match="mn:fmt-preferred" /> -->
|
13983
14151
|
|
13984
14152
|
<!-- fmt-admitted renamed to admitted in update_xml_step1 -->
|
13985
|
-
<xsl:template match="mn:fmt-admitted"/>
|
14153
|
+
<!-- <xsl:template match="mn:fmt-admitted" /> -->
|
13986
14154
|
|
13987
14155
|
<!-- fmt-deprecates renamed to deprecates in update_xml_step1 -->
|
13988
|
-
<xsl:template match="mn:fmt-deprecates"/>
|
14156
|
+
<!-- <xsl:template match="mn:fmt-deprecates" /> -->
|
13989
14157
|
|
13990
14158
|
<!-- fmt-definition renamed to definition in update_xml_step1 -->
|
13991
|
-
<xsl:template match="mn:fmt-definition"/>
|
14159
|
+
<!-- <xsl:template match="mn:fmt-definition" /> -->
|
13992
14160
|
|
13993
14161
|
<!-- fmt-termsource renamed to termsource in update_xml_step1 -->
|
13994
|
-
<xsl:template match="mn:fmt-termsource"/>
|
14162
|
+
<!-- <xsl:template match="mn:fmt-termsource" /> -->
|
13995
14163
|
|
13996
14164
|
<!-- fmt-source renamed to source in update_xml_step1 -->
|
13997
|
-
<xsl:template match="mn:fmt-source"/>
|
14165
|
+
<!-- <xsl:template match="mn:fmt-source" /> -->
|
13998
14166
|
|
13999
14167
|
<xsl:template match="mn:semx">
|
14000
14168
|
<xsl:apply-templates/>
|
@@ -14439,12 +14607,12 @@
|
|
14439
14607
|
<xsl:when test="ancestor::mn:preface">
|
14440
14608
|
<xsl:value-of select="$level_total - 2"/>
|
14441
14609
|
</xsl:when>
|
14442
|
-
<xsl:when test="ancestor::mn:sections and self::mn:title">
|
14610
|
+
<xsl:when test="ancestor::mn:sections and self::mn:fmt-title">
|
14443
14611
|
<!-- determine 'depth' depends on upper clause with title/@depth -->
|
14444
14612
|
<!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
|
14445
|
-
<xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:title/@depth][1]/mn:title/@depth"/>
|
14613
|
+
<xsl:variable name="clause_with_depth_depth" select="ancestor::mn:clause[mn:fmt-title/@depth][1]/mn:fmt-title/@depth"/>
|
14446
14614
|
<!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
|
14447
|
-
<xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:title/@depth][1]/ancestor::*)"/>
|
14615
|
+
<xsl:variable name="clause_with_depth_level" select="count(ancestor::mn:clause[mn:fmt-title/@depth][1]/ancestor::*)"/>
|
14448
14616
|
<!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
|
14449
14617
|
<xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
|
14450
14618
|
<!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
|
@@ -14460,8 +14628,8 @@
|
|
14460
14628
|
</xsl:otherwise>
|
14461
14629
|
</xsl:choose>
|
14462
14630
|
</xsl:when>
|
14463
|
-
<xsl:when test="ancestor::mn:sections and self::mn:name and parent::mn:term">
|
14464
|
-
<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:title/@depth)"/>
|
14631
|
+
<xsl:when test="ancestor::mn:sections and self::mn:fmt-name and parent::mn:term">
|
14632
|
+
<xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::mn:terms[1]/mn:fmt-title/@depth)"/>
|
14465
14633
|
<xsl:choose>
|
14466
14634
|
<xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
|
14467
14635
|
<xsl:value-of select="number($upper_terms_depth + 1)"/>
|
@@ -14472,7 +14640,7 @@
|
|
14472
14640
|
</xsl:choose>
|
14473
14641
|
</xsl:when>
|
14474
14642
|
<xsl:when test="ancestor::mn:sections">
|
14475
|
-
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:title/@depth)"/>
|
14643
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[self::mn:clause or self::mn:terms][1]/mn:fmt-title/@depth)"/>
|
14476
14644
|
<xsl:choose>
|
14477
14645
|
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
14478
14646
|
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
@@ -14488,8 +14656,8 @@
|
|
14488
14656
|
<xsl:when test="parent::mn:annex">
|
14489
14657
|
<xsl:value-of select="$level_total - 1"/>
|
14490
14658
|
</xsl:when>
|
14491
|
-
<xsl:when test="ancestor::mn:annex and self::mn:title">
|
14492
|
-
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:title/@depth)"/>
|
14659
|
+
<xsl:when test="ancestor::mn:annex and self::mn:fmt-title">
|
14660
|
+
<xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::mn:clause[2]/mn:fmt-title/@depth)"/>
|
14493
14661
|
<xsl:choose>
|
14494
14662
|
<xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
|
14495
14663
|
<xsl:value-of select="number($upper_clause_depth + 1)"/>
|
@@ -14522,7 +14690,7 @@
|
|
14522
14690
|
</xsl:when>
|
14523
14691
|
<xsl:otherwise>
|
14524
14692
|
<xsl:variable name="title_level_">
|
14525
|
-
<xsl:for-each select="../preceding-sibling::mn:title[1]">
|
14693
|
+
<xsl:for-each select="../preceding-sibling::mn:fmt-title[1]">
|
14526
14694
|
<xsl:call-template name="getLevel"/>
|
14527
14695
|
</xsl:for-each>
|
14528
14696
|
</xsl:variable>
|
@@ -14599,15 +14767,17 @@
|
|
14599
14767
|
</xsl:template>
|
14600
14768
|
|
14601
14769
|
<xsl:template name="setNamedDestination">
|
14602
|
-
|
14603
|
-
|
14604
|
-
<
|
14605
|
-
|
14606
|
-
<xsl:for-each select=". | mn:title | mn:name">
|
14607
|
-
<xsl:if test="@named_dest">
|
14608
|
-
<fox:destination internal-destination="{@named_dest}"/>
|
14770
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
14771
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
14772
|
+
<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'">
|
14773
|
+
<fox:destination internal-destination="{@id}"/>
|
14609
14774
|
</xsl:if>
|
14610
|
-
|
14775
|
+
<xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
|
14776
|
+
<xsl:if test="@named_dest">
|
14777
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
14778
|
+
</xsl:if>
|
14779
|
+
</xsl:for-each>
|
14780
|
+
</xsl:if>
|
14611
14781
|
</xsl:template>
|
14612
14782
|
|
14613
14783
|
<xsl:template name="add-letter-spacing">
|
@@ -14955,7 +15125,7 @@
|
|
14955
15125
|
</xsl:when>
|
14956
15126
|
<xsl:otherwise>
|
14957
15127
|
<!-- namespace-uri(ancestor::mn:title) != '' to skip title from $contents -->
|
14958
|
-
<xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
|
15128
|
+
<xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_prev = '' and ../preceding-sibling::node())">
|
14959
15129
|
<fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
14960
15130
|
</xsl:if>
|
14961
15131
|
<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">
|
@@ -14989,7 +15159,7 @@
|
|
14989
15159
|
</fo:block>
|
14990
15160
|
</fo:block-container>
|
14991
15161
|
</fo:inline-container>
|
14992
|
-
<xsl:if test="namespace-uri(ancestor::mn:title) != '' and ($char_next != '' or ../following-sibling::node())">
|
15162
|
+
<xsl:if test="namespace-uri(ancestor::mn:fmt-title) != '' and ($char_next != '' or ../following-sibling::node())">
|
14993
15163
|
<fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
|
14994
15164
|
</xsl:if>
|
14995
15165
|
</xsl:otherwise>
|