metanorma-itu 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/itu/itu.implementers-guide.xsl +701 -197
- data/lib/isodoc/itu/itu.in-force.xsl +701 -197
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +701 -197
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +701 -197
- data/lib/isodoc/itu/itu.recommendation.xsl +701 -197
- data/lib/isodoc/itu/itu.resolution.xsl +701 -197
- data/lib/isodoc/itu/itu.service-publication.xsl +701 -197
- data/lib/isodoc/itu/itu.technical-paper.xsl +701 -197
- data/lib/isodoc/itu/itu.technical-report.xsl +701 -197
- data/lib/isodoc/itu/metadata.rb +11 -14
- data/lib/metanorma/itu/biblio-standoc.rng +0 -49
- data/lib/metanorma/itu/biblio.rng +11 -1
- data/lib/metanorma/itu/cleanup.rb +4 -0
- data/lib/metanorma/itu/front.rb +10 -61
- data/lib/metanorma/itu/front_contrib.rb +62 -0
- data/lib/metanorma/itu/front_id.rb +2 -4
- data/lib/metanorma/itu/isodoc.rng +24 -1
- data/lib/metanorma/itu/relaton-itu.rng +7 -58
- data/lib/metanorma/itu/version.rb +1 -1
- metadata +3 -2
@@ -634,7 +634,8 @@
|
|
634
634
|
<xsl:variable name="date_published"><xsl:call-template name="get_date_published"/></xsl:variable>
|
635
635
|
<xsl:variable name="annexid" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:structuredidentifier/mn:annexid)"/>
|
636
636
|
|
637
|
-
<xsl:variable name="bureau" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:bureau"/>
|
637
|
+
<!-- <xsl:variable name="bureau" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:bureau"/> -->
|
638
|
+
<xsl:variable name="bureau" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Bureau']/mn:name"/>
|
638
639
|
|
639
640
|
<xsl:variable name="docidentifier_ITU" select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'ITU']"/>
|
640
641
|
<xsl:variable name="docidentifier_ITU_left_part_" select="normalize-space(substring-before($docidentifier_ITU, ' '))"/>
|
@@ -745,7 +746,8 @@
|
|
745
746
|
<!-- Sector or Bureau name -->
|
746
747
|
<fo:table-cell text-align="end">
|
747
748
|
<fo:block>
|
748
|
-
<xsl:variable name="sector" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:sector)"/>
|
749
|
+
<!-- <xsl:variable name="sector" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:sector)"/> -->
|
750
|
+
<xsl:variable name="sector" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Sector']/mn:name"/>
|
749
751
|
<xsl:value-of select="$sector"/>
|
750
752
|
<xsl:if test="$sector = ''">
|
751
753
|
<xsl:variable name="bureau_key">
|
@@ -1114,7 +1116,8 @@
|
|
1114
1116
|
<fo:block font-weight="bold">Question(s):</fo:block>
|
1115
1117
|
</fo:table-cell>
|
1116
1118
|
<fo:table-cell padding-top="3mm">
|
1117
|
-
<fo:block><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:group/mn:name"/></fo:block>
|
1119
|
+
<!-- <fo:block><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:group/mn:name"/></fo:block> -->
|
1120
|
+
<fo:block><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Group']/mn:name"/></fo:block>
|
1118
1121
|
</fo:table-cell>
|
1119
1122
|
<fo:table-cell padding-top="3mm">
|
1120
1123
|
<fo:block font-weight="bold">Meeting, date:</fo:block>
|
@@ -1149,14 +1152,16 @@
|
|
1149
1152
|
<fo:block font-weight="bold">Study Group:</fo:block>
|
1150
1153
|
</fo:table-cell>
|
1151
1154
|
<fo:table-cell padding-top="2mm">
|
1152
|
-
<xsl:variable name="subgroup" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:subgroup/mn:name"/>
|
1155
|
+
<!-- <xsl:variable name="subgroup" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:subgroup/mn:name"/> -->
|
1156
|
+
<xsl:variable name="subgroup" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Subgroup']/mn:name"/>
|
1153
1157
|
<fo:block><xsl:value-of select="java:replaceAll(java:java.lang.String.new($subgroup),'(.)','$1')"/></fo:block>
|
1154
1158
|
</fo:table-cell>
|
1155
1159
|
<fo:table-cell padding-top="2mm">
|
1156
1160
|
<fo:block font-weight="bold">Working Party:</fo:block>
|
1157
1161
|
</fo:table-cell>
|
1158
1162
|
<fo:table-cell padding-top="2mm">
|
1159
|
-
<xsl:variable name="workgroup" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:workgroup/mn:name"/>
|
1163
|
+
<!-- <xsl:variable name="workgroup" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:workgroup/mn:name"/> -->
|
1164
|
+
<xsl:variable name="workgroup" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Workgroup']/mn:name"/>
|
1160
1165
|
<fo:block><xsl:value-of select="java:replaceAll(java:java.lang.String.new($workgroup),'(.)','$1')"/></fo:block>
|
1161
1166
|
</fo:table-cell>
|
1162
1167
|
<fo:table-cell padding-top="2mm">
|
@@ -2351,13 +2356,9 @@
|
|
2351
2356
|
</xsl:template>
|
2352
2357
|
|
2353
2358
|
<xsl:template match="mn:copyright-statement//mn:p" priority="2">
|
2354
|
-
<fo:block>
|
2355
|
-
<xsl:
|
2356
|
-
|
2357
|
-
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
2358
|
-
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
2359
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2360
|
-
</xsl:if>
|
2359
|
+
<fo:block xsl:use-attribute-sets="copyright-statement-p-style">
|
2360
|
+
<xsl:call-template name="refine_copyright-statement-p-style"/>
|
2361
|
+
|
2361
2362
|
<xsl:apply-templates/>
|
2362
2363
|
</fo:block>
|
2363
2364
|
</xsl:template>
|
@@ -2383,7 +2384,7 @@
|
|
2383
2384
|
<xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
|
2384
2385
|
</fo:inline>
|
2385
2386
|
<fo:inline font-weight="bold">
|
2386
|
-
<xsl:call-template name="
|
2387
|
+
<xsl:call-template name="refine_preferred-term-style"/>
|
2387
2388
|
<xsl:apply-templates/>
|
2388
2389
|
</fo:inline>
|
2389
2390
|
<xsl:if test="../mn:fmt-termsource">
|
@@ -4619,46 +4620,96 @@
|
|
4619
4620
|
<xsl:attribute-set name="copyright-statement-style">
|
4620
4621
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
4621
4622
|
|
4623
|
+
<xsl:template name="refine_copyright-statement-style">
|
4624
|
+
</xsl:template>
|
4625
|
+
|
4622
4626
|
<xsl:attribute-set name="copyright-statement-title-style">
|
4623
4627
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
4624
4628
|
|
4629
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
4630
|
+
</xsl:template>
|
4631
|
+
|
4625
4632
|
<xsl:attribute-set name="copyright-statement-p-style">
|
4626
4633
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
4627
4634
|
|
4628
|
-
|
4635
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
4636
|
+
<xsl:if test="not(preceding-sibling::mn:p)"> <!-- first para -->
|
4637
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
4638
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
4639
|
+
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
4640
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4641
|
+
</xsl:if>
|
4642
|
+
|
4643
|
+
</xsl:template>
|
4644
|
+
|
4645
|
+
<xsl:attribute-set name="license-statement-style">
|
4629
4646
|
</xsl:attribute-set> <!-- license-statement-style -->
|
4630
4647
|
|
4648
|
+
<xsl:template name="refine_license-statement-style">
|
4649
|
+
</xsl:template>
|
4650
|
+
|
4631
4651
|
<xsl:attribute-set name="license-statement-title-style">
|
4632
4652
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4633
4653
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
4634
4654
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
4635
4655
|
</xsl:attribute-set> <!-- license-statement-title-style -->
|
4636
4656
|
|
4657
|
+
<xsl:template name="refine_license-statement-title-style">
|
4658
|
+
</xsl:template>
|
4659
|
+
|
4637
4660
|
<xsl:attribute-set name="license-statement-p-style">
|
4638
4661
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
4639
4662
|
|
4663
|
+
<xsl:template name="refine_license-statement-p-style">
|
4664
|
+
|
4665
|
+
</xsl:template>
|
4666
|
+
|
4640
4667
|
<xsl:attribute-set name="legal-statement-style">
|
4641
4668
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
4642
4669
|
|
4670
|
+
<xsl:template name="refine_legal-statement-style">
|
4671
|
+
</xsl:template>
|
4672
|
+
|
4643
4673
|
<xsl:attribute-set name="legal-statement-title-style">
|
4644
4674
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4645
4675
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
4646
4676
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
4647
4677
|
</xsl:attribute-set> <!-- legal-statement-title-style -->
|
4648
4678
|
|
4679
|
+
<xsl:template name="refine_legal-statement-title-style">
|
4680
|
+
</xsl:template>
|
4681
|
+
|
4649
4682
|
<xsl:attribute-set name="legal-statement-p-style">
|
4650
4683
|
</xsl:attribute-set> <!-- legal-statement-p-style -->
|
4651
4684
|
|
4685
|
+
<xsl:template name="refine_legal-statement-p-style">
|
4686
|
+
<xsl:if test="@align">
|
4687
|
+
<xsl:attribute name="text-align">
|
4688
|
+
<xsl:value-of select="@align"/>
|
4689
|
+
</xsl:attribute>
|
4690
|
+
</xsl:if>
|
4691
|
+
</xsl:template>
|
4692
|
+
|
4652
4693
|
<xsl:attribute-set name="feedback-statement-style">
|
4653
4694
|
</xsl:attribute-set> <!-- feedback-statement-style -->
|
4654
4695
|
|
4696
|
+
<xsl:template name="refine_feedback-statement-style">
|
4697
|
+
</xsl:template>
|
4698
|
+
|
4655
4699
|
<xsl:attribute-set name="feedback-statement-title-style">
|
4656
4700
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4657
4701
|
</xsl:attribute-set> <!-- feedback-statement-title-style -->
|
4658
4702
|
|
4703
|
+
<xsl:template name="refine_feedback-statement-title-style">
|
4704
|
+
|
4705
|
+
</xsl:template>
|
4706
|
+
|
4659
4707
|
<xsl:attribute-set name="feedback-statement-p-style">
|
4660
4708
|
</xsl:attribute-set> <!-- feedback-statement-p-style -->
|
4661
4709
|
|
4710
|
+
<xsl:template name="refine_feedback-statement-p-style">
|
4711
|
+
</xsl:template>
|
4712
|
+
|
4662
4713
|
<!-- End boilerplate sections styles -->
|
4663
4714
|
|
4664
4715
|
<!-- ================================= -->
|
@@ -4666,6 +4717,8 @@
|
|
4666
4717
|
<!-- ================================= -->
|
4667
4718
|
<xsl:template match="mn:copyright-statement">
|
4668
4719
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
4720
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
4721
|
+
|
4669
4722
|
<xsl:apply-templates/>
|
4670
4723
|
</fo:block>
|
4671
4724
|
</xsl:template> <!-- copyright-statement -->
|
@@ -4682,6 +4735,7 @@
|
|
4682
4735
|
|
4683
4736
|
<xsl:template match="mn:license-statement">
|
4684
4737
|
<fo:block xsl:use-attribute-sets="license-statement-style">
|
4738
|
+
<xsl:call-template name="refine_license-statement-style"/>
|
4685
4739
|
<xsl:apply-templates/>
|
4686
4740
|
</fo:block>
|
4687
4741
|
</xsl:template> <!-- license-statement -->
|
@@ -4691,6 +4745,7 @@
|
|
4691
4745
|
<xsl:call-template name="getLevel"/>
|
4692
4746
|
</xsl:variable>
|
4693
4747
|
<fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
|
4748
|
+
<xsl:call-template name="refine_license-statement-title-style"/>
|
4694
4749
|
<xsl:apply-templates/>
|
4695
4750
|
</fo:block>
|
4696
4751
|
|
@@ -4704,6 +4759,7 @@
|
|
4704
4759
|
<xsl:template match="mn:legal-statement">
|
4705
4760
|
<xsl:param name="isLegacy">false</xsl:param>
|
4706
4761
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
4762
|
+
<xsl:call-template name="refine_legal-statement-style"/>
|
4707
4763
|
<xsl:apply-templates/>
|
4708
4764
|
</fo:block>
|
4709
4765
|
</xsl:template> <!-- legal-statement -->
|
@@ -4876,6 +4932,27 @@
|
|
4876
4932
|
<xsl:attribute-set name="sourcecode-container-style">
|
4877
4933
|
</xsl:attribute-set>
|
4878
4934
|
|
4935
|
+
<xsl:template name="refine_sourcecode-container-style">
|
4936
|
+
<xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
|
4937
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
4938
|
+
</xsl:if>
|
4939
|
+
|
4940
|
+
<xsl:if test="ancestor::mn:example">
|
4941
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
4942
|
+
</xsl:if>
|
4943
|
+
|
4944
|
+
<xsl:copy-of select="@id"/>
|
4945
|
+
|
4946
|
+
<xsl:if test="parent::mn:note">
|
4947
|
+
<xsl:attribute name="margin-left">
|
4948
|
+
<xsl:choose>
|
4949
|
+
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4950
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4951
|
+
</xsl:choose>
|
4952
|
+
</xsl:attribute>
|
4953
|
+
</xsl:if>
|
4954
|
+
</xsl:template>
|
4955
|
+
|
4879
4956
|
<xsl:attribute-set name="sourcecode-style">
|
4880
4957
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
4881
4958
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -4896,6 +4973,9 @@
|
|
4896
4973
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
4897
4974
|
</xsl:attribute-set> <!-- sourcecode-name-style -->
|
4898
4975
|
|
4976
|
+
<xsl:template name="refine_sourcecode-name-style">
|
4977
|
+
</xsl:template>
|
4978
|
+
|
4899
4979
|
<xsl:template name="add-zero-spaces-equal">
|
4900
4980
|
<xsl:param name="text" select="."/>
|
4901
4981
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
@@ -4983,24 +5063,8 @@
|
|
4983
5063
|
<xsl:otherwise>
|
4984
5064
|
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
|
4985
5065
|
|
4986
|
-
<xsl:
|
4987
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
4988
|
-
</xsl:if>
|
5066
|
+
<xsl:call-template name="refine_sourcecode-container-style"/>
|
4989
5067
|
|
4990
|
-
<xsl:if test="ancestor::mn:example">
|
4991
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
4992
|
-
</xsl:if>
|
4993
|
-
|
4994
|
-
<xsl:copy-of select="@id"/>
|
4995
|
-
|
4996
|
-
<xsl:if test="parent::mn:note">
|
4997
|
-
<xsl:attribute name="margin-left">
|
4998
|
-
<xsl:choose>
|
4999
|
-
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
5000
|
-
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
5001
|
-
</xsl:choose>
|
5002
|
-
</xsl:attribute>
|
5003
|
-
</xsl:if>
|
5004
5068
|
<fo:block-container margin-left="0mm" role="SKIP">
|
5005
5069
|
|
5006
5070
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
@@ -5327,6 +5391,7 @@
|
|
5327
5391
|
<xsl:template match="mn:sourcecode/mn:fmt-name">
|
5328
5392
|
<xsl:if test="normalize-space() != ''">
|
5329
5393
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
5394
|
+
<xsl:call-template name="refine_sourcecode-name-style"/>
|
5330
5395
|
<xsl:apply-templates/>
|
5331
5396
|
</fo:block>
|
5332
5397
|
</xsl:if>
|
@@ -5374,11 +5439,30 @@
|
|
5374
5439
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
5375
5440
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
5376
5441
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
5377
|
-
</xsl:attribute-set>
|
5442
|
+
</xsl:attribute-set> <!-- pre-style -->
|
5443
|
+
|
5444
|
+
<xsl:template name="refine_pre-style">
|
5445
|
+
</xsl:template>
|
5378
5446
|
|
5379
5447
|
<xsl:attribute-set name="tt-style">
|
5380
5448
|
</xsl:attribute-set>
|
5381
5449
|
|
5450
|
+
<xsl:template name="refine_tt-style">
|
5451
|
+
<xsl:variable name="_font-size"> <!-- inherit -->
|
5452
|
+
</xsl:variable>
|
5453
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
5454
|
+
<xsl:if test="$font-size != ''">
|
5455
|
+
<xsl:attribute name="font-size">
|
5456
|
+
<xsl:choose>
|
5457
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
5458
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
5459
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
5460
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
5461
|
+
</xsl:choose>
|
5462
|
+
</xsl:attribute>
|
5463
|
+
</xsl:if>
|
5464
|
+
</xsl:template>
|
5465
|
+
|
5382
5466
|
<xsl:variable name="color-added-text">
|
5383
5467
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
5384
5468
|
</xsl:variable>
|
@@ -5391,9 +5475,14 @@
|
|
5391
5475
|
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
5392
5476
|
</xsl:attribute-set>
|
5393
5477
|
|
5478
|
+
<xsl:template name="refine_add-style">
|
5479
|
+
</xsl:template>
|
5480
|
+
|
5394
5481
|
<xsl:variable name="add-style">
|
5395
|
-
|
5396
|
-
|
5482
|
+
<add-style xsl:use-attribute-sets="add-style">
|
5483
|
+
<xsl:call-template name="refine_add-style"/>
|
5484
|
+
</add-style>
|
5485
|
+
</xsl:variable>
|
5397
5486
|
<xsl:template name="append_add-style">
|
5398
5487
|
<xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
|
5399
5488
|
</xsl:template>
|
@@ -5406,27 +5495,80 @@
|
|
5406
5495
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
5407
5496
|
</xsl:attribute-set>
|
5408
5497
|
|
5409
|
-
<xsl:template
|
5410
|
-
<xsl:value-of select="$linebreak"/>
|
5498
|
+
<xsl:template name="refine_del-style">
|
5411
5499
|
</xsl:template>
|
5412
5500
|
|
5413
|
-
|
5414
|
-
<
|
5415
|
-
|
5416
|
-
<xsl:apply-templates/>
|
5417
|
-
</fo:inline>
|
5418
|
-
</xsl:template>
|
5501
|
+
<xsl:attribute-set name="strong-style">
|
5502
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
5503
|
+
</xsl:attribute-set>
|
5419
5504
|
|
5420
|
-
<xsl:template name="
|
5505
|
+
<xsl:template name="refine_strong_style">
|
5506
|
+
<xsl:if test="ancestor::*['preferred']">
|
5507
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
5508
|
+
</xsl:if>
|
5509
|
+
</xsl:template> <!-- refine_strong_style -->
|
5510
|
+
|
5511
|
+
<xsl:attribute-set name="em-style">
|
5512
|
+
<xsl:attribute name="font-style">italic</xsl:attribute>
|
5513
|
+
</xsl:attribute-set>
|
5514
|
+
|
5515
|
+
<xsl:template name="refine_em_style">
|
5421
5516
|
<xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
|
5422
5517
|
<xsl:attribute name="font-style">normal</xsl:attribute>
|
5423
5518
|
</xsl:if>
|
5519
|
+
</xsl:template> <!-- refine_em_style -->
|
5520
|
+
|
5521
|
+
<xsl:attribute-set name="sup-style">
|
5522
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
5523
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
5524
|
+
</xsl:attribute-set>
|
5525
|
+
|
5526
|
+
<xsl:template name="refine_sup-style">
|
5527
|
+
</xsl:template>
|
5528
|
+
|
5529
|
+
<xsl:attribute-set name="sub-style">
|
5530
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
5531
|
+
<xsl:attribute name="vertical-align">sub</xsl:attribute>
|
5532
|
+
</xsl:attribute-set>
|
5533
|
+
|
5534
|
+
<xsl:template name="refine_sub-style">
|
5535
|
+
</xsl:template>
|
5536
|
+
|
5537
|
+
<xsl:attribute-set name="underline-style">
|
5538
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
5539
|
+
</xsl:attribute-set>
|
5540
|
+
|
5541
|
+
<xsl:template name="refine_underline-style">
|
5542
|
+
</xsl:template>
|
5543
|
+
|
5544
|
+
<xsl:attribute-set name="hi-style">
|
5545
|
+
<xsl:attribute name="background-color">yellow</xsl:attribute>
|
5546
|
+
</xsl:attribute-set>
|
5547
|
+
|
5548
|
+
<xsl:template name="refine_hi-style">
|
5549
|
+
</xsl:template>
|
5550
|
+
|
5551
|
+
<xsl:attribute-set name="strike-style">
|
5552
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
5553
|
+
</xsl:attribute-set>
|
5554
|
+
|
5555
|
+
<xsl:template name="refine_strike-style">
|
5556
|
+
</xsl:template>
|
5557
|
+
|
5558
|
+
<xsl:template match="mn:br">
|
5559
|
+
<xsl:value-of select="$linebreak"/>
|
5560
|
+
</xsl:template>
|
5561
|
+
|
5562
|
+
<xsl:template match="mn:em">
|
5563
|
+
<fo:inline xsl:use-attribute-sets="em-style">
|
5564
|
+
<xsl:call-template name="refine_em_style"/>
|
5565
|
+
<xsl:apply-templates/>
|
5566
|
+
</fo:inline>
|
5424
5567
|
</xsl:template>
|
5425
5568
|
|
5426
5569
|
<xsl:template match="mn:strong | *[local-name()='b']">
|
5427
5570
|
<xsl:param name="split_keep-within-line"/>
|
5428
|
-
<fo:inline
|
5429
|
-
|
5571
|
+
<fo:inline xsl:use-attribute-sets="strong-style">
|
5430
5572
|
<xsl:call-template name="refine_strong_style"/>
|
5431
5573
|
|
5432
5574
|
<xsl:apply-templates>
|
@@ -5435,44 +5577,27 @@
|
|
5435
5577
|
</fo:inline>
|
5436
5578
|
</xsl:template>
|
5437
5579
|
|
5438
|
-
<xsl:template name="refine_strong_style">
|
5439
|
-
<xsl:if test="ancestor::*['preferred']">
|
5440
|
-
<xsl:attribute name="role">SKIP</xsl:attribute>
|
5441
|
-
</xsl:if>
|
5442
|
-
</xsl:template>
|
5443
|
-
|
5444
5580
|
<xsl:template match="*[local-name()='padding']">
|
5445
5581
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
5446
5582
|
</xsl:template>
|
5447
5583
|
|
5448
5584
|
<xsl:template match="mn:sup">
|
5449
|
-
<fo:inline
|
5585
|
+
<fo:inline xsl:use-attribute-sets="sup-style">
|
5586
|
+
<xsl:call-template name="refine_sup-style"/>
|
5450
5587
|
<xsl:apply-templates/>
|
5451
5588
|
</fo:inline>
|
5452
5589
|
</xsl:template>
|
5453
5590
|
|
5454
5591
|
<xsl:template match="mn:sub">
|
5455
|
-
<fo:inline
|
5592
|
+
<fo:inline xsl:use-attribute-sets="sub-style">
|
5593
|
+
<xsl:call-template name="refine_sub-style"/>
|
5456
5594
|
<xsl:apply-templates/>
|
5457
5595
|
</fo:inline>
|
5458
5596
|
</xsl:template>
|
5459
5597
|
|
5460
5598
|
<xsl:template match="mn:tt">
|
5461
5599
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
5462
|
-
|
5463
|
-
<xsl:variable name="_font-size"> <!-- inherit -->
|
5464
|
-
</xsl:variable>
|
5465
|
-
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
5466
|
-
<xsl:if test="$font-size != ''">
|
5467
|
-
<xsl:attribute name="font-size">
|
5468
|
-
<xsl:choose>
|
5469
|
-
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
5470
|
-
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
5471
|
-
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
5472
|
-
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
5473
|
-
</xsl:choose>
|
5474
|
-
</xsl:attribute>
|
5475
|
-
</xsl:if>
|
5600
|
+
<xsl:call-template name="refine_tt-style"/>
|
5476
5601
|
<xsl:apply-templates/>
|
5477
5602
|
</fo:inline>
|
5478
5603
|
</xsl:template> <!-- tt -->
|
@@ -5491,7 +5616,8 @@
|
|
5491
5616
|
</xsl:template>
|
5492
5617
|
|
5493
5618
|
<xsl:template match="mn:underline">
|
5494
|
-
<fo:inline
|
5619
|
+
<fo:inline xsl:use-attribute-sets="underline-style">
|
5620
|
+
<xsl:call-template name="refine_underline-style"/>
|
5495
5621
|
<xsl:apply-templates/>
|
5496
5622
|
</fo:inline>
|
5497
5623
|
</xsl:template>
|
@@ -5649,6 +5775,7 @@
|
|
5649
5775
|
|
5650
5776
|
<xsl:template match="mn:del">
|
5651
5777
|
<fo:inline xsl:use-attribute-sets="del-style">
|
5778
|
+
<xsl:call-template name="refine_del-style"/>
|
5652
5779
|
<xsl:apply-templates/>
|
5653
5780
|
</fo:inline>
|
5654
5781
|
</xsl:template>
|
@@ -5658,7 +5785,8 @@
|
|
5658
5785
|
|
5659
5786
|
<!-- highlight text -->
|
5660
5787
|
<xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
|
5661
|
-
<fo:inline
|
5788
|
+
<fo:inline xsl:use-attribute-sets="hi-style">
|
5789
|
+
<xsl:call-template name="refine_hi-style"/>
|
5662
5790
|
<xsl:apply-templates/>
|
5663
5791
|
</fo:inline>
|
5664
5792
|
</xsl:template>
|
@@ -5744,7 +5872,8 @@
|
|
5744
5872
|
</xsl:template>
|
5745
5873
|
|
5746
5874
|
<xsl:template match="mn:strike">
|
5747
|
-
<fo:inline
|
5875
|
+
<fo:inline xsl:use-attribute-sets="strike-style">
|
5876
|
+
<xsl:call-template name="refine_strike-style"/>
|
5748
5877
|
<xsl:apply-templates/>
|
5749
5878
|
</fo:inline>
|
5750
5879
|
</xsl:template>
|
@@ -5772,7 +5901,7 @@
|
|
5772
5901
|
</xsl:otherwise>
|
5773
5902
|
</xsl:choose>
|
5774
5903
|
</xsl:variable>
|
5775
|
-
<xsl:if test="$key = 'font-family' or
|
5904
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
5776
5905
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
5777
5906
|
</xsl:if>
|
5778
5907
|
<xsl:if test="$key = 'text-indent'">
|
@@ -5824,6 +5953,7 @@
|
|
5824
5953
|
|
5825
5954
|
<xsl:template match="mn:pre" name="pre">
|
5826
5955
|
<fo:block xsl:use-attribute-sets="pre-style">
|
5956
|
+
<xsl:call-template name="refine_pre-style"/>
|
5827
5957
|
<xsl:copy-of select="@id"/>
|
5828
5958
|
<xsl:choose>
|
5829
5959
|
|
@@ -5854,22 +5984,40 @@
|
|
5854
5984
|
<xsl:attribute-set name="permission-style">
|
5855
5985
|
</xsl:attribute-set>
|
5856
5986
|
|
5987
|
+
<xsl:template name="refine_permission-style">
|
5988
|
+
</xsl:template>
|
5989
|
+
|
5857
5990
|
<xsl:attribute-set name="permission-name-style">
|
5858
5991
|
</xsl:attribute-set>
|
5859
5992
|
|
5993
|
+
<xsl:template name="refine_permission-name-style">
|
5994
|
+
</xsl:template>
|
5995
|
+
|
5860
5996
|
<xsl:attribute-set name="permission-label-style">
|
5861
5997
|
</xsl:attribute-set>
|
5862
5998
|
|
5999
|
+
<xsl:template name="refine_permission-label-style">
|
6000
|
+
</xsl:template>
|
6001
|
+
|
5863
6002
|
<xsl:attribute-set name="requirement-style">
|
5864
6003
|
</xsl:attribute-set>
|
5865
6004
|
|
6005
|
+
<xsl:template name="refine_requirement-style">
|
6006
|
+
</xsl:template>
|
6007
|
+
|
5866
6008
|
<xsl:attribute-set name="requirement-name-style">
|
5867
6009
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
5868
6010
|
</xsl:attribute-set>
|
5869
6011
|
|
6012
|
+
<xsl:template name="refine_requirement-name-style">
|
6013
|
+
</xsl:template>
|
6014
|
+
|
5870
6015
|
<xsl:attribute-set name="requirement-label-style">
|
5871
6016
|
</xsl:attribute-set>
|
5872
6017
|
|
6018
|
+
<xsl:template name="refine_requirement-label-style">
|
6019
|
+
</xsl:template>
|
6020
|
+
|
5873
6021
|
<xsl:attribute-set name="subject-style">
|
5874
6022
|
</xsl:attribute-set>
|
5875
6023
|
|
@@ -5897,18 +6045,28 @@
|
|
5897
6045
|
<xsl:attribute-set name="recommendation-style">
|
5898
6046
|
</xsl:attribute-set>
|
5899
6047
|
|
6048
|
+
<xsl:template name="refine_recommendation-style">
|
6049
|
+
</xsl:template>
|
6050
|
+
|
5900
6051
|
<xsl:attribute-set name="recommendation-name-style">
|
5901
6052
|
</xsl:attribute-set>
|
5902
6053
|
|
6054
|
+
<xsl:template name="refine_recommendation-name-style">
|
6055
|
+
</xsl:template>
|
6056
|
+
|
5903
6057
|
<xsl:attribute-set name="recommendation-label-style">
|
5904
6058
|
</xsl:attribute-set>
|
5905
6059
|
|
6060
|
+
<xsl:template name="refine_recommendation-label-style">
|
6061
|
+
</xsl:template>
|
6062
|
+
|
5906
6063
|
<!-- ========== -->
|
5907
6064
|
<!-- permission -->
|
5908
6065
|
<!-- ========== -->
|
5909
6066
|
<xsl:template match="mn:permission">
|
5910
6067
|
<xsl:call-template name="setNamedDestination"/>
|
5911
6068
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
6069
|
+
<xsl:call-template name="refine_permission-style"/>
|
5912
6070
|
<xsl:apply-templates select="mn:fmt-name"/>
|
5913
6071
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
5914
6072
|
</fo:block>
|
@@ -5917,6 +6075,7 @@
|
|
5917
6075
|
<xsl:template match="mn:permission/mn:fmt-name">
|
5918
6076
|
<xsl:if test="normalize-space() != ''">
|
5919
6077
|
<fo:block xsl:use-attribute-sets="permission-name-style">
|
6078
|
+
<xsl:call-template name="refine_permission-name-style"/>
|
5920
6079
|
<xsl:apply-templates/>
|
5921
6080
|
</fo:block>
|
5922
6081
|
</xsl:if>
|
@@ -5924,6 +6083,7 @@
|
|
5924
6083
|
|
5925
6084
|
<xsl:template match="mn:permission/mn:label">
|
5926
6085
|
<fo:block xsl:use-attribute-sets="permission-label-style">
|
6086
|
+
<xsl:call-template name="refine_permission-label-style"/>
|
5927
6087
|
<xsl:apply-templates/>
|
5928
6088
|
</fo:block>
|
5929
6089
|
</xsl:template>
|
@@ -5936,6 +6096,7 @@
|
|
5936
6096
|
<xsl:template match="mn:requirement">
|
5937
6097
|
<xsl:call-template name="setNamedDestination"/>
|
5938
6098
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
6099
|
+
<xsl:call-template name="refine_requirement-style"/>
|
5939
6100
|
<xsl:apply-templates select="mn:fmt-name"/>
|
5940
6101
|
<xsl:apply-templates select="mn:label"/>
|
5941
6102
|
<xsl:apply-templates select="@obligation"/>
|
@@ -5948,6 +6109,7 @@
|
|
5948
6109
|
<xsl:if test="normalize-space() != ''">
|
5949
6110
|
|
5950
6111
|
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
6112
|
+
<xsl:call-template name="refine_requirement-name-style"/>
|
5951
6113
|
<xsl:apply-templates/>
|
5952
6114
|
</fo:block>
|
5953
6115
|
</xsl:if>
|
@@ -5955,6 +6117,7 @@
|
|
5955
6117
|
|
5956
6118
|
<xsl:template match="mn:requirement/mn:label">
|
5957
6119
|
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
6120
|
+
<xsl:call-template name="refine_requirement-label-style"/>
|
5958
6121
|
<xsl:apply-templates/>
|
5959
6122
|
</fo:block>
|
5960
6123
|
</xsl:template>
|
@@ -5980,6 +6143,7 @@
|
|
5980
6143
|
<xsl:template match="mn:recommendation">
|
5981
6144
|
<xsl:call-template name="setNamedDestination"/>
|
5982
6145
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
6146
|
+
<xsl:call-template name="refine_recommendation-style"/>
|
5983
6147
|
<xsl:apply-templates select="mn:fmt-name"/>
|
5984
6148
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
5985
6149
|
</fo:block>
|
@@ -5989,6 +6153,7 @@
|
|
5989
6153
|
<xsl:if test="normalize-space() != ''">
|
5990
6154
|
|
5991
6155
|
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
6156
|
+
<xsl:call-template name="refine_recommendation-name-style"/>
|
5992
6157
|
<xsl:apply-templates/>
|
5993
6158
|
</fo:block>
|
5994
6159
|
</xsl:if>
|
@@ -5996,6 +6161,7 @@
|
|
5996
6161
|
|
5997
6162
|
<xsl:template match="mn:recommendation/mn:label">
|
5998
6163
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
6164
|
+
<xsl:call-template name="refine_recommendation-label-style"/>
|
5999
6165
|
<xsl:apply-templates/>
|
6000
6166
|
</fo:block>
|
6001
6167
|
</xsl:template>
|
@@ -6176,34 +6342,64 @@
|
|
6176
6342
|
<xsl:attribute-set name="term-style">
|
6177
6343
|
</xsl:attribute-set> <!-- term-style -->
|
6178
6344
|
|
6345
|
+
<xsl:template name="refine_term-style">
|
6346
|
+
</xsl:template>
|
6347
|
+
|
6179
6348
|
<xsl:attribute-set name="term-name-style">
|
6180
6349
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
6181
6350
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
6182
6351
|
</xsl:attribute-set> <!-- term-name-style -->
|
6183
6352
|
|
6184
|
-
|
6353
|
+
<xsl:template name="refine_term-name-style">
|
6354
|
+
</xsl:template>
|
6355
|
+
|
6356
|
+
<xsl:attribute-set name="preferred-block-style">
|
6185
6357
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
6186
6358
|
|
6359
|
+
<xsl:template name="refine_preferred-block-style">
|
6360
|
+
</xsl:template>
|
6361
|
+
|
6187
6362
|
<xsl:attribute-set name="preferred-term-style">
|
6188
6363
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
6189
6364
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
6190
6365
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
6191
6366
|
|
6367
|
+
<xsl:template name="refine_preferred-term-style">
|
6368
|
+
<xsl:if test="mn:strong">
|
6369
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
6370
|
+
</xsl:if>
|
6371
|
+
</xsl:template>
|
6372
|
+
|
6192
6373
|
<xsl:attribute-set name="domain-style">
|
6193
6374
|
</xsl:attribute-set> <!-- domain-style -->
|
6194
6375
|
|
6376
|
+
<xsl:template name="refine_domain-style">
|
6377
|
+
</xsl:template>
|
6378
|
+
|
6195
6379
|
<xsl:attribute-set name="admitted-style">
|
6196
6380
|
</xsl:attribute-set> <!-- admitted-style -->
|
6197
6381
|
|
6382
|
+
<xsl:template name="refine_admitted-style">
|
6383
|
+
</xsl:template>
|
6384
|
+
|
6198
6385
|
<xsl:attribute-set name="deprecates-style">
|
6199
6386
|
</xsl:attribute-set> <!-- deprecates-style -->
|
6200
6387
|
|
6388
|
+
<xsl:template name="refine_deprecates-style">
|
6389
|
+
</xsl:template>
|
6390
|
+
|
6201
6391
|
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
6202
6392
|
</xsl:attribute-set>
|
6203
6393
|
|
6394
|
+
<xsl:template name="refine_related-block-style">
|
6395
|
+
</xsl:template>
|
6396
|
+
|
6204
6397
|
<xsl:attribute-set name="definition-style">
|
6205
6398
|
</xsl:attribute-set> <!-- definition-style -->
|
6206
6399
|
|
6400
|
+
<xsl:template name="refine_definition-style">
|
6401
|
+
</xsl:template>
|
6402
|
+
|
6207
6403
|
<xsl:attribute-set name="termsource-style">
|
6208
6404
|
</xsl:attribute-set> <!-- termsource-style -->
|
6209
6405
|
|
@@ -6213,9 +6409,15 @@
|
|
6213
6409
|
<xsl:attribute-set name="termsource-text-style">
|
6214
6410
|
</xsl:attribute-set> <!-- termsource-text-style -->
|
6215
6411
|
|
6412
|
+
<xsl:template name="refine_termsource-text-style">
|
6413
|
+
</xsl:template>
|
6414
|
+
|
6216
6415
|
<xsl:attribute-set name="origin-style">
|
6217
6416
|
</xsl:attribute-set> <!-- origin-style -->
|
6218
6417
|
|
6418
|
+
<xsl:template name="refine_origin-style">
|
6419
|
+
</xsl:template>
|
6420
|
+
|
6219
6421
|
<!-- ====== -->
|
6220
6422
|
<!-- term -->
|
6221
6423
|
<!-- ====== -->
|
@@ -6231,9 +6433,8 @@
|
|
6231
6433
|
<xsl:template match="mn:term">
|
6232
6434
|
<xsl:call-template name="setNamedDestination"/>
|
6233
6435
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
6436
|
+
<xsl:call-template name="refine_term-style"/>
|
6234
6437
|
|
6235
|
-
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
6236
|
-
</xsl:if>
|
6237
6438
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
6238
6439
|
</fo:block>
|
6239
6440
|
</xsl:template>
|
@@ -6309,6 +6510,7 @@
|
|
6309
6510
|
<!-- text SOURCE: -->
|
6310
6511
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
6311
6512
|
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
6513
|
+
<xsl:call-template name="refine_termsource-text-style"/>
|
6312
6514
|
<xsl:value-of select="."/>
|
6313
6515
|
</fo:inline>
|
6314
6516
|
</xsl:template>
|
@@ -6321,6 +6523,7 @@
|
|
6321
6523
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
6322
6524
|
</xsl:if>
|
6323
6525
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
6526
|
+
<xsl:call-template name="refine_origin-style"/>
|
6324
6527
|
<xsl:apply-templates/>
|
6325
6528
|
</fo:inline>
|
6326
6529
|
</fo:basic-link>
|
@@ -6370,9 +6573,12 @@
|
|
6370
6573
|
</xsl:variable>
|
6371
6574
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
6372
6575
|
|
6576
|
+
<xsl:call-template name="refine_preferred-block-style"/>
|
6577
|
+
|
6373
6578
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
6374
6579
|
|
6375
6580
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
6581
|
+
<xsl:call-template name="refine_term-name-style"/>
|
6376
6582
|
|
6377
6583
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
6378
6584
|
<xsl:call-template name="setIDforNamedDestination"/>
|
@@ -6383,7 +6589,7 @@
|
|
6383
6589
|
</xsl:if>
|
6384
6590
|
|
6385
6591
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
6386
|
-
<xsl:call-template name="
|
6592
|
+
<xsl:call-template name="refine_preferred-term-style"/>
|
6387
6593
|
|
6388
6594
|
<xsl:apply-templates/>
|
6389
6595
|
</fo:block>
|
@@ -6404,22 +6610,18 @@
|
|
6404
6610
|
|
6405
6611
|
<xsl:template match="mn:fmt-admitted">
|
6406
6612
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
6613
|
+
<xsl:call-template name="refine_admitted-style"/>
|
6407
6614
|
<xsl:apply-templates/>
|
6408
6615
|
</fo:block>
|
6409
6616
|
</xsl:template>
|
6410
6617
|
|
6411
6618
|
<xsl:template match="mn:fmt-deprecates">
|
6412
6619
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
6620
|
+
<xsl:call-template name="refine_deprecates-style"/>
|
6413
6621
|
<xsl:apply-templates/>
|
6414
6622
|
</fo:block>
|
6415
6623
|
</xsl:template>
|
6416
6624
|
|
6417
|
-
<xsl:template name="setStyle_preferred">
|
6418
|
-
<xsl:if test="mn:strong">
|
6419
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
6420
|
-
</xsl:if>
|
6421
|
-
</xsl:template>
|
6422
|
-
|
6423
6625
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
6424
6626
|
<!-- in metanorma xml preferred terms delimited by semicolons -->
|
6425
6627
|
<xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
|
@@ -6429,6 +6631,7 @@
|
|
6429
6631
|
|
6430
6632
|
<xsl:template match="mn:fmt-related">
|
6431
6633
|
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
6634
|
+
<xsl:call-template name="refine_related-block-style"/>
|
6432
6635
|
<xsl:apply-templates/>
|
6433
6636
|
</fo:block>
|
6434
6637
|
</xsl:template>
|
@@ -6443,6 +6646,7 @@
|
|
6443
6646
|
<!-- ========== -->
|
6444
6647
|
<xsl:template match="mn:fmt-definition">
|
6445
6648
|
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
6649
|
+
<xsl:call-template name="refine_definition-style"/>
|
6446
6650
|
<xsl:apply-templates/>
|
6447
6651
|
</fo:block>
|
6448
6652
|
</xsl:template>
|
@@ -6488,6 +6692,9 @@
|
|
6488
6692
|
<xsl:attribute-set name="example-body-style">
|
6489
6693
|
</xsl:attribute-set> <!-- example-body-style -->
|
6490
6694
|
|
6695
|
+
<xsl:template name="refine_example-body-style">
|
6696
|
+
</xsl:template>
|
6697
|
+
|
6491
6698
|
<xsl:attribute-set name="example-name-style">
|
6492
6699
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
6493
6700
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -6537,6 +6744,8 @@
|
|
6537
6744
|
<xsl:when test="contains($element, 'block')">
|
6538
6745
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
6539
6746
|
|
6747
|
+
<xsl:call-template name="refine_example-p-style"/>
|
6748
|
+
|
6540
6749
|
<xsl:apply-templates/>
|
6541
6750
|
</fo:block>
|
6542
6751
|
</xsl:when>
|
@@ -6588,6 +6797,7 @@
|
|
6588
6797
|
</fo:block>
|
6589
6798
|
|
6590
6799
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
6800
|
+
<xsl:call-template name="refine_example-body-style"/>
|
6591
6801
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
6592
6802
|
<xsl:variable name="example_body">
|
6593
6803
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
@@ -6650,6 +6860,7 @@
|
|
6650
6860
|
<xsl:if test="*[not(self::mn:fmt-name)][position() > 1]">
|
6651
6861
|
<!-- display further elements in blocks -->
|
6652
6862
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
6863
|
+
<xsl:call-template name="refine_example-body-style"/>
|
6653
6864
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
6654
6865
|
<xsl:apply-templates select="*[not(self::mn:fmt-name)][position() > 1]">
|
6655
6866
|
<xsl:with-param name="fo_element" select="'block'"/>
|
@@ -6921,6 +7132,9 @@
|
|
6921
7132
|
<!-- <xsl:attribute name="padding-right">3mm</xsl:attribute> -->
|
6922
7133
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
6923
7134
|
|
7135
|
+
<xsl:template name="refine_table-fn-number-style">
|
7136
|
+
</xsl:template>
|
7137
|
+
|
6924
7138
|
<xsl:attribute-set name="table-fmt-fn-label-style">
|
6925
7139
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
6926
7140
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -6930,30 +7144,12 @@
|
|
6930
7144
|
<xsl:template name="refine_table-fmt-fn-label-style">
|
6931
7145
|
</xsl:template>
|
6932
7146
|
|
6933
|
-
<xsl:attribute-set name="fn-container-body-style">
|
6934
|
-
<xsl:attribute name="text-indent">0</xsl:attribute>
|
6935
|
-
<xsl:attribute name="start-indent">0</xsl:attribute>
|
6936
|
-
</xsl:attribute-set>
|
6937
|
-
|
6938
7147
|
<xsl:attribute-set name="table-fn-body-style">
|
6939
7148
|
</xsl:attribute-set>
|
6940
7149
|
|
6941
|
-
<xsl:
|
6942
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
6943
|
-
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
6944
|
-
|
6945
|
-
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
6946
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
6947
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
6948
|
-
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
6949
|
-
|
6950
|
-
<xsl:template name="refine_figure-fmt-fn-label-style">
|
7150
|
+
<xsl:template name="refine_table-fn-body-style">
|
6951
7151
|
</xsl:template>
|
6952
7152
|
|
6953
|
-
<xsl:attribute-set name="figure-fn-body-style">
|
6954
|
-
<xsl:attribute name="text-align">justify</xsl:attribute>
|
6955
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
6956
|
-
</xsl:attribute-set>
|
6957
7153
|
<!-- ========================== -->
|
6958
7154
|
<!-- END Table styles -->
|
6959
7155
|
<!-- ========================== -->
|
@@ -8249,6 +8445,7 @@
|
|
8249
8445
|
</xsl:apply-templates>
|
8250
8446
|
|
8251
8447
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
8448
|
+
<xsl:call-template name="refine_table-fn-body-style"/>
|
8252
8449
|
<!-- <xsl:copy-of select="./node()"/> -->
|
8253
8450
|
<xsl:apply-templates/>
|
8254
8451
|
</fo:inline>
|
@@ -8267,6 +8464,7 @@
|
|
8267
8464
|
<xsl:param name="process">false</xsl:param>
|
8268
8465
|
<xsl:if test="$process = 'true'">
|
8269
8466
|
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
8467
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
8270
8468
|
|
8271
8469
|
<!-- tab is padding-right -->
|
8272
8470
|
<xsl:apply-templates select=".//mn:tab">
|
@@ -9139,9 +9337,18 @@
|
|
9139
9337
|
<xsl:attribute-set name="dl-block-style">
|
9140
9338
|
</xsl:attribute-set>
|
9141
9339
|
|
9340
|
+
<xsl:template name="refine_dl-block-style">
|
9341
|
+
<xsl:if test="@key = 'true' and ancestor::mn:figure">
|
9342
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
9343
|
+
</xsl:if>
|
9344
|
+
</xsl:template>
|
9345
|
+
|
9142
9346
|
<xsl:attribute-set name="dt-row-style">
|
9143
9347
|
</xsl:attribute-set>
|
9144
9348
|
|
9349
|
+
<xsl:template name="refine_dt-row-style">
|
9350
|
+
</xsl:template>
|
9351
|
+
|
9145
9352
|
<xsl:attribute-set name="dt-cell-style">
|
9146
9353
|
</xsl:attribute-set>
|
9147
9354
|
|
@@ -9168,6 +9375,9 @@
|
|
9168
9375
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
9169
9376
|
</xsl:attribute-set> <!-- dl-name-style -->
|
9170
9377
|
|
9378
|
+
<xsl:template name="refine_dl-name-style">
|
9379
|
+
</xsl:template>
|
9380
|
+
|
9171
9381
|
<xsl:attribute-set name="dd-cell-style">
|
9172
9382
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
9173
9383
|
</xsl:attribute-set>
|
@@ -9239,9 +9449,7 @@
|
|
9239
9449
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
9240
9450
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
9241
9451
|
|
9242
|
-
<xsl:
|
9243
|
-
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
9244
|
-
</xsl:if>
|
9452
|
+
<xsl:call-template name="refine_dl-block-style"/>
|
9245
9453
|
|
9246
9454
|
<xsl:call-template name="setBlockSpanAll"/>
|
9247
9455
|
<xsl:if test="not(ancestor::mn:quote)">
|
@@ -9541,6 +9749,8 @@
|
|
9541
9749
|
<xsl:if test="$process = 'true'">
|
9542
9750
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
9543
9751
|
|
9752
|
+
<xsl:call-template name="refine_dl-name-style"/>
|
9753
|
+
|
9544
9754
|
<xsl:apply-templates/>
|
9545
9755
|
</fo:block>
|
9546
9756
|
</xsl:if>
|
@@ -9729,6 +9939,8 @@
|
|
9729
9939
|
<xsl:param name="split_keep-within-line"/>
|
9730
9940
|
|
9731
9941
|
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
9942
|
+
<xsl:call-template name="refine_dt-row-style"/>
|
9943
|
+
|
9732
9944
|
<xsl:call-template name="insert_dt_cell">
|
9733
9945
|
<xsl:with-param name="key_iso" select="$key_iso"/>
|
9734
9946
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
@@ -9939,15 +10151,22 @@
|
|
9939
10151
|
<xsl:attribute-set name="appendix-style">
|
9940
10152
|
</xsl:attribute-set>
|
9941
10153
|
|
10154
|
+
<xsl:template name="refine_appendix-style">
|
10155
|
+
</xsl:template>
|
10156
|
+
|
9942
10157
|
<xsl:attribute-set name="appendix-example-style">
|
9943
10158
|
</xsl:attribute-set>
|
9944
10159
|
|
10160
|
+
<xsl:template name="refine_appendix-example-style">
|
10161
|
+
</xsl:template>
|
10162
|
+
|
9945
10163
|
<!-- ======================== -->
|
9946
10164
|
<!-- Appendix processing -->
|
9947
10165
|
<!-- ======================== -->
|
9948
10166
|
<xsl:template match="mn:appendix">
|
9949
10167
|
<xsl:call-template name="setNamedDestination"/>
|
9950
10168
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
10169
|
+
<xsl:call-template name="refine_appendix-style"/>
|
9951
10170
|
<xsl:apply-templates select="mn:fmt-title"/>
|
9952
10171
|
</fo:block>
|
9953
10172
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
@@ -9966,6 +10185,7 @@
|
|
9966
10185
|
<xsl:template match="mn:appendix//mn:example" priority="2">
|
9967
10186
|
<xsl:call-template name="setNamedDestination"/>
|
9968
10187
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
10188
|
+
<xsl:call-template name="refine_appendix-example-style"/>
|
9969
10189
|
<xsl:apply-templates select="mn:fmt-name"/>
|
9970
10190
|
</fo:block>
|
9971
10191
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
@@ -9974,7 +10194,16 @@
|
|
9974
10194
|
<xsl:attribute-set name="xref-style">
|
9975
10195
|
<xsl:attribute name="color">blue</xsl:attribute>
|
9976
10196
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
9977
|
-
</xsl:attribute-set>
|
10197
|
+
</xsl:attribute-set> <!-- xref-style -->
|
10198
|
+
|
10199
|
+
<xsl:template name="refine_xref-style">
|
10200
|
+
<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])">
|
10201
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
10202
|
+
</xsl:if>
|
10203
|
+
<xsl:if test="parent::mn:add">
|
10204
|
+
<xsl:call-template name="append_add-style"/>
|
10205
|
+
</xsl:if>
|
10206
|
+
</xsl:template> <!-- refine_xref-style -->
|
9978
10207
|
|
9979
10208
|
<xsl:template match="mn:fmt-xref">
|
9980
10209
|
<xsl:call-template name="insert_basic_link">
|
@@ -9983,12 +10212,8 @@
|
|
9983
10212
|
<xsl:call-template name="getAltText"/>
|
9984
10213
|
</xsl:variable>
|
9985
10214
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
9986
|
-
<xsl:
|
9987
|
-
|
9988
|
-
</xsl:if>
|
9989
|
-
<xsl:if test="parent::mn:add">
|
9990
|
-
<xsl:call-template name="append_add-style"/>
|
9991
|
-
</xsl:if>
|
10215
|
+
<xsl:call-template name="refine_xref-style"/>
|
10216
|
+
|
9992
10217
|
<xsl:apply-templates/>
|
9993
10218
|
</fo:basic-link>
|
9994
10219
|
</xsl:with-param>
|
@@ -10100,16 +10325,16 @@
|
|
10100
10325
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
10101
10326
|
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
10102
10327
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
10103
|
-
</xsl:attribute-set>
|
10328
|
+
</xsl:attribute-set> <!-- note-style -->
|
10104
10329
|
|
10105
10330
|
<xsl:template name="refine_note-style">
|
10106
|
-
</xsl:template>
|
10331
|
+
</xsl:template> <!-- refine_note-style -->
|
10107
10332
|
|
10108
10333
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
10109
10334
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
10110
10335
|
|
10111
10336
|
<xsl:attribute-set name="note-name-style">
|
10112
|
-
</xsl:attribute-set>
|
10337
|
+
</xsl:attribute-set> <!-- note-name-style -->
|
10113
10338
|
|
10114
10339
|
<xsl:template name="refine_note-name-style">
|
10115
10340
|
</xsl:template> <!-- refine_note-name-style -->
|
@@ -10123,17 +10348,20 @@
|
|
10123
10348
|
|
10124
10349
|
<xsl:attribute-set name="note-p-style">
|
10125
10350
|
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
10126
|
-
</xsl:attribute-set>
|
10351
|
+
</xsl:attribute-set> <!-- note-p-style -->
|
10352
|
+
|
10353
|
+
<xsl:template name="refine_note-p-style">
|
10354
|
+
</xsl:template>
|
10127
10355
|
|
10128
10356
|
<xsl:attribute-set name="termnote-style">
|
10129
10357
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
10130
|
-
</xsl:attribute-set>
|
10358
|
+
</xsl:attribute-set> <!-- termnote-style -->
|
10131
10359
|
|
10132
10360
|
<xsl:template name="refine_termnote-style">
|
10133
10361
|
</xsl:template> <!-- refine_termnote-style -->
|
10134
10362
|
|
10135
10363
|
<xsl:attribute-set name="termnote-name-style">
|
10136
|
-
</xsl:attribute-set>
|
10364
|
+
</xsl:attribute-set> <!-- termnote-name-style -->
|
10137
10365
|
|
10138
10366
|
<xsl:template name="refine_termnote-name-style">
|
10139
10367
|
</xsl:template>
|
@@ -10141,6 +10369,9 @@
|
|
10141
10369
|
<xsl:attribute-set name="termnote-p-style">
|
10142
10370
|
</xsl:attribute-set>
|
10143
10371
|
|
10372
|
+
<xsl:template name="refine_termnote-p-style">
|
10373
|
+
</xsl:template>
|
10374
|
+
|
10144
10375
|
<!-- ====== -->
|
10145
10376
|
<!-- note -->
|
10146
10377
|
<!-- termnote -->
|
@@ -10204,11 +10435,13 @@
|
|
10204
10435
|
<xsl:choose>
|
10205
10436
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
10206
10437
|
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
10438
|
+
<xsl:call-template name="refine_note-p-style"/>
|
10207
10439
|
<xsl:apply-templates/>
|
10208
10440
|
</fo:inline>
|
10209
10441
|
</xsl:when>
|
10210
10442
|
<xsl:otherwise>
|
10211
10443
|
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
10444
|
+
<xsl:call-template name="refine_note-p-style"/>
|
10212
10445
|
<xsl:apply-templates/>
|
10213
10446
|
</fo:block>
|
10214
10447
|
</xsl:otherwise>
|
@@ -10300,11 +10533,13 @@
|
|
10300
10533
|
<xsl:choose>
|
10301
10534
|
<xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
|
10302
10535
|
<fo:inline xsl:use-attribute-sets="termnote-p-style">
|
10536
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
10303
10537
|
<xsl:apply-templates/>
|
10304
10538
|
</fo:inline>
|
10305
10539
|
</xsl:when>
|
10306
10540
|
<xsl:otherwise>
|
10307
10541
|
<fo:block xsl:use-attribute-sets="termnote-p-style">
|
10542
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
10308
10543
|
<xsl:apply-templates/>
|
10309
10544
|
</fo:block>
|
10310
10545
|
</xsl:otherwise>
|
@@ -10318,7 +10553,7 @@
|
|
10318
10553
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
10319
10554
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
10320
10555
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
10321
|
-
</xsl:attribute-set>
|
10556
|
+
</xsl:attribute-set> <!-- quote-style -->
|
10322
10557
|
|
10323
10558
|
<xsl:template name="refine_quote-style">
|
10324
10559
|
</xsl:template>
|
@@ -10327,6 +10562,9 @@
|
|
10327
10562
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
10328
10563
|
</xsl:attribute-set>
|
10329
10564
|
|
10565
|
+
<xsl:template name="refine_quote-source-style">
|
10566
|
+
</xsl:template>
|
10567
|
+
|
10330
10568
|
<!-- ====== -->
|
10331
10569
|
<!-- quote -->
|
10332
10570
|
<!-- source -->
|
@@ -10355,6 +10593,7 @@
|
|
10355
10593
|
</fo:block-container>
|
10356
10594
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
10357
10595
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
10596
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
10358
10597
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
10359
10598
|
<xsl:apply-templates select="mn:author"/>
|
10360
10599
|
<xsl:apply-templates select="mn:fmt-source"/>
|
@@ -10417,6 +10656,9 @@
|
|
10417
10656
|
<xsl:attribute-set name="figure-style">
|
10418
10657
|
</xsl:attribute-set>
|
10419
10658
|
|
10659
|
+
<xsl:template name="refine_figure-style">
|
10660
|
+
</xsl:template>
|
10661
|
+
|
10420
10662
|
<xsl:attribute-set name="figure-name-style">
|
10421
10663
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
10422
10664
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -10424,7 +10666,7 @@
|
|
10424
10666
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
10425
10667
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
10426
10668
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
10427
|
-
</xsl:attribute-set>
|
10669
|
+
</xsl:attribute-set> <!-- figure-name-style -->
|
10428
10670
|
|
10429
10671
|
<xsl:template name="refine_figure-name-style">
|
10430
10672
|
</xsl:template> <!-- refine_figure-name-style -->
|
@@ -10432,7 +10674,7 @@
|
|
10432
10674
|
<xsl:attribute-set name="image-style">
|
10433
10675
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
10434
10676
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
10435
|
-
</xsl:attribute-set>
|
10677
|
+
</xsl:attribute-set> <!-- image-style -->
|
10436
10678
|
|
10437
10679
|
<xsl:template name="refine_image-style">
|
10438
10680
|
</xsl:template>
|
@@ -10443,17 +10685,54 @@
|
|
10443
10685
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
10444
10686
|
<xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
10445
10687
|
<xsl:attribute name="width">75%</xsl:attribute>
|
10446
|
-
</xsl:attribute-set>
|
10688
|
+
</xsl:attribute-set> <!-- image-graphic-style -->
|
10689
|
+
|
10690
|
+
<xsl:template name="refine_image-graphic-style">
|
10691
|
+
</xsl:template>
|
10447
10692
|
|
10448
10693
|
<xsl:attribute-set name="figure-source-style">
|
10449
10694
|
</xsl:attribute-set>
|
10450
10695
|
|
10696
|
+
<xsl:template name="refine_figure-source-style">
|
10697
|
+
</xsl:template>
|
10698
|
+
|
10451
10699
|
<xsl:attribute-set name="figure-pseudocode-p-style">
|
10452
10700
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
10453
10701
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
10454
10702
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
10455
10703
|
</xsl:attribute-set>
|
10456
10704
|
|
10705
|
+
<xsl:template name="refine_figure-pseudocode-p-style">
|
10706
|
+
</xsl:template>
|
10707
|
+
|
10708
|
+
<xsl:attribute-set name="figure-fn-number-style">
|
10709
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
10710
|
+
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
10711
|
+
|
10712
|
+
<xsl:template name="refine_figure-fn-number-style">
|
10713
|
+
</xsl:template>
|
10714
|
+
|
10715
|
+
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
10716
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
10717
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
10718
|
+
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
10719
|
+
|
10720
|
+
<xsl:template name="refine_figure-fmt-fn-label-style">
|
10721
|
+
</xsl:template>
|
10722
|
+
|
10723
|
+
<xsl:attribute-set name="figure-fn-body-style">
|
10724
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
10725
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10726
|
+
</xsl:attribute-set>
|
10727
|
+
|
10728
|
+
<xsl:template name="refine_figure-fn-body-style">
|
10729
|
+
<xsl:variable name="key_iso">
|
10730
|
+
</xsl:variable>
|
10731
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
10732
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
10733
|
+
</xsl:if>
|
10734
|
+
</xsl:template>
|
10735
|
+
|
10457
10736
|
<!-- ============================ -->
|
10458
10737
|
<!-- figure's footnotes rendering -->
|
10459
10738
|
<!-- ============================ -->
|
@@ -10566,9 +10845,8 @@
|
|
10566
10845
|
</fo:table-cell>
|
10567
10846
|
<fo:table-cell>
|
10568
10847
|
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
10569
|
-
<xsl:
|
10570
|
-
|
10571
|
-
</xsl:if>
|
10848
|
+
<xsl:call-template name="refine_figure-fn-body-style"/>
|
10849
|
+
|
10572
10850
|
<!-- <xsl:copy-of select="./node()"/> -->
|
10573
10851
|
<xsl:apply-templates/>
|
10574
10852
|
</fo:block>
|
@@ -10586,6 +10864,7 @@
|
|
10586
10864
|
<xsl:param name="process">false</xsl:param>
|
10587
10865
|
<xsl:if test="$process = 'true'">
|
10588
10866
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
10867
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
10589
10868
|
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
10590
10869
|
|
10591
10870
|
<!-- tab is padding-right -->
|
@@ -10623,6 +10902,7 @@
|
|
10623
10902
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
10624
10903
|
</xsl:if>
|
10625
10904
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
|
10905
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
10626
10906
|
<!-- <xsl:value-of select="@reference"/> -->
|
10627
10907
|
<xsl:apply-templates/>
|
10628
10908
|
</fo:inline>
|
@@ -10668,6 +10948,8 @@
|
|
10668
10948
|
|
10669
10949
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
10670
10950
|
|
10951
|
+
<xsl:call-template name="refine_figure-style"/>
|
10952
|
+
|
10671
10953
|
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
10672
10954
|
<xsl:call-template name="setIDforNamedDestination"/>
|
10673
10955
|
</xsl:for-each>
|
@@ -10711,6 +10993,7 @@
|
|
10711
10993
|
|
10712
10994
|
<xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
|
10713
10995
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
10996
|
+
<xsl:call-template name="refine_figure-pseudocode-p-style"/>
|
10714
10997
|
<xsl:apply-templates/>
|
10715
10998
|
</fo:block>
|
10716
10999
|
</xsl:template>
|
@@ -10840,6 +11123,8 @@
|
|
10840
11123
|
</xsl:variable>
|
10841
11124
|
<xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
|
10842
11125
|
|
11126
|
+
<xsl:call-template name="refine_image-graphic-style"/>
|
11127
|
+
|
10843
11128
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
|
10844
11129
|
<xsl:variable name="scale">
|
10845
11130
|
<xsl:call-template name="getImageScale">
|
@@ -11540,6 +11825,9 @@
|
|
11540
11825
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
11541
11826
|
</xsl:attribute-set> <!-- formula-style -->
|
11542
11827
|
|
11828
|
+
<xsl:template name="refine_formula-style">
|
11829
|
+
</xsl:template>
|
11830
|
+
|
11543
11831
|
<xsl:attribute-set name="formula-stem-block-style">
|
11544
11832
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
11545
11833
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -11611,6 +11899,8 @@
|
|
11611
11899
|
<xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
|
11612
11900
|
<fo:block xsl:use-attribute-sets="formula-style">
|
11613
11901
|
|
11902
|
+
<xsl:call-template name="refine_formula-style"/>
|
11903
|
+
|
11614
11904
|
<fo:table table-layout="fixed" width="100%">
|
11615
11905
|
<fo:table-column column-width="95%"/>
|
11616
11906
|
<fo:table-column column-width="5%"/>
|
@@ -12029,6 +12319,9 @@
|
|
12029
12319
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
12030
12320
|
</xsl:attribute-set> <!-- list-name-style -->
|
12031
12321
|
|
12322
|
+
<xsl:template name="refine_list-name-style">
|
12323
|
+
</xsl:template>
|
12324
|
+
|
12032
12325
|
<xsl:attribute-set name="list-item-style">
|
12033
12326
|
</xsl:attribute-set>
|
12034
12327
|
|
@@ -12326,6 +12619,7 @@
|
|
12326
12619
|
<xsl:param name="process">false</xsl:param>
|
12327
12620
|
<xsl:if test="$process = 'true'">
|
12328
12621
|
<fo:block xsl:use-attribute-sets="list-name-style">
|
12622
|
+
<xsl:call-template name="refine_list-name-style"/>
|
12329
12623
|
<xsl:apply-templates/>
|
12330
12624
|
</fo:block>
|
12331
12625
|
</xsl:if>
|
@@ -12386,26 +12680,47 @@
|
|
12386
12680
|
<!-- END Lists processing -->
|
12387
12681
|
<!-- ===================================== -->
|
12388
12682
|
|
12683
|
+
<xsl:attribute-set name="footnote-separator-leader-style">
|
12684
|
+
</xsl:attribute-set>
|
12685
|
+
|
12686
|
+
<xsl:template name="refine_footnote-separator-leader-style">
|
12687
|
+
</xsl:template>
|
12688
|
+
|
12689
|
+
<xsl:attribute-set name="fn-container-body-style">
|
12690
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
12691
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
12692
|
+
</xsl:attribute-set>
|
12693
|
+
|
12694
|
+
<xsl:template name="refine_fn-container-body-style">
|
12695
|
+
</xsl:template>
|
12696
|
+
|
12389
12697
|
<xsl:attribute-set name="fn-reference-style">
|
12390
12698
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
12391
12699
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
12392
12700
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
12393
12701
|
<xsl:attribute name="color">blue</xsl:attribute>
|
12394
|
-
|
12395
|
-
</xsl:attribute-set>
|
12702
|
+
</xsl:attribute-set> <!-- fn-reference-style -->
|
12396
12703
|
|
12397
12704
|
<xsl:template name="refine_fn-reference-style">
|
12705
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
12706
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
12398
12707
|
</xsl:template> <!-- refine_fn-reference-style -->
|
12399
12708
|
|
12400
12709
|
<xsl:attribute-set name="fn-style">
|
12401
12710
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
12402
12711
|
</xsl:attribute-set>
|
12403
12712
|
|
12713
|
+
<xsl:template name="refine_fn-style">
|
12714
|
+
</xsl:template>
|
12715
|
+
|
12404
12716
|
<xsl:attribute-set name="fn-num-style">
|
12405
12717
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
12406
12718
|
<xsl:attribute name="font-size">60%</xsl:attribute>
|
12407
12719
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
12408
|
-
</xsl:attribute-set>
|
12720
|
+
</xsl:attribute-set> <!-- fn-num-style -->
|
12721
|
+
|
12722
|
+
<xsl:template name="refine_fn-num-style">
|
12723
|
+
</xsl:template>
|
12409
12724
|
|
12410
12725
|
<xsl:attribute-set name="fn-body-style">
|
12411
12726
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
@@ -12415,7 +12730,7 @@
|
|
12415
12730
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
12416
12731
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
12417
12732
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
12418
|
-
</xsl:attribute-set>
|
12733
|
+
</xsl:attribute-set> <!-- fn-body-style" -->
|
12419
12734
|
|
12420
12735
|
<xsl:template name="refine_fn-body-style">
|
12421
12736
|
<xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
|
@@ -12484,10 +12799,12 @@
|
|
12484
12799
|
<xsl:choose>
|
12485
12800
|
<xsl:when test="ancestor::mn:bibitem">
|
12486
12801
|
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
12802
|
+
<xsl:call-template name="refine_bibitem-note-fn-style"/>
|
12487
12803
|
</fn_styles>
|
12488
12804
|
</xsl:when>
|
12489
12805
|
<xsl:otherwise>
|
12490
12806
|
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
12807
|
+
<xsl:call-template name="refine_fn-num-style"/>
|
12491
12808
|
</fn_styles>
|
12492
12809
|
</xsl:otherwise>
|
12493
12810
|
</xsl:choose>
|
@@ -12497,9 +12814,12 @@
|
|
12497
12814
|
<xsl:copy-of select="."/>
|
12498
12815
|
</xsl:for-each>
|
12499
12816
|
|
12500
|
-
|
12817
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
12818
|
+
<!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
|
12501
12819
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
12502
|
-
</xsl:if>
|
12820
|
+
</xsl:if> -->
|
12821
|
+
|
12822
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
12503
12823
|
|
12504
12824
|
<xsl:call-template name="insert_basic_link">
|
12505
12825
|
<xsl:with-param name="element">
|
@@ -12522,10 +12842,12 @@
|
|
12522
12842
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
12523
12843
|
|
12524
12844
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
12845
|
+
<xsl:call-template name="refine_fn-style"/>
|
12525
12846
|
<xsl:copy-of select="$footnote_inline"/>
|
12526
12847
|
<fo:footnote-body role="Note">
|
12527
12848
|
|
12528
12849
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
12850
|
+
<xsl:call-template name="refine_fn-container-body-style"/>
|
12529
12851
|
|
12530
12852
|
<xsl:variable name="fn_block">
|
12531
12853
|
<xsl:call-template name="refine_fn-body-style"/>
|
@@ -12625,6 +12947,9 @@
|
|
12625
12947
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
12626
12948
|
</xsl:attribute-set> <!-- admonition-style -->
|
12627
12949
|
|
12950
|
+
<xsl:template name="refine_admonition-style">
|
12951
|
+
</xsl:template>
|
12952
|
+
|
12628
12953
|
<xsl:attribute-set name="admonition-container-style">
|
12629
12954
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
12630
12955
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -12632,6 +12957,9 @@
|
|
12632
12957
|
<xsl:attribute name="padding-top">3mm</xsl:attribute>
|
12633
12958
|
</xsl:attribute-set> <!-- admonition-container-style -->
|
12634
12959
|
|
12960
|
+
<xsl:template name="refine_admonition-container-style">
|
12961
|
+
</xsl:template>
|
12962
|
+
|
12635
12963
|
<xsl:attribute-set name="admonition-name-style">
|
12636
12964
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
12637
12965
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -12639,8 +12967,15 @@
|
|
12639
12967
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
12640
12968
|
</xsl:attribute-set> <!-- admonition-name-style -->
|
12641
12969
|
|
12970
|
+
<xsl:template name="refine_admonition-name-style">
|
12971
|
+
</xsl:template>
|
12972
|
+
|
12642
12973
|
<xsl:attribute-set name="admonition-p-style">
|
12643
12974
|
</xsl:attribute-set> <!-- admonition-p-style -->
|
12975
|
+
|
12976
|
+
<xsl:template name="refine_admonition-p-style">
|
12977
|
+
</xsl:template>
|
12978
|
+
|
12644
12979
|
<!-- end admonition -->
|
12645
12980
|
|
12646
12981
|
<!-- ================ -->
|
@@ -12650,12 +12985,18 @@
|
|
12650
12985
|
<xsl:call-template name="setNamedDestination"/>
|
12651
12986
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
12652
12987
|
|
12988
|
+
<xsl:call-template name="refine_admonition-style"/>
|
12989
|
+
|
12653
12990
|
<xsl:call-template name="setBlockSpanAll"/>
|
12654
12991
|
<fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
|
12992
|
+
|
12993
|
+
<xsl:call-template name="refine_admonition-container-style"/>
|
12655
12994
|
<fo:block xsl:use-attribute-sets="admonition-name-style">
|
12995
|
+
<xsl:call-template name="refine_admonition-name-style"/>
|
12656
12996
|
<xsl:call-template name="displayAdmonitionName"/>
|
12657
12997
|
</fo:block>
|
12658
12998
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
12999
|
+
<xsl:call-template name="refine_admonition-p-style"/>
|
12659
13000
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
12660
13001
|
</fo:block>
|
12661
13002
|
|
@@ -12709,6 +13050,7 @@
|
|
12709
13050
|
|
12710
13051
|
<xsl:template match="mn:admonition/mn:p">
|
12711
13052
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
13053
|
+
<xsl:call-template name="refine_admonition-p-style"/>
|
12712
13054
|
|
12713
13055
|
<xsl:apply-templates/>
|
12714
13056
|
</fo:block>
|
@@ -12718,6 +13060,13 @@
|
|
12718
13060
|
<!-- END Admonition -->
|
12719
13061
|
<!-- ================ -->
|
12720
13062
|
|
13063
|
+
<xsl:attribute-set name="references-non-normative-title-style">
|
13064
|
+
</xsl:attribute-set>
|
13065
|
+
|
13066
|
+
<xsl:template name="refine_references-non-normative-title-style">
|
13067
|
+
|
13068
|
+
</xsl:template>
|
13069
|
+
|
12721
13070
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
12722
13071
|
<xsl:attribute-set name="bibitem-normative-style">
|
12723
13072
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -12725,26 +13074,41 @@
|
|
12725
13074
|
<xsl:attribute name="text-indent">-14mm</xsl:attribute>
|
12726
13075
|
</xsl:attribute-set> <!-- bibitem-normative-style -->
|
12727
13076
|
|
13077
|
+
<xsl:template name="refine_bibitem-normative-style">
|
13078
|
+
</xsl:template>
|
13079
|
+
|
12728
13080
|
<!-- bibitem in Normative References (references/@normative="true"), renders as list -->
|
12729
13081
|
<xsl:attribute-set name="bibitem-normative-list-style">
|
12730
13082
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
12731
13083
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
12732
13084
|
</xsl:attribute-set> <!-- bibitem-normative-list-style -->
|
12733
13085
|
|
13086
|
+
<xsl:template name="refine_bibitem-normative-list-style">
|
13087
|
+
</xsl:template>
|
13088
|
+
|
12734
13089
|
<xsl:attribute-set name="bibitem-non-normative-style">
|
12735
13090
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
12736
13091
|
</xsl:attribute-set> <!-- bibitem-non-normative-style -->
|
12737
13092
|
|
13093
|
+
<xsl:template name="refine_bibitem-non-normative-style">
|
13094
|
+
</xsl:template>
|
13095
|
+
|
12738
13096
|
<!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
|
12739
13097
|
<xsl:attribute-set name="bibitem-non-normative-list-style">
|
12740
13098
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
12741
13099
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
12742
13100
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
|
12743
13101
|
|
13102
|
+
<xsl:template name="refine_bibitem-non-normative-list-style">
|
13103
|
+
</xsl:template>
|
13104
|
+
|
12744
13105
|
<xsl:attribute-set name="bibitem-non-normative-list-item-style">
|
12745
13106
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
12746
13107
|
</xsl:attribute-set>
|
12747
13108
|
|
13109
|
+
<xsl:template name="refine_bibitem-non-normative-list-item-style">
|
13110
|
+
</xsl:template>
|
13111
|
+
|
12748
13112
|
<!-- bibitem in bibliography section (references/@normative="false"), list body -->
|
12749
13113
|
<xsl:attribute-set name="bibitem-normative-list-body-style">
|
12750
13114
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -12752,12 +13116,18 @@
|
|
12752
13116
|
<xsl:attribute name="text-indent">-14mm</xsl:attribute>
|
12753
13117
|
</xsl:attribute-set>
|
12754
13118
|
|
13119
|
+
<xsl:template name="refine_bibitem-normative-list-body-style">
|
13120
|
+
</xsl:template>
|
13121
|
+
|
12755
13122
|
<xsl:attribute-set name="bibitem-non-normative-list-body-style">
|
12756
13123
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
12757
13124
|
<xsl:attribute name="margin-left">14mm</xsl:attribute>
|
12758
13125
|
<xsl:attribute name="text-indent">-14mm</xsl:attribute>
|
12759
13126
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
|
12760
13127
|
|
13128
|
+
<xsl:template name="refine_bibitem-non-normative-list-body-style">
|
13129
|
+
</xsl:template>
|
13130
|
+
|
12761
13131
|
<!-- footnote reference number for bibitem, in the text -->
|
12762
13132
|
<xsl:attribute-set name="bibitem-note-fn-style">
|
12763
13133
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
@@ -12766,6 +13136,9 @@
|
|
12766
13136
|
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
12767
13137
|
</xsl:attribute-set> <!-- bibitem-note-fn-style -->
|
12768
13138
|
|
13139
|
+
<xsl:template name="refine_bibitem-note-fn-style">
|
13140
|
+
</xsl:template>
|
13141
|
+
|
12769
13142
|
<!-- footnote number on the page bottom -->
|
12770
13143
|
<xsl:attribute-set name="bibitem-note-fn-number-style">
|
12771
13144
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
@@ -12784,6 +13157,9 @@
|
|
12784
13157
|
<xsl:attribute-set name="references-non-normative-style">
|
12785
13158
|
</xsl:attribute-set> <!-- references-non-normative-style -->
|
12786
13159
|
|
13160
|
+
<xsl:template name="refine_references-non-normative-style">
|
13161
|
+
</xsl:template>
|
13162
|
+
|
12787
13163
|
<!-- ======================= -->
|
12788
13164
|
<!-- Bibliography rendering -->
|
12789
13165
|
<!-- ======================= -->
|
@@ -12825,6 +13201,7 @@
|
|
12825
13201
|
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
12826
13202
|
|
12827
13203
|
<fo:block xsl:use-attribute-sets="references-non-normative-style">
|
13204
|
+
<xsl:call-template name="refine_references-non-normative-style"/>
|
12828
13205
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
12829
13206
|
</fo:block>
|
12830
13207
|
</xsl:template> <!-- references -->
|
@@ -12841,6 +13218,7 @@
|
|
12841
13218
|
<xsl:otherwise>
|
12842
13219
|
<xsl:call-template name="setNamedDestination"/>
|
12843
13220
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
13221
|
+
<xsl:call-template name="refine_bibitem-normative-style"/>
|
12844
13222
|
<xsl:call-template name="processBibitem"/>
|
12845
13223
|
</fo:block>
|
12846
13224
|
</xsl:otherwise>
|
@@ -12849,13 +13227,14 @@
|
|
12849
13227
|
</xsl:template> <!-- bibitem -->
|
12850
13228
|
|
12851
13229
|
<!-- Bibliography (non-normative references) -->
|
12852
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem
|
13230
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
12853
13231
|
<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 -->
|
12854
13232
|
<xsl:choose>
|
12855
13233
|
<xsl:when test="$skip = 'true'"><!-- skip bibitem --></xsl:when>
|
12856
13234
|
<xsl:otherwise>
|
12857
13235
|
<xsl:call-template name="setNamedDestination"/>
|
12858
13236
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
|
13237
|
+
<xsl:call-template name="refine_bibitem-non-normative-style"/>
|
12859
13238
|
<xsl:call-template name="processBibitem"/>
|
12860
13239
|
</fo:block>
|
12861
13240
|
</xsl:otherwise>
|
@@ -12863,12 +13242,17 @@
|
|
12863
13242
|
|
12864
13243
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
12865
13244
|
|
13245
|
+
<!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
|
13246
|
+
<xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
|
13247
|
+
|
12866
13248
|
<xsl:template name="insertListItem_Bibitem">
|
12867
13249
|
<xsl:choose>
|
12868
13250
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
12869
13251
|
<xsl:otherwise>
|
12870
13252
|
<xsl:call-template name="setNamedDestination"/>
|
12871
13253
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
13254
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
|
13255
|
+
|
12872
13256
|
<fo:list-item-label end-indent="label-end()">
|
12873
13257
|
<fo:block role="SKIP">
|
12874
13258
|
<fo:inline role="SKIP">
|
@@ -12879,16 +13263,18 @@
|
|
12879
13263
|
</fo:block>
|
12880
13264
|
</fo:list-item-label>
|
12881
13265
|
<fo:list-item-body start-indent="body-start()">
|
12882
|
-
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP"
|
13266
|
+
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
|
13267
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
|
12883
13268
|
<xsl:call-template name="processBibitem">
|
12884
13269
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
12885
13270
|
</xsl:call-template>
|
12886
13271
|
</fo:block>
|
13272
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
12887
13273
|
</fo:list-item-body>
|
12888
13274
|
</fo:list-item>
|
12889
13275
|
</xsl:otherwise>
|
12890
13276
|
</xsl:choose>
|
12891
|
-
<xsl:apply-templates select="following-sibling::*[
|
13277
|
+
<xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
|
12892
13278
|
<xsl:with-param name="skip">false</xsl:with-param>
|
12893
13279
|
</xsl:apply-templates>
|
12894
13280
|
</xsl:template>
|
@@ -12916,6 +13302,7 @@
|
|
12916
13302
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
12917
13303
|
</xsl:apply-templates>
|
12918
13304
|
<xsl:apply-templates select="mn:formattedref"/>
|
13305
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
12919
13306
|
</xsl:variable>
|
12920
13307
|
|
12921
13308
|
<xsl:choose>
|
@@ -12949,6 +13336,7 @@
|
|
12949
13336
|
<fo:block>
|
12950
13337
|
<xsl:copy-of select="$bibitem_body"/>
|
12951
13338
|
</fo:block>
|
13339
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
12952
13340
|
</fo:list-item-body>
|
12953
13341
|
</fo:list-item>
|
12954
13342
|
</fo:list-block>
|
@@ -12956,23 +13344,14 @@
|
|
12956
13344
|
</xsl:choose>
|
12957
13345
|
<!-- end ITU bibitem processing -->
|
12958
13346
|
|
12959
|
-
<xsl:call-template name="processBibliographyNote"/>
|
12960
13347
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
12961
13348
|
|
12962
|
-
<xsl:template name="
|
12963
|
-
|
12964
|
-
|
12965
|
-
|
12966
|
-
<xsl:copy> <!-- skip @id -->
|
12967
|
-
<xsl:copy-of select="node()"/>
|
12968
|
-
</xsl:copy>
|
12969
|
-
</xsl:element>
|
12970
|
-
</xsl:variable>
|
12971
|
-
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
12972
|
-
<xsl:call-template name="note"/>
|
12973
|
-
</xsl:for-each> -->
|
13349
|
+
<xsl:template name="processBibitemFollowingNotes">
|
13350
|
+
<!-- current context is bibitem element -->
|
13351
|
+
<xsl:variable name="bibitem_id" select="@id"/>
|
13352
|
+
<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]]">
|
12974
13353
|
<xsl:call-template name="note"/>
|
12975
|
-
</xsl:
|
13354
|
+
</xsl:for-each>
|
12976
13355
|
</xsl:template>
|
12977
13356
|
|
12978
13357
|
<xsl:template match="mn:title" mode="title">
|
@@ -13172,11 +13551,17 @@
|
|
13172
13551
|
<!-- Index section styles -->
|
13173
13552
|
<xsl:attribute-set name="indexsect-title-style">
|
13174
13553
|
<xsl:attribute name="role">H1</xsl:attribute>
|
13175
|
-
</xsl:attribute-set>
|
13554
|
+
</xsl:attribute-set> <!-- indexsect-title-style -->
|
13555
|
+
|
13556
|
+
<xsl:template name="refine_indexsect-title-style">
|
13557
|
+
</xsl:template>
|
13176
13558
|
|
13177
13559
|
<xsl:attribute-set name="indexsect-clause-title-style">
|
13178
13560
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
13179
|
-
</xsl:attribute-set>
|
13561
|
+
</xsl:attribute-set> <!-- indexsect-clause-title-style -->
|
13562
|
+
|
13563
|
+
<xsl:template name="refine_indexsect-clause-title-style">
|
13564
|
+
</xsl:template>
|
13180
13565
|
<!-- End Index section styles -->
|
13181
13566
|
|
13182
13567
|
<!-- =================== -->
|
@@ -13370,6 +13755,7 @@
|
|
13370
13755
|
|
13371
13756
|
<xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
|
13372
13757
|
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
13758
|
+
<xsl:call-template name="refine_indexsect-title-style"/>
|
13373
13759
|
<!-- Index -->
|
13374
13760
|
<xsl:apply-templates/>
|
13375
13761
|
</fo:block>
|
@@ -13378,6 +13764,7 @@
|
|
13378
13764
|
<xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
|
13379
13765
|
<!-- Letter A, B, C, ... -->
|
13380
13766
|
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
13767
|
+
<xsl:call-template name="refine_indexsect-clause-title-style"/>
|
13381
13768
|
<xsl:apply-templates/>
|
13382
13769
|
</fo:block>
|
13383
13770
|
</xsl:template>
|
@@ -13420,13 +13807,31 @@
|
|
13420
13807
|
<!-- skip here, see the template 'fmt-review-start' -->
|
13421
13808
|
</xsl:when>
|
13422
13809
|
<xsl:otherwise>
|
13423
|
-
|
13424
|
-
|
13425
|
-
|
13426
|
-
|
13810
|
+
<xsl:choose>
|
13811
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
13812
|
+
<fo:block font-size="1pt" line-height="0.1">
|
13813
|
+
<xsl:call-template name="fo_inline_bookmark">
|
13814
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
13815
|
+
</xsl:call-template>
|
13816
|
+
</fo:block>
|
13817
|
+
</xsl:when>
|
13818
|
+
<xsl:otherwise>
|
13819
|
+
<xsl:call-template name="fo_inline_bookmark">
|
13820
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
13821
|
+
</xsl:call-template>
|
13822
|
+
</xsl:otherwise>
|
13823
|
+
</xsl:choose>
|
13427
13824
|
</xsl:otherwise>
|
13428
13825
|
</xsl:choose>
|
13429
13826
|
</xsl:template>
|
13827
|
+
|
13828
|
+
<xsl:template name="fo_inline_bookmark">
|
13829
|
+
<xsl:param name="bookmark_id"/>
|
13830
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
13831
|
+
<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>
|
13832
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
13833
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
13834
|
+
</xsl:template>
|
13430
13835
|
<!-- =================== -->
|
13431
13836
|
<!-- End of Index processing -->
|
13432
13837
|
<!-- =================== -->
|
@@ -13570,9 +13975,15 @@
|
|
13570
13975
|
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
13571
13976
|
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
13572
13977
|
|
13978
|
+
<xsl:template name="refine_toc-leader-style">
|
13979
|
+
</xsl:template>
|
13980
|
+
|
13573
13981
|
<xsl:attribute-set name="toc-pagenumber-style">
|
13574
13982
|
</xsl:attribute-set>
|
13575
13983
|
|
13984
|
+
<xsl:template name="refine_toc-pagenumber-style">
|
13985
|
+
</xsl:template>
|
13986
|
+
|
13576
13987
|
<!-- List of Figures, Tables -->
|
13577
13988
|
<xsl:attribute-set name="toc-listof-title-style">
|
13578
13989
|
<xsl:attribute name="space-before">36pt</xsl:attribute>
|
@@ -13587,12 +13998,18 @@
|
|
13587
13998
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
13588
13999
|
</xsl:attribute-set>
|
13589
14000
|
|
14001
|
+
<xsl:template name="refine_toc-listof-item-block-style">
|
14002
|
+
</xsl:template>
|
14003
|
+
|
13590
14004
|
<xsl:attribute-set name="toc-listof-item-style">
|
13591
14005
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
13592
14006
|
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
13593
14007
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
13594
14008
|
</xsl:attribute-set>
|
13595
14009
|
|
14010
|
+
<xsl:template name="refine_toc-listof-item-style">
|
14011
|
+
</xsl:template>
|
14012
|
+
|
13596
14013
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
13597
14014
|
<xsl:variable name="nodes_preface_">
|
13598
14015
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -14706,23 +15123,55 @@
|
|
14706
15123
|
<!-- Ruby text (CJK languages) rendering -->
|
14707
15124
|
<!-- ===================================== -->
|
14708
15125
|
<!-- ===================================== -->
|
15126
|
+
|
15127
|
+
<xsl:attribute-set name="ruby-style">
|
15128
|
+
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
15129
|
+
<xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
|
15130
|
+
</xsl:attribute-set>
|
15131
|
+
|
15132
|
+
<xsl:template name="refine_ruby-style">
|
15133
|
+
<xsl:if test="not(ancestor::mn:ruby)">
|
15134
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
15135
|
+
</xsl:if>
|
15136
|
+
<xsl:variable name="rt_text" select="mn:rt"/>
|
15137
|
+
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
15138
|
+
<!-- Example: width="2em" -->
|
15139
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
15140
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
15141
|
+
<xsl:variable name="text_width">
|
15142
|
+
<xsl:choose>
|
15143
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
15144
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
15145
|
+
</xsl:choose>
|
15146
|
+
</xsl:variable>
|
15147
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
15148
|
+
</xsl:template> <!-- refine_ruby-style -->
|
15149
|
+
|
15150
|
+
<xsl:attribute-set name="rb-style">
|
15151
|
+
<xsl:attribute name="line-height">1em</xsl:attribute>
|
15152
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
15153
|
+
</xsl:attribute-set>
|
15154
|
+
|
15155
|
+
<xsl:template name="refine_rb-style">
|
15156
|
+
</xsl:template>
|
15157
|
+
|
15158
|
+
<xsl:attribute-set name="rt-style">
|
15159
|
+
<xsl:attribute name="font-size">0.5em</xsl:attribute>
|
15160
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
15161
|
+
<xsl:attribute name="line-height">1.2em</xsl:attribute>
|
15162
|
+
<xsl:attribute name="space-before">-1.4em</xsl:attribute>
|
15163
|
+
<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
|
15164
|
+
</xsl:attribute-set>
|
15165
|
+
|
15166
|
+
<xsl:template name="refine_rt-style">
|
15167
|
+
<xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
|
15168
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
15169
|
+
</xsl:if>
|
15170
|
+
</xsl:template>
|
15171
|
+
|
14709
15172
|
<xsl:template match="mn:ruby">
|
14710
|
-
<fo:inline-container
|
14711
|
-
<xsl:
|
14712
|
-
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
14713
|
-
</xsl:if>
|
14714
|
-
<xsl:variable name="rt_text" select="mn:rt"/>
|
14715
|
-
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
14716
|
-
<!-- Example: width="2em" -->
|
14717
|
-
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
14718
|
-
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
14719
|
-
<xsl:variable name="text_width">
|
14720
|
-
<xsl:choose>
|
14721
|
-
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
14722
|
-
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
14723
|
-
</xsl:choose>
|
14724
|
-
</xsl:variable>
|
14725
|
-
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
15173
|
+
<fo:inline-container xsl:use-attribute-sets="ruby-style">
|
15174
|
+
<xsl:call-template name="refine_ruby-style"/>
|
14726
15175
|
|
14727
15176
|
<xsl:choose>
|
14728
15177
|
<xsl:when test="ancestor::mn:ruby">
|
@@ -14740,17 +15189,14 @@
|
|
14740
15189
|
</xsl:template>
|
14741
15190
|
|
14742
15191
|
<xsl:template match="mn:rb">
|
14743
|
-
<fo:block
|
15192
|
+
<fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
|
14744
15193
|
</xsl:template>
|
14745
15194
|
|
14746
15195
|
<xsl:template match="mn:rt">
|
14747
|
-
<fo:block
|
14748
|
-
<xsl:
|
14749
|
-
<xsl:attribute name="space-before">0em</xsl:attribute>
|
14750
|
-
</xsl:if>
|
15196
|
+
<fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
|
15197
|
+
<xsl:call-template name="refine_rt-style"/>
|
14751
15198
|
<xsl:apply-templates/>
|
14752
15199
|
</fo:block>
|
14753
|
-
|
14754
15200
|
</xsl:template>
|
14755
15201
|
|
14756
15202
|
<!-- ===================================== -->
|
@@ -14759,6 +15205,18 @@
|
|
14759
15205
|
<!-- ===================================== -->
|
14760
15206
|
<!-- ===================================== -->
|
14761
15207
|
|
15208
|
+
<xsl:attribute-set name="annex-title-style">
|
15209
|
+
</xsl:attribute-set>
|
15210
|
+
|
15211
|
+
<xsl:template name="refine_annex-title-style">
|
15212
|
+
</xsl:template>
|
15213
|
+
|
15214
|
+
<xsl:attribute-set name="p-zzSTDTitle1-style">
|
15215
|
+
</xsl:attribute-set>
|
15216
|
+
|
15217
|
+
<xsl:template name="refine_p-zzSTDTitle1-style">
|
15218
|
+
</xsl:template>
|
15219
|
+
|
14762
15220
|
<xsl:template name="processPrefaceSectionsDefault">
|
14763
15221
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
14764
15222
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -15323,11 +15781,35 @@
|
|
15323
15781
|
|
15324
15782
|
<xsl:template match="mn:svgmap"/>
|
15325
15783
|
|
15784
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
15785
|
+
|
15326
15786
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
15327
15787
|
<xsl:template match="*[local-name() = 'lang_none']">
|
15328
15788
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
15329
15789
|
</xsl:template>
|
15330
15790
|
|
15791
|
+
<xsl:template name="addTagElementT">
|
15792
|
+
<xsl:variable name="title_">
|
15793
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
15794
|
+
</xsl:variable>
|
15795
|
+
<xsl:variable name="title__">
|
15796
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
15797
|
+
<xsl:choose>
|
15798
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
15799
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
15800
|
+
</xsl:choose>
|
15801
|
+
</xsl:for-each>
|
15802
|
+
</xsl:variable>
|
15803
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
15804
|
+
<xsl:if test="$title != ''">
|
15805
|
+
<xsl:attribute name="fox:title">
|
15806
|
+
<xsl:if test="ancestor::mn:sections">
|
15807
|
+
<xsl:text>Section </xsl:text>
|
15808
|
+
</xsl:if>
|
15809
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
15810
|
+
</xsl:if>
|
15811
|
+
</xsl:template>
|
15812
|
+
|
15331
15813
|
<xsl:template name="replaceChar">
|
15332
15814
|
<xsl:param name="text"/>
|
15333
15815
|
<xsl:param name="replace"/>
|
@@ -16094,6 +16576,13 @@
|
|
16094
16576
|
<xsl:with-param name="default" select="$text_align_default"/>
|
16095
16577
|
</xsl:call-template>
|
16096
16578
|
<xsl:call-template name="setKeepAttributes"/>
|
16579
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
16580
|
+
<xsl:variable name="styles">
|
16581
|
+
<xsl:apply-templates select="*[1]"/>
|
16582
|
+
</xsl:variable>
|
16583
|
+
<!-- move attribute line-height from inline to block -->
|
16584
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
16585
|
+
</xsl:if>
|
16097
16586
|
</xsl:template>
|
16098
16587
|
|
16099
16588
|
<xsl:template name="setKeepAttributes">
|
@@ -16119,34 +16608,41 @@
|
|
16119
16608
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
16120
16609
|
<fo:block>
|
16121
16610
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
16122
|
-
|
16123
|
-
|
16124
|
-
|
16125
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
16126
|
-
<xsl:call-template name="getSVG"/>
|
16127
|
-
</fo:instream-foreign-object>
|
16128
|
-
</xsl:when>
|
16129
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
16130
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
16131
|
-
</xsl:when>
|
16132
|
-
<xsl:otherwise> <!-- bitmap image -->
|
16133
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
16134
|
-
<xsl:if test="$coverimage_src != ''">
|
16135
|
-
<xsl:variable name="coverpage">
|
16136
|
-
<xsl:call-template name="getImageURL">
|
16137
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
16138
|
-
</xsl:call-template>
|
16139
|
-
</xsl:variable>
|
16140
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
16141
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
16142
|
-
</xsl:if>
|
16143
|
-
</xsl:otherwise>
|
16144
|
-
</xsl:choose>
|
16611
|
+
|
16612
|
+
<xsl:call-template name="insertPageImage"/>
|
16613
|
+
|
16145
16614
|
</xsl:for-each>
|
16146
16615
|
</fo:block>
|
16147
16616
|
</fo:block-container>
|
16148
16617
|
</xsl:template>
|
16149
16618
|
|
16619
|
+
<xsl:template name="insertPageImage">
|
16620
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
16621
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
16622
|
+
<xsl:choose>
|
16623
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
16624
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
16625
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
16626
|
+
<xsl:call-template name="getSVG"/>
|
16627
|
+
</fo:instream-foreign-object>
|
16628
|
+
</xsl:when>
|
16629
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
16630
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
16631
|
+
</xsl:when>
|
16632
|
+
<xsl:otherwise> <!-- bitmap image -->
|
16633
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
16634
|
+
<xsl:if test="$coverimage_src != ''">
|
16635
|
+
<xsl:variable name="coverpage">
|
16636
|
+
<xsl:call-template name="getImageURL">
|
16637
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
16638
|
+
</xsl:call-template>
|
16639
|
+
</xsl:variable>
|
16640
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
16641
|
+
</xsl:if>
|
16642
|
+
</xsl:otherwise>
|
16643
|
+
</xsl:choose>
|
16644
|
+
</xsl:template>
|
16645
|
+
|
16150
16646
|
<xsl:template name="getImageURL">
|
16151
16647
|
<xsl:param name="src"/>
|
16152
16648
|
<xsl:choose>
|
@@ -16574,6 +17070,14 @@
|
|
16574
17070
|
</xsl:attribute>
|
16575
17071
|
</xsl:template>
|
16576
17072
|
|
17073
|
+
<xsl:template name="getCharByCodePoint">
|
17074
|
+
<xsl:param name="codepoint"/>
|
17075
|
+
<xsl:param name="radix">16</xsl:param>
|
17076
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
17077
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
17078
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
17079
|
+
</xsl:template>
|
17080
|
+
|
16577
17081
|
<xsl:template name="substring-after-last">
|
16578
17082
|
<xsl:param name="value"/>
|
16579
17083
|
<xsl:param name="delimiter"/>
|