metanorma-itu 1.4.0.1 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/itu/converter.rb +4 -7
- data/lib/asciidoctor/itu/isodoc.rng +68 -18
- data/lib/asciidoctor/itu/validate.rb +1 -1
- data/lib/isodoc/itu/cleanup.rb +1 -1
- data/lib/isodoc/itu/html/htmlstyle.css +1 -1
- data/lib/isodoc/itu/html/htmlstyle.scss +1 -1
- data/lib/isodoc/itu/html/itu.css +0 -1
- data/lib/isodoc/itu/html/itu.scss +0 -1
- data/lib/isodoc/itu/html/scripts.html +0 -1
- data/lib/isodoc/itu/itu.implementers-guide.xsl +308 -111
- data/lib/isodoc/itu/itu.in-force.xsl +308 -111
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +308 -111
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +308 -111
- data/lib/isodoc/itu/itu.recommendation.xsl +308 -111
- data/lib/isodoc/itu/itu.resolution.xsl +308 -111
- data/lib/isodoc/itu/itu.service-publication.xsl +308 -111
- data/lib/isodoc/itu/itu.technical-paper.xsl +308 -111
- data/lib/isodoc/itu/itu.technical-report.xsl +308 -111
- data/lib/isodoc/itu/metadata.rb +13 -15
- data/lib/isodoc/itu/xref.rb +33 -24
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +2 -2
- metadata +10 -10
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
|
12
|
-
<xsl:key name="kfn" match="
|
12
|
+
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
|
13
13
|
|
14
14
|
|
15
15
|
|
@@ -1015,7 +1015,7 @@
|
|
1015
1015
|
<xsl:if test="@level = 1">
|
1016
1016
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1017
1017
|
</xsl:if>
|
1018
|
-
<xsl:if test="@level
|
1018
|
+
<xsl:if test="@level >= 2">
|
1019
1019
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1020
1020
|
<!-- <xsl:attribute name="margin-left">12mm</xsl:attribute> -->
|
1021
1021
|
</xsl:if>
|
@@ -1031,15 +1031,15 @@
|
|
1031
1031
|
<xsl:otherwise>12mm</xsl:otherwise>
|
1032
1032
|
</xsl:choose>
|
1033
1033
|
</xsl:if>
|
1034
|
-
<xsl:if test="@level
|
1034
|
+
<xsl:if test="@level >= 2"><xsl:value-of select="(@level - 1) * 26"/>mm</xsl:if>
|
1035
1035
|
</xsl:when> <!-- -->
|
1036
1036
|
<xsl:otherwise>0mm</xsl:otherwise>
|
1037
1037
|
</xsl:choose>
|
1038
1038
|
</xsl:attribute>
|
1039
1039
|
<fo:list-item>
|
1040
1040
|
<fo:list-item-label end-indent="label-end()">
|
1041
|
-
<xsl:if test="@level
|
1042
|
-
<xsl:attribute name="start-indent"
|
1041
|
+
<xsl:if test="@level >= 2">
|
1042
|
+
<xsl:attribute name="start-indent"><xsl:value-of select="(@level - 1) * 12"/>mm</xsl:attribute>
|
1043
1043
|
</xsl:if>
|
1044
1044
|
<fo:block>
|
1045
1045
|
<xsl:if test="@section">
|
@@ -1258,7 +1258,7 @@
|
|
1258
1258
|
|
1259
1259
|
<xsl:variable name="display">
|
1260
1260
|
<xsl:choose>
|
1261
|
-
<xsl:when test="$level >
|
1261
|
+
<xsl:when test="$level > $toc_level">false</xsl:when>
|
1262
1262
|
<xsl:when test="$section = '' and $type = 'clause' and $level >= 2">false</xsl:when>
|
1263
1263
|
<xsl:otherwise>true</xsl:otherwise>
|
1264
1264
|
</xsl:choose>
|
@@ -1768,9 +1768,10 @@
|
|
1768
1768
|
<xsl:otherwise>5mm</xsl:otherwise>
|
1769
1769
|
</xsl:choose>
|
1770
1770
|
</xsl:attribute>
|
1771
|
-
<xsl:apply-templates select="ancestor::itu:term/itu:name" mode="presentation"/>
|
1771
|
+
<xsl:apply-templates select="ancestor::itu:term[1]/itu:name" mode="presentation"/>
|
1772
1772
|
</fo:inline>
|
1773
1773
|
<fo:inline font-weight="bold">
|
1774
|
+
<xsl:call-template name="setStyle_preferred"/>
|
1774
1775
|
<xsl:apply-templates/>
|
1775
1776
|
</fo:inline>
|
1776
1777
|
<xsl:if test="../itu:termsource/itu:origin">
|
@@ -1845,58 +1846,6 @@
|
|
1845
1846
|
</fo:footnote>
|
1846
1847
|
</xsl:template>
|
1847
1848
|
|
1848
|
-
<xsl:variable name="p_fn">
|
1849
|
-
<xsl:for-each select="//itu:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
1850
|
-
<!-- copy unique fn -->
|
1851
|
-
<fn gen_id="{generate-id(.)}">
|
1852
|
-
<xsl:copy-of select="@*"/>
|
1853
|
-
<xsl:copy-of select="node()"/>
|
1854
|
-
</fn>
|
1855
|
-
</xsl:for-each>
|
1856
|
-
</xsl:variable>
|
1857
|
-
|
1858
|
-
<xsl:template match="itu:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']]" priority="2">
|
1859
|
-
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
1860
|
-
<xsl:variable name="reference" select="@reference"/>
|
1861
|
-
<xsl:variable name="number">
|
1862
|
-
<!-- <xsl:number level="any" count="itu:p/itu:fn"/> -->
|
1863
|
-
<xsl:value-of select="count(xalan:nodeset($p_fn)//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
1864
|
-
</xsl:variable>
|
1865
|
-
<xsl:variable name="count_title_footnotes" select="count(/itu:itu-standard/itu:bibdata/itu:note[@type='title-footnote'])"/>
|
1866
|
-
<xsl:variable name="count_bibitem_notes" select="count(//itu:bibitem/itu:note)"/>
|
1867
|
-
<xsl:variable name="current_fn_number" select="$number + $count_title_footnotes + $count_bibitem_notes"/>
|
1868
|
-
<xsl:choose>
|
1869
|
-
<xsl:when test="xalan:nodeset($p_fn)//fn[@gen_id = $gen_id]">
|
1870
|
-
<fo:footnote>
|
1871
|
-
<fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
|
1872
|
-
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
1873
|
-
<xsl:value-of select="$current_fn_number"/>
|
1874
|
-
</fo:basic-link>
|
1875
|
-
</fo:inline>
|
1876
|
-
<fo:footnote-body>
|
1877
|
-
<fo:block font-size="11pt" margin-bottom="12pt" text-align="justify" font-style="normal" font-weight="normal">
|
1878
|
-
<xsl:if test="$doctype = 'service-publication'">
|
1879
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1880
|
-
</xsl:if>
|
1881
|
-
<fo:inline id="footnote_{@reference}_{$number}" font-size="85%" padding-right="2mm" keep-with-next.within-line="always" baseline-shift="30%">
|
1882
|
-
<xsl:value-of select="$current_fn_number"/>
|
1883
|
-
</fo:inline>
|
1884
|
-
<xsl:for-each select="itu:p">
|
1885
|
-
<xsl:apply-templates/>
|
1886
|
-
</xsl:for-each>
|
1887
|
-
</fo:block>
|
1888
|
-
</fo:footnote-body>
|
1889
|
-
</fo:footnote>
|
1890
|
-
</xsl:when>
|
1891
|
-
<xsl:otherwise>
|
1892
|
-
<fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
|
1893
|
-
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
1894
|
-
<xsl:value-of select="$current_fn_number"/>
|
1895
|
-
</fo:basic-link>
|
1896
|
-
</fo:inline>
|
1897
|
-
</xsl:otherwise>
|
1898
|
-
</xsl:choose>
|
1899
|
-
</xsl:template>
|
1900
1849
|
|
1901
1850
|
|
1902
1851
|
<xsl:template match="*[local-name()='tt']" priority="2">
|
@@ -2897,6 +2846,79 @@
|
|
2897
2846
|
|
2898
2847
|
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
2899
2848
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2849
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-style">
|
2850
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
2851
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-num-style">
|
2852
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
2853
|
+
|
2854
|
+
|
2855
|
+
|
2856
|
+
|
2857
|
+
|
2858
|
+
|
2859
|
+
|
2860
|
+
|
2861
|
+
|
2862
|
+
<xsl:attribute name="font-size">60%</xsl:attribute>
|
2863
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2864
|
+
|
2865
|
+
|
2866
|
+
|
2867
|
+
|
2868
|
+
|
2869
|
+
|
2870
|
+
|
2871
|
+
|
2872
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-style">
|
2873
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
2874
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
2875
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
2876
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
2877
|
+
|
2878
|
+
|
2879
|
+
|
2880
|
+
|
2881
|
+
|
2882
|
+
|
2883
|
+
|
2884
|
+
|
2885
|
+
|
2886
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
2887
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2888
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
2889
|
+
|
2890
|
+
|
2891
|
+
|
2892
|
+
|
2893
|
+
|
2894
|
+
|
2895
|
+
|
2896
|
+
|
2897
|
+
|
2898
|
+
|
2899
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
|
2900
|
+
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
2901
|
+
|
2902
|
+
|
2903
|
+
|
2904
|
+
|
2905
|
+
|
2906
|
+
|
2907
|
+
|
2908
|
+
|
2909
|
+
|
2910
|
+
<xsl:attribute name="font-size">85%</xsl:attribute>
|
2911
|
+
<xsl:attribute name="padding-right">2mm</xsl:attribute>
|
2912
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
2913
|
+
|
2914
|
+
|
2915
|
+
|
2916
|
+
|
2917
|
+
|
2918
|
+
|
2919
|
+
|
2920
|
+
|
2921
|
+
|
2900
2922
|
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
|
2901
2923
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2902
2924
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
@@ -2922,7 +2944,8 @@
|
|
2922
2944
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
2923
2945
|
|
2924
2946
|
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
2925
|
-
|
2947
|
+
|
2948
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
|
2926
2949
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2927
2950
|
<xsl:apply-templates select="." mode="contents"/>
|
2928
2951
|
</xsl:for-each>
|
@@ -2932,7 +2955,7 @@
|
|
2932
2955
|
<xsl:apply-templates select="." mode="contents"/>
|
2933
2956
|
</xsl:for-each>
|
2934
2957
|
|
2935
|
-
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2958
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2936
2959
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2937
2960
|
<xsl:apply-templates select="." mode="contents"/>
|
2938
2961
|
</xsl:for-each>
|
@@ -3895,6 +3918,106 @@
|
|
3895
3918
|
|
3896
3919
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
3897
3920
|
<xsl:apply-templates/>
|
3921
|
+
</xsl:template><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">
|
3922
|
+
|
3923
|
+
<!-- list of footnotes to calculate actual footnotes number -->
|
3924
|
+
<xsl:variable name="p_fn_">
|
3925
|
+
<xsl:choose>
|
3926
|
+
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
3927
|
+
<fn gen_id="{generate-id(.)}">
|
3928
|
+
<xsl:copy-of select="@*"/>
|
3929
|
+
<xsl:copy-of select="node()"/>
|
3930
|
+
</fn>
|
3931
|
+
</xsl:when>
|
3932
|
+
<xsl:otherwise>
|
3933
|
+
<!-- itetation for:
|
3934
|
+
footnotes in bibdata/title
|
3935
|
+
footnotes in bibliography
|
3936
|
+
footnotes in document's body (except table's head/body/foot and figure text)
|
3937
|
+
-->
|
3938
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
3939
|
+
<fn gen_id="{generate-id(.)}">
|
3940
|
+
<xsl:copy-of select="@*"/>
|
3941
|
+
<xsl:copy-of select="node()"/>
|
3942
|
+
</fn>
|
3943
|
+
</xsl:for-each>
|
3944
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
3945
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3946
|
+
<xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
3947
|
+
<!-- copy unique fn -->
|
3948
|
+
<fn gen_id="{generate-id(.)}">
|
3949
|
+
<xsl:copy-of select="@*"/>
|
3950
|
+
<xsl:copy-of select="node()"/>
|
3951
|
+
</fn>
|
3952
|
+
</xsl:for-each>
|
3953
|
+
</xsl:for-each>
|
3954
|
+
</xsl:otherwise>
|
3955
|
+
</xsl:choose>
|
3956
|
+
</xsl:variable>
|
3957
|
+
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
3958
|
+
|
3959
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
3960
|
+
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
3961
|
+
<xsl:variable name="reference" select="@reference"/>
|
3962
|
+
<!-- fn sequence number in document -->
|
3963
|
+
<xsl:variable name="current_fn_number">
|
3964
|
+
<xsl:choose>
|
3965
|
+
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
3966
|
+
<xsl:otherwise>
|
3967
|
+
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
3968
|
+
</xsl:otherwise>
|
3969
|
+
</xsl:choose>
|
3970
|
+
</xsl:variable>
|
3971
|
+
<xsl:variable name="current_fn_number_text">
|
3972
|
+
<xsl:value-of select="$current_fn_number"/>
|
3973
|
+
|
3974
|
+
|
3975
|
+
</xsl:variable>
|
3976
|
+
|
3977
|
+
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
3978
|
+
<xsl:variable name="footnote_inline">
|
3979
|
+
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
3980
|
+
|
3981
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
3982
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
3983
|
+
</fo:basic-link>
|
3984
|
+
</fo:inline>
|
3985
|
+
</xsl:variable>
|
3986
|
+
<!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
|
3987
|
+
gen_id=<xsl:value-of select="$gen_id"/> -->
|
3988
|
+
<xsl:choose>
|
3989
|
+
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
3990
|
+
<xsl:copy-of select="$footnote_inline"/>
|
3991
|
+
</xsl:when>
|
3992
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
3993
|
+
<fo:footnote xsl:use-attribute-sets="fn-style">
|
3994
|
+
<xsl:copy-of select="$footnote_inline"/>
|
3995
|
+
<fo:footnote-body>
|
3996
|
+
|
3997
|
+
<fo:block-container text-indent="0" start-indent="0">
|
3998
|
+
|
3999
|
+
|
4000
|
+
<fo:block xsl:use-attribute-sets="fn-body-style">
|
4001
|
+
|
4002
|
+
|
4003
|
+
<xsl:if test="$doctype = 'service-publication'">
|
4004
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
4005
|
+
</xsl:if>
|
4006
|
+
|
4007
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
4008
|
+
|
4009
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
4010
|
+
</fo:inline>
|
4011
|
+
<xsl:apply-templates/>
|
4012
|
+
</fo:block>
|
4013
|
+
</fo:block-container>
|
4014
|
+
</fo:footnote-body>
|
4015
|
+
</fo:footnote>
|
4016
|
+
</xsl:when>
|
4017
|
+
<xsl:otherwise>
|
4018
|
+
<xsl:copy-of select="$footnote_inline"/>
|
4019
|
+
</xsl:otherwise>
|
4020
|
+
</xsl:choose>
|
3898
4021
|
</xsl:template><xsl:template name="fn_display">
|
3899
4022
|
<xsl:variable name="references">
|
3900
4023
|
|
@@ -4106,6 +4229,8 @@
|
|
4106
4229
|
|
4107
4230
|
</fo:basic-link>
|
4108
4231
|
</fo:inline>
|
4232
|
+
</xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
4233
|
+
<fo:inline><xsl:value-of select="."/></fo:inline>
|
4109
4234
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
4110
4235
|
<fo:inline>
|
4111
4236
|
<xsl:apply-templates/>
|
@@ -4418,6 +4543,7 @@
|
|
4418
4543
|
</xsl:if>
|
4419
4544
|
|
4420
4545
|
<fo:block margin-top="6pt">
|
4546
|
+
<xsl:copy-of select="@id"/>
|
4421
4547
|
|
4422
4548
|
|
4423
4549
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
@@ -5114,22 +5240,6 @@
|
|
5114
5240
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
5115
5241
|
<xsl:apply-templates/>
|
5116
5242
|
</fo:inline>
|
5117
|
-
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
5118
|
-
<xsl:variable name="title-modified">
|
5119
|
-
|
5120
|
-
|
5121
|
-
<xsl:call-template name="getTitle">
|
5122
|
-
<xsl:with-param name="name" select="'title-modified'"/>
|
5123
|
-
</xsl:call-template>
|
5124
|
-
|
5125
|
-
</xsl:variable>
|
5126
|
-
|
5127
|
-
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
5128
|
-
<xsl:choose>
|
5129
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
5130
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
5131
|
-
</xsl:choose>
|
5132
|
-
<xsl:apply-templates/>
|
5133
5243
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
5134
5244
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
5135
5245
|
|
@@ -5267,14 +5377,18 @@
|
|
5267
5377
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
|
5268
5378
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5269
5379
|
</xsl:template><xsl:template match="*[local-name() = 'terms']">
|
5380
|
+
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
5270
5381
|
<fo:block id="{@id}">
|
5271
5382
|
<xsl:apply-templates/>
|
5272
5383
|
</fo:block>
|
5273
5384
|
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
5385
|
+
<!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
|
5274
5386
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
5275
5387
|
|
5276
5388
|
|
5277
|
-
|
5389
|
+
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
5390
|
+
|
5391
|
+
</xsl:if>
|
5278
5392
|
<xsl:apply-templates/>
|
5279
5393
|
</fo:block>
|
5280
5394
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
@@ -5698,12 +5812,12 @@
|
|
5698
5812
|
</xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
5699
5813
|
<xsl:apply-templates mode="contents"/>
|
5700
5814
|
<xsl:text> </xsl:text>
|
5701
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
5815
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
|
5702
5816
|
<xsl:apply-templates mode="bookmarks"/>
|
5703
5817
|
<xsl:text> </xsl:text>
|
5704
5818
|
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
5705
5819
|
<xsl:value-of select="."/>
|
5706
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
|
5820
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement' or local-name() = 'sourcecode']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
|
5707
5821
|
<xsl:value-of select="."/>
|
5708
5822
|
</xsl:template><xsl:template match="node()" mode="contents">
|
5709
5823
|
<xsl:apply-templates mode="contents"/>
|
@@ -5973,6 +6087,8 @@
|
|
5973
6087
|
|
5974
6088
|
|
5975
6089
|
|
6090
|
+
|
6091
|
+
|
5976
6092
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
5977
6093
|
<xsl:variable name="_font-size">
|
5978
6094
|
|
@@ -6006,13 +6122,17 @@
|
|
6006
6122
|
|
6007
6123
|
|
6008
6124
|
|
6125
|
+
|
6126
|
+
|
6009
6127
|
<xsl:apply-templates/>
|
6010
6128
|
</fo:block>
|
6011
|
-
|
6129
|
+
|
6012
6130
|
|
6013
6131
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
6014
6132
|
|
6015
6133
|
|
6134
|
+
|
6135
|
+
|
6016
6136
|
</fo:block-container>
|
6017
6137
|
</fo:block-container>
|
6018
6138
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -6248,7 +6368,8 @@
|
|
6248
6368
|
</fo:block>
|
6249
6369
|
</fo:table-cell>
|
6250
6370
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
6251
|
-
<fo:block font-size="11pt"
|
6371
|
+
<fo:block font-size="11pt">
|
6372
|
+
|
6252
6373
|
<xsl:apply-templates/>
|
6253
6374
|
</fo:block>
|
6254
6375
|
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
@@ -6358,43 +6479,69 @@
|
|
6358
6479
|
<xsl:variable name="termsource_text">
|
6359
6480
|
<xsl:apply-templates/>
|
6360
6481
|
</xsl:variable>
|
6361
|
-
|
6362
|
-
<xsl:choose>
|
6482
|
+
<xsl:copy-of select="$termsource_text"/>
|
6483
|
+
<!-- <xsl:choose>
|
6363
6484
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
6364
|
-
<!-- <xsl:apply-templates /> -->
|
6365
6485
|
<xsl:copy-of select="$termsource_text"/>
|
6366
6486
|
</xsl:when>
|
6367
|
-
<xsl:otherwise>
|
6368
|
-
|
6487
|
+
<xsl:otherwise>
|
6488
|
+
<xsl:if test="$namespace = 'bsi'">
|
6489
|
+
<xsl:choose>
|
6490
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
|
6491
|
+
<xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
|
6492
|
+
</xsl:choose>
|
6493
|
+
</xsl:if>
|
6494
|
+
<xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
|
6369
6495
|
<xsl:text>[</xsl:text>
|
6370
|
-
|
6371
|
-
<!-- <xsl:apply-templates /> -->
|
6496
|
+
</xsl:if>
|
6372
6497
|
<xsl:copy-of select="$termsource_text"/>
|
6373
|
-
|
6498
|
+
<xsl:if test="$namespace = 'bsi'">
|
6499
|
+
<xsl:choose>
|
6500
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
|
6501
|
+
<xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
|
6502
|
+
</xsl:choose>
|
6503
|
+
</xsl:if>
|
6504
|
+
<xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
|
6374
6505
|
<xsl:text>]</xsl:text>
|
6375
|
-
|
6506
|
+
</xsl:if>
|
6376
6507
|
</xsl:otherwise>
|
6377
|
-
</xsl:choose>
|
6508
|
+
</xsl:choose> -->
|
6378
6509
|
</fo:block>
|
6379
6510
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
6380
6511
|
<xsl:if test="normalize-space() != ''">
|
6381
6512
|
<xsl:value-of select="."/>
|
6382
6513
|
</xsl:if>
|
6383
|
-
</xsl:template><xsl:
|
6384
|
-
<
|
6385
|
-
|
6386
|
-
|
6387
|
-
|
6514
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
|
6515
|
+
<fo:inline>
|
6516
|
+
|
6517
|
+
|
6518
|
+
<xsl:value-of select="."/>
|
6519
|
+
</fo:inline>
|
6520
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
6388
6521
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
6389
6522
|
<xsl:if test="normalize-space(@citeas) = ''">
|
6390
6523
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
6391
6524
|
</xsl:if>
|
6392
|
-
|
6393
6525
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
6394
6526
|
<xsl:apply-templates/>
|
6395
6527
|
</fo:inline>
|
6528
|
+
</fo:basic-link>
|
6529
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
6530
|
+
<xsl:variable name="title-modified">
|
6396
6531
|
|
6397
|
-
|
6532
|
+
|
6533
|
+
<xsl:call-template name="getTitle">
|
6534
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
6535
|
+
</xsl:call-template>
|
6536
|
+
|
6537
|
+
</xsl:variable>
|
6538
|
+
|
6539
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
6540
|
+
<xsl:choose>
|
6541
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
6542
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
6543
|
+
</xsl:choose>
|
6544
|
+
<xsl:apply-templates/>
|
6398
6545
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
6399
6546
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
6400
6547
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
@@ -6437,12 +6584,20 @@
|
|
6437
6584
|
</xsl:template><xsl:template match="*[local-name() = 'author']">
|
6438
6585
|
<xsl:text>— </xsl:text>
|
6439
6586
|
<xsl:apply-templates/>
|
6440
|
-
</xsl:template><xsl:
|
6587
|
+
</xsl:template><xsl:variable name="bibitem_hidden_">
|
6588
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden='true']">
|
6589
|
+
<xsl:copy-of select="."/>
|
6590
|
+
</xsl:for-each>
|
6591
|
+
<xsl:for-each select="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem']">
|
6592
|
+
<xsl:copy-of select="."/>
|
6593
|
+
</xsl:for-each>
|
6594
|
+
</xsl:variable><xsl:variable name="bibitem_hidden" select="xalan:nodeset($bibitem_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
|
6441
6595
|
|
6442
6596
|
<xsl:variable name="bibitemid">
|
6443
6597
|
<xsl:choose>
|
6444
|
-
<xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"
|
6445
|
-
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"
|
6598
|
+
<!-- <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"></xsl:when>
|
6599
|
+
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"></xsl:when> -->
|
6600
|
+
<xsl:when test="$bibitem_hidden/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
6446
6601
|
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
6447
6602
|
</xsl:choose>
|
6448
6603
|
</xsl:variable>
|
@@ -6534,10 +6689,10 @@
|
|
6534
6689
|
</xsl:choose>
|
6535
6690
|
</xsl:variable>
|
6536
6691
|
|
6537
|
-
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
6692
|
+
<!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
|
6538
6693
|
|
6539
6694
|
<xsl:choose>
|
6540
|
-
<xsl:when test="$
|
6695
|
+
<xsl:when test="$lang = 'zh'">
|
6541
6696
|
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
6542
6697
|
</xsl:when>
|
6543
6698
|
<xsl:when test="../../@inline-header = 'true'">
|
@@ -6571,24 +6726,29 @@
|
|
6571
6726
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
6572
6727
|
<xsl:variable name="title-deprecated">
|
6573
6728
|
|
6574
|
-
|
6575
|
-
|
6576
|
-
<xsl:with-param name="name" select="'title-deprecated'"/>
|
6729
|
+
<xsl:call-template name="getLocalizedString">
|
6730
|
+
<xsl:with-param name="key">deprecated</xsl:with-param>
|
6577
6731
|
</xsl:call-template>
|
6578
6732
|
|
6733
|
+
|
6579
6734
|
</xsl:variable>
|
6580
6735
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
6581
6736
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
6582
6737
|
</fo:block>
|
6738
|
+
</xsl:template><xsl:template name="setStyle_preferred">
|
6739
|
+
<xsl:if test="*[local-name() = 'strong']">
|
6740
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
6741
|
+
</xsl:if>
|
6583
6742
|
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
6584
6743
|
<fo:block xsl:use-attribute-sets="definition-style">
|
6585
6744
|
<xsl:apply-templates/>
|
6586
6745
|
</fo:block>
|
6587
6746
|
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
|
6588
6747
|
<xsl:apply-templates/>
|
6589
|
-
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
|
6748
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
|
6590
6749
|
<fo:inline> <xsl:apply-templates/></fo:inline>
|
6591
|
-
<fo:block
|
6750
|
+
<!-- <fo:block> </fo:block> -->
|
6751
|
+
<fo:block/>
|
6592
6752
|
</xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
|
6593
6753
|
|
6594
6754
|
<fo:block>
|
@@ -6993,7 +7153,31 @@
|
|
6993
7153
|
<fo:block-container border="1pt solid black" width="50%">
|
6994
7154
|
<fo:block> </fo:block>
|
6995
7155
|
</fo:block-container>
|
6996
|
-
</xsl:template><xsl:
|
7156
|
+
</xsl:template><xsl:variable name="toc_level">
|
7157
|
+
<xsl:choose>
|
7158
|
+
<xsl:when test="1 = 2"/> <!-- to do https://github.com/metanorma/mn-native-pdf/issues/337: if there is value in xml -->
|
7159
|
+
<xsl:otherwise><!-- default value -->
|
7160
|
+
|
7161
|
+
|
7162
|
+
|
7163
|
+
|
7164
|
+
|
7165
|
+
|
7166
|
+
|
7167
|
+
2
|
7168
|
+
|
7169
|
+
|
7170
|
+
|
7171
|
+
|
7172
|
+
|
7173
|
+
|
7174
|
+
|
7175
|
+
|
7176
|
+
|
7177
|
+
|
7178
|
+
</xsl:otherwise>
|
7179
|
+
</xsl:choose>
|
7180
|
+
</xsl:variable><xsl:template match="*[local-name() = 'toc']">
|
6997
7181
|
<xsl:param name="colwidths"/>
|
6998
7182
|
<xsl:variable name="colwidths_">
|
6999
7183
|
<xsl:choose>
|
@@ -7528,12 +7712,15 @@
|
|
7528
7712
|
<xsl:param name="default">left</xsl:param>
|
7529
7713
|
<xsl:attribute name="text-align">
|
7530
7714
|
<xsl:choose>
|
7531
|
-
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
7715
|
+
<xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
|
7532
7716
|
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
7533
7717
|
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
7534
7718
|
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
7535
7719
|
</xsl:choose>
|
7536
7720
|
</xsl:attribute>
|
7721
|
+
<xsl:if test="@align = 'indent'">
|
7722
|
+
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
7723
|
+
</xsl:if>
|
7537
7724
|
</xsl:template><xsl:template name="number-to-words">
|
7538
7725
|
<xsl:param name="number"/>
|
7539
7726
|
<xsl:param name="first"/>
|
@@ -7630,4 +7817,14 @@
|
|
7630
7817
|
</xsl:otherwise>
|
7631
7818
|
</xsl:choose>
|
7632
7819
|
</xsl:if>
|
7820
|
+
</xsl:template><xsl:template name="setAltText">
|
7821
|
+
<xsl:param name="value"/>
|
7822
|
+
<xsl:attribute name="fox:alt-text">
|
7823
|
+
<xsl:choose>
|
7824
|
+
<xsl:when test="normalize-space($value) != ''">
|
7825
|
+
<xsl:value-of select="$value"/>
|
7826
|
+
</xsl:when>
|
7827
|
+
<xsl:otherwise>_</xsl:otherwise>
|
7828
|
+
</xsl:choose>
|
7829
|
+
</xsl:attribute>
|
7633
7830
|
</xsl:template></xsl:stylesheet>
|