metanorma-iso 1.10.2 → 1.10.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +3 -33
- data/.github/workflows/ubuntu.yml +1 -1
- data/Gemfile +1 -1
- data/lib/asciidoctor/iso/base.rb +1 -1
- data/lib/asciidoctor/iso/basicdoc.rng +1 -11
- data/lib/asciidoctor/iso/biblio.rng +0 -2
- data/lib/asciidoctor/iso/front.rb +17 -4
- data/lib/asciidoctor/iso/front_id.rb +20 -17
- data/lib/asciidoctor/iso/isodoc.rng +61 -19
- data/lib/asciidoctor/iso/isostandard-amd.rng +1 -1
- data/lib/asciidoctor/iso/isostandard.rng +15 -3
- data/lib/asciidoctor/iso/reqt.rng +1 -1
- data/lib/asciidoctor/iso/section.rb +1 -1
- data/lib/asciidoctor/iso/validate.rb +1 -1
- data/lib/asciidoctor/iso/validate_image.rb +1 -1
- data/lib/asciidoctor/iso/validate_section.rb +1 -1
- data/lib/isodoc/iso/base_convert.rb +14 -31
- data/lib/isodoc/iso/html/isodoc.scss +0 -1
- data/lib/isodoc/iso/html/style-human.scss +36 -9
- data/lib/isodoc/iso/html/style-iso.scss +31 -6
- data/lib/isodoc/iso/html/wordstyle.scss +10 -8
- data/lib/isodoc/iso/html_convert.rb +81 -22
- data/lib/isodoc/iso/index.rb +53 -45
- data/lib/isodoc/iso/iso.amendment.xsl +406 -122
- data/lib/isodoc/iso/iso.international-standard.xsl +406 -122
- data/lib/isodoc/iso/isosts_convert.rb +6 -2
- data/lib/isodoc/iso/metadata.rb +27 -22
- data/lib/isodoc/iso/presentation_xml_convert.rb +60 -25
- data/lib/isodoc/iso/sts_convert.rb +3 -2
- data/lib/isodoc/iso/word_convert.rb +0 -2
- data/lib/metanorma/iso/processor.rb +2 -2
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +3 -3
- data/spec/asciidoctor/base_spec.rb +398 -546
- data/spec/asciidoctor/blocks_spec.rb +4 -4
- data/spec/asciidoctor/cleanup_spec.rb +15 -12
- data/spec/asciidoctor/refs_spec.rb +87 -84
- data/spec/isodoc/amd_spec.rb +261 -250
- data/spec/isodoc/i18n_spec.rb +7 -7
- data/spec/isodoc/inline_spec.rb +242 -216
- data/spec/isodoc/iso_spec.rb +3 -1
- data/spec/isodoc/postproc_spec.rb +111 -28
- data/spec/isodoc/section_spec.rb +4 -4
- data/spec/isodoc/terms_spec.rb +34 -41
- data/spec/isodoc/xref_spec.rb +3 -3
- data/spec/metanorma/processor_spec.rb +110 -14
- data/spec/vcr_cassettes/docrels.yml +37 -427
- metadata +11 -16
- data/lib/isodoc/iso/html/htmlstyle.css +0 -47
- data/lib/isodoc/iso/html/isodoc.css +0 -1328
- data/lib/isodoc/iso/html/style-human.css +0 -979
- data/lib/isodoc/iso/html/style-iso.css +0 -1007
- data/lib/isodoc/iso/html/wordstyle.css +0 -1699
@@ -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
|
<xsl:key name="attachments" match="iso:eref[contains(@bibitemid, '.exp')]" use="@bibitemid"/>
|
15
15
|
|
@@ -1423,7 +1423,9 @@
|
|
1423
1423
|
|
1424
1424
|
<xsl:template name="getListItemFormat">
|
1425
1425
|
<xsl:choose>
|
1426
|
-
<xsl:when test="local-name(..) = 'ul'"
|
1426
|
+
<xsl:when test="local-name(..) = 'ul'">
|
1427
|
+
<xsl:call-template name="setULLabel"/>
|
1428
|
+
</xsl:when>
|
1427
1429
|
<xsl:otherwise> <!-- for ordered lists -->
|
1428
1430
|
<xsl:choose>
|
1429
1431
|
<xsl:when test="../@type = 'arabic'">
|
@@ -1545,7 +1547,7 @@
|
|
1545
1547
|
</xsl:choose>
|
1546
1548
|
</xsl:template>
|
1547
1549
|
|
1548
|
-
<xsl:template match="iso:title">
|
1550
|
+
<xsl:template match="iso:title" name="title">
|
1549
1551
|
|
1550
1552
|
<xsl:variable name="level">
|
1551
1553
|
<xsl:call-template name="getLevel"/>
|
@@ -1686,69 +1688,19 @@
|
|
1686
1688
|
<xsl:template match="iso:li//iso:p//text()">
|
1687
1689
|
<xsl:choose>
|
1688
1690
|
<xsl:when test="contains(., '	')">
|
1691
|
+
<!-- <fo:inline white-space="pre"><xsl:value-of select="translate(., $thinspace, ' ')"/></fo:inline> -->
|
1689
1692
|
<fo:inline white-space="pre"><xsl:value-of select="."/></fo:inline>
|
1690
1693
|
</xsl:when>
|
1691
1694
|
<xsl:otherwise>
|
1695
|
+
<!-- <xsl:value-of select="translate(., $thinspace, ' ')"/> -->
|
1692
1696
|
<xsl:value-of select="."/>
|
1693
1697
|
</xsl:otherwise>
|
1694
1698
|
</xsl:choose>
|
1695
1699
|
|
1696
1700
|
</xsl:template>
|
1697
1701
|
|
1698
|
-
<!--
|
1699
|
-
<fn reference="1">
|
1700
|
-
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
1701
|
-
</fn>
|
1702
|
-
-->
|
1703
1702
|
|
1704
|
-
<xsl:variable name="p_fn">
|
1705
|
-
<xsl:for-each select="//iso:p/iso:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
1706
|
-
<!-- copy unique fn -->
|
1707
|
-
<fn gen_id="{generate-id(.)}">
|
1708
|
-
<xsl:copy-of select="@*"/>
|
1709
|
-
<xsl:copy-of select="node()"/>
|
1710
|
-
</fn>
|
1711
|
-
</xsl:for-each>
|
1712
|
-
</xsl:variable>
|
1713
1703
|
|
1714
|
-
<xsl:template match="iso:p/iso:fn" priority="2">
|
1715
|
-
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
1716
|
-
<xsl:variable name="reference" select="@reference"/>
|
1717
|
-
<xsl:variable name="number">
|
1718
|
-
<!-- <xsl:number level="any" count="iso:p/iso:fn"/> -->
|
1719
|
-
<xsl:value-of select="count(xalan:nodeset($p_fn)//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
1720
|
-
</xsl:variable>
|
1721
|
-
<xsl:choose>
|
1722
|
-
<xsl:when test="xalan:nodeset($p_fn)//fn[@gen_id = $gen_id]">
|
1723
|
-
<fo:footnote>
|
1724
|
-
<fo:inline font-size="80%" keep-with-previous.within-line="always" vertical-align="super">
|
1725
|
-
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
1726
|
-
<!-- <xsl:value-of select="@reference"/> -->
|
1727
|
-
<xsl:value-of select="$number + count(//iso:bibitem[ancestor::iso:references[@normative='true']]/iso:note)"/><xsl:text>)</xsl:text>
|
1728
|
-
</fo:basic-link>
|
1729
|
-
</fo:inline>
|
1730
|
-
<fo:footnote-body>
|
1731
|
-
<fo:block font-size="10pt" margin-bottom="12pt">
|
1732
|
-
<fo:inline id="footnote_{@reference}_{$number}" keep-with-next.within-line="always" padding-right="3mm"> <!-- font-size="60%" alignment-baseline="hanging" -->
|
1733
|
-
<xsl:value-of select="$number + count(//iso:bibitem[ancestor::iso:references[@normative='true']]/iso:note)"/><xsl:text>)</xsl:text>
|
1734
|
-
</fo:inline>
|
1735
|
-
<xsl:for-each select="iso:p">
|
1736
|
-
<xsl:apply-templates/>
|
1737
|
-
</xsl:for-each>
|
1738
|
-
</fo:block>
|
1739
|
-
</fo:footnote-body>
|
1740
|
-
</fo:footnote>
|
1741
|
-
</xsl:when>
|
1742
|
-
<xsl:otherwise>
|
1743
|
-
<fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
|
1744
|
-
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
1745
|
-
<xsl:value-of select="$number + count(//iso:bibitem/iso:note)"/>
|
1746
|
-
</fo:basic-link>
|
1747
|
-
</fo:inline>
|
1748
|
-
</xsl:otherwise>
|
1749
|
-
</xsl:choose>
|
1750
|
-
</xsl:template>
|
1751
|
-
|
1752
1704
|
<xsl:template match="iso:p/iso:fn/iso:p">
|
1753
1705
|
<xsl:apply-templates/>
|
1754
1706
|
</xsl:template>
|
@@ -1801,6 +1753,7 @@
|
|
1801
1753
|
<xsl:apply-templates select="ancestor::iso:term[1]/iso:name" mode="presentation"/>
|
1802
1754
|
</fo:block>
|
1803
1755
|
<fo:block font-weight="bold" keep-with-next="always">
|
1756
|
+
<xsl:call-template name="setStyle_preferred"/>
|
1804
1757
|
<xsl:apply-templates/>
|
1805
1758
|
</fo:block>
|
1806
1759
|
</fo:block>
|
@@ -1858,7 +1811,10 @@
|
|
1858
1811
|
<fo:list-item-label end-indent="label-end()">
|
1859
1812
|
<fo:block>
|
1860
1813
|
<fo:inline id="{@id}">
|
1861
|
-
<xsl:
|
1814
|
+
<xsl:value-of select="iso:docidentifier[@type = 'metanorma-ordinal']"/>
|
1815
|
+
<xsl:if test="not(iso:docidentifier[@type = 'metanorma-ordinal'])">
|
1816
|
+
<xsl:number format="[1]"/>
|
1817
|
+
</xsl:if>
|
1862
1818
|
</fo:inline>
|
1863
1819
|
</fo:block>
|
1864
1820
|
</fo:list-item-label>
|
@@ -1871,9 +1827,6 @@
|
|
1871
1827
|
</fo:list-block>
|
1872
1828
|
</xsl:template>
|
1873
1829
|
|
1874
|
-
<!-- <xsl:template match="iso:references[@id = '_bibliography']/iso:bibitem" mode="contents"/> [not(@normative='true')] -->
|
1875
|
-
<xsl:template match="iso:references/iso:bibitem" mode="contents"/>
|
1876
|
-
|
1877
1830
|
<!-- <xsl:template match="iso:references[@id = '_bibliography']/iso:bibitem/iso:title"> iso:references[not(@normative='true')]/ -->
|
1878
1831
|
<xsl:template match="iso:bibitem/iso:title">
|
1879
1832
|
<fo:inline font-style="italic">
|
@@ -2010,6 +1963,11 @@
|
|
2010
1963
|
<!-- End of Index processing -->
|
2011
1964
|
<!-- =================== -->
|
2012
1965
|
|
1966
|
+
<!-- <xsl:variable name="thinspace" select="' '"/>
|
1967
|
+
<xsl:template match="text()[contains(., $thinspace)]">
|
1968
|
+
<xsl:value-of select="translate(., $thinspace, ' ')"/>
|
1969
|
+
</xsl:template> -->
|
1970
|
+
|
2013
1971
|
|
2014
1972
|
<xsl:template name="insertHeaderFooter">
|
2015
1973
|
<xsl:param name="font-weight" select="'bold'"/>
|
@@ -2740,6 +2698,76 @@
|
|
2740
2698
|
|
2741
2699
|
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
2742
2700
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2701
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-style">
|
2702
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
2703
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-num-style">
|
2704
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
2705
|
+
|
2706
|
+
|
2707
|
+
|
2708
|
+
|
2709
|
+
|
2710
|
+
|
2711
|
+
|
2712
|
+
|
2713
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
2714
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2715
|
+
|
2716
|
+
|
2717
|
+
|
2718
|
+
|
2719
|
+
|
2720
|
+
|
2721
|
+
|
2722
|
+
|
2723
|
+
|
2724
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-style">
|
2725
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
2726
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
2727
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
2728
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
2729
|
+
|
2730
|
+
|
2731
|
+
|
2732
|
+
|
2733
|
+
|
2734
|
+
|
2735
|
+
|
2736
|
+
|
2737
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2738
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2739
|
+
|
2740
|
+
|
2741
|
+
|
2742
|
+
|
2743
|
+
|
2744
|
+
|
2745
|
+
|
2746
|
+
|
2747
|
+
|
2748
|
+
|
2749
|
+
|
2750
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
|
2751
|
+
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
2752
|
+
|
2753
|
+
|
2754
|
+
|
2755
|
+
|
2756
|
+
|
2757
|
+
|
2758
|
+
|
2759
|
+
|
2760
|
+
<xsl:attribute name="padding-right">3mm</xsl:attribute>
|
2761
|
+
|
2762
|
+
|
2763
|
+
|
2764
|
+
|
2765
|
+
|
2766
|
+
|
2767
|
+
|
2768
|
+
|
2769
|
+
|
2770
|
+
|
2743
2771
|
</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">
|
2744
2772
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2745
2773
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
@@ -2765,7 +2793,8 @@
|
|
2765
2793
|
<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"/>
|
2766
2794
|
|
2767
2795
|
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
2768
|
-
|
2796
|
+
|
2797
|
+
<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']]">
|
2769
2798
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2770
2799
|
<xsl:apply-templates select="." mode="contents"/>
|
2771
2800
|
</xsl:for-each>
|
@@ -2775,7 +2804,7 @@
|
|
2775
2804
|
<xsl:apply-templates select="." mode="contents"/>
|
2776
2805
|
</xsl:for-each>
|
2777
2806
|
|
2778
|
-
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2807
|
+
<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')]]">
|
2779
2808
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2780
2809
|
<xsl:apply-templates select="." mode="contents"/>
|
2781
2810
|
</xsl:for-each>
|
@@ -3781,6 +3810,104 @@
|
|
3781
3810
|
|
3782
3811
|
</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">
|
3783
3812
|
<xsl:apply-templates/>
|
3813
|
+
</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">
|
3814
|
+
|
3815
|
+
<!-- list of footnotes to calculate actual footnotes number -->
|
3816
|
+
<xsl:variable name="p_fn_">
|
3817
|
+
<xsl:choose>
|
3818
|
+
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
3819
|
+
<fn gen_id="{generate-id(.)}">
|
3820
|
+
<xsl:copy-of select="@*"/>
|
3821
|
+
<xsl:copy-of select="node()"/>
|
3822
|
+
</fn>
|
3823
|
+
</xsl:when>
|
3824
|
+
<xsl:otherwise>
|
3825
|
+
<!-- itetation for:
|
3826
|
+
footnotes in bibdata/title
|
3827
|
+
footnotes in bibliography
|
3828
|
+
footnotes in document's body (except table's head/body/foot and figure text)
|
3829
|
+
-->
|
3830
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
3831
|
+
<fn gen_id="{generate-id(.)}">
|
3832
|
+
<xsl:copy-of select="@*"/>
|
3833
|
+
<xsl:copy-of select="node()"/>
|
3834
|
+
</fn>
|
3835
|
+
</xsl:for-each>
|
3836
|
+
<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']/*">
|
3837
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3838
|
+
<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])]">
|
3839
|
+
<!-- copy unique fn -->
|
3840
|
+
<fn gen_id="{generate-id(.)}">
|
3841
|
+
<xsl:copy-of select="@*"/>
|
3842
|
+
<xsl:copy-of select="node()"/>
|
3843
|
+
</fn>
|
3844
|
+
</xsl:for-each>
|
3845
|
+
</xsl:for-each>
|
3846
|
+
</xsl:otherwise>
|
3847
|
+
</xsl:choose>
|
3848
|
+
</xsl:variable>
|
3849
|
+
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
3850
|
+
|
3851
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
3852
|
+
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
3853
|
+
<xsl:variable name="reference" select="@reference"/>
|
3854
|
+
<!-- fn sequence number in document -->
|
3855
|
+
<xsl:variable name="current_fn_number">
|
3856
|
+
<xsl:choose>
|
3857
|
+
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
3858
|
+
<xsl:otherwise>
|
3859
|
+
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
3860
|
+
</xsl:otherwise>
|
3861
|
+
</xsl:choose>
|
3862
|
+
</xsl:variable>
|
3863
|
+
<xsl:variable name="current_fn_number_text">
|
3864
|
+
<xsl:value-of select="$current_fn_number"/>
|
3865
|
+
|
3866
|
+
|
3867
|
+
<xsl:text>)</xsl:text>
|
3868
|
+
|
3869
|
+
</xsl:variable>
|
3870
|
+
|
3871
|
+
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
3872
|
+
<xsl:variable name="footnote_inline">
|
3873
|
+
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
3874
|
+
|
3875
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
3876
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
3877
|
+
</fo:basic-link>
|
3878
|
+
</fo:inline>
|
3879
|
+
</xsl:variable>
|
3880
|
+
<!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
|
3881
|
+
gen_id=<xsl:value-of select="$gen_id"/> -->
|
3882
|
+
<xsl:choose>
|
3883
|
+
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
3884
|
+
<xsl:copy-of select="$footnote_inline"/>
|
3885
|
+
</xsl:when>
|
3886
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
3887
|
+
<fo:footnote xsl:use-attribute-sets="fn-style">
|
3888
|
+
<xsl:copy-of select="$footnote_inline"/>
|
3889
|
+
<fo:footnote-body>
|
3890
|
+
|
3891
|
+
<fo:block-container text-indent="0" start-indent="0">
|
3892
|
+
|
3893
|
+
|
3894
|
+
<fo:block xsl:use-attribute-sets="fn-body-style">
|
3895
|
+
|
3896
|
+
|
3897
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
3898
|
+
|
3899
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
3900
|
+
</fo:inline>
|
3901
|
+
<xsl:apply-templates/>
|
3902
|
+
</fo:block>
|
3903
|
+
</fo:block-container>
|
3904
|
+
</fo:footnote-body>
|
3905
|
+
</fo:footnote>
|
3906
|
+
</xsl:when>
|
3907
|
+
<xsl:otherwise>
|
3908
|
+
<xsl:copy-of select="$footnote_inline"/>
|
3909
|
+
</xsl:otherwise>
|
3910
|
+
</xsl:choose>
|
3784
3911
|
</xsl:template><xsl:template name="fn_display">
|
3785
3912
|
<xsl:variable name="references">
|
3786
3913
|
|
@@ -3982,6 +4109,8 @@
|
|
3982
4109
|
|
3983
4110
|
</fo:basic-link>
|
3984
4111
|
</fo:inline>
|
4112
|
+
</xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
4113
|
+
<fo:inline><xsl:value-of select="."/></fo:inline>
|
3985
4114
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
3986
4115
|
<fo:inline>
|
3987
4116
|
<xsl:apply-templates/>
|
@@ -4355,6 +4484,7 @@
|
|
4355
4484
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
4356
4485
|
<xsl:apply-templates/>
|
4357
4486
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
4487
|
+
<xsl:apply-templates select="@language"/>
|
4358
4488
|
<xsl:apply-templates/>
|
4359
4489
|
</xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
4360
4490
|
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
@@ -4995,22 +5125,6 @@
|
|
4995
5125
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
4996
5126
|
<xsl:apply-templates/>
|
4997
5127
|
</fo:inline>
|
4998
|
-
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
4999
|
-
<xsl:variable name="title-modified">
|
5000
|
-
|
5001
|
-
<xsl:call-template name="getLocalizedString">
|
5002
|
-
<xsl:with-param name="key">modified</xsl:with-param>
|
5003
|
-
</xsl:call-template>
|
5004
|
-
|
5005
|
-
|
5006
|
-
</xsl:variable>
|
5007
|
-
|
5008
|
-
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
5009
|
-
<xsl:choose>
|
5010
|
-
<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>
|
5011
|
-
<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>
|
5012
|
-
</xsl:choose>
|
5013
|
-
<xsl:apply-templates/>
|
5014
5128
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
5015
5129
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
5016
5130
|
|
@@ -5579,20 +5693,67 @@
|
|
5579
5693
|
</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">
|
5580
5694
|
<xsl:apply-templates mode="contents"/>
|
5581
5695
|
<xsl:text> </xsl:text>
|
5582
|
-
</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">
|
5696
|
+
</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">
|
5583
5697
|
<xsl:apply-templates mode="bookmarks"/>
|
5584
5698
|
<xsl:text> </xsl:text>
|
5585
5699
|
</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">
|
5586
5700
|
<xsl:value-of select="."/>
|
5587
|
-
</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">
|
5701
|
+
</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">
|
5588
5702
|
<xsl:value-of select="."/>
|
5589
5703
|
</xsl:template><xsl:template match="node()" mode="contents">
|
5590
5704
|
<xsl:apply-templates mode="contents"/>
|
5705
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
|
5706
|
+
<xsl:variable name="level">
|
5707
|
+
<xsl:call-template name="getLevel">
|
5708
|
+
<xsl:with-param name="depth" select="@depth"/>
|
5709
|
+
</xsl:call-template>
|
5710
|
+
</xsl:variable>
|
5711
|
+
|
5712
|
+
<xsl:variable name="section">
|
5713
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
5714
|
+
</xsl:variable>
|
5715
|
+
|
5716
|
+
<xsl:variable name="type">floating-title</xsl:variable>
|
5717
|
+
|
5718
|
+
<xsl:variable name="display">
|
5719
|
+
<xsl:choose>
|
5720
|
+
<xsl:when test="normalize-space(@id) = ''">false</xsl:when>
|
5721
|
+
<xsl:when test="$level <= $toc_level">true</xsl:when>
|
5722
|
+
<xsl:otherwise>false</xsl:otherwise>
|
5723
|
+
</xsl:choose>
|
5724
|
+
</xsl:variable>
|
5725
|
+
|
5726
|
+
<xsl:variable name="skip">false</xsl:variable>
|
5727
|
+
|
5728
|
+
<xsl:if test="$skip = 'false'">
|
5729
|
+
|
5730
|
+
<xsl:variable name="title">
|
5731
|
+
<xsl:choose>
|
5732
|
+
<xsl:when test="*[local-name() = 'tab']">
|
5733
|
+
<xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
5734
|
+
</xsl:when>
|
5735
|
+
<xsl:otherwise>
|
5736
|
+
<xsl:copy-of select="node()"/>
|
5737
|
+
</xsl:otherwise>
|
5738
|
+
</xsl:choose>
|
5739
|
+
</xsl:variable>
|
5740
|
+
|
5741
|
+
<xsl:variable name="root">
|
5742
|
+
<xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
|
5743
|
+
<xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
|
5744
|
+
</xsl:variable>
|
5745
|
+
|
5746
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
|
5747
|
+
<title>
|
5748
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
5749
|
+
</title>
|
5750
|
+
</item>
|
5751
|
+
</xsl:if>
|
5591
5752
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
5592
5753
|
<xsl:apply-templates mode="bookmarks"/>
|
5593
5754
|
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
5594
5755
|
<xsl:apply-templates select="."/>
|
5595
|
-
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
5756
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
5596
5757
|
<xsl:apply-templates mode="bookmarks"/>
|
5597
5758
|
</xsl:template><xsl:template name="addBookmarks">
|
5598
5759
|
<xsl:param name="contents"/>
|
@@ -5854,6 +6015,8 @@
|
|
5854
6015
|
|
5855
6016
|
|
5856
6017
|
|
6018
|
+
|
6019
|
+
|
5857
6020
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
5858
6021
|
<xsl:variable name="_font-size">
|
5859
6022
|
|
@@ -5887,13 +6050,17 @@
|
|
5887
6050
|
|
5888
6051
|
|
5889
6052
|
|
6053
|
+
|
6054
|
+
|
5890
6055
|
<xsl:apply-templates/>
|
5891
6056
|
</fo:block>
|
5892
|
-
|
6057
|
+
|
5893
6058
|
|
5894
6059
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
5895
6060
|
|
5896
6061
|
|
6062
|
+
|
6063
|
+
|
5897
6064
|
</fo:block-container>
|
5898
6065
|
</fo:block-container>
|
5899
6066
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -6245,60 +6412,69 @@
|
|
6245
6412
|
<xsl:variable name="termsource_text">
|
6246
6413
|
<xsl:apply-templates/>
|
6247
6414
|
</xsl:variable>
|
6248
|
-
|
6249
|
-
<xsl:choose>
|
6415
|
+
<xsl:copy-of select="$termsource_text"/>
|
6416
|
+
<!-- <xsl:choose>
|
6250
6417
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
6251
|
-
<!-- <xsl:apply-templates /> -->
|
6252
6418
|
<xsl:copy-of select="$termsource_text"/>
|
6253
6419
|
</xsl:when>
|
6254
6420
|
<xsl:otherwise>
|
6255
|
-
|
6256
|
-
|
6421
|
+
<xsl:if test="$namespace = 'bsi'">
|
6422
|
+
<xsl:choose>
|
6423
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
|
6424
|
+
<xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
|
6425
|
+
</xsl:choose>
|
6426
|
+
</xsl:if>
|
6427
|
+
<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'">
|
6257
6428
|
<xsl:text>[</xsl:text>
|
6258
|
-
|
6259
|
-
<!-- <xsl:apply-templates /> -->
|
6429
|
+
</xsl:if>
|
6260
6430
|
<xsl:copy-of select="$termsource_text"/>
|
6261
|
-
|
6262
|
-
|
6431
|
+
<xsl:if test="$namespace = 'bsi'">
|
6432
|
+
<xsl:choose>
|
6433
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
|
6434
|
+
<xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
|
6435
|
+
</xsl:choose>
|
6436
|
+
</xsl:if>
|
6437
|
+
<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'">
|
6263
6438
|
<xsl:text>]</xsl:text>
|
6264
|
-
|
6439
|
+
</xsl:if>
|
6265
6440
|
</xsl:otherwise>
|
6266
|
-
</xsl:choose>
|
6441
|
+
</xsl:choose> -->
|
6267
6442
|
</fo:block>
|
6268
6443
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
6269
6444
|
<xsl:if test="normalize-space() != ''">
|
6270
6445
|
<xsl:value-of select="."/>
|
6271
6446
|
</xsl:if>
|
6272
|
-
</xsl:template><xsl:
|
6273
|
-
<
|
6274
|
-
|
6275
|
-
|
6276
|
-
|
6447
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
|
6448
|
+
<fo:inline>
|
6449
|
+
|
6450
|
+
|
6451
|
+
<xsl:value-of select="."/>
|
6452
|
+
</fo:inline>
|
6453
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
6277
6454
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
6278
6455
|
<xsl:if test="normalize-space(@citeas) = ''">
|
6279
6456
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
6280
6457
|
</xsl:if>
|
6281
|
-
|
6282
|
-
|
6283
|
-
<fo:inline>
|
6284
|
-
|
6285
|
-
|
6286
|
-
|
6287
|
-
|
6288
|
-
|
6289
|
-
<xsl:value-of select="$localized.source"/>
|
6290
|
-
<xsl:text>: </xsl:text>
|
6291
|
-
|
6292
|
-
|
6293
|
-
|
6294
|
-
|
6295
|
-
</fo:inline>
|
6296
|
-
|
6297
6458
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
6298
6459
|
<xsl:apply-templates/>
|
6299
6460
|
</fo:inline>
|
6461
|
+
</fo:basic-link>
|
6462
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
6463
|
+
<xsl:variable name="title-modified">
|
6300
6464
|
|
6301
|
-
|
6465
|
+
<xsl:call-template name="getLocalizedString">
|
6466
|
+
<xsl:with-param name="key">modified</xsl:with-param>
|
6467
|
+
</xsl:call-template>
|
6468
|
+
|
6469
|
+
|
6470
|
+
</xsl:variable>
|
6471
|
+
|
6472
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
6473
|
+
<xsl:choose>
|
6474
|
+
<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>
|
6475
|
+
<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>
|
6476
|
+
</xsl:choose>
|
6477
|
+
<xsl:apply-templates/>
|
6302
6478
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
6303
6479
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
6304
6480
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
@@ -6489,15 +6665,22 @@
|
|
6489
6665
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
6490
6666
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
6491
6667
|
</fo:block>
|
6668
|
+
</xsl:template><xsl:template name="setStyle_preferred">
|
6669
|
+
<xsl:if test="*[local-name() = 'strong']">
|
6670
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
6671
|
+
</xsl:if>
|
6672
|
+
</xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
|
6673
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
|
6492
6674
|
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
6493
6675
|
<fo:block xsl:use-attribute-sets="definition-style">
|
6494
6676
|
<xsl:apply-templates/>
|
6495
6677
|
</fo:block>
|
6496
6678
|
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
|
6497
6679
|
<xsl:apply-templates/>
|
6498
|
-
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
|
6680
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
|
6499
6681
|
<fo:inline> <xsl:apply-templates/></fo:inline>
|
6500
|
-
<fo:block
|
6682
|
+
<!-- <fo:block> </fo:block> -->
|
6683
|
+
<fo:block/>
|
6501
6684
|
</xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
|
6502
6685
|
|
6503
6686
|
<fo:block>
|
@@ -6558,6 +6741,51 @@
|
|
6558
6741
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
6559
6742
|
<!-- 0xA0 to space replacement -->
|
6560
6743
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
6744
|
+
</xsl:template><xsl:variable name="ul_labels_">
|
6745
|
+
|
6746
|
+
|
6747
|
+
|
6748
|
+
|
6749
|
+
|
6750
|
+
|
6751
|
+
|
6752
|
+
<label>—</label> <!-- em dash -->
|
6753
|
+
|
6754
|
+
|
6755
|
+
|
6756
|
+
|
6757
|
+
|
6758
|
+
|
6759
|
+
|
6760
|
+
|
6761
|
+
|
6762
|
+
|
6763
|
+
|
6764
|
+
</xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
|
6765
|
+
<xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
|
6766
|
+
<xsl:variable name="list_level">
|
6767
|
+
<xsl:choose>
|
6768
|
+
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
6769
|
+
<xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
|
6770
|
+
</xsl:choose>
|
6771
|
+
</xsl:variable>
|
6772
|
+
<xsl:choose>
|
6773
|
+
<xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
|
6774
|
+
<xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
|
6775
|
+
</xsl:when>
|
6776
|
+
<xsl:when test="$list_level mod 3 = 0">
|
6777
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
|
6778
|
+
</xsl:when>
|
6779
|
+
<xsl:when test="$list_level mod 2 = 0">
|
6780
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
|
6781
|
+
</xsl:when>
|
6782
|
+
<xsl:otherwise>
|
6783
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
|
6784
|
+
</xsl:otherwise>
|
6785
|
+
</xsl:choose>
|
6786
|
+
</xsl:template><xsl:template match="label" mode="ul_labels">
|
6787
|
+
<xsl:copy-of select="@*[not(local-name() = 'level')]"/>
|
6788
|
+
<xsl:value-of select="."/>
|
6561
6789
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
6562
6790
|
<xsl:choose>
|
6563
6791
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
@@ -6768,7 +6996,12 @@
|
|
6768
6996
|
|
6769
6997
|
|
6770
6998
|
|
6771
|
-
|
6999
|
+
|
7000
|
+
|
7001
|
+
|
7002
|
+
|
7003
|
+
|
7004
|
+
|
6772
7005
|
|
6773
7006
|
|
6774
7007
|
|
@@ -6779,7 +7012,7 @@
|
|
6779
7012
|
<xsl:if test="*[local-name() = 'docidentifier']">
|
6780
7013
|
<xsl:choose>
|
6781
7014
|
<xsl:when test="*[local-name() = 'docidentifier']/@type = 'metanorma'"/>
|
6782
|
-
<xsl:otherwise><xsl:value-of select="*[local-name() = '
|
7015
|
+
<xsl:otherwise><xsl:value-of select="*[local-name()='docidentifier'][not(@type = 'metanorma-ordinal')]"/></xsl:otherwise>
|
6783
7016
|
</xsl:choose>
|
6784
7017
|
</xsl:if>
|
6785
7018
|
</xsl:variable>
|
@@ -6800,10 +7033,19 @@
|
|
6800
7033
|
<xsl:apply-templates select="*[local-name() = 'formattedref']"/>
|
6801
7034
|
<!-- end ISO bibitem processing -->
|
6802
7035
|
|
7036
|
+
|
7037
|
+
|
7038
|
+
|
7039
|
+
|
7040
|
+
<!-- end MPFD bibitem processing -->
|
7041
|
+
|
7042
|
+
<!-- start M3D bibitem processing -->
|
7043
|
+
|
6803
7044
|
|
7045
|
+
|
6804
7046
|
|
6805
7047
|
</xsl:template><xsl:template name="processBibitemDocId">
|
6806
|
-
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
7048
|
+
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
6807
7049
|
<xsl:choose>
|
6808
7050
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
6809
7051
|
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
@@ -6817,7 +7059,7 @@
|
|
6817
7059
|
<xsl:if test="$type != ''">
|
6818
7060
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
6819
7061
|
</xsl:if> -->
|
6820
|
-
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
7062
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
|
6821
7063
|
</xsl:otherwise>
|
6822
7064
|
</xsl:choose>
|
6823
7065
|
</xsl:template><xsl:template name="processPersonalAuthor">
|
@@ -6922,7 +7164,35 @@
|
|
6922
7164
|
<fo:block-container border="1pt solid black" width="50%">
|
6923
7165
|
<fo:block> </fo:block>
|
6924
7166
|
</fo:block-container>
|
6925
|
-
</xsl:template><xsl:
|
7167
|
+
</xsl:template><xsl:variable name="toc_level">
|
7168
|
+
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
7169
|
+
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
|
7170
|
+
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
7171
|
+
<xsl:choose>
|
7172
|
+
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
7173
|
+
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
7174
|
+
<xsl:otherwise><!-- default value -->
|
7175
|
+
|
7176
|
+
|
7177
|
+
|
7178
|
+
|
7179
|
+
|
7180
|
+
|
7181
|
+
|
7182
|
+
|
7183
|
+
|
7184
|
+
|
7185
|
+
|
7186
|
+
|
7187
|
+
|
7188
|
+
|
7189
|
+
|
7190
|
+
|
7191
|
+
|
7192
|
+
|
7193
|
+
</xsl:otherwise>
|
7194
|
+
</xsl:choose>
|
7195
|
+
</xsl:variable><xsl:template match="*[local-name() = 'toc']">
|
6926
7196
|
<xsl:param name="colwidths"/>
|
6927
7197
|
<xsl:variable name="colwidths_">
|
6928
7198
|
<xsl:choose>
|
@@ -7002,7 +7272,7 @@
|
|
7002
7272
|
</td>
|
7003
7273
|
</xsl:for-each>
|
7004
7274
|
<td>333</td> <!-- page number, just for fill -->
|
7005
|
-
</xsl:template><xsl:template match="*[local-name() = 'variant-title']
|
7275
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
7006
7276
|
<fo:inline padding-right="5mm"> </fo:inline>
|
7007
7277
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
7008
7278
|
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
@@ -7013,6 +7283,10 @@
|
|
7013
7283
|
</svg>
|
7014
7284
|
</fo:instream-foreign-object>
|
7015
7285
|
</fo:inline>
|
7286
|
+
</xsl:template><xsl:template match="@language">
|
7287
|
+
<xsl:copy-of select="."/>
|
7288
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
|
7289
|
+
<xsl:call-template name="title"/>
|
7016
7290
|
</xsl:template><xsl:template name="convertDate">
|
7017
7291
|
<xsl:param name="date"/>
|
7018
7292
|
<xsl:param name="format" select="'short'"/>
|
@@ -7562,4 +7836,14 @@
|
|
7562
7836
|
</xsl:otherwise>
|
7563
7837
|
</xsl:choose>
|
7564
7838
|
</xsl:if>
|
7839
|
+
</xsl:template><xsl:template name="setAltText">
|
7840
|
+
<xsl:param name="value"/>
|
7841
|
+
<xsl:attribute name="fox:alt-text">
|
7842
|
+
<xsl:choose>
|
7843
|
+
<xsl:when test="normalize-space($value) != ''">
|
7844
|
+
<xsl:value-of select="$value"/>
|
7845
|
+
</xsl:when>
|
7846
|
+
<xsl:otherwise>_</xsl:otherwise>
|
7847
|
+
</xsl:choose>
|
7848
|
+
</xsl:attribute>
|
7565
7849
|
</xsl:template></xsl:stylesheet>
|