metanorma-iec 2.7.3 → 2.7.5
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/iec/html/htmlstyle.css +21 -25
- data/lib/isodoc/iec/iec.international-standard.xsl +618 -163
- data/lib/isodoc/iec/presentation_xml_convert.rb +37 -2
- data/lib/metanorma/iec/isodoc.rng +44 -19
- data/lib/metanorma/iec/version.rb +1 -1
- metadata +2 -2
@@ -2514,6 +2514,7 @@
|
|
2514
2514
|
<xsl:variable name="en_dash">–</xsl:variable>
|
2515
2515
|
<xsl:variable name="em_dash">—</xsl:variable>
|
2516
2516
|
<xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
|
2517
|
+
<xsl:variable name="nonbreak_space_em_dash"> —</xsl:variable>
|
2517
2518
|
<xsl:variable name="cr"> </xsl:variable>
|
2518
2519
|
<xsl:variable name="lf">
|
2519
2520
|
</xsl:variable>
|
@@ -3056,6 +3057,7 @@
|
|
3056
3057
|
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="update_xml_step1"/>
|
3057
3058
|
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]" mode="update_xml_step1"/>
|
3058
3059
|
<xsl:template match="mn:section-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
3060
|
+
<xsl:template match="mn:floating-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
3059
3061
|
<!-- <xsl:template match="mn:preferred[following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
|
3060
3062
|
<xsl:template match="mn:preferred" mode="update_xml_step1"/>
|
3061
3063
|
<!-- <xsl:template match="mn:admitted[following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
|
@@ -3070,10 +3072,10 @@
|
|
3070
3072
|
|
3071
3073
|
<xsl:template match="mn:term[@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
|
3072
3074
|
|
3073
|
-
<xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title]]" mode="update_xml_step1">
|
3075
|
+
<xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]]" mode="update_xml_step1">
|
3074
3076
|
<xsl:copy>
|
3075
3077
|
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
3076
|
-
<xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title]/@depth"/>
|
3078
|
+
<xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]/@depth"/>
|
3077
3079
|
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
3078
3080
|
</xsl:copy>
|
3079
3081
|
</xsl:template>
|
@@ -3869,10 +3871,16 @@
|
|
3869
3871
|
<xsl:attribute-set name="license-statement-style">
|
3870
3872
|
</xsl:attribute-set> <!-- license-statement-style -->
|
3871
3873
|
|
3874
|
+
<xsl:template name="refine_license-statement-style">
|
3875
|
+
</xsl:template>
|
3876
|
+
|
3872
3877
|
<xsl:attribute-set name="license-statement-title-style">
|
3873
3878
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3874
3879
|
</xsl:attribute-set> <!-- license-statement-title-style -->
|
3875
3880
|
|
3881
|
+
<xsl:template name="refine_license-statement-title-style">
|
3882
|
+
</xsl:template>
|
3883
|
+
|
3876
3884
|
<xsl:attribute-set name="license-statement-p-style">
|
3877
3885
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
3878
3886
|
|
@@ -3883,25 +3891,49 @@
|
|
3883
3891
|
<xsl:attribute-set name="legal-statement-style">
|
3884
3892
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
3885
3893
|
|
3894
|
+
<xsl:template name="refine_legal-statement-style">
|
3895
|
+
</xsl:template>
|
3896
|
+
|
3886
3897
|
<xsl:attribute-set name="legal-statement-title-style">
|
3887
3898
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3888
3899
|
</xsl:attribute-set> <!-- legal-statement-title-style -->
|
3889
3900
|
|
3901
|
+
<xsl:template name="refine_legal-statement-title-style">
|
3902
|
+
</xsl:template>
|
3903
|
+
|
3890
3904
|
<xsl:attribute-set name="legal-statement-p-style">
|
3891
3905
|
</xsl:attribute-set> <!-- legal-statement-p-style -->
|
3892
3906
|
|
3907
|
+
<xsl:template name="refine_legal-statement-p-style">
|
3908
|
+
<xsl:if test="@align">
|
3909
|
+
<xsl:attribute name="text-align">
|
3910
|
+
<xsl:value-of select="@align"/>
|
3911
|
+
</xsl:attribute>
|
3912
|
+
</xsl:if>
|
3913
|
+
</xsl:template>
|
3914
|
+
|
3893
3915
|
<xsl:attribute-set name="feedback-statement-style">
|
3894
3916
|
</xsl:attribute-set> <!-- feedback-statement-style -->
|
3895
3917
|
|
3918
|
+
<xsl:template name="refine_feedback-statement-style">
|
3919
|
+
</xsl:template>
|
3920
|
+
|
3896
3921
|
<xsl:attribute-set name="feedback-statement-title-style">
|
3897
3922
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3898
3923
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3899
3924
|
</xsl:attribute-set> <!-- feedback-statement-title-style -->
|
3900
3925
|
|
3926
|
+
<xsl:template name="refine_feedback-statement-title-style">
|
3927
|
+
|
3928
|
+
</xsl:template>
|
3929
|
+
|
3901
3930
|
<xsl:attribute-set name="feedback-statement-p-style">
|
3902
3931
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3903
3932
|
</xsl:attribute-set> <!-- feedback-statement-p-style -->
|
3904
3933
|
|
3934
|
+
<xsl:template name="refine_feedback-statement-p-style">
|
3935
|
+
</xsl:template>
|
3936
|
+
|
3905
3937
|
<!-- End boilerplate sections styles -->
|
3906
3938
|
|
3907
3939
|
<!-- ================================= -->
|
@@ -3927,6 +3959,7 @@
|
|
3927
3959
|
|
3928
3960
|
<xsl:template match="mn:license-statement">
|
3929
3961
|
<fo:block xsl:use-attribute-sets="license-statement-style">
|
3962
|
+
<xsl:call-template name="refine_license-statement-style"/>
|
3930
3963
|
<xsl:apply-templates/>
|
3931
3964
|
</fo:block>
|
3932
3965
|
</xsl:template> <!-- license-statement -->
|
@@ -3944,6 +3977,7 @@
|
|
3944
3977
|
<xsl:template match="mn:legal-statement">
|
3945
3978
|
<xsl:param name="isLegacy">false</xsl:param>
|
3946
3979
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
3980
|
+
<xsl:call-template name="refine_legal-statement-style"/>
|
3947
3981
|
<xsl:apply-templates/>
|
3948
3982
|
</fo:block>
|
3949
3983
|
</xsl:template> <!-- legal-statement -->
|
@@ -3973,6 +4007,7 @@
|
|
3973
4007
|
<xsl:call-template name="getLevel"/>
|
3974
4008
|
</xsl:variable>
|
3975
4009
|
<fo:block role="H{$level}" xsl:use-attribute-sets="feedback-statement-title-style">
|
4010
|
+
<xsl:call-template name="refine_feedback-statement-title-style"/>
|
3976
4011
|
<xsl:apply-templates/>
|
3977
4012
|
</fo:block>
|
3978
4013
|
|
@@ -3981,6 +4016,8 @@
|
|
3981
4016
|
<xsl:template match="mn:feedback-statement//mn:p">
|
3982
4017
|
<xsl:param name="margin"/>
|
3983
4018
|
<fo:block xsl:use-attribute-sets="feedback-statement-p-style">
|
4019
|
+
<xsl:call-template name="refine_feedback-statement-p-style"/>
|
4020
|
+
<!-- <xsl:copy-of select="@id"/> -->
|
3984
4021
|
<xsl:apply-templates/>
|
3985
4022
|
</fo:block>
|
3986
4023
|
|
@@ -4119,6 +4156,27 @@
|
|
4119
4156
|
<xsl:attribute-set name="sourcecode-container-style">
|
4120
4157
|
</xsl:attribute-set>
|
4121
4158
|
|
4159
|
+
<xsl:template name="refine_sourcecode-container-style">
|
4160
|
+
<xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
|
4161
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
4162
|
+
</xsl:if>
|
4163
|
+
|
4164
|
+
<xsl:if test="ancestor::mn:example">
|
4165
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
4166
|
+
</xsl:if>
|
4167
|
+
|
4168
|
+
<xsl:copy-of select="@id"/>
|
4169
|
+
|
4170
|
+
<xsl:if test="parent::mn:note">
|
4171
|
+
<xsl:attribute name="margin-left">
|
4172
|
+
<xsl:choose>
|
4173
|
+
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4174
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4175
|
+
</xsl:choose>
|
4176
|
+
</xsl:attribute>
|
4177
|
+
</xsl:if>
|
4178
|
+
</xsl:template>
|
4179
|
+
|
4122
4180
|
<xsl:attribute-set name="sourcecode-style">
|
4123
4181
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
4124
4182
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -4131,6 +4189,12 @@
|
|
4131
4189
|
<xsl:template name="refine_sourcecode-style">
|
4132
4190
|
</xsl:template> <!-- refine_sourcecode-style -->
|
4133
4191
|
|
4192
|
+
<xsl:attribute-set name="sourcecode-number-style">
|
4193
|
+
</xsl:attribute-set>
|
4194
|
+
|
4195
|
+
<xsl:template name="refine_sourcecode-number-style">
|
4196
|
+
</xsl:template>
|
4197
|
+
|
4134
4198
|
<xsl:attribute-set name="sourcecode-name-style">
|
4135
4199
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
4136
4200
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -4139,6 +4203,9 @@
|
|
4139
4203
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
4140
4204
|
</xsl:attribute-set> <!-- sourcecode-name-style -->
|
4141
4205
|
|
4206
|
+
<xsl:template name="refine_sourcecode-name-style">
|
4207
|
+
</xsl:template>
|
4208
|
+
|
4142
4209
|
<xsl:template name="add-zero-spaces-equal">
|
4143
4210
|
<xsl:param name="text" select="."/>
|
4144
4211
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
@@ -4226,24 +4293,8 @@
|
|
4226
4293
|
<xsl:otherwise>
|
4227
4294
|
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
|
4228
4295
|
|
4229
|
-
<xsl:
|
4230
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
4231
|
-
</xsl:if>
|
4232
|
-
|
4233
|
-
<xsl:if test="ancestor::mn:example">
|
4234
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
4235
|
-
</xsl:if>
|
4236
|
-
|
4237
|
-
<xsl:copy-of select="@id"/>
|
4296
|
+
<xsl:call-template name="refine_sourcecode-container-style"/>
|
4238
4297
|
|
4239
|
-
<xsl:if test="parent::mn:note">
|
4240
|
-
<xsl:attribute name="margin-left">
|
4241
|
-
<xsl:choose>
|
4242
|
-
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4243
|
-
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4244
|
-
</xsl:choose>
|
4245
|
-
</xsl:attribute>
|
4246
|
-
</xsl:if>
|
4247
4298
|
<fo:block-container margin-left="0mm" role="SKIP">
|
4248
4299
|
|
4249
4300
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
@@ -4570,6 +4621,7 @@
|
|
4570
4621
|
<xsl:template match="mn:sourcecode/mn:fmt-name">
|
4571
4622
|
<xsl:if test="normalize-space() != ''">
|
4572
4623
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4624
|
+
<xsl:call-template name="refine_sourcecode-name-style"/>
|
4573
4625
|
<xsl:apply-templates/>
|
4574
4626
|
</fo:block>
|
4575
4627
|
</xsl:if>
|
@@ -4618,12 +4670,31 @@
|
|
4618
4670
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
4619
4671
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
4620
4672
|
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
4621
|
-
</xsl:attribute-set>
|
4673
|
+
</xsl:attribute-set> <!-- pre-style -->
|
4674
|
+
|
4675
|
+
<xsl:template name="refine_pre-style">
|
4676
|
+
</xsl:template>
|
4622
4677
|
|
4623
4678
|
<xsl:attribute-set name="tt-style">
|
4624
4679
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
4625
4680
|
</xsl:attribute-set>
|
4626
4681
|
|
4682
|
+
<xsl:template name="refine_tt-style">
|
4683
|
+
<xsl:variable name="_font-size">10 <!-- inherit -->
|
4684
|
+
</xsl:variable>
|
4685
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
4686
|
+
<xsl:if test="$font-size != ''">
|
4687
|
+
<xsl:attribute name="font-size">
|
4688
|
+
<xsl:choose>
|
4689
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4690
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4691
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4692
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4693
|
+
</xsl:choose>
|
4694
|
+
</xsl:attribute>
|
4695
|
+
</xsl:if>
|
4696
|
+
</xsl:template>
|
4697
|
+
|
4627
4698
|
<xsl:variable name="color-added-text">
|
4628
4699
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
4629
4700
|
</xsl:variable>
|
@@ -4636,9 +4707,14 @@
|
|
4636
4707
|
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
4637
4708
|
</xsl:attribute-set>
|
4638
4709
|
|
4710
|
+
<xsl:template name="refine_add-style">
|
4711
|
+
</xsl:template>
|
4712
|
+
|
4639
4713
|
<xsl:variable name="add-style">
|
4640
|
-
|
4641
|
-
|
4714
|
+
<add-style xsl:use-attribute-sets="add-style">
|
4715
|
+
<xsl:call-template name="refine_add-style"/>
|
4716
|
+
</add-style>
|
4717
|
+
</xsl:variable>
|
4642
4718
|
<xsl:template name="append_add-style">
|
4643
4719
|
<xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
|
4644
4720
|
</xsl:template>
|
@@ -4651,24 +4727,77 @@
|
|
4651
4727
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
4652
4728
|
</xsl:attribute-set>
|
4653
4729
|
|
4730
|
+
<xsl:template name="refine_del-style">
|
4731
|
+
</xsl:template>
|
4732
|
+
|
4733
|
+
<xsl:attribute-set name="strong-style">
|
4734
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4735
|
+
</xsl:attribute-set>
|
4736
|
+
|
4737
|
+
<xsl:template name="refine_strong_style">
|
4738
|
+
<xsl:if test="ancestor::*['preferred']">
|
4739
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
4740
|
+
</xsl:if>
|
4741
|
+
</xsl:template> <!-- refine_strong_style -->
|
4742
|
+
|
4743
|
+
<xsl:attribute-set name="em-style">
|
4744
|
+
<xsl:attribute name="font-style">italic</xsl:attribute>
|
4745
|
+
</xsl:attribute-set>
|
4746
|
+
|
4747
|
+
<xsl:template name="refine_em_style">
|
4748
|
+
</xsl:template> <!-- refine_em_style -->
|
4749
|
+
|
4750
|
+
<xsl:attribute-set name="sup-style">
|
4751
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4752
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
4753
|
+
</xsl:attribute-set>
|
4754
|
+
|
4755
|
+
<xsl:template name="refine_sup-style">
|
4756
|
+
</xsl:template>
|
4757
|
+
|
4758
|
+
<xsl:attribute-set name="sub-style">
|
4759
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4760
|
+
<xsl:attribute name="vertical-align">sub</xsl:attribute>
|
4761
|
+
</xsl:attribute-set>
|
4762
|
+
|
4763
|
+
<xsl:template name="refine_sub-style">
|
4764
|
+
</xsl:template>
|
4765
|
+
|
4766
|
+
<xsl:attribute-set name="underline-style">
|
4767
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
4768
|
+
</xsl:attribute-set>
|
4769
|
+
|
4770
|
+
<xsl:template name="refine_underline-style">
|
4771
|
+
</xsl:template>
|
4772
|
+
|
4773
|
+
<xsl:attribute-set name="hi-style">
|
4774
|
+
<xsl:attribute name="background-color">yellow</xsl:attribute>
|
4775
|
+
</xsl:attribute-set>
|
4776
|
+
|
4777
|
+
<xsl:template name="refine_hi-style">
|
4778
|
+
</xsl:template>
|
4779
|
+
|
4780
|
+
<xsl:attribute-set name="strike-style">
|
4781
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
4782
|
+
</xsl:attribute-set>
|
4783
|
+
|
4784
|
+
<xsl:template name="refine_strike-style">
|
4785
|
+
</xsl:template>
|
4786
|
+
|
4654
4787
|
<xsl:template match="mn:br">
|
4655
4788
|
<xsl:value-of select="$linebreak"/>
|
4656
4789
|
</xsl:template>
|
4657
4790
|
|
4658
|
-
|
4659
|
-
<fo:inline
|
4660
|
-
<xsl:call-template name="
|
4791
|
+
<xsl:template match="mn:em">
|
4792
|
+
<fo:inline xsl:use-attribute-sets="em-style">
|
4793
|
+
<xsl:call-template name="refine_em_style"/>
|
4661
4794
|
<xsl:apply-templates/>
|
4662
4795
|
</fo:inline>
|
4663
4796
|
</xsl:template>
|
4664
4797
|
|
4665
|
-
<xsl:template name="refine_italic_style">
|
4666
|
-
</xsl:template>
|
4667
|
-
|
4668
4798
|
<xsl:template match="mn:strong | *[local-name()='b']">
|
4669
4799
|
<xsl:param name="split_keep-within-line"/>
|
4670
|
-
<fo:inline
|
4671
|
-
|
4800
|
+
<fo:inline xsl:use-attribute-sets="strong-style">
|
4672
4801
|
<xsl:call-template name="refine_strong_style"/>
|
4673
4802
|
|
4674
4803
|
<xsl:apply-templates>
|
@@ -4677,44 +4806,27 @@
|
|
4677
4806
|
</fo:inline>
|
4678
4807
|
</xsl:template>
|
4679
4808
|
|
4680
|
-
<xsl:template name="refine_strong_style">
|
4681
|
-
<xsl:if test="ancestor::*['preferred']">
|
4682
|
-
<xsl:attribute name="role">SKIP</xsl:attribute>
|
4683
|
-
</xsl:if>
|
4684
|
-
</xsl:template>
|
4685
|
-
|
4686
4809
|
<xsl:template match="*[local-name()='padding']">
|
4687
4810
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
4688
4811
|
</xsl:template>
|
4689
4812
|
|
4690
4813
|
<xsl:template match="mn:sup">
|
4691
|
-
<fo:inline
|
4814
|
+
<fo:inline xsl:use-attribute-sets="sup-style">
|
4815
|
+
<xsl:call-template name="refine_sup-style"/>
|
4692
4816
|
<xsl:apply-templates/>
|
4693
4817
|
</fo:inline>
|
4694
4818
|
</xsl:template>
|
4695
4819
|
|
4696
4820
|
<xsl:template match="mn:sub">
|
4697
|
-
<fo:inline
|
4821
|
+
<fo:inline xsl:use-attribute-sets="sub-style">
|
4822
|
+
<xsl:call-template name="refine_sub-style"/>
|
4698
4823
|
<xsl:apply-templates/>
|
4699
4824
|
</fo:inline>
|
4700
4825
|
</xsl:template>
|
4701
4826
|
|
4702
4827
|
<xsl:template match="mn:tt">
|
4703
4828
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
4704
|
-
|
4705
|
-
<xsl:variable name="_font-size">10 <!-- inherit -->
|
4706
|
-
</xsl:variable>
|
4707
|
-
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
4708
|
-
<xsl:if test="$font-size != ''">
|
4709
|
-
<xsl:attribute name="font-size">
|
4710
|
-
<xsl:choose>
|
4711
|
-
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
4712
|
-
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
4713
|
-
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4714
|
-
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4715
|
-
</xsl:choose>
|
4716
|
-
</xsl:attribute>
|
4717
|
-
</xsl:if>
|
4829
|
+
<xsl:call-template name="refine_tt-style"/>
|
4718
4830
|
<xsl:apply-templates/>
|
4719
4831
|
</fo:inline>
|
4720
4832
|
</xsl:template> <!-- tt -->
|
@@ -4733,7 +4845,8 @@
|
|
4733
4845
|
</xsl:template>
|
4734
4846
|
|
4735
4847
|
<xsl:template match="mn:underline">
|
4736
|
-
<fo:inline
|
4848
|
+
<fo:inline xsl:use-attribute-sets="underline-style">
|
4849
|
+
<xsl:call-template name="refine_underline-style"/>
|
4737
4850
|
<xsl:apply-templates/>
|
4738
4851
|
</fo:inline>
|
4739
4852
|
</xsl:template>
|
@@ -4891,6 +5004,7 @@
|
|
4891
5004
|
|
4892
5005
|
<xsl:template match="mn:del">
|
4893
5006
|
<fo:inline xsl:use-attribute-sets="del-style">
|
5007
|
+
<xsl:call-template name="refine_del-style"/>
|
4894
5008
|
<xsl:apply-templates/>
|
4895
5009
|
</fo:inline>
|
4896
5010
|
</xsl:template>
|
@@ -4900,7 +5014,8 @@
|
|
4900
5014
|
|
4901
5015
|
<!-- highlight text -->
|
4902
5016
|
<xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
|
4903
|
-
<fo:inline
|
5017
|
+
<fo:inline xsl:use-attribute-sets="hi-style">
|
5018
|
+
<xsl:call-template name="refine_hi-style"/>
|
4904
5019
|
<xsl:apply-templates/>
|
4905
5020
|
</fo:inline>
|
4906
5021
|
</xsl:template>
|
@@ -4986,7 +5101,8 @@
|
|
4986
5101
|
</xsl:template>
|
4987
5102
|
|
4988
5103
|
<xsl:template match="mn:strike">
|
4989
|
-
<fo:inline
|
5104
|
+
<fo:inline xsl:use-attribute-sets="strike-style">
|
5105
|
+
<xsl:call-template name="refine_strike-style"/>
|
4990
5106
|
<xsl:apply-templates/>
|
4991
5107
|
</fo:inline>
|
4992
5108
|
</xsl:template>
|
@@ -5066,6 +5182,7 @@
|
|
5066
5182
|
|
5067
5183
|
<xsl:template match="mn:pre" name="pre">
|
5068
5184
|
<fo:block xsl:use-attribute-sets="pre-style">
|
5185
|
+
<xsl:call-template name="refine_pre-style"/>
|
5069
5186
|
<xsl:copy-of select="@id"/>
|
5070
5187
|
<xsl:choose>
|
5071
5188
|
|
@@ -5096,22 +5213,40 @@
|
|
5096
5213
|
<xsl:attribute-set name="permission-style">
|
5097
5214
|
</xsl:attribute-set>
|
5098
5215
|
|
5216
|
+
<xsl:template name="refine_permission-style">
|
5217
|
+
</xsl:template>
|
5218
|
+
|
5099
5219
|
<xsl:attribute-set name="permission-name-style">
|
5100
5220
|
</xsl:attribute-set>
|
5101
5221
|
|
5222
|
+
<xsl:template name="refine_permission-name-style">
|
5223
|
+
</xsl:template>
|
5224
|
+
|
5102
5225
|
<xsl:attribute-set name="permission-label-style">
|
5103
5226
|
</xsl:attribute-set>
|
5104
5227
|
|
5228
|
+
<xsl:template name="refine_permission-label-style">
|
5229
|
+
</xsl:template>
|
5230
|
+
|
5105
5231
|
<xsl:attribute-set name="requirement-style">
|
5106
5232
|
</xsl:attribute-set>
|
5107
5233
|
|
5234
|
+
<xsl:template name="refine_requirement-style">
|
5235
|
+
</xsl:template>
|
5236
|
+
|
5108
5237
|
<xsl:attribute-set name="requirement-name-style">
|
5109
5238
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
5110
5239
|
</xsl:attribute-set>
|
5111
5240
|
|
5241
|
+
<xsl:template name="refine_requirement-name-style">
|
5242
|
+
</xsl:template>
|
5243
|
+
|
5112
5244
|
<xsl:attribute-set name="requirement-label-style">
|
5113
5245
|
</xsl:attribute-set>
|
5114
5246
|
|
5247
|
+
<xsl:template name="refine_requirement-label-style">
|
5248
|
+
</xsl:template>
|
5249
|
+
|
5115
5250
|
<xsl:attribute-set name="subject-style">
|
5116
5251
|
</xsl:attribute-set>
|
5117
5252
|
|
@@ -5139,18 +5274,28 @@
|
|
5139
5274
|
<xsl:attribute-set name="recommendation-style">
|
5140
5275
|
</xsl:attribute-set>
|
5141
5276
|
|
5277
|
+
<xsl:template name="refine_recommendation-style">
|
5278
|
+
</xsl:template>
|
5279
|
+
|
5142
5280
|
<xsl:attribute-set name="recommendation-name-style">
|
5143
5281
|
</xsl:attribute-set>
|
5144
5282
|
|
5283
|
+
<xsl:template name="refine_recommendation-name-style">
|
5284
|
+
</xsl:template>
|
5285
|
+
|
5145
5286
|
<xsl:attribute-set name="recommendation-label-style">
|
5146
5287
|
</xsl:attribute-set>
|
5147
5288
|
|
5289
|
+
<xsl:template name="refine_recommendation-label-style">
|
5290
|
+
</xsl:template>
|
5291
|
+
|
5148
5292
|
<!-- ========== -->
|
5149
5293
|
<!-- permission -->
|
5150
5294
|
<!-- ========== -->
|
5151
5295
|
<xsl:template match="mn:permission">
|
5152
5296
|
<xsl:call-template name="setNamedDestination"/>
|
5153
5297
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
5298
|
+
<xsl:call-template name="refine_permission-style"/>
|
5154
5299
|
<xsl:apply-templates select="mn:fmt-name"/>
|
5155
5300
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
5156
5301
|
</fo:block>
|
@@ -5159,6 +5304,7 @@
|
|
5159
5304
|
<xsl:template match="mn:permission/mn:fmt-name">
|
5160
5305
|
<xsl:if test="normalize-space() != ''">
|
5161
5306
|
<fo:block xsl:use-attribute-sets="permission-name-style">
|
5307
|
+
<xsl:call-template name="refine_permission-name-style"/>
|
5162
5308
|
<xsl:apply-templates/>
|
5163
5309
|
</fo:block>
|
5164
5310
|
</xsl:if>
|
@@ -5166,6 +5312,7 @@
|
|
5166
5312
|
|
5167
5313
|
<xsl:template match="mn:permission/mn:label">
|
5168
5314
|
<fo:block xsl:use-attribute-sets="permission-label-style">
|
5315
|
+
<xsl:call-template name="refine_permission-label-style"/>
|
5169
5316
|
<xsl:apply-templates/>
|
5170
5317
|
</fo:block>
|
5171
5318
|
</xsl:template>
|
@@ -5178,6 +5325,7 @@
|
|
5178
5325
|
<xsl:template match="mn:requirement">
|
5179
5326
|
<xsl:call-template name="setNamedDestination"/>
|
5180
5327
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
5328
|
+
<xsl:call-template name="refine_requirement-style"/>
|
5181
5329
|
<xsl:apply-templates select="mn:fmt-name"/>
|
5182
5330
|
<xsl:apply-templates select="mn:label"/>
|
5183
5331
|
<xsl:apply-templates select="@obligation"/>
|
@@ -5190,6 +5338,7 @@
|
|
5190
5338
|
<xsl:if test="normalize-space() != ''">
|
5191
5339
|
|
5192
5340
|
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
5341
|
+
<xsl:call-template name="refine_requirement-name-style"/>
|
5193
5342
|
<xsl:apply-templates/>
|
5194
5343
|
</fo:block>
|
5195
5344
|
</xsl:if>
|
@@ -5197,6 +5346,7 @@
|
|
5197
5346
|
|
5198
5347
|
<xsl:template match="mn:requirement/mn:label">
|
5199
5348
|
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
5349
|
+
<xsl:call-template name="refine_requirement-label-style"/>
|
5200
5350
|
<xsl:apply-templates/>
|
5201
5351
|
</fo:block>
|
5202
5352
|
</xsl:template>
|
@@ -5222,6 +5372,7 @@
|
|
5222
5372
|
<xsl:template match="mn:recommendation">
|
5223
5373
|
<xsl:call-template name="setNamedDestination"/>
|
5224
5374
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
5375
|
+
<xsl:call-template name="refine_recommendation-style"/>
|
5225
5376
|
<xsl:apply-templates select="mn:fmt-name"/>
|
5226
5377
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
5227
5378
|
</fo:block>
|
@@ -5231,6 +5382,7 @@
|
|
5231
5382
|
<xsl:if test="normalize-space() != ''">
|
5232
5383
|
|
5233
5384
|
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
5385
|
+
<xsl:call-template name="refine_recommendation-name-style"/>
|
5234
5386
|
<xsl:apply-templates/>
|
5235
5387
|
</fo:block>
|
5236
5388
|
</xsl:if>
|
@@ -5238,6 +5390,7 @@
|
|
5238
5390
|
|
5239
5391
|
<xsl:template match="mn:recommendation/mn:label">
|
5240
5392
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
5393
|
+
<xsl:call-template name="refine_recommendation-label-style"/>
|
5241
5394
|
<xsl:apply-templates/>
|
5242
5395
|
</fo:block>
|
5243
5396
|
</xsl:template>
|
@@ -5418,40 +5571,79 @@
|
|
5418
5571
|
<xsl:attribute-set name="term-style">
|
5419
5572
|
</xsl:attribute-set> <!-- term-style -->
|
5420
5573
|
|
5574
|
+
<xsl:template name="refine_term-style">
|
5575
|
+
</xsl:template>
|
5576
|
+
|
5421
5577
|
<xsl:attribute-set name="term-name-style">
|
5422
5578
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
5423
5579
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
5424
5580
|
</xsl:attribute-set> <!-- term-name-style -->
|
5425
5581
|
|
5426
|
-
|
5582
|
+
<xsl:template name="refine_term-name-style">
|
5583
|
+
</xsl:template>
|
5584
|
+
|
5585
|
+
<xsl:attribute-set name="preferred-style">
|
5586
|
+
</xsl:attribute-set> <!-- preferred-style -->
|
5587
|
+
|
5588
|
+
<xsl:template name="refine_preferred-style">
|
5589
|
+
</xsl:template>
|
5590
|
+
|
5591
|
+
<xsl:attribute-set name="preferred-block-style">
|
5427
5592
|
<xsl:attribute name="line-height">1.1</xsl:attribute>
|
5428
5593
|
<xsl:attribute name="space-before">14pt</xsl:attribute>
|
5429
5594
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
5430
5595
|
|
5596
|
+
<xsl:template name="refine_preferred-block-style">
|
5597
|
+
<xsl:if test="preceding-sibling::*[1][self::mn:fmt-preferred]">
|
5598
|
+
<xsl:attribute name="space-before">1pt</xsl:attribute>
|
5599
|
+
</xsl:if>
|
5600
|
+
</xsl:template>
|
5601
|
+
|
5431
5602
|
<xsl:attribute-set name="preferred-term-style">
|
5432
5603
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
5433
5604
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
5434
5605
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
5435
5606
|
|
5607
|
+
<xsl:template name="refine_preferred-term-style">
|
5608
|
+
<xsl:if test="mn:strong">
|
5609
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
5610
|
+
</xsl:if>
|
5611
|
+
</xsl:template>
|
5612
|
+
|
5436
5613
|
<xsl:attribute-set name="domain-style">
|
5437
5614
|
</xsl:attribute-set> <!-- domain-style -->
|
5438
5615
|
|
5616
|
+
<xsl:template name="refine_domain-style">
|
5617
|
+
</xsl:template>
|
5618
|
+
|
5439
5619
|
<xsl:attribute-set name="admitted-style">
|
5440
5620
|
</xsl:attribute-set> <!-- admitted-style -->
|
5441
5621
|
|
5622
|
+
<xsl:template name="refine_admitted-style">
|
5623
|
+
</xsl:template>
|
5624
|
+
|
5442
5625
|
<xsl:attribute-set name="deprecates-style">
|
5443
5626
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
5444
5627
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
5445
5628
|
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
5446
5629
|
</xsl:attribute-set> <!-- deprecates-style -->
|
5447
5630
|
|
5631
|
+
<xsl:template name="refine_deprecates-style">
|
5632
|
+
</xsl:template>
|
5633
|
+
|
5448
5634
|
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
5449
5635
|
</xsl:attribute-set>
|
5450
5636
|
|
5637
|
+
<xsl:template name="refine_related-block-style">
|
5638
|
+
</xsl:template>
|
5639
|
+
|
5451
5640
|
<xsl:attribute-set name="definition-style">
|
5452
5641
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
5453
5642
|
</xsl:attribute-set> <!-- definition-style -->
|
5454
5643
|
|
5644
|
+
<xsl:template name="refine_definition-style">
|
5645
|
+
</xsl:template>
|
5646
|
+
|
5455
5647
|
<xsl:attribute-set name="termsource-style">
|
5456
5648
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
5457
5649
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
@@ -5463,9 +5655,15 @@
|
|
5463
5655
|
<xsl:attribute-set name="termsource-text-style">
|
5464
5656
|
</xsl:attribute-set> <!-- termsource-text-style -->
|
5465
5657
|
|
5658
|
+
<xsl:template name="refine_termsource-text-style">
|
5659
|
+
</xsl:template>
|
5660
|
+
|
5466
5661
|
<xsl:attribute-set name="origin-style">
|
5467
5662
|
</xsl:attribute-set> <!-- origin-style -->
|
5468
5663
|
|
5664
|
+
<xsl:template name="refine_origin-style">
|
5665
|
+
</xsl:template>
|
5666
|
+
|
5469
5667
|
<!-- ====== -->
|
5470
5668
|
<!-- term -->
|
5471
5669
|
<!-- ====== -->
|
@@ -5481,9 +5679,8 @@
|
|
5481
5679
|
<xsl:template match="mn:term">
|
5482
5680
|
<xsl:call-template name="setNamedDestination"/>
|
5483
5681
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
5682
|
+
<xsl:call-template name="refine_term-style"/>
|
5484
5683
|
|
5485
|
-
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
5486
|
-
</xsl:if>
|
5487
5684
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
5488
5685
|
</fo:block>
|
5489
5686
|
</xsl:template>
|
@@ -5559,6 +5756,7 @@
|
|
5559
5756
|
<!-- text SOURCE: -->
|
5560
5757
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
5561
5758
|
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
5759
|
+
<xsl:call-template name="refine_termsource-text-style"/>
|
5562
5760
|
<xsl:value-of select="."/>
|
5563
5761
|
</fo:inline>
|
5564
5762
|
</xsl:template>
|
@@ -5571,6 +5769,7 @@
|
|
5571
5769
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
5572
5770
|
</xsl:if>
|
5573
5771
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
5772
|
+
<xsl:call-template name="refine_origin-style"/>
|
5574
5773
|
<xsl:apply-templates/>
|
5575
5774
|
</fo:inline>
|
5576
5775
|
</fo:basic-link>
|
@@ -5619,13 +5818,13 @@
|
|
5619
5818
|
<xsl:call-template name="getLevelTermName"/>
|
5620
5819
|
</xsl:variable>
|
5621
5820
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
5622
|
-
|
5623
|
-
|
5624
|
-
</xsl:if>
|
5821
|
+
|
5822
|
+
<xsl:call-template name="refine_preferred-block-style"/>
|
5625
5823
|
|
5626
5824
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
5627
5825
|
|
5628
5826
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
5827
|
+
<xsl:call-template name="refine_term-name-style"/>
|
5629
5828
|
|
5630
5829
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
5631
5830
|
<xsl:call-template name="setIDforNamedDestination"/>
|
@@ -5636,7 +5835,7 @@
|
|
5636
5835
|
</xsl:if>
|
5637
5836
|
|
5638
5837
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
5639
|
-
<xsl:call-template name="
|
5838
|
+
<xsl:call-template name="refine_preferred-term-style"/>
|
5640
5839
|
|
5641
5840
|
<xsl:apply-templates/>
|
5642
5841
|
</fo:block>
|
@@ -5657,22 +5856,18 @@
|
|
5657
5856
|
|
5658
5857
|
<xsl:template match="mn:fmt-admitted">
|
5659
5858
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
5859
|
+
<xsl:call-template name="refine_admitted-style"/>
|
5660
5860
|
<xsl:apply-templates/>
|
5661
5861
|
</fo:block>
|
5662
5862
|
</xsl:template>
|
5663
5863
|
|
5664
5864
|
<xsl:template match="mn:fmt-deprecates">
|
5665
5865
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
5866
|
+
<xsl:call-template name="refine_deprecates-style"/>
|
5666
5867
|
<xsl:apply-templates/>
|
5667
5868
|
</fo:block>
|
5668
5869
|
</xsl:template>
|
5669
5870
|
|
5670
|
-
<xsl:template name="setStyle_preferred">
|
5671
|
-
<xsl:if test="mn:strong">
|
5672
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
5673
|
-
</xsl:if>
|
5674
|
-
</xsl:template>
|
5675
|
-
|
5676
5871
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
5677
5872
|
<!-- in metanorma xml preferred terms delimited by semicolons -->
|
5678
5873
|
<xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
|
@@ -5682,6 +5877,7 @@
|
|
5682
5877
|
|
5683
5878
|
<xsl:template match="mn:fmt-related">
|
5684
5879
|
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
5880
|
+
<xsl:call-template name="refine_related-block-style"/>
|
5685
5881
|
<xsl:apply-templates/>
|
5686
5882
|
</fo:block>
|
5687
5883
|
</xsl:template>
|
@@ -5696,6 +5892,7 @@
|
|
5696
5892
|
<!-- ========== -->
|
5697
5893
|
<xsl:template match="mn:fmt-definition">
|
5698
5894
|
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
5895
|
+
<xsl:call-template name="refine_definition-style"/>
|
5699
5896
|
<xsl:apply-templates/>
|
5700
5897
|
</fo:block>
|
5701
5898
|
</xsl:template>
|
@@ -5745,6 +5942,9 @@
|
|
5745
5942
|
<xsl:attribute name="margin-left">10mm</xsl:attribute>
|
5746
5943
|
</xsl:attribute-set> <!-- example-body-style -->
|
5747
5944
|
|
5945
|
+
<xsl:template name="refine_example-body-style">
|
5946
|
+
</xsl:template>
|
5947
|
+
|
5748
5948
|
<xsl:attribute-set name="example-name-style">
|
5749
5949
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
5750
5950
|
<xsl:attribute name="padding-right">9mm</xsl:attribute>
|
@@ -5792,6 +5992,8 @@
|
|
5792
5992
|
<xsl:when test="contains($element, 'block')">
|
5793
5993
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
5794
5994
|
|
5995
|
+
<xsl:call-template name="refine_example-p-style"/>
|
5996
|
+
|
5795
5997
|
<xsl:apply-templates/>
|
5796
5998
|
</fo:block>
|
5797
5999
|
</xsl:when>
|
@@ -5849,6 +6051,7 @@
|
|
5849
6051
|
</fo:block>
|
5850
6052
|
|
5851
6053
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
6054
|
+
<xsl:call-template name="refine_example-body-style"/>
|
5852
6055
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
5853
6056
|
<xsl:variable name="example_body">
|
5854
6057
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
@@ -5911,6 +6114,7 @@
|
|
5911
6114
|
<xsl:if test="*[not(self::mn:fmt-name)][position() > 1]">
|
5912
6115
|
<!-- display further elements in blocks -->
|
5913
6116
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
6117
|
+
<xsl:call-template name="refine_example-body-style"/>
|
5914
6118
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
5915
6119
|
<xsl:apply-templates select="*[not(self::mn:fmt-name)][position() > 1]">
|
5916
6120
|
<xsl:with-param name="fo_element" select="'block'"/>
|
@@ -6039,6 +6243,12 @@
|
|
6039
6243
|
<xsl:call-template name="setBordersTableArray"/>
|
6040
6244
|
</xsl:template> <!-- refine_table-style -->
|
6041
6245
|
|
6246
|
+
<xsl:attribute-set name="table-number-style">
|
6247
|
+
</xsl:attribute-set>
|
6248
|
+
|
6249
|
+
<xsl:template name="refine_table-number-style">
|
6250
|
+
</xsl:template>
|
6251
|
+
|
6042
6252
|
<xsl:attribute-set name="table-name-style">
|
6043
6253
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
6044
6254
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
@@ -6174,6 +6384,9 @@
|
|
6174
6384
|
<!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
|
6175
6385
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
6176
6386
|
|
6387
|
+
<xsl:template name="refine_table-fn-number-style">
|
6388
|
+
</xsl:template>
|
6389
|
+
|
6177
6390
|
<xsl:attribute-set name="table-fmt-fn-label-style">
|
6178
6391
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
6179
6392
|
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
@@ -6183,33 +6396,12 @@
|
|
6183
6396
|
<xsl:template name="refine_table-fmt-fn-label-style">
|
6184
6397
|
</xsl:template>
|
6185
6398
|
|
6186
|
-
<xsl:attribute-set name="fn-container-body-style">
|
6187
|
-
<xsl:attribute name="text-indent">0</xsl:attribute>
|
6188
|
-
<xsl:attribute name="start-indent">0</xsl:attribute>
|
6189
|
-
</xsl:attribute-set>
|
6190
|
-
|
6191
6399
|
<xsl:attribute-set name="table-fn-body-style">
|
6192
6400
|
</xsl:attribute-set>
|
6193
6401
|
|
6194
|
-
<xsl:
|
6195
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
6196
|
-
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
6197
|
-
|
6198
|
-
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
6199
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
6200
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
6201
|
-
<xsl:attribute name="baseline-shift">65%</xsl:attribute>
|
6202
|
-
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
6203
|
-
|
6204
|
-
<xsl:template name="refine_figure-fmt-fn-label-style">
|
6402
|
+
<xsl:template name="refine_table-fn-body-style">
|
6205
6403
|
</xsl:template>
|
6206
6404
|
|
6207
|
-
<xsl:attribute-set name="figure-fn-body-style">
|
6208
|
-
<xsl:attribute name="text-align">justify</xsl:attribute>
|
6209
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
6210
|
-
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
6211
|
-
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
6212
|
-
</xsl:attribute-set>
|
6213
6405
|
<!-- ========================== -->
|
6214
6406
|
<!-- END Table styles -->
|
6215
6407
|
<!-- ========================== -->
|
@@ -6539,7 +6731,7 @@
|
|
6539
6731
|
|
6540
6732
|
</fo:block>
|
6541
6733
|
|
6542
|
-
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
6734
|
+
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
6543
6735
|
<xsl:if test="$continued = 'true'">
|
6544
6736
|
|
6545
6737
|
<!-- to prevent the error 'THead element may contain only TR elements' -->
|
@@ -7548,6 +7740,7 @@
|
|
7548
7740
|
</xsl:apply-templates>
|
7549
7741
|
|
7550
7742
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
7743
|
+
<xsl:call-template name="refine_table-fn-body-style"/>
|
7551
7744
|
<!-- <xsl:copy-of select="./node()"/> -->
|
7552
7745
|
<xsl:apply-templates/>
|
7553
7746
|
</fo:inline>
|
@@ -7566,6 +7759,7 @@
|
|
7566
7759
|
<xsl:param name="process">false</xsl:param>
|
7567
7760
|
<xsl:if test="$process = 'true'">
|
7568
7761
|
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
7762
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
7569
7763
|
|
7570
7764
|
<!-- tab is padding-right -->
|
7571
7765
|
<xsl:apply-templates select=".//mn:tab">
|
@@ -8437,9 +8631,18 @@
|
|
8437
8631
|
<xsl:attribute-set name="dl-block-style">
|
8438
8632
|
</xsl:attribute-set>
|
8439
8633
|
|
8634
|
+
<xsl:template name="refine_dl-block-style">
|
8635
|
+
<xsl:if test="@key = 'true' and ancestor::mn:figure">
|
8636
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
8637
|
+
</xsl:if>
|
8638
|
+
</xsl:template>
|
8639
|
+
|
8440
8640
|
<xsl:attribute-set name="dt-row-style">
|
8441
8641
|
</xsl:attribute-set>
|
8442
8642
|
|
8643
|
+
<xsl:template name="refine_dt-row-style">
|
8644
|
+
</xsl:template>
|
8645
|
+
|
8443
8646
|
<xsl:attribute-set name="dt-cell-style">
|
8444
8647
|
</xsl:attribute-set>
|
8445
8648
|
|
@@ -8459,6 +8662,9 @@
|
|
8459
8662
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
8460
8663
|
</xsl:attribute-set> <!-- dl-name-style -->
|
8461
8664
|
|
8665
|
+
<xsl:template name="refine_dl-name-style">
|
8666
|
+
</xsl:template>
|
8667
|
+
|
8462
8668
|
<xsl:attribute-set name="dd-cell-style">
|
8463
8669
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
8464
8670
|
</xsl:attribute-set>
|
@@ -8497,9 +8703,7 @@
|
|
8497
8703
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
8498
8704
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
8499
8705
|
|
8500
|
-
<xsl:
|
8501
|
-
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
8502
|
-
</xsl:if>
|
8706
|
+
<xsl:call-template name="refine_dl-block-style"/>
|
8503
8707
|
|
8504
8708
|
<xsl:call-template name="setBlockSpanAll"/>
|
8505
8709
|
<xsl:if test="not(ancestor::mn:quote)">
|
@@ -8799,6 +9003,8 @@
|
|
8799
9003
|
<xsl:if test="$process = 'true'">
|
8800
9004
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
8801
9005
|
|
9006
|
+
<xsl:call-template name="refine_dl-name-style"/>
|
9007
|
+
|
8802
9008
|
<xsl:apply-templates/>
|
8803
9009
|
</fo:block>
|
8804
9010
|
</xsl:if>
|
@@ -8987,6 +9193,8 @@
|
|
8987
9193
|
<xsl:param name="split_keep-within-line"/>
|
8988
9194
|
|
8989
9195
|
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
9196
|
+
<xsl:call-template name="refine_dt-row-style"/>
|
9197
|
+
|
8990
9198
|
<xsl:call-template name="insert_dt_cell">
|
8991
9199
|
<xsl:with-param name="key_iso" select="$key_iso"/>
|
8992
9200
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
@@ -9199,17 +9407,24 @@
|
|
9199
9407
|
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
9200
9408
|
</xsl:attribute-set>
|
9201
9409
|
|
9410
|
+
<xsl:template name="refine_appendix-style">
|
9411
|
+
</xsl:template>
|
9412
|
+
|
9202
9413
|
<xsl:attribute-set name="appendix-example-style">
|
9203
9414
|
<xsl:attribute name="margin-top">14pt</xsl:attribute>
|
9204
9415
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
9205
9416
|
</xsl:attribute-set>
|
9206
9417
|
|
9418
|
+
<xsl:template name="refine_appendix-example-style">
|
9419
|
+
</xsl:template>
|
9420
|
+
|
9207
9421
|
<!-- ======================== -->
|
9208
9422
|
<!-- Appendix processing -->
|
9209
9423
|
<!-- ======================== -->
|
9210
9424
|
<xsl:template match="mn:appendix">
|
9211
9425
|
<xsl:call-template name="setNamedDestination"/>
|
9212
9426
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
9427
|
+
<xsl:call-template name="refine_appendix-style"/>
|
9213
9428
|
<xsl:apply-templates select="mn:fmt-title"/>
|
9214
9429
|
</fo:block>
|
9215
9430
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
@@ -9228,13 +9443,23 @@
|
|
9228
9443
|
<xsl:template match="mn:appendix//mn:example" priority="2">
|
9229
9444
|
<xsl:call-template name="setNamedDestination"/>
|
9230
9445
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
9446
|
+
<xsl:call-template name="refine_appendix-example-style"/>
|
9231
9447
|
<xsl:apply-templates select="mn:fmt-name"/>
|
9232
9448
|
</fo:block>
|
9233
9449
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
9234
9450
|
</xsl:template>
|
9235
9451
|
|
9236
9452
|
<xsl:attribute-set name="xref-style">
|
9237
|
-
</xsl:attribute-set>
|
9453
|
+
</xsl:attribute-set> <!-- xref-style -->
|
9454
|
+
|
9455
|
+
<xsl:template name="refine_xref-style">
|
9456
|
+
<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])">
|
9457
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
9458
|
+
</xsl:if>
|
9459
|
+
<xsl:if test="parent::mn:add">
|
9460
|
+
<xsl:call-template name="append_add-style"/>
|
9461
|
+
</xsl:if>
|
9462
|
+
</xsl:template> <!-- refine_xref-style -->
|
9238
9463
|
|
9239
9464
|
<xsl:template match="mn:fmt-xref">
|
9240
9465
|
<xsl:call-template name="insert_basic_link">
|
@@ -9243,12 +9468,8 @@
|
|
9243
9468
|
<xsl:call-template name="getAltText"/>
|
9244
9469
|
</xsl:variable>
|
9245
9470
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
9246
|
-
<xsl:
|
9247
|
-
|
9248
|
-
</xsl:if>
|
9249
|
-
<xsl:if test="parent::mn:add">
|
9250
|
-
<xsl:call-template name="append_add-style"/>
|
9251
|
-
</xsl:if>
|
9471
|
+
<xsl:call-template name="refine_xref-style"/>
|
9472
|
+
|
9252
9473
|
<xsl:apply-templates/>
|
9253
9474
|
</fo:basic-link>
|
9254
9475
|
</xsl:with-param>
|
@@ -9358,17 +9579,17 @@
|
|
9358
9579
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
9359
9580
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
9360
9581
|
<xsl:attribute name="margin-bottom">9pt</xsl:attribute>
|
9361
|
-
</xsl:attribute-set>
|
9582
|
+
</xsl:attribute-set> <!-- note-style -->
|
9362
9583
|
|
9363
9584
|
<xsl:template name="refine_note-style">
|
9364
|
-
</xsl:template>
|
9585
|
+
</xsl:template> <!-- refine_note-style -->
|
9365
9586
|
|
9366
9587
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
9367
9588
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
9368
9589
|
|
9369
9590
|
<xsl:attribute-set name="note-name-style">
|
9370
9591
|
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
9371
|
-
</xsl:attribute-set>
|
9592
|
+
</xsl:attribute-set> <!-- note-name-style -->
|
9372
9593
|
|
9373
9594
|
<xsl:template name="refine_note-name-style">
|
9374
9595
|
</xsl:template> <!-- refine_note-name-style -->
|
@@ -9382,19 +9603,22 @@
|
|
9382
9603
|
|
9383
9604
|
<xsl:attribute-set name="note-p-style">
|
9384
9605
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
9385
|
-
</xsl:attribute-set>
|
9606
|
+
</xsl:attribute-set> <!-- note-p-style -->
|
9607
|
+
|
9608
|
+
<xsl:template name="refine_note-p-style">
|
9609
|
+
</xsl:template>
|
9386
9610
|
|
9387
9611
|
<xsl:attribute-set name="termnote-style">
|
9388
9612
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
9389
9613
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
9390
9614
|
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
9391
|
-
</xsl:attribute-set>
|
9615
|
+
</xsl:attribute-set> <!-- termnote-style -->
|
9392
9616
|
|
9393
9617
|
<xsl:template name="refine_termnote-style">
|
9394
9618
|
</xsl:template> <!-- refine_termnote-style -->
|
9395
9619
|
|
9396
9620
|
<xsl:attribute-set name="termnote-name-style">
|
9397
|
-
</xsl:attribute-set>
|
9621
|
+
</xsl:attribute-set> <!-- termnote-name-style -->
|
9398
9622
|
|
9399
9623
|
<xsl:template name="refine_termnote-name-style">
|
9400
9624
|
</xsl:template>
|
@@ -9402,6 +9626,9 @@
|
|
9402
9626
|
<xsl:attribute-set name="termnote-p-style">
|
9403
9627
|
</xsl:attribute-set>
|
9404
9628
|
|
9629
|
+
<xsl:template name="refine_termnote-p-style">
|
9630
|
+
</xsl:template>
|
9631
|
+
|
9405
9632
|
<!-- ====== -->
|
9406
9633
|
<!-- note -->
|
9407
9634
|
<!-- termnote -->
|
@@ -9462,11 +9689,13 @@
|
|
9462
9689
|
<xsl:choose>
|
9463
9690
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
9464
9691
|
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
9692
|
+
<xsl:call-template name="refine_note-p-style"/>
|
9465
9693
|
<xsl:apply-templates/>
|
9466
9694
|
</fo:inline>
|
9467
9695
|
</xsl:when>
|
9468
9696
|
<xsl:otherwise>
|
9469
9697
|
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
9698
|
+
<xsl:call-template name="refine_note-p-style"/>
|
9470
9699
|
<xsl:apply-templates/>
|
9471
9700
|
</fo:block>
|
9472
9701
|
</xsl:otherwise>
|
@@ -9558,11 +9787,13 @@
|
|
9558
9787
|
<xsl:choose>
|
9559
9788
|
<xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
|
9560
9789
|
<fo:inline xsl:use-attribute-sets="termnote-p-style">
|
9790
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
9561
9791
|
<xsl:apply-templates/>
|
9562
9792
|
</fo:inline>
|
9563
9793
|
</xsl:when>
|
9564
9794
|
<xsl:otherwise>
|
9565
9795
|
<fo:block xsl:use-attribute-sets="termnote-p-style">
|
9796
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
9566
9797
|
<xsl:apply-templates/>
|
9567
9798
|
</fo:block>
|
9568
9799
|
</xsl:otherwise>
|
@@ -9577,7 +9808,7 @@
|
|
9577
9808
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
9578
9809
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
9579
9810
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
9580
|
-
</xsl:attribute-set>
|
9811
|
+
</xsl:attribute-set> <!-- quote-style -->
|
9581
9812
|
|
9582
9813
|
<xsl:template name="refine_quote-style">
|
9583
9814
|
</xsl:template>
|
@@ -9589,6 +9820,9 @@
|
|
9589
9820
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
9590
9821
|
</xsl:attribute-set>
|
9591
9822
|
|
9823
|
+
<xsl:template name="refine_quote-source-style">
|
9824
|
+
</xsl:template>
|
9825
|
+
|
9592
9826
|
<!-- ====== -->
|
9593
9827
|
<!-- quote -->
|
9594
9828
|
<!-- source -->
|
@@ -9617,6 +9851,7 @@
|
|
9617
9851
|
</fo:block-container>
|
9618
9852
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
9619
9853
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
9854
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
9620
9855
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
9621
9856
|
<xsl:apply-templates select="mn:author"/>
|
9622
9857
|
<xsl:apply-templates select="mn:fmt-source"/>
|
@@ -9679,6 +9914,15 @@
|
|
9679
9914
|
<xsl:attribute-set name="figure-style">
|
9680
9915
|
</xsl:attribute-set>
|
9681
9916
|
|
9917
|
+
<xsl:template name="refine_figure-style">
|
9918
|
+
</xsl:template>
|
9919
|
+
|
9920
|
+
<xsl:attribute-set name="figure-number-style">
|
9921
|
+
</xsl:attribute-set>
|
9922
|
+
|
9923
|
+
<xsl:template name="refine_figure-number-style">
|
9924
|
+
</xsl:template>
|
9925
|
+
|
9682
9926
|
<xsl:attribute-set name="figure-name-style">
|
9683
9927
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
9684
9928
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -9686,7 +9930,7 @@
|
|
9686
9930
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
9687
9931
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
9688
9932
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
9689
|
-
</xsl:attribute-set>
|
9933
|
+
</xsl:attribute-set> <!-- figure-name-style -->
|
9690
9934
|
|
9691
9935
|
<xsl:template name="refine_figure-name-style">
|
9692
9936
|
</xsl:template> <!-- refine_figure-name-style -->
|
@@ -9694,7 +9938,7 @@
|
|
9694
9938
|
<xsl:attribute-set name="image-style">
|
9695
9939
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
9696
9940
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
9697
|
-
</xsl:attribute-set>
|
9941
|
+
</xsl:attribute-set> <!-- image-style -->
|
9698
9942
|
|
9699
9943
|
<xsl:template name="refine_image-style">
|
9700
9944
|
</xsl:template>
|
@@ -9705,7 +9949,10 @@
|
|
9705
9949
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
9706
9950
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
9707
9951
|
<xsl:attribute name="width">75%</xsl:attribute>
|
9708
|
-
</xsl:attribute-set>
|
9952
|
+
</xsl:attribute-set> <!-- image-graphic-style -->
|
9953
|
+
|
9954
|
+
<xsl:template name="refine_image-graphic-style">
|
9955
|
+
</xsl:template>
|
9709
9956
|
|
9710
9957
|
<xsl:attribute-set name="figure-source-style">
|
9711
9958
|
<xsl:attribute name="font-size">6pt</xsl:attribute>
|
@@ -9713,9 +9960,45 @@
|
|
9713
9960
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
9714
9961
|
</xsl:attribute-set>
|
9715
9962
|
|
9963
|
+
<xsl:template name="refine_figure-source-style">
|
9964
|
+
</xsl:template>
|
9965
|
+
|
9716
9966
|
<xsl:attribute-set name="figure-pseudocode-p-style">
|
9717
9967
|
</xsl:attribute-set>
|
9718
9968
|
|
9969
|
+
<xsl:template name="refine_figure-pseudocode-p-style">
|
9970
|
+
</xsl:template>
|
9971
|
+
|
9972
|
+
<xsl:attribute-set name="figure-fn-number-style">
|
9973
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
9974
|
+
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
9975
|
+
|
9976
|
+
<xsl:template name="refine_figure-fn-number-style">
|
9977
|
+
</xsl:template>
|
9978
|
+
|
9979
|
+
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
9980
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
9981
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
9982
|
+
<xsl:attribute name="baseline-shift">65%</xsl:attribute>
|
9983
|
+
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
9984
|
+
|
9985
|
+
<xsl:template name="refine_figure-fmt-fn-label-style">
|
9986
|
+
</xsl:template>
|
9987
|
+
|
9988
|
+
<xsl:attribute-set name="figure-fn-body-style">
|
9989
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
9990
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
9991
|
+
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
9992
|
+
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
9993
|
+
</xsl:attribute-set>
|
9994
|
+
|
9995
|
+
<xsl:template name="refine_figure-fn-body-style">
|
9996
|
+
<xsl:variable name="key_iso">true
|
9997
|
+
</xsl:variable>
|
9998
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
9999
|
+
</xsl:if>
|
10000
|
+
</xsl:template>
|
10001
|
+
|
9719
10002
|
<!-- ============================ -->
|
9720
10003
|
<!-- figure's footnotes rendering -->
|
9721
10004
|
<!-- ============================ -->
|
@@ -9829,8 +10112,8 @@
|
|
9829
10112
|
</fo:table-cell>
|
9830
10113
|
<fo:table-cell>
|
9831
10114
|
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
9832
|
-
<xsl:
|
9833
|
-
|
10115
|
+
<xsl:call-template name="refine_figure-fn-body-style"/>
|
10116
|
+
|
9834
10117
|
<!-- <xsl:copy-of select="./node()"/> -->
|
9835
10118
|
<xsl:apply-templates/>
|
9836
10119
|
</fo:block>
|
@@ -9848,6 +10131,7 @@
|
|
9848
10131
|
<xsl:param name="process">false</xsl:param>
|
9849
10132
|
<xsl:if test="$process = 'true'">
|
9850
10133
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
10134
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
9851
10135
|
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
9852
10136
|
|
9853
10137
|
<!-- tab is padding-right -->
|
@@ -9886,6 +10170,7 @@
|
|
9886
10170
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
9887
10171
|
</xsl:if>
|
9888
10172
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
|
10173
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
9889
10174
|
<!-- <xsl:value-of select="@reference"/> -->
|
9890
10175
|
<xsl:apply-templates/>
|
9891
10176
|
</fo:inline>
|
@@ -9933,6 +10218,8 @@
|
|
9933
10218
|
|
9934
10219
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
9935
10220
|
|
10221
|
+
<xsl:call-template name="refine_figure-style"/>
|
10222
|
+
|
9936
10223
|
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
9937
10224
|
<xsl:call-template name="setIDforNamedDestination"/>
|
9938
10225
|
</xsl:for-each>
|
@@ -9976,6 +10263,7 @@
|
|
9976
10263
|
|
9977
10264
|
<xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
|
9978
10265
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
10266
|
+
<xsl:call-template name="refine_figure-pseudocode-p-style"/>
|
9979
10267
|
<xsl:apply-templates/>
|
9980
10268
|
</fo:block>
|
9981
10269
|
</xsl:template>
|
@@ -9984,6 +10272,7 @@
|
|
9984
10272
|
<!-- figure/source -->
|
9985
10273
|
<xsl:template match="mn:figure/mn:fmt-source" priority="2">
|
9986
10274
|
<fo:block xsl:use-attribute-sets="figure-source-style">
|
10275
|
+
<xsl:call-template name="refine_figure-source-style"/>
|
9987
10276
|
<xsl:apply-templates/>
|
9988
10277
|
</fo:block>
|
9989
10278
|
|
@@ -10108,6 +10397,8 @@
|
|
10108
10397
|
</xsl:variable>
|
10109
10398
|
<xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
|
10110
10399
|
|
10400
|
+
<xsl:call-template name="refine_image-graphic-style"/>
|
10401
|
+
|
10111
10402
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
|
10112
10403
|
<xsl:variable name="scale">
|
10113
10404
|
<xsl:call-template name="getImageScale">
|
@@ -10807,6 +11098,9 @@
|
|
10807
11098
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10808
11099
|
</xsl:attribute-set> <!-- formula-style -->
|
10809
11100
|
|
11101
|
+
<xsl:template name="refine_formula-style">
|
11102
|
+
</xsl:template>
|
11103
|
+
|
10810
11104
|
<xsl:attribute-set name="formula-stem-block-style">
|
10811
11105
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
10812
11106
|
</xsl:attribute-set> <!-- formula-stem-block-style -->
|
@@ -10879,6 +11173,8 @@
|
|
10879
11173
|
<xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
|
10880
11174
|
<fo:block xsl:use-attribute-sets="formula-style">
|
10881
11175
|
|
11176
|
+
<xsl:call-template name="refine_formula-style"/>
|
11177
|
+
|
10882
11178
|
<fo:table table-layout="fixed" width="100%">
|
10883
11179
|
<fo:table-column column-width="95%"/>
|
10884
11180
|
<fo:table-column column-width="5%"/>
|
@@ -11302,6 +11598,9 @@
|
|
11302
11598
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
11303
11599
|
</xsl:attribute-set> <!-- list-name-style -->
|
11304
11600
|
|
11601
|
+
<xsl:template name="refine_list-name-style">
|
11602
|
+
</xsl:template>
|
11603
|
+
|
11305
11604
|
<xsl:attribute-set name="list-item-style">
|
11306
11605
|
</xsl:attribute-set>
|
11307
11606
|
|
@@ -11603,6 +11902,7 @@
|
|
11603
11902
|
<xsl:param name="process">false</xsl:param>
|
11604
11903
|
<xsl:if test="$process = 'true'">
|
11605
11904
|
<fo:block xsl:use-attribute-sets="list-name-style">
|
11905
|
+
<xsl:call-template name="refine_list-name-style"/>
|
11606
11906
|
<xsl:apply-templates/>
|
11607
11907
|
</fo:block>
|
11608
11908
|
</xsl:if>
|
@@ -11663,28 +11963,49 @@
|
|
11663
11963
|
<!-- END Lists processing -->
|
11664
11964
|
<!-- ===================================== -->
|
11665
11965
|
|
11966
|
+
<xsl:attribute-set name="footnote-separator-leader-style">
|
11967
|
+
</xsl:attribute-set>
|
11968
|
+
|
11969
|
+
<xsl:template name="refine_footnote-separator-leader-style">
|
11970
|
+
</xsl:template>
|
11971
|
+
|
11972
|
+
<xsl:attribute-set name="fn-container-body-style">
|
11973
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
11974
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
11975
|
+
</xsl:attribute-set>
|
11976
|
+
|
11977
|
+
<xsl:template name="refine_fn-container-body-style">
|
11978
|
+
</xsl:template>
|
11979
|
+
|
11666
11980
|
<xsl:attribute-set name="fn-reference-style">
|
11667
11981
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
11668
11982
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
11669
|
-
|
11670
|
-
</xsl:attribute-set>
|
11983
|
+
</xsl:attribute-set> <!-- fn-reference-style -->
|
11671
11984
|
|
11672
11985
|
<xsl:template name="refine_fn-reference-style">
|
11673
11986
|
<xsl:if test="ancestor::*[local-name()='table']">
|
11674
11987
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
11675
11988
|
<xsl:attribute name="baseline-shift">15%</xsl:attribute>
|
11676
11989
|
</xsl:if>
|
11990
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
11991
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
11677
11992
|
</xsl:template> <!-- refine_fn-reference-style -->
|
11678
11993
|
|
11679
11994
|
<xsl:attribute-set name="fn-style">
|
11680
11995
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
11681
11996
|
</xsl:attribute-set>
|
11682
11997
|
|
11998
|
+
<xsl:template name="refine_fn-style">
|
11999
|
+
</xsl:template>
|
12000
|
+
|
11683
12001
|
<xsl:attribute-set name="fn-num-style">
|
11684
12002
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
11685
12003
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
11686
12004
|
<xsl:attribute name="baseline-shift">15%</xsl:attribute>
|
11687
|
-
</xsl:attribute-set>
|
12005
|
+
</xsl:attribute-set> <!-- fn-num-style -->
|
12006
|
+
|
12007
|
+
<xsl:template name="refine_fn-num-style">
|
12008
|
+
</xsl:template>
|
11688
12009
|
|
11689
12010
|
<xsl:attribute-set name="fn-body-style">
|
11690
12011
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
@@ -11693,7 +12014,7 @@
|
|
11693
12014
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
11694
12015
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
11695
12016
|
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
11696
|
-
</xsl:attribute-set>
|
12017
|
+
</xsl:attribute-set> <!-- fn-body-style" -->
|
11697
12018
|
|
11698
12019
|
<xsl:template name="refine_fn-body-style">
|
11699
12020
|
</xsl:template> <!-- refine_fn-body-style -->
|
@@ -11757,10 +12078,12 @@
|
|
11757
12078
|
<xsl:choose>
|
11758
12079
|
<xsl:when test="ancestor::mn:bibitem">
|
11759
12080
|
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
12081
|
+
<xsl:call-template name="refine_bibitem-note-fn-style"/>
|
11760
12082
|
</fn_styles>
|
11761
12083
|
</xsl:when>
|
11762
12084
|
<xsl:otherwise>
|
11763
12085
|
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
12086
|
+
<xsl:call-template name="refine_fn-num-style"/>
|
11764
12087
|
</fn_styles>
|
11765
12088
|
</xsl:otherwise>
|
11766
12089
|
</xsl:choose>
|
@@ -11770,9 +12093,12 @@
|
|
11770
12093
|
<xsl:copy-of select="."/>
|
11771
12094
|
</xsl:for-each>
|
11772
12095
|
|
11773
|
-
|
12096
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
12097
|
+
<!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
|
11774
12098
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
11775
|
-
</xsl:if>
|
12099
|
+
</xsl:if> -->
|
12100
|
+
|
12101
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
11776
12102
|
|
11777
12103
|
<xsl:call-template name="insert_basic_link">
|
11778
12104
|
<xsl:with-param name="element">
|
@@ -11795,10 +12121,12 @@
|
|
11795
12121
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
11796
12122
|
|
11797
12123
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
12124
|
+
<xsl:call-template name="refine_fn-style"/>
|
11798
12125
|
<xsl:copy-of select="$footnote_inline"/>
|
11799
12126
|
<fo:footnote-body role="Note">
|
11800
12127
|
|
11801
12128
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
12129
|
+
<xsl:call-template name="refine_fn-container-body-style"/>
|
11802
12130
|
|
11803
12131
|
<xsl:variable name="fn_block">
|
11804
12132
|
<xsl:call-template name="refine_fn-body-style"/>
|
@@ -11900,6 +12228,9 @@
|
|
11900
12228
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
11901
12229
|
</xsl:attribute-set> <!-- admonition-style -->
|
11902
12230
|
|
12231
|
+
<xsl:template name="refine_admonition-style">
|
12232
|
+
</xsl:template>
|
12233
|
+
|
11903
12234
|
<xsl:attribute-set name="admonition-container-style">
|
11904
12235
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
11905
12236
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -11908,12 +12239,22 @@
|
|
11908
12239
|
<xsl:attribute name="padding-top">2mm</xsl:attribute>
|
11909
12240
|
</xsl:attribute-set> <!-- admonition-container-style -->
|
11910
12241
|
|
12242
|
+
<xsl:template name="refine_admonition-container-style">
|
12243
|
+
</xsl:template>
|
12244
|
+
|
11911
12245
|
<xsl:attribute-set name="admonition-name-style">
|
11912
12246
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
11913
12247
|
</xsl:attribute-set> <!-- admonition-name-style -->
|
11914
12248
|
|
12249
|
+
<xsl:template name="refine_admonition-name-style">
|
12250
|
+
</xsl:template>
|
12251
|
+
|
11915
12252
|
<xsl:attribute-set name="admonition-p-style">
|
11916
12253
|
</xsl:attribute-set> <!-- admonition-p-style -->
|
12254
|
+
|
12255
|
+
<xsl:template name="refine_admonition-p-style">
|
12256
|
+
</xsl:template>
|
12257
|
+
|
11917
12258
|
<!-- end admonition -->
|
11918
12259
|
|
11919
12260
|
<!-- ================ -->
|
@@ -11923,8 +12264,12 @@
|
|
11923
12264
|
<xsl:call-template name="setNamedDestination"/>
|
11924
12265
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
11925
12266
|
|
12267
|
+
<xsl:call-template name="refine_admonition-style"/>
|
12268
|
+
|
11926
12269
|
<xsl:call-template name="setBlockSpanAll"/>
|
11927
12270
|
<fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
|
12271
|
+
|
12272
|
+
<xsl:call-template name="refine_admonition-container-style"/>
|
11928
12273
|
<fo:block text-align="justify">
|
11929
12274
|
<fo:inline>
|
11930
12275
|
<xsl:call-template name="displayAdmonitionName"/>
|
@@ -11991,12 +12336,22 @@
|
|
11991
12336
|
<!-- END Admonition -->
|
11992
12337
|
<!-- ================ -->
|
11993
12338
|
|
12339
|
+
<xsl:attribute-set name="references-non-normative-title-style">
|
12340
|
+
</xsl:attribute-set>
|
12341
|
+
|
12342
|
+
<xsl:template name="refine_references-non-normative-title-style">
|
12343
|
+
|
12344
|
+
</xsl:template>
|
12345
|
+
|
11994
12346
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
11995
12347
|
<xsl:attribute-set name="bibitem-normative-style">
|
11996
12348
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
11997
12349
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
11998
12350
|
</xsl:attribute-set> <!-- bibitem-normative-style -->
|
11999
12351
|
|
12352
|
+
<xsl:template name="refine_bibitem-normative-style">
|
12353
|
+
</xsl:template>
|
12354
|
+
|
12000
12355
|
<!-- bibitem in Normative References (references/@normative="true"), renders as list -->
|
12001
12356
|
<xsl:attribute-set name="bibitem-normative-list-style">
|
12002
12357
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
@@ -12005,9 +12360,15 @@
|
|
12005
12360
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
12006
12361
|
</xsl:attribute-set> <!-- bibitem-normative-list-style -->
|
12007
12362
|
|
12363
|
+
<xsl:template name="refine_bibitem-normative-list-style">
|
12364
|
+
</xsl:template>
|
12365
|
+
|
12008
12366
|
<xsl:attribute-set name="bibitem-non-normative-style">
|
12009
12367
|
</xsl:attribute-set> <!-- bibitem-non-normative-style -->
|
12010
12368
|
|
12369
|
+
<xsl:template name="refine_bibitem-non-normative-style">
|
12370
|
+
</xsl:template>
|
12371
|
+
|
12011
12372
|
<!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
|
12012
12373
|
<xsl:attribute-set name="bibitem-non-normative-list-style">
|
12013
12374
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
@@ -12016,19 +12377,31 @@
|
|
12016
12377
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
12017
12378
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
|
12018
12379
|
|
12380
|
+
<xsl:template name="refine_bibitem-non-normative-list-style">
|
12381
|
+
</xsl:template>
|
12382
|
+
|
12019
12383
|
<xsl:attribute-set name="bibitem-non-normative-list-item-style">
|
12020
12384
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
12021
12385
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
12022
12386
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
12023
12387
|
</xsl:attribute-set>
|
12024
12388
|
|
12389
|
+
<xsl:template name="refine_bibitem-non-normative-list-item-style">
|
12390
|
+
</xsl:template>
|
12391
|
+
|
12025
12392
|
<!-- bibitem in bibliography section (references/@normative="false"), list body -->
|
12026
12393
|
<xsl:attribute-set name="bibitem-normative-list-body-style">
|
12027
12394
|
</xsl:attribute-set>
|
12028
12395
|
|
12396
|
+
<xsl:template name="refine_bibitem-normative-list-body-style">
|
12397
|
+
</xsl:template>
|
12398
|
+
|
12029
12399
|
<xsl:attribute-set name="bibitem-non-normative-list-body-style">
|
12030
12400
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
|
12031
12401
|
|
12402
|
+
<xsl:template name="refine_bibitem-non-normative-list-body-style">
|
12403
|
+
</xsl:template>
|
12404
|
+
|
12032
12405
|
<!-- footnote reference number for bibitem, in the text -->
|
12033
12406
|
<xsl:attribute-set name="bibitem-note-fn-style">
|
12034
12407
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
@@ -12037,6 +12410,9 @@
|
|
12037
12410
|
<xsl:attribute name="baseline-shift">15%</xsl:attribute>
|
12038
12411
|
</xsl:attribute-set> <!-- bibitem-note-fn-style -->
|
12039
12412
|
|
12413
|
+
<xsl:template name="refine_bibitem-note-fn-style">
|
12414
|
+
</xsl:template>
|
12415
|
+
|
12040
12416
|
<!-- footnote number on the page bottom -->
|
12041
12417
|
<xsl:attribute-set name="bibitem-note-fn-number-style">
|
12042
12418
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
@@ -12056,6 +12432,9 @@
|
|
12056
12432
|
<xsl:attribute-set name="references-non-normative-style">
|
12057
12433
|
</xsl:attribute-set> <!-- references-non-normative-style -->
|
12058
12434
|
|
12435
|
+
<xsl:template name="refine_references-non-normative-style">
|
12436
|
+
</xsl:template>
|
12437
|
+
|
12059
12438
|
<!-- ======================= -->
|
12060
12439
|
<!-- Bibliography rendering -->
|
12061
12440
|
<!-- ======================= -->
|
@@ -12097,6 +12476,7 @@
|
|
12097
12476
|
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
12098
12477
|
|
12099
12478
|
<fo:block xsl:use-attribute-sets="references-non-normative-style">
|
12479
|
+
<xsl:call-template name="refine_references-non-normative-style"/>
|
12100
12480
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
12101
12481
|
</fo:block>
|
12102
12482
|
<!-- horizontal line -->
|
@@ -12114,21 +12494,25 @@
|
|
12114
12494
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
12115
12495
|
<xsl:call-template name="setNamedDestination"/>
|
12116
12496
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
12497
|
+
<xsl:call-template name="refine_bibitem-normative-style"/>
|
12498
|
+
|
12117
12499
|
<xsl:call-template name="processBibitem"/>
|
12118
12500
|
</fo:block>
|
12119
12501
|
|
12120
12502
|
</xsl:template> <!-- bibitem -->
|
12121
12503
|
|
12122
12504
|
<!-- Bibliography (non-normative references) -->
|
12123
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem
|
12505
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
12124
12506
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
12125
12507
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
12126
12508
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
12127
12509
|
<xsl:call-template name="setNamedDestination"/>
|
12128
12510
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
12511
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-style"/>
|
12512
|
+
|
12129
12513
|
<fo:list-item>
|
12130
12514
|
<fo:list-item-label end-indent="label-end()">
|
12131
|
-
<fo:block role="SKIP">
|
12515
|
+
<fo:block role="SKIP" id="__internal_layout__bibitem_{@id}_{generate-id()}">
|
12132
12516
|
<fo:inline role="SKIP">
|
12133
12517
|
<xsl:apply-templates select="mn:biblio-tag">
|
12134
12518
|
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
@@ -12138,6 +12522,7 @@
|
|
12138
12522
|
</fo:list-item-label>
|
12139
12523
|
<fo:list-item-body start-indent="body-start()">
|
12140
12524
|
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
|
12525
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
|
12141
12526
|
<xsl:call-template name="processBibitem">
|
12142
12527
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
12143
12528
|
</xsl:call-template>
|
@@ -12148,12 +12533,17 @@
|
|
12148
12533
|
|
12149
12534
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
12150
12535
|
|
12536
|
+
<!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
|
12537
|
+
<xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
|
12538
|
+
|
12151
12539
|
<xsl:template name="insertListItem_Bibitem">
|
12152
12540
|
<xsl:choose>
|
12153
12541
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
12154
12542
|
<xsl:otherwise>
|
12155
12543
|
<xsl:call-template name="setNamedDestination"/>
|
12156
12544
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
12545
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
|
12546
|
+
|
12157
12547
|
<fo:list-item-label end-indent="label-end()">
|
12158
12548
|
<fo:block role="SKIP">
|
12159
12549
|
<fo:inline role="SKIP">
|
@@ -12164,16 +12554,18 @@
|
|
12164
12554
|
</fo:block>
|
12165
12555
|
</fo:list-item-label>
|
12166
12556
|
<fo:list-item-body start-indent="body-start()">
|
12167
|
-
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP"
|
12557
|
+
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
|
12558
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
|
12168
12559
|
<xsl:call-template name="processBibitem">
|
12169
12560
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
12170
12561
|
</xsl:call-template>
|
12171
12562
|
</fo:block>
|
12563
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
12172
12564
|
</fo:list-item-body>
|
12173
12565
|
</fo:list-item>
|
12174
12566
|
</xsl:otherwise>
|
12175
12567
|
</xsl:choose>
|
12176
|
-
<xsl:apply-templates select="following-sibling::*[
|
12568
|
+
<xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
|
12177
12569
|
<xsl:with-param name="skip">false</xsl:with-param>
|
12178
12570
|
</xsl:apply-templates>
|
12179
12571
|
</xsl:template>
|
@@ -12189,25 +12581,16 @@
|
|
12189
12581
|
<xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
|
12190
12582
|
</xsl:apply-templates>
|
12191
12583
|
<xsl:apply-templates select="mn:formattedref"/>
|
12584
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
12192
12585
|
<!-- end bibitem processing -->
|
12193
|
-
|
12194
|
-
<xsl:call-template name="processBibliographyNote"/>
|
12195
12586
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
12196
12587
|
|
12197
|
-
<xsl:template name="
|
12198
|
-
|
12199
|
-
|
12200
|
-
|
12201
|
-
<xsl:copy> <!-- skip @id -->
|
12202
|
-
<xsl:copy-of select="node()"/>
|
12203
|
-
</xsl:copy>
|
12204
|
-
</xsl:element>
|
12205
|
-
</xsl:variable>
|
12206
|
-
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
12207
|
-
<xsl:call-template name="note"/>
|
12208
|
-
</xsl:for-each> -->
|
12588
|
+
<xsl:template name="processBibitemFollowingNotes">
|
12589
|
+
<!-- current context is bibitem element -->
|
12590
|
+
<xsl:variable name="bibitem_id" select="@id"/>
|
12591
|
+
<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]]">
|
12209
12592
|
<xsl:call-template name="note"/>
|
12210
|
-
</xsl:
|
12593
|
+
</xsl:for-each>
|
12211
12594
|
</xsl:template>
|
12212
12595
|
|
12213
12596
|
<xsl:template match="mn:title" mode="title">
|
@@ -12410,14 +12793,20 @@
|
|
12410
12793
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
12411
12794
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
12412
12795
|
<xsl:attribute name="margin-bottom">84pt</xsl:attribute>
|
12413
|
-
</xsl:attribute-set>
|
12796
|
+
</xsl:attribute-set> <!-- indexsect-title-style -->
|
12797
|
+
|
12798
|
+
<xsl:template name="refine_indexsect-title-style">
|
12799
|
+
</xsl:template>
|
12414
12800
|
|
12415
12801
|
<xsl:attribute-set name="indexsect-clause-title-style">
|
12416
12802
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
12417
12803
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
12418
12804
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
12419
12805
|
<xsl:attribute name="margin-bottom">3pt</xsl:attribute>
|
12420
|
-
</xsl:attribute-set>
|
12806
|
+
</xsl:attribute-set> <!-- indexsect-clause-title-style -->
|
12807
|
+
|
12808
|
+
<xsl:template name="refine_indexsect-clause-title-style">
|
12809
|
+
</xsl:template>
|
12421
12810
|
<!-- End Index section styles -->
|
12422
12811
|
|
12423
12812
|
<!-- =================== -->
|
@@ -12611,6 +13000,7 @@
|
|
12611
13000
|
|
12612
13001
|
<xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
|
12613
13002
|
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
13003
|
+
<xsl:call-template name="refine_indexsect-title-style"/>
|
12614
13004
|
<!-- Index -->
|
12615
13005
|
<xsl:apply-templates/>
|
12616
13006
|
</fo:block>
|
@@ -12619,6 +13009,7 @@
|
|
12619
13009
|
<xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
|
12620
13010
|
<!-- Letter A, B, C, ... -->
|
12621
13011
|
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
13012
|
+
<xsl:call-template name="refine_indexsect-clause-title-style"/>
|
12622
13013
|
<xsl:apply-templates/>
|
12623
13014
|
</fo:block>
|
12624
13015
|
</xsl:template>
|
@@ -12850,9 +13241,15 @@
|
|
12850
13241
|
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
12851
13242
|
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
12852
13243
|
|
13244
|
+
<xsl:template name="refine_toc-leader-style">
|
13245
|
+
</xsl:template>
|
13246
|
+
|
12853
13247
|
<xsl:attribute-set name="toc-pagenumber-style">
|
12854
13248
|
</xsl:attribute-set>
|
12855
13249
|
|
13250
|
+
<xsl:template name="refine_toc-pagenumber-style">
|
13251
|
+
</xsl:template>
|
13252
|
+
|
12856
13253
|
<!-- List of Figures, Tables -->
|
12857
13254
|
<xsl:attribute-set name="toc-listof-title-style">
|
12858
13255
|
</xsl:attribute-set>
|
@@ -12863,6 +13260,9 @@
|
|
12863
13260
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
12864
13261
|
</xsl:attribute-set>
|
12865
13262
|
|
13263
|
+
<xsl:template name="refine_toc-listof-item-block-style">
|
13264
|
+
</xsl:template>
|
13265
|
+
|
12866
13266
|
<xsl:attribute-set name="toc-listof-item-style">
|
12867
13267
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
12868
13268
|
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
@@ -12871,6 +13271,9 @@
|
|
12871
13271
|
<xsl:attribute name="text-indent">-8mm</xsl:attribute>
|
12872
13272
|
</xsl:attribute-set>
|
12873
13273
|
|
13274
|
+
<xsl:template name="refine_toc-listof-item-style">
|
13275
|
+
</xsl:template>
|
13276
|
+
|
12874
13277
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
12875
13278
|
<xsl:variable name="nodes_preface_">
|
12876
13279
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -13993,23 +14396,55 @@
|
|
13993
14396
|
<!-- Ruby text (CJK languages) rendering -->
|
13994
14397
|
<!-- ===================================== -->
|
13995
14398
|
<!-- ===================================== -->
|
14399
|
+
|
14400
|
+
<xsl:attribute-set name="ruby-style">
|
14401
|
+
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
14402
|
+
<xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
|
14403
|
+
</xsl:attribute-set>
|
14404
|
+
|
14405
|
+
<xsl:template name="refine_ruby-style">
|
14406
|
+
<xsl:if test="not(ancestor::mn:ruby)">
|
14407
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
14408
|
+
</xsl:if>
|
14409
|
+
<xsl:variable name="rt_text" select="mn:rt"/>
|
14410
|
+
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
14411
|
+
<!-- Example: width="2em" -->
|
14412
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
14413
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
14414
|
+
<xsl:variable name="text_width">
|
14415
|
+
<xsl:choose>
|
14416
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
14417
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
14418
|
+
</xsl:choose>
|
14419
|
+
</xsl:variable>
|
14420
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
14421
|
+
</xsl:template> <!-- refine_ruby-style -->
|
14422
|
+
|
14423
|
+
<xsl:attribute-set name="rb-style">
|
14424
|
+
<xsl:attribute name="line-height">1em</xsl:attribute>
|
14425
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
14426
|
+
</xsl:attribute-set>
|
14427
|
+
|
14428
|
+
<xsl:template name="refine_rb-style">
|
14429
|
+
</xsl:template>
|
14430
|
+
|
14431
|
+
<xsl:attribute-set name="rt-style">
|
14432
|
+
<xsl:attribute name="font-size">0.5em</xsl:attribute>
|
14433
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
14434
|
+
<xsl:attribute name="line-height">1.2em</xsl:attribute>
|
14435
|
+
<xsl:attribute name="space-before">-1.4em</xsl:attribute>
|
14436
|
+
<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
|
14437
|
+
</xsl:attribute-set>
|
14438
|
+
|
14439
|
+
<xsl:template name="refine_rt-style">
|
14440
|
+
<xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
|
14441
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
14442
|
+
</xsl:if>
|
14443
|
+
</xsl:template>
|
14444
|
+
|
13996
14445
|
<xsl:template match="mn:ruby">
|
13997
|
-
<fo:inline-container
|
13998
|
-
<xsl:
|
13999
|
-
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
14000
|
-
</xsl:if>
|
14001
|
-
<xsl:variable name="rt_text" select="mn:rt"/>
|
14002
|
-
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
14003
|
-
<!-- Example: width="2em" -->
|
14004
|
-
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
14005
|
-
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
14006
|
-
<xsl:variable name="text_width">
|
14007
|
-
<xsl:choose>
|
14008
|
-
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
14009
|
-
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
14010
|
-
</xsl:choose>
|
14011
|
-
</xsl:variable>
|
14012
|
-
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
14446
|
+
<fo:inline-container xsl:use-attribute-sets="ruby-style">
|
14447
|
+
<xsl:call-template name="refine_ruby-style"/>
|
14013
14448
|
|
14014
14449
|
<xsl:choose>
|
14015
14450
|
<xsl:when test="ancestor::mn:ruby">
|
@@ -14027,17 +14462,14 @@
|
|
14027
14462
|
</xsl:template>
|
14028
14463
|
|
14029
14464
|
<xsl:template match="mn:rb">
|
14030
|
-
<fo:block
|
14465
|
+
<fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
|
14031
14466
|
</xsl:template>
|
14032
14467
|
|
14033
14468
|
<xsl:template match="mn:rt">
|
14034
|
-
<fo:block
|
14035
|
-
<xsl:
|
14036
|
-
<xsl:attribute name="space-before">0em</xsl:attribute>
|
14037
|
-
</xsl:if>
|
14469
|
+
<fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
|
14470
|
+
<xsl:call-template name="refine_rt-style"/>
|
14038
14471
|
<xsl:apply-templates/>
|
14039
14472
|
</fo:block>
|
14040
|
-
|
14041
14473
|
</xsl:template>
|
14042
14474
|
|
14043
14475
|
<!-- ===================================== -->
|
@@ -14046,6 +14478,18 @@
|
|
14046
14478
|
<!-- ===================================== -->
|
14047
14479
|
<!-- ===================================== -->
|
14048
14480
|
|
14481
|
+
<xsl:attribute-set name="annex-title-style">
|
14482
|
+
</xsl:attribute-set>
|
14483
|
+
|
14484
|
+
<xsl:template name="refine_annex-title-style">
|
14485
|
+
</xsl:template>
|
14486
|
+
|
14487
|
+
<xsl:attribute-set name="p-zzSTDTitle1-style">
|
14488
|
+
</xsl:attribute-set>
|
14489
|
+
|
14490
|
+
<xsl:template name="refine_p-zzSTDTitle1-style">
|
14491
|
+
</xsl:template>
|
14492
|
+
|
14049
14493
|
<xsl:template name="processPrefaceSectionsDefault">
|
14050
14494
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
14051
14495
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -14384,10 +14828,17 @@
|
|
14384
14828
|
</xsl:choose>
|
14385
14829
|
</xsl:template>
|
14386
14830
|
|
14831
|
+
<xsl:attribute-set name="clause-style">
|
14832
|
+
|
14833
|
+
</xsl:attribute-set>
|
14834
|
+
|
14835
|
+
<xsl:template name="refine_clause-style">
|
14836
|
+
</xsl:template>
|
14837
|
+
|
14387
14838
|
<!-- main sections -->
|
14388
14839
|
<xsl:template match="/*/mn:sections/*" name="sections_node" priority="2">
|
14389
14840
|
<xsl:call-template name="setNamedDestination"/>
|
14390
|
-
<fo:block>
|
14841
|
+
<fo:block role="Sect">
|
14391
14842
|
<xsl:call-template name="setId"/>
|
14392
14843
|
|
14393
14844
|
<xsl:call-template name="sections_element_style"/>
|
@@ -14511,6 +14962,10 @@
|
|
14511
14962
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
14512
14963
|
</xsl:template>
|
14513
14964
|
|
14965
|
+
<!-- for case when update_xml_step1 (common.updatexml.xsl) doesn't apply when $table_if = 'true' -->
|
14966
|
+
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]"/>
|
14967
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
14968
|
+
|
14514
14969
|
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
14515
14970
|
<xsl:template name="insert_basic_link">
|
14516
14971
|
<xsl:param name="element"/>
|