metanorma-iso 1.7.0 → 1.7.1
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/asciidoctor/iso/isodoc.rng +63 -0
- data/lib/isodoc/iso/iso.amendment.xsl +255 -188
- data/lib/isodoc/iso/iso.international-standard.xsl +255 -188
- data/lib/metanorma/iso/version.rb +1 -1
- data/spec/asciidoctor-iso/validate_spec.rb +2 -0
- data/spec/isodoc/postproc_spec.rb +1 -0
- data/spec/spec_helper.rb +12 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9af9da09f9e17f25423843c284ed66d9f2206535631b334263bea9f80211acf6
|
4
|
+
data.tar.gz: 9987c2fcb45025dee73bc95fd21939104495dbf3e07e79afac877b7b9fcf81f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f947d939ce553a170f712c09c903bf5d8c1192c7de45063d9407b4a7c300d31ee325cb269db9046d917a0184a18c78f654377922e23b2eca33add015139e5af9
|
7
|
+
data.tar.gz: c5d5d07e2c558293c926c3f4a4be46ff96659670082f2c09951f58dada582f6d93a3d8ccaeba15016bc0548dceda5c5f32d664a8cb05110d69e25179c67f1c4d
|
@@ -812,6 +812,8 @@
|
|
812
812
|
<ref name="requirement"/>
|
813
813
|
<ref name="recommendation"/>
|
814
814
|
<ref name="permission"/>
|
815
|
+
<ref name="imagemap"/>
|
816
|
+
<ref name="svgmap"/>
|
815
817
|
</choice>
|
816
818
|
</define>
|
817
819
|
<define name="bibliography">
|
@@ -1635,4 +1637,65 @@
|
|
1635
1637
|
<text/>
|
1636
1638
|
</element>
|
1637
1639
|
</define>
|
1640
|
+
<define name="imagemap">
|
1641
|
+
<element name="imagemap">
|
1642
|
+
<ref name="figure"/>
|
1643
|
+
<zeroOrMore>
|
1644
|
+
<element name="area">
|
1645
|
+
<attribute name="type">
|
1646
|
+
<choice>
|
1647
|
+
<value>rect</value>
|
1648
|
+
<value>circle</value>
|
1649
|
+
<value>ellipse</value>
|
1650
|
+
<value>poly</value>
|
1651
|
+
</choice>
|
1652
|
+
</attribute>
|
1653
|
+
<choice>
|
1654
|
+
<ref name="xref"/>
|
1655
|
+
<ref name="hyperlink"/>
|
1656
|
+
<ref name="eref"/>
|
1657
|
+
</choice>
|
1658
|
+
<oneOrMore>
|
1659
|
+
<element name="coords">
|
1660
|
+
<attribute name="x">
|
1661
|
+
<data type="float"/>
|
1662
|
+
</attribute>
|
1663
|
+
<attribute name="y">
|
1664
|
+
<data type="float"/>
|
1665
|
+
</attribute>
|
1666
|
+
</element>
|
1667
|
+
</oneOrMore>
|
1668
|
+
<optional>
|
1669
|
+
<element name="radius">
|
1670
|
+
<attribute name="x">
|
1671
|
+
<data type="float"/>
|
1672
|
+
</attribute>
|
1673
|
+
<optional>
|
1674
|
+
<attribute name="y">
|
1675
|
+
<data type="float"/>
|
1676
|
+
</attribute>
|
1677
|
+
</optional>
|
1678
|
+
</element>
|
1679
|
+
</optional>
|
1680
|
+
</element>
|
1681
|
+
</zeroOrMore>
|
1682
|
+
</element>
|
1683
|
+
</define>
|
1684
|
+
<define name="svgmap">
|
1685
|
+
<element name="svgmap">
|
1686
|
+
<ref name="figure"/>
|
1687
|
+
<zeroOrMore>
|
1688
|
+
<element name="target">
|
1689
|
+
<attribute name="href">
|
1690
|
+
<data type="anyURI"/>
|
1691
|
+
</attribute>
|
1692
|
+
<choice>
|
1693
|
+
<ref name="xref"/>
|
1694
|
+
<ref name="hyperlink"/>
|
1695
|
+
<ref name="eref"/>
|
1696
|
+
</choice>
|
1697
|
+
</element>
|
1698
|
+
</zeroOrMore>
|
1699
|
+
</element>
|
1700
|
+
</define>
|
1638
1701
|
</grammar>
|
@@ -2673,204 +2673,238 @@
|
|
2673
2673
|
<xsl:call-template name="add-zero-spaces-java"/>
|
2674
2674
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
2675
2675
|
|
2676
|
-
<xsl:variable name="
|
2677
|
-
<xsl:call-template name="getSimpleTable"/>
|
2678
|
-
</xsl:variable>
|
2676
|
+
<xsl:variable name="table">
|
2679
2677
|
|
2680
|
-
|
2681
|
-
|
2682
|
-
|
2683
|
-
|
2684
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
2685
|
-
<fo:block> </fo:block>
|
2686
|
-
</xsl:if> -->
|
2687
|
-
|
2688
|
-
<!-- $namespace = 'iso' or -->
|
2689
|
-
|
2690
|
-
|
2678
|
+
<xsl:variable name="simple-table">
|
2679
|
+
<xsl:call-template name="getSimpleTable"/>
|
2680
|
+
</xsl:variable>
|
2691
2681
|
|
2692
2682
|
|
2693
|
-
|
2694
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
2695
|
-
|
2696
|
-
<!-- <xsl:variable name="cols-count">
|
2697
|
-
<xsl:choose>
|
2698
|
-
<xsl:when test="*[local-name()='thead']">
|
2699
|
-
<xsl:call-template name="calculate-columns-numbers">
|
2700
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
2701
|
-
</xsl:call-template>
|
2702
|
-
</xsl:when>
|
2703
|
-
<xsl:otherwise>
|
2704
|
-
<xsl:call-template name="calculate-columns-numbers">
|
2705
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
2706
|
-
</xsl:call-template>
|
2707
|
-
</xsl:otherwise>
|
2708
|
-
</xsl:choose>
|
2709
|
-
</xsl:variable> -->
|
2710
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
2711
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
2712
|
-
|
2713
|
-
|
2714
|
-
|
2715
|
-
<xsl:variable name="colwidths">
|
2716
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2717
|
-
<xsl:call-template name="calculate-column-widths">
|
2718
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2719
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
2720
|
-
</xsl:call-template>
|
2721
|
-
</xsl:if>
|
2722
|
-
</xsl:variable>
|
2723
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2724
|
-
|
2725
|
-
<!-- <xsl:variable name="colwidths2">
|
2726
|
-
<xsl:call-template name="calculate-column-widths">
|
2727
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2728
|
-
</xsl:call-template>
|
2729
|
-
</xsl:variable> -->
|
2730
|
-
|
2731
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
2732
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
2733
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
2734
|
-
|
2735
|
-
<xsl:variable name="margin-left">
|
2736
|
-
<xsl:choose>
|
2737
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
2738
|
-
<xsl:otherwise>0</xsl:otherwise>
|
2739
|
-
</xsl:choose>
|
2740
|
-
</xsl:variable>
|
2741
|
-
|
2742
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2743
2683
|
|
2744
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2745
2684
|
|
2746
2685
|
|
2747
|
-
|
2748
|
-
|
2749
|
-
|
2686
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2687
|
+
<fo:block> </fo:block>
|
2688
|
+
</xsl:if> -->
|
2750
2689
|
|
2690
|
+
<!-- $namespace = 'iso' or -->
|
2751
2691
|
|
2752
|
-
|
2692
|
+
|
2753
2693
|
|
2694
|
+
|
2754
2695
|
|
2755
|
-
|
2756
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2757
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2758
|
-
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
2696
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
2759
2697
|
|
2698
|
+
<!-- <xsl:variable name="cols-count">
|
2699
|
+
<xsl:choose>
|
2700
|
+
<xsl:when test="*[local-name()='thead']">
|
2701
|
+
<xsl:call-template name="calculate-columns-numbers">
|
2702
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
2703
|
+
</xsl:call-template>
|
2704
|
+
</xsl:when>
|
2705
|
+
<xsl:otherwise>
|
2706
|
+
<xsl:call-template name="calculate-columns-numbers">
|
2707
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
2708
|
+
</xsl:call-template>
|
2709
|
+
</xsl:otherwise>
|
2710
|
+
</xsl:choose>
|
2711
|
+
</xsl:variable> -->
|
2712
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
2713
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
2760
2714
|
|
2761
2715
|
|
2762
2716
|
|
2717
|
+
<xsl:variable name="colwidths">
|
2718
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2719
|
+
<xsl:call-template name="calculate-column-widths">
|
2720
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2721
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
2722
|
+
</xsl:call-template>
|
2723
|
+
</xsl:if>
|
2724
|
+
</xsl:variable>
|
2725
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2763
2726
|
|
2727
|
+
<!-- <xsl:variable name="colwidths2">
|
2728
|
+
<xsl:call-template name="calculate-column-widths">
|
2729
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2730
|
+
</xsl:call-template>
|
2731
|
+
</xsl:variable> -->
|
2764
2732
|
|
2765
|
-
|
2766
|
-
|
2767
|
-
|
2768
|
-
|
2769
|
-
|
2770
|
-
|
2771
|
-
</xsl:
|
2772
|
-
|
2773
|
-
|
2774
|
-
|
2733
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
2734
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
2735
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
2736
|
+
|
2737
|
+
<xsl:variable name="margin-left">
|
2738
|
+
<xsl:choose>
|
2739
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
2740
|
+
<xsl:otherwise>0</xsl:otherwise>
|
2741
|
+
</xsl:choose>
|
2742
|
+
</xsl:variable>
|
2743
|
+
|
2744
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2775
2745
|
|
2776
|
-
<attribute name="
|
2777
|
-
<xsl:if test="*[local-name()='thead']">
|
2778
|
-
<attribute name="border-top">1pt solid black</attribute>
|
2779
|
-
</xsl:if>
|
2746
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2780
2747
|
|
2781
2748
|
|
2749
|
+
|
2750
|
+
|
2751
|
+
|
2782
2752
|
|
2783
2753
|
|
2784
|
-
|
2785
|
-
<attribute name="margin-right">0mm</attribute>
|
2754
|
+
|
2786
2755
|
|
2787
|
-
|
2788
|
-
|
2789
|
-
|
2790
2756
|
|
2791
|
-
|
2757
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2758
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2759
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2760
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
2792
2761
|
|
2793
|
-
</xsl:variable>
|
2794
|
-
|
2795
|
-
|
2796
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2797
2762
|
|
2798
|
-
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2799
|
-
<xsl:attribute name="{@name}">
|
2800
|
-
<xsl:value-of select="."/>
|
2801
|
-
</xsl:attribute>
|
2802
|
-
</xsl:for-each>
|
2803
2763
|
|
2804
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2805
|
-
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2806
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2807
|
-
</xsl:if>
|
2808
2764
|
|
2809
|
-
<xsl:choose>
|
2810
|
-
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2811
|
-
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
2812
|
-
<fo:table-column column-width="{@width}"/>
|
2813
|
-
</xsl:for-each>
|
2814
|
-
</xsl:when>
|
2815
|
-
<xsl:otherwise>
|
2816
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2817
|
-
<xsl:choose>
|
2818
|
-
<xsl:when test=". = 1 or . = 0">
|
2819
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
2820
|
-
</xsl:when>
|
2821
|
-
<xsl:otherwise>
|
2822
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
2823
|
-
</xsl:otherwise>
|
2824
|
-
</xsl:choose>
|
2825
|
-
</xsl:for-each>
|
2826
|
-
</xsl:otherwise>
|
2827
|
-
</xsl:choose>
|
2828
2765
|
|
2829
|
-
<xsl:
|
2830
|
-
|
2831
|
-
|
2832
|
-
|
2833
|
-
|
2834
|
-
|
2835
|
-
</xsl:otherwise>
|
2836
|
-
</xsl:choose>
|
2766
|
+
<xsl:variable name="table_width">
|
2767
|
+
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
2768
|
+
100%
|
2769
|
+
|
2770
|
+
|
2771
|
+
</xsl:variable>
|
2837
2772
|
|
2838
|
-
|
2839
|
-
|
2840
|
-
|
2841
|
-
|
2842
|
-
|
2843
|
-
|
2844
|
-
|
2845
|
-
|
2846
|
-
|
2847
|
-
|
2848
|
-
|
2849
|
-
|
2850
|
-
|
2851
|
-
|
2852
|
-
|
2853
|
-
<
|
2854
|
-
|
2855
|
-
|
2773
|
+
<xsl:variable name="table_attributes">
|
2774
|
+
<attribute name="table-layout">fixed</attribute>
|
2775
|
+
<attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
|
2776
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2777
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2778
|
+
|
2779
|
+
<attribute name="border">1.5pt solid black</attribute>
|
2780
|
+
<xsl:if test="*[local-name()='thead']">
|
2781
|
+
<attribute name="border-top">1pt solid black</attribute>
|
2782
|
+
</xsl:if>
|
2783
|
+
|
2784
|
+
|
2785
|
+
|
2786
|
+
|
2787
|
+
<attribute name="margin-left">0mm</attribute>
|
2788
|
+
<attribute name="margin-right">0mm</attribute>
|
2789
|
+
|
2790
|
+
|
2791
|
+
|
2792
|
+
|
2793
|
+
|
2794
|
+
|
2795
|
+
|
2796
|
+
</xsl:variable>
|
2856
2797
|
|
2857
|
-
|
2798
|
+
|
2799
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2800
|
+
|
2801
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2802
|
+
<xsl:attribute name="{@name}">
|
2803
|
+
<xsl:value-of select="."/>
|
2804
|
+
</xsl:attribute>
|
2805
|
+
</xsl:for-each>
|
2806
|
+
|
2807
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2808
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2809
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2810
|
+
</xsl:if>
|
2811
|
+
|
2858
2812
|
<xsl:choose>
|
2859
|
-
<xsl:when test="
|
2860
|
-
<
|
2813
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2814
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
2815
|
+
<fo:table-column column-width="{@width}"/>
|
2816
|
+
</xsl:for-each>
|
2861
2817
|
</xsl:when>
|
2862
2818
|
<xsl:otherwise>
|
2863
|
-
<
|
2819
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2820
|
+
<xsl:choose>
|
2821
|
+
<xsl:when test=". = 1 or . = 0">
|
2822
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2823
|
+
</xsl:when>
|
2824
|
+
<xsl:otherwise>
|
2825
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2826
|
+
</xsl:otherwise>
|
2827
|
+
</xsl:choose>
|
2828
|
+
</xsl:for-each>
|
2829
|
+
</xsl:otherwise>
|
2830
|
+
</xsl:choose>
|
2831
|
+
|
2832
|
+
<xsl:choose>
|
2833
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
2834
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2835
|
+
</xsl:when>
|
2836
|
+
<xsl:otherwise>
|
2837
|
+
<xsl:apply-templates/>
|
2864
2838
|
</xsl:otherwise>
|
2865
2839
|
</xsl:choose>
|
2840
|
+
|
2841
|
+
</fo:table>
|
2842
|
+
|
2843
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
2844
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2845
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2846
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2847
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2848
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
2849
|
+
</xsl:call-template>
|
2866
2850
|
</xsl:for-each>
|
2867
|
-
|
2868
|
-
|
2869
|
-
|
2870
|
-
|
2871
|
-
|
2872
|
-
|
2873
|
-
|
2851
|
+
|
2852
|
+
<!-- insert footer as table -->
|
2853
|
+
<!-- <fo:table>
|
2854
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
2855
|
+
<xsl:attribute name="{@name}">
|
2856
|
+
<xsl:value-of select="."/>
|
2857
|
+
</xsl:attribute>
|
2858
|
+
</xsl:for-each>
|
2859
|
+
|
2860
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2861
|
+
<xsl:choose>
|
2862
|
+
<xsl:when test=". = 1 or . = 0">
|
2863
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2864
|
+
</xsl:when>
|
2865
|
+
<xsl:otherwise>
|
2866
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2867
|
+
</xsl:otherwise>
|
2868
|
+
</xsl:choose>
|
2869
|
+
</xsl:for-each>
|
2870
|
+
</fo:table>-->
|
2871
|
+
|
2872
|
+
|
2873
|
+
|
2874
|
+
|
2875
|
+
|
2876
|
+
</fo:block-container>
|
2877
|
+
</xsl:variable>
|
2878
|
+
|
2879
|
+
|
2880
|
+
|
2881
|
+
<xsl:choose>
|
2882
|
+
<xsl:when test="@width">
|
2883
|
+
|
2884
|
+
<!-- centered table when table name is centered (see table-name-style) -->
|
2885
|
+
|
2886
|
+
<fo:table table-layout="fixed" width="100%">
|
2887
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
2888
|
+
<fo:table-column column-width="{@width}"/>
|
2889
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
2890
|
+
<fo:table-body>
|
2891
|
+
<fo:table-row>
|
2892
|
+
<fo:table-cell column-number="2">
|
2893
|
+
<fo:block><xsl:copy-of select="$table"/></fo:block>
|
2894
|
+
</fo:table-cell>
|
2895
|
+
</fo:table-row>
|
2896
|
+
</fo:table-body>
|
2897
|
+
</fo:table>
|
2898
|
+
|
2899
|
+
|
2900
|
+
|
2901
|
+
|
2902
|
+
</xsl:when>
|
2903
|
+
<xsl:otherwise>
|
2904
|
+
<xsl:copy-of select="$table"/>
|
2905
|
+
</xsl:otherwise>
|
2906
|
+
</xsl:choose>
|
2907
|
+
|
2874
2908
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
2875
2909
|
<xsl:if test="normalize-space() != ''">
|
2876
2910
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -3777,7 +3811,7 @@
|
|
3777
3811
|
<xsl:with-param name="table" select="$html-table"/>
|
3778
3812
|
</xsl:call-template>
|
3779
3813
|
</xsl:variable>
|
3780
|
-
<!-- colwidths=<xsl:
|
3814
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
3781
3815
|
<xsl:variable name="maxlength_dt">
|
3782
3816
|
<xsl:call-template name="getMaxLength_dt"/>
|
3783
3817
|
</xsl:variable>
|
@@ -3806,13 +3840,22 @@
|
|
3806
3840
|
</xsl:when>
|
3807
3841
|
<xsl:otherwise>
|
3808
3842
|
<xsl:choose>
|
3843
|
+
<!-- to set width check most wide chars like `W` -->
|
3809
3844
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
3810
|
-
<fo:table-column column-width="
|
3811
|
-
<fo:table-column column-width="
|
3845
|
+
<fo:table-column column-width="7%"/>
|
3846
|
+
<fo:table-column column-width="93%"/>
|
3847
|
+
</xsl:when>
|
3848
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like ABC, etc -->
|
3849
|
+
<fo:table-column column-width="15%"/>
|
3850
|
+
<fo:table-column column-width="85%"/>
|
3851
|
+
</xsl:when>
|
3852
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 7"> <!-- if dt contains short text like ABCDEF, etc -->
|
3853
|
+
<fo:table-column column-width="20%"/>
|
3854
|
+
<fo:table-column column-width="80%"/>
|
3812
3855
|
</xsl:when>
|
3813
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <=
|
3814
|
-
<fo:table-column column-width="
|
3815
|
-
<fo:table-column column-width="
|
3856
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
|
3857
|
+
<fo:table-column column-width="25%"/>
|
3858
|
+
<fo:table-column column-width="75%"/>
|
3816
3859
|
</xsl:when>
|
3817
3860
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
3818
3861
|
<fo:table-column column-width="60%"/>
|
@@ -4121,6 +4164,10 @@
|
|
4121
4164
|
<xsl:param name="text" select="."/>
|
4122
4165
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
4123
4166
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
4167
|
+
</xsl:template><xsl:template name="add-zero-spaces-link-java">
|
4168
|
+
<xsl:param name="text" select="."/>
|
4169
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
4170
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1')"/>
|
4124
4171
|
</xsl:template><xsl:template name="add-zero-spaces">
|
4125
4172
|
<xsl:param name="text" select="."/>
|
4126
4173
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -4381,6 +4428,11 @@
|
|
4381
4428
|
<!-- replace start and end spaces to non-break space -->
|
4382
4429
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
4383
4430
|
</xsl:copy>
|
4431
|
+
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
4432
|
+
<xsl:copy>
|
4433
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
4434
|
+
</xsl:copy>
|
4435
|
+
<mathml:mspace width="0.5ex"/>
|
4384
4436
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
4385
4437
|
<xsl:variable name="target">
|
4386
4438
|
<xsl:choose>
|
@@ -4402,7 +4454,10 @@
|
|
4402
4454
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
4403
4455
|
<xsl:choose>
|
4404
4456
|
<xsl:when test="normalize-space(.) = ''">
|
4405
|
-
<xsl:value-of select="$target"/>
|
4457
|
+
<!-- <xsl:value-of select="$target"/> -->
|
4458
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
4459
|
+
<xsl:with-param name="text" select="$target"/>
|
4460
|
+
</xsl:call-template>
|
4406
4461
|
</xsl:when>
|
4407
4462
|
<xsl:otherwise>
|
4408
4463
|
<xsl:apply-templates/>
|
@@ -4875,6 +4930,8 @@
|
|
4875
4930
|
<xsl:copy>
|
4876
4931
|
<xsl:apply-templates mode="contents_item"/>
|
4877
4932
|
</xsl:copy>
|
4933
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
4934
|
+
<xsl:copy-of select="."/>
|
4878
4935
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4879
4936
|
<xsl:text> </xsl:text>
|
4880
4937
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -5281,11 +5338,13 @@
|
|
5281
5338
|
</xsl:if>
|
5282
5339
|
</xsl:if>
|
5283
5340
|
|
5341
|
+
|
5284
5342
|
<fo:block-container margin-left="0mm">
|
5285
5343
|
|
5286
5344
|
<fo:block xsl:use-attribute-sets="quote-style">
|
5287
5345
|
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
5288
|
-
|
5346
|
+
|
5347
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
5289
5348
|
</fo:block>
|
5290
5349
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
5291
5350
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -5700,7 +5759,7 @@
|
|
5700
5759
|
<xsl:param name="charDelim" select="', '"/>
|
5701
5760
|
<xsl:choose>
|
5702
5761
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
5703
|
-
<xsl:for-each select="
|
5762
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
5704
5763
|
<xsl:sort data-type="text" order="ascending"/>
|
5705
5764
|
<xsl:call-template name="insertKeyword">
|
5706
5765
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -5709,7 +5768,7 @@
|
|
5709
5768
|
</xsl:for-each>
|
5710
5769
|
</xsl:when>
|
5711
5770
|
<xsl:otherwise>
|
5712
|
-
<xsl:for-each select="
|
5771
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
5713
5772
|
<xsl:call-template name="insertKeyword">
|
5714
5773
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
5715
5774
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -5726,6 +5785,9 @@
|
|
5726
5785
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
5727
5786
|
</xsl:choose>
|
5728
5787
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
5788
|
+
<xsl:variable name="lang">
|
5789
|
+
<xsl:call-template name="getLang"/>
|
5790
|
+
</xsl:variable>
|
5729
5791
|
<fo:declarations>
|
5730
5792
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
5731
5793
|
<pdf:dictionary type="normal" key="ViewerPreferences">
|
@@ -5738,13 +5800,16 @@
|
|
5738
5800
|
<!-- Dublin Core properties go here -->
|
5739
5801
|
<dc:title>
|
5740
5802
|
<xsl:variable name="title">
|
5741
|
-
|
5742
|
-
|
5743
|
-
|
5744
|
-
|
5745
|
-
|
5746
|
-
|
5747
|
-
|
5803
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
5804
|
+
|
5805
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
|
5806
|
+
|
5807
|
+
|
5808
|
+
|
5809
|
+
|
5810
|
+
|
5811
|
+
|
5812
|
+
</xsl:for-each>
|
5748
5813
|
</xsl:variable>
|
5749
5814
|
<xsl:choose>
|
5750
5815
|
<xsl:when test="normalize-space($title) != ''">
|
@@ -5756,19 +5821,21 @@
|
|
5756
5821
|
</xsl:choose>
|
5757
5822
|
</dc:title>
|
5758
5823
|
<dc:creator>
|
5759
|
-
|
5760
|
-
|
5761
|
-
|
5762
|
-
|
5763
|
-
|
5764
|
-
|
5765
|
-
<dc:description>
|
5766
|
-
<xsl:variable name="abstract">
|
5824
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
5825
|
+
|
5826
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
5827
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
5828
|
+
<xsl:if test="position() != last()">; </xsl:if>
|
5829
|
+
</xsl:for-each>
|
5767
5830
|
|
5768
|
-
<xsl:copy-of select="/*/*[local-name() = 'bibliography']/*[local-name() = 'references']/*[local-name() = 'bibitem']/*[local-name() = 'abstract']//text()"/>
|
5769
5831
|
|
5770
5832
|
|
5833
|
+
</xsl:for-each>
|
5834
|
+
</dc:creator>
|
5835
|
+
<dc:description>
|
5836
|
+
<xsl:variable name="abstract">
|
5771
5837
|
|
5838
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
5772
5839
|
|
5773
5840
|
|
5774
5841
|
</xsl:variable>
|