metanorma-ieee 1.5.2 → 1.5.4

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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/ieee/html/header.html +3 -3
  3. data/lib/isodoc/ieee/html/html_ieee_titlepage.html +15 -2
  4. data/lib/isodoc/ieee/html/htmlstyle.css +10 -0
  5. data/lib/isodoc/ieee/html/htmlstyle.scss +11 -0
  6. data/lib/isodoc/ieee/html/ieee.css +46 -1
  7. data/lib/isodoc/ieee/html/ieee.scss +42 -1
  8. data/lib/isodoc/ieee/html/word_ieee_titlepage.html +10 -2
  9. data/lib/isodoc/ieee/html/wordstyle.css +48 -0
  10. data/lib/isodoc/ieee/html/wordstyle.scss +44 -0
  11. data/lib/isodoc/ieee/html/wordstyle_wp.css +47 -0
  12. data/lib/isodoc/ieee/html/wordstyle_wp.scss +43 -0
  13. data/lib/isodoc/ieee/html_convert.rb +4 -1
  14. data/lib/isodoc/ieee/i18n-en.yaml +2 -0
  15. data/lib/isodoc/ieee/ieee.amendment.xsl +1274 -449
  16. data/lib/isodoc/ieee/ieee.standard.xsl +1274 -449
  17. data/lib/isodoc/ieee/metadata.rb +34 -21
  18. data/lib/isodoc/ieee/presentation_bibitem.rb +102 -0
  19. data/lib/isodoc/ieee/presentation_ref.rb +149 -93
  20. data/lib/isodoc/ieee/presentation_terms.rb +60 -16
  21. data/lib/isodoc/ieee/presentation_xml_convert.rb +22 -64
  22. data/lib/isodoc/ieee/word_authority.rb +38 -60
  23. data/lib/isodoc/ieee/word_cleanup.rb +83 -35
  24. data/lib/isodoc/ieee/word_cleanup_blocks.rb +0 -1
  25. data/lib/isodoc/ieee/word_convert.rb +22 -19
  26. data/lib/isodoc/ieee/word_toc.rb +46 -0
  27. data/lib/metanorma/ieee/biblio-standoc.rng +0 -49
  28. data/lib/metanorma/ieee/biblio.rng +11 -1
  29. data/lib/metanorma/ieee/boilerplate.adoc +6 -5
  30. data/lib/metanorma/ieee/boilerplate_wp.adoc +1 -2
  31. data/lib/metanorma/ieee/cleanup.rb +56 -9
  32. data/lib/metanorma/ieee/cleanup_boilerplate.rb +18 -10
  33. data/lib/metanorma/ieee/cleanup_ref.rb +0 -90
  34. data/lib/metanorma/ieee/cleanup_ref_fn.rb +116 -0
  35. data/lib/metanorma/ieee/front.rb +62 -11
  36. data/lib/metanorma/ieee/ieee-footnotes.yaml +18 -18
  37. data/lib/metanorma/ieee/isodoc.rng +24 -1
  38. data/lib/metanorma/ieee/processor.rb +1 -0
  39. data/lib/metanorma/ieee/relaton-ieee.rng +10 -43
  40. data/lib/metanorma/ieee/validate.rb +1 -1
  41. data/lib/metanorma/ieee/version.rb +1 -1
  42. metadata +5 -2
@@ -69,18 +69,23 @@
69
69
  </xsl:choose>
70
70
  </xsl:variable>
71
71
 
72
+ <!-- https://github.com/metanorma/metanorma-csa/issues/329 -->
73
+ <!-- if stage >= 60 -->
74
+ <xsl:variable name="stage_published" select="normalize-space((//mn:metanorma)[1]/mn:metanorma-extension/mn:semantic-metadata/mn:stage-published)"/>
75
+
72
76
  <xsl:variable name="trial_use" select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:trial-use[normalize-space(@language) = '']"/>
73
77
 
74
78
  <xsl:variable name="current_template">
75
79
  <xsl:choose>
76
80
  <xsl:when test="($doctype = 'standard' or $doctype = 'guide' or $doctype = 'recommended-practice') and $stage = 'draft'">draft</xsl:when>
77
- <xsl:when test="($doctype = 'standard' or $doctype = 'guide' or $doctype = 'recommended-practice') and ($stage = 'published' or $stage = 'approved')">standard</xsl:when>
81
+ <xsl:when test="($doctype = 'standard' or $doctype = 'guide' or $doctype = 'recommended-practice') and ($stage = 'published' or $stage = 'approved' or $stage_published = 'true')">standard</xsl:when>
78
82
  <xsl:when test="$doctype = 'whitepaper' and $subdoctype = 'icap'">icap-whitepaper</xsl:when>
79
83
  <xsl:when test="$doctype = 'whitepaper' and $subdoctype = 'industry-connection-report'">industry-connection-report</xsl:when>
80
84
  <xsl:otherwise><xsl:value-of select="$doctype"/></xsl:otherwise>
81
85
  </xsl:choose>
82
86
  </xsl:variable>
83
87
 
88
+ <!-- title_prefix isn't using, keep here just for further checking the titles generated by Metanorma -->
84
89
  <xsl:variable name="title_prefix">
85
90
  <xsl:choose>
86
91
  <xsl:when test="$current_template = 'draft'">
@@ -112,6 +117,11 @@
112
117
 
113
118
  <xsl:variable name="line-height">1.8</xsl:variable>
114
119
 
120
+ <xsl:variable name="page_break_between_sections" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:page-break-between-sections)"/>
121
+
122
+ <xsl:variable name="developed_by">Developed by the</xsl:variable>
123
+ <xsl:variable name="sponsored_by">Sponsored by the</xsl:variable>
124
+
115
125
  <xsl:template name="layout-master-set">
116
126
  <fo:layout-master-set>
117
127
 
@@ -128,7 +138,7 @@
128
138
 
129
139
  <!-- IEEE standard cover page -->
130
140
  <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
131
- <fo:region-body margin-top="62mm" margin-bottom="25mm" margin-left="21.2mm" margin-right="25mm"/>
141
+ <fo:region-body margin-top="52mm" margin-bottom="25mm" margin-left="21.2mm" margin-right="25mm"/> <!-- margin-top="62mm" -->
132
142
  <fo:region-before region-name="header" extent="62mm" precedence="true"/>
133
143
  <fo:region-after region-name="footer" extent="25mm"/>
134
144
  <fo:region-start region-name="left-region" extent="21.2mm"/>
@@ -224,6 +234,14 @@
224
234
  <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
225
235
  </fo:simple-page-master>
226
236
 
237
+ <fo:simple-page-master master-name="document-draft-two-columns" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
238
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm" column-count="2" column-gap="10mm"/>
239
+ <fo:region-before region-name="header" extent="{$marginTop}mm"/>
240
+ <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
241
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
242
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
243
+ </fo:simple-page-master>
244
+
227
245
  <!-- landscape -->
228
246
  <fo:simple-page-master master-name="document-draft-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
229
247
  <fo:region-body margin-top="{$marginLeftRight1}mm" margin-bottom="{$marginLeftRight2}mm" margin-left="{$marginBottom}mm" margin-right="{$marginTop}mm"/>
@@ -238,16 +256,21 @@
238
256
  <!-- ======================= -->
239
257
  <!-- Standard document pages -->
240
258
  <!-- ======================= -->
241
- <fo:simple-page-master master-name="document-standard-first" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
259
+ <fo:simple-page-master master-name="document-standard-first-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
242
260
  <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
243
261
  <fo:region-before region-name="header_empty" extent="{$marginTop}mm"/>
244
262
  <fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
245
263
  <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
246
264
  <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
247
265
  </fo:simple-page-master>
266
+ <fo:page-sequence-master master-name="document-standard-first">
267
+ <fo:repeatable-page-master-alternatives>
268
+ <fo:conditional-page-master-reference page-position="first" master-reference="document-standard-first-page"/>
269
+ <fo:conditional-page-master-reference page-position="any" master-reference="document-draft"/>
270
+ </fo:repeatable-page-master-alternatives>
271
+ </fo:page-sequence-master>
248
272
  <fo:page-sequence-master master-name="document-standard">
249
273
  <fo:repeatable-page-master-alternatives>
250
- <fo:conditional-page-master-reference page-position="first" master-reference="document-standard-first"/>
251
274
  <fo:conditional-page-master-reference page-position="any" master-reference="document-draft"/>
252
275
  </fo:repeatable-page-master-alternatives>
253
276
  </fo:page-sequence-master>
@@ -332,12 +355,17 @@
332
355
 
333
356
  <xsl:variable name="approved_date_year" select="substring(normalize-space(/mn:metanorma/mn:bibdata/mn:date[@type = 'issued']),1,4)"/>
334
357
 
358
+ <xsl:variable name="designation" select="/mn:metanorma/mn:bibdata/mn:docnumber"/>
359
+
335
360
  <!-- IEEE Std 802.1X™-2020 -->
336
- <xsl:variable name="standard_number">IEEE Std <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'IEEE']"/>-<xsl:value-of select="$approved_date_year"/></xsl:variable>
361
+ <!-- <xsl:variable name="standard_number">IEEE Std <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'IEEE']"/>-<xsl:value-of select="$approved_date_year"/></xsl:variable> -->
362
+ <xsl:variable name="standard_number_" select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'IEEE']"/>
363
+ <xsl:variable name="regex_tm" select="concat('(', $designation, ')', '(-\d{4})?')"/>
364
+ <xsl:variable name="standard_number" select="java:replaceAll(java:java.lang.String.new($standard_number_), $regex_tm,'$1™$2')"/>
365
+
337
366
  <!-- <xsl:value-of select="substring(/mn:metanorma/mn:bibdata/mn:date[@type = 'published'],1,4)"/> -->
338
367
 
339
- <xsl:variable name="designation" select="/mn:metanorma/mn:bibdata/mn:docnumber"/>
340
- <xsl:variable name="draft_number" select="/mn:metanorma/mn:bibdata/mn:version/mn:draft"/>
368
+ <!-- <xsl:variable name="draft_number" select="/mn:metanorma/mn:bibdata/mn:version/mn:draft"/> -->
341
369
  <xsl:variable name="revision_month" select="/mn:metanorma/mn:bibdata/mn:version/mn:revision-date"/>
342
370
  <xsl:variable name="draft_month">
343
371
  <xsl:call-template name="getMonthLocalizedByNum">
@@ -346,28 +374,21 @@
346
374
  </xsl:variable>
347
375
  <xsl:variable name="draft_year" select="substring($revision_month, 1, 4)"/>
348
376
 
349
- <xsl:variable name="title_intro">
350
- <!-- Example Local and Metropolitan Area Networks— -->
351
- <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en']/node()"/>
352
- <!-- <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@language = 'intro' or @language = 'intro-en']/node()"/>
353
- <xsl:if test="not(/mn:metanorma/mn:bibdata/mn:title[@language = 'intro' or @language = 'intro-en'])">
354
- </xsl:if>
355
- <xsl:if test="/mn:metanorma/mn:bibdata/mn:title[@language = 'intro' or @language = 'intro-en' or @language = 'en'] and /mn:metanorma/mn:bibdata/mn:title[@language = 'main' or @language = 'main-en']">—</xsl:if> -->
356
- </xsl:variable>
357
-
377
+ <!-- <xsl:variable name="title_intro"> -->
358
378
  <xsl:variable name="title_main">
359
- <!-- Example: Port-Based Network Access Control -->
360
- <!-- <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@language = 'main' or @language = 'main-en']/node()"/> -->
379
+ <!-- Example: IEEE Standard Example Local and Metropolitan Area Networks -->
380
+ <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en' and @type = 'main']/node()"/>
361
381
  </xsl:variable>
362
382
 
383
+ <xsl:variable name="docidentifier_draft" select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'IEEE-draft']"/>
384
+
363
385
  <xsl:variable name="title">
364
386
  <xsl:choose>
365
387
  <xsl:when test="$current_template = 'standard'">
366
- <xsl:copy-of select="$title_intro"/>
367
388
  <xsl:copy-of select="$title_main"/>
368
389
  </xsl:when>
369
390
  <xsl:otherwise>
370
- <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[1]/node()"/>
391
+ <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en' and @type = 'main']/node()"/>
371
392
 
372
393
  <!-- Example: Amendment # -->
373
394
  <xsl:if test="contains('amendment corrigendum erratum', $subdoctype) and $subdoctype != ''">
@@ -393,16 +414,18 @@
393
414
  </xsl:if>
394
415
  </xsl:variable>
395
416
 
417
+ <!-- for page header -->
396
418
  <xsl:variable name="document_id">
397
419
  <xsl:choose>
398
420
  <xsl:when test="$current_template = 'draft'">
399
421
  <xsl:if test="contains('amendment corrigendum erratum', $subdoctype) and $subdoctype != ''">
400
422
  <xsl:text>IEEE </xsl:text>
401
423
  </xsl:if>
402
- <xsl:text>P</xsl:text>
424
+ <!-- <xsl:text>P</xsl:text>
403
425
  <xsl:value-of select="$designation"/>
404
426
  <xsl:text>/D</xsl:text>
405
- <xsl:value-of select="$draft_number"/>
427
+ <xsl:value-of select="$draft_number"/> -->
428
+ <xsl:value-of select="$docidentifier_draft"/>
406
429
  <xsl:text>, </xsl:text>
407
430
  <xsl:value-of select="$draft_month"/>
408
431
  <xsl:text> </xsl:text>
@@ -414,9 +437,20 @@
414
437
  </xsl:choose>
415
438
  </xsl:variable>
416
439
 
417
- <xsl:variable name="society" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:society"/>
440
+ <!-- <xsl:variable name="society" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:society"/> -->
441
+ <xsl:variable name="society">
442
+ <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'authorizer']/mn:description = 'committee'][1]/mn:organization">
443
+ <xsl:value-of select="normalize-space(concat(mn:abbreviation, ' ', mn:subdivision[@type = 'Society']/mn:name))"/>
444
+ </xsl:for-each>
445
+ </xsl:variable>
418
446
 
419
- <xsl:variable name="committee" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/>
447
+ <!-- <xsl:variable name="committee" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/> -->
448
+ <xsl:variable name="committee" select="normalize-space(/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'authorizer']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:name)"/>
449
+
450
+ <xsl:variable name="enabler_">
451
+ <xsl:copy-of select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'enabler']]/mn:organization/node()"/>
452
+ </xsl:variable>
453
+ <xsl:variable name="enabler" select="xalan:nodeset($enabler_)"/>
420
454
 
421
455
  <xsl:variable name="approved_by">IEEE SA Standards Board</xsl:variable>
422
456
  <xsl:variable name="approved_date">
@@ -471,24 +505,25 @@
471
505
  <xsl:call-template name="cover-page">
472
506
  <xsl:with-param name="num" select="$num"/>
473
507
  <xsl:with-param name="document_id" select="$document_id"/>
508
+ <xsl:with-param name="docidentifier_draft" select="$docidentifier_draft"/>
474
509
  <xsl:with-param name="title" select="$title"/>
475
510
  <xsl:with-param name="society" select="$society"/>
476
511
  <xsl:with-param name="copyright_holder" select="$copyright_holder"/>
477
512
  <xsl:with-param name="copyright_year" select="$copyright_year"/>
478
513
  <xsl:with-param name="designation" select="$designation"/>
479
- <xsl:with-param name="draft_number" select="$draft_number"/>
514
+ <!-- <xsl:with-param name="draft_number" select="$draft_number"/> -->
480
515
  <xsl:with-param name="committee" select="$committee"/>
516
+ <xsl:with-param name="enabler" select="$enabler"/>
481
517
  <xsl:with-param name="approved_date" select="$approved_date"/>
482
518
  <xsl:with-param name="approved_by" select="$approved_by"/>
483
- <xsl:with-param name="title_intro" select="$title_intro"/>
484
519
  <xsl:with-param name="title_main" select="$title_main"/>
485
520
  <xsl:with-param name="standard_number" select="$standard_number"/>
486
521
  <xsl:with-param name="history_text" select="$history_text"/>
487
522
  </xsl:call-template>
488
523
 
489
524
  <xsl:variable name="title_standard_coverpage_">
490
- <xsl:choose>
491
- <!-- title starts with lower-cased letter -->
525
+ <!-- <xsl:choose>
526
+ title starts with lower-cased letter
492
527
  <xsl:when test="translate(substring($title_intro,1,1),$lower,'') = ''">
493
528
  <fo:block font-size="18pt">
494
529
  <xsl:value-of select="$title_prefix"/>
@@ -496,20 +531,22 @@
496
531
  </fo:block>
497
532
  </xsl:when>
498
533
  <xsl:otherwise>
499
- <!-- Example: IEEE Standard for -->
534
+ Example: IEEE Standard for
500
535
  <fo:block font-size="18pt">
501
536
  <xsl:value-of select="$title_prefix"/>
502
537
  </fo:block>
503
538
  <fo:block font-size="18pt" margin-left="6mm">
504
- <!-- Example Local and Metropolitan Area Networks— -->
539
+ Example Local and Metropolitan Area Networks—
505
540
  <xsl:copy-of select="$title_intro"/>
506
541
  </fo:block>
507
542
  </xsl:otherwise>
508
- </xsl:choose>
509
- <fo:block font-size="24pt" space-before="12pt">
510
- <!-- Example: Port-Based Network Access Control -->
543
+ </xsl:choose> -->
544
+
545
+ <fo:block font-size="23pt"> <!-- 18pt -->
546
+ <!-- <xsl:value-of select="$title_prefix"/> -->
511
547
  <xsl:copy-of select="$title_main"/>
512
548
  </fo:block>
549
+
513
550
  </xsl:variable>
514
551
  <xsl:variable name="title_standard_coverpage" select="xalan:nodeset($title_standard_coverpage_)"/>
515
552
 
@@ -558,34 +595,52 @@
558
595
  <xsl:with-param name="doctype" select="$doctype"/>
559
596
  <xsl:with-param name="copyright_year" select="$copyright_year"/>
560
597
  <xsl:with-param name="copyright_holder" select="$copyright_holder"/>
561
- <xsl:with-param name="hideHeader">true</xsl:with-param>
598
+ <!-- <xsl:with-param name="hideHeader">true</xsl:with-param> -->
599
+ <xsl:with-param name="hideFooter">true</xsl:with-param>
562
600
  </xsl:call-template>
563
601
 
564
602
  <fo:flow flow-name="xsl-region-body">
565
- <fo:block text-align="right" margin-top="2mm">
603
+ <fo:block text-align="right" margin-top="-11.5mm" id="__internal_layout__titlepage_{generate-id()}"> <!-- margin-top="2mm" -->
566
604
  <fo:block font-size="12pt" font-weight="bold"><xsl:value-of select="$standard_number"/></fo:block>
567
605
  <fo:block font-size="9pt"><xsl:value-of select="$history_text"/></fo:block>
568
606
  </fo:block>
569
607
 
570
- <fo:block font-weight="bold" space-before="13mm">
571
- <xsl:copy-of select="$title_standard_coverpage"/>
572
- </fo:block>
608
+ <fo:block-container width="105%"> <!-- width="135mm" -->
609
+ <fo:block font-weight="bold" space-before="25.5mm" line-height="1.15"> <!-- space-before="13mm" -->
610
+ <xsl:copy-of select="$title_standard_coverpage"/>
611
+ </fo:block>
612
+ </fo:block-container>
573
613
 
574
- <fo:block font-size="10pt" space-before="9mm" space-after="4pt">Developed by the</fo:block>
575
- <fo:block font-size="11pt" font-weight="bold">
576
- <!-- Example: LAN/MAN Standards Committee -->
577
- <xsl:value-of select="$committee"/>
578
- <xsl:value-of select="$linebreak"/>
579
- <xsl:text>of the</xsl:text>
580
- <xsl:value-of select="$linebreak"/>
581
- <!-- Example: IEEE Computer Society -->
582
- <xsl:text>IEEE </xsl:text><xsl:value-of select="$society"/>
583
- <xsl:value-of select="$linebreak"/>
584
- </fo:block>
614
+ <xsl:if test="$committee != ''">
615
+ <fo:block font-size="10pt" space-before="11mm" space-after="4pt"><xsl:value-of select="$developed_by"/></fo:block>
616
+ <fo:block font-size="11pt" font-weight="bold" margin-top="4mm">
617
+ <!-- Example: LAN/MAN Standards Committee -->
618
+ <fo:block line-height="1.12"><xsl:value-of select="$committee"/></fo:block>
619
+ <fo:block font-weight="normal" font-size="10pt">of the</fo:block>
620
+ <!-- Example: IEEE Computer Society -->
621
+ <fo:block><xsl:value-of select="$society"/></fo:block>
622
+ </fo:block>
623
+ </xsl:if>
624
+
625
+ <xsl:if test="normalize-space($enabler) != ''">
626
+ <fo:block font-size="10pt" space-before="9mm" space-after="4pt"><xsl:value-of select="$sponsored_by"/></fo:block>
627
+ <fo:block font-size="11pt" font-weight="bold" margin-top="4mm">
628
+ <!-- Sponsored by the
629
+ LAN/MAN Standards Committee -->
630
+ <xsl:for-each select="$enabler/mn:subdivision">
631
+ <fo:block line-height="1.12"><xsl:value-of select="mn:subdivision/mn:name"/></fo:block>
632
+ <fo:block font-weight="normal" font-size="10pt">of the</fo:block>
633
+ <fo:block><xsl:value-of select="concat(../mn:abbreviation, ' ', mn:name)"/></fo:block>
634
+ <xsl:if test="position() != last()">
635
+ <fo:block font-weight="normal" font-size="10pt">and the</fo:block>
636
+ </xsl:if>
637
+ </xsl:for-each>
638
+ </fo:block>
639
+ </xsl:if>
585
640
 
586
641
  <fo:block font-size="10pt" space-before="8mm" space-after="4pt">Approved <xsl:value-of select="$approved_date"/></fo:block>
587
642
  <!-- Example: IEEE SA Standards Board -->
588
- <fo:block font-size="11pt" font-weight="bold"><xsl:value-of select="$approved_by"/></fo:block>
643
+ <fo:block font-size="11pt" font-weight="bold" margin-top="4mm"><xsl:value-of select="$approved_by"/></fo:block>
589
644
 
590
645
  <fo:block break-after="page"/>
591
646
 
@@ -622,7 +677,12 @@
622
677
  </fo:flow>
623
678
  </fo:page-sequence>
624
679
 
625
- <fo:page-sequence master-reference="document-draft" force-page-count="no-force">
680
+ <!-- Example:
681
+ Important Notices and Disclaimers Concerning IEEE Standards Documents
682
+ IEEE Standards documents are made available for use subject to important notices and legal disclaimers. These notices and disclaimers, or a reference to this page (https://standards.ieee.org/ipr/disclaimers.html), appear in all standards and may be found under the heading “Important Notices and Disclaimers Concerning IEEE Standards Documents.”
683
+ ...
684
+ -->
685
+ <fo:page-sequence master-reference="document-draft-two-columns" force-page-count="no-force">
626
686
  <xsl:call-template name="insertFootnoteSeparator"/>
627
687
  <xsl:call-template name="insertHeaderFooter">
628
688
  <xsl:with-param name="document_id" select="$document_id"/>
@@ -634,14 +694,12 @@
634
694
  </xsl:call-template>
635
695
 
636
696
  <fo:flow flow-name="xsl-region-body">
637
- <fo:block>
638
- <!-- Example:
639
- Important Notices and Disclaimers Concerning IEEE Standards Documents
640
- IEEE Standards documents are made available for use subject to important notices and legal disclaimers. These notices and disclaimers, or a reference to this page (https://standards.ieee.org/ipr/disclaimers.html), appear in all standards and may be found under the heading “Important Notices and Disclaimers Concerning IEEE Standards Documents.”
641
- ...
642
- -->
643
- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement"/>
644
- </fo:block>
697
+
698
+ <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement"/>
699
+
700
+ <xsl:if test="not(/mn:metanorma/mn:boilerplate/mn:legal-statement/*)">
701
+ <fo:block> </fo:block>
702
+ </xsl:if>
645
703
  </fo:flow>
646
704
  </fo:page-sequence>
647
705
  </xsl:when> <!-- $current_template = 'standard' -->
@@ -822,19 +880,34 @@
822
880
  <xsl:apply-templates select="/mn:metanorma/mn:preface/mn:abstract" mode="flatxml"/>
823
881
  </item>
824
882
 
825
- <xsl:for-each select="/*/mn:sections/*"> <!-- each section starts with a new page -->
883
+ <xsl:for-each select="/*/mn:sections/*[not(contains(@class, 'zzSTDTitle'))]"> <!-- each section starts with a new page -->
826
884
  <item>
885
+ <xsl:if test="position() = 1">
886
+ <xsl:copy-of select="ancestor::mn:sections/*[contains(@class, 'zzSTDTitle')]"/> <!-- put title on the 1st page -->
887
+ </xsl:if>
827
888
  <xsl:apply-templates select="." mode="flatxml"/>
828
889
  </item>
829
890
  </xsl:for-each>
830
891
  </xsl:when> <!-- $current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report' -->
831
892
 
832
893
  <xsl:when test="$current_template = 'standard'">
833
- <xsl:for-each select="/*/mn:sections/*"> <!-- each section starts with a new page -->
834
- <item>
835
- <xsl:apply-templates select="." mode="flatxml"/>
836
- </item>
837
- </xsl:for-each>
894
+ <xsl:choose>
895
+ <xsl:when test="$page_break_between_sections = 'true'">
896
+ <xsl:for-each select="/*/mn:sections/*[not(contains(@class, 'zzSTDTitle'))]"> <!-- each section starts with a new page -->
897
+ <item>
898
+ <xsl:if test="position() = 1">
899
+ <xsl:copy-of select="ancestor::mn:sections/*[contains(@class, 'zzSTDTitle')]"/> <!-- put title on the 1st page -->
900
+ </xsl:if>
901
+ <xsl:apply-templates select="." mode="flatxml"/>
902
+ </item>
903
+ </xsl:for-each>
904
+ </xsl:when>
905
+ <xsl:otherwise>
906
+ <item>
907
+ <xsl:apply-templates select="/*/mn:sections/*" mode="flatxml"/>
908
+ </item>
909
+ </xsl:otherwise>
910
+ </xsl:choose>
838
911
  </xsl:when> <!-- $current_template = 'standard' -->
839
912
 
840
913
  <xsl:otherwise>
@@ -862,6 +935,12 @@
862
935
 
863
936
  </xsl:variable>
864
937
 
938
+ <xsl:if test="$debug = 'true'">
939
+ <redirect:write file="page_items.xml">
940
+ <xsl:copy-of select="$structured_xml_"/>
941
+ </redirect:write>
942
+ </xsl:if>
943
+
865
944
  <!-- page break before each section -->
866
945
  <xsl:variable name="structured_xml">
867
946
  <xsl:for-each select="xalan:nodeset($structured_xml_)/item[*]">
@@ -901,7 +980,7 @@
901
980
  </xsl:if>
902
981
 
903
982
  <xsl:if test="$current_template = 'standard'">
904
- <xsl:attribute name="master-reference">document-standard</xsl:attribute>
983
+ <xsl:attribute name="master-reference">document-standard<xsl:if test="position() = 1">-first</xsl:if></xsl:attribute>
905
984
  <xsl:if test="@orientation = 'landscape'">
906
985
  <xsl:attribute name="master-reference">document-standard<xsl:value-of select="@orientation"/></xsl:attribute>
907
986
  </xsl:if>
@@ -1016,16 +1095,17 @@
1016
1095
  <xsl:template name="cover-page">
1017
1096
  <xsl:param name="num"/>
1018
1097
  <xsl:param name="document_id"/>
1098
+ <xsl:param name="docidentifier_draft"/>
1019
1099
  <xsl:param name="title"/>
1020
1100
  <xsl:param name="society"/>
1021
1101
  <xsl:param name="copyright_holder"/>
1022
1102
  <xsl:param name="copyright_year"/>
1023
1103
  <xsl:param name="designation"/>
1024
- <xsl:param name="draft_number"/>
1104
+ <!-- <xsl:param name="draft_number"/> -->
1025
1105
  <xsl:param name="committee"/>
1106
+ <xsl:param name="enabler"/>
1026
1107
  <xsl:param name="approved_date"/>
1027
1108
  <xsl:param name="approved_by"/>
1028
- <xsl:param name="title_intro"/>
1029
1109
  <xsl:param name="title_main"/>
1030
1110
  <xsl:param name="standard_number"/>
1031
1111
  <xsl:param name="history_text"/>
@@ -1075,29 +1155,60 @@
1075
1155
  <xsl:if test="contains('amendment corrigendum erratum', $subdoctype) and $subdoctype != ''">
1076
1156
  <xsl:attribute name="font-size">24pt</xsl:attribute>
1077
1157
  </xsl:if>
1078
- <xsl:text>P</xsl:text>
1158
+ <!-- <xsl:text>P</xsl:text>
1079
1159
  <xsl:value-of select="$designation"/>
1080
1160
  <xsl:text>™/D</xsl:text>
1081
- <xsl:value-of select="$draft_number"/>
1161
+ <xsl:value-of select="$draft_number"/> -->
1162
+
1163
+ <!-- add tm after number, i.e. from P2830/D1 to P2830™/D1 -->
1164
+ <xsl:variable name="regex_tm" select="concat('(', $designation, ')', '(-\/)?')"/>
1165
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($docidentifier_draft), $regex_tm,'$1™$2')"/>
1166
+
1082
1167
  <xsl:value-of select="$linebreak"/>
1083
- <xsl:copy-of select="$title_prefix"/>
1168
+ <!-- <xsl:copy-of select="$title_prefix"/> -->
1084
1169
  <xsl:copy-of select="$title"/>
1085
1170
 
1086
1171
  <!-- <xsl:copy-of select="$draft_title_part"/> -->
1087
1172
  </fo:block>
1088
- <fo:block>Developed by the</fo:block>
1089
- <fo:block> </fo:block>
1090
- <fo:block font-size="11pt" font-weight="bold">
1091
- <!-- <Committee Name> -->
1092
- <xsl:value-of select="$committee"/>
1093
- </fo:block>
1094
- <fo:block>of the</fo:block>
1095
- <fo:block font-size="11pt" font-weight="bold">
1096
- <!-- IEEE <Society Name> -->
1097
- <xsl:text>IEEE </xsl:text><xsl:value-of select="$society"/>
1098
- </fo:block>
1099
- <fo:block> </fo:block>
1100
- <fo:block> </fo:block>
1173
+
1174
+ <xsl:if test="$committee != ''">
1175
+ <fo:block><xsl:value-of select="$developed_by"/></fo:block>
1176
+ <fo:block> </fo:block>
1177
+ <fo:block font-size="11pt" font-weight="bold">
1178
+ <!-- <Committee Name> -->
1179
+ <xsl:value-of select="$committee"/>
1180
+ </fo:block>
1181
+ <fo:block>of the</fo:block>
1182
+ <fo:block font-size="11pt" font-weight="bold">
1183
+ <!-- IEEE <Society Name> -->
1184
+ <xsl:value-of select="$society"/>
1185
+ </fo:block>
1186
+ <fo:block> </fo:block>
1187
+ <fo:block> </fo:block>
1188
+ </xsl:if>
1189
+
1190
+ <xsl:if test="normalize-space($enabler) != ''">
1191
+ <!-- Sponsored by the
1192
+ LAN/MAN Standards Committee -->
1193
+ <fo:block><xsl:value-of select="$sponsored_by"/></fo:block>
1194
+ <fo:block> </fo:block>
1195
+ <xsl:for-each select="$enabler/mn:subdivision">
1196
+ <fo:block font-size="11pt" font-weight="bold">
1197
+ <xsl:value-of select="mn:subdivision/mn:name"/>
1198
+ </fo:block>
1199
+ <fo:block>of the</fo:block>
1200
+ <fo:block font-size="11pt" font-weight="bold">
1201
+ <xsl:value-of select="../mn:abbreviation"/><xsl:text> </xsl:text>
1202
+ <xsl:value-of select="mn:name"/>
1203
+ </fo:block>
1204
+ <xsl:if test="position() != last()">
1205
+ <fo:block>and the</fo:block>
1206
+ </xsl:if>
1207
+ </xsl:for-each>
1208
+ <fo:block> </fo:block>
1209
+ <fo:block> </fo:block>
1210
+ </xsl:if>
1211
+
1101
1212
  <fo:block>
1102
1213
  <!-- Approved <Date Approved> -->
1103
1214
  <xsl:text>Approved </xsl:text>
@@ -1168,13 +1279,13 @@
1168
1279
 
1169
1280
  <xsl:when test="$current_template = 'standard'">
1170
1281
  <xsl:call-template name="insertCoverPage_Standard">
1171
- <xsl:with-param name="title_intro" select="$title_intro"/>
1172
1282
  <xsl:with-param name="title_main" select="$title_main"/>
1173
1283
  <xsl:with-param name="society" select="$society"/>
1174
1284
  <xsl:with-param name="committee" select="$committee"/>
1285
+ <xsl:with-param name="enabler" select="$enabler"/>
1175
1286
  <xsl:with-param name="standard_number" select="$standard_number"/>
1176
1287
  <xsl:with-param name="history" select="$history_text"/>
1177
- <xsl:with-param name="standard_title_prefix" select="$title_prefix"/>
1288
+ <!-- <xsl:with-param name="standard_title_prefix" select="$title_prefix"/> -->
1178
1289
  <xsl:with-param name="cutoff_date" select="$cutoff_date"/>
1179
1290
  <xsl:with-param name="expiration_date" select="$expiration_date"/>
1180
1291
  </xsl:call-template>
@@ -1262,7 +1373,7 @@
1262
1373
 
1263
1374
  </xsl:when> <!-- $stage = 'draft' -->
1264
1375
 
1265
- <xsl:when test="$stage = 'published' or $stage = 'approved'">
1376
+ <xsl:when test="$stage = 'published' or $stage = 'approved' or $stage_published = 'true'">
1266
1377
 
1267
1378
  <xsl:variable name="provisional-distance-between-starts">10</xsl:variable>
1268
1379
 
@@ -1414,7 +1525,7 @@
1414
1525
  </xsl:when>
1415
1526
  <xsl:otherwise>
1416
1527
  <fo:block xsl:use-attribute-sets="toc-title-style">
1417
- <xsl:if test="($current_template = 'standard' or $current_template = 'draft') and ($stage = 'published' or $stage = 'approved')">
1528
+ <xsl:if test="($current_template = 'standard' or $current_template = 'draft') and ($stage = 'published' or $stage = 'approved' or $stage_published = 'true')">
1418
1529
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1419
1530
  </xsl:if>
1420
1531
  <!-- Contents -->
@@ -1426,13 +1537,17 @@
1426
1537
  </xsl:template>
1427
1538
 
1428
1539
  <xsl:template match="mn:boilerplate/mn:copyright-statement//mn:p" priority="2">
1429
- <fo:block margin-top="6pt" margin-bottom="6pt" text-align="justify">
1540
+ <fo:block xsl:use-attribute-sets="copyright-statement-p-style">
1541
+ <xsl:call-template name="refine_copyright-statement-p-style"/>
1542
+
1430
1543
  <xsl:apply-templates/>
1431
1544
  </fo:block>
1432
1545
  </xsl:template>
1433
1546
 
1434
1547
  <xsl:template match="mn:boilerplate/mn:license-statement//mn:p" priority="2">
1435
- <fo:block margin-top="6pt" margin-bottom="6pt" text-align="justify">
1548
+ <fo:block xsl:use-attribute-sets="license-statement-p-style">
1549
+ <xsl:call-template name="refine_license-statement-p-style"/>
1550
+
1436
1551
  <xsl:apply-templates/>
1437
1552
  </fo:block>
1438
1553
  </xsl:template>
@@ -1441,17 +1556,9 @@
1441
1556
  <fo:block>
1442
1557
  <fo:footnote>
1443
1558
  <fo:inline/>
1444
- <fo:footnote-body font-family="Arial" font-size="7pt">
1559
+ <fo:footnote-body xsl:use-attribute-sets="feedback-statement-style">
1445
1560
 
1446
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
1447
- <xsl:attribute name="font-family">Calibri Light</xsl:attribute>
1448
- <xsl:attribute name="font-size">9pt</xsl:attribute>
1449
- <xsl:attribute name="line-height">1.2</xsl:attribute>
1450
- </xsl:if>
1451
-
1452
- <xsl:if test="$current_template = 'standard'">
1453
- <xsl:attribute name="font-size">8pt</xsl:attribute>
1454
- </xsl:if>
1561
+ <xsl:call-template name="refine_feedback-statement-style"/>
1455
1562
 
1456
1563
  <fo:block>
1457
1564
  <fo:inline font-size="1pt" id="footnote_footer_{generate-id()}"><xsl:value-of select="$hair_space"/></fo:inline>
@@ -1463,7 +1570,7 @@
1463
1570
  </xsl:template>
1464
1571
 
1465
1572
  <xsl:template match="mn:boilerplate/mn:feedback-statement//mn:p" priority="2">
1466
- <fo:block margin-bottom="6pt">
1573
+ <fo:block xsl:use-attribute-sets="feedback-statement-p-style">
1467
1574
  <xsl:apply-templates/>
1468
1575
  </fo:block>
1469
1576
  </xsl:template>
@@ -1475,13 +1582,17 @@
1475
1582
 
1476
1583
  <xsl:template match="mn:boilerplate/mn:legal-statement/mn:clause[@id = 'boilerplate-participants' or normalize-space(mn:fmt-title) = 'Participants']" priority="2">
1477
1584
  <fo:block break-after="page"/>
1478
- <fo:block id="{@id}">
1479
- <xsl:apply-templates/>
1480
- </fo:block>
1585
+ <!-- <fo:block id="{@id}" font-size="1pt" span="all">&#xa0;</fo:block> -->
1586
+ <xsl:apply-templates/>
1481
1587
  </xsl:template>
1482
1588
 
1483
1589
  <xsl:template match="mn:boilerplate/mn:legal-statement/mn:clause[@id = 'boilerplate-participants' or normalize-space(mn:fmt-title) = 'Participants']/mn:clause" priority="2">
1484
- <fo:block id="{@id}" space-before="12pt">
1590
+ <fo:block id="{@id}" space-before="12pt" font-size="1pt" span="all" keep-with-next="always"> </fo:block>
1591
+ <xsl:apply-templates/>
1592
+ </xsl:template>
1593
+
1594
+ <xsl:template match="mn:boilerplate/mn:legal-statement/mn:clause[not(@id = 'boilerplate-participants' or normalize-space(mn:fmt-title) = 'Participants')]" priority="2">
1595
+ <fo:block id="{@id}" span="all">
1485
1596
  <xsl:apply-templates/>
1486
1597
  </fo:block>
1487
1598
  </xsl:template>
@@ -1491,18 +1602,10 @@
1491
1602
  <xsl:variable name="level">
1492
1603
  <xsl:call-template name="getLevel"/>
1493
1604
  </xsl:variable>
1494
- <fo:block font-family="Arial" font-weight="bold" margin-bottom="12pt" space-before="18pt" keep-with-next="always" keep-together.within-column="always" role="H{$level}">
1495
- <xsl:attribute name="font-size">
1496
- <xsl:choose>
1497
- <xsl:when test="$level = '1'">12pt</xsl:when>
1498
- <xsl:otherwise>11pt</xsl:otherwise>
1499
- </xsl:choose>
1500
- </xsl:attribute>
1605
+ <fo:block xsl:use-attribute-sets="legal-statement-title-style" role="H{$level}">
1606
+ <xsl:copy-of select="parent::mn:clause[@id = 'boilerplate-participants' or normalize-space(mn:fmt-title) = 'Participants']/@id"/>
1501
1607
 
1502
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
1503
- <xsl:attribute name="font-family">Arial Black</xsl:attribute>
1504
- <xsl:attribute name="font-size">13pt</xsl:attribute>
1505
- </xsl:if>
1608
+ <xsl:call-template name="refine_legal-statement-title-style"/>
1506
1609
 
1507
1610
  <xsl:apply-templates/>
1508
1611
  </fo:block>
@@ -1510,12 +1613,14 @@
1510
1613
 
1511
1614
  <xsl:template match="mn:boilerplate/mn:legal-statement//mn:p" priority="2">
1512
1615
  <xsl:choose>
1513
- <xsl:when test="@type = 'officemember' and not(preceding-sibling::*[1][self::mn:p][@type = 'officemember'])"> <!-- special case -->
1616
+ <xsl:when test="(@type = 'officemember' and not(preceding-sibling::*[1][self::mn:p][@type = 'officemember'])) or (@type = 'officeorgmember' and not(preceding-sibling::*[1][self::mn:p][@type = 'officeorgmember']))"> <!-- special case -->
1617
+
1618
+ <xsl:variable name="type" select="@type"/>
1514
1619
 
1515
1620
  <xsl:variable name="officemembers_">
1516
1621
  <officemember><xsl:copy-of select="node()"/></officemember>
1517
1622
  <xsl:variable name="pos_curr" select="count(preceding-sibling::*) + 1"/>
1518
- <xsl:variable name="pos_end_" select="count(following-sibling::*[not(@type = 'officemember')][1]/preceding-sibling::*)"/>
1623
+ <xsl:variable name="pos_end_" select="count(following-sibling::*[not(@type = $type)][1]/preceding-sibling::*)"/>
1519
1624
  <xsl:variable name="pos_end">
1520
1625
  <xsl:choose>
1521
1626
  <xsl:when test="$pos_end_ = 0">9999</xsl:when>
@@ -1531,66 +1636,137 @@
1531
1636
 
1532
1637
  <xsl:variable name="officemembers_count" select="count($officemembers/officemember)"/>
1533
1638
 
1534
- <xsl:variable name="mod" select="$officemembers_count mod 3"/>
1535
- <xsl:variable name="floor" select="floor($officemembers_count div 3)"/>
1639
+ <xsl:variable name="cols"><xsl:choose><xsl:when test="$type = 'officemember'">3</xsl:when><xsl:otherwise>2</xsl:otherwise></xsl:choose></xsl:variable>
1640
+
1641
+ <xsl:variable name="mod" select="$officemembers_count mod $cols"/>
1642
+ <xsl:variable name="floor" select="floor($officemembers_count div $cols)"/>
1536
1643
 
1537
1644
  <xsl:variable name="max">
1538
1645
  <xsl:choose>
1539
- <xsl:when test="$mod = 0"><xsl:value-of select="$officemembers_count div 3"/></xsl:when>
1646
+ <xsl:when test="$mod = 0"><xsl:value-of select="$officemembers_count div $cols"/></xsl:when>
1540
1647
  <xsl:otherwise><xsl:value-of select="$floor + 1"/></xsl:otherwise>
1541
1648
  </xsl:choose>
1542
1649
  </xsl:variable>
1543
1650
 
1544
- <!-- <fo:block>officemembers_count=<xsl:value-of select="$officemembers_count"/></fo:block>
1545
- <fo:block>mod=<xsl:value-of select="$mod"/></fo:block>
1546
- <fo:block>floor=<xsl:value-of select="$floor"/></fo:block>
1547
- <fo:block>max=<xsl:value-of select="$max"/></fo:block> -->
1548
-
1549
- <fo:block font-size="9pt">
1550
- <fo:block> </fo:block>
1551
- <fo:table width="100%" table-layout="fixed">
1552
- <fo:table-column column-width="proportional-column-width(55)"/>
1553
- <fo:table-column column-width="proportional-column-width(55)"/>
1554
- <fo:table-column column-width="proportional-column-width(42)"/>
1555
- <fo:table-body>
1556
- <xsl:for-each select="$officemembers/officemember[position() &lt;= $max]">
1557
- <fo:table-row>
1558
- <fo:table-cell padding-right="3mm">
1559
- <fo:block>
1560
- <xsl:apply-templates/>
1561
- </fo:block>
1562
- </fo:table-cell>
1563
- <fo:table-cell padding-right="3mm">
1564
- <fo:block>
1565
- <xsl:apply-templates select="following-sibling::*[number($max)]/node()"/>
1566
- </fo:block>
1567
- </fo:table-cell>
1568
- <fo:table-cell>
1569
- <fo:block>
1570
- <xsl:apply-templates select="following-sibling::*[number($max) * 2]/node()"/>
1571
- </fo:block>
1572
- </fo:table-cell>
1573
- </fo:table-row>
1651
+ <xsl:choose>
1652
+ <xsl:when test="$type = 'officemember'">
1653
+ <!-- 3-column table -->
1654
+
1655
+ <!-- <fo:block>DEBUG officemembers_count=<xsl:value-of select="$officemembers_count"/></fo:block> -->
1656
+ <!-- <fo:block>mod=<xsl:value-of select="$mod"/></fo:block>
1657
+ <fo:block>floor=<xsl:value-of select="$floor"/></fo:block>
1658
+ <fo:block>max=<xsl:value-of select="$max"/></fo:block> -->
1659
+
1660
+ <!-- From https://github.com/metanorma/metanorma-ieee/issues/533#issuecomment-3178212854:
1661
+ Algorithm:
1662
+ 3 cases: 0 extra, all balanced; 1 extra, place in middle, 2 extra, place on both sides.
1663
+
1664
+ The number of rows in each column is "ceil(names/cols)".
1665
+ The number of extras is calculated as "names mod cols"
1666
+ In the 1 extra case, place an additional line break after the "floor(names/cols)"-th item.
1667
+ In the 2 extra case, place an additional line break after the "ceil(names/cols) + floor(names/cols)"-th item
1668
+ -->
1669
+
1670
+ <xsl:variable name="number_in_each_column" select="ceiling($officemembers_count div $cols)"/>
1671
+ <!-- <fo:block>DEBUG number_in_each_column=<xsl:value-of select="$number_in_each_column"/></fo:block> -->
1672
+ <xsl:variable name="number_extras" select="$officemembers_count mod $cols"/>
1673
+ <!-- <fo:block>DEBUG number_extras=<xsl:value-of select="$number_extras"/></fo:block> -->
1674
+
1675
+ <xsl:variable name="officemembers_updated_">
1676
+ <xsl:for-each select="$officemembers/officemember">
1677
+ <xsl:copy-of select="."/>
1678
+ <xsl:choose>
1679
+ <xsl:when test="$number_extras = 1 and position() = $floor">
1680
+ <officemember/>
1681
+ </xsl:when>
1682
+ <xsl:when test="$number_extras = 2 and position() = ($number_in_each_column + $floor)">
1683
+ <officemember/>
1684
+ </xsl:when>
1685
+ </xsl:choose>
1574
1686
  </xsl:for-each>
1575
- </fo:table-body>
1576
- </fo:table>
1577
- </fo:block>
1687
+ </xsl:variable>
1688
+ <xsl:variable name="officemembers_updated" select="xalan:nodeset($officemembers_updated_)"/>
1689
+
1690
+ <fo:block font-size="9pt" span="all">
1691
+ <fo:block> </fo:block>
1692
+ <fo:table width="100%" table-layout="fixed">
1693
+ <fo:table-column column-width="proportional-column-width(55)"/>
1694
+ <fo:table-column column-width="proportional-column-width(55)"/>
1695
+ <fo:table-column column-width="proportional-column-width(42)"/>
1696
+ <fo:table-body>
1697
+ <xsl:for-each select="$officemembers_updated/officemember[position() &lt;= $number_in_each_column]"> <!-- $max -->
1698
+ <fo:table-row>
1699
+ <fo:table-cell padding-right="3mm">
1700
+ <fo:block>
1701
+ <xsl:apply-templates/>
1702
+ </fo:block>
1703
+ </fo:table-cell>
1704
+ <fo:table-cell padding-right="3mm">
1705
+ <fo:block>
1706
+ <xsl:apply-templates select="following-sibling::*[number($number_in_each_column)]/node()"/> <!-- $max -->
1707
+ </fo:block>
1708
+ </fo:table-cell>
1709
+ <fo:table-cell>
1710
+ <fo:block>
1711
+ <xsl:apply-templates select="following-sibling::*[number($number_in_each_column) * 2]/node()"/> <!-- $max -->
1712
+ </fo:block>
1713
+ </fo:table-cell>
1714
+ </fo:table-row>
1715
+ </xsl:for-each>
1716
+ </fo:table-body>
1717
+ </fo:table>
1718
+ </fo:block>
1719
+ </xsl:when>
1720
+ <xsl:otherwise> <!-- $type = 'officeorgmember' -->
1721
+ <!-- 2-column table -->
1722
+ <fo:block span="all"> </fo:block>
1723
+ <fo:block font-size="9pt" margin-right="10mm">
1724
+ <xsl:for-each select="$officemembers/officemember">
1725
+ <fo:block margin-left="4mm" text-indent="-4mm">
1726
+ <xsl:apply-templates/>
1727
+ </fo:block>
1728
+ </xsl:for-each>
1729
+ <!-- <fo:table width="100%" table-layout="fixed">
1730
+ <fo:table-column column-width="proportional-column-width(1)"/>
1731
+ <fo:table-column column-width="proportional-column-width(1)"/>
1732
+ <fo:table-body>
1733
+ <xsl:for-each select="$officemembers/officemember[position() &lt;= $max]">
1734
+ <fo:table-row>
1735
+ <fo:table-cell padding-right="3mm">
1736
+ <fo:block margin-left="4mm" text-indent="-4mm">
1737
+ <xsl:apply-templates/>
1738
+ </fo:block>
1739
+ </fo:table-cell>
1740
+ <fo:table-cell padding-right="3mm">
1741
+ <fo:block margin-left="4mm" text-indent="-4mm">
1742
+ <xsl:apply-templates select="following-sibling::*[number($max)]/node()"/>
1743
+ </fo:block>
1744
+ </fo:table-cell>
1745
+ </fo:table-row>
1746
+ </xsl:for-each>
1747
+ </fo:table-body>
1748
+ </fo:table> -->
1749
+ </fo:block>
1750
+ <fo:block span="all"> </fo:block>
1751
+ </xsl:otherwise>
1752
+ </xsl:choose>
1578
1753
 
1579
- <xsl:if test="following-sibling::*[1][not(@type = 'officemember' or @type = 'emeritus_sign')]">
1580
- <fo:block font-size="10pt" space-after="12pt" keep-with-previous="always"> </fo:block>
1754
+ <xsl:if test="following-sibling::*[1][not(@type = 'officemember' or @type = 'officeorgmember' or @type = 'emeritus_sign')]">
1755
+ <fo:block font-size="10pt" space-after="12pt" keep-with-previous="always" span="all"> </fo:block>
1581
1756
  </xsl:if>
1582
- </xsl:when> <!-- @type = 'officemember' -->
1757
+ </xsl:when> <!-- @type = 'officemember' or @type = 'officeorgmember' -->
1583
1758
 
1584
1759
  <xsl:when test="@type = 'officemember' and preceding-sibling::*[1][self::mn:p][@type = 'officemember']"><!-- skip --></xsl:when>
1760
+ <xsl:when test="@type = 'officeorgmember' and preceding-sibling::*[1][self::mn:p][@type = 'officeorgmember']"><!-- skip --></xsl:when>
1585
1761
 
1586
1762
  <xsl:when test="@type = 'emeritus_sign'">
1587
- <fo:block font-size="9pt" margin-left="9.4mm" space-before="6pt" space-after="12pt" keep-with-previous="always">
1763
+ <fo:block font-size="9pt" margin-left="9.4mm" space-before="6pt" space-after="12pt" keep-with-previous="always" span="all">
1588
1764
  <xsl:apply-templates/>
1589
1765
  </fo:block>
1590
1766
  </xsl:when>
1591
1767
 
1592
1768
  <xsl:when test="@type = 'officeorgrepmemberhdr'">
1593
- <fo:block text-align-last="justify" space-after="12pt">
1769
+ <fo:block text-align-last="justify" space-after="12pt" span="all">
1594
1770
  <!-- before tab - left aligned text -->
1595
1771
  <xsl:apply-templates select="mn:tab[1]/preceding-sibling::node()"/>
1596
1772
  <fo:inline keep-together.within-line="always">
@@ -1602,7 +1778,7 @@
1602
1778
  </xsl:when>
1603
1779
 
1604
1780
  <xsl:when test="@type = 'officeorgrepmember'">
1605
- <fo:block text-align-last="justify" space-after="6pt" font-size="9pt">
1781
+ <fo:block text-align-last="justify" space-after="6pt" font-size="9pt" span="all">
1606
1782
  <!-- before tab - left aligned text -->
1607
1783
  <xsl:apply-templates select="mn:tab[1]/preceding-sibling::node()"/>
1608
1784
  <fo:inline keep-together.within-line="always">
@@ -1617,9 +1793,7 @@
1617
1793
 
1618
1794
  <xsl:variable name="attributes_">
1619
1795
  <attributes>
1620
- <xsl:if test="@align = 'center' and ancestor::mn:clause[@id = 'boilerplate-participants' or normalize-space(mn:fmt-title) = 'Participants'] and following-sibling::*[1][self::mn:p and @align = 'center']">
1621
- <xsl:attribute name="space-after">0</xsl:attribute>
1622
- </xsl:if>
1796
+
1623
1797
  <xsl:call-template name="setTextAlignment">
1624
1798
  <xsl:with-param name="default">justify</xsl:with-param>
1625
1799
  </xsl:call-template>
@@ -1635,17 +1809,22 @@
1635
1809
  <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
1636
1810
  <xsl:attribute name="space-after">6pt</xsl:attribute>
1637
1811
  </xsl:if>
1812
+
1813
+ <xsl:if test="@align = 'center' and ancestor::mn:clause[@id = 'boilerplate-participants' or normalize-space(mn:fmt-title) = 'Participants'] and following-sibling::*[1][self::mn:p and @align = 'center']">
1814
+ <xsl:attribute name="space-after">0</xsl:attribute>
1815
+ </xsl:if>
1816
+
1638
1817
  </attributes>
1639
1818
  </xsl:variable>
1640
1819
 
1641
1820
  <xsl:variable name="attributes" select="xalan:nodeset($attributes_)"/>
1642
1821
 
1643
- <fo:block space-after="12pt">
1822
+ <fo:block space-after="12pt" span="all">
1644
1823
 
1645
1824
  <xsl:for-each select="$attributes/attributes/@*">
1646
1825
  <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
1647
1826
  </xsl:for-each>
1648
-
1827
+ <!-- <fo:block>debug current_template=<xsl:value-of select="$current_template"/></fo:block> -->
1649
1828
  <xsl:apply-templates/>
1650
1829
  </fo:block>
1651
1830
  </xsl:otherwise>
@@ -1803,19 +1982,21 @@
1803
1982
 
1804
1983
  <xsl:template match="mn:p[@class = 'zzSTDTitle1']" priority="4">
1805
1984
  <xsl:choose>
1806
- <xsl:when test="$current_template = 'draft'">
1807
- <fo:block font-family="Arial" font-size="23pt" font-weight="bold" margin-top="70pt" margin-bottom="48pt">
1808
- <xsl:if test="contains('amendment corrigendum erratum', $subdoctype) and $subdoctype != ''">
1809
- <xsl:attribute name="font-size">24pt</xsl:attribute>
1810
- </xsl:if>
1811
- <xsl:apply-templates/>
1812
- </fo:block>
1985
+ <xsl:when test="$current_template = 'draft' or $current_template = 'standard'">
1986
+ <fo:block-container width="140mm" role="SKIP">
1987
+ <fo:block xsl:use-attribute-sets="p-zzSTDTitle1-style">
1988
+
1989
+ <xsl:call-template name="refine_p-zzSTDTitle1-style"/>
1990
+
1991
+ <xsl:apply-templates/>
1992
+ </fo:block>
1993
+ </fo:block-container>
1813
1994
  </xsl:when>
1814
- <xsl:when test="$current_template = 'standard'">
1995
+ <!-- <xsl:when test="$current_template = 'standard'">
1815
1996
  <fo:block font-family="Arial" font-weight="bold" margin-top="13mm" space-after="12pt">
1816
- <xsl:apply-templates/>
1997
+ <xsl:apply-templates />
1817
1998
  </fo:block>
1818
- </xsl:when>
1999
+ </xsl:when> -->
1819
2000
  <xsl:otherwise> <!-- $current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report' -->
1820
2001
 
1821
2002
  <fo:block font-family="Arial Black" font-size="20pt" margin-top="18pt">
@@ -1975,6 +2156,9 @@
1975
2156
  <fo:list-item-label end-indent="label-end()">
1976
2157
  <fo:block>
1977
2158
  <fo:basic-link internal-destination="{@id}">
2159
+ <xsl:call-template name="setAltText">
2160
+ <xsl:with-param name="value" select="@alt-text"/>
2161
+ </xsl:call-template>
1978
2162
  <xsl:value-of select="substring-before(.,'—')"/>
1979
2163
  </fo:basic-link>
1980
2164
  </fo:block>
@@ -2034,15 +2218,19 @@
2034
2218
  <!-- ==================== -->
2035
2219
  <!-- display titles -->
2036
2220
  <!-- ==================== -->
2037
- <xsl:template match="mn:bibdata/mn:title[@type = 'title-intro']">
2038
- <xsl:apply-templates/>
2221
+ <!-- <xsl:template match="mn:bibdata/mn:title[@type = 'title-intro']">
2222
+ <xsl:apply-templates />
2039
2223
  <xsl:text>—</xsl:text>
2040
- </xsl:template>
2224
+ </xsl:template> -->
2041
2225
 
2042
2226
  <xsl:template match="mn:bibdata/mn:title[@type = 'title-main']">
2043
2227
  <xsl:apply-templates/>
2044
2228
  </xsl:template>
2045
2229
 
2230
+ <xsl:template match="mn:bibdata/mn:title[@type = 'main']">
2231
+ <xsl:apply-templates/>
2232
+ </xsl:template>
2233
+
2046
2234
  <!-- ==================== -->
2047
2235
  <!-- display titles -->
2048
2236
  <!-- ==================== -->
@@ -2324,9 +2512,12 @@
2324
2512
 
2325
2513
  <!-- Bibliography -->
2326
2514
  <xsl:template match="mn:references[not(@normative='true')]/mn:fmt-title">
2327
- <fo:block font-size="16pt" font-weight="bold" margin-top="6pt" margin-bottom="36pt" keep-with-next="always" role="H1">
2328
- <xsl:apply-templates/>
2329
- </fo:block>
2515
+ <fo:block xsl:use-attribute-sets="references-non-normative-title-style">
2516
+
2517
+ <xsl:call-template name="refine_references-non-normative-title-style"/>
2518
+
2519
+ <xsl:apply-templates/>
2520
+ </fo:block>
2330
2521
  </xsl:template>
2331
2522
 
2332
2523
  <xsl:template match="mn:fmt-title[@inline-header = 'true'][following-sibling::*[1][self::mn:p] or following-sibling::*[1][self::mn:clause] or not(following-sibling::*)]" priority="3">
@@ -2570,13 +2761,16 @@
2570
2761
  </xsl:template>
2571
2762
 
2572
2763
  <!-- add blue box after first break in Annex title -->
2573
- <xsl:template match="mn:br[not(preceding-sibling::mn:br)][ancestor::mn:fmt-title[preceding-sibling::*[1][self::mn:annex]]]" priority="2">
2764
+ <xsl:template match="mn:br[ancestor::mn:fmt-title[preceding-sibling::*[1][self::mn:annex]]]" priority="2">
2574
2765
  <xsl:choose>
2575
2766
  <xsl:when test="($current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report') ">
2576
- <xsl:call-template name="addBlueBox"/>
2767
+ <xsl:if test="not(preceding-sibling::mn:br)">
2768
+ <xsl:call-template name="addBlueBox"/>
2769
+ </xsl:if>
2577
2770
  </xsl:when>
2578
2771
  <xsl:otherwise>
2579
- <xsl:value-of select="$linebreak"/>
2772
+ <!-- <xsl:value-of select="$linebreak"/> -->
2773
+ <fo:block font-size="1pt" margin-top="3mm"> </fo:block>
2580
2774
  </xsl:otherwise>
2581
2775
 
2582
2776
  </xsl:choose>
@@ -2646,12 +2840,6 @@
2646
2840
  <xsl:call-template name="termsource"/>
2647
2841
  </xsl:template>
2648
2842
 
2649
- <xsl:template name="titleAmendment">
2650
- <fo:block font-size="11pt" font-style="italic" margin-bottom="12pt" keep-with-next="always">
2651
- <xsl:apply-templates/>
2652
- </fo:block>
2653
- </xsl:template>
2654
-
2655
2843
  <!-- ====== -->
2656
2844
  <!-- ====== -->
2657
2845
 
@@ -2778,27 +2966,7 @@
2778
2966
  <xsl:template match="mn:ul | mn:ol" mode="list" priority="2">
2779
2967
  <fo:list-block xsl:use-attribute-sets="list-style">
2780
2968
 
2781
- <xsl:if test="parent::mn:admonition[@type = 'commentary']">
2782
- <xsl:attribute name="margin-left">7mm</xsl:attribute>
2783
- </xsl:if>
2784
- <xsl:if test="preceding-sibling::*[1][self::mn:p]">
2785
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
2786
- </xsl:if>
2787
-
2788
- <xsl:if test="ancestor::mn:note or ancestor::mn:termnote">
2789
- <xsl:attribute name="provisional-distance-between-starts">4mm</xsl:attribute>
2790
- </xsl:if>
2791
-
2792
- <xsl:variable name="processing_instruction_type" select="normalize-space(preceding-sibling::*[1]/processing-instruction('list-type'))"/>
2793
- <xsl:if test="self::mn:ul and normalize-space($processing_instruction_type) = 'simple'">
2794
- <xsl:attribute name="provisional-distance-between-starts">0mm</xsl:attribute>
2795
- </xsl:if>
2796
-
2797
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
2798
- <xsl:attribute name="line-height">1.3</xsl:attribute>
2799
- <xsl:attribute name="margin-left">6.2mm</xsl:attribute>
2800
- <xsl:attribute name="provisional-distance-between-starts">6.5mm</xsl:attribute>
2801
- </xsl:if>
2969
+ <xsl:call-template name="refine_list-style"/>
2802
2970
 
2803
2971
  <xsl:apply-templates select="node()[not(self::mn:note)]"/>
2804
2972
  </fo:list-block>
@@ -3010,13 +3178,12 @@
3010
3178
  </xsl:template>
3011
3179
 
3012
3180
  <xsl:template name="insertFootnoteSeparator">
3013
- <fo:static-content flow-name="xsl-footnote-separator">
3181
+ <fo:static-content flow-name="xsl-footnote-separator" role="artifact">
3014
3182
  <fo:block>
3015
- <fo:leader leader-pattern="rule" rule-thickness="0.5pt" leader-length="35%">
3016
- <xsl:if test="$current_template = 'whitepaper' or $current_template= 'icap-whitepaper' or $current_template = 'industry-connection-report'">
3017
- <xsl:attribute name="rule-thickness">1pt</xsl:attribute>
3018
- <xsl:attribute name="leader-length">51mm</xsl:attribute>
3019
- </xsl:if>
3183
+ <fo:leader xsl:use-attribute-sets="footnote-separator-leader-style">
3184
+
3185
+ <xsl:call-template name="refine_footnote-separator-leader-style"/>
3186
+
3020
3187
  </fo:leader>
3021
3188
  </fo:block>
3022
3189
  </fo:static-content>
@@ -3054,7 +3221,7 @@
3054
3221
  <xsl:value-of select="$document_id"/>
3055
3222
  </fo:block>
3056
3223
  <fo:block>
3057
- <xsl:copy-of select="$title_prefix"/>
3224
+ <!-- <xsl:copy-of select="$title_prefix"/> -->
3058
3225
  <xsl:copy-of select="$title"/>
3059
3226
  </fo:block>
3060
3227
 
@@ -3326,13 +3493,13 @@
3326
3493
  <!-- Cover Pages -->
3327
3494
  <!-- =============================== -->
3328
3495
  <xsl:template name="insertCoverPage_Standard">
3329
- <xsl:param name="title_intro"/>
3330
3496
  <xsl:param name="title_main"/>
3331
3497
  <xsl:param name="society"/>
3332
3498
  <xsl:param name="committee"/>
3499
+ <xsl:param name="enabler"/>
3333
3500
  <xsl:param name="standard_number"/>
3334
3501
  <xsl:param name="history"/>
3335
- <xsl:param name="standard_title_prefix"/>
3502
+ <!-- <xsl:param name="standard_title_prefix" /> -->
3336
3503
  <xsl:param name="cutoff_date"/>
3337
3504
  <xsl:param name="expiration_date"/>
3338
3505
 
@@ -3353,7 +3520,7 @@
3353
3520
  </fo:instream-foreign-object>
3354
3521
  </fo:block>
3355
3522
  </fo:block-container>
3356
- <fo:block-container position="absolute" left="191mm" top="-1mm">
3523
+ <fo:block-container position="absolute" left="191mm" top="-1mm" id="__internal_layout__covepage_bluebox_{generate-id()}">
3357
3524
  <fo:block font-size="1">
3358
3525
  <fo:instream-foreign-object content-width="26mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Boxes">
3359
3526
  <xsl:copy-of select="$Image-Blue-Boxes-svg"/>
@@ -3364,7 +3531,7 @@
3364
3531
 
3365
3532
  <fo:static-content flow-name="right-region" role="artifact">
3366
3533
  <fo:block-container font-family="Montserrat ExtraBold" font-weight="normal" reference-orientation="90" font-size="45.9pt" text-align="right">
3367
- <fo:block margin-right="-6mm" margin-top="-2mm">
3534
+ <fo:block margin-right="-4mm" margin-top="0mm">
3368
3535
  <fo:instream-foreign-object content-width="2.5mm" content-height="11.9mm" scaling="non-uniform" fox:alt-text="Image Box">
3369
3536
  <xsl:call-template name="insertImageBoxSVG">
3370
3537
  <xsl:with-param name="color">rgb(38,172,226)</xsl:with-param>
@@ -3379,43 +3546,108 @@
3379
3546
  </fo:static-content>
3380
3547
 
3381
3548
  <fo:flow flow-name="xsl-region-body" font-family="Calibri">
3382
- <fo:block-container height="81mm" display-align="center" font-weight="bold">
3549
+ <fo:block-container height="100mm" width="150mm" font-weight="bold"> <!-- height="81mm" display-align="center" -->
3383
3550
 
3384
- <xsl:choose>
3385
- <!-- title starts with lower-cased letter -->
3551
+ <!-- <xsl:choose>
3552
+ title starts with lower-cased letter
3386
3553
  <xsl:when test="translate(substring($title_intro,1,1),$lower,'') = ''">
3387
3554
  <fo:block font-size="22pt">
3388
- <xsl:value-of select="$standard_title_prefix"/>
3555
+ <xsl:value-of select="$title_prefix"/>
3389
3556
  <xsl:copy-of select="$title_intro"/>
3390
3557
  </fo:block>
3391
3558
  </xsl:when>
3392
-
3393
3559
  <xsl:otherwise>
3394
- <!-- Example: IEEE Standard for -->
3560
+ Example: IEEE Standard for
3395
3561
  <fo:block font-size="22pt" space-after="2pt">
3396
- <xsl:value-of select="$standard_title_prefix"/>
3562
+ <xsl:value-of select="$title_prefix"/>
3397
3563
  </fo:block>
3398
3564
  <fo:block font-size="22pt" margin-left="3mm">
3399
- <!-- Example: Local and Metropolitan Area Networks— -->
3565
+ Example: Local and Metropolitan Area Networks—
3400
3566
  <xsl:copy-of select="$title_intro"/>
3401
3567
  </fo:block>
3402
3568
  </xsl:otherwise>
3403
- </xsl:choose>
3569
+ </xsl:choose> -->
3404
3570
 
3405
- <fo:block font-size="25pt" space-before="32pt">
3406
- <!-- Example: Port-Based Network Access Control -->
3571
+ <fo:block font-size="25pt"> <!-- 22pt -->
3572
+ <!-- <xsl:value-of select="$title_prefix"/> -->
3407
3573
  <xsl:copy-of select="$title_main"/>
3408
3574
  </fo:block>
3575
+
3409
3576
  </fo:block-container>
3410
3577
 
3411
- <fo:block-container>
3412
- <fo:block font-size="16pt">
3413
- <!-- Example: IEEE Computer Society -->
3414
- <xsl:text>IEEE </xsl:text><xsl:value-of select="$society"/>
3578
+ <fo:block font-size="16pt">
3579
+ <!-- Example: IEEE Computer Society -->
3580
+ <xsl:value-of select="$society"/>
3581
+ </fo:block>
3582
+
3583
+ <fo:block-container height="56mm" display-align="after">
3584
+
3585
+ <fo:block font-size="12pt" space-before="13mm">
3586
+ <xsl:if test="$committee != ''">
3587
+ <fo:block>
3588
+ <!-- Developed by the
3589
+ LAN/MAN Standards Committee -->
3590
+ <xsl:value-of select="$developed_by"/>
3591
+ <xsl:value-of select="$linebreak"/>
3592
+ <xsl:value-of select="$committee"/>
3593
+ </fo:block>
3594
+ </xsl:if>
3595
+ <xsl:if test="normalize-space($enabler) != ''">
3596
+ <fo:block> </fo:block>
3597
+ <fo:block>
3598
+ <!-- Sponsored by the
3599
+ LAN/MAN Standards Committee -->
3600
+ <xsl:value-of select="$sponsored_by"/>
3601
+ <xsl:value-of select="$linebreak"/>
3602
+ <xsl:for-each select="$enabler/mn:subdivision/mn:subdivision/mn:name">
3603
+ <xsl:value-of select="."/>
3604
+ <xsl:if test="position() != last()">
3605
+ <xsl:value-of select="$linebreak"/>
3606
+ <xsl:text>and the</xsl:text>
3607
+ <xsl:value-of select="$linebreak"/>
3608
+ </xsl:if>
3609
+ </xsl:for-each>
3610
+ </fo:block>
3611
+ </xsl:if>
3415
3612
  </fo:block>
3416
- <fo:block font-size="12pt" space-before="13mm">Developed by the</fo:block>
3417
- <!-- LAN/MAN Standards Committee -->
3418
- <fo:block font-size="12pt"><xsl:value-of select="$committee"/></fo:block>
3613
+
3614
+ <xsl:variable name="coverpage_statement" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:coverpage-statement)"/>
3615
+ <xsl:if test="$coverpage_statement != '' or /mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']]/mn:organization/mn:logo">
3616
+ <fo:block font-size="12pt">
3617
+ <fo:block> </fo:block>
3618
+ <fo:table width="168mm" table-layout="fixed">
3619
+ <fo:table-column column-width="100mm"/>
3620
+ <fo:table-column column-width="68mm"/>
3621
+ <fo:table-body>
3622
+ <fo:table-row>
3623
+ <fo:table-cell>
3624
+ <fo:block><xsl:value-of select="$coverpage_statement"/></fo:block>
3625
+ </fo:table-cell>
3626
+ <fo:table-cell text-align="center">
3627
+ <fo:block>
3628
+ <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']]/mn:organization">
3629
+ <fo:block>
3630
+ <xsl:variable name="logo_image">
3631
+ <xsl:for-each select="mn:logo/mn:image"> <!-- set context to logo/image -->
3632
+ <xsl:element name="logo" namespace="{$namespace_full}">
3633
+ <xsl:element name="image" namespace="{$namespace_full}">
3634
+ <xsl:copy-of select="@*"/>
3635
+ <xsl:attribute name="width">32mm</xsl:attribute>
3636
+ <xsl:copy-of select="node()"/>
3637
+ </xsl:element>
3638
+ </xsl:element>
3639
+ </xsl:for-each>
3640
+ </xsl:variable>
3641
+ <xsl:apply-templates select="xalan:nodeset($logo_image)//mn:logo/mn:image"/>
3642
+ </fo:block>
3643
+ </xsl:for-each>
3644
+ </fo:block>
3645
+ </fo:table-cell>
3646
+ </fo:table-row>
3647
+ </fo:table-body>
3648
+ </fo:table>
3649
+ </fo:block>
3650
+ </xsl:if>
3419
3651
 
3420
3652
  <xsl:if test="normalize-space($cutoff_date) != ''">
3421
3653
  <fo:block> </fo:block>
@@ -3432,9 +3664,11 @@
3432
3664
  </fo:block>
3433
3665
  </xsl:if>
3434
3666
 
3435
- <fo:block font-size="12pt" font-weight="bold" space-before="40mm"><xsl:value-of select="$standard_number"/></fo:block>
3436
- <fo:block font-size="10pt"><xsl:value-of select="$history"/></fo:block>
3667
+ </fo:block-container>
3437
3668
 
3669
+ <fo:block-container position="absolute" left="0mm" top="168mm">
3670
+ <fo:block font-size="12pt" font-weight="bold"><xsl:value-of select="$standard_number"/></fo:block>
3671
+ <fo:block font-size="10pt"><xsl:value-of select="$history"/></fo:block>
3438
3672
  </fo:block-container>
3439
3673
  </fo:flow>
3440
3674
  </fo:page-sequence>
@@ -3444,7 +3678,7 @@
3444
3678
  <fo:page-sequence master-reference="cover-and-back-page-industry-connection-report" force-page-count="no-force">
3445
3679
  <fo:static-content flow-name="header" role="artifact">
3446
3680
 
3447
- <fo:block-container position="absolute" left="65.5mm" top="0mm">
3681
+ <fo:block-container position="absolute" left="65.5mm" top="0mm" id="__internal_layout__covepage_bluebox_{generate-id()}">
3448
3682
  <fo:block font-size="1">
3449
3683
  <fo:instream-foreign-object content-height="93.5mm" content-width="64.1mm" fox:alt-text="Image Boxes">
3450
3684
  <xsl:copy-of select="$Image-Blue-Boxes-svg"/>
@@ -3680,7 +3914,7 @@
3680
3914
  </fo:instream-foreign-object>
3681
3915
  </fo:block>
3682
3916
  </fo:block-container>
3683
- <fo:block-container position="absolute" left="191mm" top="-1mm">
3917
+ <fo:block-container position="absolute" left="191mm" top="-1mm" id="__internal_layout__backpage_bluebox_{generate-id()}">
3684
3918
  <fo:block font-size="1">
3685
3919
  <fo:instream-foreign-object content-width="26mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Boxes">
3686
3920
  <xsl:copy-of select="$Image-Blue-Boxes-svg"/>
@@ -3691,7 +3925,7 @@
3691
3925
 
3692
3926
  <fo:flow flow-name="xsl-region-body" font-family="Calibri">
3693
3927
 
3694
- <fo:block font-family="Montserrat ExtraBold" font-size="32pt" font-weight="normal" margin-top="44mm" line-height="0.9">
3928
+ <fo:block font-family="Montserrat ExtraBold" font-size="32pt" font-weight="normal" margin-top="42mm" line-height="0.9">
3695
3929
  <fo:block>RAISING THE</fo:block>
3696
3930
  <fo:block>WORLD’S</fo:block>
3697
3931
  <fo:block>STANDARDS</fo:block>
@@ -5485,42 +5719,120 @@
5485
5719
  <xsl:attribute-set name="copyright-statement-style">
5486
5720
  </xsl:attribute-set> <!-- copyright-statement-style -->
5487
5721
 
5722
+ <xsl:template name="refine_copyright-statement-style">
5723
+ </xsl:template>
5724
+
5488
5725
  <xsl:attribute-set name="copyright-statement-title-style">
5489
5726
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
5490
5727
 
5728
+ <xsl:template name="refine_copyright-statement-title-style">
5729
+ </xsl:template>
5730
+
5491
5731
  <xsl:attribute-set name="copyright-statement-p-style">
5492
5732
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
5493
5733
 
5494
- <xsl:attribute-set name="license-statement-style">
5734
+ <xsl:template name="refine_copyright-statement-p-style">
5735
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
5736
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5737
+ <xsl:attribute name="text-align">justify</xsl:attribute>
5738
+
5739
+ </xsl:template>
5740
+
5741
+ <xsl:attribute-set name="license-statement-style">
5495
5742
  </xsl:attribute-set> <!-- license-statement-style -->
5496
5743
 
5744
+ <xsl:template name="refine_license-statement-style">
5745
+ </xsl:template>
5746
+
5497
5747
  <xsl:attribute-set name="license-statement-title-style">
5498
5748
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5499
5749
  </xsl:attribute-set> <!-- license-statement-title-style -->
5500
5750
 
5751
+ <xsl:template name="refine_license-statement-title-style">
5752
+ </xsl:template>
5753
+
5501
5754
  <xsl:attribute-set name="license-statement-p-style">
5755
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
5756
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5757
+ <xsl:attribute name="text-align">justify</xsl:attribute>
5502
5758
  </xsl:attribute-set> <!-- license-statement-p-style -->
5503
5759
 
5760
+ <xsl:template name="refine_license-statement-p-style">
5761
+
5762
+ </xsl:template>
5763
+
5504
5764
  <xsl:attribute-set name="legal-statement-style">
5505
5765
  </xsl:attribute-set> <!-- legal-statement-style -->
5506
5766
 
5767
+ <xsl:template name="refine_legal-statement-style">
5768
+ </xsl:template>
5769
+
5507
5770
  <xsl:attribute-set name="legal-statement-title-style">
5508
5771
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5772
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
5773
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
5774
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5775
+ <xsl:attribute name="space-before">18pt</xsl:attribute>
5776
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
5777
+ <xsl:attribute name="span">all</xsl:attribute>
5778
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
5509
5779
  </xsl:attribute-set> <!-- legal-statement-title-style -->
5510
5780
 
5781
+ <xsl:template name="refine_legal-statement-title-style">
5782
+ <xsl:variable name="level">
5783
+ <xsl:call-template name="getLevel"/>
5784
+ </xsl:variable>
5785
+ <xsl:if test="$level = '1'">
5786
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
5787
+ </xsl:if>
5788
+ <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
5789
+ <xsl:attribute name="font-family">Arial Black</xsl:attribute>
5790
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
5791
+ </xsl:if>
5792
+ </xsl:template>
5793
+
5511
5794
  <xsl:attribute-set name="legal-statement-p-style">
5512
5795
  </xsl:attribute-set> <!-- legal-statement-p-style -->
5513
5796
 
5797
+ <xsl:template name="refine_legal-statement-p-style">
5798
+ <xsl:if test="@align">
5799
+ <xsl:attribute name="text-align">
5800
+ <xsl:value-of select="@align"/>
5801
+ </xsl:attribute>
5802
+ </xsl:if>
5803
+ </xsl:template>
5804
+
5514
5805
  <xsl:attribute-set name="feedback-statement-style">
5806
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
5807
+ <xsl:attribute name="font-size">7pt</xsl:attribute>
5515
5808
  </xsl:attribute-set> <!-- feedback-statement-style -->
5516
5809
 
5810
+ <xsl:template name="refine_feedback-statement-style">
5811
+ <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
5812
+ <xsl:attribute name="font-family">Calibri Light</xsl:attribute>
5813
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
5814
+ <xsl:attribute name="line-height">1.2</xsl:attribute>
5815
+ </xsl:if>
5816
+ <!-- <xsl:if test="$current_template = 'standard'">
5817
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
5818
+ </xsl:if> -->
5819
+ </xsl:template>
5820
+
5517
5821
  <xsl:attribute-set name="feedback-statement-title-style">
5518
5822
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5519
5823
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
5520
5824
 
5825
+ <xsl:template name="refine_feedback-statement-title-style">
5826
+
5827
+ </xsl:template>
5828
+
5521
5829
  <xsl:attribute-set name="feedback-statement-p-style">
5830
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5522
5831
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
5523
5832
 
5833
+ <xsl:template name="refine_feedback-statement-p-style">
5834
+ </xsl:template>
5835
+
5524
5836
  <!-- End boilerplate sections styles -->
5525
5837
 
5526
5838
  <!-- ================================= -->
@@ -5528,6 +5840,8 @@
5528
5840
  <!-- ================================= -->
5529
5841
  <xsl:template match="mn:copyright-statement">
5530
5842
  <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
5843
+ <xsl:call-template name="refine_copyright-statement-style"/>
5844
+
5531
5845
  <xsl:apply-templates/>
5532
5846
  </fo:block>
5533
5847
  </xsl:template> <!-- copyright-statement -->
@@ -5544,6 +5858,7 @@
5544
5858
 
5545
5859
  <xsl:template match="mn:license-statement">
5546
5860
  <fo:block xsl:use-attribute-sets="license-statement-style">
5861
+ <xsl:call-template name="refine_license-statement-style"/>
5547
5862
  <xsl:apply-templates/>
5548
5863
  </fo:block>
5549
5864
  </xsl:template> <!-- license-statement -->
@@ -5561,6 +5876,7 @@
5561
5876
  <xsl:template match="mn:legal-statement">
5562
5877
  <xsl:param name="isLegacy">false</xsl:param>
5563
5878
  <fo:block xsl:use-attribute-sets="legal-statement-style">
5879
+ <xsl:call-template name="refine_legal-statement-style"/>
5564
5880
  <xsl:apply-templates/>
5565
5881
  </fo:block>
5566
5882
  </xsl:template> <!-- legal-statement -->
@@ -5741,6 +6057,27 @@
5741
6057
  <xsl:attribute-set name="sourcecode-container-style">
5742
6058
  </xsl:attribute-set>
5743
6059
 
6060
+ <xsl:template name="refine_sourcecode-container-style">
6061
+ <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
6062
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
6063
+ </xsl:if>
6064
+
6065
+ <xsl:if test="ancestor::mn:example">
6066
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
6067
+ </xsl:if>
6068
+
6069
+ <xsl:copy-of select="@id"/>
6070
+
6071
+ <xsl:if test="parent::mn:note">
6072
+ <xsl:attribute name="margin-left">
6073
+ <xsl:choose>
6074
+ <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
6075
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
6076
+ </xsl:choose>
6077
+ </xsl:attribute>
6078
+ </xsl:if>
6079
+ </xsl:template>
6080
+
5744
6081
  <xsl:attribute-set name="sourcecode-style">
5745
6082
  <xsl:attribute name="white-space">pre</xsl:attribute>
5746
6083
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -5761,6 +6098,9 @@
5761
6098
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
5762
6099
  </xsl:attribute-set> <!-- sourcecode-name-style -->
5763
6100
 
6101
+ <xsl:template name="refine_sourcecode-name-style">
6102
+ </xsl:template>
6103
+
5764
6104
  <xsl:template name="add-zero-spaces-equal">
5765
6105
  <xsl:param name="text" select="."/>
5766
6106
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
@@ -5848,24 +6188,8 @@
5848
6188
  <xsl:otherwise>
5849
6189
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
5850
6190
 
5851
- <xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
5852
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
5853
- </xsl:if>
5854
-
5855
- <xsl:if test="ancestor::mn:example">
5856
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
5857
- </xsl:if>
5858
-
5859
- <xsl:copy-of select="@id"/>
6191
+ <xsl:call-template name="refine_sourcecode-container-style"/>
5860
6192
 
5861
- <xsl:if test="parent::mn:note">
5862
- <xsl:attribute name="margin-left">
5863
- <xsl:choose>
5864
- <xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
5865
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
5866
- </xsl:choose>
5867
- </xsl:attribute>
5868
- </xsl:if>
5869
6193
  <fo:block-container margin-left="0mm" role="SKIP">
5870
6194
 
5871
6195
  <fo:block xsl:use-attribute-sets="sourcecode-style">
@@ -6192,6 +6516,7 @@
6192
6516
  <xsl:template match="mn:sourcecode/mn:fmt-name">
6193
6517
  <xsl:if test="normalize-space() != ''">
6194
6518
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
6519
+ <xsl:call-template name="refine_sourcecode-name-style"/>
6195
6520
  <xsl:apply-templates/>
6196
6521
  </fo:block>
6197
6522
  </xsl:if>
@@ -6241,11 +6566,30 @@
6241
6566
  <xsl:attribute name="margin-top">5pt</xsl:attribute>
6242
6567
  <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
6243
6568
  <xsl:attribute name="font-size">95%</xsl:attribute>
6244
- </xsl:attribute-set>
6569
+ </xsl:attribute-set> <!-- pre-style -->
6570
+
6571
+ <xsl:template name="refine_pre-style">
6572
+ </xsl:template>
6245
6573
 
6246
6574
  <xsl:attribute-set name="tt-style">
6247
6575
  </xsl:attribute-set>
6248
6576
 
6577
+ <xsl:template name="refine_tt-style">
6578
+ <xsl:variable name="_font-size"> <!-- inherit -->
6579
+ </xsl:variable>
6580
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
6581
+ <xsl:if test="$font-size != ''">
6582
+ <xsl:attribute name="font-size">
6583
+ <xsl:choose>
6584
+ <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
6585
+ <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
6586
+ <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
6587
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
6588
+ </xsl:choose>
6589
+ </xsl:attribute>
6590
+ </xsl:if>
6591
+ </xsl:template>
6592
+
6249
6593
  <xsl:variable name="color-added-text">
6250
6594
  <xsl:text>rgb(0, 255, 0)</xsl:text>
6251
6595
  </xsl:variable>
@@ -6258,9 +6602,14 @@
6258
6602
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
6259
6603
  </xsl:attribute-set>
6260
6604
 
6605
+ <xsl:template name="refine_add-style">
6606
+ </xsl:template>
6607
+
6261
6608
  <xsl:variable name="add-style">
6262
- <add-style xsl:use-attribute-sets="add-style"/>
6263
- </xsl:variable>
6609
+ <add-style xsl:use-attribute-sets="add-style">
6610
+ <xsl:call-template name="refine_add-style"/>
6611
+ </add-style>
6612
+ </xsl:variable>
6264
6613
  <xsl:template name="append_add-style">
6265
6614
  <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
6266
6615
  </xsl:template>
@@ -6273,24 +6622,77 @@
6273
6622
  <xsl:attribute name="text-decoration">line-through</xsl:attribute>
6274
6623
  </xsl:attribute-set>
6275
6624
 
6625
+ <xsl:template name="refine_del-style">
6626
+ </xsl:template>
6627
+
6628
+ <xsl:attribute-set name="strong-style">
6629
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
6630
+ </xsl:attribute-set>
6631
+
6632
+ <xsl:template name="refine_strong_style">
6633
+ <xsl:if test="ancestor::*['preferred']">
6634
+ <xsl:attribute name="role">SKIP</xsl:attribute>
6635
+ </xsl:if>
6636
+ </xsl:template> <!-- refine_strong_style -->
6637
+
6638
+ <xsl:attribute-set name="em-style">
6639
+ <xsl:attribute name="font-style">italic</xsl:attribute>
6640
+ </xsl:attribute-set>
6641
+
6642
+ <xsl:template name="refine_em_style">
6643
+ </xsl:template> <!-- refine_em_style -->
6644
+
6645
+ <xsl:attribute-set name="sup-style">
6646
+ <xsl:attribute name="font-size">80%</xsl:attribute>
6647
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
6648
+ </xsl:attribute-set>
6649
+
6650
+ <xsl:template name="refine_sup-style">
6651
+ </xsl:template>
6652
+
6653
+ <xsl:attribute-set name="sub-style">
6654
+ <xsl:attribute name="font-size">80%</xsl:attribute>
6655
+ <xsl:attribute name="vertical-align">sub</xsl:attribute>
6656
+ </xsl:attribute-set>
6657
+
6658
+ <xsl:template name="refine_sub-style">
6659
+ </xsl:template>
6660
+
6661
+ <xsl:attribute-set name="underline-style">
6662
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
6663
+ </xsl:attribute-set>
6664
+
6665
+ <xsl:template name="refine_underline-style">
6666
+ </xsl:template>
6667
+
6668
+ <xsl:attribute-set name="hi-style">
6669
+ <xsl:attribute name="background-color">yellow</xsl:attribute>
6670
+ </xsl:attribute-set>
6671
+
6672
+ <xsl:template name="refine_hi-style">
6673
+ </xsl:template>
6674
+
6675
+ <xsl:attribute-set name="strike-style">
6676
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
6677
+ </xsl:attribute-set>
6678
+
6679
+ <xsl:template name="refine_strike-style">
6680
+ </xsl:template>
6681
+
6276
6682
  <xsl:template match="mn:br">
6277
6683
  <xsl:value-of select="$linebreak"/>
6278
6684
  </xsl:template>
6279
6685
 
6280
- <xsl:template match="mn:em">
6281
- <fo:inline font-style="italic">
6282
- <xsl:call-template name="refine_italic_style"/>
6686
+ <xsl:template match="mn:em">
6687
+ <fo:inline xsl:use-attribute-sets="em-style">
6688
+ <xsl:call-template name="refine_em_style"/>
6283
6689
  <xsl:apply-templates/>
6284
6690
  </fo:inline>
6285
6691
  </xsl:template>
6286
6692
 
6287
- <xsl:template name="refine_italic_style">
6288
- </xsl:template>
6289
-
6290
6693
  <xsl:template match="mn:strong | *[local-name()='b']">
6291
6694
  <xsl:param name="split_keep-within-line"/>
6292
- <fo:inline font-weight="bold">
6293
-
6695
+ <fo:inline xsl:use-attribute-sets="strong-style">
6294
6696
  <xsl:call-template name="refine_strong_style"/>
6295
6697
 
6296
6698
  <xsl:apply-templates>
@@ -6299,44 +6701,27 @@
6299
6701
  </fo:inline>
6300
6702
  </xsl:template>
6301
6703
 
6302
- <xsl:template name="refine_strong_style">
6303
- <xsl:if test="ancestor::*['preferred']">
6304
- <xsl:attribute name="role">SKIP</xsl:attribute>
6305
- </xsl:if>
6306
- </xsl:template>
6307
-
6308
6704
  <xsl:template match="*[local-name()='padding']">
6309
6705
  <fo:inline padding-right="{@value}"> </fo:inline>
6310
6706
  </xsl:template>
6311
6707
 
6312
6708
  <xsl:template match="mn:sup">
6313
- <fo:inline font-size="80%" vertical-align="super">
6709
+ <fo:inline xsl:use-attribute-sets="sup-style">
6710
+ <xsl:call-template name="refine_sup-style"/>
6314
6711
  <xsl:apply-templates/>
6315
6712
  </fo:inline>
6316
6713
  </xsl:template>
6317
6714
 
6318
6715
  <xsl:template match="mn:sub">
6319
- <fo:inline font-size="80%" vertical-align="sub">
6716
+ <fo:inline xsl:use-attribute-sets="sub-style">
6717
+ <xsl:call-template name="refine_sub-style"/>
6320
6718
  <xsl:apply-templates/>
6321
6719
  </fo:inline>
6322
6720
  </xsl:template>
6323
6721
 
6324
6722
  <xsl:template match="mn:tt">
6325
6723
  <fo:inline xsl:use-attribute-sets="tt-style">
6326
-
6327
- <xsl:variable name="_font-size"> <!-- inherit -->
6328
- </xsl:variable>
6329
- <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
6330
- <xsl:if test="$font-size != ''">
6331
- <xsl:attribute name="font-size">
6332
- <xsl:choose>
6333
- <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
6334
- <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
6335
- <xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
6336
- <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
6337
- </xsl:choose>
6338
- </xsl:attribute>
6339
- </xsl:if>
6724
+ <xsl:call-template name="refine_tt-style"/>
6340
6725
  <xsl:apply-templates/>
6341
6726
  </fo:inline>
6342
6727
  </xsl:template> <!-- tt -->
@@ -6355,7 +6740,8 @@
6355
6740
  </xsl:template>
6356
6741
 
6357
6742
  <xsl:template match="mn:underline">
6358
- <fo:inline text-decoration="underline">
6743
+ <fo:inline xsl:use-attribute-sets="underline-style">
6744
+ <xsl:call-template name="refine_underline-style"/>
6359
6745
  <xsl:apply-templates/>
6360
6746
  </fo:inline>
6361
6747
  </xsl:template>
@@ -6513,6 +6899,7 @@
6513
6899
 
6514
6900
  <xsl:template match="mn:del">
6515
6901
  <fo:inline xsl:use-attribute-sets="del-style">
6902
+ <xsl:call-template name="refine_del-style"/>
6516
6903
  <xsl:apply-templates/>
6517
6904
  </fo:inline>
6518
6905
  </xsl:template>
@@ -6522,7 +6909,8 @@
6522
6909
 
6523
6910
  <!-- highlight text -->
6524
6911
  <xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
6525
- <fo:inline background-color="yellow">
6912
+ <fo:inline xsl:use-attribute-sets="hi-style">
6913
+ <xsl:call-template name="refine_hi-style"/>
6526
6914
  <xsl:apply-templates/>
6527
6915
  </fo:inline>
6528
6916
  </xsl:template>
@@ -6608,7 +6996,8 @@
6608
6996
  </xsl:template>
6609
6997
 
6610
6998
  <xsl:template match="mn:strike">
6611
- <fo:inline text-decoration="line-through">
6999
+ <fo:inline xsl:use-attribute-sets="strike-style">
7000
+ <xsl:call-template name="refine_strike-style"/>
6612
7001
  <xsl:apply-templates/>
6613
7002
  </fo:inline>
6614
7003
  </xsl:template>
@@ -6636,7 +7025,7 @@
6636
7025
  </xsl:otherwise>
6637
7026
  </xsl:choose>
6638
7027
  </xsl:variable>
6639
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
7028
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
6640
7029
  <style name="{$key}"><xsl:value-of select="$value"/></style>
6641
7030
  </xsl:if>
6642
7031
  <xsl:if test="$key = 'text-indent'">
@@ -6688,6 +7077,7 @@
6688
7077
 
6689
7078
  <xsl:template match="mn:pre" name="pre">
6690
7079
  <fo:block xsl:use-attribute-sets="pre-style">
7080
+ <xsl:call-template name="refine_pre-style"/>
6691
7081
  <xsl:copy-of select="@id"/>
6692
7082
  <xsl:choose>
6693
7083
 
@@ -6718,22 +7108,40 @@
6718
7108
  <xsl:attribute-set name="permission-style">
6719
7109
  </xsl:attribute-set>
6720
7110
 
7111
+ <xsl:template name="refine_permission-style">
7112
+ </xsl:template>
7113
+
6721
7114
  <xsl:attribute-set name="permission-name-style">
6722
7115
  </xsl:attribute-set>
6723
7116
 
7117
+ <xsl:template name="refine_permission-name-style">
7118
+ </xsl:template>
7119
+
6724
7120
  <xsl:attribute-set name="permission-label-style">
6725
7121
  </xsl:attribute-set>
6726
7122
 
7123
+ <xsl:template name="refine_permission-label-style">
7124
+ </xsl:template>
7125
+
6727
7126
  <xsl:attribute-set name="requirement-style">
6728
7127
  </xsl:attribute-set>
6729
7128
 
7129
+ <xsl:template name="refine_requirement-style">
7130
+ </xsl:template>
7131
+
6730
7132
  <xsl:attribute-set name="requirement-name-style">
6731
7133
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6732
7134
  </xsl:attribute-set>
6733
7135
 
7136
+ <xsl:template name="refine_requirement-name-style">
7137
+ </xsl:template>
7138
+
6734
7139
  <xsl:attribute-set name="requirement-label-style">
6735
7140
  </xsl:attribute-set>
6736
7141
 
7142
+ <xsl:template name="refine_requirement-label-style">
7143
+ </xsl:template>
7144
+
6737
7145
  <xsl:attribute-set name="subject-style">
6738
7146
  </xsl:attribute-set>
6739
7147
 
@@ -6761,18 +7169,28 @@
6761
7169
  <xsl:attribute-set name="recommendation-style">
6762
7170
  </xsl:attribute-set>
6763
7171
 
7172
+ <xsl:template name="refine_recommendation-style">
7173
+ </xsl:template>
7174
+
6764
7175
  <xsl:attribute-set name="recommendation-name-style">
6765
7176
  </xsl:attribute-set>
6766
7177
 
7178
+ <xsl:template name="refine_recommendation-name-style">
7179
+ </xsl:template>
7180
+
6767
7181
  <xsl:attribute-set name="recommendation-label-style">
6768
7182
  </xsl:attribute-set>
6769
7183
 
7184
+ <xsl:template name="refine_recommendation-label-style">
7185
+ </xsl:template>
7186
+
6770
7187
  <!-- ========== -->
6771
7188
  <!-- permission -->
6772
7189
  <!-- ========== -->
6773
7190
  <xsl:template match="mn:permission">
6774
7191
  <xsl:call-template name="setNamedDestination"/>
6775
7192
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
7193
+ <xsl:call-template name="refine_permission-style"/>
6776
7194
  <xsl:apply-templates select="mn:fmt-name"/>
6777
7195
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
6778
7196
  </fo:block>
@@ -6781,6 +7199,7 @@
6781
7199
  <xsl:template match="mn:permission/mn:fmt-name">
6782
7200
  <xsl:if test="normalize-space() != ''">
6783
7201
  <fo:block xsl:use-attribute-sets="permission-name-style">
7202
+ <xsl:call-template name="refine_permission-name-style"/>
6784
7203
  <xsl:apply-templates/>
6785
7204
  </fo:block>
6786
7205
  </xsl:if>
@@ -6788,6 +7207,7 @@
6788
7207
 
6789
7208
  <xsl:template match="mn:permission/mn:label">
6790
7209
  <fo:block xsl:use-attribute-sets="permission-label-style">
7210
+ <xsl:call-template name="refine_permission-label-style"/>
6791
7211
  <xsl:apply-templates/>
6792
7212
  </fo:block>
6793
7213
  </xsl:template>
@@ -6800,6 +7220,7 @@
6800
7220
  <xsl:template match="mn:requirement">
6801
7221
  <xsl:call-template name="setNamedDestination"/>
6802
7222
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
7223
+ <xsl:call-template name="refine_requirement-style"/>
6803
7224
  <xsl:apply-templates select="mn:fmt-name"/>
6804
7225
  <xsl:apply-templates select="mn:label"/>
6805
7226
  <xsl:apply-templates select="@obligation"/>
@@ -6812,6 +7233,7 @@
6812
7233
  <xsl:if test="normalize-space() != ''">
6813
7234
 
6814
7235
  <fo:block xsl:use-attribute-sets="requirement-name-style">
7236
+ <xsl:call-template name="refine_requirement-name-style"/>
6815
7237
  <xsl:apply-templates/>
6816
7238
  </fo:block>
6817
7239
  </xsl:if>
@@ -6819,6 +7241,7 @@
6819
7241
 
6820
7242
  <xsl:template match="mn:requirement/mn:label">
6821
7243
  <fo:block xsl:use-attribute-sets="requirement-label-style">
7244
+ <xsl:call-template name="refine_requirement-label-style"/>
6822
7245
  <xsl:apply-templates/>
6823
7246
  </fo:block>
6824
7247
  </xsl:template>
@@ -6844,6 +7267,7 @@
6844
7267
  <xsl:template match="mn:recommendation">
6845
7268
  <xsl:call-template name="setNamedDestination"/>
6846
7269
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
7270
+ <xsl:call-template name="refine_recommendation-style"/>
6847
7271
  <xsl:apply-templates select="mn:fmt-name"/>
6848
7272
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
6849
7273
  </fo:block>
@@ -6853,6 +7277,7 @@
6853
7277
  <xsl:if test="normalize-space() != ''">
6854
7278
 
6855
7279
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
7280
+ <xsl:call-template name="refine_recommendation-name-style"/>
6856
7281
  <xsl:apply-templates/>
6857
7282
  </fo:block>
6858
7283
  </xsl:if>
@@ -6860,6 +7285,7 @@
6860
7285
 
6861
7286
  <xsl:template match="mn:recommendation/mn:label">
6862
7287
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
7288
+ <xsl:call-template name="refine_recommendation-label-style"/>
6863
7289
  <xsl:apply-templates/>
6864
7290
  </fo:block>
6865
7291
  </xsl:template>
@@ -7040,34 +7466,64 @@
7040
7466
  <xsl:attribute-set name="term-style">
7041
7467
  </xsl:attribute-set> <!-- term-style -->
7042
7468
 
7469
+ <xsl:template name="refine_term-style">
7470
+ </xsl:template>
7471
+
7043
7472
  <xsl:attribute-set name="term-name-style">
7044
7473
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7045
7474
  <xsl:attribute name="font-weight">bold</xsl:attribute>
7046
7475
  </xsl:attribute-set> <!-- term-name-style -->
7047
7476
 
7048
- <xsl:attribute-set name="preferred-block-style">
7477
+ <xsl:template name="refine_term-name-style">
7478
+ </xsl:template>
7479
+
7480
+ <xsl:attribute-set name="preferred-block-style">
7049
7481
  </xsl:attribute-set> <!-- preferred-block-style -->
7050
7482
 
7483
+ <xsl:template name="refine_preferred-block-style">
7484
+ </xsl:template>
7485
+
7051
7486
  <xsl:attribute-set name="preferred-term-style">
7052
7487
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7053
7488
  <xsl:attribute name="font-weight">bold</xsl:attribute>
7054
7489
  </xsl:attribute-set> <!-- preferred-term-style -->
7055
7490
 
7491
+ <xsl:template name="refine_preferred-term-style">
7492
+ <xsl:if test="mn:strong">
7493
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
7494
+ </xsl:if>
7495
+ </xsl:template>
7496
+
7056
7497
  <xsl:attribute-set name="domain-style">
7057
7498
  </xsl:attribute-set> <!-- domain-style -->
7058
7499
 
7500
+ <xsl:template name="refine_domain-style">
7501
+ </xsl:template>
7502
+
7059
7503
  <xsl:attribute-set name="admitted-style">
7060
7504
  </xsl:attribute-set> <!-- admitted-style -->
7061
7505
 
7506
+ <xsl:template name="refine_admitted-style">
7507
+ </xsl:template>
7508
+
7062
7509
  <xsl:attribute-set name="deprecates-style">
7063
7510
  </xsl:attribute-set> <!-- deprecates-style -->
7064
7511
 
7512
+ <xsl:template name="refine_deprecates-style">
7513
+ </xsl:template>
7514
+
7065
7515
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
7066
7516
  </xsl:attribute-set>
7067
7517
 
7518
+ <xsl:template name="refine_related-block-style">
7519
+ </xsl:template>
7520
+
7068
7521
  <xsl:attribute-set name="definition-style">
7069
7522
  </xsl:attribute-set> <!-- definition-style -->
7070
7523
 
7524
+ <xsl:template name="refine_definition-style">
7525
+ </xsl:template>
7526
+
7071
7527
  <xsl:attribute-set name="termsource-style">
7072
7528
  </xsl:attribute-set> <!-- termsource-style -->
7073
7529
 
@@ -7077,9 +7533,15 @@
7077
7533
  <xsl:attribute-set name="termsource-text-style">
7078
7534
  </xsl:attribute-set> <!-- termsource-text-style -->
7079
7535
 
7536
+ <xsl:template name="refine_termsource-text-style">
7537
+ </xsl:template>
7538
+
7080
7539
  <xsl:attribute-set name="origin-style">
7081
7540
  </xsl:attribute-set> <!-- origin-style -->
7082
7541
 
7542
+ <xsl:template name="refine_origin-style">
7543
+ </xsl:template>
7544
+
7083
7545
  <!-- ====== -->
7084
7546
  <!-- term -->
7085
7547
  <!-- ====== -->
@@ -7095,9 +7557,8 @@
7095
7557
  <xsl:template match="mn:term">
7096
7558
  <xsl:call-template name="setNamedDestination"/>
7097
7559
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
7560
+ <xsl:call-template name="refine_term-style"/>
7098
7561
 
7099
- <xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
7100
- </xsl:if>
7101
7562
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7102
7563
  </fo:block>
7103
7564
  </xsl:template>
@@ -7173,6 +7634,7 @@
7173
7634
  <!-- text SOURCE: -->
7174
7635
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
7175
7636
  <fo:inline xsl:use-attribute-sets="termsource-text-style">
7637
+ <xsl:call-template name="refine_termsource-text-style"/>
7176
7638
  <xsl:value-of select="."/>
7177
7639
  </fo:inline>
7178
7640
  </xsl:template>
@@ -7185,6 +7647,7 @@
7185
7647
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
7186
7648
  </xsl:if>
7187
7649
  <fo:inline xsl:use-attribute-sets="origin-style">
7650
+ <xsl:call-template name="refine_origin-style"/>
7188
7651
  <xsl:apply-templates/>
7189
7652
  </fo:inline>
7190
7653
  </fo:basic-link>
@@ -7234,9 +7697,12 @@
7234
7697
  </xsl:variable>
7235
7698
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
7236
7699
 
7700
+ <xsl:call-template name="refine_preferred-block-style"/>
7701
+
7237
7702
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
7238
7703
 
7239
7704
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
7705
+ <xsl:call-template name="refine_term-name-style"/>
7240
7706
 
7241
7707
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
7242
7708
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -7247,7 +7713,7 @@
7247
7713
  </xsl:if>
7248
7714
 
7249
7715
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
7250
- <xsl:call-template name="setStyle_preferred"/>
7716
+ <xsl:call-template name="refine_preferred-term-style"/>
7251
7717
 
7252
7718
  <xsl:apply-templates/>
7253
7719
  </fo:block>
@@ -7268,22 +7734,18 @@
7268
7734
 
7269
7735
  <xsl:template match="mn:fmt-admitted">
7270
7736
  <fo:block xsl:use-attribute-sets="admitted-style">
7737
+ <xsl:call-template name="refine_admitted-style"/>
7271
7738
  <xsl:apply-templates/>
7272
7739
  </fo:block>
7273
7740
  </xsl:template>
7274
7741
 
7275
7742
  <xsl:template match="mn:fmt-deprecates">
7276
7743
  <fo:block xsl:use-attribute-sets="deprecates-style">
7744
+ <xsl:call-template name="refine_deprecates-style"/>
7277
7745
  <xsl:apply-templates/>
7278
7746
  </fo:block>
7279
7747
  </xsl:template>
7280
7748
 
7281
- <xsl:template name="setStyle_preferred">
7282
- <xsl:if test="mn:strong">
7283
- <xsl:attribute name="font-weight">normal</xsl:attribute>
7284
- </xsl:if>
7285
- </xsl:template>
7286
-
7287
7749
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
7288
7750
  <!-- in metanorma xml preferred terms delimited by semicolons -->
7289
7751
  <xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
@@ -7293,6 +7755,7 @@
7293
7755
 
7294
7756
  <xsl:template match="mn:fmt-related">
7295
7757
  <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
7758
+ <xsl:call-template name="refine_related-block-style"/>
7296
7759
  <xsl:apply-templates/>
7297
7760
  </fo:block>
7298
7761
  </xsl:template>
@@ -7307,6 +7770,7 @@
7307
7770
  <!-- ========== -->
7308
7771
  <xsl:template match="mn:fmt-definition">
7309
7772
  <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
7773
+ <xsl:call-template name="refine_definition-style"/>
7310
7774
  <xsl:apply-templates/>
7311
7775
  </fo:block>
7312
7776
  </xsl:template>
@@ -7336,6 +7800,9 @@
7336
7800
  </xsl:attribute-set> <!-- termexample-style -->
7337
7801
 
7338
7802
  <xsl:template name="refine_termexample-style">
7803
+ <xsl:if test="preceding-sibling::*[1][self::mn:termnote]">
7804
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
7805
+ </xsl:if>
7339
7806
  </xsl:template> <!-- refine_termexample-style -->
7340
7807
 
7341
7808
  <xsl:attribute-set name="termexample-name-style">
@@ -7359,6 +7826,9 @@
7359
7826
  <xsl:attribute-set name="example-body-style">
7360
7827
  </xsl:attribute-set> <!-- example-body-style -->
7361
7828
 
7829
+ <xsl:template name="refine_example-body-style">
7830
+ </xsl:template>
7831
+
7362
7832
  <xsl:attribute-set name="example-name-style">
7363
7833
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
7364
7834
  <xsl:attribute name="padding-right">9mm</xsl:attribute>
@@ -7388,7 +7858,12 @@
7388
7858
  <xsl:call-template name="setBlockSpanAll"/>
7389
7859
 
7390
7860
  <xsl:apply-templates select="mn:fmt-name"/>
7391
- <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7861
+ <fo:block-container margin-left="11mm">
7862
+ <fo:block-container margin-left="0mm">
7863
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
7864
+ </fo:block-container>
7865
+ </fo:block-container>
7866
+
7392
7867
  </fo:block>
7393
7868
  </xsl:template>
7394
7869
 
@@ -7408,9 +7883,8 @@
7408
7883
  <xsl:choose>
7409
7884
  <xsl:when test="contains($element, 'block')">
7410
7885
  <fo:block xsl:use-attribute-sets="example-p-style">
7411
- <xsl:if test="not(preceding-sibling::mn:p)">
7412
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
7413
- </xsl:if>
7886
+
7887
+ <xsl:call-template name="refine_example-p-style"/>
7414
7888
 
7415
7889
  <xsl:apply-templates/>
7416
7890
  </fo:block>
@@ -7463,6 +7937,7 @@
7463
7937
  </fo:block>
7464
7938
 
7465
7939
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
7940
+ <xsl:call-template name="refine_example-body-style"/>
7466
7941
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7467
7942
  <xsl:variable name="example_body">
7468
7943
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
@@ -7525,6 +8000,7 @@
7525
8000
  <xsl:if test="*[not(self::mn:fmt-name)][position() &gt; 1]">
7526
8001
  <!-- display further elements in blocks -->
7527
8002
  <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
8003
+ <xsl:call-template name="refine_example-body-style"/>
7528
8004
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7529
8005
  <xsl:apply-templates select="*[not(self::mn:fmt-name)][position() &gt; 1]">
7530
8006
  <xsl:with-param name="fo_element" select="'block'"/>
@@ -7794,6 +8270,9 @@
7794
8270
  <!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
7795
8271
  </xsl:attribute-set> <!-- table-fn-number-style -->
7796
8272
 
8273
+ <xsl:template name="refine_table-fn-number-style">
8274
+ </xsl:template>
8275
+
7797
8276
  <xsl:attribute-set name="table-fmt-fn-label-style">
7798
8277
  <xsl:attribute name="font-size">80%</xsl:attribute>
7799
8278
  <xsl:attribute name="baseline-shift">30%</xsl:attribute>
@@ -7803,30 +8282,12 @@
7803
8282
  <xsl:template name="refine_table-fmt-fn-label-style">
7804
8283
  </xsl:template>
7805
8284
 
7806
- <xsl:attribute-set name="fn-container-body-style">
7807
- <xsl:attribute name="text-indent">0</xsl:attribute>
7808
- <xsl:attribute name="start-indent">0</xsl:attribute>
7809
- </xsl:attribute-set>
7810
-
7811
8285
  <xsl:attribute-set name="table-fn-body-style">
7812
8286
  </xsl:attribute-set>
7813
8287
 
7814
- <xsl:attribute-set name="figure-fn-number-style">
7815
- <xsl:attribute name="padding-right">5mm</xsl:attribute>
7816
- </xsl:attribute-set> <!-- figure-fn-number-style -->
7817
-
7818
- <xsl:attribute-set name="figure-fmt-fn-label-style">
7819
- <xsl:attribute name="font-size">80%</xsl:attribute>
7820
- <xsl:attribute name="vertical-align">super</xsl:attribute>
7821
- </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
7822
-
7823
- <xsl:template name="refine_figure-fmt-fn-label-style">
8288
+ <xsl:template name="refine_table-fn-body-style">
7824
8289
  </xsl:template>
7825
8290
 
7826
- <xsl:attribute-set name="figure-fn-body-style">
7827
- <xsl:attribute name="text-align">justify</xsl:attribute>
7828
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
7829
- </xsl:attribute-set>
7830
8291
  <!-- ========================== -->
7831
8292
  <!-- END Table styles -->
7832
8293
  <!-- ========================== -->
@@ -9101,6 +9562,7 @@
9101
9562
  </xsl:apply-templates>
9102
9563
 
9103
9564
  <fo:inline xsl:use-attribute-sets="table-fn-body-style">
9565
+ <xsl:call-template name="refine_table-fn-body-style"/>
9104
9566
  <!-- <xsl:copy-of select="./node()"/> -->
9105
9567
  <xsl:apply-templates/>
9106
9568
  </fo:inline>
@@ -9119,6 +9581,7 @@
9119
9581
  <xsl:param name="process">false</xsl:param>
9120
9582
  <xsl:if test="$process = 'true'">
9121
9583
  <fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
9584
+ <xsl:call-template name="refine_table-fn-number-style"/>
9122
9585
 
9123
9586
  <!-- tab is padding-right -->
9124
9587
  <xsl:apply-templates select=".//mn:tab">
@@ -9990,9 +10453,18 @@
9990
10453
  <xsl:attribute-set name="dl-block-style">
9991
10454
  </xsl:attribute-set>
9992
10455
 
10456
+ <xsl:template name="refine_dl-block-style">
10457
+ <xsl:if test="@key = 'true' and ancestor::mn:figure">
10458
+ <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
10459
+ </xsl:if>
10460
+ </xsl:template>
10461
+
9993
10462
  <xsl:attribute-set name="dt-row-style">
9994
10463
  </xsl:attribute-set>
9995
10464
 
10465
+ <xsl:template name="refine_dt-row-style">
10466
+ </xsl:template>
10467
+
9996
10468
  <xsl:attribute-set name="dt-cell-style">
9997
10469
  </xsl:attribute-set>
9998
10470
 
@@ -10015,6 +10487,9 @@
10015
10487
  <xsl:attribute name="font-weight">bold</xsl:attribute>
10016
10488
  </xsl:attribute-set> <!-- dl-name-style -->
10017
10489
 
10490
+ <xsl:template name="refine_dl-name-style">
10491
+ </xsl:template>
10492
+
10018
10493
  <xsl:attribute-set name="dd-cell-style">
10019
10494
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
10020
10495
  </xsl:attribute-set>
@@ -10053,9 +10528,7 @@
10053
10528
  <!-- <dl><xsl:copy-of select="."/></dl> -->
10054
10529
  <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
10055
10530
 
10056
- <xsl:if test="@key = 'true' and ancestor::mn:figure">
10057
- <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
10058
- </xsl:if>
10531
+ <xsl:call-template name="refine_dl-block-style"/>
10059
10532
 
10060
10533
  <xsl:call-template name="setBlockSpanAll"/>
10061
10534
  <xsl:if test="not(ancestor::mn:quote)">
@@ -10351,6 +10824,8 @@
10351
10824
  <xsl:if test="$process = 'true'">
10352
10825
  <fo:block xsl:use-attribute-sets="dl-name-style">
10353
10826
 
10827
+ <xsl:call-template name="refine_dl-name-style"/>
10828
+
10354
10829
  <xsl:apply-templates/>
10355
10830
  </fo:block>
10356
10831
  </xsl:if>
@@ -10539,6 +11014,8 @@
10539
11014
  <xsl:param name="split_keep-within-line"/>
10540
11015
 
10541
11016
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
11017
+ <xsl:call-template name="refine_dt-row-style"/>
11018
+
10542
11019
  <xsl:call-template name="insert_dt_cell">
10543
11020
  <xsl:with-param name="key_iso" select="$key_iso"/>
10544
11021
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -10748,15 +11225,22 @@
10748
11225
  <xsl:attribute-set name="appendix-style">
10749
11226
  </xsl:attribute-set>
10750
11227
 
11228
+ <xsl:template name="refine_appendix-style">
11229
+ </xsl:template>
11230
+
10751
11231
  <xsl:attribute-set name="appendix-example-style">
10752
11232
  </xsl:attribute-set>
10753
11233
 
11234
+ <xsl:template name="refine_appendix-example-style">
11235
+ </xsl:template>
11236
+
10754
11237
  <!-- ======================== -->
10755
11238
  <!-- Appendix processing -->
10756
11239
  <!-- ======================== -->
10757
11240
  <xsl:template match="mn:appendix">
10758
11241
  <xsl:call-template name="setNamedDestination"/>
10759
11242
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
11243
+ <xsl:call-template name="refine_appendix-style"/>
10760
11244
  <xsl:apply-templates select="mn:fmt-title"/>
10761
11245
  </fo:block>
10762
11246
  <xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
@@ -10775,6 +11259,7 @@
10775
11259
  <xsl:template match="mn:appendix//mn:example" priority="2">
10776
11260
  <xsl:call-template name="setNamedDestination"/>
10777
11261
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
11262
+ <xsl:call-template name="refine_appendix-example-style"/>
10778
11263
  <xsl:apply-templates select="mn:fmt-name"/>
10779
11264
  </fo:block>
10780
11265
  <xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
@@ -10783,7 +11268,16 @@
10783
11268
  <xsl:attribute-set name="xref-style">
10784
11269
  <xsl:attribute name="color">blue</xsl:attribute>
10785
11270
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
10786
- </xsl:attribute-set>
11271
+ </xsl:attribute-set> <!-- xref-style -->
11272
+
11273
+ <xsl:template name="refine_xref-style">
11274
+ <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[self::mn:table or self::mn:dl])">
11275
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
11276
+ </xsl:if>
11277
+ <xsl:if test="parent::mn:add">
11278
+ <xsl:call-template name="append_add-style"/>
11279
+ </xsl:if>
11280
+ </xsl:template> <!-- refine_xref-style -->
10787
11281
 
10788
11282
  <xsl:template match="mn:fmt-xref">
10789
11283
  <xsl:call-template name="insert_basic_link">
@@ -10792,12 +11286,8 @@
10792
11286
  <xsl:call-template name="getAltText"/>
10793
11287
  </xsl:variable>
10794
11288
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
10795
- <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[self::mn:table or self::mn:dl])">
10796
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
10797
- </xsl:if>
10798
- <xsl:if test="parent::mn:add">
10799
- <xsl:call-template name="append_add-style"/>
10800
- </xsl:if>
11289
+ <xsl:call-template name="refine_xref-style"/>
11290
+
10801
11291
  <xsl:apply-templates/>
10802
11292
  </fo:basic-link>
10803
11293
  </xsl:with-param>
@@ -10914,16 +11404,16 @@
10914
11404
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
10915
11405
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
10916
11406
  <xsl:attribute name="text-align">justify</xsl:attribute>
10917
- </xsl:attribute-set>
11407
+ </xsl:attribute-set> <!-- note-style -->
10918
11408
 
10919
11409
  <xsl:template name="refine_note-style">
10920
- </xsl:template>
11410
+ </xsl:template> <!-- refine_note-style -->
10921
11411
 
10922
11412
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
10923
11413
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
10924
11414
 
10925
11415
  <xsl:attribute-set name="note-name-style">
10926
- </xsl:attribute-set>
11416
+ </xsl:attribute-set> <!-- note-name-style -->
10927
11417
 
10928
11418
  <xsl:template name="refine_note-name-style">
10929
11419
  </xsl:template> <!-- refine_note-name-style -->
@@ -10937,20 +11427,29 @@
10937
11427
 
10938
11428
  <xsl:attribute-set name="note-p-style">
10939
11429
  <xsl:attribute name="text-align">justify</xsl:attribute>
10940
- </xsl:attribute-set>
11430
+ </xsl:attribute-set> <!-- note-p-style -->
11431
+
11432
+ <xsl:template name="refine_note-p-style">
11433
+ </xsl:template>
10941
11434
 
10942
11435
  <xsl:attribute-set name="termnote-style">
10943
- <xsl:attribute name="font-size">9pt</xsl:attribute>
10944
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
10945
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11436
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
11437
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
11438
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
10946
11439
  <xsl:attribute name="text-align">justify</xsl:attribute>
10947
- </xsl:attribute-set>
11440
+ </xsl:attribute-set> <!-- termnote-style -->
10948
11441
 
10949
11442
  <xsl:template name="refine_termnote-style">
11443
+ <xsl:if test="preceding-sibling::*[1][self::mn:fmt-definition]">
11444
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
11445
+ </xsl:if>
11446
+ <xsl:if test="not(following-sibling::*)">
11447
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11448
+ </xsl:if>
10950
11449
  </xsl:template> <!-- refine_termnote-style -->
10951
11450
 
10952
11451
  <xsl:attribute-set name="termnote-name-style">
10953
- </xsl:attribute-set>
11452
+ </xsl:attribute-set> <!-- termnote-name-style -->
10954
11453
 
10955
11454
  <xsl:template name="refine_termnote-name-style">
10956
11455
  </xsl:template>
@@ -10958,6 +11457,9 @@
10958
11457
  <xsl:attribute-set name="termnote-p-style">
10959
11458
  </xsl:attribute-set>
10960
11459
 
11460
+ <xsl:template name="refine_termnote-p-style">
11461
+ </xsl:template>
11462
+
10961
11463
  <!-- ====== -->
10962
11464
  <!-- note -->
10963
11465
  <!-- termnote -->
@@ -11018,11 +11520,13 @@
11018
11520
  <xsl:choose>
11019
11521
  <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
11020
11522
  <fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
11523
+ <xsl:call-template name="refine_note-p-style"/>
11021
11524
  <xsl:apply-templates/>
11022
11525
  </fo:inline>
11023
11526
  </xsl:when>
11024
11527
  <xsl:otherwise>
11025
11528
  <fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
11529
+ <xsl:call-template name="refine_note-p-style"/>
11026
11530
  <xsl:apply-templates/>
11027
11531
  </fo:block>
11028
11532
  </xsl:otherwise>
@@ -11114,11 +11618,13 @@
11114
11618
  <xsl:choose>
11115
11619
  <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
11116
11620
  <fo:inline xsl:use-attribute-sets="termnote-p-style">
11621
+ <xsl:call-template name="refine_termnote-p-style"/>
11117
11622
  <xsl:apply-templates/>
11118
11623
  </fo:inline>
11119
11624
  </xsl:when>
11120
11625
  <xsl:otherwise>
11121
11626
  <fo:block xsl:use-attribute-sets="termnote-p-style">
11627
+ <xsl:call-template name="refine_termnote-p-style"/>
11122
11628
  <xsl:apply-templates/>
11123
11629
  </fo:block>
11124
11630
  </xsl:otherwise>
@@ -11131,7 +11637,7 @@
11131
11637
  <xsl:attribute-set name="quote-style">
11132
11638
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
11133
11639
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
11134
- </xsl:attribute-set>
11640
+ </xsl:attribute-set> <!-- quote-style -->
11135
11641
 
11136
11642
  <xsl:template name="refine_quote-style">
11137
11643
  </xsl:template>
@@ -11140,6 +11646,9 @@
11140
11646
  <xsl:attribute name="text-align">right</xsl:attribute>
11141
11647
  </xsl:attribute-set>
11142
11648
 
11649
+ <xsl:template name="refine_quote-source-style">
11650
+ </xsl:template>
11651
+
11143
11652
  <!-- ====== -->
11144
11653
  <!-- quote -->
11145
11654
  <!-- source -->
@@ -11168,6 +11677,7 @@
11168
11677
  </fo:block-container>
11169
11678
  <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
11170
11679
  <fo:block xsl:use-attribute-sets="quote-source-style">
11680
+ <xsl:call-template name="refine_quote-source-style"/>
11171
11681
  <!-- — ISO, ISO 7301:2011, Clause 1 -->
11172
11682
  <xsl:apply-templates select="mn:author"/>
11173
11683
  <xsl:apply-templates select="mn:fmt-source"/>
@@ -11230,6 +11740,9 @@
11230
11740
  <xsl:attribute-set name="figure-style">
11231
11741
  </xsl:attribute-set>
11232
11742
 
11743
+ <xsl:template name="refine_figure-style">
11744
+ </xsl:template>
11745
+
11233
11746
  <xsl:attribute-set name="figure-name-style">
11234
11747
  <xsl:attribute name="role">Caption</xsl:attribute>
11235
11748
  <xsl:attribute name="font-family">Arial</xsl:attribute>
@@ -11238,7 +11751,7 @@
11238
11751
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
11239
11752
  <xsl:attribute name="space-after">6pt</xsl:attribute>
11240
11753
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
11241
- </xsl:attribute-set>
11754
+ </xsl:attribute-set> <!-- figure-name-style -->
11242
11755
 
11243
11756
  <xsl:template name="refine_figure-name-style">
11244
11757
  <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
@@ -11250,7 +11763,7 @@
11250
11763
  <xsl:attribute-set name="image-style">
11251
11764
  <xsl:attribute name="role">SKIP</xsl:attribute>
11252
11765
  <xsl:attribute name="text-align">center</xsl:attribute>
11253
- </xsl:attribute-set>
11766
+ </xsl:attribute-set> <!-- image-style -->
11254
11767
 
11255
11768
  <xsl:template name="refine_image-style">
11256
11769
  </xsl:template>
@@ -11260,14 +11773,51 @@
11260
11773
  <xsl:attribute name="content-height">100%</xsl:attribute>
11261
11774
  <xsl:attribute name="scaling">uniform</xsl:attribute>
11262
11775
  <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
11263
- </xsl:attribute-set>
11776
+ </xsl:attribute-set> <!-- image-graphic-style -->
11777
+
11778
+ <xsl:template name="refine_image-graphic-style">
11779
+ </xsl:template>
11264
11780
 
11265
11781
  <xsl:attribute-set name="figure-source-style">
11266
11782
  </xsl:attribute-set>
11267
11783
 
11784
+ <xsl:template name="refine_figure-source-style">
11785
+ </xsl:template>
11786
+
11268
11787
  <xsl:attribute-set name="figure-pseudocode-p-style">
11269
11788
  </xsl:attribute-set>
11270
11789
 
11790
+ <xsl:template name="refine_figure-pseudocode-p-style">
11791
+ </xsl:template>
11792
+
11793
+ <xsl:attribute-set name="figure-fn-number-style">
11794
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
11795
+ </xsl:attribute-set> <!-- figure-fn-number-style -->
11796
+
11797
+ <xsl:template name="refine_figure-fn-number-style">
11798
+ </xsl:template>
11799
+
11800
+ <xsl:attribute-set name="figure-fmt-fn-label-style">
11801
+ <xsl:attribute name="font-size">80%</xsl:attribute>
11802
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
11803
+ </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
11804
+
11805
+ <xsl:template name="refine_figure-fmt-fn-label-style">
11806
+ </xsl:template>
11807
+
11808
+ <xsl:attribute-set name="figure-fn-body-style">
11809
+ <xsl:attribute name="text-align">justify</xsl:attribute>
11810
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11811
+ </xsl:attribute-set>
11812
+
11813
+ <xsl:template name="refine_figure-fn-body-style">
11814
+ <xsl:variable name="key_iso">
11815
+ </xsl:variable>
11816
+ <xsl:if test="normalize-space($key_iso) = 'true'">
11817
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
11818
+ </xsl:if>
11819
+ </xsl:template>
11820
+
11271
11821
  <!-- ============================ -->
11272
11822
  <!-- figure's footnotes rendering -->
11273
11823
  <!-- ============================ -->
@@ -11380,9 +11930,8 @@
11380
11930
  </fo:table-cell>
11381
11931
  <fo:table-cell>
11382
11932
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
11383
- <xsl:if test="normalize-space($key_iso) = 'true'">
11384
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
11385
- </xsl:if>
11933
+ <xsl:call-template name="refine_figure-fn-body-style"/>
11934
+
11386
11935
  <!-- <xsl:copy-of select="./node()"/> -->
11387
11936
  <xsl:apply-templates/>
11388
11937
  </fo:block>
@@ -11400,6 +11949,7 @@
11400
11949
  <xsl:param name="process">false</xsl:param>
11401
11950
  <xsl:if test="$process = 'true'">
11402
11951
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
11952
+ <xsl:call-template name="refine_figure-fn-number-style"/>
11403
11953
  <xsl:attribute name="padding-right">0mm</xsl:attribute>
11404
11954
 
11405
11955
  <!-- tab is padding-right -->
@@ -11437,6 +11987,7 @@
11437
11987
  <xsl:attribute name="font-size">10pt</xsl:attribute>
11438
11988
  </xsl:if>
11439
11989
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
11990
+ <xsl:call-template name="refine_figure-fn-number-style"/>
11440
11991
  <!-- <xsl:value-of select="@reference"/> -->
11441
11992
  <xsl:apply-templates/>
11442
11993
  </fo:inline>
@@ -11482,6 +12033,8 @@
11482
12033
 
11483
12034
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
11484
12035
 
12036
+ <xsl:call-template name="refine_figure-style"/>
12037
+
11485
12038
  <xsl:for-each select="mn:fmt-name"> <!-- set context -->
11486
12039
  <xsl:call-template name="setIDforNamedDestination"/>
11487
12040
  </xsl:for-each>
@@ -11525,6 +12078,7 @@
11525
12078
 
11526
12079
  <xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
11527
12080
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
12081
+ <xsl:call-template name="refine_figure-pseudocode-p-style"/>
11528
12082
  <xsl:apply-templates/>
11529
12083
  </fo:block>
11530
12084
  </xsl:template>
@@ -11654,6 +12208,8 @@
11654
12208
  </xsl:variable>
11655
12209
  <xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
11656
12210
 
12211
+ <xsl:call-template name="refine_image-graphic-style"/>
12212
+
11657
12213
  <xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
11658
12214
  <xsl:variable name="scale">
11659
12215
  <xsl:call-template name="getImageScale">
@@ -12353,6 +12909,9 @@
12353
12909
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
12354
12910
  </xsl:attribute-set> <!-- formula-style -->
12355
12911
 
12912
+ <xsl:template name="refine_formula-style">
12913
+ </xsl:template>
12914
+
12356
12915
  <xsl:attribute-set name="formula-stem-block-style">
12357
12916
  <xsl:attribute name="text-align">center</xsl:attribute>
12358
12917
  <xsl:attribute name="text-align">left</xsl:attribute>
@@ -12423,6 +12982,8 @@
12423
12982
  <xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
12424
12983
  <fo:block xsl:use-attribute-sets="formula-style">
12425
12984
 
12985
+ <xsl:call-template name="refine_formula-style"/>
12986
+
12426
12987
  <fo:table table-layout="fixed" width="100%">
12427
12988
  <fo:table-column column-width="95%"/>
12428
12989
  <fo:table-column column-width="5%"/>
@@ -12832,11 +13393,33 @@
12832
13393
  <!-- ======================================= -->
12833
13394
 
12834
13395
  <xsl:attribute-set name="list-style">
12835
- <xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
13396
+ <xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
12836
13397
  <xsl:attribute name="margin-top">8pt</xsl:attribute>
12837
13398
  </xsl:attribute-set> <!-- list-style -->
12838
13399
 
12839
13400
  <xsl:template name="refine_list-style">
13401
+ <xsl:if test="parent::mn:admonition[@type = 'commentary']">
13402
+ <xsl:attribute name="margin-left">7mm</xsl:attribute>
13403
+ </xsl:if>
13404
+ <xsl:if test="preceding-sibling::*[1][self::mn:p]">
13405
+ <!-- <xsl:attribute name="margin-top">6pt</xsl:attribute> -->
13406
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
13407
+ </xsl:if>
13408
+
13409
+ <xsl:if test="ancestor::mn:note or ancestor::mn:termnote">
13410
+ <xsl:attribute name="provisional-distance-between-starts">4mm</xsl:attribute>
13411
+ </xsl:if>
13412
+
13413
+ <xsl:variable name="processing_instruction_type" select="normalize-space(preceding-sibling::*[1]/processing-instruction('list-type'))"/>
13414
+ <xsl:if test="self::mn:ul and normalize-space($processing_instruction_type) = 'simple'">
13415
+ <xsl:attribute name="provisional-distance-between-starts">0mm</xsl:attribute>
13416
+ </xsl:if>
13417
+
13418
+ <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
13419
+ <xsl:attribute name="line-height">1.3</xsl:attribute>
13420
+ <xsl:attribute name="margin-left">6.2mm</xsl:attribute>
13421
+ <xsl:attribute name="provisional-distance-between-starts">6.5mm</xsl:attribute>
13422
+ </xsl:if>
12840
13423
  </xsl:template> <!-- refine_list-style -->
12841
13424
 
12842
13425
  <xsl:attribute-set name="list-name-style">
@@ -12845,6 +13428,9 @@
12845
13428
  <xsl:attribute name="font-weight">bold</xsl:attribute>
12846
13429
  </xsl:attribute-set> <!-- list-name-style -->
12847
13430
 
13431
+ <xsl:template name="refine_list-name-style">
13432
+ </xsl:template>
13433
+
12848
13434
  <xsl:attribute-set name="list-item-style">
12849
13435
  </xsl:attribute-set>
12850
13436
 
@@ -13080,11 +13666,16 @@
13080
13666
  </fo:block-container>
13081
13667
  </xsl:when>
13082
13668
  <xsl:otherwise>
13083
- <fo:block role="SKIP">
13084
- <xsl:apply-templates select="." mode="list">
13085
- <xsl:with-param name="indent" select="$indent"/>
13086
- </xsl:apply-templates>
13087
- </fo:block>
13669
+ <fo:block-container margin-left="4mm">
13670
+ <fo:block-container margin-left="0mm">
13671
+ <fo:block role="SKIP">
13672
+ <xsl:apply-templates select="." mode="list">
13673
+ <xsl:with-param name="indent" select="$indent"/>
13674
+ </xsl:apply-templates>
13675
+ </fo:block>
13676
+ </fo:block-container>
13677
+ </fo:block-container>
13678
+
13088
13679
  </xsl:otherwise>
13089
13680
  </xsl:choose>
13090
13681
  </xsl:template>
@@ -13159,6 +13750,7 @@
13159
13750
  <xsl:param name="process">false</xsl:param>
13160
13751
  <xsl:if test="$process = 'true'">
13161
13752
  <fo:block xsl:use-attribute-sets="list-name-style">
13753
+ <xsl:call-template name="refine_list-name-style"/>
13162
13754
  <xsl:apply-templates/>
13163
13755
  </fo:block>
13164
13756
  </xsl:if>
@@ -13219,26 +13811,54 @@
13219
13811
  <!-- END Lists processing -->
13220
13812
  <!-- ===================================== -->
13221
13813
 
13814
+ <xsl:attribute-set name="footnote-separator-leader-style">
13815
+ <xsl:attribute name="leader-pattern">rule</xsl:attribute>
13816
+ <xsl:attribute name="rule-thickness">0.5pt</xsl:attribute>
13817
+ <xsl:attribute name="leader-length">35%</xsl:attribute>
13818
+ </xsl:attribute-set>
13819
+
13820
+ <xsl:template name="refine_footnote-separator-leader-style">
13821
+ <xsl:if test="$current_template = 'whitepaper' or $current_template= 'icap-whitepaper' or $current_template = 'industry-connection-report'">
13822
+ <xsl:attribute name="rule-thickness">1pt</xsl:attribute>
13823
+ <xsl:attribute name="leader-length">51mm</xsl:attribute>
13824
+ </xsl:if>
13825
+ </xsl:template>
13826
+
13827
+ <xsl:attribute-set name="fn-container-body-style">
13828
+ <xsl:attribute name="text-indent">0</xsl:attribute>
13829
+ <xsl:attribute name="start-indent">0</xsl:attribute>
13830
+ </xsl:attribute-set>
13831
+
13832
+ <xsl:template name="refine_fn-container-body-style">
13833
+ </xsl:template>
13834
+
13222
13835
  <xsl:attribute-set name="fn-reference-style">
13223
13836
  <xsl:attribute name="font-size">80%</xsl:attribute>
13224
13837
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
13225
13838
  <xsl:attribute name="font-size">65%</xsl:attribute>
13226
13839
  <xsl:attribute name="vertical-align">super</xsl:attribute>
13227
-
13228
- </xsl:attribute-set>
13840
+ </xsl:attribute-set> <!-- fn-reference-style -->
13229
13841
 
13230
13842
  <xsl:template name="refine_fn-reference-style">
13843
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
13844
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
13231
13845
  </xsl:template> <!-- refine_fn-reference-style -->
13232
13846
 
13233
13847
  <xsl:attribute-set name="fn-style">
13234
13848
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
13235
13849
  </xsl:attribute-set>
13236
13850
 
13851
+ <xsl:template name="refine_fn-style">
13852
+ </xsl:template>
13853
+
13237
13854
  <xsl:attribute-set name="fn-num-style">
13238
13855
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
13239
13856
  <xsl:attribute name="font-size">65%</xsl:attribute>
13240
13857
  <xsl:attribute name="vertical-align">super</xsl:attribute>
13241
- </xsl:attribute-set>
13858
+ </xsl:attribute-set> <!-- fn-num-style -->
13859
+
13860
+ <xsl:template name="refine_fn-num-style">
13861
+ </xsl:template>
13242
13862
 
13243
13863
  <xsl:attribute-set name="fn-body-style">
13244
13864
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -13247,7 +13867,7 @@
13247
13867
  <xsl:attribute name="start-indent">0</xsl:attribute>
13248
13868
  <xsl:attribute name="font-size">8pt</xsl:attribute>
13249
13869
  <!-- <xsl:attribute name="margin-bottom">5pt</xsl:attribute> -->
13250
- </xsl:attribute-set>
13870
+ </xsl:attribute-set> <!-- fn-body-style" -->
13251
13871
 
13252
13872
  <xsl:template name="refine_fn-body-style">
13253
13873
  <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
@@ -13319,10 +13939,12 @@
13319
13939
  <xsl:choose>
13320
13940
  <xsl:when test="ancestor::mn:bibitem">
13321
13941
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
13942
+ <xsl:call-template name="refine_bibitem-note-fn-style"/>
13322
13943
  </fn_styles>
13323
13944
  </xsl:when>
13324
13945
  <xsl:otherwise>
13325
13946
  <fn_styles xsl:use-attribute-sets="fn-num-style">
13947
+ <xsl:call-template name="refine_fn-num-style"/>
13326
13948
  </fn_styles>
13327
13949
  </xsl:otherwise>
13328
13950
  </xsl:choose>
@@ -13332,9 +13954,12 @@
13332
13954
  <xsl:copy-of select="."/>
13333
13955
  </xsl:for-each>
13334
13956
 
13335
- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
13957
+ <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
13958
+ <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
13336
13959
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
13337
- </xsl:if>
13960
+ </xsl:if> -->
13961
+
13962
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
13338
13963
 
13339
13964
  <xsl:call-template name="insert_basic_link">
13340
13965
  <xsl:with-param name="element">
@@ -13357,10 +13982,12 @@
13357
13982
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
13358
13983
 
13359
13984
  <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
13985
+ <xsl:call-template name="refine_fn-style"/>
13360
13986
  <xsl:copy-of select="$footnote_inline"/>
13361
13987
  <fo:footnote-body role="Note">
13362
13988
 
13363
13989
  <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
13990
+ <xsl:call-template name="refine_fn-container-body-style"/>
13364
13991
 
13365
13992
  <xsl:variable name="fn_block">
13366
13993
  <xsl:call-template name="refine_fn-body-style"/>
@@ -13461,6 +14088,9 @@
13461
14088
  <xsl:attribute name="space-after">12pt</xsl:attribute>
13462
14089
  </xsl:attribute-set> <!-- admonition-style -->
13463
14090
 
14091
+ <xsl:template name="refine_admonition-style">
14092
+ </xsl:template>
14093
+
13464
14094
  <xsl:attribute-set name="admonition-container-style">
13465
14095
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
13466
14096
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -13468,13 +14098,23 @@
13468
14098
  <xsl:attribute name="padding-bottom">2mm</xsl:attribute>
13469
14099
  </xsl:attribute-set> <!-- admonition-container-style -->
13470
14100
 
14101
+ <xsl:template name="refine_admonition-container-style">
14102
+ </xsl:template>
14103
+
13471
14104
  <xsl:attribute-set name="admonition-name-style">
13472
14105
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
13473
14106
  </xsl:attribute-set> <!-- admonition-name-style -->
13474
14107
 
14108
+ <xsl:template name="refine_admonition-name-style">
14109
+ </xsl:template>
14110
+
13475
14111
  <xsl:attribute-set name="admonition-p-style">
13476
14112
  <xsl:attribute name="text-align">justify</xsl:attribute>
13477
14113
  </xsl:attribute-set> <!-- admonition-p-style -->
14114
+
14115
+ <xsl:template name="refine_admonition-p-style">
14116
+ </xsl:template>
14117
+
13478
14118
  <!-- end admonition -->
13479
14119
 
13480
14120
  <!-- ================ -->
@@ -13484,6 +14124,8 @@
13484
14124
  <xsl:call-template name="setNamedDestination"/>
13485
14125
  <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
13486
14126
 
14127
+ <xsl:call-template name="refine_admonition-style"/>
14128
+
13487
14129
  <xsl:call-template name="setBlockSpanAll"/>
13488
14130
  <xsl:if test="@type = 'editorial'">
13489
14131
  <xsl:attribute name="border">none</xsl:attribute>
@@ -13500,6 +14142,8 @@
13500
14142
  <xsl:attribute name="text-align">left</xsl:attribute>
13501
14143
  </xsl:if>
13502
14144
  <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
14145
+
14146
+ <xsl:call-template name="refine_admonition-container-style"/>
13503
14147
  <xsl:if test="@type = 'editorial' or not(@type)">
13504
14148
  <xsl:attribute name="padding">0mm</xsl:attribute>
13505
14149
  </xsl:if>
@@ -13509,6 +14153,7 @@
13509
14153
  </xsl:if>
13510
14154
  <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
13511
14155
  <fo:block xsl:use-attribute-sets="admonition-p-style">
14156
+ <xsl:call-template name="refine_admonition-p-style"/>
13512
14157
  <fo:inline>
13513
14158
  <xsl:call-template name="displayAdmonitionName">
13514
14159
  <xsl:with-param name="sep">: </xsl:with-param>
@@ -13573,6 +14218,7 @@
13573
14218
  </xsl:when>
13574
14219
  <xsl:otherwise>
13575
14220
  <fo:block xsl:use-attribute-sets="admonition-p-style">
14221
+ <xsl:call-template name="refine_admonition-p-style"/>
13576
14222
  <xsl:apply-templates/>
13577
14223
  </fo:block>
13578
14224
  </xsl:otherwise>
@@ -13584,21 +14230,43 @@
13584
14230
  <!-- END Admonition -->
13585
14231
  <!-- ================ -->
13586
14232
 
14233
+ <xsl:attribute-set name="references-non-normative-title-style">
14234
+ <xsl:attribute name="font-size">16pt</xsl:attribute>
14235
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
14236
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
14237
+ <xsl:attribute name="margin-bottom">36pt</xsl:attribute>
14238
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
14239
+ <xsl:attribute name="role">H1</xsl:attribute>
14240
+ </xsl:attribute-set>
14241
+
14242
+ <xsl:template name="refine_references-non-normative-title-style">
14243
+
14244
+ </xsl:template>
14245
+
13587
14246
  <!-- bibitem in Normative References (references/@normative="true") -->
13588
14247
  <xsl:attribute-set name="bibitem-normative-style">
13589
14248
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
13590
14249
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13591
14250
  </xsl:attribute-set> <!-- bibitem-normative-style -->
13592
14251
 
14252
+ <xsl:template name="refine_bibitem-normative-style">
14253
+ </xsl:template>
14254
+
13593
14255
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
13594
14256
  <xsl:attribute-set name="bibitem-normative-list-style">
13595
14257
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
13596
14258
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13597
14259
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
13598
14260
 
14261
+ <xsl:template name="refine_bibitem-normative-list-style">
14262
+ </xsl:template>
14263
+
13599
14264
  <xsl:attribute-set name="bibitem-non-normative-style">
13600
14265
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
13601
14266
 
14267
+ <xsl:template name="refine_bibitem-non-normative-style">
14268
+ </xsl:template>
14269
+
13602
14270
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
13603
14271
  <xsl:attribute-set name="bibitem-non-normative-list-style">
13604
14272
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
@@ -13607,20 +14275,40 @@
13607
14275
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
13608
14276
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
13609
14277
 
14278
+ <xsl:template name="refine_bibitem-non-normative-list-style">
14279
+ <xsl:variable name="bibitem_label">
14280
+ <xsl:apply-templates select="mn:biblio-tag">
14281
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
14282
+ </xsl:apply-templates>
14283
+ </xsl:variable>
14284
+ <xsl:if test="string-length(normalize-space($bibitem_label)) &gt; 5">
14285
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
14286
+ </xsl:if>
14287
+ </xsl:template>
14288
+
13610
14289
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
13611
14290
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13612
14291
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
13613
14292
  </xsl:attribute-set>
13614
14293
 
14294
+ <xsl:template name="refine_bibitem-non-normative-list-item-style">
14295
+ </xsl:template>
14296
+
13615
14297
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
13616
14298
  <xsl:attribute-set name="bibitem-normative-list-body-style">
13617
14299
  <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
13618
14300
  </xsl:attribute-set>
13619
14301
 
14302
+ <xsl:template name="refine_bibitem-normative-list-body-style">
14303
+ </xsl:template>
14304
+
13620
14305
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
13621
14306
  <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
13622
14307
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
13623
14308
 
14309
+ <xsl:template name="refine_bibitem-non-normative-list-body-style">
14310
+ </xsl:template>
14311
+
13624
14312
  <!-- footnote reference number for bibitem, in the text -->
13625
14313
  <xsl:attribute-set name="bibitem-note-fn-style">
13626
14314
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
@@ -13629,6 +14317,9 @@
13629
14317
  <xsl:attribute name="baseline-shift">30%</xsl:attribute>
13630
14318
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
13631
14319
 
14320
+ <xsl:template name="refine_bibitem-note-fn-style">
14321
+ </xsl:template>
14322
+
13632
14323
  <!-- footnote number on the page bottom -->
13633
14324
  <xsl:attribute-set name="bibitem-note-fn-number-style">
13634
14325
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
@@ -13648,6 +14339,9 @@
13648
14339
  <xsl:attribute-set name="references-non-normative-style">
13649
14340
  </xsl:attribute-set> <!-- references-non-normative-style -->
13650
14341
 
14342
+ <xsl:template name="refine_references-non-normative-style">
14343
+ </xsl:template>
14344
+
13651
14345
  <!-- ======================= -->
13652
14346
  <!-- Bibliography rendering -->
13653
14347
  <!-- ======================= -->
@@ -13688,6 +14382,7 @@
13688
14382
  <xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
13689
14383
 
13690
14384
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
14385
+ <xsl:call-template name="refine_references-non-normative-style"/>
13691
14386
  <xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
13692
14387
  </fo:block>
13693
14388
  </xsl:template> <!-- references -->
@@ -13701,26 +14396,22 @@
13701
14396
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
13702
14397
  <xsl:call-template name="setNamedDestination"/>
13703
14398
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
14399
+ <xsl:call-template name="refine_bibitem-normative-style"/>
14400
+
13704
14401
  <xsl:call-template name="processBibitem"/>
13705
14402
  </fo:block>
13706
14403
 
13707
14404
  </xsl:template> <!-- bibitem -->
13708
14405
 
13709
14406
  <!-- Bibliography (non-normative references) -->
13710
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
14407
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
13711
14408
  <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
13712
14409
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
13713
14410
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
13714
14411
  <xsl:call-template name="setNamedDestination"/>
13715
14412
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
13716
- <xsl:variable name="bibitem_label">
13717
- <xsl:apply-templates select="mn:biblio-tag">
13718
- <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
13719
- </xsl:apply-templates>
13720
- </xsl:variable>
13721
- <xsl:if test="string-length(normalize-space($bibitem_label)) &gt; 5">
13722
- <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
13723
- </xsl:if>
14413
+ <xsl:call-template name="refine_bibitem-non-normative-list-style"/>
14414
+
13724
14415
  <fo:list-item>
13725
14416
  <fo:list-item-label end-indent="label-end()">
13726
14417
  <fo:block role="SKIP">
@@ -13736,6 +14427,7 @@
13736
14427
  </fo:list-item-label>
13737
14428
  <fo:list-item-body start-indent="body-start()">
13738
14429
  <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
14430
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
13739
14431
  <xsl:call-template name="processBibitem">
13740
14432
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
13741
14433
  </xsl:call-template>
@@ -13746,12 +14438,17 @@
13746
14438
 
13747
14439
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
13748
14440
 
14441
+ <!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
14442
+ <xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
14443
+
13749
14444
  <xsl:template name="insertListItem_Bibitem">
13750
14445
  <xsl:choose>
13751
14446
  <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
13752
14447
  <xsl:otherwise>
13753
14448
  <xsl:call-template name="setNamedDestination"/>
13754
14449
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
14450
+ <xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
14451
+
13755
14452
  <fo:list-item-label end-indent="label-end()">
13756
14453
  <fo:block role="SKIP">
13757
14454
  <fo:inline role="SKIP">
@@ -13762,16 +14459,18 @@
13762
14459
  </fo:block>
13763
14460
  </fo:list-item-label>
13764
14461
  <fo:list-item-body start-indent="body-start()">
13765
- <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
14462
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
14463
+ <xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
13766
14464
  <xsl:call-template name="processBibitem">
13767
14465
  <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
13768
14466
  </xsl:call-template>
13769
14467
  </fo:block>
14468
+ <xsl:call-template name="processBibitemFollowingNotes"/>
13770
14469
  </fo:list-item-body>
13771
14470
  </fo:list-item>
13772
14471
  </xsl:otherwise>
13773
14472
  </xsl:choose>
13774
- <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
14473
+ <xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
13775
14474
  <xsl:with-param name="skip">false</xsl:with-param>
13776
14475
  </xsl:apply-templates>
13777
14476
  </xsl:template>
@@ -13787,25 +14486,16 @@
13787
14486
  <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
13788
14487
  </xsl:apply-templates>
13789
14488
  <xsl:apply-templates select="mn:formattedref"/>
14489
+ <xsl:call-template name="processBibitemFollowingNotes"/>
13790
14490
  <!-- end bibitem processing -->
13791
-
13792
- <xsl:call-template name="processBibliographyNote"/>
13793
14491
  </xsl:template> <!-- processBibitem (bibitem) -->
13794
14492
 
13795
- <xsl:template name="processBibliographyNote">
13796
- <xsl:if test="self::mn:note">
13797
- <xsl:variable name="note_node">
13798
- <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
13799
- <xsl:copy> <!-- skip @id -->
13800
- <xsl:copy-of select="node()"/>
13801
- </xsl:copy>
13802
- </xsl:element>
13803
- </xsl:variable>
13804
- <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
13805
- <xsl:call-template name="note"/>
13806
- </xsl:for-each> -->
14493
+ <xsl:template name="processBibitemFollowingNotes">
14494
+ <!-- current context is bibitem element -->
14495
+ <xsl:variable name="bibitem_id" select="@id"/>
14496
+ <xsl:for-each select="following-sibling::mn:note[preceding-sibling::mn:bibitem[1][@id = $bibitem_id] and preceding-sibling::*[1][self::mn:note or self::mn:bibitem]]">
13807
14497
  <xsl:call-template name="note"/>
13808
- </xsl:if>
14498
+ </xsl:for-each>
13809
14499
  </xsl:template>
13810
14500
 
13811
14501
  <xsl:template match="mn:title" mode="title">
@@ -14005,11 +14695,17 @@
14005
14695
  <!-- Index section styles -->
14006
14696
  <xsl:attribute-set name="indexsect-title-style">
14007
14697
  <xsl:attribute name="role">H1</xsl:attribute>
14008
- </xsl:attribute-set>
14698
+ </xsl:attribute-set> <!-- indexsect-title-style -->
14699
+
14700
+ <xsl:template name="refine_indexsect-title-style">
14701
+ </xsl:template>
14009
14702
 
14010
14703
  <xsl:attribute-set name="indexsect-clause-title-style">
14011
14704
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
14012
- </xsl:attribute-set>
14705
+ </xsl:attribute-set> <!-- indexsect-clause-title-style -->
14706
+
14707
+ <xsl:template name="refine_indexsect-clause-title-style">
14708
+ </xsl:template>
14013
14709
  <!-- End Index section styles -->
14014
14710
 
14015
14711
  <!-- =================== -->
@@ -14203,6 +14899,7 @@
14203
14899
 
14204
14900
  <xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
14205
14901
  <fo:block xsl:use-attribute-sets="indexsect-title-style">
14902
+ <xsl:call-template name="refine_indexsect-title-style"/>
14206
14903
  <!-- Index -->
14207
14904
  <xsl:apply-templates/>
14208
14905
  </fo:block>
@@ -14211,6 +14908,7 @@
14211
14908
  <xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
14212
14909
  <!-- Letter A, B, C, ... -->
14213
14910
  <fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
14911
+ <xsl:call-template name="refine_indexsect-clause-title-style"/>
14214
14912
  <xsl:apply-templates/>
14215
14913
  </fo:block>
14216
14914
  </xsl:template>
@@ -14253,13 +14951,31 @@
14253
14951
  <!-- skip here, see the template 'fmt-review-start' -->
14254
14952
  </xsl:when>
14255
14953
  <xsl:otherwise>
14256
- <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
14257
- <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>
14258
- <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
14259
- <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
14954
+ <xsl:choose>
14955
+ <xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
14956
+ <fo:block font-size="1pt" line-height="0.1">
14957
+ <xsl:call-template name="fo_inline_bookmark">
14958
+ <xsl:with-param name="bookmark_id" select="$bookmark_id"/>
14959
+ </xsl:call-template>
14960
+ </fo:block>
14961
+ </xsl:when>
14962
+ <xsl:otherwise>
14963
+ <xsl:call-template name="fo_inline_bookmark">
14964
+ <xsl:with-param name="bookmark_id" select="$bookmark_id"/>
14965
+ </xsl:call-template>
14966
+ </xsl:otherwise>
14967
+ </xsl:choose>
14260
14968
  </xsl:otherwise>
14261
14969
  </xsl:choose>
14262
14970
  </xsl:template>
14971
+
14972
+ <xsl:template name="fo_inline_bookmark">
14973
+ <xsl:param name="bookmark_id"/>
14974
+ <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
14975
+ <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>
14976
+ <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
14977
+ <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
14978
+ </xsl:template>
14263
14979
  <!-- =================== -->
14264
14980
  <!-- End of Index processing -->
14265
14981
  <!-- =================== -->
@@ -14396,9 +15112,15 @@
14396
15112
  <xsl:attribute name="leader-pattern">dots</xsl:attribute>
14397
15113
  </xsl:attribute-set> <!-- END: toc-leader-style -->
14398
15114
 
15115
+ <xsl:template name="refine_toc-leader-style">
15116
+ </xsl:template>
15117
+
14399
15118
  <xsl:attribute-set name="toc-pagenumber-style">
14400
15119
  </xsl:attribute-set>
14401
15120
 
15121
+ <xsl:template name="refine_toc-pagenumber-style">
15122
+ </xsl:template>
15123
+
14402
15124
  <!-- List of Figures, Tables -->
14403
15125
  <xsl:attribute-set name="toc-listof-title-style">
14404
15126
  <xsl:attribute name="role">TOCI</xsl:attribute>
@@ -14418,6 +15140,9 @@
14418
15140
  <xsl:attribute-set name="toc-listof-item-block-style">
14419
15141
  </xsl:attribute-set>
14420
15142
 
15143
+ <xsl:template name="refine_toc-listof-item-block-style">
15144
+ </xsl:template>
15145
+
14421
15146
  <xsl:attribute-set name="toc-listof-item-style">
14422
15147
  <xsl:attribute name="role">TOCI</xsl:attribute>
14423
15148
  <xsl:attribute name="provisional-distance-between-starts">22.5mm</xsl:attribute>
@@ -14426,6 +15151,9 @@
14426
15151
  <xsl:attribute name="margin-left">2mm</xsl:attribute>
14427
15152
  </xsl:attribute-set>
14428
15153
 
15154
+ <xsl:template name="refine_toc-listof-item-style">
15155
+ </xsl:template>
15156
+
14429
15157
  <xsl:template name="processPrefaceSectionsDefault_Contents">
14430
15158
  <xsl:variable name="nodes_preface_">
14431
15159
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -15537,23 +16265,55 @@
15537
16265
  <!-- Ruby text (CJK languages) rendering -->
15538
16266
  <!-- ===================================== -->
15539
16267
  <!-- ===================================== -->
16268
+
16269
+ <xsl:attribute-set name="ruby-style">
16270
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
16271
+ <xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
16272
+ </xsl:attribute-set>
16273
+
16274
+ <xsl:template name="refine_ruby-style">
16275
+ <xsl:if test="not(ancestor::mn:ruby)">
16276
+ <xsl:attribute name="alignment-baseline">central</xsl:attribute>
16277
+ </xsl:if>
16278
+ <xsl:variable name="rt_text" select="mn:rt"/>
16279
+ <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
16280
+ <!-- Example: width="2em" -->
16281
+ <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
16282
+ <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
16283
+ <xsl:variable name="text_width">
16284
+ <xsl:choose>
16285
+ <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
16286
+ <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
16287
+ </xsl:choose>
16288
+ </xsl:variable>
16289
+ <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
16290
+ </xsl:template> <!-- refine_ruby-style -->
16291
+
16292
+ <xsl:attribute-set name="rb-style">
16293
+ <xsl:attribute name="line-height">1em</xsl:attribute>
16294
+ <xsl:attribute name="text-align">center</xsl:attribute>
16295
+ </xsl:attribute-set>
16296
+
16297
+ <xsl:template name="refine_rb-style">
16298
+ </xsl:template>
16299
+
16300
+ <xsl:attribute-set name="rt-style">
16301
+ <xsl:attribute name="font-size">0.5em</xsl:attribute>
16302
+ <xsl:attribute name="text-align">center</xsl:attribute>
16303
+ <xsl:attribute name="line-height">1.2em</xsl:attribute>
16304
+ <xsl:attribute name="space-before">-1.4em</xsl:attribute>
16305
+ <xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
16306
+ </xsl:attribute-set>
16307
+
16308
+ <xsl:template name="refine_rt-style">
16309
+ <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
16310
+ <xsl:attribute name="space-before">0em</xsl:attribute>
16311
+ </xsl:if>
16312
+ </xsl:template>
16313
+
15540
16314
  <xsl:template match="mn:ruby">
15541
- <fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
15542
- <xsl:if test="not(ancestor::mn:ruby)">
15543
- <xsl:attribute name="alignment-baseline">central</xsl:attribute>
15544
- </xsl:if>
15545
- <xsl:variable name="rt_text" select="mn:rt"/>
15546
- <xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
15547
- <!-- Example: width="2em" -->
15548
- <xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
15549
- <xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
15550
- <xsl:variable name="text_width">
15551
- <xsl:choose>
15552
- <xsl:when test="$text_rt_width &gt;= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
15553
- <xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
15554
- </xsl:choose>
15555
- </xsl:variable>
15556
- <xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
16315
+ <fo:inline-container xsl:use-attribute-sets="ruby-style">
16316
+ <xsl:call-template name="refine_ruby-style"/>
15557
16317
 
15558
16318
  <xsl:choose>
15559
16319
  <xsl:when test="ancestor::mn:ruby">
@@ -15571,17 +16331,14 @@
15571
16331
  </xsl:template>
15572
16332
 
15573
16333
  <xsl:template match="mn:rb">
15574
- <fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
16334
+ <fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
15575
16335
  </xsl:template>
15576
16336
 
15577
16337
  <xsl:template match="mn:rt">
15578
- <fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
15579
- <xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
15580
- <xsl:attribute name="space-before">0em</xsl:attribute>
15581
- </xsl:if>
16338
+ <fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
16339
+ <xsl:call-template name="refine_rt-style"/>
15582
16340
  <xsl:apply-templates/>
15583
16341
  </fo:block>
15584
-
15585
16342
  </xsl:template>
15586
16343
 
15587
16344
  <!-- ===================================== -->
@@ -15590,6 +16347,27 @@
15590
16347
  <!-- ===================================== -->
15591
16348
  <!-- ===================================== -->
15592
16349
 
16350
+ <xsl:attribute-set name="annex-title-style">
16351
+ </xsl:attribute-set>
16352
+
16353
+ <xsl:template name="refine_annex-title-style">
16354
+ </xsl:template>
16355
+
16356
+ <xsl:attribute-set name="p-zzSTDTitle1-style">
16357
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
16358
+ <xsl:attribute name="font-size">23pt</xsl:attribute>
16359
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
16360
+ <xsl:attribute name="margin-top">84pt</xsl:attribute>
16361
+ <xsl:attribute name="margin-bottom">40pt</xsl:attribute>
16362
+ <xsl:attribute name="line-height">1.1</xsl:attribute>
16363
+ </xsl:attribute-set>
16364
+
16365
+ <xsl:template name="refine_p-zzSTDTitle1-style">
16366
+ <xsl:if test="(contains('amendment corrigendum erratum', $subdoctype) and $subdoctype != '') or $current_template = 'standard'">
16367
+ <xsl:attribute name="font-size">24pt</xsl:attribute>
16368
+ </xsl:if>
16369
+ </xsl:template>
16370
+
15593
16371
  <xsl:template name="processPrefaceSectionsDefault">
15594
16372
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
15595
16373
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -16145,11 +16923,35 @@
16145
16923
 
16146
16924
  <xsl:template match="mn:svgmap"/>
16147
16925
 
16926
+ <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
16927
+
16148
16928
  <!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
16149
16929
  <xsl:template match="*[local-name() = 'lang_none']">
16150
16930
  <fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
16151
16931
  </xsl:template>
16152
16932
 
16933
+ <xsl:template name="addTagElementT">
16934
+ <xsl:variable name="title_">
16935
+ <xsl:apply-templates select="mn:fmt-title"/>
16936
+ </xsl:variable>
16937
+ <xsl:variable name="title__">
16938
+ <xsl:for-each select="xalan:nodeset($title_)/*/node()">
16939
+ <xsl:choose>
16940
+ <xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
16941
+ <xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
16942
+ </xsl:choose>
16943
+ </xsl:for-each>
16944
+ </xsl:variable>
16945
+ <xsl:variable name="title" select="normalize-space($title__)"/>
16946
+ <xsl:if test="$title != ''">
16947
+ <xsl:attribute name="fox:title">
16948
+ <xsl:if test="ancestor::mn:sections">
16949
+ <xsl:text>Section </xsl:text>
16950
+ </xsl:if>
16951
+ <xsl:value-of select="$title"/></xsl:attribute>
16952
+ </xsl:if>
16953
+ </xsl:template>
16954
+
16153
16955
  <xsl:template name="replaceChar">
16154
16956
  <xsl:param name="text"/>
16155
16957
  <xsl:param name="replace"/>
@@ -16430,7 +17232,8 @@
16430
17232
  <xsl:for-each select="(//mn:metanorma)[1]/mn:bibdata">
16431
17233
  <rdf:Seq>
16432
17234
  <rdf:li>
16433
- <xsl:value-of select="mn:ext/mn:editorialgroup/mn:committee"/>
17235
+ <!-- <xsl:value-of select="mn:ext/mn:editorialgroup/mn:committee"/> -->
17236
+ <xsl:value-of select="mn:contributor[mn:role[@type = 'authorizer']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:name"/>
16434
17237
  </rdf:li>
16435
17238
  </rdf:Seq>
16436
17239
 
@@ -16915,6 +17718,13 @@
16915
17718
  <xsl:with-param name="default" select="$text_align_default"/>
16916
17719
  </xsl:call-template>
16917
17720
  <xsl:call-template name="setKeepAttributes"/>
17721
+ <xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
17722
+ <xsl:variable name="styles">
17723
+ <xsl:apply-templates select="*[1]"/>
17724
+ </xsl:variable>
17725
+ <!-- move attribute line-height from inline to block -->
17726
+ <xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
17727
+ </xsl:if>
16918
17728
  </xsl:template>
16919
17729
 
16920
17730
  <xsl:template name="setKeepAttributes">
@@ -16940,34 +17750,41 @@
16940
17750
  <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
16941
17751
  <fo:block>
16942
17752
  <xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
16943
- <xsl:choose>
16944
- <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
16945
- <fo:instream-foreign-object fox:alt-text="Image Front">
16946
- <xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
16947
- <xsl:call-template name="getSVG"/>
16948
- </fo:instream-foreign-object>
16949
- </xsl:when>
16950
- <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
16951
- <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
16952
- </xsl:when>
16953
- <xsl:otherwise> <!-- bitmap image -->
16954
- <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
16955
- <xsl:if test="$coverimage_src != ''">
16956
- <xsl:variable name="coverpage">
16957
- <xsl:call-template name="getImageURL">
16958
- <xsl:with-param name="src" select="$coverimage_src"/>
16959
- </xsl:call-template>
16960
- </xsl:variable>
16961
- <!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
16962
- <fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
16963
- </xsl:if>
16964
- </xsl:otherwise>
16965
- </xsl:choose>
17753
+
17754
+ <xsl:call-template name="insertPageImage"/>
17755
+
16966
17756
  </xsl:for-each>
16967
17757
  </fo:block>
16968
17758
  </fo:block-container>
16969
17759
  </xsl:template>
16970
17760
 
17761
+ <xsl:template name="insertPageImage">
17762
+ <xsl:param name="svg_content_height" select="$pageHeight"/>
17763
+ <xsl:param name="bitmap_width" select="$pageWidth"/>
17764
+ <xsl:choose>
17765
+ <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
17766
+ <fo:instream-foreign-object fox:alt-text="Image Front">
17767
+ <xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
17768
+ <xsl:call-template name="getSVG"/>
17769
+ </fo:instream-foreign-object>
17770
+ </xsl:when>
17771
+ <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
17772
+ <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
17773
+ </xsl:when>
17774
+ <xsl:otherwise> <!-- bitmap image -->
17775
+ <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
17776
+ <xsl:if test="$coverimage_src != ''">
17777
+ <xsl:variable name="coverpage">
17778
+ <xsl:call-template name="getImageURL">
17779
+ <xsl:with-param name="src" select="$coverimage_src"/>
17780
+ </xsl:call-template>
17781
+ </xsl:variable>
17782
+ <fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
17783
+ </xsl:if>
17784
+ </xsl:otherwise>
17785
+ </xsl:choose>
17786
+ </xsl:template>
17787
+
16971
17788
  <xsl:template name="getImageURL">
16972
17789
  <xsl:param name="src"/>
16973
17790
  <xsl:choose>
@@ -17395,6 +18212,14 @@
17395
18212
  </xsl:attribute>
17396
18213
  </xsl:template>
17397
18214
 
18215
+ <xsl:template name="getCharByCodePoint">
18216
+ <xsl:param name="codepoint"/>
18217
+ <xsl:param name="radix">16</xsl:param>
18218
+ <xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
18219
+ <xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
18220
+ <xsl:value-of select="java:java.lang.String.new($chars)"/>
18221
+ </xsl:template>
18222
+
17398
18223
  <xsl:template name="substring-after-last">
17399
18224
  <xsl:param name="value"/>
17400
18225
  <xsl:param name="delimiter"/>