metanorma-bipm 2.7.2 → 2.7.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.
- checksums.yaml +4 -4
- data/lib/isodoc/bipm/base_convert.rb +3 -28
- data/lib/isodoc/bipm/bipm.brochure.xsl +704 -190
- data/lib/isodoc/bipm/bipm.guide.xsl +704 -190
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +704 -190
- data/lib/isodoc/bipm/bipm.rapport.xsl +704 -190
- data/lib/isodoc/bipm/jcgm.standard.xsl +707 -199
- data/lib/isodoc/bipm/metadata.rb +23 -12
- data/lib/isodoc/bipm/presentation_footnotes.rb +5 -3
- data/lib/isodoc/bipm/presentation_xml_convert.rb +3 -2
- data/lib/isodoc/bipm/xref.rb +3 -2
- data/lib/metanorma/bipm/biblio-standoc.rng +0 -49
- data/lib/metanorma/bipm/biblio.rng +11 -1
- data/lib/metanorma/bipm/converter.rb +2 -2
- data/lib/metanorma/bipm/front.rb +35 -31
- data/lib/metanorma/bipm/isodoc.rng +24 -1
- data/lib/metanorma/bipm/relaton-bipm.rng +0 -45
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma.yml +3 -0
- metadata +2 -2
@@ -80,7 +80,13 @@
|
|
80
80
|
</xsl:call-template>
|
81
81
|
</xsl:variable>
|
82
82
|
|
83
|
-
<xsl:variable name="
|
83
|
+
<xsl:variable name="committee_acronym" select="(//mn:metanorma)[1]/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:identifier[not(@full)]"/>
|
84
|
+
|
85
|
+
<xsl:variable name="copyright_year" select="(//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from"/>
|
86
|
+
<!-- <xsl:variable name="copyrightText" select="concat('© ', (//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym, ' ', (//mn:metanorma)[1]/mn:bibdata/mn:copyright/mn:from, ' — ', $all_rights_reserved)"/> -->
|
87
|
+
<xsl:variable name="copyrightText" select="concat('© ', $committee_acronym, ' ', $copyright_year, ' — ', $all_rights_reserved)"/>
|
88
|
+
|
89
|
+
<xsl:variable name="docnumber" select="(//mn:metanorma)[1]/mn:bibdata/mn:docnumber"/>
|
84
90
|
|
85
91
|
<!-- Example:
|
86
92
|
<item level="1" id="Foreword" display="true">Foreword</item>
|
@@ -375,9 +381,10 @@
|
|
375
381
|
<!-- Example © JCGM 2009 -->
|
376
382
|
<fo:block font-size="11pt">
|
377
383
|
<fo:inline font-family="Times New Roman" font-size="12pt"><xsl:text>© </xsl:text></fo:inline>
|
378
|
-
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/>
|
384
|
+
<!-- <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/> -->
|
385
|
+
<xsl:value-of select="$committee_acronym"/>
|
379
386
|
<xsl:text> </xsl:text>
|
380
|
-
<xsl:value-of select="
|
387
|
+
<xsl:value-of select="$copyright_year"/>
|
381
388
|
</fo:block>
|
382
389
|
</fo:static-content>
|
383
390
|
<fo:flow flow-name="xsl-region-body">
|
@@ -385,11 +392,12 @@
|
|
385
392
|
<xsl:call-template name="insertDraftWatermark"/>
|
386
393
|
<fo:block-container font-weight="bold">
|
387
394
|
<fo:block font-size="16.5pt">
|
388
|
-
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/>
|
395
|
+
<!-- <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/> -->
|
396
|
+
<xsl:value-of select="$committee_acronym"/>
|
389
397
|
<xsl:text> </xsl:text>
|
390
|
-
<xsl:value-of select="
|
398
|
+
<xsl:value-of select="$docnumber"/>
|
391
399
|
<fo:inline font-weight="normal">:</fo:inline>
|
392
|
-
<xsl:value-of select="
|
400
|
+
<xsl:value-of select="$copyright_year"/>
|
393
401
|
</fo:block>
|
394
402
|
<fo:block font-size="13pt" font-weight="normal" space-after="19.5mm">
|
395
403
|
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:title[@type = 'title-provenance']"/>
|
@@ -435,12 +443,14 @@
|
|
435
443
|
<fo:table-body>
|
436
444
|
<fo:table-row>
|
437
445
|
<fo:table-cell>
|
438
|
-
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/></fo:block>
|
446
|
+
<!-- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/></fo:block> -->
|
447
|
+
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:name"/></fo:block>
|
439
448
|
</fo:table-cell>
|
440
449
|
<fo:table-cell line-height="140%">
|
441
|
-
<fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/></fo:block>
|
442
|
-
<fo:block><xsl:value-of select="
|
443
|
-
<fo:block><xsl:value-of select="
|
450
|
+
<!-- <fo:block><xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/></fo:block> -->
|
451
|
+
<fo:block><xsl:value-of select="$committee_acronym"/></fo:block>
|
452
|
+
<fo:block><xsl:value-of select="$docnumber"/></fo:block>
|
453
|
+
<fo:block><xsl:value-of select="$copyright_year"/></fo:block>
|
444
454
|
</fo:table-cell>
|
445
455
|
</fo:table-row>
|
446
456
|
</fo:table-body>
|
@@ -835,7 +845,7 @@
|
|
835
845
|
<xsl:apply-templates select="preceding-sibling::mn:term_name[1]" mode="presentation"/>
|
836
846
|
</fo:block>
|
837
847
|
<fo:block xsl:use-attribute-sets="preferred-term-style">
|
838
|
-
<xsl:call-template name="
|
848
|
+
<xsl:call-template name="refine_preferred-term-style"/>
|
839
849
|
<xsl:apply-templates/>
|
840
850
|
</fo:block>
|
841
851
|
</fo:block>
|
@@ -852,6 +862,7 @@
|
|
852
862
|
|
853
863
|
<xsl:template match="mn:domain[not(parent::mn:term)]" priority="2">
|
854
864
|
<fo:block xsl:use-attribute-sets="domain-style">
|
865
|
+
<xsl:call-template name="refine_domain-style"/>
|
855
866
|
<fo:inline>
|
856
867
|
<xsl:text><</xsl:text>
|
857
868
|
<xsl:apply-templates/>
|
@@ -1006,11 +1017,12 @@
|
|
1006
1017
|
</xsl:template>
|
1007
1018
|
|
1008
1019
|
<xsl:variable name="header_text">
|
1009
|
-
<xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"
|
1020
|
+
<!-- <xsl:value-of select="(//mn:metanorma)[1]/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee/@acronym"/>-->
|
1021
|
+
<xsl:value-of select="$committee_acronym"/>
|
1010
1022
|
<xsl:text> </xsl:text>
|
1011
|
-
<xsl:value-of select="
|
1023
|
+
<xsl:value-of select="$docnumber"/>
|
1012
1024
|
<xsl:text>:</xsl:text>
|
1013
|
-
<xsl:value-of select="
|
1025
|
+
<xsl:value-of select="$copyright_year"/>
|
1014
1026
|
</xsl:variable>
|
1015
1027
|
|
1016
1028
|
<xsl:template name="insertHeaderFooter">
|
@@ -1070,7 +1082,10 @@
|
|
1070
1082
|
|
1071
1083
|
<xsl:template name="insertDraftWatermark">
|
1072
1084
|
<xsl:param name="isDraft"/>
|
1073
|
-
<xsl:if test="$isDraft = 'true' or normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
1085
|
+
<!-- <xsl:if test="$isDraft = 'true' or normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft or
|
1086
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'draft') or
|
1087
|
+
contains(//mn:metanorma/mn:bibdata/mn:status/mn:stage, 'projet')) = 'true'"> -->
|
1088
|
+
<xsl:if test="$isDraft = 'true' or normalize-space(normalize-space(//mn:metanorma/mn:bibdata/mn:version/mn:draft) != '' or normalize-space(//mn:metanorma/mn:metanorma-extension/mn:semantic-metadata/mn:stage-published) = 'false') = 'true'">
|
1074
1089
|
<!-- DRAFT -->
|
1075
1090
|
<xsl:variable name="draft_label">
|
1076
1091
|
<xsl:call-template name="getLocalizedString">
|
@@ -1227,10 +1242,10 @@
|
|
1227
1242
|
|
1228
1243
|
<fo:flow flow-name="xsl-region-body">
|
1229
1244
|
<fo:block id="{@id}" span="all">
|
1230
|
-
<xsl:apply-templates select="mn:title"/>
|
1245
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
1231
1246
|
</fo:block>
|
1232
1247
|
<fo:block role="Index">
|
1233
|
-
<xsl:apply-templates select="*[not(self::mn:title)]"/>
|
1248
|
+
<xsl:apply-templates select="*[not(self::mn:title or self::mn:fmt-title)]"/>
|
1234
1249
|
</fo:block>
|
1235
1250
|
</fo:flow>
|
1236
1251
|
</fo:page-sequence>
|
@@ -3499,42 +3514,86 @@
|
|
3499
3514
|
<xsl:attribute-set name="copyright-statement-style">
|
3500
3515
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
3501
3516
|
|
3517
|
+
<xsl:template name="refine_copyright-statement-style">
|
3518
|
+
</xsl:template>
|
3519
|
+
|
3502
3520
|
<xsl:attribute-set name="copyright-statement-title-style">
|
3503
3521
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
3504
3522
|
|
3523
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
3524
|
+
</xsl:template>
|
3525
|
+
|
3505
3526
|
<xsl:attribute-set name="copyright-statement-p-style">
|
3506
3527
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
3507
3528
|
|
3508
|
-
|
3529
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
3530
|
+
|
3531
|
+
</xsl:template>
|
3532
|
+
|
3533
|
+
<xsl:attribute-set name="license-statement-style">
|
3509
3534
|
</xsl:attribute-set> <!-- license-statement-style -->
|
3510
3535
|
|
3536
|
+
<xsl:template name="refine_license-statement-style">
|
3537
|
+
</xsl:template>
|
3538
|
+
|
3511
3539
|
<xsl:attribute-set name="license-statement-title-style">
|
3512
3540
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3513
3541
|
</xsl:attribute-set> <!-- license-statement-title-style -->
|
3514
3542
|
|
3543
|
+
<xsl:template name="refine_license-statement-title-style">
|
3544
|
+
</xsl:template>
|
3545
|
+
|
3515
3546
|
<xsl:attribute-set name="license-statement-p-style">
|
3516
3547
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
3517
3548
|
|
3549
|
+
<xsl:template name="refine_license-statement-p-style">
|
3550
|
+
|
3551
|
+
</xsl:template>
|
3552
|
+
|
3518
3553
|
<xsl:attribute-set name="legal-statement-style">
|
3519
3554
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
3520
3555
|
|
3556
|
+
<xsl:template name="refine_legal-statement-style">
|
3557
|
+
</xsl:template>
|
3558
|
+
|
3521
3559
|
<xsl:attribute-set name="legal-statement-title-style">
|
3522
3560
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3523
3561
|
</xsl:attribute-set> <!-- legal-statement-title-style -->
|
3524
3562
|
|
3563
|
+
<xsl:template name="refine_legal-statement-title-style">
|
3564
|
+
</xsl:template>
|
3565
|
+
|
3525
3566
|
<xsl:attribute-set name="legal-statement-p-style">
|
3526
3567
|
</xsl:attribute-set> <!-- legal-statement-p-style -->
|
3527
3568
|
|
3569
|
+
<xsl:template name="refine_legal-statement-p-style">
|
3570
|
+
<xsl:if test="@align">
|
3571
|
+
<xsl:attribute name="text-align">
|
3572
|
+
<xsl:value-of select="@align"/>
|
3573
|
+
</xsl:attribute>
|
3574
|
+
</xsl:if>
|
3575
|
+
</xsl:template>
|
3576
|
+
|
3528
3577
|
<xsl:attribute-set name="feedback-statement-style">
|
3529
3578
|
</xsl:attribute-set> <!-- feedback-statement-style -->
|
3530
3579
|
|
3580
|
+
<xsl:template name="refine_feedback-statement-style">
|
3581
|
+
</xsl:template>
|
3582
|
+
|
3531
3583
|
<xsl:attribute-set name="feedback-statement-title-style">
|
3532
3584
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3533
3585
|
</xsl:attribute-set> <!-- feedback-statement-title-style -->
|
3534
3586
|
|
3587
|
+
<xsl:template name="refine_feedback-statement-title-style">
|
3588
|
+
|
3589
|
+
</xsl:template>
|
3590
|
+
|
3535
3591
|
<xsl:attribute-set name="feedback-statement-p-style">
|
3536
3592
|
</xsl:attribute-set> <!-- feedback-statement-p-style -->
|
3537
3593
|
|
3594
|
+
<xsl:template name="refine_feedback-statement-p-style">
|
3595
|
+
</xsl:template>
|
3596
|
+
|
3538
3597
|
<!-- End boilerplate sections styles -->
|
3539
3598
|
|
3540
3599
|
<!-- ================================= -->
|
@@ -3542,6 +3601,8 @@
|
|
3542
3601
|
<!-- ================================= -->
|
3543
3602
|
<xsl:template match="mn:copyright-statement">
|
3544
3603
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
3604
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
3605
|
+
|
3545
3606
|
<xsl:apply-templates/>
|
3546
3607
|
</fo:block>
|
3547
3608
|
</xsl:template> <!-- copyright-statement -->
|
@@ -3558,6 +3619,7 @@
|
|
3558
3619
|
|
3559
3620
|
<xsl:template match="mn:license-statement">
|
3560
3621
|
<fo:block xsl:use-attribute-sets="license-statement-style">
|
3622
|
+
<xsl:call-template name="refine_license-statement-style"/>
|
3561
3623
|
<xsl:apply-templates/>
|
3562
3624
|
</fo:block>
|
3563
3625
|
</xsl:template> <!-- license-statement -->
|
@@ -3575,6 +3637,7 @@
|
|
3575
3637
|
<xsl:template match="mn:legal-statement">
|
3576
3638
|
<xsl:param name="isLegacy">false</xsl:param>
|
3577
3639
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
3640
|
+
<xsl:call-template name="refine_legal-statement-style"/>
|
3578
3641
|
<xsl:apply-templates/>
|
3579
3642
|
</fo:block>
|
3580
3643
|
</xsl:template> <!-- legal-statement -->
|
@@ -3744,6 +3807,27 @@
|
|
3744
3807
|
<xsl:attribute-set name="sourcecode-container-style">
|
3745
3808
|
</xsl:attribute-set>
|
3746
3809
|
|
3810
|
+
<xsl:template name="refine_sourcecode-container-style">
|
3811
|
+
<xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
|
3812
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3813
|
+
</xsl:if>
|
3814
|
+
|
3815
|
+
<xsl:if test="ancestor::mn:example">
|
3816
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
3817
|
+
</xsl:if>
|
3818
|
+
|
3819
|
+
<xsl:copy-of select="@id"/>
|
3820
|
+
|
3821
|
+
<xsl:if test="parent::mn:note">
|
3822
|
+
<xsl:attribute name="margin-left">
|
3823
|
+
<xsl:choose>
|
3824
|
+
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3825
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3826
|
+
</xsl:choose>
|
3827
|
+
</xsl:attribute>
|
3828
|
+
</xsl:if>
|
3829
|
+
</xsl:template>
|
3830
|
+
|
3747
3831
|
<xsl:attribute-set name="sourcecode-style">
|
3748
3832
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
3749
3833
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -3763,6 +3847,9 @@
|
|
3763
3847
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
3764
3848
|
</xsl:attribute-set> <!-- sourcecode-name-style -->
|
3765
3849
|
|
3850
|
+
<xsl:template name="refine_sourcecode-name-style">
|
3851
|
+
</xsl:template>
|
3852
|
+
|
3766
3853
|
<xsl:template name="add-zero-spaces-equal">
|
3767
3854
|
<xsl:param name="text" select="."/>
|
3768
3855
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
@@ -3850,24 +3937,8 @@
|
|
3850
3937
|
<xsl:otherwise>
|
3851
3938
|
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
|
3852
3939
|
|
3853
|
-
<xsl:
|
3854
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3855
|
-
</xsl:if>
|
3856
|
-
|
3857
|
-
<xsl:if test="ancestor::mn:example">
|
3858
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
3859
|
-
</xsl:if>
|
3860
|
-
|
3861
|
-
<xsl:copy-of select="@id"/>
|
3940
|
+
<xsl:call-template name="refine_sourcecode-container-style"/>
|
3862
3941
|
|
3863
|
-
<xsl:if test="parent::mn:note">
|
3864
|
-
<xsl:attribute name="margin-left">
|
3865
|
-
<xsl:choose>
|
3866
|
-
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3867
|
-
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3868
|
-
</xsl:choose>
|
3869
|
-
</xsl:attribute>
|
3870
|
-
</xsl:if>
|
3871
3942
|
<fo:block-container margin-left="0mm" role="SKIP">
|
3872
3943
|
|
3873
3944
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
@@ -4194,6 +4265,7 @@
|
|
4194
4265
|
<xsl:template match="mn:sourcecode/mn:fmt-name">
|
4195
4266
|
<xsl:if test="normalize-space() != ''">
|
4196
4267
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4268
|
+
<xsl:call-template name="refine_sourcecode-name-style"/>
|
4197
4269
|
<xsl:apply-templates/>
|
4198
4270
|
</fo:block>
|
4199
4271
|
</xsl:if>
|
@@ -4241,12 +4313,31 @@
|
|
4241
4313
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
4242
4314
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
4243
4315
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
4244
|
-
</xsl:attribute-set>
|
4316
|
+
</xsl:attribute-set> <!-- pre-style -->
|
4317
|
+
|
4318
|
+
<xsl:template name="refine_pre-style">
|
4319
|
+
</xsl:template>
|
4245
4320
|
|
4246
4321
|
<xsl:attribute-set name="tt-style">
|
4247
4322
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
4248
4323
|
</xsl:attribute-set>
|
4249
4324
|
|
4325
|
+
<xsl:template name="refine_tt-style">
|
4326
|
+
<xsl:variable name="_font-size"> <!-- inherit -->10
|
4327
|
+
</xsl:variable>
|
4328
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
4329
|
+
<xsl:if test="$font-size != ''">
|
4330
|
+
<xsl:attribute name="font-size">
|
4331
|
+
<xsl:choose>
|
4332
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4333
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4334
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4335
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4336
|
+
</xsl:choose>
|
4337
|
+
</xsl:attribute>
|
4338
|
+
</xsl:if>
|
4339
|
+
</xsl:template>
|
4340
|
+
|
4250
4341
|
<xsl:variable name="color-added-text">
|
4251
4342
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
4252
4343
|
</xsl:variable>
|
@@ -4259,9 +4350,14 @@
|
|
4259
4350
|
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
4260
4351
|
</xsl:attribute-set>
|
4261
4352
|
|
4353
|
+
<xsl:template name="refine_add-style">
|
4354
|
+
</xsl:template>
|
4355
|
+
|
4262
4356
|
<xsl:variable name="add-style">
|
4263
|
-
|
4264
|
-
|
4357
|
+
<add-style xsl:use-attribute-sets="add-style">
|
4358
|
+
<xsl:call-template name="refine_add-style"/>
|
4359
|
+
</add-style>
|
4360
|
+
</xsl:variable>
|
4265
4361
|
<xsl:template name="append_add-style">
|
4266
4362
|
<xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
|
4267
4363
|
</xsl:template>
|
@@ -4274,24 +4370,77 @@
|
|
4274
4370
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
4275
4371
|
</xsl:attribute-set>
|
4276
4372
|
|
4373
|
+
<xsl:template name="refine_del-style">
|
4374
|
+
</xsl:template>
|
4375
|
+
|
4376
|
+
<xsl:attribute-set name="strong-style">
|
4377
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4378
|
+
</xsl:attribute-set>
|
4379
|
+
|
4380
|
+
<xsl:template name="refine_strong_style">
|
4381
|
+
<xsl:if test="ancestor::*['preferred']">
|
4382
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
4383
|
+
</xsl:if>
|
4384
|
+
</xsl:template> <!-- refine_strong_style -->
|
4385
|
+
|
4386
|
+
<xsl:attribute-set name="em-style">
|
4387
|
+
<xsl:attribute name="font-style">italic</xsl:attribute>
|
4388
|
+
</xsl:attribute-set>
|
4389
|
+
|
4390
|
+
<xsl:template name="refine_em_style">
|
4391
|
+
</xsl:template> <!-- refine_em_style -->
|
4392
|
+
|
4393
|
+
<xsl:attribute-set name="sup-style">
|
4394
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4395
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
4396
|
+
</xsl:attribute-set>
|
4397
|
+
|
4398
|
+
<xsl:template name="refine_sup-style">
|
4399
|
+
</xsl:template>
|
4400
|
+
|
4401
|
+
<xsl:attribute-set name="sub-style">
|
4402
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4403
|
+
<xsl:attribute name="vertical-align">sub</xsl:attribute>
|
4404
|
+
</xsl:attribute-set>
|
4405
|
+
|
4406
|
+
<xsl:template name="refine_sub-style">
|
4407
|
+
</xsl:template>
|
4408
|
+
|
4409
|
+
<xsl:attribute-set name="underline-style">
|
4410
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
4411
|
+
</xsl:attribute-set>
|
4412
|
+
|
4413
|
+
<xsl:template name="refine_underline-style">
|
4414
|
+
</xsl:template>
|
4415
|
+
|
4416
|
+
<xsl:attribute-set name="hi-style">
|
4417
|
+
<xsl:attribute name="background-color">yellow</xsl:attribute>
|
4418
|
+
</xsl:attribute-set>
|
4419
|
+
|
4420
|
+
<xsl:template name="refine_hi-style">
|
4421
|
+
</xsl:template>
|
4422
|
+
|
4423
|
+
<xsl:attribute-set name="strike-style">
|
4424
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
4425
|
+
</xsl:attribute-set>
|
4426
|
+
|
4427
|
+
<xsl:template name="refine_strike-style">
|
4428
|
+
</xsl:template>
|
4429
|
+
|
4277
4430
|
<xsl:template match="mn:br">
|
4278
4431
|
<xsl:value-of select="$linebreak"/>
|
4279
4432
|
</xsl:template>
|
4280
4433
|
|
4281
|
-
|
4282
|
-
<fo:inline
|
4283
|
-
<xsl:call-template name="
|
4434
|
+
<xsl:template match="mn:em">
|
4435
|
+
<fo:inline xsl:use-attribute-sets="em-style">
|
4436
|
+
<xsl:call-template name="refine_em_style"/>
|
4284
4437
|
<xsl:apply-templates/>
|
4285
4438
|
</fo:inline>
|
4286
4439
|
</xsl:template>
|
4287
4440
|
|
4288
|
-
<xsl:template name="refine_italic_style">
|
4289
|
-
</xsl:template>
|
4290
|
-
|
4291
4441
|
<xsl:template match="mn:strong | *[local-name()='b']">
|
4292
4442
|
<xsl:param name="split_keep-within-line"/>
|
4293
|
-
<fo:inline
|
4294
|
-
|
4443
|
+
<fo:inline xsl:use-attribute-sets="strong-style">
|
4295
4444
|
<xsl:call-template name="refine_strong_style"/>
|
4296
4445
|
|
4297
4446
|
<xsl:apply-templates>
|
@@ -4300,44 +4449,27 @@
|
|
4300
4449
|
</fo:inline>
|
4301
4450
|
</xsl:template>
|
4302
4451
|
|
4303
|
-
<xsl:template name="refine_strong_style">
|
4304
|
-
<xsl:if test="ancestor::*['preferred']">
|
4305
|
-
<xsl:attribute name="role">SKIP</xsl:attribute>
|
4306
|
-
</xsl:if>
|
4307
|
-
</xsl:template>
|
4308
|
-
|
4309
4452
|
<xsl:template match="*[local-name()='padding']">
|
4310
4453
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
4311
4454
|
</xsl:template>
|
4312
4455
|
|
4313
4456
|
<xsl:template match="mn:sup">
|
4314
|
-
<fo:inline
|
4457
|
+
<fo:inline xsl:use-attribute-sets="sup-style">
|
4458
|
+
<xsl:call-template name="refine_sup-style"/>
|
4315
4459
|
<xsl:apply-templates/>
|
4316
4460
|
</fo:inline>
|
4317
4461
|
</xsl:template>
|
4318
4462
|
|
4319
4463
|
<xsl:template match="mn:sub">
|
4320
|
-
<fo:inline
|
4464
|
+
<fo:inline xsl:use-attribute-sets="sub-style">
|
4465
|
+
<xsl:call-template name="refine_sub-style"/>
|
4321
4466
|
<xsl:apply-templates/>
|
4322
4467
|
</fo:inline>
|
4323
4468
|
</xsl:template>
|
4324
4469
|
|
4325
4470
|
<xsl:template match="mn:tt">
|
4326
4471
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
4327
|
-
|
4328
|
-
<xsl:variable name="_font-size"> <!-- inherit -->10
|
4329
|
-
</xsl:variable>
|
4330
|
-
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
4331
|
-
<xsl:if test="$font-size != ''">
|
4332
|
-
<xsl:attribute name="font-size">
|
4333
|
-
<xsl:choose>
|
4334
|
-
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4335
|
-
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4336
|
-
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4337
|
-
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4338
|
-
</xsl:choose>
|
4339
|
-
</xsl:attribute>
|
4340
|
-
</xsl:if>
|
4472
|
+
<xsl:call-template name="refine_tt-style"/>
|
4341
4473
|
<xsl:apply-templates/>
|
4342
4474
|
</fo:inline>
|
4343
4475
|
</xsl:template> <!-- tt -->
|
@@ -4356,7 +4488,8 @@
|
|
4356
4488
|
</xsl:template>
|
4357
4489
|
|
4358
4490
|
<xsl:template match="mn:underline">
|
4359
|
-
<fo:inline
|
4491
|
+
<fo:inline xsl:use-attribute-sets="underline-style">
|
4492
|
+
<xsl:call-template name="refine_underline-style"/>
|
4360
4493
|
<xsl:apply-templates/>
|
4361
4494
|
</fo:inline>
|
4362
4495
|
</xsl:template>
|
@@ -4514,6 +4647,7 @@
|
|
4514
4647
|
|
4515
4648
|
<xsl:template match="mn:del">
|
4516
4649
|
<fo:inline xsl:use-attribute-sets="del-style">
|
4650
|
+
<xsl:call-template name="refine_del-style"/>
|
4517
4651
|
<xsl:apply-templates/>
|
4518
4652
|
</fo:inline>
|
4519
4653
|
</xsl:template>
|
@@ -4523,7 +4657,8 @@
|
|
4523
4657
|
|
4524
4658
|
<!-- highlight text -->
|
4525
4659
|
<xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
|
4526
|
-
<fo:inline
|
4660
|
+
<fo:inline xsl:use-attribute-sets="hi-style">
|
4661
|
+
<xsl:call-template name="refine_hi-style"/>
|
4527
4662
|
<xsl:apply-templates/>
|
4528
4663
|
</fo:inline>
|
4529
4664
|
</xsl:template>
|
@@ -4609,7 +4744,8 @@
|
|
4609
4744
|
</xsl:template>
|
4610
4745
|
|
4611
4746
|
<xsl:template match="mn:strike">
|
4612
|
-
<fo:inline
|
4747
|
+
<fo:inline xsl:use-attribute-sets="strike-style">
|
4748
|
+
<xsl:call-template name="refine_strike-style"/>
|
4613
4749
|
<xsl:apply-templates/>
|
4614
4750
|
</fo:inline>
|
4615
4751
|
</xsl:template>
|
@@ -4637,7 +4773,7 @@
|
|
4637
4773
|
</xsl:otherwise>
|
4638
4774
|
</xsl:choose>
|
4639
4775
|
</xsl:variable>
|
4640
|
-
<xsl:if test="$key = 'font-family' or
|
4776
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
4641
4777
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
4642
4778
|
</xsl:if>
|
4643
4779
|
<xsl:if test="$key = 'text-indent'">
|
@@ -4689,6 +4825,7 @@
|
|
4689
4825
|
|
4690
4826
|
<xsl:template match="mn:pre" name="pre">
|
4691
4827
|
<fo:block xsl:use-attribute-sets="pre-style">
|
4828
|
+
<xsl:call-template name="refine_pre-style"/>
|
4692
4829
|
<xsl:copy-of select="@id"/>
|
4693
4830
|
<xsl:choose>
|
4694
4831
|
|
@@ -4719,22 +4856,40 @@
|
|
4719
4856
|
<xsl:attribute-set name="permission-style">
|
4720
4857
|
</xsl:attribute-set>
|
4721
4858
|
|
4859
|
+
<xsl:template name="refine_permission-style">
|
4860
|
+
</xsl:template>
|
4861
|
+
|
4722
4862
|
<xsl:attribute-set name="permission-name-style">
|
4723
4863
|
</xsl:attribute-set>
|
4724
4864
|
|
4865
|
+
<xsl:template name="refine_permission-name-style">
|
4866
|
+
</xsl:template>
|
4867
|
+
|
4725
4868
|
<xsl:attribute-set name="permission-label-style">
|
4726
4869
|
</xsl:attribute-set>
|
4727
4870
|
|
4871
|
+
<xsl:template name="refine_permission-label-style">
|
4872
|
+
</xsl:template>
|
4873
|
+
|
4728
4874
|
<xsl:attribute-set name="requirement-style">
|
4729
4875
|
</xsl:attribute-set>
|
4730
4876
|
|
4877
|
+
<xsl:template name="refine_requirement-style">
|
4878
|
+
</xsl:template>
|
4879
|
+
|
4731
4880
|
<xsl:attribute-set name="requirement-name-style">
|
4732
4881
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4733
4882
|
</xsl:attribute-set>
|
4734
4883
|
|
4884
|
+
<xsl:template name="refine_requirement-name-style">
|
4885
|
+
</xsl:template>
|
4886
|
+
|
4735
4887
|
<xsl:attribute-set name="requirement-label-style">
|
4736
4888
|
</xsl:attribute-set>
|
4737
4889
|
|
4890
|
+
<xsl:template name="refine_requirement-label-style">
|
4891
|
+
</xsl:template>
|
4892
|
+
|
4738
4893
|
<xsl:attribute-set name="subject-style">
|
4739
4894
|
</xsl:attribute-set>
|
4740
4895
|
|
@@ -4762,18 +4917,28 @@
|
|
4762
4917
|
<xsl:attribute-set name="recommendation-style">
|
4763
4918
|
</xsl:attribute-set>
|
4764
4919
|
|
4920
|
+
<xsl:template name="refine_recommendation-style">
|
4921
|
+
</xsl:template>
|
4922
|
+
|
4765
4923
|
<xsl:attribute-set name="recommendation-name-style">
|
4766
4924
|
</xsl:attribute-set>
|
4767
4925
|
|
4926
|
+
<xsl:template name="refine_recommendation-name-style">
|
4927
|
+
</xsl:template>
|
4928
|
+
|
4768
4929
|
<xsl:attribute-set name="recommendation-label-style">
|
4769
4930
|
</xsl:attribute-set>
|
4770
4931
|
|
4932
|
+
<xsl:template name="refine_recommendation-label-style">
|
4933
|
+
</xsl:template>
|
4934
|
+
|
4771
4935
|
<!-- ========== -->
|
4772
4936
|
<!-- permission -->
|
4773
4937
|
<!-- ========== -->
|
4774
4938
|
<xsl:template match="mn:permission">
|
4775
4939
|
<xsl:call-template name="setNamedDestination"/>
|
4776
4940
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
4941
|
+
<xsl:call-template name="refine_permission-style"/>
|
4777
4942
|
<xsl:apply-templates select="mn:fmt-name"/>
|
4778
4943
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4779
4944
|
</fo:block>
|
@@ -4782,6 +4947,7 @@
|
|
4782
4947
|
<xsl:template match="mn:permission/mn:fmt-name">
|
4783
4948
|
<xsl:if test="normalize-space() != ''">
|
4784
4949
|
<fo:block xsl:use-attribute-sets="permission-name-style">
|
4950
|
+
<xsl:call-template name="refine_permission-name-style"/>
|
4785
4951
|
<xsl:apply-templates/>
|
4786
4952
|
</fo:block>
|
4787
4953
|
</xsl:if>
|
@@ -4789,6 +4955,7 @@
|
|
4789
4955
|
|
4790
4956
|
<xsl:template match="mn:permission/mn:label">
|
4791
4957
|
<fo:block xsl:use-attribute-sets="permission-label-style">
|
4958
|
+
<xsl:call-template name="refine_permission-label-style"/>
|
4792
4959
|
<xsl:apply-templates/>
|
4793
4960
|
</fo:block>
|
4794
4961
|
</xsl:template>
|
@@ -4801,6 +4968,7 @@
|
|
4801
4968
|
<xsl:template match="mn:requirement">
|
4802
4969
|
<xsl:call-template name="setNamedDestination"/>
|
4803
4970
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
4971
|
+
<xsl:call-template name="refine_requirement-style"/>
|
4804
4972
|
<xsl:apply-templates select="mn:fmt-name"/>
|
4805
4973
|
<xsl:apply-templates select="mn:label"/>
|
4806
4974
|
<xsl:apply-templates select="@obligation"/>
|
@@ -4813,6 +4981,7 @@
|
|
4813
4981
|
<xsl:if test="normalize-space() != ''">
|
4814
4982
|
|
4815
4983
|
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
4984
|
+
<xsl:call-template name="refine_requirement-name-style"/>
|
4816
4985
|
<xsl:apply-templates/>
|
4817
4986
|
</fo:block>
|
4818
4987
|
</xsl:if>
|
@@ -4820,6 +4989,7 @@
|
|
4820
4989
|
|
4821
4990
|
<xsl:template match="mn:requirement/mn:label">
|
4822
4991
|
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
4992
|
+
<xsl:call-template name="refine_requirement-label-style"/>
|
4823
4993
|
<xsl:apply-templates/>
|
4824
4994
|
</fo:block>
|
4825
4995
|
</xsl:template>
|
@@ -4845,6 +5015,7 @@
|
|
4845
5015
|
<xsl:template match="mn:recommendation">
|
4846
5016
|
<xsl:call-template name="setNamedDestination"/>
|
4847
5017
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
5018
|
+
<xsl:call-template name="refine_recommendation-style"/>
|
4848
5019
|
<xsl:apply-templates select="mn:fmt-name"/>
|
4849
5020
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4850
5021
|
</fo:block>
|
@@ -4854,6 +5025,7 @@
|
|
4854
5025
|
<xsl:if test="normalize-space() != ''">
|
4855
5026
|
|
4856
5027
|
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
5028
|
+
<xsl:call-template name="refine_recommendation-name-style"/>
|
4857
5029
|
<xsl:apply-templates/>
|
4858
5030
|
</fo:block>
|
4859
5031
|
</xsl:if>
|
@@ -4861,6 +5033,7 @@
|
|
4861
5033
|
|
4862
5034
|
<xsl:template match="mn:recommendation/mn:label">
|
4863
5035
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
5036
|
+
<xsl:call-template name="refine_recommendation-label-style"/>
|
4864
5037
|
<xsl:apply-templates/>
|
4865
5038
|
</fo:block>
|
4866
5039
|
</xsl:template>
|
@@ -5042,37 +5215,67 @@
|
|
5042
5215
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
5043
5216
|
</xsl:attribute-set> <!-- term-style -->
|
5044
5217
|
|
5218
|
+
<xsl:template name="refine_term-style">
|
5219
|
+
</xsl:template>
|
5220
|
+
|
5045
5221
|
<xsl:attribute-set name="term-name-style">
|
5046
5222
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
5047
5223
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
5048
5224
|
</xsl:attribute-set> <!-- term-name-style -->
|
5049
5225
|
|
5050
|
-
|
5226
|
+
<xsl:template name="refine_term-name-style">
|
5227
|
+
</xsl:template>
|
5228
|
+
|
5229
|
+
<xsl:attribute-set name="preferred-block-style">
|
5051
5230
|
<xsl:attribute name="line-height">1.1</xsl:attribute>
|
5052
5231
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
5053
5232
|
|
5233
|
+
<xsl:template name="refine_preferred-block-style">
|
5234
|
+
</xsl:template>
|
5235
|
+
|
5054
5236
|
<xsl:attribute-set name="preferred-term-style">
|
5055
5237
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
5056
5238
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
5057
5239
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
5058
5240
|
|
5241
|
+
<xsl:template name="refine_preferred-term-style">
|
5242
|
+
<xsl:if test="mn:strong">
|
5243
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
5244
|
+
</xsl:if>
|
5245
|
+
</xsl:template>
|
5246
|
+
|
5059
5247
|
<xsl:attribute-set name="domain-style">
|
5060
5248
|
</xsl:attribute-set> <!-- domain-style -->
|
5061
5249
|
|
5250
|
+
<xsl:template name="refine_domain-style">
|
5251
|
+
</xsl:template>
|
5252
|
+
|
5062
5253
|
<xsl:attribute-set name="admitted-style">
|
5063
5254
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
5064
5255
|
</xsl:attribute-set> <!-- admitted-style -->
|
5065
5256
|
|
5257
|
+
<xsl:template name="refine_admitted-style">
|
5258
|
+
</xsl:template>
|
5259
|
+
|
5066
5260
|
<xsl:attribute-set name="deprecates-style">
|
5067
5261
|
</xsl:attribute-set> <!-- deprecates-style -->
|
5068
5262
|
|
5263
|
+
<xsl:template name="refine_deprecates-style">
|
5264
|
+
</xsl:template>
|
5265
|
+
|
5069
5266
|
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
5070
5267
|
</xsl:attribute-set>
|
5071
5268
|
|
5269
|
+
<xsl:template name="refine_related-block-style">
|
5270
|
+
</xsl:template>
|
5271
|
+
|
5072
5272
|
<xsl:attribute-set name="definition-style">
|
5073
5273
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
5074
5274
|
</xsl:attribute-set> <!-- definition-style -->
|
5075
5275
|
|
5276
|
+
<xsl:template name="refine_definition-style">
|
5277
|
+
</xsl:template>
|
5278
|
+
|
5076
5279
|
<xsl:attribute-set name="termsource-style">
|
5077
5280
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
5078
5281
|
</xsl:attribute-set> <!-- termsource-style -->
|
@@ -5083,9 +5286,15 @@
|
|
5083
5286
|
<xsl:attribute-set name="termsource-text-style">
|
5084
5287
|
</xsl:attribute-set> <!-- termsource-text-style -->
|
5085
5288
|
|
5289
|
+
<xsl:template name="refine_termsource-text-style">
|
5290
|
+
</xsl:template>
|
5291
|
+
|
5086
5292
|
<xsl:attribute-set name="origin-style">
|
5087
5293
|
</xsl:attribute-set> <!-- origin-style -->
|
5088
5294
|
|
5295
|
+
<xsl:template name="refine_origin-style">
|
5296
|
+
</xsl:template>
|
5297
|
+
|
5089
5298
|
<!-- ====== -->
|
5090
5299
|
<!-- term -->
|
5091
5300
|
<!-- ====== -->
|
@@ -5101,9 +5310,8 @@
|
|
5101
5310
|
<xsl:template match="mn:term">
|
5102
5311
|
<xsl:call-template name="setNamedDestination"/>
|
5103
5312
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
5313
|
+
<xsl:call-template name="refine_term-style"/>
|
5104
5314
|
|
5105
|
-
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
5106
|
-
</xsl:if>
|
5107
5315
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
5108
5316
|
</fo:block>
|
5109
5317
|
</xsl:template>
|
@@ -5179,6 +5387,7 @@
|
|
5179
5387
|
<!-- text SOURCE: -->
|
5180
5388
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
5181
5389
|
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
5390
|
+
<xsl:call-template name="refine_termsource-text-style"/>
|
5182
5391
|
<xsl:value-of select="."/>
|
5183
5392
|
</fo:inline>
|
5184
5393
|
</xsl:template>
|
@@ -5191,6 +5400,7 @@
|
|
5191
5400
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
5192
5401
|
</xsl:if>
|
5193
5402
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
5403
|
+
<xsl:call-template name="refine_origin-style"/>
|
5194
5404
|
<xsl:apply-templates/>
|
5195
5405
|
</fo:inline>
|
5196
5406
|
</fo:basic-link>
|
@@ -5240,9 +5450,12 @@
|
|
5240
5450
|
</xsl:variable>
|
5241
5451
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
5242
5452
|
|
5453
|
+
<xsl:call-template name="refine_preferred-block-style"/>
|
5454
|
+
|
5243
5455
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
5244
5456
|
|
5245
5457
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
5458
|
+
<xsl:call-template name="refine_term-name-style"/>
|
5246
5459
|
|
5247
5460
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
5248
5461
|
<xsl:call-template name="setIDforNamedDestination"/>
|
@@ -5253,7 +5466,7 @@
|
|
5253
5466
|
</xsl:if>
|
5254
5467
|
|
5255
5468
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
5256
|
-
<xsl:call-template name="
|
5469
|
+
<xsl:call-template name="refine_preferred-term-style"/>
|
5257
5470
|
|
5258
5471
|
<xsl:apply-templates/>
|
5259
5472
|
</fo:block>
|
@@ -5274,22 +5487,18 @@
|
|
5274
5487
|
|
5275
5488
|
<xsl:template match="mn:fmt-admitted">
|
5276
5489
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
5490
|
+
<xsl:call-template name="refine_admitted-style"/>
|
5277
5491
|
<xsl:apply-templates/>
|
5278
5492
|
</fo:block>
|
5279
5493
|
</xsl:template>
|
5280
5494
|
|
5281
5495
|
<xsl:template match="mn:fmt-deprecates">
|
5282
5496
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
5497
|
+
<xsl:call-template name="refine_deprecates-style"/>
|
5283
5498
|
<xsl:apply-templates/>
|
5284
5499
|
</fo:block>
|
5285
5500
|
</xsl:template>
|
5286
5501
|
|
5287
|
-
<xsl:template name="setStyle_preferred">
|
5288
|
-
<xsl:if test="mn:strong">
|
5289
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
5290
|
-
</xsl:if>
|
5291
|
-
</xsl:template>
|
5292
|
-
|
5293
5502
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
5294
5503
|
<!-- in metanorma xml preferred terms delimited by semicolons -->
|
5295
5504
|
<xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
|
@@ -5299,6 +5508,7 @@
|
|
5299
5508
|
|
5300
5509
|
<xsl:template match="mn:fmt-related">
|
5301
5510
|
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
5511
|
+
<xsl:call-template name="refine_related-block-style"/>
|
5302
5512
|
<xsl:apply-templates/>
|
5303
5513
|
</fo:block>
|
5304
5514
|
</xsl:template>
|
@@ -5313,6 +5523,7 @@
|
|
5313
5523
|
<!-- ========== -->
|
5314
5524
|
<xsl:template match="mn:fmt-definition">
|
5315
5525
|
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
5526
|
+
<xsl:call-template name="refine_definition-style"/>
|
5316
5527
|
<xsl:apply-templates/>
|
5317
5528
|
</fo:block>
|
5318
5529
|
</xsl:template>
|
@@ -5364,6 +5575,9 @@
|
|
5364
5575
|
<xsl:attribute-set name="example-body-style">
|
5365
5576
|
</xsl:attribute-set> <!-- example-body-style -->
|
5366
5577
|
|
5578
|
+
<xsl:template name="refine_example-body-style">
|
5579
|
+
</xsl:template>
|
5580
|
+
|
5367
5581
|
<xsl:attribute-set name="example-name-style">
|
5368
5582
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
5369
5583
|
</xsl:attribute-set> <!-- example-name-style -->
|
@@ -5412,6 +5626,8 @@
|
|
5412
5626
|
<xsl:when test="contains($element, 'block')">
|
5413
5627
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
5414
5628
|
|
5629
|
+
<xsl:call-template name="refine_example-p-style"/>
|
5630
|
+
|
5415
5631
|
<xsl:apply-templates/>
|
5416
5632
|
</fo:block>
|
5417
5633
|
</xsl:when>
|
@@ -5463,6 +5679,7 @@
|
|
5463
5679
|
</fo:block>
|
5464
5680
|
|
5465
5681
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
5682
|
+
<xsl:call-template name="refine_example-body-style"/>
|
5466
5683
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
5467
5684
|
<xsl:variable name="example_body">
|
5468
5685
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
@@ -5525,6 +5742,7 @@
|
|
5525
5742
|
<xsl:if test="*[not(self::mn:fmt-name)][position() > 1]">
|
5526
5743
|
<!-- display further elements in blocks -->
|
5527
5744
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
5745
|
+
<xsl:call-template name="refine_example-body-style"/>
|
5528
5746
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
5529
5747
|
<xsl:apply-templates select="*[not(self::mn:fmt-name)][position() > 1]">
|
5530
5748
|
<xsl:with-param name="fo_element" select="'block'"/>
|
@@ -5789,6 +6007,9 @@
|
|
5789
6007
|
<!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
|
5790
6008
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
5791
6009
|
|
6010
|
+
<xsl:template name="refine_table-fn-number-style">
|
6011
|
+
</xsl:template>
|
6012
|
+
|
5792
6013
|
<xsl:attribute-set name="table-fmt-fn-label-style">
|
5793
6014
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
5794
6015
|
<xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
|
@@ -5797,30 +6018,12 @@
|
|
5797
6018
|
<xsl:template name="refine_table-fmt-fn-label-style">
|
5798
6019
|
</xsl:template>
|
5799
6020
|
|
5800
|
-
<xsl:attribute-set name="fn-container-body-style">
|
5801
|
-
<xsl:attribute name="text-indent">0</xsl:attribute>
|
5802
|
-
<xsl:attribute name="start-indent">0</xsl:attribute>
|
5803
|
-
</xsl:attribute-set>
|
5804
|
-
|
5805
6021
|
<xsl:attribute-set name="table-fn-body-style">
|
5806
6022
|
</xsl:attribute-set>
|
5807
6023
|
|
5808
|
-
<xsl:
|
5809
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
5810
|
-
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
5811
|
-
|
5812
|
-
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
5813
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
5814
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
5815
|
-
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
5816
|
-
|
5817
|
-
<xsl:template name="refine_figure-fmt-fn-label-style">
|
6024
|
+
<xsl:template name="refine_table-fn-body-style">
|
5818
6025
|
</xsl:template>
|
5819
6026
|
|
5820
|
-
<xsl:attribute-set name="figure-fn-body-style">
|
5821
|
-
<xsl:attribute name="text-align">justify</xsl:attribute>
|
5822
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
5823
|
-
</xsl:attribute-set>
|
5824
6027
|
<!-- ========================== -->
|
5825
6028
|
<!-- END Table styles -->
|
5826
6029
|
<!-- ========================== -->
|
@@ -7145,6 +7348,7 @@
|
|
7145
7348
|
</xsl:apply-templates>
|
7146
7349
|
|
7147
7350
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
7351
|
+
<xsl:call-template name="refine_table-fn-body-style"/>
|
7148
7352
|
<!-- <xsl:copy-of select="./node()"/> -->
|
7149
7353
|
<xsl:apply-templates/>
|
7150
7354
|
</fo:inline>
|
@@ -7163,6 +7367,7 @@
|
|
7163
7367
|
<xsl:param name="process">false</xsl:param>
|
7164
7368
|
<xsl:if test="$process = 'true'">
|
7165
7369
|
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
7370
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
7166
7371
|
|
7167
7372
|
<!-- tab is padding-right -->
|
7168
7373
|
<xsl:apply-templates select=".//mn:tab">
|
@@ -8034,9 +8239,18 @@
|
|
8034
8239
|
<xsl:attribute-set name="dl-block-style">
|
8035
8240
|
</xsl:attribute-set>
|
8036
8241
|
|
8242
|
+
<xsl:template name="refine_dl-block-style">
|
8243
|
+
<xsl:if test="@key = 'true' and ancestor::mn:figure">
|
8244
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
8245
|
+
</xsl:if>
|
8246
|
+
</xsl:template>
|
8247
|
+
|
8037
8248
|
<xsl:attribute-set name="dt-row-style">
|
8038
8249
|
</xsl:attribute-set>
|
8039
8250
|
|
8251
|
+
<xsl:template name="refine_dt-row-style">
|
8252
|
+
</xsl:template>
|
8253
|
+
|
8040
8254
|
<xsl:attribute-set name="dt-cell-style">
|
8041
8255
|
</xsl:attribute-set>
|
8042
8256
|
|
@@ -8056,6 +8270,9 @@
|
|
8056
8270
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
8057
8271
|
</xsl:attribute-set> <!-- dl-name-style -->
|
8058
8272
|
|
8273
|
+
<xsl:template name="refine_dl-name-style">
|
8274
|
+
</xsl:template>
|
8275
|
+
|
8059
8276
|
<xsl:attribute-set name="dd-cell-style">
|
8060
8277
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
8061
8278
|
</xsl:attribute-set>
|
@@ -8094,9 +8311,7 @@
|
|
8094
8311
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
8095
8312
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
8096
8313
|
|
8097
|
-
<xsl:
|
8098
|
-
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
8099
|
-
</xsl:if>
|
8314
|
+
<xsl:call-template name="refine_dl-block-style"/>
|
8100
8315
|
|
8101
8316
|
<xsl:call-template name="setBlockSpanAll"/>
|
8102
8317
|
<xsl:if test="not(ancestor::mn:quote)">
|
@@ -8399,6 +8614,8 @@
|
|
8399
8614
|
<xsl:if test="$process = 'true'">
|
8400
8615
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
8401
8616
|
|
8617
|
+
<xsl:call-template name="refine_dl-name-style"/>
|
8618
|
+
|
8402
8619
|
<xsl:apply-templates/>
|
8403
8620
|
</fo:block>
|
8404
8621
|
</xsl:if>
|
@@ -8587,6 +8804,8 @@
|
|
8587
8804
|
<xsl:param name="split_keep-within-line"/>
|
8588
8805
|
|
8589
8806
|
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
8807
|
+
<xsl:call-template name="refine_dt-row-style"/>
|
8808
|
+
|
8590
8809
|
<xsl:call-template name="insert_dt_cell">
|
8591
8810
|
<xsl:with-param name="key_iso" select="$key_iso"/>
|
8592
8811
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
@@ -8800,18 +9019,25 @@
|
|
8800
9019
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
8801
9020
|
</xsl:attribute-set>
|
8802
9021
|
|
9022
|
+
<xsl:template name="refine_appendix-style">
|
9023
|
+
</xsl:template>
|
9024
|
+
|
8803
9025
|
<xsl:attribute-set name="appendix-example-style">
|
8804
9026
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
8805
9027
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
8806
9028
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
8807
9029
|
</xsl:attribute-set>
|
8808
9030
|
|
9031
|
+
<xsl:template name="refine_appendix-example-style">
|
9032
|
+
</xsl:template>
|
9033
|
+
|
8809
9034
|
<!-- ======================== -->
|
8810
9035
|
<!-- Appendix processing -->
|
8811
9036
|
<!-- ======================== -->
|
8812
9037
|
<xsl:template match="mn:appendix">
|
8813
9038
|
<xsl:call-template name="setNamedDestination"/>
|
8814
9039
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
9040
|
+
<xsl:call-template name="refine_appendix-style"/>
|
8815
9041
|
<xsl:apply-templates select="mn:fmt-title"/>
|
8816
9042
|
</fo:block>
|
8817
9043
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
@@ -8830,6 +9056,7 @@
|
|
8830
9056
|
<xsl:template match="mn:appendix//mn:example" priority="2">
|
8831
9057
|
<xsl:call-template name="setNamedDestination"/>
|
8832
9058
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
9059
|
+
<xsl:call-template name="refine_appendix-example-style"/>
|
8833
9060
|
<xsl:apply-templates select="mn:fmt-name"/>
|
8834
9061
|
</fo:block>
|
8835
9062
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
@@ -8838,7 +9065,16 @@
|
|
8838
9065
|
<xsl:attribute-set name="xref-style">
|
8839
9066
|
<xsl:attribute name="color">blue</xsl:attribute>
|
8840
9067
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
8841
|
-
</xsl:attribute-set>
|
9068
|
+
</xsl:attribute-set> <!-- xref-style -->
|
9069
|
+
|
9070
|
+
<xsl:template name="refine_xref-style">
|
9071
|
+
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[self::mn:table or self::mn:dl])">
|
9072
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
9073
|
+
</xsl:if>
|
9074
|
+
<xsl:if test="parent::mn:add">
|
9075
|
+
<xsl:call-template name="append_add-style"/>
|
9076
|
+
</xsl:if>
|
9077
|
+
</xsl:template> <!-- refine_xref-style -->
|
8842
9078
|
|
8843
9079
|
<xsl:template match="mn:fmt-xref">
|
8844
9080
|
<xsl:call-template name="insert_basic_link">
|
@@ -8847,12 +9083,8 @@
|
|
8847
9083
|
<xsl:call-template name="getAltText"/>
|
8848
9084
|
</xsl:variable>
|
8849
9085
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
8850
|
-
<xsl:
|
8851
|
-
|
8852
|
-
</xsl:if>
|
8853
|
-
<xsl:if test="parent::mn:add">
|
8854
|
-
<xsl:call-template name="append_add-style"/>
|
8855
|
-
</xsl:if>
|
9086
|
+
<xsl:call-template name="refine_xref-style"/>
|
9087
|
+
|
8856
9088
|
<xsl:apply-templates/>
|
8857
9089
|
</fo:basic-link>
|
8858
9090
|
</xsl:with-param>
|
@@ -8963,21 +9195,21 @@
|
|
8963
9195
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
8964
9196
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
8965
9197
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
8966
|
-
</xsl:attribute-set>
|
9198
|
+
</xsl:attribute-set> <!-- note-style -->
|
8967
9199
|
|
8968
9200
|
<xsl:template name="refine_note-style">
|
8969
9201
|
<xsl:if test="parent::mn:references">
|
8970
9202
|
<xsl:attribute name="margin-top">2pt</xsl:attribute>
|
8971
9203
|
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
8972
9204
|
</xsl:if>
|
8973
|
-
</xsl:template>
|
9205
|
+
</xsl:template> <!-- refine_note-style -->
|
8974
9206
|
|
8975
9207
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
8976
9208
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
8977
9209
|
|
8978
9210
|
<xsl:attribute-set name="note-name-style">
|
8979
9211
|
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
8980
|
-
</xsl:attribute-set>
|
9212
|
+
</xsl:attribute-set> <!-- note-name-style -->
|
8981
9213
|
|
8982
9214
|
<xsl:template name="refine_note-name-style">
|
8983
9215
|
</xsl:template> <!-- refine_note-name-style -->
|
@@ -8992,20 +9224,23 @@
|
|
8992
9224
|
<xsl:attribute-set name="note-p-style">
|
8993
9225
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
8994
9226
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
8995
|
-
</xsl:attribute-set>
|
9227
|
+
</xsl:attribute-set> <!-- note-p-style -->
|
9228
|
+
|
9229
|
+
<xsl:template name="refine_note-p-style">
|
9230
|
+
</xsl:template>
|
8996
9231
|
|
8997
9232
|
<xsl:attribute-set name="termnote-style">
|
8998
9233
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
8999
9234
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
9000
9235
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
9001
9236
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
9002
|
-
</xsl:attribute-set>
|
9237
|
+
</xsl:attribute-set> <!-- termnote-style -->
|
9003
9238
|
|
9004
9239
|
<xsl:template name="refine_termnote-style">
|
9005
9240
|
</xsl:template> <!-- refine_termnote-style -->
|
9006
9241
|
|
9007
9242
|
<xsl:attribute-set name="termnote-name-style">
|
9008
|
-
</xsl:attribute-set>
|
9243
|
+
</xsl:attribute-set> <!-- termnote-name-style -->
|
9009
9244
|
|
9010
9245
|
<xsl:template name="refine_termnote-name-style">
|
9011
9246
|
</xsl:template>
|
@@ -9013,6 +9248,9 @@
|
|
9013
9248
|
<xsl:attribute-set name="termnote-p-style">
|
9014
9249
|
</xsl:attribute-set>
|
9015
9250
|
|
9251
|
+
<xsl:template name="refine_termnote-p-style">
|
9252
|
+
</xsl:template>
|
9253
|
+
|
9016
9254
|
<!-- ====== -->
|
9017
9255
|
<!-- note -->
|
9018
9256
|
<!-- termnote -->
|
@@ -9073,11 +9311,13 @@
|
|
9073
9311
|
<xsl:choose>
|
9074
9312
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
9075
9313
|
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
9314
|
+
<xsl:call-template name="refine_note-p-style"/>
|
9076
9315
|
<xsl:apply-templates/>
|
9077
9316
|
</fo:inline>
|
9078
9317
|
</xsl:when>
|
9079
9318
|
<xsl:otherwise>
|
9080
9319
|
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
9320
|
+
<xsl:call-template name="refine_note-p-style"/>
|
9081
9321
|
<xsl:apply-templates/>
|
9082
9322
|
</fo:block>
|
9083
9323
|
</xsl:otherwise>
|
@@ -9169,11 +9409,13 @@
|
|
9169
9409
|
<xsl:choose>
|
9170
9410
|
<xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
|
9171
9411
|
<fo:inline xsl:use-attribute-sets="termnote-p-style">
|
9412
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
9172
9413
|
<xsl:apply-templates/>
|
9173
9414
|
</fo:inline>
|
9174
9415
|
</xsl:when>
|
9175
9416
|
<xsl:otherwise>
|
9176
9417
|
<fo:block xsl:use-attribute-sets="termnote-p-style">
|
9418
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
9177
9419
|
<xsl:apply-templates/>
|
9178
9420
|
</fo:block>
|
9179
9421
|
</xsl:otherwise>
|
@@ -9189,7 +9431,7 @@
|
|
9189
9431
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
9190
9432
|
<xsl:attribute name="font-style">italic</xsl:attribute>
|
9191
9433
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
9192
|
-
</xsl:attribute-set>
|
9434
|
+
</xsl:attribute-set> <!-- quote-style -->
|
9193
9435
|
|
9194
9436
|
<xsl:template name="refine_quote-style">
|
9195
9437
|
<xsl:if test="ancestor::mn:boilerplate">
|
@@ -9203,6 +9445,9 @@
|
|
9203
9445
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
9204
9446
|
</xsl:attribute-set>
|
9205
9447
|
|
9448
|
+
<xsl:template name="refine_quote-source-style">
|
9449
|
+
</xsl:template>
|
9450
|
+
|
9206
9451
|
<!-- ====== -->
|
9207
9452
|
<!-- quote -->
|
9208
9453
|
<!-- source -->
|
@@ -9234,6 +9479,7 @@
|
|
9234
9479
|
</fo:block-container>
|
9235
9480
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
9236
9481
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
9482
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
9237
9483
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
9238
9484
|
<xsl:apply-templates select="mn:author"/>
|
9239
9485
|
<xsl:apply-templates select="mn:fmt-source"/>
|
@@ -9296,6 +9542,9 @@
|
|
9296
9542
|
<xsl:attribute-set name="figure-style">
|
9297
9543
|
</xsl:attribute-set>
|
9298
9544
|
|
9545
|
+
<xsl:template name="refine_figure-style">
|
9546
|
+
</xsl:template>
|
9547
|
+
|
9299
9548
|
<xsl:attribute-set name="figure-name-style">
|
9300
9549
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
9301
9550
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -9303,7 +9552,7 @@
|
|
9303
9552
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
9304
9553
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
9305
9554
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
9306
|
-
</xsl:attribute-set>
|
9555
|
+
</xsl:attribute-set> <!-- figure-name-style -->
|
9307
9556
|
|
9308
9557
|
<xsl:template name="refine_figure-name-style">
|
9309
9558
|
</xsl:template> <!-- refine_figure-name-style -->
|
@@ -9311,7 +9560,7 @@
|
|
9311
9560
|
<xsl:attribute-set name="image-style">
|
9312
9561
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
9313
9562
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
9314
|
-
</xsl:attribute-set>
|
9563
|
+
</xsl:attribute-set> <!-- image-style -->
|
9315
9564
|
|
9316
9565
|
<xsl:template name="refine_image-style">
|
9317
9566
|
</xsl:template>
|
@@ -9321,14 +9570,51 @@
|
|
9321
9570
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
9322
9571
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
9323
9572
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
9324
|
-
</xsl:attribute-set>
|
9573
|
+
</xsl:attribute-set> <!-- image-graphic-style -->
|
9574
|
+
|
9575
|
+
<xsl:template name="refine_image-graphic-style">
|
9576
|
+
</xsl:template>
|
9325
9577
|
|
9326
9578
|
<xsl:attribute-set name="figure-source-style">
|
9327
9579
|
</xsl:attribute-set>
|
9328
9580
|
|
9581
|
+
<xsl:template name="refine_figure-source-style">
|
9582
|
+
</xsl:template>
|
9583
|
+
|
9329
9584
|
<xsl:attribute-set name="figure-pseudocode-p-style">
|
9330
9585
|
</xsl:attribute-set>
|
9331
9586
|
|
9587
|
+
<xsl:template name="refine_figure-pseudocode-p-style">
|
9588
|
+
</xsl:template>
|
9589
|
+
|
9590
|
+
<xsl:attribute-set name="figure-fn-number-style">
|
9591
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
9592
|
+
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
9593
|
+
|
9594
|
+
<xsl:template name="refine_figure-fn-number-style">
|
9595
|
+
</xsl:template>
|
9596
|
+
|
9597
|
+
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
9598
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
9599
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
9600
|
+
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
9601
|
+
|
9602
|
+
<xsl:template name="refine_figure-fmt-fn-label-style">
|
9603
|
+
</xsl:template>
|
9604
|
+
|
9605
|
+
<xsl:attribute-set name="figure-fn-body-style">
|
9606
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
9607
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
9608
|
+
</xsl:attribute-set>
|
9609
|
+
|
9610
|
+
<xsl:template name="refine_figure-fn-body-style">
|
9611
|
+
<xsl:variable name="key_iso">true
|
9612
|
+
</xsl:variable>
|
9613
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
9614
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
9615
|
+
</xsl:if>
|
9616
|
+
</xsl:template>
|
9617
|
+
|
9332
9618
|
<!-- ============================ -->
|
9333
9619
|
<!-- figure's footnotes rendering -->
|
9334
9620
|
<!-- ============================ -->
|
@@ -9441,9 +9727,8 @@
|
|
9441
9727
|
</fo:table-cell>
|
9442
9728
|
<fo:table-cell>
|
9443
9729
|
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
9444
|
-
<xsl:
|
9445
|
-
|
9446
|
-
</xsl:if>
|
9730
|
+
<xsl:call-template name="refine_figure-fn-body-style"/>
|
9731
|
+
|
9447
9732
|
<!-- <xsl:copy-of select="./node()"/> -->
|
9448
9733
|
<xsl:apply-templates/>
|
9449
9734
|
</fo:block>
|
@@ -9461,6 +9746,7 @@
|
|
9461
9746
|
<xsl:param name="process">false</xsl:param>
|
9462
9747
|
<xsl:if test="$process = 'true'">
|
9463
9748
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
9749
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
9464
9750
|
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
9465
9751
|
|
9466
9752
|
<!-- tab is padding-right -->
|
@@ -9498,6 +9784,7 @@
|
|
9498
9784
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
9499
9785
|
</xsl:if>
|
9500
9786
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
|
9787
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
9501
9788
|
<!-- <xsl:value-of select="@reference"/> -->
|
9502
9789
|
<xsl:apply-templates/>
|
9503
9790
|
</fo:inline>
|
@@ -9545,6 +9832,8 @@
|
|
9545
9832
|
|
9546
9833
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
9547
9834
|
|
9835
|
+
<xsl:call-template name="refine_figure-style"/>
|
9836
|
+
|
9548
9837
|
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
9549
9838
|
<xsl:call-template name="setIDforNamedDestination"/>
|
9550
9839
|
</xsl:for-each>
|
@@ -9588,6 +9877,7 @@
|
|
9588
9877
|
|
9589
9878
|
<xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
|
9590
9879
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
9880
|
+
<xsl:call-template name="refine_figure-pseudocode-p-style"/>
|
9591
9881
|
<xsl:apply-templates/>
|
9592
9882
|
</fo:block>
|
9593
9883
|
</xsl:template>
|
@@ -9717,6 +10007,8 @@
|
|
9717
10007
|
</xsl:variable>
|
9718
10008
|
<xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
|
9719
10009
|
|
10010
|
+
<xsl:call-template name="refine_image-graphic-style"/>
|
10011
|
+
|
9720
10012
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
|
9721
10013
|
<xsl:variable name="scale">
|
9722
10014
|
<xsl:call-template name="getImageScale">
|
@@ -10416,6 +10708,9 @@
|
|
10416
10708
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10417
10709
|
</xsl:attribute-set> <!-- formula-style -->
|
10418
10710
|
|
10711
|
+
<xsl:template name="refine_formula-style">
|
10712
|
+
</xsl:template>
|
10713
|
+
|
10419
10714
|
<xsl:attribute-set name="formula-stem-block-style">
|
10420
10715
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
10421
10716
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
@@ -10487,6 +10782,8 @@
|
|
10487
10782
|
<xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
|
10488
10783
|
<fo:block xsl:use-attribute-sets="formula-style">
|
10489
10784
|
|
10785
|
+
<xsl:call-template name="refine_formula-style"/>
|
10786
|
+
|
10490
10787
|
<fo:table table-layout="fixed" width="100%">
|
10491
10788
|
<fo:table-column column-width="95%"/>
|
10492
10789
|
<fo:table-column column-width="5%"/>
|
@@ -10914,6 +11211,9 @@
|
|
10914
11211
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
10915
11212
|
</xsl:attribute-set> <!-- list-name-style -->
|
10916
11213
|
|
11214
|
+
<xsl:template name="refine_list-name-style">
|
11215
|
+
</xsl:template>
|
11216
|
+
|
10917
11217
|
<xsl:attribute-set name="list-item-style">
|
10918
11218
|
</xsl:attribute-set>
|
10919
11219
|
|
@@ -11212,6 +11512,7 @@
|
|
11212
11512
|
<xsl:param name="process">false</xsl:param>
|
11213
11513
|
<xsl:if test="$process = 'true'">
|
11214
11514
|
<fo:block xsl:use-attribute-sets="list-name-style">
|
11515
|
+
<xsl:call-template name="refine_list-name-style"/>
|
11215
11516
|
<xsl:apply-templates/>
|
11216
11517
|
</fo:block>
|
11217
11518
|
</xsl:if>
|
@@ -11272,28 +11573,49 @@
|
|
11272
11573
|
<!-- END Lists processing -->
|
11273
11574
|
<!-- ===================================== -->
|
11274
11575
|
|
11576
|
+
<xsl:attribute-set name="footnote-separator-leader-style">
|
11577
|
+
</xsl:attribute-set>
|
11578
|
+
|
11579
|
+
<xsl:template name="refine_footnote-separator-leader-style">
|
11580
|
+
</xsl:template>
|
11581
|
+
|
11582
|
+
<xsl:attribute-set name="fn-container-body-style">
|
11583
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
11584
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
11585
|
+
</xsl:attribute-set>
|
11586
|
+
|
11587
|
+
<xsl:template name="refine_fn-container-body-style">
|
11588
|
+
</xsl:template>
|
11589
|
+
|
11275
11590
|
<xsl:attribute-set name="fn-reference-style">
|
11276
11591
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
11277
11592
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
11278
|
-
|
11279
|
-
</xsl:attribute-set>
|
11593
|
+
</xsl:attribute-set> <!-- fn-reference-style -->
|
11280
11594
|
|
11281
11595
|
<xsl:template name="refine_fn-reference-style">
|
11282
11596
|
<xsl:if test="ancestor::*[local-name()='table']">
|
11283
11597
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
11284
11598
|
<xsl:attribute name="baseline-shift">15%</xsl:attribute>
|
11285
11599
|
</xsl:if>
|
11600
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
11601
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
11286
11602
|
</xsl:template> <!-- refine_fn-reference-style -->
|
11287
11603
|
|
11288
11604
|
<xsl:attribute-set name="fn-style">
|
11289
11605
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
11290
11606
|
</xsl:attribute-set>
|
11291
11607
|
|
11608
|
+
<xsl:template name="refine_fn-style">
|
11609
|
+
</xsl:template>
|
11610
|
+
|
11292
11611
|
<xsl:attribute-set name="fn-num-style">
|
11293
11612
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
11294
11613
|
<xsl:attribute name="font-size">65%</xsl:attribute>
|
11295
11614
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
11296
|
-
</xsl:attribute-set>
|
11615
|
+
</xsl:attribute-set> <!-- fn-num-style -->
|
11616
|
+
|
11617
|
+
<xsl:template name="refine_fn-num-style">
|
11618
|
+
</xsl:template>
|
11297
11619
|
|
11298
11620
|
<xsl:attribute-set name="fn-body-style">
|
11299
11621
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
@@ -11304,7 +11626,7 @@
|
|
11304
11626
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
11305
11627
|
<xsl:attribute name="line-height">124%</xsl:attribute>
|
11306
11628
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
11307
|
-
</xsl:attribute-set>
|
11629
|
+
</xsl:attribute-set> <!-- fn-body-style" -->
|
11308
11630
|
|
11309
11631
|
<xsl:template name="refine_fn-body-style">
|
11310
11632
|
</xsl:template> <!-- refine_fn-body-style -->
|
@@ -11369,10 +11691,12 @@
|
|
11369
11691
|
<xsl:choose>
|
11370
11692
|
<xsl:when test="ancestor::mn:bibitem">
|
11371
11693
|
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
11694
|
+
<xsl:call-template name="refine_bibitem-note-fn-style"/>
|
11372
11695
|
</fn_styles>
|
11373
11696
|
</xsl:when>
|
11374
11697
|
<xsl:otherwise>
|
11375
11698
|
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
11699
|
+
<xsl:call-template name="refine_fn-num-style"/>
|
11376
11700
|
</fn_styles>
|
11377
11701
|
</xsl:otherwise>
|
11378
11702
|
</xsl:choose>
|
@@ -11382,9 +11706,12 @@
|
|
11382
11706
|
<xsl:copy-of select="."/>
|
11383
11707
|
</xsl:for-each>
|
11384
11708
|
|
11385
|
-
|
11709
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
11710
|
+
<!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
|
11386
11711
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
11387
|
-
</xsl:if>
|
11712
|
+
</xsl:if> -->
|
11713
|
+
|
11714
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
11388
11715
|
|
11389
11716
|
<xsl:call-template name="insert_basic_link">
|
11390
11717
|
<xsl:with-param name="element">
|
@@ -11407,10 +11734,12 @@
|
|
11407
11734
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
11408
11735
|
|
11409
11736
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
11737
|
+
<xsl:call-template name="refine_fn-style"/>
|
11410
11738
|
<xsl:copy-of select="$footnote_inline"/>
|
11411
11739
|
<fo:footnote-body role="Note">
|
11412
11740
|
|
11413
11741
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
11742
|
+
<xsl:call-template name="refine_fn-container-body-style"/>
|
11414
11743
|
|
11415
11744
|
<xsl:variable name="fn_block">
|
11416
11745
|
<xsl:call-template name="refine_fn-body-style"/>
|
@@ -11509,17 +11838,30 @@
|
|
11509
11838
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
11510
11839
|
</xsl:attribute-set> <!-- admonition-style -->
|
11511
11840
|
|
11841
|
+
<xsl:template name="refine_admonition-style">
|
11842
|
+
</xsl:template>
|
11843
|
+
|
11512
11844
|
<xsl:attribute-set name="admonition-container-style">
|
11513
11845
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
11514
11846
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
11515
11847
|
</xsl:attribute-set> <!-- admonition-container-style -->
|
11516
11848
|
|
11849
|
+
<xsl:template name="refine_admonition-container-style">
|
11850
|
+
</xsl:template>
|
11851
|
+
|
11517
11852
|
<xsl:attribute-set name="admonition-name-style">
|
11518
11853
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
11519
11854
|
</xsl:attribute-set> <!-- admonition-name-style -->
|
11520
11855
|
|
11856
|
+
<xsl:template name="refine_admonition-name-style">
|
11857
|
+
</xsl:template>
|
11858
|
+
|
11521
11859
|
<xsl:attribute-set name="admonition-p-style">
|
11522
11860
|
</xsl:attribute-set> <!-- admonition-p-style -->
|
11861
|
+
|
11862
|
+
<xsl:template name="refine_admonition-p-style">
|
11863
|
+
</xsl:template>
|
11864
|
+
|
11523
11865
|
<!-- end admonition -->
|
11524
11866
|
|
11525
11867
|
<!-- ================ -->
|
@@ -11528,6 +11870,8 @@
|
|
11528
11870
|
<xsl:template match="mn:admonition">
|
11529
11871
|
<fo:block xsl:use-attribute-sets="admonition-style">
|
11530
11872
|
|
11873
|
+
<xsl:call-template name="refine_admonition-style"/>
|
11874
|
+
|
11531
11875
|
<xsl:call-template name="setBlockSpanAll"/>
|
11532
11876
|
|
11533
11877
|
<xsl:if test="@type = 'editorial'">
|
@@ -11595,6 +11939,7 @@
|
|
11595
11939
|
|
11596
11940
|
<xsl:template match="mn:admonition/mn:p">
|
11597
11941
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
11942
|
+
<xsl:call-template name="refine_admonition-p-style"/>
|
11598
11943
|
|
11599
11944
|
<xsl:apply-templates/>
|
11600
11945
|
</fo:block>
|
@@ -11604,11 +11949,21 @@
|
|
11604
11949
|
<!-- END Admonition -->
|
11605
11950
|
<!-- ================ -->
|
11606
11951
|
|
11952
|
+
<xsl:attribute-set name="references-non-normative-title-style">
|
11953
|
+
</xsl:attribute-set>
|
11954
|
+
|
11955
|
+
<xsl:template name="refine_references-non-normative-title-style">
|
11956
|
+
|
11957
|
+
</xsl:template>
|
11958
|
+
|
11607
11959
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
11608
11960
|
<xsl:attribute-set name="bibitem-normative-style">
|
11609
11961
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
11610
11962
|
</xsl:attribute-set> <!-- bibitem-normative-style -->
|
11611
11963
|
|
11964
|
+
<xsl:template name="refine_bibitem-normative-style">
|
11965
|
+
</xsl:template>
|
11966
|
+
|
11612
11967
|
<!-- bibitem in Normative References (references/@normative="true"), renders as list -->
|
11613
11968
|
<xsl:attribute-set name="bibitem-normative-list-style">
|
11614
11969
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
@@ -11616,9 +11971,15 @@
|
|
11616
11971
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
11617
11972
|
</xsl:attribute-set> <!-- bibitem-normative-list-style -->
|
11618
11973
|
|
11974
|
+
<xsl:template name="refine_bibitem-normative-list-style">
|
11975
|
+
</xsl:template>
|
11976
|
+
|
11619
11977
|
<xsl:attribute-set name="bibitem-non-normative-style">
|
11620
11978
|
</xsl:attribute-set> <!-- bibitem-non-normative-style -->
|
11621
11979
|
|
11980
|
+
<xsl:template name="refine_bibitem-non-normative-style">
|
11981
|
+
</xsl:template>
|
11982
|
+
|
11622
11983
|
<!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
|
11623
11984
|
<xsl:attribute-set name="bibitem-non-normative-list-style">
|
11624
11985
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
@@ -11626,18 +11987,30 @@
|
|
11626
11987
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
11627
11988
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
|
11628
11989
|
|
11990
|
+
<xsl:template name="refine_bibitem-non-normative-list-style">
|
11991
|
+
</xsl:template>
|
11992
|
+
|
11629
11993
|
<xsl:attribute-set name="bibitem-non-normative-list-item-style">
|
11630
11994
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
11631
11995
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
11632
11996
|
</xsl:attribute-set>
|
11633
11997
|
|
11998
|
+
<xsl:template name="refine_bibitem-non-normative-list-item-style">
|
11999
|
+
</xsl:template>
|
12000
|
+
|
11634
12001
|
<!-- bibitem in bibliography section (references/@normative="false"), list body -->
|
11635
12002
|
<xsl:attribute-set name="bibitem-normative-list-body-style">
|
11636
12003
|
</xsl:attribute-set>
|
11637
12004
|
|
12005
|
+
<xsl:template name="refine_bibitem-normative-list-body-style">
|
12006
|
+
</xsl:template>
|
12007
|
+
|
11638
12008
|
<xsl:attribute-set name="bibitem-non-normative-list-body-style">
|
11639
12009
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
|
11640
12010
|
|
12011
|
+
<xsl:template name="refine_bibitem-non-normative-list-body-style">
|
12012
|
+
</xsl:template>
|
12013
|
+
|
11641
12014
|
<!-- footnote reference number for bibitem, in the text -->
|
11642
12015
|
<xsl:attribute-set name="bibitem-note-fn-style">
|
11643
12016
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
@@ -11646,6 +12019,9 @@
|
|
11646
12019
|
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
11647
12020
|
</xsl:attribute-set> <!-- bibitem-note-fn-style -->
|
11648
12021
|
|
12022
|
+
<xsl:template name="refine_bibitem-note-fn-style">
|
12023
|
+
</xsl:template>
|
12024
|
+
|
11649
12025
|
<!-- footnote number on the page bottom -->
|
11650
12026
|
<xsl:attribute-set name="bibitem-note-fn-number-style">
|
11651
12027
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
@@ -11664,6 +12040,9 @@
|
|
11664
12040
|
<xsl:attribute-set name="references-non-normative-style">
|
11665
12041
|
</xsl:attribute-set> <!-- references-non-normative-style -->
|
11666
12042
|
|
12043
|
+
<xsl:template name="refine_references-non-normative-style">
|
12044
|
+
</xsl:template>
|
12045
|
+
|
11667
12046
|
<!-- ======================= -->
|
11668
12047
|
<!-- Bibliography rendering -->
|
11669
12048
|
<!-- ======================= -->
|
@@ -11705,6 +12084,7 @@
|
|
11705
12084
|
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
11706
12085
|
|
11707
12086
|
<fo:block xsl:use-attribute-sets="references-non-normative-style">
|
12087
|
+
<xsl:call-template name="refine_references-non-normative-style"/>
|
11708
12088
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
11709
12089
|
</fo:block>
|
11710
12090
|
</xsl:template> <!-- references -->
|
@@ -11718,18 +12098,22 @@
|
|
11718
12098
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
11719
12099
|
<xsl:call-template name="setNamedDestination"/>
|
11720
12100
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
12101
|
+
<xsl:call-template name="refine_bibitem-normative-style"/>
|
12102
|
+
|
11721
12103
|
<xsl:call-template name="processBibitem"/>
|
11722
12104
|
</fo:block>
|
11723
12105
|
|
11724
12106
|
</xsl:template> <!-- bibitem -->
|
11725
12107
|
|
11726
12108
|
<!-- Bibliography (non-normative references) -->
|
11727
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem
|
12109
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
11728
12110
|
<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
|
11729
12111
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
11730
12112
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
11731
12113
|
<xsl:call-template name="setNamedDestination"/>
|
11732
12114
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
12115
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-style"/>
|
12116
|
+
|
11733
12117
|
<fo:list-item>
|
11734
12118
|
<fo:list-item-label end-indent="label-end()">
|
11735
12119
|
<fo:block role="SKIP">
|
@@ -11742,6 +12126,7 @@
|
|
11742
12126
|
</fo:list-item-label>
|
11743
12127
|
<fo:list-item-body start-indent="body-start()">
|
11744
12128
|
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
|
12129
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
|
11745
12130
|
<xsl:call-template name="processBibitem">
|
11746
12131
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
11747
12132
|
</xsl:call-template>
|
@@ -11752,12 +12137,17 @@
|
|
11752
12137
|
|
11753
12138
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
11754
12139
|
|
12140
|
+
<!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
|
12141
|
+
<xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
|
12142
|
+
|
11755
12143
|
<xsl:template name="insertListItem_Bibitem">
|
11756
12144
|
<xsl:choose>
|
11757
12145
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
11758
12146
|
<xsl:otherwise>
|
11759
12147
|
<xsl:call-template name="setNamedDestination"/>
|
11760
12148
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
12149
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
|
12150
|
+
|
11761
12151
|
<fo:list-item-label end-indent="label-end()">
|
11762
12152
|
<fo:block role="SKIP">
|
11763
12153
|
<fo:inline role="SKIP">
|
@@ -11768,16 +12158,18 @@
|
|
11768
12158
|
</fo:block>
|
11769
12159
|
</fo:list-item-label>
|
11770
12160
|
<fo:list-item-body start-indent="body-start()">
|
11771
|
-
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP"
|
12161
|
+
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
|
12162
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
|
11772
12163
|
<xsl:call-template name="processBibitem">
|
11773
12164
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
11774
12165
|
</xsl:call-template>
|
11775
12166
|
</fo:block>
|
12167
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
11776
12168
|
</fo:list-item-body>
|
11777
12169
|
</fo:list-item>
|
11778
12170
|
</xsl:otherwise>
|
11779
12171
|
</xsl:choose>
|
11780
|
-
<xsl:apply-templates select="following-sibling::*[
|
12172
|
+
<xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
|
11781
12173
|
<xsl:with-param name="skip">false</xsl:with-param>
|
11782
12174
|
</xsl:apply-templates>
|
11783
12175
|
</xsl:template>
|
@@ -11797,25 +12189,16 @@
|
|
11797
12189
|
<xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
|
11798
12190
|
</xsl:apply-templates>
|
11799
12191
|
<xsl:apply-templates select="mn:formattedref"/>
|
12192
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
11800
12193
|
<!-- end bibitem processing -->
|
11801
|
-
|
11802
|
-
<xsl:call-template name="processBibliographyNote"/>
|
11803
12194
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
11804
12195
|
|
11805
|
-
<xsl:template name="
|
11806
|
-
|
11807
|
-
|
11808
|
-
|
11809
|
-
<xsl:copy> <!-- skip @id -->
|
11810
|
-
<xsl:copy-of select="node()"/>
|
11811
|
-
</xsl:copy>
|
11812
|
-
</xsl:element>
|
11813
|
-
</xsl:variable>
|
11814
|
-
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
11815
|
-
<xsl:call-template name="note"/>
|
11816
|
-
</xsl:for-each> -->
|
12196
|
+
<xsl:template name="processBibitemFollowingNotes">
|
12197
|
+
<!-- current context is bibitem element -->
|
12198
|
+
<xsl:variable name="bibitem_id" select="@id"/>
|
12199
|
+
<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]]">
|
11817
12200
|
<xsl:call-template name="note"/>
|
11818
|
-
</xsl:
|
12201
|
+
</xsl:for-each>
|
11819
12202
|
</xsl:template>
|
11820
12203
|
|
11821
12204
|
<xsl:template match="mn:title" mode="title">
|
@@ -12017,13 +12400,19 @@
|
|
12017
12400
|
<xsl:attribute name="role">H1</xsl:attribute>
|
12018
12401
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
12019
12402
|
<xsl:attribute name="span">all</xsl:attribute>
|
12020
|
-
</xsl:attribute-set>
|
12403
|
+
</xsl:attribute-set> <!-- indexsect-title-style -->
|
12404
|
+
|
12405
|
+
<xsl:template name="refine_indexsect-title-style">
|
12406
|
+
</xsl:template>
|
12021
12407
|
|
12022
12408
|
<xsl:attribute-set name="indexsect-clause-title-style">
|
12023
12409
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
12024
12410
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
12025
12411
|
<xsl:attribute name="margin-left">25mm</xsl:attribute>
|
12026
|
-
</xsl:attribute-set>
|
12412
|
+
</xsl:attribute-set> <!-- indexsect-clause-title-style -->
|
12413
|
+
|
12414
|
+
<xsl:template name="refine_indexsect-clause-title-style">
|
12415
|
+
</xsl:template>
|
12027
12416
|
<!-- End Index section styles -->
|
12028
12417
|
|
12029
12418
|
<!-- =================== -->
|
@@ -12217,6 +12606,7 @@
|
|
12217
12606
|
|
12218
12607
|
<xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
|
12219
12608
|
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
12609
|
+
<xsl:call-template name="refine_indexsect-title-style"/>
|
12220
12610
|
<!-- Index -->
|
12221
12611
|
<xsl:apply-templates/>
|
12222
12612
|
</fo:block>
|
@@ -12225,6 +12615,7 @@
|
|
12225
12615
|
<xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
|
12226
12616
|
<!-- Letter A, B, C, ... -->
|
12227
12617
|
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
12618
|
+
<xsl:call-template name="refine_indexsect-clause-title-style"/>
|
12228
12619
|
<xsl:apply-templates/>
|
12229
12620
|
</fo:block>
|
12230
12621
|
</xsl:template>
|
@@ -12267,13 +12658,31 @@
|
|
12267
12658
|
<!-- skip here, see the template 'fmt-review-start' -->
|
12268
12659
|
</xsl:when>
|
12269
12660
|
<xsl:otherwise>
|
12270
|
-
|
12271
|
-
|
12272
|
-
|
12273
|
-
|
12661
|
+
<xsl:choose>
|
12662
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
12663
|
+
<fo:block font-size="1pt" line-height="0.1">
|
12664
|
+
<xsl:call-template name="fo_inline_bookmark">
|
12665
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
12666
|
+
</xsl:call-template>
|
12667
|
+
</fo:block>
|
12668
|
+
</xsl:when>
|
12669
|
+
<xsl:otherwise>
|
12670
|
+
<xsl:call-template name="fo_inline_bookmark">
|
12671
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
12672
|
+
</xsl:call-template>
|
12673
|
+
</xsl:otherwise>
|
12674
|
+
</xsl:choose>
|
12274
12675
|
</xsl:otherwise>
|
12275
12676
|
</xsl:choose>
|
12276
12677
|
</xsl:template>
|
12678
|
+
|
12679
|
+
<xsl:template name="fo_inline_bookmark">
|
12680
|
+
<xsl:param name="bookmark_id"/>
|
12681
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
12682
|
+
<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>
|
12683
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
12684
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
12685
|
+
</xsl:template>
|
12277
12686
|
<!-- =================== -->
|
12278
12687
|
<!-- End of Index processing -->
|
12279
12688
|
<!-- =================== -->
|
@@ -12406,9 +12815,15 @@
|
|
12406
12815
|
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
12407
12816
|
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
12408
12817
|
|
12818
|
+
<xsl:template name="refine_toc-leader-style">
|
12819
|
+
</xsl:template>
|
12820
|
+
|
12409
12821
|
<xsl:attribute-set name="toc-pagenumber-style">
|
12410
12822
|
</xsl:attribute-set>
|
12411
12823
|
|
12824
|
+
<xsl:template name="refine_toc-pagenumber-style">
|
12825
|
+
</xsl:template>
|
12826
|
+
|
12412
12827
|
<!-- List of Figures, Tables -->
|
12413
12828
|
<xsl:attribute-set name="toc-listof-title-style">
|
12414
12829
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -12422,12 +12837,18 @@
|
|
12422
12837
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
12423
12838
|
</xsl:attribute-set>
|
12424
12839
|
|
12840
|
+
<xsl:template name="refine_toc-listof-item-block-style">
|
12841
|
+
</xsl:template>
|
12842
|
+
|
12425
12843
|
<xsl:attribute-set name="toc-listof-item-style">
|
12426
12844
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
12427
12845
|
<xsl:attribute name="margin-left">17mm</xsl:attribute>
|
12428
12846
|
<xsl:attribute name="text-indent">-12mm</xsl:attribute>
|
12429
12847
|
</xsl:attribute-set>
|
12430
12848
|
|
12849
|
+
<xsl:template name="refine_toc-listof-item-style">
|
12850
|
+
</xsl:template>
|
12851
|
+
|
12431
12852
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
12432
12853
|
<xsl:variable name="nodes_preface_">
|
12433
12854
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -13539,23 +13960,55 @@
|
|
13539
13960
|
<!-- Ruby text (CJK languages) rendering -->
|
13540
13961
|
<!-- ===================================== -->
|
13541
13962
|
<!-- ===================================== -->
|
13963
|
+
|
13964
|
+
<xsl:attribute-set name="ruby-style">
|
13965
|
+
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
13966
|
+
<xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
|
13967
|
+
</xsl:attribute-set>
|
13968
|
+
|
13969
|
+
<xsl:template name="refine_ruby-style">
|
13970
|
+
<xsl:if test="not(ancestor::mn:ruby)">
|
13971
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
13972
|
+
</xsl:if>
|
13973
|
+
<xsl:variable name="rt_text" select="mn:rt"/>
|
13974
|
+
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
13975
|
+
<!-- Example: width="2em" -->
|
13976
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
13977
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
13978
|
+
<xsl:variable name="text_width">
|
13979
|
+
<xsl:choose>
|
13980
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
13981
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
13982
|
+
</xsl:choose>
|
13983
|
+
</xsl:variable>
|
13984
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
13985
|
+
</xsl:template> <!-- refine_ruby-style -->
|
13986
|
+
|
13987
|
+
<xsl:attribute-set name="rb-style">
|
13988
|
+
<xsl:attribute name="line-height">1em</xsl:attribute>
|
13989
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
13990
|
+
</xsl:attribute-set>
|
13991
|
+
|
13992
|
+
<xsl:template name="refine_rb-style">
|
13993
|
+
</xsl:template>
|
13994
|
+
|
13995
|
+
<xsl:attribute-set name="rt-style">
|
13996
|
+
<xsl:attribute name="font-size">0.5em</xsl:attribute>
|
13997
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
13998
|
+
<xsl:attribute name="line-height">1.2em</xsl:attribute>
|
13999
|
+
<xsl:attribute name="space-before">-1.4em</xsl:attribute>
|
14000
|
+
<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
|
14001
|
+
</xsl:attribute-set>
|
14002
|
+
|
14003
|
+
<xsl:template name="refine_rt-style">
|
14004
|
+
<xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
|
14005
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
14006
|
+
</xsl:if>
|
14007
|
+
</xsl:template>
|
14008
|
+
|
13542
14009
|
<xsl:template match="mn:ruby">
|
13543
|
-
<fo:inline-container
|
13544
|
-
<xsl:
|
13545
|
-
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
13546
|
-
</xsl:if>
|
13547
|
-
<xsl:variable name="rt_text" select="mn:rt"/>
|
13548
|
-
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
13549
|
-
<!-- Example: width="2em" -->
|
13550
|
-
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
13551
|
-
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
13552
|
-
<xsl:variable name="text_width">
|
13553
|
-
<xsl:choose>
|
13554
|
-
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
13555
|
-
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
13556
|
-
</xsl:choose>
|
13557
|
-
</xsl:variable>
|
13558
|
-
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
14010
|
+
<fo:inline-container xsl:use-attribute-sets="ruby-style">
|
14011
|
+
<xsl:call-template name="refine_ruby-style"/>
|
13559
14012
|
|
13560
14013
|
<xsl:choose>
|
13561
14014
|
<xsl:when test="ancestor::mn:ruby">
|
@@ -13573,17 +14026,14 @@
|
|
13573
14026
|
</xsl:template>
|
13574
14027
|
|
13575
14028
|
<xsl:template match="mn:rb">
|
13576
|
-
<fo:block
|
14029
|
+
<fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
|
13577
14030
|
</xsl:template>
|
13578
14031
|
|
13579
14032
|
<xsl:template match="mn:rt">
|
13580
|
-
<fo:block
|
13581
|
-
<xsl:
|
13582
|
-
<xsl:attribute name="space-before">0em</xsl:attribute>
|
13583
|
-
</xsl:if>
|
14033
|
+
<fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
|
14034
|
+
<xsl:call-template name="refine_rt-style"/>
|
13584
14035
|
<xsl:apply-templates/>
|
13585
14036
|
</fo:block>
|
13586
|
-
|
13587
14037
|
</xsl:template>
|
13588
14038
|
|
13589
14039
|
<!-- ===================================== -->
|
@@ -13592,6 +14042,18 @@
|
|
13592
14042
|
<!-- ===================================== -->
|
13593
14043
|
<!-- ===================================== -->
|
13594
14044
|
|
14045
|
+
<xsl:attribute-set name="annex-title-style">
|
14046
|
+
</xsl:attribute-set>
|
14047
|
+
|
14048
|
+
<xsl:template name="refine_annex-title-style">
|
14049
|
+
</xsl:template>
|
14050
|
+
|
14051
|
+
<xsl:attribute-set name="p-zzSTDTitle1-style">
|
14052
|
+
</xsl:attribute-set>
|
14053
|
+
|
14054
|
+
<xsl:template name="refine_p-zzSTDTitle1-style">
|
14055
|
+
</xsl:template>
|
14056
|
+
|
13595
14057
|
<xsl:template name="processPrefaceSectionsDefault">
|
13596
14058
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
13597
14059
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -14153,11 +14615,35 @@
|
|
14153
14615
|
|
14154
14616
|
<xsl:template match="mn:svgmap"/>
|
14155
14617
|
|
14618
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
14619
|
+
|
14156
14620
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
14157
14621
|
<xsl:template match="*[local-name() = 'lang_none']">
|
14158
14622
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
14159
14623
|
</xsl:template>
|
14160
14624
|
|
14625
|
+
<xsl:template name="addTagElementT">
|
14626
|
+
<xsl:variable name="title_">
|
14627
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
14628
|
+
</xsl:variable>
|
14629
|
+
<xsl:variable name="title__">
|
14630
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
14631
|
+
<xsl:choose>
|
14632
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
14633
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
14634
|
+
</xsl:choose>
|
14635
|
+
</xsl:for-each>
|
14636
|
+
</xsl:variable>
|
14637
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
14638
|
+
<xsl:if test="$title != ''">
|
14639
|
+
<xsl:attribute name="fox:title">
|
14640
|
+
<xsl:if test="ancestor::mn:sections">
|
14641
|
+
<xsl:text>Section </xsl:text>
|
14642
|
+
</xsl:if>
|
14643
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
14644
|
+
</xsl:if>
|
14645
|
+
</xsl:template>
|
14646
|
+
|
14161
14647
|
<xsl:template name="replaceChar">
|
14162
14648
|
<xsl:param name="text"/>
|
14163
14649
|
<xsl:param name="replace"/>
|
@@ -14923,6 +15409,13 @@
|
|
14923
15409
|
<xsl:with-param name="default" select="$text_align_default"/>
|
14924
15410
|
</xsl:call-template>
|
14925
15411
|
<xsl:call-template name="setKeepAttributes"/>
|
15412
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
15413
|
+
<xsl:variable name="styles">
|
15414
|
+
<xsl:apply-templates select="*[1]"/>
|
15415
|
+
</xsl:variable>
|
15416
|
+
<!-- move attribute line-height from inline to block -->
|
15417
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
15418
|
+
</xsl:if>
|
14926
15419
|
</xsl:template>
|
14927
15420
|
|
14928
15421
|
<xsl:template name="setKeepAttributes">
|
@@ -14948,34 +15441,41 @@
|
|
14948
15441
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
14949
15442
|
<fo:block>
|
14950
15443
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
14951
|
-
|
14952
|
-
|
14953
|
-
|
14954
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
14955
|
-
<xsl:call-template name="getSVG"/>
|
14956
|
-
</fo:instream-foreign-object>
|
14957
|
-
</xsl:when>
|
14958
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
14959
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
14960
|
-
</xsl:when>
|
14961
|
-
<xsl:otherwise> <!-- bitmap image -->
|
14962
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
14963
|
-
<xsl:if test="$coverimage_src != ''">
|
14964
|
-
<xsl:variable name="coverpage">
|
14965
|
-
<xsl:call-template name="getImageURL">
|
14966
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
14967
|
-
</xsl:call-template>
|
14968
|
-
</xsl:variable>
|
14969
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
14970
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
14971
|
-
</xsl:if>
|
14972
|
-
</xsl:otherwise>
|
14973
|
-
</xsl:choose>
|
15444
|
+
|
15445
|
+
<xsl:call-template name="insertPageImage"/>
|
15446
|
+
|
14974
15447
|
</xsl:for-each>
|
14975
15448
|
</fo:block>
|
14976
15449
|
</fo:block-container>
|
14977
15450
|
</xsl:template>
|
14978
15451
|
|
15452
|
+
<xsl:template name="insertPageImage">
|
15453
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
15454
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
15455
|
+
<xsl:choose>
|
15456
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
15457
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
15458
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
15459
|
+
<xsl:call-template name="getSVG"/>
|
15460
|
+
</fo:instream-foreign-object>
|
15461
|
+
</xsl:when>
|
15462
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
15463
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
15464
|
+
</xsl:when>
|
15465
|
+
<xsl:otherwise> <!-- bitmap image -->
|
15466
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
15467
|
+
<xsl:if test="$coverimage_src != ''">
|
15468
|
+
<xsl:variable name="coverpage">
|
15469
|
+
<xsl:call-template name="getImageURL">
|
15470
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
15471
|
+
</xsl:call-template>
|
15472
|
+
</xsl:variable>
|
15473
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
15474
|
+
</xsl:if>
|
15475
|
+
</xsl:otherwise>
|
15476
|
+
</xsl:choose>
|
15477
|
+
</xsl:template>
|
15478
|
+
|
14979
15479
|
<xsl:template name="getImageURL">
|
14980
15480
|
<xsl:param name="src"/>
|
14981
15481
|
<xsl:choose>
|
@@ -15403,6 +15903,14 @@
|
|
15403
15903
|
</xsl:attribute>
|
15404
15904
|
</xsl:template>
|
15405
15905
|
|
15906
|
+
<xsl:template name="getCharByCodePoint">
|
15907
|
+
<xsl:param name="codepoint"/>
|
15908
|
+
<xsl:param name="radix">16</xsl:param>
|
15909
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
15910
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
15911
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
15912
|
+
</xsl:template>
|
15913
|
+
|
15406
15914
|
<xsl:template name="substring-after-last">
|
15407
15915
|
<xsl:param name="value"/>
|
15408
15916
|
<xsl:param name="delimiter"/>
|