metanorma-ribose 2.6.1 → 2.6.2
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/ribose/ribose.standard.xsl +473 -219
- data/lib/metanorma/ribose/isodoc.rng +9 -0
- data/lib/metanorma/ribose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9eba5507bddbe623c1d30c2e6c1c96503e301688d1f476a62926decf0b4db491
|
4
|
+
data.tar.gz: 68e5740ad73782999a15139c991cae66336e5082ea3446f42540b97af485df47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a4e25efe80cb7ddfd5b10a942fefc155a3e22f7fe13e971c28dc2a7d7dbad57f26e3b5c6a490775f47b1f26892e6e5f2388d5fcbe256e89ea35dffe304a6b39
|
7
|
+
data.tar.gz: a4e1b3a2e2420d94fe597920f7031e0492590d446e6088f9b48c672aad180851a241f4f71c497a69086dfa791399f42296a38e071e813b9419d7adf93eb7bca9
|
@@ -476,11 +476,8 @@
|
|
476
476
|
<xsl:call-template name="getPageSequenceOrientation"/>
|
477
477
|
</xsl:attribute>
|
478
478
|
|
479
|
-
<
|
480
|
-
|
481
|
-
<fo:leader leader-pattern="rule" leader-length="30%"/>
|
482
|
-
</fo:block>
|
483
|
-
</fo:static-content>
|
479
|
+
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
480
|
+
|
484
481
|
<xsl:call-template name="insertHeaderFooter">
|
485
482
|
<xsl:with-param name="section">main</xsl:with-param>
|
486
483
|
</xsl:call-template>
|
@@ -951,12 +948,6 @@
|
|
951
948
|
</xsl:if>
|
952
949
|
</xsl:template>
|
953
950
|
|
954
|
-
<xsl:template match="ribose:fn/ribose:p">
|
955
|
-
<fo:block>
|
956
|
-
<xsl:apply-templates/>
|
957
|
-
</fo:block>
|
958
|
-
</xsl:template>
|
959
|
-
|
960
951
|
<xsl:template match="ribose:ul | ribose:ol" mode="list" priority="2">
|
961
952
|
<fo:block-container>
|
962
953
|
<fo:block-container margin-left="0mm">
|
@@ -2177,12 +2168,16 @@
|
|
2177
2168
|
</xsl:template>
|
2178
2169
|
|
2179
2170
|
<xsl:attribute-set name="table-fn-number-style">
|
2180
|
-
<xsl:attribute name="
|
2181
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
2171
|
+
<!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
|
2182
2172
|
|
2183
2173
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
2184
2174
|
|
2185
|
-
<xsl:
|
2175
|
+
<xsl:attribute-set name="table-fmt-fn-label-style">
|
2176
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
2177
|
+
|
2178
|
+
</xsl:attribute-set> <!-- table-fmt-fn-label-style -->
|
2179
|
+
|
2180
|
+
<xsl:template name="refine_table-fmt-fn-label-style">
|
2186
2181
|
|
2187
2182
|
</xsl:template>
|
2188
2183
|
|
@@ -2197,11 +2192,18 @@
|
|
2197
2192
|
</xsl:attribute-set>
|
2198
2193
|
|
2199
2194
|
<xsl:attribute-set name="figure-fn-number-style">
|
2200
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
2201
2195
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
2196
|
+
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
2197
|
+
|
2198
|
+
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
2199
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
2202
2200
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2203
2201
|
|
2204
|
-
</xsl:attribute-set>
|
2202
|
+
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
2203
|
+
|
2204
|
+
<xsl:template name="refine_figure-fmt-fn-label-style">
|
2205
|
+
|
2206
|
+
</xsl:template>
|
2205
2207
|
|
2206
2208
|
<xsl:attribute-set name="figure-fn-body-style">
|
2207
2209
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
@@ -3773,9 +3775,13 @@
|
|
3773
3775
|
|
3774
3776
|
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'][not(@type = 'units')] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3775
3777
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3776
|
-
|
3777
|
-
|
3778
|
-
|
3778
|
+
<!-- <xsl:choose>
|
3779
|
+
<xsl:when test="$namespace = 'plateau'"></xsl:when>
|
3780
|
+
<xsl:otherwise>
|
3781
|
+
|
3782
|
+
</xsl:otherwise>
|
3783
|
+
</xsl:choose> -->
|
3784
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
|
3779
3785
|
</xsl:if>
|
3780
3786
|
|
3781
3787
|
<xsl:choose>
|
@@ -3822,7 +3828,7 @@
|
|
3822
3828
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
3823
3829
|
</xsl:when>
|
3824
3830
|
<xsl:otherwise>
|
3825
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
3831
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot') and not(local-name() = 'fmt-footnote-container')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
3826
3832
|
</xsl:otherwise>
|
3827
3833
|
</xsl:choose>
|
3828
3834
|
|
@@ -3833,13 +3839,26 @@
|
|
3833
3839
|
|
3834
3840
|
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
3835
3841
|
|
3836
|
-
|
3837
|
-
|
3838
|
-
|
3839
|
-
|
3840
|
-
|
3841
|
-
|
3842
|
-
|
3842
|
+
<!-- https://github.com/metanorma/metanorma-plateau/issues/171 -->
|
3843
|
+
|
3844
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
3845
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
3846
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
3847
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
3848
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
3849
|
+
</xsl:call-template>
|
3850
|
+
</xsl:for-each>
|
3851
|
+
|
3852
|
+
<!-- https://github.com/metanorma/metanorma-plateau/issues/171
|
3853
|
+
<xsl:if test="$namespace = 'plateau'">
|
3854
|
+
<xsl:apply-templates select="*[not(local-name()='thead') and not(local-name()='tbody') and not(local-name()='tfoot') and not(local-name()='name')]" />
|
3855
|
+
<xsl:for-each select="*[local-name()='tbody']"> - select context to tbody -
|
3856
|
+
<xsl:variable name="table_fn_block">
|
3857
|
+
<xsl:call-template name="table_fn_display" />
|
3858
|
+
</xsl:variable>
|
3859
|
+
<xsl:copy-of select="$table_fn_block"/>
|
3860
|
+
</xsl:for-each>
|
3861
|
+
</xsl:if> -->
|
3843
3862
|
|
3844
3863
|
<xsl:if test="*[local-name()='bookmark']"> <!-- special case: table/bookmark -->
|
3845
3864
|
<fo:block keep-with-previous="always" line-height="0.1">
|
@@ -4714,6 +4733,17 @@
|
|
4714
4733
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
4715
4734
|
</xsl:if>
|
4716
4735
|
|
4736
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
4737
|
+
<xsl:if test="@colspan and *[local-name() = 'note'][@type = 'units']">
|
4738
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
4739
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
4740
|
+
<xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
|
4741
|
+
<xsl:attribute name="border-top">1pt solid white</xsl:attribute>
|
4742
|
+
<xsl:attribute name="border-left">1pt solid white</xsl:attribute>
|
4743
|
+
<xsl:attribute name="border-right">1pt solid white</xsl:attribute>
|
4744
|
+
</xsl:if>
|
4745
|
+
</xsl:if>
|
4746
|
+
|
4717
4747
|
<fo:block role="SKIP">
|
4718
4748
|
|
4719
4749
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
@@ -4732,7 +4762,8 @@
|
|
4732
4762
|
</fo:table-cell>
|
4733
4763
|
</xsl:template> <!-- td -->
|
4734
4764
|
|
4735
|
-
|
4765
|
+
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
4766
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name() = 'example']" priority="2">
|
4736
4767
|
|
4737
4768
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
4738
4769
|
<xsl:copy-of select="@id"/>
|
@@ -4753,65 +4784,54 @@
|
|
4753
4784
|
|
4754
4785
|
</xsl:template> <!-- table/note -->
|
4755
4786
|
|
4756
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
4787
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
4757
4788
|
<xsl:apply-templates/>
|
4758
4789
|
</xsl:template>
|
4759
4790
|
|
4760
4791
|
<!-- ===================== -->
|
4761
4792
|
<!-- Footnotes processing -->
|
4762
4793
|
<!-- ===================== -->
|
4794
|
+
|
4795
|
+
<!-- document text (not figures, or tables) footnotes -->
|
4796
|
+
<xsl:variable name="footnotes_">
|
4797
|
+
<xsl:for-each select="//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']"> <!-- commented *[local-name() = 'metanorma']/, because there are fn in figure or table name -->
|
4798
|
+
<!-- <xsl:copy-of select="."/> -->
|
4799
|
+
<xsl:variable name="update_xml_step1">
|
4800
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
4801
|
+
</xsl:variable>
|
4802
|
+
<xsl:apply-templates select="xalan:nodeset($update_xml_step1)" mode="update_xml_enclose_keep-together_within-line"/>
|
4803
|
+
</xsl:for-each>
|
4804
|
+
</xsl:variable>
|
4805
|
+
<xsl:variable name="footnotes" select="xalan:nodeset($footnotes_)"/>
|
4806
|
+
|
4763
4807
|
<!--
|
4764
4808
|
<fn reference="1">
|
4765
4809
|
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
4766
4810
|
</fn>
|
4767
4811
|
-->
|
4768
|
-
<!-- footnotes in text (title, bibliography, main body, table's, figure's names
|
4812
|
+
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
4813
|
+
<!-- fn in text -->
|
4769
4814
|
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" priority="2" name="fn">
|
4770
4815
|
|
4771
|
-
<!-- list of
|
4816
|
+
<!-- list of unique footnotes -->
|
4772
4817
|
<xsl:variable name="p_fn_">
|
4773
4818
|
<xsl:call-template name="get_fn_list"/>
|
4774
|
-
<!-- <xsl:choose>
|
4775
|
-
<xsl:when test="$namespace = 'jis'">
|
4776
|
-
<xsl:call-template name="get_fn_list_for_element"/>
|
4777
|
-
</xsl:when>
|
4778
|
-
<xsl:otherwise>
|
4779
|
-
<xsl:call-template name="get_fn_list"/>
|
4780
|
-
</xsl:otherwise>
|
4781
|
-
</xsl:choose> -->
|
4782
4819
|
</xsl:variable>
|
4783
4820
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
4784
4821
|
|
4785
4822
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
4786
|
-
|
4787
|
-
<xsl:variable name="reference_">
|
4788
|
-
<xsl:value-of select="@reference"/>
|
4789
|
-
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
4790
|
-
</xsl:variable>
|
4791
|
-
<xsl:variable name="reference" select="normalize-space($reference_)"/>
|
4823
|
+
|
4792
4824
|
<!-- fn sequence number in document -->
|
4793
|
-
<xsl:variable name="current_fn_number"
|
4794
|
-
|
4795
|
-
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
4796
|
-
<xsl:otherwise>
|
4797
|
-
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
4798
|
-
</xsl:otherwise>
|
4799
|
-
</xsl:choose>
|
4800
|
-
</xsl:variable>
|
4825
|
+
<xsl:variable name="current_fn_number" select="@reference"/>
|
4826
|
+
|
4801
4827
|
<xsl:variable name="current_fn_number_text">
|
4802
4828
|
|
4803
4829
|
<xsl:value-of select="$current_fn_number"/>
|
4804
4830
|
|
4805
4831
|
</xsl:variable>
|
4806
4832
|
|
4807
|
-
<xsl:variable name="ref_id"
|
4808
|
-
|
4809
|
-
<xsl:when test="normalize-space(@ref_id) != ''"><xsl:value-of select="@ref_id"/></xsl:when>
|
4810
|
-
<xsl:otherwise>
|
4811
|
-
<xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
4812
|
-
</xsl:otherwise>
|
4813
|
-
</xsl:choose>
|
4814
|
-
</xsl:variable>
|
4833
|
+
<xsl:variable name="ref_id" select="@target"/>
|
4834
|
+
|
4815
4835
|
<xsl:variable name="footnote_inline">
|
4816
4836
|
<fo:inline role="Reference">
|
4817
4837
|
|
@@ -4856,7 +4876,9 @@
|
|
4856
4876
|
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
4857
4877
|
<xsl:copy-of select="$footnote_inline"/>
|
4858
4878
|
</xsl:when>
|
4879
|
+
<!-- <xsl:when test="$footnotes//*[local-name() = 'fmt-fn-body'][@id = $ref_id] or normalize-space(@skip_footnote_body) = 'false'"> -->
|
4859
4880
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
4881
|
+
|
4860
4882
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
4861
4883
|
<xsl:copy-of select="$footnote_inline"/>
|
4862
4884
|
<fo:footnote-body role="Note">
|
@@ -4873,7 +4895,10 @@
|
|
4873
4895
|
<xsl:value-of select="$current_fn_number_text"/>
|
4874
4896
|
|
4875
4897
|
</fo:inline>
|
4876
|
-
<xsl:apply-templates/>
|
4898
|
+
<!-- <xsl:apply-templates /> -->
|
4899
|
+
<!-- <ref_id><xsl:value-of select="$ref_id"/></ref_id>
|
4900
|
+
<here><xsl:copy-of select="$footnotes"/></here> -->
|
4901
|
+
<xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
|
4877
4902
|
</xsl:variable>
|
4878
4903
|
|
4879
4904
|
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
@@ -4927,77 +4952,136 @@
|
|
4927
4952
|
</xsl:choose>
|
4928
4953
|
</xsl:template>
|
4929
4954
|
|
4930
|
-
<xsl:template name="get_fn_list_for_element">
|
4931
|
-
<xsl:choose>
|
4932
|
-
<xsl:when test="@current_fn_number"> <!-- footnote reference number calculated already -->
|
4933
|
-
<fn gen_id="{generate-id(.)}">
|
4934
|
-
<xsl:copy-of select="@*"/>
|
4935
|
-
<xsl:copy-of select="node()"/>
|
4936
|
-
</fn>
|
4937
|
-
</xsl:when>
|
4938
|
-
<xsl:otherwise>
|
4939
|
-
<xsl:for-each select="ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1]">
|
4940
|
-
<xsl:variable name="element_id" select="@id"/>
|
4941
|
-
<xsl:for-each select=".//*[local-name() = 'fn'][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
4942
|
-
<!-- copy unique fn -->
|
4943
|
-
<fn gen_id="{generate-id(.)}">
|
4944
|
-
<xsl:copy-of select="@*"/>
|
4945
|
-
<xsl:copy-of select="node()"/>
|
4946
|
-
</fn>
|
4947
|
-
</xsl:for-each>
|
4948
|
-
</xsl:for-each>
|
4949
|
-
</xsl:otherwise>
|
4950
|
-
</xsl:choose>
|
4951
|
-
</xsl:template>
|
4952
4955
|
<!-- ============================ -->
|
4953
4956
|
<!-- table's footnotes rendering -->
|
4954
4957
|
<!-- ============================ -->
|
4955
|
-
<xsl:template name="table_fn_display">
|
4956
|
-
<xsl:variable name="references">
|
4957
4958
|
|
4959
|
+
<!-- table/fmt-footnote-container -->
|
4960
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'fmt-footnote-container']"/>
|
4961
|
+
|
4962
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'fmt-footnote-container']">
|
4963
|
+
<xsl:for-each select=".">
|
4964
|
+
<xsl:call-template name="table_fn_display"/>
|
4965
|
+
</xsl:for-each>
|
4966
|
+
</xsl:template>
|
4967
|
+
|
4968
|
+
<xsl:template name="table_fn_display">
|
4969
|
+
<!-- <xsl:variable name="references">
|
4970
|
+
<xsl:if test="$namespace = 'bsi'">
|
4971
|
+
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) = 'name']">
|
4972
|
+
<xsl:call-template name="create_fn" />
|
4973
|
+
</xsl:for-each>
|
4974
|
+
</xsl:if>
|
4958
4975
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
4959
|
-
<xsl:call-template name="create_fn"/>
|
4976
|
+
<xsl:call-template name="create_fn" />
|
4960
4977
|
</xsl:for-each>
|
4961
|
-
</xsl:variable>
|
4962
|
-
|
4963
|
-
<xsl:for-each select="xalan:nodeset($references)//fn">
|
4978
|
+
</xsl:variable> -->
|
4979
|
+
<!-- <xsl:for-each select="xalan:nodeset($references)//fn">
|
4964
4980
|
<xsl:variable name="reference" select="@reference"/>
|
4965
|
-
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
4981
|
+
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
|
4982
|
+
<xsl:for-each select="..//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
|
4966
4983
|
|
4967
4984
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
4985
|
+
<xsl:copy-of select="@id"/>
|
4968
4986
|
<xsl:call-template name="refine_table-fn-style"/>
|
4969
|
-
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
4970
|
-
<xsl:call-template name="refine_table-fn-number-style"/>
|
4971
4987
|
|
4972
|
-
|
4973
|
-
|
4974
|
-
|
4975
|
-
<!-- <xsl:if test="$namespace = 'itu'">
|
4976
|
-
<xsl:text>)</xsl:text>
|
4977
|
-
</xsl:if> -->
|
4988
|
+
<xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
|
4989
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
4990
|
+
</xsl:apply-templates>
|
4978
4991
|
|
4979
|
-
</fo:inline>
|
4980
4992
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
4981
|
-
<xsl:copy-of select="./node()"/>
|
4993
|
+
<!-- <xsl:copy-of select="./node()"/> -->
|
4994
|
+
<xsl:apply-templates/>
|
4982
4995
|
</fo:inline>
|
4983
4996
|
|
4984
4997
|
</fo:block>
|
4985
4998
|
|
4986
|
-
</xsl:if>
|
4999
|
+
<!-- </xsl:if> -->
|
4987
5000
|
</xsl:for-each>
|
4988
5001
|
</xsl:template> <!-- table_fn_display -->
|
4989
5002
|
|
5003
|
+
<!-- fmt-fn-body/fmt-fn-label in text -->
|
5004
|
+
<xsl:template match="*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"/>
|
5005
|
+
|
5006
|
+
<!-- table//fmt-fn-body//fmt-fn-label -->
|
5007
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"> <!-- *[local-name() = 'fmt-footnote-container']/ -->
|
5008
|
+
<xsl:param name="process">false</xsl:param>
|
5009
|
+
<xsl:if test="$process = 'true'">
|
5010
|
+
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
5011
|
+
|
5012
|
+
<!-- tab is padding-right -->
|
5013
|
+
<xsl:apply-templates select=".//*[local-name() = 'tab']">
|
5014
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
5015
|
+
</xsl:apply-templates>
|
5016
|
+
|
5017
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
5018
|
+
<fo:inline font-style="normal">(</fo:inline>
|
5019
|
+
</xsl:if> -->
|
5020
|
+
|
5021
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
5022
|
+
<xsl:text>※</xsl:text>
|
5023
|
+
</xsl:if> -->
|
5024
|
+
|
5025
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
5026
|
+
<!-- <xsl:value-of select="normalize-space()"/> -->
|
5027
|
+
<xsl:apply-templates/>
|
5028
|
+
|
5029
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
5030
|
+
<fo:inline font-style="normal">)</fo:inline>
|
5031
|
+
</xsl:if> -->
|
5032
|
+
|
5033
|
+
<!-- commented https://github.com/metanorma/isodoc/issues/614 -->
|
5034
|
+
<!-- <xsl:if test="$namespace = 'itu'">
|
5035
|
+
<xsl:text>)</xsl:text>
|
5036
|
+
</xsl:if> -->
|
5037
|
+
|
5038
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
5039
|
+
<xsl:text>:</xsl:text>
|
5040
|
+
</xsl:if> -->
|
5041
|
+
|
5042
|
+
</fo:inline>
|
5043
|
+
</xsl:if>
|
5044
|
+
</xsl:template> <!-- fmt-fn-body//fmt-fn-label -->
|
5045
|
+
|
5046
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']" priority="5">
|
5047
|
+
<xsl:param name="process">false</xsl:param>
|
5048
|
+
<xsl:if test="$process = 'true'">
|
5049
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
5050
|
+
|
5051
|
+
</xsl:if>
|
5052
|
+
</xsl:template>
|
5053
|
+
|
5054
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'sup']" priority="5">
|
5055
|
+
<fo:inline xsl:use-attribute-sets="table-fmt-fn-label-style" role="SKIP">
|
5056
|
+
<xsl:call-template name="refine_table-fmt-fn-label-style"/>
|
5057
|
+
<xsl:apply-templates/>
|
5058
|
+
</fo:inline>
|
5059
|
+
</xsl:template>
|
5060
|
+
|
5061
|
+
<!-- <xsl:template match="*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']"/> -->
|
5062
|
+
<!--
|
4990
5063
|
<xsl:template name="create_fn">
|
4991
5064
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
4992
|
-
<xsl:if test="ancestor::*[local-name()='table'][1]/@id">
|
5065
|
+
<xsl:if test="ancestor::*[local-name()='table'][1]/@id"> - for footnotes in tables -
|
4993
5066
|
<xsl:attribute name="id">
|
4994
5067
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
4995
5068
|
</xsl:attribute>
|
4996
5069
|
</xsl:if>
|
4997
|
-
|
4998
|
-
|
5070
|
+
<xsl:if test="$namespace = 'itu'">
|
5071
|
+
<xsl:if test="ancestor::*[local-name()='preface']">
|
5072
|
+
<xsl:attribute name="preface">true</xsl:attribute>
|
5073
|
+
</xsl:if>
|
5074
|
+
</xsl:if>
|
5075
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
5076
|
+
<xsl:attribute name="id">
|
5077
|
+
<xsl:value-of select="@reference"/>
|
5078
|
+
<xsl:text>_</xsl:text>
|
5079
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
5080
|
+
</xsl:attribute>
|
5081
|
+
</xsl:if>
|
5082
|
+
<xsl:apply-templates />
|
4999
5083
|
</fn>
|
5000
|
-
</xsl:template>
|
5084
|
+
</xsl:template> -->
|
5001
5085
|
|
5002
5086
|
<!-- footnotes for table's name rendering -->
|
5003
5087
|
<xsl:template name="table_name_fn_display">
|
@@ -5016,123 +5100,171 @@
|
|
5016
5100
|
<!-- ============================ -->
|
5017
5101
|
<!-- figure's footnotes rendering -->
|
5018
5102
|
<!-- ============================ -->
|
5019
|
-
<xsl:template name="fn_display_figure"> <!-- figure_fn_display -->
|
5020
5103
|
|
5021
|
-
|
5022
|
-
|
5023
|
-
|
5024
|
-
|
5025
|
-
|
5026
|
-
<xsl:variable name="figure_id" select="normalize-space($figure_id_)"/>
|
5104
|
+
<!-- figure/fmt-footnote-container -->
|
5105
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-footnote-container']"/>
|
5106
|
+
|
5107
|
+
<!-- TO DO: remove, now the figure fn in figure/dl/... https://github.com/metanorma/isodoc/issues/658 -->
|
5108
|
+
<xsl:template name="figure_fn_display">
|
5027
5109
|
|
5028
|
-
<!-- all footnotes relates to the current figure -->
|
5029
5110
|
<xsl:variable name="references">
|
5030
|
-
<xsl:for-each select="
|
5031
|
-
<
|
5032
|
-
|
5033
|
-
|
5111
|
+
<xsl:for-each select="./*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
|
5112
|
+
<xsl:variable name="curr_id" select="@id"/>
|
5113
|
+
<!-- <curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
5114
|
+
<curr><xsl:copy-of select="."/></curr>
|
5115
|
+
<ancestor><xsl:copy-of select="ancestor::*[local-name() = 'figure'][.//*[local-name() = 'name'][.//*[local-name() = 'fn']]]"/></ancestor> -->
|
5116
|
+
<xsl:choose>
|
5117
|
+
<!-- skip figure/name/fn -->
|
5118
|
+
<xsl:when test="ancestor::*[local-name() = 'figure'][.//*[local-name() = 'name'][.//*[local-name() = 'fn'][@target = $curr_id]]]"><!-- skip --></xsl:when>
|
5119
|
+
<xsl:otherwise>
|
5120
|
+
<xsl:element name="figure" namespace="{$namespace_full}">
|
5121
|
+
<xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
|
5122
|
+
<xsl:copy-of select="."/>
|
5123
|
+
</xsl:element>
|
5124
|
+
</xsl:element>
|
5125
|
+
</xsl:otherwise>
|
5126
|
+
</xsl:choose>
|
5034
5127
|
</xsl:for-each>
|
5035
5128
|
</xsl:variable>
|
5129
|
+
<!-- <references><xsl:copy-of select="$references"/></references> -->
|
5036
5130
|
|
5037
|
-
<xsl:if test="xalan:nodeset($references)
|
5131
|
+
<xsl:if test="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
|
5038
5132
|
|
5039
5133
|
<xsl:variable name="key_iso">
|
5040
5134
|
|
5041
5135
|
</xsl:variable>
|
5042
5136
|
|
5043
5137
|
<fo:block>
|
5138
|
+
<!-- current hierarchy is 'figure' element -->
|
5139
|
+
<xsl:variable name="following_dl_colwidths">
|
5140
|
+
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
5141
|
+
<xsl:variable name="simple-table">
|
5142
|
+
<!-- <xsl:variable name="doc_ns">
|
5143
|
+
<xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
|
5144
|
+
</xsl:variable>
|
5145
|
+
<xsl:variable name="ns">
|
5146
|
+
<xsl:choose>
|
5147
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
5148
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
5149
|
+
</xsl:when>
|
5150
|
+
<xsl:otherwise>
|
5151
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
5152
|
+
</xsl:otherwise>
|
5153
|
+
</xsl:choose>
|
5154
|
+
</xsl:variable> -->
|
5044
5155
|
|
5045
|
-
<!-- current hierarchy is 'figure' element -->
|
5046
|
-
<xsl:variable name="following_dl_colwidths">
|
5047
|
-
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
5048
|
-
<xsl:variable name="simple-table">
|
5049
|
-
<!-- <xsl:variable name="doc_ns">
|
5050
|
-
<xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
|
5051
|
-
</xsl:variable>
|
5052
|
-
<xsl:variable name="ns">
|
5053
|
-
<xsl:choose>
|
5054
|
-
<xsl:when test="normalize-space($doc_ns) != ''">
|
5055
|
-
<xsl:value-of select="normalize-space($doc_ns)"/>
|
5056
|
-
</xsl:when>
|
5057
|
-
<xsl:otherwise>
|
5058
|
-
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
5059
|
-
</xsl:otherwise>
|
5060
|
-
</xsl:choose>
|
5061
|
-
</xsl:variable> -->
|
5062
|
-
|
5063
|
-
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
5064
|
-
<tbody>
|
5065
|
-
<xsl:apply-templates mode="dl"/>
|
5066
|
-
</tbody>
|
5067
|
-
</xsl:for-each>
|
5068
|
-
</xsl:variable>
|
5069
|
-
|
5070
|
-
<xsl:call-template name="calculate-column-widths">
|
5071
|
-
<xsl:with-param name="cols-count" select="2"/>
|
5072
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
5073
|
-
</xsl:call-template>
|
5074
|
-
|
5075
|
-
</xsl:if>
|
5076
|
-
</xsl:variable>
|
5077
|
-
|
5078
|
-
<xsl:variable name="maxlength_dt">
|
5079
5156
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
5080
|
-
<
|
5157
|
+
<tbody>
|
5158
|
+
<xsl:apply-templates mode="dl"/>
|
5159
|
+
</tbody>
|
5081
5160
|
</xsl:for-each>
|
5082
5161
|
</xsl:variable>
|
5083
5162
|
|
5084
|
-
<
|
5085
|
-
<xsl:
|
5086
|
-
|
5163
|
+
<xsl:call-template name="calculate-column-widths">
|
5164
|
+
<xsl:with-param name="cols-count" select="2"/>
|
5165
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
5166
|
+
</xsl:call-template>
|
5087
5167
|
|
5088
|
-
|
5089
|
-
|
5090
|
-
|
5091
|
-
|
5092
|
-
|
5093
|
-
|
5094
|
-
|
5095
|
-
|
5096
|
-
|
5097
|
-
|
5098
|
-
|
5099
|
-
|
5100
|
-
|
5101
|
-
|
5102
|
-
|
5103
|
-
|
5104
|
-
|
5105
|
-
|
5106
|
-
|
5107
|
-
|
5108
|
-
|
5109
|
-
|
5110
|
-
|
5168
|
+
</xsl:if>
|
5169
|
+
</xsl:variable>
|
5170
|
+
|
5171
|
+
<xsl:variable name="maxlength_dt">
|
5172
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
5173
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
5174
|
+
</xsl:for-each>
|
5175
|
+
</xsl:variable>
|
5176
|
+
|
5177
|
+
<fo:table width="95%" table-layout="fixed">
|
5178
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
5179
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
5180
|
+
|
5181
|
+
</xsl:if>
|
5182
|
+
<xsl:choose>
|
5183
|
+
<!-- if there 'dl', then set same columns width -->
|
5184
|
+
<xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
|
5185
|
+
<xsl:call-template name="setColumnWidth_dl">
|
5186
|
+
<xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
|
5187
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
5188
|
+
</xsl:call-template>
|
5189
|
+
</xsl:when>
|
5190
|
+
<xsl:otherwise>
|
5191
|
+
<fo:table-column column-width="5%"/>
|
5192
|
+
<fo:table-column column-width="95%"/>
|
5193
|
+
</xsl:otherwise>
|
5194
|
+
</xsl:choose>
|
5195
|
+
<fo:table-body>
|
5196
|
+
<!-- <xsl:for-each select="xalan:nodeset($references)//fn"> -->
|
5197
|
+
<xsl:for-each select="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
|
5198
|
+
|
5199
|
+
<xsl:variable name="reference" select="@reference"/>
|
5200
|
+
<!-- <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
|
5201
|
+
<fo:table-row>
|
5202
|
+
<fo:table-cell>
|
5203
|
+
<fo:block>
|
5204
|
+
|
5205
|
+
<fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
|
5206
|
+
<!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
|
5207
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
5208
|
+
<xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
|
5111
5209
|
</fo:inline>
|
5112
|
-
</fo:block>
|
5113
|
-
</fo:table-cell>
|
5114
|
-
<fo:table-cell>
|
5115
|
-
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
5116
|
-
<xsl:if test="normalize-space($key_iso) = 'true'">
|
5117
5210
|
|
5118
|
-
|
5211
|
+
</fo:block>
|
5212
|
+
</fo:table-cell>
|
5213
|
+
<fo:table-cell>
|
5214
|
+
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
5215
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
5119
5216
|
|
5120
|
-
|
5121
|
-
<xsl:copy-of select="./node()"/>
|
5122
|
-
</fo:block>
|
5123
|
-
</fo:table-cell>
|
5124
|
-
</fo:table-row>
|
5125
|
-
</xsl:if>
|
5126
|
-
</xsl:for-each>
|
5127
|
-
</fo:table-body>
|
5128
|
-
</fo:table>
|
5217
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
5129
5218
|
|
5219
|
+
</xsl:if>
|
5220
|
+
|
5221
|
+
<!-- <xsl:copy-of select="./node()"/> -->
|
5222
|
+
<xsl:apply-templates/>
|
5223
|
+
</fo:block>
|
5224
|
+
</fo:table-cell>
|
5225
|
+
</fo:table-row>
|
5226
|
+
<!-- </xsl:if> -->
|
5227
|
+
</xsl:for-each>
|
5228
|
+
</fo:table-body>
|
5229
|
+
</fo:table>
|
5130
5230
|
</fo:block>
|
5131
5231
|
</xsl:if>
|
5132
|
-
</xsl:template> <!--
|
5232
|
+
</xsl:template> <!-- figure_fn_display -->
|
5233
|
+
|
5234
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"> <!-- *[local-name() = 'fmt-footnote-container']/ -->
|
5235
|
+
<xsl:param name="process">false</xsl:param>
|
5236
|
+
<xsl:if test="$process = 'true'">
|
5237
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
5238
|
+
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
5239
|
+
|
5240
|
+
<!-- tab is padding-right -->
|
5241
|
+
<xsl:apply-templates select=".//*[local-name() = 'tab']">
|
5242
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
5243
|
+
</xsl:apply-templates>
|
5244
|
+
|
5245
|
+
<xsl:apply-templates/>
|
5246
|
+
|
5247
|
+
</fo:inline>
|
5248
|
+
</xsl:if>
|
5249
|
+
</xsl:template> <!-- figure//fmt-fn-body//fmt-fn-label -->
|
5250
|
+
|
5251
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']" priority="5">
|
5252
|
+
<xsl:param name="process">false</xsl:param>
|
5253
|
+
<xsl:if test="$process = 'true'">
|
5254
|
+
|
5255
|
+
</xsl:if>
|
5256
|
+
</xsl:template>
|
5257
|
+
|
5258
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'sup']" priority="5">
|
5259
|
+
<fo:inline xsl:use-attribute-sets="figure-fmt-fn-label-style" role="SKIP">
|
5260
|
+
<xsl:call-template name="refine_figure-fmt-fn-label-style"/>
|
5261
|
+
<xsl:apply-templates/>
|
5262
|
+
</fo:inline>
|
5263
|
+
</xsl:template>
|
5133
5264
|
|
5134
5265
|
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
5135
5266
|
<!-- figure's footnote label -->
|
5267
|
+
<!-- figure/dl[@key = 'true']/dt/p/sup -->
|
5136
5268
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'dl'][@key = 'true']/*[local-name() = 'dt']/ *[local-name() = 'p'][count(node()[normalize-space() != '']) = 1]/*[local-name() = 'sup']" priority="3">
|
5137
5269
|
<xsl:variable name="key_iso">
|
5138
5270
|
|
@@ -5141,7 +5273,7 @@
|
|
5141
5273
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
5142
5274
|
|
5143
5275
|
</xsl:if>
|
5144
|
-
<fo:inline xsl:use-attribute-sets="figure-fn-number-style"> <!-- id="{@id}" -->
|
5276
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
|
5145
5277
|
<!-- <xsl:value-of select="@reference"/> -->
|
5146
5278
|
<xsl:apply-templates/>
|
5147
5279
|
</fo:inline>
|
@@ -5151,38 +5283,65 @@
|
|
5151
5283
|
<!-- END: figure's footnotes rendering -->
|
5152
5284
|
<!-- ============================ -->
|
5153
5285
|
|
5154
|
-
<!-- fn reference in the
|
5286
|
+
<!-- fn reference in the table rendering (for instance, 'some text 1) some text' ) -->
|
5287
|
+
<!-- fn --> <!-- in table --> <!-- for figure see <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/> -->
|
5155
5288
|
<xsl:template match="*[local-name()='fn']">
|
5156
5289
|
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
5157
5290
|
|
5158
5291
|
<xsl:call-template name="refine_fn-reference-style"/>
|
5159
5292
|
|
5160
|
-
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
5161
|
-
|
5162
|
-
|
5293
|
+
<!-- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> --> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
5294
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
5295
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
5296
|
+
<!-- <xsl:attribute name="internal-destination">
|
5163
5297
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
5164
5298
|
</xsl:attribute>
|
5165
5299
|
</xsl:if>
|
5300
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
5301
|
+
<xsl:attribute name="internal-destination">
|
5302
|
+
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
5303
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
5304
|
+
</xsl:attribute>
|
5305
|
+
</xsl:if> -->
|
5306
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
5307
|
+
<xsl:text>※</xsl:text>
|
5308
|
+
</xsl:if> -->
|
5309
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
5166
5310
|
|
5167
|
-
|
5311
|
+
<xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
|
5168
5312
|
|
5313
|
+
<!-- <xsl:if test="$namespace = 'bsi'">
|
5314
|
+
<xsl:text>)</xsl:text>
|
5315
|
+
</xsl:if> -->
|
5169
5316
|
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
5170
5317
|
<!-- <xsl:if test="$namespace = 'jis'">
|
5171
5318
|
<fo:inline font-weight="normal">)</fo:inline>
|
5172
5319
|
</xsl:if> -->
|
5173
5320
|
</fo:basic-link>
|
5174
5321
|
</fo:inline>
|
5175
|
-
</xsl:template>
|
5322
|
+
</xsl:template> <!-- fn -->
|
5176
5323
|
|
5324
|
+
<!-- fn/text() -->
|
5177
5325
|
<xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
5178
5326
|
<fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
|
5179
5327
|
</xsl:template>
|
5180
5328
|
|
5181
|
-
|
5329
|
+
<!-- fn//p fmt-fn-body//p -->
|
5330
|
+
<xsl:template match="*[local-name()='fn']//*[local-name()='p'] | *[local-name() = 'fmt-fn-body']//*[local-name()='p']">
|
5182
5331
|
<fo:inline role="P">
|
5183
5332
|
<xsl:apply-templates/>
|
5184
5333
|
</fo:inline>
|
5185
5334
|
</xsl:template>
|
5335
|
+
|
5336
|
+
<xsl:template name="insertFootnoteSeparatorCommon">
|
5337
|
+
<xsl:param name="leader_length">30%</xsl:param>
|
5338
|
+
<fo:static-content flow-name="xsl-footnote-separator">
|
5339
|
+
<fo:block>
|
5340
|
+
<fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
|
5341
|
+
</fo:block>
|
5342
|
+
</fo:static-content>
|
5343
|
+
</xsl:template>
|
5344
|
+
|
5186
5345
|
<!-- ===================== -->
|
5187
5346
|
<!-- END Footnotes processing -->
|
5188
5347
|
<!-- ===================== -->
|
@@ -5459,11 +5618,11 @@
|
|
5459
5618
|
<xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
|
5460
5619
|
<!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
|
5461
5620
|
|
5462
|
-
|
5463
|
-
|
5464
|
-
|
5465
|
-
|
5466
|
-
|
5621
|
+
<xsl:call-template name="setColumnWidth_dl">
|
5622
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
5623
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
5624
|
+
<xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
|
5625
|
+
</xsl:call-template>
|
5467
5626
|
|
5468
5627
|
<fo:table-body>
|
5469
5628
|
|
@@ -5497,6 +5656,14 @@
|
|
5497
5656
|
|
5498
5657
|
</xsl:template> <!-- END: dl -->
|
5499
5658
|
|
5659
|
+
<xsl:template match="@*|node()" mode="dt_clean">
|
5660
|
+
<xsl:copy>
|
5661
|
+
<xsl:apply-templates select="@*|node()" mode="dt_clean"/>
|
5662
|
+
</xsl:copy>
|
5663
|
+
</xsl:template>
|
5664
|
+
|
5665
|
+
<xsl:template match="*[local-name() = 'asciimath']" mode="dt_clean"/>
|
5666
|
+
|
5500
5667
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
5501
5668
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
5502
5669
|
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
@@ -5529,10 +5696,12 @@
|
|
5529
5696
|
<!-- ignore 'p' with 'where' in formula, before 'dl' -->
|
5530
5697
|
<xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
|
5531
5698
|
|
5699
|
+
<!-- dl/name -->
|
5532
5700
|
<xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
|
5533
5701
|
<xsl:param name="process">false</xsl:param>
|
5534
5702
|
<xsl:if test="$process = 'true'">
|
5535
5703
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
5704
|
+
|
5536
5705
|
<xsl:apply-templates/>
|
5537
5706
|
</fo:block>
|
5538
5707
|
</xsl:if>
|
@@ -5546,6 +5715,10 @@
|
|
5546
5715
|
<!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
|
5547
5716
|
|
5548
5717
|
<xsl:choose>
|
5718
|
+
<!-- <xsl:when test="@class = 'formula_dl' and local-name(..) = 'figure'">
|
5719
|
+
<fo:table-column column-width="10%"/>
|
5720
|
+
<fo:table-column column-width="90%"/>
|
5721
|
+
</xsl:when> -->
|
5549
5722
|
<xsl:when test="xalan:nodeset($colwidths)/autolayout">
|
5550
5723
|
<xsl:call-template name="insertTableColumnWidth">
|
5551
5724
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
@@ -7677,6 +7850,27 @@
|
|
7677
7850
|
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
7678
7851
|
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
7679
7852
|
</xsl:when> -->
|
7853
|
+
|
7854
|
+
<!-- <xsl:when test="not(starts-with(@target, 'http:') or starts-with(@target, 'https') or starts-with(@target, 'www') or starts-with(@target, 'mailto') or starts-with(@target, 'ftp'))">
|
7855
|
+
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
7856
|
+
<xsl:variable name="filename">
|
7857
|
+
<xsl:call-template name="substring-after-last">
|
7858
|
+
<xsl:with-param name="value" select="$target_"/>
|
7859
|
+
<xsl:with-param name="delimiter" select="'/'"/>
|
7860
|
+
</xsl:call-template>
|
7861
|
+
</xsl:variable>
|
7862
|
+
<xsl:variable name="target_filepath" select="concat($inputxml_basepath, @target)"/>
|
7863
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($target_filepath)))"/>
|
7864
|
+
<xsl:choose>
|
7865
|
+
<xsl:when test="$file_exists = 'true'">
|
7866
|
+
<xsl:value-of select="concat('url(embedded-file:', $filename, ')')"/>
|
7867
|
+
</xsl:when>
|
7868
|
+
<xsl:otherwise>
|
7869
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
7870
|
+
</xsl:otherwise>
|
7871
|
+
</xsl:choose>
|
7872
|
+
</xsl:when> -->
|
7873
|
+
|
7680
7874
|
<xsl:otherwise>
|
7681
7875
|
<xsl:value-of select="normalize-space(@target)"/>
|
7682
7876
|
</xsl:otherwise>
|
@@ -7981,7 +8175,7 @@
|
|
7981
8175
|
|
7982
8176
|
<xsl:template name="refine_note_block_style">
|
7983
8177
|
|
7984
|
-
</xsl:template>
|
8178
|
+
</xsl:template> <!-- refine_note_block_style -->
|
7985
8179
|
|
7986
8180
|
<xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
7987
8181
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
@@ -8174,10 +8368,21 @@
|
|
8174
8368
|
</xsl:template>
|
8175
8369
|
|
8176
8370
|
<xsl:template name="showFigureKey">
|
8177
|
-
<xsl:for-each select="*[local-name() = 'note'
|
8178
|
-
<xsl:
|
8371
|
+
<xsl:for-each select="*[(local-name() = 'note' and not(@type = 'units')) or local-name() = 'example']">
|
8372
|
+
<xsl:choose>
|
8373
|
+
<xsl:when test="local-name() = 'note'">
|
8374
|
+
<xsl:call-template name="note"/>
|
8375
|
+
</xsl:when>
|
8376
|
+
<xsl:when test="local-name() = 'example'">
|
8377
|
+
<xsl:call-template name="example"/>
|
8378
|
+
</xsl:when>
|
8379
|
+
<xsl:otherwise>
|
8380
|
+
<xsl:apply-templates select="."/>
|
8381
|
+
</xsl:otherwise>
|
8382
|
+
</xsl:choose>
|
8179
8383
|
</xsl:for-each>
|
8180
|
-
|
8384
|
+
<!-- TO DO: remove, now the figure fn in figure/dl/... https://github.com/metanorma/isodoc/issues/658 -->
|
8385
|
+
<xsl:call-template name="figure_fn_display"/>
|
8181
8386
|
</xsl:template>
|
8182
8387
|
|
8183
8388
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
@@ -9071,10 +9276,10 @@
|
|
9071
9276
|
<xsl:when test="@type = 'section-title'">
|
9072
9277
|
<xsl:value-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/preceding-sibling::node()"/>
|
9073
9278
|
<xsl:text>: </xsl:text>
|
9074
|
-
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name = 'fmt-xref-label')]"/>
|
9279
|
+
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name() = 'fmt-xref-label')]"/>
|
9075
9280
|
</xsl:when>
|
9076
9281
|
<xsl:otherwise>
|
9077
|
-
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name = 'fmt-xref-label')]"/>
|
9282
|
+
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name() = 'fmt-xref-label')]"/>
|
9078
9283
|
</xsl:otherwise>
|
9079
9284
|
</xsl:choose>
|
9080
9285
|
</xsl:when>
|
@@ -9405,9 +9610,15 @@
|
|
9405
9610
|
</xsl:if>
|
9406
9611
|
</xsl:template>
|
9407
9612
|
|
9613
|
+
<!-- figure/fn -->
|
9408
9614
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
|
9409
|
-
|
9615
|
+
<!-- figure/note -->
|
9616
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
|
9617
|
+
<!-- figure/example -->
|
9618
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
|
9410
9619
|
|
9620
|
+
<!-- figure/note[@type = 'units'] -->
|
9621
|
+
<!-- image/note[@type = 'units'] -->
|
9411
9622
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note'][@type = 'units'] | *[local-name() = 'image']/*[local-name() = 'note'][@type = 'units']" priority="2">
|
9412
9623
|
<fo:block text-align="right" keep-with-next="always">
|
9413
9624
|
<xsl:apply-templates/>
|
@@ -9528,6 +9739,7 @@
|
|
9528
9739
|
</xsl:choose>
|
9529
9740
|
</xsl:template>
|
9530
9741
|
|
9742
|
+
<!-- fn -->
|
9531
9743
|
<xsl:template match="*[local-name() = 'fn']" mode="contents"/>
|
9532
9744
|
<xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/>
|
9533
9745
|
|
@@ -10428,7 +10640,7 @@
|
|
10428
10640
|
text line 1
|
10429
10641
|
text line 2
|
10430
10642
|
-->
|
10431
|
-
<xsl:template match="*[local-name() = 'example']">
|
10643
|
+
<xsl:template match="*[local-name() = 'example']" name="example">
|
10432
10644
|
|
10433
10645
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
10434
10646
|
|
@@ -10534,6 +10746,7 @@
|
|
10534
10746
|
|
10535
10747
|
</xsl:template>
|
10536
10748
|
|
10749
|
+
<!-- example/name -->
|
10537
10750
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
|
10538
10751
|
<xsl:param name="fo_element">block</xsl:param>
|
10539
10752
|
|
@@ -10559,7 +10772,8 @@
|
|
10559
10772
|
|
10560
10773
|
</xsl:template>
|
10561
10774
|
|
10562
|
-
|
10775
|
+
<!-- table/example/name, table/tfoot//example/name -->
|
10776
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'example']/*[local-name() = 'name']">
|
10563
10777
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
10564
10778
|
|
10565
10779
|
<xsl:apply-templates/>
|
@@ -12189,8 +12403,33 @@
|
|
12189
12403
|
|
12190
12404
|
<xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
12191
12405
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
12406
|
+
<!-- New format: one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
12407
|
+
<!-- <test><xsl:copy-of select="."/></test> -->
|
12408
|
+
|
12192
12409
|
<xsl:variable name="target" select="@target"/>
|
12410
|
+
|
12193
12411
|
<xsl:for-each select="*[local-name() = 'tab']">
|
12412
|
+
|
12413
|
+
<xsl:if test="position() = 1">
|
12414
|
+
<!-- first column (data before first `tab`) -->
|
12415
|
+
<fo:table-cell>
|
12416
|
+
<fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
|
12417
|
+
<xsl:call-template name="insert_basic_link">
|
12418
|
+
<xsl:with-param name="element">
|
12419
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
12420
|
+
<xsl:for-each select="preceding-sibling::node()">
|
12421
|
+
<xsl:choose>
|
12422
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
12423
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
12424
|
+
</xsl:choose>
|
12425
|
+
</xsl:for-each>
|
12426
|
+
</fo:basic-link>
|
12427
|
+
</xsl:with-param>
|
12428
|
+
</xsl:call-template>
|
12429
|
+
</fo:block>
|
12430
|
+
</fo:table-cell>
|
12431
|
+
</xsl:if>
|
12432
|
+
|
12194
12433
|
<xsl:variable name="current_id" select="generate-id()"/>
|
12195
12434
|
<fo:table-cell>
|
12196
12435
|
<fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
|
@@ -12241,11 +12480,25 @@
|
|
12241
12480
|
|
12242
12481
|
<xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
12243
12482
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
12483
|
+
<!-- New format - one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
12244
12484
|
<xsl:for-each select="*[local-name() = 'tab']">
|
12485
|
+
<xsl:if test="position() = 1">
|
12486
|
+
<td>
|
12487
|
+
<xsl:for-each select="preceding-sibling::node()">
|
12488
|
+
<xsl:choose>
|
12489
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
12490
|
+
<xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
|
12491
|
+
</xsl:choose>
|
12492
|
+
</xsl:for-each>
|
12493
|
+
</td>
|
12494
|
+
</xsl:if>
|
12245
12495
|
<xsl:variable name="current_id" select="generate-id()"/>
|
12246
12496
|
<td>
|
12247
12497
|
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
12248
|
-
<xsl:
|
12498
|
+
<xsl:choose>
|
12499
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
12500
|
+
<xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
|
12501
|
+
</xsl:choose>
|
12249
12502
|
</xsl:for-each>
|
12250
12503
|
</td>
|
12251
12504
|
</xsl:for-each>
|
@@ -13639,6 +13892,7 @@
|
|
13639
13892
|
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
13640
13893
|
</fn>
|
13641
13894
|
-->
|
13895
|
+
<!-- fn in text -->
|
13642
13896
|
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" mode="linear_xml" name="linear_xml_fn">
|
13643
13897
|
<xsl:variable name="p_fn_">
|
13644
13898
|
<xsl:call-template name="get_fn_list"/>
|
@@ -33,6 +33,15 @@
|
|
33
33
|
</zeroOrMore>
|
34
34
|
</element>
|
35
35
|
</define>
|
36
|
+
<define name="fn" combine="interleave">
|
37
|
+
<optional>
|
38
|
+
<attribute name="hiddenref">
|
39
|
+
<a:documentation>If true, number the footnote as normal, but suppress display of the footnote reference in the document body.
|
40
|
+
This is done if the footnote reference is already presented in some other form, e.g. within a figure image.</a:documentation>
|
41
|
+
<data type="boolean"/>
|
42
|
+
</attribute>
|
43
|
+
</optional>
|
44
|
+
</define>
|
36
45
|
<define name="index-primary">
|
37
46
|
<element name="primary">
|
38
47
|
<oneOrMore>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ribose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|