metanorma-iec 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/iec/iec.international-standard.xsl +475 -215
- data/lib/metanorma/iec/isodoc.rng +9 -0
- data/lib/metanorma/iec/relaton-iec.rng +0 -22
- data/lib/metanorma/iec/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: 144ae8f40d57c697550b1704d0d0b2ed0eb7425e69abd4ea4b8b53de56a94fc2
|
4
|
+
data.tar.gz: aa354b58cfd86169f327b33851d42b22530ba9deadedb7bb3e0c55290ba7745c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd9f1b59bd98a885b24863f63b4f2c34839149b959234dd7cc09d6dde86957f5aa1c6d4abbb30b2e29d7dc7dd9be0180d4dadefdf6f9749c1d0a5d5b7d8645e8
|
7
|
+
data.tar.gz: 43dd6d1f17707dad19f49a90de6dacdaa9306571dc5be33a42afbdb8323ff3b1af250db1fa9e392c9655122f33a17ec149cffa4081991d591608090634de297a
|
@@ -1931,10 +1931,6 @@
|
|
1931
1931
|
|
1932
1932
|
</xsl:template>
|
1933
1933
|
|
1934
|
-
<xsl:template match="iec:p/iec:fn/iec:p">
|
1935
|
-
<xsl:apply-templates/>
|
1936
|
-
</xsl:template>
|
1937
|
-
|
1938
1934
|
<xsl:template match="iec:dd/iec:p">
|
1939
1935
|
<fo:block margin-bottom="5pt"><xsl:apply-templates/></fo:block>
|
1940
1936
|
</xsl:template>
|
@@ -3033,15 +3029,19 @@
|
|
3033
3029
|
</xsl:template>
|
3034
3030
|
|
3035
3031
|
<xsl:attribute-set name="table-fn-number-style">
|
3032
|
+
<!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
|
3033
|
+
|
3034
|
+
</xsl:attribute-set> <!-- table-fn-number-style -->
|
3035
|
+
|
3036
|
+
<xsl:attribute-set name="table-fmt-fn-label-style">
|
3036
3037
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3037
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
3038
3038
|
|
3039
3039
|
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
3040
3040
|
<xsl:attribute name="font-size">70%</xsl:attribute>
|
3041
3041
|
|
3042
|
-
</xsl:attribute-set> <!-- table-fn-
|
3042
|
+
</xsl:attribute-set> <!-- table-fmt-fn-label-style -->
|
3043
3043
|
|
3044
|
-
<xsl:template name="refine_table-fn-
|
3044
|
+
<xsl:template name="refine_table-fmt-fn-label-style">
|
3045
3045
|
|
3046
3046
|
</xsl:template>
|
3047
3047
|
|
@@ -3056,13 +3056,20 @@
|
|
3056
3056
|
</xsl:attribute-set>
|
3057
3057
|
|
3058
3058
|
<xsl:attribute-set name="figure-fn-number-style">
|
3059
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3060
3059
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
3060
|
+
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
3061
|
+
|
3062
|
+
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
3063
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3061
3064
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
3062
3065
|
|
3063
3066
|
<xsl:attribute name="baseline-shift">65%</xsl:attribute>
|
3064
3067
|
|
3065
|
-
</xsl:attribute-set>
|
3068
|
+
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
3069
|
+
|
3070
|
+
<xsl:template name="refine_figure-fmt-fn-label-style">
|
3071
|
+
|
3072
|
+
</xsl:template>
|
3066
3073
|
|
3067
3074
|
<xsl:attribute-set name="figure-fn-body-style">
|
3068
3075
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
@@ -4608,9 +4615,13 @@
|
|
4608
4615
|
|
4609
4616
|
<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']"/>
|
4610
4617
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
4611
|
-
|
4612
|
-
|
4613
|
-
|
4618
|
+
<!-- <xsl:choose>
|
4619
|
+
<xsl:when test="$namespace = 'plateau'"></xsl:when>
|
4620
|
+
<xsl:otherwise>
|
4621
|
+
|
4622
|
+
</xsl:otherwise>
|
4623
|
+
</xsl:choose> -->
|
4624
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
|
4614
4625
|
</xsl:if>
|
4615
4626
|
|
4616
4627
|
<xsl:choose>
|
@@ -4657,7 +4668,7 @@
|
|
4657
4668
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
4658
4669
|
</xsl:when>
|
4659
4670
|
<xsl:otherwise>
|
4660
|
-
<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 -->
|
4671
|
+
<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 -->
|
4661
4672
|
</xsl:otherwise>
|
4662
4673
|
</xsl:choose>
|
4663
4674
|
|
@@ -4668,13 +4679,26 @@
|
|
4668
4679
|
|
4669
4680
|
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
4670
4681
|
|
4671
|
-
|
4672
|
-
|
4673
|
-
|
4674
|
-
|
4675
|
-
|
4676
|
-
|
4677
|
-
|
4682
|
+
<!-- https://github.com/metanorma/metanorma-plateau/issues/171 -->
|
4683
|
+
|
4684
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
4685
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
4686
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
4687
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
4688
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
4689
|
+
</xsl:call-template>
|
4690
|
+
</xsl:for-each>
|
4691
|
+
|
4692
|
+
<!-- https://github.com/metanorma/metanorma-plateau/issues/171
|
4693
|
+
<xsl:if test="$namespace = 'plateau'">
|
4694
|
+
<xsl:apply-templates select="*[not(local-name()='thead') and not(local-name()='tbody') and not(local-name()='tfoot') and not(local-name()='name')]" />
|
4695
|
+
<xsl:for-each select="*[local-name()='tbody']"> - select context to tbody -
|
4696
|
+
<xsl:variable name="table_fn_block">
|
4697
|
+
<xsl:call-template name="table_fn_display" />
|
4698
|
+
</xsl:variable>
|
4699
|
+
<xsl:copy-of select="$table_fn_block"/>
|
4700
|
+
</xsl:for-each>
|
4701
|
+
</xsl:if> -->
|
4678
4702
|
|
4679
4703
|
<xsl:if test="*[local-name()='bookmark']"> <!-- special case: table/bookmark -->
|
4680
4704
|
<fo:block keep-with-previous="always" line-height="0.1">
|
@@ -5381,6 +5405,7 @@
|
|
5381
5405
|
<xsl:with-param name="key">continued</xsl:with-param>
|
5382
5406
|
</xsl:call-template>
|
5383
5407
|
</xsl:variable>
|
5408
|
+
|
5384
5409
|
<xsl:variable name="title_continued_in_parenthesis" select="concat('(',$title_continued_,')')"/>
|
5385
5410
|
<xsl:variable name="title_continued">
|
5386
5411
|
<xsl:value-of select="$title_continued_in_parenthesis"/>
|
@@ -5622,6 +5647,17 @@
|
|
5622
5647
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
5623
5648
|
</xsl:if>
|
5624
5649
|
|
5650
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
5651
|
+
<xsl:if test="@colspan and *[local-name() = 'note'][@type = 'units']">
|
5652
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
5653
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
5654
|
+
<xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
|
5655
|
+
<xsl:attribute name="border-top">1pt solid white</xsl:attribute>
|
5656
|
+
<xsl:attribute name="border-left">1pt solid white</xsl:attribute>
|
5657
|
+
<xsl:attribute name="border-right">1pt solid white</xsl:attribute>
|
5658
|
+
</xsl:if>
|
5659
|
+
</xsl:if>
|
5660
|
+
|
5625
5661
|
<fo:block role="SKIP">
|
5626
5662
|
|
5627
5663
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
@@ -5640,7 +5676,8 @@
|
|
5640
5676
|
</fo:table-cell>
|
5641
5677
|
</xsl:template> <!-- td -->
|
5642
5678
|
|
5643
|
-
|
5679
|
+
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
5680
|
+
<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">
|
5644
5681
|
|
5645
5682
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
5646
5683
|
<xsl:copy-of select="@id"/>
|
@@ -5661,65 +5698,54 @@
|
|
5661
5698
|
|
5662
5699
|
</xsl:template> <!-- table/note -->
|
5663
5700
|
|
5664
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
5701
|
+
<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">
|
5665
5702
|
<xsl:apply-templates/>
|
5666
5703
|
</xsl:template>
|
5667
5704
|
|
5668
5705
|
<!-- ===================== -->
|
5669
5706
|
<!-- Footnotes processing -->
|
5670
5707
|
<!-- ===================== -->
|
5708
|
+
|
5709
|
+
<!-- document text (not figures, or tables) footnotes -->
|
5710
|
+
<xsl:variable name="footnotes_">
|
5711
|
+
<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 -->
|
5712
|
+
<!-- <xsl:copy-of select="."/> -->
|
5713
|
+
<xsl:variable name="update_xml_step1">
|
5714
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
5715
|
+
</xsl:variable>
|
5716
|
+
<xsl:apply-templates select="xalan:nodeset($update_xml_step1)" mode="update_xml_enclose_keep-together_within-line"/>
|
5717
|
+
</xsl:for-each>
|
5718
|
+
</xsl:variable>
|
5719
|
+
<xsl:variable name="footnotes" select="xalan:nodeset($footnotes_)"/>
|
5720
|
+
|
5671
5721
|
<!--
|
5672
5722
|
<fn reference="1">
|
5673
5723
|
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
5674
5724
|
</fn>
|
5675
5725
|
-->
|
5676
|
-
<!-- footnotes in text (title, bibliography, main body, table's, figure's names
|
5726
|
+
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
5727
|
+
<!-- fn in text -->
|
5677
5728
|
<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">
|
5678
5729
|
|
5679
|
-
<!-- list of
|
5730
|
+
<!-- list of unique footnotes -->
|
5680
5731
|
<xsl:variable name="p_fn_">
|
5681
5732
|
<xsl:call-template name="get_fn_list"/>
|
5682
|
-
<!-- <xsl:choose>
|
5683
|
-
<xsl:when test="$namespace = 'jis'">
|
5684
|
-
<xsl:call-template name="get_fn_list_for_element"/>
|
5685
|
-
</xsl:when>
|
5686
|
-
<xsl:otherwise>
|
5687
|
-
<xsl:call-template name="get_fn_list"/>
|
5688
|
-
</xsl:otherwise>
|
5689
|
-
</xsl:choose> -->
|
5690
5733
|
</xsl:variable>
|
5691
5734
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
5692
5735
|
|
5693
5736
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
5694
|
-
|
5695
|
-
<xsl:variable name="reference_">
|
5696
|
-
<xsl:value-of select="@reference"/>
|
5697
|
-
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
5698
|
-
</xsl:variable>
|
5699
|
-
<xsl:variable name="reference" select="normalize-space($reference_)"/>
|
5737
|
+
|
5700
5738
|
<!-- fn sequence number in document -->
|
5701
|
-
<xsl:variable name="current_fn_number"
|
5702
|
-
|
5703
|
-
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
5704
|
-
<xsl:otherwise>
|
5705
|
-
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
5706
|
-
</xsl:otherwise>
|
5707
|
-
</xsl:choose>
|
5708
|
-
</xsl:variable>
|
5739
|
+
<xsl:variable name="current_fn_number" select="@reference"/>
|
5740
|
+
|
5709
5741
|
<xsl:variable name="current_fn_number_text">
|
5710
5742
|
|
5711
5743
|
<xsl:value-of select="$current_fn_number"/>
|
5712
5744
|
|
5713
5745
|
</xsl:variable>
|
5714
5746
|
|
5715
|
-
<xsl:variable name="ref_id"
|
5716
|
-
|
5717
|
-
<xsl:when test="normalize-space(@ref_id) != ''"><xsl:value-of select="@ref_id"/></xsl:when>
|
5718
|
-
<xsl:otherwise>
|
5719
|
-
<xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
5720
|
-
</xsl:otherwise>
|
5721
|
-
</xsl:choose>
|
5722
|
-
</xsl:variable>
|
5747
|
+
<xsl:variable name="ref_id" select="@target"/>
|
5748
|
+
|
5723
5749
|
<xsl:variable name="footnote_inline">
|
5724
5750
|
<fo:inline role="Reference">
|
5725
5751
|
|
@@ -5764,7 +5790,9 @@
|
|
5764
5790
|
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
5765
5791
|
<xsl:copy-of select="$footnote_inline"/>
|
5766
5792
|
</xsl:when>
|
5793
|
+
<!-- <xsl:when test="$footnotes//*[local-name() = 'fmt-fn-body'][@id = $ref_id] or normalize-space(@skip_footnote_body) = 'false'"> -->
|
5767
5794
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
5795
|
+
|
5768
5796
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
5769
5797
|
<xsl:copy-of select="$footnote_inline"/>
|
5770
5798
|
<fo:footnote-body role="Note">
|
@@ -5781,7 +5809,10 @@
|
|
5781
5809
|
<xsl:value-of select="$current_fn_number_text"/>
|
5782
5810
|
|
5783
5811
|
</fo:inline>
|
5784
|
-
<xsl:apply-templates/>
|
5812
|
+
<!-- <xsl:apply-templates /> -->
|
5813
|
+
<!-- <ref_id><xsl:value-of select="$ref_id"/></ref_id>
|
5814
|
+
<here><xsl:copy-of select="$footnotes"/></here> -->
|
5815
|
+
<xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
|
5785
5816
|
</xsl:variable>
|
5786
5817
|
|
5787
5818
|
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
@@ -5835,77 +5866,136 @@
|
|
5835
5866
|
</xsl:choose>
|
5836
5867
|
</xsl:template>
|
5837
5868
|
|
5838
|
-
<xsl:template name="get_fn_list_for_element">
|
5839
|
-
<xsl:choose>
|
5840
|
-
<xsl:when test="@current_fn_number"> <!-- footnote reference number calculated already -->
|
5841
|
-
<fn gen_id="{generate-id(.)}">
|
5842
|
-
<xsl:copy-of select="@*"/>
|
5843
|
-
<xsl:copy-of select="node()"/>
|
5844
|
-
</fn>
|
5845
|
-
</xsl:when>
|
5846
|
-
<xsl:otherwise>
|
5847
|
-
<xsl:for-each select="ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1]">
|
5848
|
-
<xsl:variable name="element_id" select="@id"/>
|
5849
|
-
<xsl:for-each select=".//*[local-name() = 'fn'][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
5850
|
-
<!-- copy unique fn -->
|
5851
|
-
<fn gen_id="{generate-id(.)}">
|
5852
|
-
<xsl:copy-of select="@*"/>
|
5853
|
-
<xsl:copy-of select="node()"/>
|
5854
|
-
</fn>
|
5855
|
-
</xsl:for-each>
|
5856
|
-
</xsl:for-each>
|
5857
|
-
</xsl:otherwise>
|
5858
|
-
</xsl:choose>
|
5859
|
-
</xsl:template>
|
5860
5869
|
<!-- ============================ -->
|
5861
5870
|
<!-- table's footnotes rendering -->
|
5862
5871
|
<!-- ============================ -->
|
5863
|
-
<xsl:template name="table_fn_display">
|
5864
|
-
<xsl:variable name="references">
|
5865
5872
|
|
5873
|
+
<!-- table/fmt-footnote-container -->
|
5874
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'fmt-footnote-container']"/>
|
5875
|
+
|
5876
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'fmt-footnote-container']">
|
5877
|
+
<xsl:for-each select=".">
|
5878
|
+
<xsl:call-template name="table_fn_display"/>
|
5879
|
+
</xsl:for-each>
|
5880
|
+
</xsl:template>
|
5881
|
+
|
5882
|
+
<xsl:template name="table_fn_display">
|
5883
|
+
<!-- <xsl:variable name="references">
|
5884
|
+
<xsl:if test="$namespace = 'bsi'">
|
5885
|
+
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) = 'name']">
|
5886
|
+
<xsl:call-template name="create_fn" />
|
5887
|
+
</xsl:for-each>
|
5888
|
+
</xsl:if>
|
5866
5889
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
5867
|
-
<xsl:call-template name="create_fn"/>
|
5890
|
+
<xsl:call-template name="create_fn" />
|
5868
5891
|
</xsl:for-each>
|
5869
|
-
</xsl:variable>
|
5870
|
-
|
5871
|
-
<xsl:for-each select="xalan:nodeset($references)//fn">
|
5892
|
+
</xsl:variable> -->
|
5893
|
+
<!-- <xsl:for-each select="xalan:nodeset($references)//fn">
|
5872
5894
|
<xsl:variable name="reference" select="@reference"/>
|
5873
|
-
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
5895
|
+
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
|
5896
|
+
<xsl:for-each select="..//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
|
5874
5897
|
|
5875
5898
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
5899
|
+
<xsl:copy-of select="@id"/>
|
5876
5900
|
<xsl:call-template name="refine_table-fn-style"/>
|
5877
|
-
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
5878
|
-
<xsl:call-template name="refine_table-fn-number-style"/>
|
5879
|
-
|
5880
|
-
<xsl:value-of select="@reference"/>
|
5881
5901
|
|
5882
|
-
|
5883
|
-
|
5884
|
-
|
5885
|
-
</xsl:if> -->
|
5902
|
+
<xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
|
5903
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
5904
|
+
</xsl:apply-templates>
|
5886
5905
|
|
5887
|
-
</fo:inline>
|
5888
5906
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
5889
|
-
<xsl:copy-of select="./node()"/>
|
5907
|
+
<!-- <xsl:copy-of select="./node()"/> -->
|
5908
|
+
<xsl:apply-templates/>
|
5890
5909
|
</fo:inline>
|
5891
5910
|
|
5892
5911
|
</fo:block>
|
5893
5912
|
|
5894
|
-
</xsl:if>
|
5913
|
+
<!-- </xsl:if> -->
|
5895
5914
|
</xsl:for-each>
|
5896
5915
|
</xsl:template> <!-- table_fn_display -->
|
5897
5916
|
|
5917
|
+
<!-- fmt-fn-body/fmt-fn-label in text -->
|
5918
|
+
<xsl:template match="*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"/>
|
5919
|
+
|
5920
|
+
<!-- table//fmt-fn-body//fmt-fn-label -->
|
5921
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"> <!-- *[local-name() = 'fmt-footnote-container']/ -->
|
5922
|
+
<xsl:param name="process">false</xsl:param>
|
5923
|
+
<xsl:if test="$process = 'true'">
|
5924
|
+
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
5925
|
+
|
5926
|
+
<!-- tab is padding-right -->
|
5927
|
+
<xsl:apply-templates select=".//*[local-name() = 'tab']">
|
5928
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
5929
|
+
</xsl:apply-templates>
|
5930
|
+
|
5931
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
5932
|
+
<fo:inline font-style="normal">(</fo:inline>
|
5933
|
+
</xsl:if> -->
|
5934
|
+
|
5935
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
5936
|
+
<xsl:text>※</xsl:text>
|
5937
|
+
</xsl:if> -->
|
5938
|
+
|
5939
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
5940
|
+
<!-- <xsl:value-of select="normalize-space()"/> -->
|
5941
|
+
<xsl:apply-templates/>
|
5942
|
+
|
5943
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
5944
|
+
<fo:inline font-style="normal">)</fo:inline>
|
5945
|
+
</xsl:if> -->
|
5946
|
+
|
5947
|
+
<!-- commented https://github.com/metanorma/isodoc/issues/614 -->
|
5948
|
+
<!-- <xsl:if test="$namespace = 'itu'">
|
5949
|
+
<xsl:text>)</xsl:text>
|
5950
|
+
</xsl:if> -->
|
5951
|
+
|
5952
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
5953
|
+
<xsl:text>:</xsl:text>
|
5954
|
+
</xsl:if> -->
|
5955
|
+
|
5956
|
+
</fo:inline>
|
5957
|
+
</xsl:if>
|
5958
|
+
</xsl:template> <!-- fmt-fn-body//fmt-fn-label -->
|
5959
|
+
|
5960
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']" priority="5">
|
5961
|
+
<xsl:param name="process">false</xsl:param>
|
5962
|
+
<xsl:if test="$process = 'true'">
|
5963
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
5964
|
+
|
5965
|
+
</xsl:if>
|
5966
|
+
</xsl:template>
|
5967
|
+
|
5968
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'sup']" priority="5">
|
5969
|
+
<fo:inline xsl:use-attribute-sets="table-fmt-fn-label-style" role="SKIP">
|
5970
|
+
<xsl:call-template name="refine_table-fmt-fn-label-style"/>
|
5971
|
+
<xsl:apply-templates/>
|
5972
|
+
</fo:inline>
|
5973
|
+
</xsl:template>
|
5974
|
+
|
5975
|
+
<!-- <xsl:template match="*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']"/> -->
|
5976
|
+
<!--
|
5898
5977
|
<xsl:template name="create_fn">
|
5899
5978
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
5900
|
-
<xsl:if test="ancestor::*[local-name()='table'][1]/@id">
|
5979
|
+
<xsl:if test="ancestor::*[local-name()='table'][1]/@id"> - for footnotes in tables -
|
5901
5980
|
<xsl:attribute name="id">
|
5902
5981
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
5903
5982
|
</xsl:attribute>
|
5904
5983
|
</xsl:if>
|
5905
|
-
|
5906
|
-
|
5984
|
+
<xsl:if test="$namespace = 'itu'">
|
5985
|
+
<xsl:if test="ancestor::*[local-name()='preface']">
|
5986
|
+
<xsl:attribute name="preface">true</xsl:attribute>
|
5987
|
+
</xsl:if>
|
5988
|
+
</xsl:if>
|
5989
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
5990
|
+
<xsl:attribute name="id">
|
5991
|
+
<xsl:value-of select="@reference"/>
|
5992
|
+
<xsl:text>_</xsl:text>
|
5993
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
5994
|
+
</xsl:attribute>
|
5995
|
+
</xsl:if>
|
5996
|
+
<xsl:apply-templates />
|
5907
5997
|
</fn>
|
5908
|
-
</xsl:template>
|
5998
|
+
</xsl:template> -->
|
5909
5999
|
|
5910
6000
|
<!-- footnotes for table's name rendering -->
|
5911
6001
|
<xsl:template name="table_name_fn_display">
|
@@ -5924,123 +6014,171 @@
|
|
5924
6014
|
<!-- ============================ -->
|
5925
6015
|
<!-- figure's footnotes rendering -->
|
5926
6016
|
<!-- ============================ -->
|
5927
|
-
<xsl:template name="fn_display_figure"> <!-- figure_fn_display -->
|
5928
6017
|
|
5929
|
-
|
5930
|
-
|
5931
|
-
|
5932
|
-
|
5933
|
-
|
5934
|
-
<xsl:variable name="figure_id" select="normalize-space($figure_id_)"/>
|
6018
|
+
<!-- figure/fmt-footnote-container -->
|
6019
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-footnote-container']"/>
|
6020
|
+
|
6021
|
+
<!-- TO DO: remove, now the figure fn in figure/dl/... https://github.com/metanorma/isodoc/issues/658 -->
|
6022
|
+
<xsl:template name="figure_fn_display">
|
5935
6023
|
|
5936
|
-
<!-- all footnotes relates to the current figure -->
|
5937
6024
|
<xsl:variable name="references">
|
5938
|
-
<xsl:for-each select="
|
5939
|
-
<
|
5940
|
-
|
5941
|
-
|
6025
|
+
<xsl:for-each select="./*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
|
6026
|
+
<xsl:variable name="curr_id" select="@id"/>
|
6027
|
+
<!-- <curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
6028
|
+
<curr><xsl:copy-of select="."/></curr>
|
6029
|
+
<ancestor><xsl:copy-of select="ancestor::*[local-name() = 'figure'][.//*[local-name() = 'name'][.//*[local-name() = 'fn']]]"/></ancestor> -->
|
6030
|
+
<xsl:choose>
|
6031
|
+
<!-- skip figure/name/fn -->
|
6032
|
+
<xsl:when test="ancestor::*[local-name() = 'figure'][.//*[local-name() = 'name'][.//*[local-name() = 'fn'][@target = $curr_id]]]"><!-- skip --></xsl:when>
|
6033
|
+
<xsl:otherwise>
|
6034
|
+
<xsl:element name="figure" namespace="{$namespace_full}">
|
6035
|
+
<xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
|
6036
|
+
<xsl:copy-of select="."/>
|
6037
|
+
</xsl:element>
|
6038
|
+
</xsl:element>
|
6039
|
+
</xsl:otherwise>
|
6040
|
+
</xsl:choose>
|
5942
6041
|
</xsl:for-each>
|
5943
6042
|
</xsl:variable>
|
6043
|
+
<!-- <references><xsl:copy-of select="$references"/></references> -->
|
5944
6044
|
|
5945
|
-
<xsl:if test="xalan:nodeset($references)
|
6045
|
+
<xsl:if test="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
|
5946
6046
|
|
5947
6047
|
<xsl:variable name="key_iso">
|
5948
6048
|
true
|
5949
6049
|
</xsl:variable>
|
5950
6050
|
|
5951
6051
|
<fo:block>
|
6052
|
+
<!-- current hierarchy is 'figure' element -->
|
6053
|
+
<xsl:variable name="following_dl_colwidths">
|
6054
|
+
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
6055
|
+
<xsl:variable name="simple-table">
|
6056
|
+
<!-- <xsl:variable name="doc_ns">
|
6057
|
+
<xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
|
6058
|
+
</xsl:variable>
|
6059
|
+
<xsl:variable name="ns">
|
6060
|
+
<xsl:choose>
|
6061
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
6062
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
6063
|
+
</xsl:when>
|
6064
|
+
<xsl:otherwise>
|
6065
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
6066
|
+
</xsl:otherwise>
|
6067
|
+
</xsl:choose>
|
6068
|
+
</xsl:variable> -->
|
5952
6069
|
|
5953
|
-
<!-- current hierarchy is 'figure' element -->
|
5954
|
-
<xsl:variable name="following_dl_colwidths">
|
5955
|
-
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
5956
|
-
<xsl:variable name="simple-table">
|
5957
|
-
<!-- <xsl:variable name="doc_ns">
|
5958
|
-
<xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
|
5959
|
-
</xsl:variable>
|
5960
|
-
<xsl:variable name="ns">
|
5961
|
-
<xsl:choose>
|
5962
|
-
<xsl:when test="normalize-space($doc_ns) != ''">
|
5963
|
-
<xsl:value-of select="normalize-space($doc_ns)"/>
|
5964
|
-
</xsl:when>
|
5965
|
-
<xsl:otherwise>
|
5966
|
-
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
5967
|
-
</xsl:otherwise>
|
5968
|
-
</xsl:choose>
|
5969
|
-
</xsl:variable> -->
|
5970
|
-
|
5971
|
-
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
5972
|
-
<tbody>
|
5973
|
-
<xsl:apply-templates mode="dl"/>
|
5974
|
-
</tbody>
|
5975
|
-
</xsl:for-each>
|
5976
|
-
</xsl:variable>
|
5977
|
-
|
5978
|
-
<xsl:call-template name="calculate-column-widths">
|
5979
|
-
<xsl:with-param name="cols-count" select="2"/>
|
5980
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
5981
|
-
</xsl:call-template>
|
5982
|
-
|
5983
|
-
</xsl:if>
|
5984
|
-
</xsl:variable>
|
5985
|
-
|
5986
|
-
<xsl:variable name="maxlength_dt">
|
5987
6070
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
5988
|
-
<
|
6071
|
+
<tbody>
|
6072
|
+
<xsl:apply-templates mode="dl"/>
|
6073
|
+
</tbody>
|
5989
6074
|
</xsl:for-each>
|
5990
6075
|
</xsl:variable>
|
5991
6076
|
|
5992
|
-
<
|
5993
|
-
<xsl:
|
5994
|
-
|
6077
|
+
<xsl:call-template name="calculate-column-widths">
|
6078
|
+
<xsl:with-param name="cols-count" select="2"/>
|
6079
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
6080
|
+
</xsl:call-template>
|
5995
6081
|
|
5996
|
-
|
6082
|
+
</xsl:if>
|
6083
|
+
</xsl:variable>
|
5997
6084
|
|
5998
|
-
|
5999
|
-
|
6000
|
-
|
6001
|
-
|
6002
|
-
|
6003
|
-
|
6004
|
-
|
6005
|
-
|
6006
|
-
|
6007
|
-
|
6008
|
-
|
6009
|
-
|
6010
|
-
|
6011
|
-
|
6012
|
-
|
6013
|
-
|
6014
|
-
|
6015
|
-
|
6016
|
-
|
6017
|
-
|
6018
|
-
|
6019
|
-
|
6020
|
-
|
6085
|
+
<xsl:variable name="maxlength_dt">
|
6086
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
6087
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
6088
|
+
</xsl:for-each>
|
6089
|
+
</xsl:variable>
|
6090
|
+
|
6091
|
+
<fo:table width="95%" table-layout="fixed">
|
6092
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
6093
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
6094
|
+
|
6095
|
+
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
6096
|
+
|
6097
|
+
</xsl:if>
|
6098
|
+
<xsl:choose>
|
6099
|
+
<!-- if there 'dl', then set same columns width -->
|
6100
|
+
<xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
|
6101
|
+
<xsl:call-template name="setColumnWidth_dl">
|
6102
|
+
<xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
|
6103
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
6104
|
+
</xsl:call-template>
|
6105
|
+
</xsl:when>
|
6106
|
+
<xsl:otherwise>
|
6107
|
+
<fo:table-column column-width="5%"/>
|
6108
|
+
<fo:table-column column-width="95%"/>
|
6109
|
+
</xsl:otherwise>
|
6110
|
+
</xsl:choose>
|
6111
|
+
<fo:table-body>
|
6112
|
+
<!-- <xsl:for-each select="xalan:nodeset($references)//fn"> -->
|
6113
|
+
<xsl:for-each select="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
|
6114
|
+
|
6115
|
+
<xsl:variable name="reference" select="@reference"/>
|
6116
|
+
<!-- <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
|
6117
|
+
<fo:table-row>
|
6118
|
+
<fo:table-cell>
|
6119
|
+
<fo:block>
|
6120
|
+
|
6121
|
+
<fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
|
6122
|
+
<!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
|
6123
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
6124
|
+
<xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
|
6021
6125
|
</fo:inline>
|
6022
|
-
</fo:block>
|
6023
|
-
</fo:table-cell>
|
6024
|
-
<fo:table-cell>
|
6025
|
-
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
6026
|
-
<xsl:if test="normalize-space($key_iso) = 'true'">
|
6027
6126
|
|
6028
|
-
|
6029
|
-
|
6030
|
-
|
6031
|
-
|
6032
|
-
|
6033
|
-
|
6034
|
-
|
6035
|
-
</fo:table-body>
|
6036
|
-
</fo:table>
|
6127
|
+
</fo:block>
|
6128
|
+
</fo:table-cell>
|
6129
|
+
<fo:table-cell>
|
6130
|
+
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
6131
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
6132
|
+
|
6133
|
+
</xsl:if>
|
6037
6134
|
|
6135
|
+
<!-- <xsl:copy-of select="./node()"/> -->
|
6136
|
+
<xsl:apply-templates/>
|
6137
|
+
</fo:block>
|
6138
|
+
</fo:table-cell>
|
6139
|
+
</fo:table-row>
|
6140
|
+
<!-- </xsl:if> -->
|
6141
|
+
</xsl:for-each>
|
6142
|
+
</fo:table-body>
|
6143
|
+
</fo:table>
|
6038
6144
|
</fo:block>
|
6039
6145
|
</xsl:if>
|
6040
|
-
</xsl:template> <!--
|
6146
|
+
</xsl:template> <!-- figure_fn_display -->
|
6147
|
+
|
6148
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"> <!-- *[local-name() = 'fmt-footnote-container']/ -->
|
6149
|
+
<xsl:param name="process">false</xsl:param>
|
6150
|
+
<xsl:if test="$process = 'true'">
|
6151
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
6152
|
+
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
6153
|
+
|
6154
|
+
<!-- tab is padding-right -->
|
6155
|
+
<xsl:apply-templates select=".//*[local-name() = 'tab']">
|
6156
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
6157
|
+
</xsl:apply-templates>
|
6158
|
+
|
6159
|
+
<xsl:apply-templates/>
|
6160
|
+
|
6161
|
+
</fo:inline>
|
6162
|
+
</xsl:if>
|
6163
|
+
</xsl:template> <!-- figure//fmt-fn-body//fmt-fn-label -->
|
6164
|
+
|
6165
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']" priority="5">
|
6166
|
+
<xsl:param name="process">false</xsl:param>
|
6167
|
+
<xsl:if test="$process = 'true'">
|
6168
|
+
|
6169
|
+
</xsl:if>
|
6170
|
+
</xsl:template>
|
6171
|
+
|
6172
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'sup']" priority="5">
|
6173
|
+
<fo:inline xsl:use-attribute-sets="figure-fmt-fn-label-style" role="SKIP">
|
6174
|
+
<xsl:call-template name="refine_figure-fmt-fn-label-style"/>
|
6175
|
+
<xsl:apply-templates/>
|
6176
|
+
</fo:inline>
|
6177
|
+
</xsl:template>
|
6041
6178
|
|
6042
6179
|
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
6043
6180
|
<!-- figure's footnote label -->
|
6181
|
+
<!-- figure/dl[@key = 'true']/dt/p/sup -->
|
6044
6182
|
<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">
|
6045
6183
|
<xsl:variable name="key_iso">
|
6046
6184
|
true
|
@@ -6051,7 +6189,7 @@
|
|
6051
6189
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
6052
6190
|
|
6053
6191
|
</xsl:if>
|
6054
|
-
<fo:inline xsl:use-attribute-sets="figure-fn-number-style"> <!-- id="{@id}" -->
|
6192
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
|
6055
6193
|
<!-- <xsl:value-of select="@reference"/> -->
|
6056
6194
|
<xsl:apply-templates/>
|
6057
6195
|
</fo:inline>
|
@@ -6061,38 +6199,65 @@
|
|
6061
6199
|
<!-- END: figure's footnotes rendering -->
|
6062
6200
|
<!-- ============================ -->
|
6063
6201
|
|
6064
|
-
<!-- fn reference in the
|
6202
|
+
<!-- fn reference in the table rendering (for instance, 'some text 1) some text' ) -->
|
6203
|
+
<!-- fn --> <!-- in table --> <!-- for figure see <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/> -->
|
6065
6204
|
<xsl:template match="*[local-name()='fn']">
|
6066
6205
|
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
6067
6206
|
|
6068
6207
|
<xsl:call-template name="refine_fn-reference-style"/>
|
6069
6208
|
|
6070
|
-
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
6071
|
-
|
6072
|
-
|
6209
|
+
<!-- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> --> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
6210
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
6211
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
6212
|
+
<!-- <xsl:attribute name="internal-destination">
|
6073
6213
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
6074
6214
|
</xsl:attribute>
|
6075
6215
|
</xsl:if>
|
6216
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
6217
|
+
<xsl:attribute name="internal-destination">
|
6218
|
+
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
6219
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
6220
|
+
</xsl:attribute>
|
6221
|
+
</xsl:if> -->
|
6222
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
6223
|
+
<xsl:text>※</xsl:text>
|
6224
|
+
</xsl:if> -->
|
6225
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
6076
6226
|
|
6077
|
-
|
6227
|
+
<xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
|
6078
6228
|
|
6229
|
+
<!-- <xsl:if test="$namespace = 'bsi'">
|
6230
|
+
<xsl:text>)</xsl:text>
|
6231
|
+
</xsl:if> -->
|
6079
6232
|
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
6080
6233
|
<!-- <xsl:if test="$namespace = 'jis'">
|
6081
6234
|
<fo:inline font-weight="normal">)</fo:inline>
|
6082
6235
|
</xsl:if> -->
|
6083
6236
|
</fo:basic-link>
|
6084
6237
|
</fo:inline>
|
6085
|
-
</xsl:template>
|
6238
|
+
</xsl:template> <!-- fn -->
|
6086
6239
|
|
6240
|
+
<!-- fn/text() -->
|
6087
6241
|
<xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
6088
6242
|
<fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
|
6089
6243
|
</xsl:template>
|
6090
6244
|
|
6091
|
-
|
6245
|
+
<!-- fn//p fmt-fn-body//p -->
|
6246
|
+
<xsl:template match="*[local-name()='fn']//*[local-name()='p'] | *[local-name() = 'fmt-fn-body']//*[local-name()='p']">
|
6092
6247
|
<fo:inline role="P">
|
6093
6248
|
<xsl:apply-templates/>
|
6094
6249
|
</fo:inline>
|
6095
6250
|
</xsl:template>
|
6251
|
+
|
6252
|
+
<xsl:template name="insertFootnoteSeparatorCommon">
|
6253
|
+
<xsl:param name="leader_length">30%</xsl:param>
|
6254
|
+
<fo:static-content flow-name="xsl-footnote-separator">
|
6255
|
+
<fo:block>
|
6256
|
+
<fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
|
6257
|
+
</fo:block>
|
6258
|
+
</fo:static-content>
|
6259
|
+
</xsl:template>
|
6260
|
+
|
6096
6261
|
<!-- ===================== -->
|
6097
6262
|
<!-- END Footnotes processing -->
|
6098
6263
|
<!-- ===================== -->
|
@@ -6376,11 +6541,11 @@
|
|
6376
6541
|
<xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
|
6377
6542
|
<!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
|
6378
6543
|
|
6379
|
-
|
6380
|
-
|
6381
|
-
|
6382
|
-
|
6383
|
-
|
6544
|
+
<xsl:call-template name="setColumnWidth_dl">
|
6545
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
6546
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
6547
|
+
<xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
|
6548
|
+
</xsl:call-template>
|
6384
6549
|
|
6385
6550
|
<fo:table-body>
|
6386
6551
|
|
@@ -6414,6 +6579,14 @@
|
|
6414
6579
|
|
6415
6580
|
</xsl:template> <!-- END: dl -->
|
6416
6581
|
|
6582
|
+
<xsl:template match="@*|node()" mode="dt_clean">
|
6583
|
+
<xsl:copy>
|
6584
|
+
<xsl:apply-templates select="@*|node()" mode="dt_clean"/>
|
6585
|
+
</xsl:copy>
|
6586
|
+
</xsl:template>
|
6587
|
+
|
6588
|
+
<xsl:template match="*[local-name() = 'asciimath']" mode="dt_clean"/>
|
6589
|
+
|
6417
6590
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
6418
6591
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
6419
6592
|
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
@@ -6448,10 +6621,12 @@
|
|
6448
6621
|
<!-- ignore 'p' with 'where' in formula, before 'dl' -->
|
6449
6622
|
<xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
|
6450
6623
|
|
6624
|
+
<!-- dl/name -->
|
6451
6625
|
<xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
|
6452
6626
|
<xsl:param name="process">false</xsl:param>
|
6453
6627
|
<xsl:if test="$process = 'true'">
|
6454
6628
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
6629
|
+
|
6455
6630
|
<xsl:apply-templates/>
|
6456
6631
|
</fo:block>
|
6457
6632
|
</xsl:if>
|
@@ -6465,6 +6640,10 @@
|
|
6465
6640
|
<!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
|
6466
6641
|
|
6467
6642
|
<xsl:choose>
|
6643
|
+
<!-- <xsl:when test="@class = 'formula_dl' and local-name(..) = 'figure'">
|
6644
|
+
<fo:table-column column-width="10%"/>
|
6645
|
+
<fo:table-column column-width="90%"/>
|
6646
|
+
</xsl:when> -->
|
6468
6647
|
<xsl:when test="xalan:nodeset($colwidths)/autolayout">
|
6469
6648
|
<xsl:call-template name="insertTableColumnWidth">
|
6470
6649
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
@@ -8659,6 +8838,27 @@
|
|
8659
8838
|
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
8660
8839
|
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
8661
8840
|
</xsl:when> -->
|
8841
|
+
|
8842
|
+
<!-- <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'))">
|
8843
|
+
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
8844
|
+
<xsl:variable name="filename">
|
8845
|
+
<xsl:call-template name="substring-after-last">
|
8846
|
+
<xsl:with-param name="value" select="$target_"/>
|
8847
|
+
<xsl:with-param name="delimiter" select="'/'"/>
|
8848
|
+
</xsl:call-template>
|
8849
|
+
</xsl:variable>
|
8850
|
+
<xsl:variable name="target_filepath" select="concat($inputxml_basepath, @target)"/>
|
8851
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($target_filepath)))"/>
|
8852
|
+
<xsl:choose>
|
8853
|
+
<xsl:when test="$file_exists = 'true'">
|
8854
|
+
<xsl:value-of select="concat('url(embedded-file:', $filename, ')')"/>
|
8855
|
+
</xsl:when>
|
8856
|
+
<xsl:otherwise>
|
8857
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
8858
|
+
</xsl:otherwise>
|
8859
|
+
</xsl:choose>
|
8860
|
+
</xsl:when> -->
|
8861
|
+
|
8662
8862
|
<xsl:otherwise>
|
8663
8863
|
<xsl:value-of select="normalize-space(@target)"/>
|
8664
8864
|
</xsl:otherwise>
|
@@ -8963,7 +9163,7 @@
|
|
8963
9163
|
|
8964
9164
|
<xsl:template name="refine_note_block_style">
|
8965
9165
|
|
8966
|
-
</xsl:template>
|
9166
|
+
</xsl:template> <!-- refine_note_block_style -->
|
8967
9167
|
|
8968
9168
|
<xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
8969
9169
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
@@ -9155,10 +9355,21 @@
|
|
9155
9355
|
</xsl:template>
|
9156
9356
|
|
9157
9357
|
<xsl:template name="showFigureKey">
|
9158
|
-
<xsl:for-each select="*[local-name() = 'note'
|
9159
|
-
<xsl:
|
9358
|
+
<xsl:for-each select="*[(local-name() = 'note' and not(@type = 'units')) or local-name() = 'example']">
|
9359
|
+
<xsl:choose>
|
9360
|
+
<xsl:when test="local-name() = 'note'">
|
9361
|
+
<xsl:call-template name="note"/>
|
9362
|
+
</xsl:when>
|
9363
|
+
<xsl:when test="local-name() = 'example'">
|
9364
|
+
<xsl:call-template name="example"/>
|
9365
|
+
</xsl:when>
|
9366
|
+
<xsl:otherwise>
|
9367
|
+
<xsl:apply-templates select="."/>
|
9368
|
+
</xsl:otherwise>
|
9369
|
+
</xsl:choose>
|
9160
9370
|
</xsl:for-each>
|
9161
|
-
|
9371
|
+
<!-- TO DO: remove, now the figure fn in figure/dl/... https://github.com/metanorma/isodoc/issues/658 -->
|
9372
|
+
<xsl:call-template name="figure_fn_display"/>
|
9162
9373
|
</xsl:template>
|
9163
9374
|
|
9164
9375
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
@@ -10054,10 +10265,10 @@
|
|
10054
10265
|
<xsl:when test="@type = 'section-title'">
|
10055
10266
|
<xsl:value-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/preceding-sibling::node()"/>
|
10056
10267
|
<xsl:text>: </xsl:text>
|
10057
|
-
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name = 'fmt-xref-label')]"/>
|
10268
|
+
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name() = 'fmt-xref-label')]"/>
|
10058
10269
|
</xsl:when>
|
10059
10270
|
<xsl:otherwise>
|
10060
|
-
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name = 'fmt-xref-label')]"/>
|
10271
|
+
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name() = 'fmt-xref-label')]"/>
|
10061
10272
|
</xsl:otherwise>
|
10062
10273
|
</xsl:choose>
|
10063
10274
|
</xsl:when>
|
@@ -10399,9 +10610,15 @@
|
|
10399
10610
|
</xsl:if>
|
10400
10611
|
</xsl:template>
|
10401
10612
|
|
10613
|
+
<!-- figure/fn -->
|
10402
10614
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
|
10403
|
-
|
10615
|
+
<!-- figure/note -->
|
10616
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
|
10617
|
+
<!-- figure/example -->
|
10618
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
|
10404
10619
|
|
10620
|
+
<!-- figure/note[@type = 'units'] -->
|
10621
|
+
<!-- image/note[@type = 'units'] -->
|
10405
10622
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note'][@type = 'units'] | *[local-name() = 'image']/*[local-name() = 'note'][@type = 'units']" priority="2">
|
10406
10623
|
<fo:block text-align="right" keep-with-next="always">
|
10407
10624
|
<xsl:apply-templates/>
|
@@ -10522,6 +10739,7 @@
|
|
10522
10739
|
</xsl:choose>
|
10523
10740
|
</xsl:template>
|
10524
10741
|
|
10742
|
+
<!-- fn -->
|
10525
10743
|
<xsl:template match="*[local-name() = 'fn']" mode="contents"/>
|
10526
10744
|
<xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/>
|
10527
10745
|
|
@@ -11419,7 +11637,7 @@
|
|
11419
11637
|
text line 1
|
11420
11638
|
text line 2
|
11421
11639
|
-->
|
11422
|
-
<xsl:template match="*[local-name() = 'example']">
|
11640
|
+
<xsl:template match="*[local-name() = 'example']" name="example">
|
11423
11641
|
|
11424
11642
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
11425
11643
|
|
@@ -11531,6 +11749,7 @@
|
|
11531
11749
|
|
11532
11750
|
</xsl:template>
|
11533
11751
|
|
11752
|
+
<!-- example/name -->
|
11534
11753
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
|
11535
11754
|
<xsl:param name="fo_element">block</xsl:param>
|
11536
11755
|
|
@@ -11556,7 +11775,8 @@
|
|
11556
11775
|
|
11557
11776
|
</xsl:template>
|
11558
11777
|
|
11559
|
-
|
11778
|
+
<!-- table/example/name, table/tfoot//example/name -->
|
11779
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'example']/*[local-name() = 'name']">
|
11560
11780
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
11561
11781
|
|
11562
11782
|
<xsl:apply-templates/>
|
@@ -13198,8 +13418,33 @@
|
|
13198
13418
|
|
13199
13419
|
<xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
13200
13420
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13421
|
+
<!-- New format: one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13422
|
+
<!-- <test><xsl:copy-of select="."/></test> -->
|
13423
|
+
|
13201
13424
|
<xsl:variable name="target" select="@target"/>
|
13425
|
+
|
13202
13426
|
<xsl:for-each select="*[local-name() = 'tab']">
|
13427
|
+
|
13428
|
+
<xsl:if test="position() = 1">
|
13429
|
+
<!-- first column (data before first `tab`) -->
|
13430
|
+
<fo:table-cell>
|
13431
|
+
<fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
|
13432
|
+
<xsl:call-template name="insert_basic_link">
|
13433
|
+
<xsl:with-param name="element">
|
13434
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
13435
|
+
<xsl:for-each select="preceding-sibling::node()">
|
13436
|
+
<xsl:choose>
|
13437
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
13438
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
13439
|
+
</xsl:choose>
|
13440
|
+
</xsl:for-each>
|
13441
|
+
</fo:basic-link>
|
13442
|
+
</xsl:with-param>
|
13443
|
+
</xsl:call-template>
|
13444
|
+
</fo:block>
|
13445
|
+
</fo:table-cell>
|
13446
|
+
</xsl:if>
|
13447
|
+
|
13203
13448
|
<xsl:variable name="current_id" select="generate-id()"/>
|
13204
13449
|
<fo:table-cell>
|
13205
13450
|
<fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
|
@@ -13250,11 +13495,25 @@
|
|
13250
13495
|
|
13251
13496
|
<xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
13252
13497
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13498
|
+
<!-- New format - one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13253
13499
|
<xsl:for-each select="*[local-name() = 'tab']">
|
13500
|
+
<xsl:if test="position() = 1">
|
13501
|
+
<td>
|
13502
|
+
<xsl:for-each select="preceding-sibling::node()">
|
13503
|
+
<xsl:choose>
|
13504
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
13505
|
+
<xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
|
13506
|
+
</xsl:choose>
|
13507
|
+
</xsl:for-each>
|
13508
|
+
</td>
|
13509
|
+
</xsl:if>
|
13254
13510
|
<xsl:variable name="current_id" select="generate-id()"/>
|
13255
13511
|
<td>
|
13256
13512
|
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
13257
|
-
<xsl:
|
13513
|
+
<xsl:choose>
|
13514
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
13515
|
+
<xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
|
13516
|
+
</xsl:choose>
|
13258
13517
|
</xsl:for-each>
|
13259
13518
|
</td>
|
13260
13519
|
</xsl:for-each>
|
@@ -13328,9 +13587,9 @@
|
|
13328
13587
|
|
13329
13588
|
<fo:block text-align="justify">
|
13330
13589
|
<fo:inline>
|
13331
|
-
<xsl:call-template name="displayAdmonitionName"
|
13332
|
-
<xsl:with-param name="sep"> – </xsl:with-param>
|
13333
|
-
</xsl:call-template>
|
13590
|
+
<xsl:call-template name="displayAdmonitionName"/>
|
13591
|
+
<!-- <xsl:with-param name="sep"> – </xsl:with-param>
|
13592
|
+
</xsl:call-template> -->
|
13334
13593
|
</fo:inline>
|
13335
13594
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
13336
13595
|
</fo:block>
|
@@ -14647,6 +14906,7 @@
|
|
14647
14906
|
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
14648
14907
|
</fn>
|
14649
14908
|
-->
|
14909
|
+
<!-- fn in text -->
|
14650
14910
|
<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">
|
14651
14911
|
<xsl:variable name="p_fn_">
|
14652
14912
|
<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>
|
@@ -75,14 +75,6 @@
|
|
75
75
|
</choice>
|
76
76
|
</element>
|
77
77
|
</define>
|
78
|
-
<define name="organization">
|
79
|
-
<element name="organization">
|
80
|
-
<choice>
|
81
|
-
<ref name="OrganizationType"/>
|
82
|
-
<ref name="IsoOrganizationType"/>
|
83
|
-
</choice>
|
84
|
-
</element>
|
85
|
-
</define>
|
86
78
|
<define name="DocumentType">
|
87
79
|
<choice>
|
88
80
|
<value>international-standard</value>
|
@@ -259,18 +251,4 @@
|
|
259
251
|
</zeroOrMore>
|
260
252
|
</element>
|
261
253
|
</define>
|
262
|
-
<define name="IsoOrganizationType">
|
263
|
-
<optional>
|
264
|
-
<ref name="technical-committee"/>
|
265
|
-
</optional>
|
266
|
-
<optional>
|
267
|
-
<ref name="subcommittee"/>
|
268
|
-
</optional>
|
269
|
-
<optional>
|
270
|
-
<ref name="workgroup"/>
|
271
|
-
</optional>
|
272
|
-
<optional>
|
273
|
-
<ref name="secretariat"/>
|
274
|
-
</optional>
|
275
|
-
</define>
|
276
254
|
</grammar>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iec
|
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: bin
|
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-iso
|