metanorma-jis 0.0.5 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/jis/html/header.html +70 -33
- data/lib/isodoc/jis/html/wordstyle.css +10 -13
- data/lib/isodoc/jis/html/wordstyle.scss +10 -13
- data/lib/isodoc/jis/jis.international-standard.xsl +620 -66
- data/lib/isodoc/jis/presentation_xml_convert.rb +6 -0
- data/lib/isodoc/jis/word_convert.rb +1 -0
- data/lib/isodoc/jis/xref.rb +42 -0
- data/lib/metanorma/jis/cleanup.rb +23 -0
- data/lib/metanorma/jis/converter.rb +5 -0
- data/lib/metanorma/jis/isodoc.rng +23 -1
- data/lib/metanorma/jis/version.rb +1 -1
- data/metanorma-jis.gemspec +2 -0
- metadata +2 -2
@@ -272,7 +272,7 @@
|
|
272
272
|
<xsl:variable name="paged_xml_preface" select="xalan:nodeset($paged_xml_preface_)"/>
|
273
273
|
|
274
274
|
<xsl:if test="$paged_xml_preface/*[local-name()='page'] and count($paged_xml_preface/*[local-name()='page']/*) != 0">
|
275
|
-
<!--
|
275
|
+
<!-- Preface pages -->
|
276
276
|
<fo:page-sequence master-reference="document_preface" force-page-count="no-force">
|
277
277
|
|
278
278
|
<fo:static-content flow-name="xsl-footnote-separator">
|
@@ -298,7 +298,7 @@
|
|
298
298
|
</xsl:for-each>
|
299
299
|
</fo:block>
|
300
300
|
</fo:flow>
|
301
|
-
</fo:page-sequence> <!-- END
|
301
|
+
</fo:page-sequence> <!-- END Preface pages -->
|
302
302
|
</xsl:if>
|
303
303
|
|
304
304
|
<!-- Document type rendering -->
|
@@ -467,6 +467,12 @@
|
|
467
467
|
</fo:root>
|
468
468
|
</xsl:template>
|
469
469
|
|
470
|
+
<xsl:template match="*[local-name() = 'references'][not(@hidden = 'true')]" mode="linear_xml" priority="2">
|
471
|
+
<xsl:copy>
|
472
|
+
<xsl:apply-templates select="@*|node()" mode="linear_xml"/>
|
473
|
+
</xsl:copy>
|
474
|
+
</xsl:template>
|
475
|
+
|
470
476
|
<xsl:template match="*[local-name() = 'colon_gothic']">
|
471
477
|
<!-- replace : to : (Fullwidth colon) and render it in the font IPAexGothic -->
|
472
478
|
<fo:inline font-family="IPAexGothic">:</fo:inline>
|
@@ -941,7 +947,7 @@
|
|
941
947
|
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
942
948
|
</xsl:if>
|
943
949
|
|
944
|
-
<xsl:if test="parent::jis:li or following-sibling::*[1][self::jis:ol or self::jis:ul or self::jis:note or self::jis:example]">
|
950
|
+
<xsl:if test="parent::jis:li or following-sibling::*[1][self::jis:ol or self::jis:ul or self::jis:note or self::jis:example] or parent::jis:quote">
|
945
951
|
<xsl:attribute name="margin-bottom">4pt</xsl:attribute>
|
946
952
|
</xsl:if>
|
947
953
|
|
@@ -989,6 +995,119 @@
|
|
989
995
|
</fo:block>
|
990
996
|
</xsl:template>
|
991
997
|
|
998
|
+
<xsl:template match="*[local-name()='li']" priority="2">
|
999
|
+
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
1000
|
+
<xsl:copy-of select="@id"/>
|
1001
|
+
|
1002
|
+
<xsl:call-template name="refine_list-item-style"/>
|
1003
|
+
|
1004
|
+
<fo:list-item-label end-indent="label-end()">
|
1005
|
+
<fo:block xsl:use-attribute-sets="list-item-label-style">
|
1006
|
+
|
1007
|
+
<xsl:call-template name="refine_list-item-label-style"/>
|
1008
|
+
|
1009
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
1010
|
+
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
1011
|
+
<xsl:call-template name="append_add-style"/>
|
1012
|
+
</xsl:if>
|
1013
|
+
|
1014
|
+
<xsl:variable name="list_item_label_">
|
1015
|
+
<xsl:call-template name="getListItemFormat"/>
|
1016
|
+
</xsl:variable>
|
1017
|
+
|
1018
|
+
<xsl:variable name="list_item_label">
|
1019
|
+
<xsl:choose>
|
1020
|
+
<xsl:when test="(../@type = 'arabic' or ../@type = 'alphabet' or ../@type = 'alphabetic' or ../@type = 'roman') and not(java:endsWith(java:java.lang.String.new($list_item_label_),')'))">
|
1021
|
+
<xsl:value-of select="concat($list_item_label_, ')')"/>
|
1022
|
+
</xsl:when>
|
1023
|
+
<xsl:otherwise><xsl:value-of select="$list_item_label_"/></xsl:otherwise>
|
1024
|
+
</xsl:choose>
|
1025
|
+
</xsl:variable>
|
1026
|
+
|
1027
|
+
<xsl:choose>
|
1028
|
+
<xsl:when test="contains($list_item_label, ')')">
|
1029
|
+
<xsl:value-of select="substring-before($list_item_label,')')"/>
|
1030
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
1031
|
+
<xsl:value-of select="substring-after($list_item_label,')')"/>
|
1032
|
+
</xsl:when>
|
1033
|
+
<xsl:otherwise>
|
1034
|
+
<xsl:value-of select="$list_item_label"/>
|
1035
|
+
</xsl:otherwise>
|
1036
|
+
</xsl:choose>
|
1037
|
+
|
1038
|
+
</fo:block>
|
1039
|
+
</fo:list-item-label>
|
1040
|
+
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
1041
|
+
<fo:block>
|
1042
|
+
|
1043
|
+
<xsl:call-template name="refine_list-item-body-style"/>
|
1044
|
+
|
1045
|
+
<xsl:apply-templates mode="list_jis"/>
|
1046
|
+
|
1047
|
+
<!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
|
1048
|
+
|
1049
|
+
<xsl:for-each select="./bsi:note">
|
1050
|
+
<xsl:call-template name="note"/>
|
1051
|
+
</xsl:for-each> -->
|
1052
|
+
</fo:block>
|
1053
|
+
</fo:list-item-body>
|
1054
|
+
</fo:list-item>
|
1055
|
+
</xsl:template>
|
1056
|
+
|
1057
|
+
<xsl:template match="node()" priority="2" mode="list_jis">
|
1058
|
+
<xsl:apply-templates select="."/>
|
1059
|
+
</xsl:template>
|
1060
|
+
|
1061
|
+
<!-- display footnote after last element in li, except ol or ul -->
|
1062
|
+
<xsl:template match="*[local-name()='li']/*[not(local-name() = 'ul') and not(local-name() = 'ol')][last()]" priority="3" mode="list_jis">
|
1063
|
+
<xsl:apply-templates select="."/>
|
1064
|
+
|
1065
|
+
<xsl:variable name="list_id" select="ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1]/@id"/>
|
1066
|
+
<!-- render footnotes after current list-item, if there aren't footnotes anymore in the list -->
|
1067
|
+
<!-- i.e. i.e. if list-item is latest with footnote -->
|
1068
|
+
<xsl:if test="ancestor::*[local-name() = 'li'][1]//jis:fn[ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1][@id = $list_id]] and not(ancestor::*[local-name() = 'li'][1]/following-sibling::*[local-name() = 'li'][.//jis:fn[ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1][@id = $list_id]]])">
|
1069
|
+
<xsl:apply-templates select="ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1]//jis:fn[ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1][@id = $list_id]][generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
|
1070
|
+
<xsl:with-param name="ancestor">li</xsl:with-param>
|
1071
|
+
</xsl:apply-templates>
|
1072
|
+
</xsl:if>
|
1073
|
+
</xsl:template>
|
1074
|
+
|
1075
|
+
<xsl:template match="jis:fn" mode="fn_after_element">
|
1076
|
+
<xsl:param name="ancestor">li</xsl:param>
|
1077
|
+
|
1078
|
+
<xsl:variable name="ancestor_tree_">
|
1079
|
+
<xsl:for-each select="ancestor::*[local-name() != 'p' and local-name() != 'bibitem' and local-name() != 'biblio-tag']">
|
1080
|
+
<item><xsl:value-of select="local-name()"/></item>
|
1081
|
+
</xsl:for-each>
|
1082
|
+
</xsl:variable>
|
1083
|
+
<xsl:variable name="ancestor_tree" select="xalan:nodeset($ancestor_tree_)"/>
|
1084
|
+
<!-- <debug><xsl:copy-of select="$ancestor_tree"/></debug>
|
1085
|
+
<debug><ancestor><xsl:value-of select="$ancestor"/></ancestor></debug> -->
|
1086
|
+
|
1087
|
+
<xsl:if test="$ancestor_tree//item[last()][. = $ancestor]">
|
1088
|
+
<fo:block-container margin-left="11mm" margin-bottom="4pt" id="{@ref_id}">
|
1089
|
+
|
1090
|
+
<xsl:if test="position() = last()">
|
1091
|
+
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
1092
|
+
</xsl:if>
|
1093
|
+
<fo:block-container margin-left="0mm">
|
1094
|
+
<fo:list-block provisional-distance-between-starts="10mm">
|
1095
|
+
<fo:list-item>
|
1096
|
+
<fo:list-item-label end-indent="label-end()">
|
1097
|
+
<fo:block xsl:use-attribute-sets="note-name-style">注 <fo:inline xsl:use-attribute-sets="fn-num-style"><xsl:value-of select="@current_fn_number"/><fo:inline font-weight="normal">)</fo:inline></fo:inline></fo:block>
|
1098
|
+
</fo:list-item-label>
|
1099
|
+
<fo:list-item-body start-indent="body-start()">
|
1100
|
+
<fo:block>
|
1101
|
+
<xsl:apply-templates/>
|
1102
|
+
</fo:block>
|
1103
|
+
</fo:list-item-body>
|
1104
|
+
</fo:list-item>
|
1105
|
+
</fo:list-block>
|
1106
|
+
</fo:block-container>
|
1107
|
+
</fo:block-container>
|
1108
|
+
</xsl:if>
|
1109
|
+
</xsl:template>
|
1110
|
+
|
992
1111
|
<xsl:template name="makePagedXML">
|
993
1112
|
<xsl:param name="structured_xml"/>
|
994
1113
|
<xsl:choose>
|
@@ -1062,6 +1181,18 @@
|
|
1062
1181
|
<xsl:copy-of select="xalan:nodeset($text_en)/text/node()"/>
|
1063
1182
|
</xsl:template>
|
1064
1183
|
|
1184
|
+
<!-- for $contents -->
|
1185
|
+
<xsl:template match="title/text()">
|
1186
|
+
<xsl:variable name="regex_en_contents">([^\u3000-\u9FFF\uF900-\uFFFF\(\)]{1,})</xsl:variable>
|
1187
|
+
<xsl:variable name="text_en_" select="java:replaceAll(java:java.lang.String.new(.), $regex_en_contents, concat($tag_font_en_bold_open,'$1',$tag_font_en_bold_close))"/>
|
1188
|
+
<xsl:variable name="text_en"><text><xsl:call-template name="replace_text_tags">
|
1189
|
+
<xsl:with-param name="tag_open" select="$tag_font_en_bold_open"/>
|
1190
|
+
<xsl:with-param name="tag_close" select="$tag_font_en_bold_close"/>
|
1191
|
+
<xsl:with-param name="text" select="$text_en_"/>
|
1192
|
+
</xsl:call-template></text></xsl:variable>
|
1193
|
+
<xsl:apply-templates select="xalan:nodeset($text_en)/text/node()"/>
|
1194
|
+
</xsl:template>
|
1195
|
+
|
1065
1196
|
<!-- move example title to the first paragraph -->
|
1066
1197
|
<xsl:template match="jis:example[contains(jis:name/text(), ' — ')]" mode="update_xml_step1">
|
1067
1198
|
<xsl:copy>
|
@@ -1615,6 +1746,10 @@
|
|
1615
1746
|
|
1616
1747
|
</xsl:attribute-set>
|
1617
1748
|
|
1749
|
+
<xsl:template name="refine_link-style">
|
1750
|
+
|
1751
|
+
</xsl:template> <!-- refine_link-style -->
|
1752
|
+
|
1618
1753
|
<xsl:attribute-set name="sourcecode-container-style">
|
1619
1754
|
|
1620
1755
|
</xsl:attribute-set>
|
@@ -1626,6 +1761,10 @@
|
|
1626
1761
|
|
1627
1762
|
</xsl:attribute-set>
|
1628
1763
|
|
1764
|
+
<xsl:template name="refine_sourcecode-style">
|
1765
|
+
|
1766
|
+
</xsl:template> <!-- refine_sourcecode-style -->
|
1767
|
+
|
1629
1768
|
<xsl:attribute-set name="pre-style">
|
1630
1769
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
1631
1770
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -1707,6 +1846,10 @@
|
|
1707
1846
|
|
1708
1847
|
</xsl:attribute-set> <!-- example-style -->
|
1709
1848
|
|
1849
|
+
<xsl:template name="refine_example-style">
|
1850
|
+
|
1851
|
+
</xsl:template> <!-- refine_example-style -->
|
1852
|
+
|
1710
1853
|
<xsl:attribute-set name="example-body-style">
|
1711
1854
|
|
1712
1855
|
</xsl:attribute-set> <!-- example-body-style -->
|
@@ -1723,6 +1866,10 @@
|
|
1723
1866
|
|
1724
1867
|
</xsl:attribute-set> <!-- example-p-style -->
|
1725
1868
|
|
1869
|
+
<xsl:template name="refine_example-p-style">
|
1870
|
+
|
1871
|
+
</xsl:template> <!-- refine_example-p-style -->
|
1872
|
+
|
1726
1873
|
<xsl:attribute-set name="termexample-name-style">
|
1727
1874
|
|
1728
1875
|
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
@@ -1751,6 +1898,12 @@
|
|
1751
1898
|
|
1752
1899
|
</xsl:attribute-set> <!-- table-container-style -->
|
1753
1900
|
|
1901
|
+
<xsl:template name="refine_table-container-style">
|
1902
|
+
<xsl:param name="margin-side"/>
|
1903
|
+
|
1904
|
+
<!-- end table block-container attributes -->
|
1905
|
+
</xsl:template> <!-- refine_table-container-style -->
|
1906
|
+
|
1754
1907
|
<xsl:attribute-set name="table-style">
|
1755
1908
|
<xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
|
1756
1909
|
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
@@ -1759,6 +1912,17 @@
|
|
1759
1912
|
|
1760
1913
|
</xsl:attribute-set><!-- table-style -->
|
1761
1914
|
|
1915
|
+
<xsl:template name="refine_table-style">
|
1916
|
+
<xsl:param name="margin-side"/>
|
1917
|
+
|
1918
|
+
<xsl:call-template name="setBordersTableArray"/>
|
1919
|
+
|
1920
|
+
<xsl:if test="ancestor::*[local-name()='preface']">
|
1921
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
1922
|
+
</xsl:if>
|
1923
|
+
|
1924
|
+
</xsl:template> <!-- refine_table-style -->
|
1925
|
+
|
1762
1926
|
<xsl:attribute-set name="table-name-style">
|
1763
1927
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1764
1928
|
|
@@ -1768,6 +1932,11 @@
|
|
1768
1932
|
|
1769
1933
|
</xsl:attribute-set> <!-- table-name-style -->
|
1770
1934
|
|
1935
|
+
<xsl:template name="refine_table-name-style">
|
1936
|
+
<xsl:param name="continued"/>
|
1937
|
+
|
1938
|
+
</xsl:template> <!-- refine_table-name-style -->
|
1939
|
+
|
1771
1940
|
<xsl:attribute-set name="table-row-style">
|
1772
1941
|
<xsl:attribute name="min-height">4mm</xsl:attribute>
|
1773
1942
|
|
@@ -1781,6 +1950,17 @@
|
|
1781
1950
|
|
1782
1951
|
</xsl:attribute-set>
|
1783
1952
|
|
1953
|
+
<xsl:template name="refine_table-header-row-style">
|
1954
|
+
|
1955
|
+
<xsl:call-template name="setBordersTableArray"/>
|
1956
|
+
|
1957
|
+
<xsl:if test="ancestor::*[local-name() = 'preface']">
|
1958
|
+
<xsl:attribute name="border-top">none</xsl:attribute>
|
1959
|
+
<xsl:attribute name="border-bottom">none</xsl:attribute>
|
1960
|
+
</xsl:if>
|
1961
|
+
|
1962
|
+
</xsl:template> <!-- refine_table-header-row-style -->
|
1963
|
+
|
1784
1964
|
<xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
|
1785
1965
|
|
1786
1966
|
<xsl:attribute name="border-left"><xsl:value-of select="$table-border"/></xsl:attribute>
|
@@ -1788,10 +1968,20 @@
|
|
1788
1968
|
|
1789
1969
|
</xsl:attribute-set>
|
1790
1970
|
|
1971
|
+
<xsl:template name="refine_table-footer-row-style">
|
1972
|
+
|
1973
|
+
</xsl:template> <!-- refine_table-footer-row-style -->
|
1974
|
+
|
1791
1975
|
<xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
|
1792
1976
|
|
1793
1977
|
</xsl:attribute-set>
|
1794
1978
|
|
1979
|
+
<xsl:template name="refine_table-body-row-style">
|
1980
|
+
|
1981
|
+
<xsl:call-template name="setBordersTableArray"/>
|
1982
|
+
|
1983
|
+
</xsl:template> <!-- refine_table-body-row-style -->
|
1984
|
+
|
1795
1985
|
<xsl:attribute-set name="table-header-cell-style">
|
1796
1986
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1797
1987
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
@@ -1805,6 +1995,24 @@
|
|
1805
1995
|
|
1806
1996
|
</xsl:attribute-set> <!-- table-header-cell-style -->
|
1807
1997
|
|
1998
|
+
<xsl:template name="refine_table-header-cell-style">
|
1999
|
+
|
2000
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
2001
|
+
|
2002
|
+
<xsl:call-template name="setBordersTableArray"/>
|
2003
|
+
|
2004
|
+
<xsl:if test="ancestor::*[local-name()='preface']">
|
2005
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
2006
|
+
</xsl:if>
|
2007
|
+
|
2008
|
+
<xsl:if test="$lang = 'ar'">
|
2009
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2010
|
+
</xsl:if>
|
2011
|
+
|
2012
|
+
<xsl:call-template name="setTableCellAttributes"/>
|
2013
|
+
|
2014
|
+
</xsl:template> <!-- refine_table-header-cell-style -->
|
2015
|
+
|
1808
2016
|
<xsl:attribute-set name="table-cell-style">
|
1809
2017
|
<xsl:attribute name="display-align">center</xsl:attribute>
|
1810
2018
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
@@ -1815,6 +2023,22 @@
|
|
1815
2023
|
|
1816
2024
|
</xsl:attribute-set> <!-- table-cell-style -->
|
1817
2025
|
|
2026
|
+
<xsl:template name="refine_table-cell-style">
|
2027
|
+
|
2028
|
+
<xsl:if test="$lang = 'ar'">
|
2029
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2030
|
+
</xsl:if>
|
2031
|
+
|
2032
|
+
<!-- bsi -->
|
2033
|
+
|
2034
|
+
<xsl:call-template name="setBordersTableArray"/>
|
2035
|
+
|
2036
|
+
<xsl:if test="ancestor::*[local-name() = 'preface']">
|
2037
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
2038
|
+
</xsl:if>
|
2039
|
+
|
2040
|
+
</xsl:template> <!-- refine_table-cell-style -->
|
2041
|
+
|
1818
2042
|
<xsl:attribute-set name="table-footer-cell-style">
|
1819
2043
|
<xsl:attribute name="border">solid black 1pt</xsl:attribute>
|
1820
2044
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
@@ -1826,12 +2050,20 @@
|
|
1826
2050
|
|
1827
2051
|
</xsl:attribute-set> <!-- table-footer-cell-style -->
|
1828
2052
|
|
2053
|
+
<xsl:template name="refine_table-footer-cell-style">
|
2054
|
+
|
2055
|
+
</xsl:template> <!-- refine_table-footer-cell-style -->
|
2056
|
+
|
1829
2057
|
<xsl:attribute-set name="table-note-style">
|
1830
2058
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1831
2059
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1832
2060
|
|
1833
2061
|
</xsl:attribute-set><!-- table-note-style -->
|
1834
2062
|
|
2063
|
+
<xsl:template name="refine_table-note-style">
|
2064
|
+
|
2065
|
+
</xsl:template> <!-- refine_table-note-style -->
|
2066
|
+
|
1835
2067
|
<xsl:attribute-set name="table-fn-style">
|
1836
2068
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1837
2069
|
|
@@ -1894,6 +2126,10 @@
|
|
1894
2126
|
|
1895
2127
|
</xsl:attribute-set>
|
1896
2128
|
|
2129
|
+
<xsl:template name="refine_dt-cell-style">
|
2130
|
+
|
2131
|
+
</xsl:template> <!-- refine_dt-cell-style -->
|
2132
|
+
|
1897
2133
|
<xsl:attribute-set name="dt-block-style">
|
1898
2134
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
1899
2135
|
|
@@ -1901,6 +2137,10 @@
|
|
1901
2137
|
|
1902
2138
|
</xsl:attribute-set>
|
1903
2139
|
|
2140
|
+
<xsl:template name="refine_dt-block-style">
|
2141
|
+
|
2142
|
+
</xsl:template> <!-- refine_dt-block-style -->
|
2143
|
+
|
1904
2144
|
<xsl:attribute-set name="dl-name-style">
|
1905
2145
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1906
2146
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -1912,6 +2152,10 @@
|
|
1912
2152
|
|
1913
2153
|
</xsl:attribute-set>
|
1914
2154
|
|
2155
|
+
<xsl:template name="refine_dd-cell-style">
|
2156
|
+
|
2157
|
+
</xsl:template> <!-- refine_dd-cell-style -->
|
2158
|
+
|
1915
2159
|
<!-- ========================== -->
|
1916
2160
|
<!-- END Definition's list styles -->
|
1917
2161
|
<!-- ========================== -->
|
@@ -1925,7 +2169,6 @@
|
|
1925
2169
|
</xsl:attribute-set>
|
1926
2170
|
|
1927
2171
|
<xsl:attribute-set name="xref-style">
|
1928
|
-
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
1929
2172
|
|
1930
2173
|
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
1931
2174
|
|
@@ -1935,6 +2178,12 @@
|
|
1935
2178
|
|
1936
2179
|
</xsl:attribute-set>
|
1937
2180
|
|
2181
|
+
<xsl:template name="refine_eref-style">
|
2182
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
2183
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
2184
|
+
|
2185
|
+
</xsl:template> <!-- refine_eref-style -->
|
2186
|
+
|
1938
2187
|
<xsl:attribute-set name="note-style">
|
1939
2188
|
|
1940
2189
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
@@ -1942,6 +2191,10 @@
|
|
1942
2191
|
|
1943
2192
|
</xsl:attribute-set>
|
1944
2193
|
|
2194
|
+
<xsl:template name="refine_note-style">
|
2195
|
+
|
2196
|
+
</xsl:template>
|
2197
|
+
|
1945
2198
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
1946
2199
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
1947
2200
|
|
@@ -1951,11 +2204,19 @@
|
|
1951
2204
|
|
1952
2205
|
</xsl:attribute-set>
|
1953
2206
|
|
2207
|
+
<xsl:template name="refine_note-name-style">
|
2208
|
+
|
2209
|
+
</xsl:template> <!-- refine_note-name-style -->
|
2210
|
+
|
1954
2211
|
<xsl:attribute-set name="table-note-name-style">
|
1955
2212
|
<xsl:attribute name="padding-right">2mm</xsl:attribute>
|
1956
2213
|
|
1957
2214
|
</xsl:attribute-set>
|
1958
2215
|
|
2216
|
+
<xsl:template name="refine_table-note-name-style">
|
2217
|
+
|
2218
|
+
</xsl:template> <!-- refine_table-note-name-style -->
|
2219
|
+
|
1959
2220
|
<xsl:attribute-set name="note-p-style">
|
1960
2221
|
|
1961
2222
|
</xsl:attribute-set>
|
@@ -1968,12 +2229,20 @@
|
|
1968
2229
|
|
1969
2230
|
</xsl:attribute-set>
|
1970
2231
|
|
2232
|
+
<xsl:template name="refine_termnote-style">
|
2233
|
+
|
2234
|
+
</xsl:template> <!-- refine_termnote-style -->
|
2235
|
+
|
1971
2236
|
<xsl:attribute-set name="termnote-name-style">
|
1972
2237
|
|
1973
2238
|
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
1974
2239
|
|
1975
2240
|
</xsl:attribute-set>
|
1976
2241
|
|
2242
|
+
<xsl:template name="refine_termnote-name-style">
|
2243
|
+
|
2244
|
+
</xsl:template>
|
2245
|
+
|
1977
2246
|
<xsl:attribute-set name="termnote-p-style">
|
1978
2247
|
|
1979
2248
|
</xsl:attribute-set>
|
@@ -1982,8 +2251,19 @@
|
|
1982
2251
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
1983
2252
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
1984
2253
|
|
2254
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2255
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2256
|
+
|
1985
2257
|
</xsl:attribute-set>
|
1986
2258
|
|
2259
|
+
<xsl:template name="refine_quote-style">
|
2260
|
+
|
2261
|
+
<xsl:if test="ancestor::*[local-name() = 'li']">
|
2262
|
+
<xsl:attribute name="margin-left">7.5mm</xsl:attribute>
|
2263
|
+
</xsl:if>
|
2264
|
+
|
2265
|
+
</xsl:template>
|
2266
|
+
|
1987
2267
|
<xsl:attribute-set name="quote-source-style">
|
1988
2268
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
1989
2269
|
|
@@ -1995,6 +2275,10 @@
|
|
1995
2275
|
|
1996
2276
|
</xsl:attribute-set>
|
1997
2277
|
|
2278
|
+
<xsl:template name="refine_termsource-style">
|
2279
|
+
|
2280
|
+
</xsl:template> <!-- refine_termsource-style -->
|
2281
|
+
|
1998
2282
|
<xsl:attribute-set name="termsource-text-style">
|
1999
2283
|
|
2000
2284
|
</xsl:attribute-set>
|
@@ -2036,6 +2320,15 @@
|
|
2036
2320
|
|
2037
2321
|
</xsl:attribute-set>
|
2038
2322
|
|
2323
|
+
<xsl:template name="refine_figure-name-style">
|
2324
|
+
|
2325
|
+
<xsl:if test="ancestor::jis:figure">
|
2326
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2327
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2328
|
+
</xsl:if>
|
2329
|
+
|
2330
|
+
</xsl:template> <!-- refine_figure-name-style -->
|
2331
|
+
|
2039
2332
|
<xsl:attribute-set name="figure-source-style">
|
2040
2333
|
|
2041
2334
|
</xsl:attribute-set>
|
@@ -2052,6 +2345,10 @@
|
|
2052
2345
|
|
2053
2346
|
</xsl:attribute-set> <!-- formula-stem-block-style -->
|
2054
2347
|
|
2348
|
+
<xsl:template name="refine_formula-stem-block-style">
|
2349
|
+
|
2350
|
+
</xsl:template> <!-- refine_formula-stem-block-style -->
|
2351
|
+
|
2055
2352
|
<xsl:attribute-set name="formula-stem-number-style">
|
2056
2353
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
2057
2354
|
|
@@ -2063,6 +2360,10 @@
|
|
2063
2360
|
|
2064
2361
|
</xsl:attribute-set>
|
2065
2362
|
|
2363
|
+
<xsl:template name="refine_image-style">
|
2364
|
+
|
2365
|
+
</xsl:template>
|
2366
|
+
|
2066
2367
|
<xsl:attribute-set name="figure-pseudocode-p-style">
|
2067
2368
|
|
2068
2369
|
</xsl:attribute-set>
|
@@ -2153,6 +2454,10 @@
|
|
2153
2454
|
|
2154
2455
|
</xsl:attribute-set>
|
2155
2456
|
|
2457
|
+
<xsl:template name="refine_mathml-style">
|
2458
|
+
|
2459
|
+
</xsl:template>
|
2460
|
+
|
2156
2461
|
<xsl:attribute-set name="list-style">
|
2157
2462
|
|
2158
2463
|
<xsl:attribute name="provisional-distance-between-starts">7.5mm</xsl:attribute>
|
@@ -2160,6 +2465,10 @@
|
|
2160
2465
|
|
2161
2466
|
</xsl:attribute-set> <!-- list-style -->
|
2162
2467
|
|
2468
|
+
<xsl:template name="refine_list-style">
|
2469
|
+
|
2470
|
+
</xsl:template> <!-- refine_list-style -->
|
2471
|
+
|
2163
2472
|
<xsl:attribute-set name="list-name-style">
|
2164
2473
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2165
2474
|
|
@@ -2169,16 +2478,33 @@
|
|
2169
2478
|
|
2170
2479
|
</xsl:attribute-set>
|
2171
2480
|
|
2481
|
+
<xsl:template name="refine_list-item-style">
|
2482
|
+
|
2483
|
+
</xsl:template> <!-- refine_list-item-style -->
|
2484
|
+
|
2172
2485
|
<xsl:attribute-set name="list-item-label-style">
|
2173
2486
|
|
2174
2487
|
<xsl:attribute name="line-height">1.5</xsl:attribute>
|
2175
2488
|
|
2176
2489
|
</xsl:attribute-set>
|
2177
2490
|
|
2491
|
+
<xsl:template name="refine_list-item-label-style">
|
2492
|
+
|
2493
|
+
<xsl:if test="parent::*[local-name() = 'ol']">
|
2494
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2495
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2496
|
+
</xsl:if>
|
2497
|
+
|
2498
|
+
</xsl:template> <!-- refine_list-item-label-style -->
|
2499
|
+
|
2178
2500
|
<xsl:attribute-set name="list-item-body-style">
|
2179
2501
|
|
2180
2502
|
</xsl:attribute-set>
|
2181
2503
|
|
2504
|
+
<xsl:template name="refine_list-item-body-style">
|
2505
|
+
|
2506
|
+
</xsl:template> <!-- refine_list-item-body-style -->
|
2507
|
+
|
2182
2508
|
<xsl:attribute-set name="toc-style">
|
2183
2509
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2184
2510
|
</xsl:attribute-set>
|
@@ -2194,6 +2520,10 @@
|
|
2194
2520
|
|
2195
2521
|
</xsl:attribute-set>
|
2196
2522
|
|
2523
|
+
<xsl:template name="refine_fn-reference-style">
|
2524
|
+
|
2525
|
+
</xsl:template> <!-- refine_fn-reference-style -->
|
2526
|
+
|
2197
2527
|
<xsl:attribute-set name="fn-style">
|
2198
2528
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
2199
2529
|
</xsl:attribute-set>
|
@@ -2216,6 +2546,12 @@
|
|
2216
2546
|
|
2217
2547
|
</xsl:attribute-set>
|
2218
2548
|
|
2549
|
+
<xsl:template name="refine_fn-body-style">
|
2550
|
+
|
2551
|
+
<xsl:attribute name="font-family">IPAexMincho</xsl:attribute> <!-- prevent font for footnote in Times New Roman main text -->
|
2552
|
+
|
2553
|
+
</xsl:template> <!-- refine_fn-body-style -->
|
2554
|
+
|
2219
2555
|
<xsl:attribute-set name="fn-body-num-style">
|
2220
2556
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
2221
2557
|
|
@@ -2226,6 +2562,10 @@
|
|
2226
2562
|
|
2227
2563
|
</xsl:attribute-set> <!-- fn-body-num-style -->
|
2228
2564
|
|
2565
|
+
<xsl:template name="refine_fn-body-num-style">
|
2566
|
+
|
2567
|
+
</xsl:template> <!-- refine_fn-body-num-style -->
|
2568
|
+
|
2229
2569
|
<!-- admonition -->
|
2230
2570
|
<xsl:attribute-set name="admonition-style">
|
2231
2571
|
|
@@ -2293,6 +2633,11 @@
|
|
2293
2633
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
2294
2634
|
<xsl:attribute name="font-size">65%</xsl:attribute>
|
2295
2635
|
|
2636
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
2637
|
+
<xsl:attribute name="font-size">67%</xsl:attribute>
|
2638
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2639
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2640
|
+
|
2296
2641
|
</xsl:attribute-set> <!-- bibitem-note-fn-style -->
|
2297
2642
|
|
2298
2643
|
<!-- footnote number on the page bottom -->
|
@@ -2854,7 +3199,9 @@
|
|
2854
3199
|
|
2855
3200
|
<fo:block-container xsl:use-attribute-sets="table-container-style">
|
2856
3201
|
|
2857
|
-
|
3202
|
+
<xsl:call-template name="refine_table-container-style">
|
3203
|
+
<xsl:with-param name="margin-side" select="$margin-side"/>
|
3204
|
+
</xsl:call-template>
|
2858
3205
|
|
2859
3206
|
<!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
|
2860
3207
|
|
@@ -2875,11 +3222,9 @@
|
|
2875
3222
|
|
2876
3223
|
<xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
|
2877
3224
|
|
2878
|
-
<xsl:call-template name="
|
2879
|
-
|
2880
|
-
|
2881
|
-
<xsl:attribute name="border">none</xsl:attribute>
|
2882
|
-
</xsl:if>
|
3225
|
+
<xsl:call-template name="refine_table-style">
|
3226
|
+
<xsl:with-param name="margin-side" select="$margin-side"/>
|
3227
|
+
</xsl:call-template>
|
2883
3228
|
|
2884
3229
|
</xsl:element>
|
2885
3230
|
</xsl:variable>
|
@@ -2901,7 +3246,7 @@
|
|
2901
3246
|
</xsl:attribute>
|
2902
3247
|
</xsl:for-each>
|
2903
3248
|
|
2904
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3249
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
2905
3250
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2906
3251
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2907
3252
|
</xsl:if>
|
@@ -2945,7 +3290,7 @@
|
|
2945
3290
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2946
3291
|
</xsl:when>
|
2947
3292
|
<xsl:otherwise>
|
2948
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
3293
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
2949
3294
|
</xsl:otherwise>
|
2950
3295
|
</xsl:choose>
|
2951
3296
|
|
@@ -3015,6 +3360,10 @@
|
|
3015
3360
|
|
3016
3361
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
3017
3362
|
|
3363
|
+
<xsl:call-template name="refine_table-name-style">
|
3364
|
+
<xsl:with-param name="continued" select="$continued"/>
|
3365
|
+
</xsl:call-template>
|
3366
|
+
|
3018
3367
|
<xsl:choose>
|
3019
3368
|
<xsl:when test="$continued = 'true'">
|
3020
3369
|
|
@@ -3397,6 +3746,8 @@
|
|
3397
3746
|
<fo:table-row>
|
3398
3747
|
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
3399
3748
|
|
3749
|
+
<xsl:call-template name="refine_table-header-title-style"/>
|
3750
|
+
|
3400
3751
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
3401
3752
|
<xsl:with-param name="continued">true</xsl:with-param>
|
3402
3753
|
</xsl:apply-templates>
|
@@ -3409,6 +3760,10 @@
|
|
3409
3760
|
</fo:table-row>
|
3410
3761
|
</xsl:template> <!-- table-header-title -->
|
3411
3762
|
|
3763
|
+
<xsl:template name="refine_table-header-title-style">
|
3764
|
+
|
3765
|
+
</xsl:template> <!-- refine_table-header-title-style -->
|
3766
|
+
|
3412
3767
|
<xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
3413
3768
|
<fo:table-body>
|
3414
3769
|
<xsl:apply-templates/>
|
@@ -3433,7 +3788,7 @@
|
|
3433
3788
|
<xsl:param name="colwidths"/>
|
3434
3789
|
<xsl:param name="colgroup"/>
|
3435
3790
|
|
3436
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source']"/>
|
3791
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
3437
3792
|
|
3438
3793
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
3439
3794
|
|
@@ -3493,6 +3848,8 @@
|
|
3493
3848
|
<fo:table-row>
|
3494
3849
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
3495
3850
|
|
3851
|
+
<xsl:call-template name="refine_table-footer-cell-style"/>
|
3852
|
+
|
3496
3853
|
<xsl:call-template name="setBordersTableArray"/>
|
3497
3854
|
|
3498
3855
|
<!-- fn will be processed inside 'note' processing -->
|
@@ -3501,8 +3858,10 @@
|
|
3501
3858
|
|
3502
3859
|
<!-- except gb and bsi -->
|
3503
3860
|
|
3861
|
+
<xsl:apply-templates select="../*[local-name()='p']"/>
|
3504
3862
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
3505
3863
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
3864
|
+
<xsl:apply-templates select="../*[local-name()='example']"/>
|
3506
3865
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
3507
3866
|
|
3508
3867
|
<xsl:variable name="isDisplayRowSeparator">
|
@@ -3511,7 +3870,7 @@
|
|
3511
3870
|
|
3512
3871
|
<!-- horizontal row separator -->
|
3513
3872
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
3514
|
-
<xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
|
3873
|
+
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
3515
3874
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
3516
3875
|
|
3517
3876
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -3632,12 +3991,7 @@
|
|
3632
3991
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
3633
3992
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
3634
3993
|
|
3635
|
-
<xsl:call-template name="
|
3636
|
-
|
3637
|
-
<xsl:if test="ancestor::*[local-name() = 'preface']">
|
3638
|
-
<xsl:attribute name="border-top">none</xsl:attribute>
|
3639
|
-
<xsl:attribute name="border-bottom">none</xsl:attribute>
|
3640
|
-
</xsl:if>
|
3994
|
+
<xsl:call-template name="refine_table-header-row-style"/>
|
3641
3995
|
|
3642
3996
|
<xsl:call-template name="setTableRowAttributes"/>
|
3643
3997
|
|
@@ -3671,6 +4025,8 @@
|
|
3671
4025
|
<xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
|
3672
4026
|
<fo:table-row xsl:use-attribute-sets="table-footer-row-style">
|
3673
4027
|
|
4028
|
+
<xsl:call-template name="refine_table-footer-row-style"/>
|
4029
|
+
|
3674
4030
|
<xsl:call-template name="setTableRowAttributes"/>
|
3675
4031
|
<xsl:apply-templates/>
|
3676
4032
|
</fo:table-row>
|
@@ -3684,9 +4040,10 @@
|
|
3684
4040
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3685
4041
|
</xsl:if>
|
3686
4042
|
|
3687
|
-
<xsl:call-template name="
|
4043
|
+
<xsl:call-template name="refine_table-body-row-style"/>
|
3688
4044
|
|
3689
4045
|
<xsl:call-template name="setTableRowAttributes"/>
|
4046
|
+
|
3690
4047
|
<xsl:apply-templates/>
|
3691
4048
|
</fo:table-row>
|
3692
4049
|
</xsl:template>
|
@@ -3705,19 +4062,7 @@
|
|
3705
4062
|
<xsl:with-param name="default">center</xsl:with-param>
|
3706
4063
|
</xsl:call-template>
|
3707
4064
|
|
3708
|
-
|
3709
|
-
|
3710
|
-
<xsl:call-template name="setBordersTableArray"/>
|
3711
|
-
|
3712
|
-
<xsl:if test="ancestor::*[local-name()='preface']">
|
3713
|
-
<xsl:attribute name="border">none</xsl:attribute>
|
3714
|
-
</xsl:if>
|
3715
|
-
|
3716
|
-
<xsl:if test="$lang = 'ar'">
|
3717
|
-
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3718
|
-
</xsl:if>
|
3719
|
-
|
3720
|
-
<xsl:call-template name="setTableCellAttributes"/>
|
4065
|
+
<xsl:call-template name="refine_table-header-cell-style"/>
|
3721
4066
|
|
3722
4067
|
<fo:block>
|
3723
4068
|
<xsl:apply-templates/>
|
@@ -3759,17 +4104,7 @@
|
|
3759
4104
|
<xsl:with-param name="default">left</xsl:with-param>
|
3760
4105
|
</xsl:call-template>
|
3761
4106
|
|
3762
|
-
<xsl:
|
3763
|
-
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3764
|
-
</xsl:if>
|
3765
|
-
|
3766
|
-
<!-- bsi -->
|
3767
|
-
|
3768
|
-
<xsl:call-template name="setBordersTableArray"/>
|
3769
|
-
|
3770
|
-
<xsl:if test="ancestor::*[local-name() = 'preface']">
|
3771
|
-
<xsl:attribute name="border">none</xsl:attribute>
|
3772
|
-
</xsl:if>
|
4107
|
+
<xsl:call-template name="refine_table-cell-style"/>
|
3773
4108
|
|
3774
4109
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
3775
4110
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
@@ -3796,13 +4131,17 @@
|
|
3796
4131
|
</fo:table-cell>
|
3797
4132
|
</xsl:template> <!-- td -->
|
3798
4133
|
|
3799
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
|
4134
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
|
3800
4135
|
|
3801
4136
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
3802
4137
|
|
3803
|
-
|
4138
|
+
<xsl:call-template name="refine_table-note-style"/>
|
4139
|
+
|
4140
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
3804
4141
|
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
3805
4142
|
|
4143
|
+
<xsl:call-template name="refine_table-note-name-style"/>
|
4144
|
+
|
3806
4145
|
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
3807
4146
|
|
3808
4147
|
</fo:inline>
|
@@ -3812,7 +4151,7 @@
|
|
3812
4151
|
|
3813
4152
|
</xsl:template> <!-- table/note -->
|
3814
4153
|
|
3815
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
|
4154
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
3816
4155
|
<xsl:apply-templates/>
|
3817
4156
|
</xsl:template>
|
3818
4157
|
|
@@ -3830,6 +4169,14 @@
|
|
3830
4169
|
<!-- list of footnotes to calculate actual footnotes number -->
|
3831
4170
|
<xsl:variable name="p_fn_">
|
3832
4171
|
<xsl:call-template name="get_fn_list"/>
|
4172
|
+
<!-- <xsl:choose>
|
4173
|
+
<xsl:when test="$namespace = 'jis'">
|
4174
|
+
<xsl:call-template name="get_fn_list_for_element"/>
|
4175
|
+
</xsl:when>
|
4176
|
+
<xsl:otherwise>
|
4177
|
+
<xsl:call-template name="get_fn_list"/>
|
4178
|
+
</xsl:otherwise>
|
4179
|
+
</xsl:choose> -->
|
3833
4180
|
</xsl:variable>
|
3834
4181
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
3835
4182
|
|
@@ -3852,9 +4199,18 @@
|
|
3852
4199
|
<xsl:variable name="current_fn_number_text">
|
3853
4200
|
<xsl:value-of select="$current_fn_number"/>
|
3854
4201
|
|
4202
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
4203
|
+
|
3855
4204
|
</xsl:variable>
|
3856
4205
|
|
3857
|
-
<xsl:variable name="ref_id"
|
4206
|
+
<xsl:variable name="ref_id">
|
4207
|
+
<xsl:choose>
|
4208
|
+
<xsl:when test="normalize-space(@ref_id) != ''"><xsl:value-of select="@ref_id"/></xsl:when>
|
4209
|
+
<xsl:otherwise>
|
4210
|
+
<xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
4211
|
+
</xsl:otherwise>
|
4212
|
+
</xsl:choose>
|
4213
|
+
</xsl:variable>
|
3858
4214
|
<xsl:variable name="footnote_inline">
|
3859
4215
|
<fo:inline>
|
3860
4216
|
|
@@ -3880,7 +4236,7 @@
|
|
3880
4236
|
<xsl:call-template name="insert_basic_link">
|
3881
4237
|
<xsl:with-param name="element">
|
3882
4238
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
3883
|
-
<xsl:
|
4239
|
+
<xsl:copy-of select="$current_fn_number_text"/>
|
3884
4240
|
</fo:basic-link>
|
3885
4241
|
</xsl:with-param>
|
3886
4242
|
</xsl:call-template>
|
@@ -3900,8 +4256,12 @@
|
|
3900
4256
|
|
3901
4257
|
<fo:block xsl:use-attribute-sets="fn-body-style">
|
3902
4258
|
|
4259
|
+
<xsl:call-template name="refine_fn-body-style"/>
|
4260
|
+
|
3903
4261
|
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
3904
4262
|
|
4263
|
+
<xsl:call-template name="refine_fn-body-num-style"/>
|
4264
|
+
|
3905
4265
|
<xsl:value-of select="$current_fn_number_text"/>
|
3906
4266
|
</fo:inline>
|
3907
4267
|
<xsl:apply-templates/>
|
@@ -3953,6 +4313,28 @@
|
|
3953
4313
|
</xsl:choose>
|
3954
4314
|
</xsl:template>
|
3955
4315
|
|
4316
|
+
<xsl:template name="get_fn_list_for_element">
|
4317
|
+
<xsl:choose>
|
4318
|
+
<xsl:when test="@current_fn_number"> <!-- footnote reference number calculated already -->
|
4319
|
+
<fn gen_id="{generate-id(.)}">
|
4320
|
+
<xsl:copy-of select="@*"/>
|
4321
|
+
<xsl:copy-of select="node()"/>
|
4322
|
+
</fn>
|
4323
|
+
</xsl:when>
|
4324
|
+
<xsl:otherwise>
|
4325
|
+
<xsl:for-each select="ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1]">
|
4326
|
+
<xsl:variable name="element_id" select="@id"/>
|
4327
|
+
<xsl:for-each select=".//*[local-name() = 'fn'][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
4328
|
+
<!-- copy unique fn -->
|
4329
|
+
<fn gen_id="{generate-id(.)}">
|
4330
|
+
<xsl:copy-of select="@*"/>
|
4331
|
+
<xsl:copy-of select="node()"/>
|
4332
|
+
</fn>
|
4333
|
+
</xsl:for-each>
|
4334
|
+
</xsl:for-each>
|
4335
|
+
</xsl:otherwise>
|
4336
|
+
</xsl:choose>
|
4337
|
+
</xsl:template>
|
3956
4338
|
<!-- ============================ -->
|
3957
4339
|
<!-- table's footnotes rendering -->
|
3958
4340
|
<!-- ============================ -->
|
@@ -4139,6 +4521,8 @@
|
|
4139
4521
|
<xsl:template match="*[local-name()='fn']">
|
4140
4522
|
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
4141
4523
|
|
4524
|
+
<xsl:call-template name="refine_fn-reference-style"/>
|
4525
|
+
|
4142
4526
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
4143
4527
|
|
4144
4528
|
<xsl:value-of select="@reference"/>
|
@@ -4240,6 +4624,8 @@
|
|
4240
4624
|
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
4241
4625
|
<fo:block margin-bottom="12pt" text-align="left">
|
4242
4626
|
|
4627
|
+
<xsl:call-template name="refine_dl_formula_where_style"/>
|
4628
|
+
|
4243
4629
|
<!-- <xsl:variable name="title-where">
|
4244
4630
|
<xsl:call-template name="getLocalizedString">
|
4245
4631
|
<xsl:with-param name="key">where</xsl:with-param>
|
@@ -4253,6 +4639,8 @@
|
|
4253
4639
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
|
4254
4640
|
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4255
4641
|
|
4642
|
+
<xsl:call-template name="refine_figure_key_style"/>
|
4643
|
+
|
4256
4644
|
<xsl:variable name="title-key">
|
4257
4645
|
<xsl:call-template name="getLocalizedString">
|
4258
4646
|
<xsl:with-param name="key">key</xsl:with-param>
|
@@ -4267,12 +4655,16 @@
|
|
4267
4655
|
<xsl:if test="$onlyOneComponent = 'false'">
|
4268
4656
|
<fo:block>
|
4269
4657
|
|
4658
|
+
<xsl:call-template name="refine_multicomponent_style"/>
|
4659
|
+
|
4270
4660
|
<xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
|
4271
4661
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
4272
4662
|
</xsl:if>
|
4273
4663
|
|
4274
4664
|
<fo:block>
|
4275
4665
|
|
4666
|
+
<xsl:call-template name="refine_multicomponent_block_style"/>
|
4667
|
+
|
4276
4668
|
<xsl:apply-templates select="*[local-name() = 'name']">
|
4277
4669
|
<xsl:with-param name="process">true</xsl:with-param>
|
4278
4670
|
</xsl:apply-templates>
|
@@ -4430,6 +4822,24 @@
|
|
4430
4822
|
|
4431
4823
|
</xsl:template> <!-- END: dl -->
|
4432
4824
|
|
4825
|
+
<xsl:template name="refine_dl_formula_where_style">
|
4826
|
+
|
4827
|
+
</xsl:template> <!-- refine_dl_formula_where_style -->
|
4828
|
+
|
4829
|
+
<xsl:template name="refine_figure_key_style">
|
4830
|
+
|
4831
|
+
</xsl:template> <!-- refine_figure_key_style -->
|
4832
|
+
|
4833
|
+
<xsl:template name="refine_multicomponent_style">
|
4834
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
4835
|
+
|
4836
|
+
</xsl:template> <!-- refine_multicomponent_style -->
|
4837
|
+
|
4838
|
+
<xsl:template name="refine_multicomponent_block_style">
|
4839
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
4840
|
+
|
4841
|
+
</xsl:template> <!-- refine_multicomponent_block_style -->
|
4842
|
+
|
4433
4843
|
<!-- ignore 'p' with 'where' in formula, before 'dl' -->
|
4434
4844
|
<xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
|
4435
4845
|
|
@@ -4649,6 +5059,8 @@
|
|
4649
5059
|
|
4650
5060
|
</xsl:if>
|
4651
5061
|
|
5062
|
+
<xsl:call-template name="refine_dt-cell-style"/>
|
5063
|
+
|
4652
5064
|
<fo:block xsl:use-attribute-sets="dt-block-style">
|
4653
5065
|
<xsl:copy-of select="@id"/>
|
4654
5066
|
|
@@ -4656,6 +5068,8 @@
|
|
4656
5068
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
4657
5069
|
</xsl:if>
|
4658
5070
|
|
5071
|
+
<xsl:call-template name="refine_dt-block-style"/>
|
5072
|
+
|
4659
5073
|
<xsl:apply-templates>
|
4660
5074
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
4661
5075
|
</xsl:apply-templates>
|
@@ -4675,6 +5089,8 @@
|
|
4675
5089
|
<xsl:attribute name="border">0.1pt solid black</xsl:attribute>
|
4676
5090
|
</xsl:if>
|
4677
5091
|
|
5092
|
+
<xsl:call-template name="refine_dd-cell-style"/>
|
5093
|
+
|
4678
5094
|
<fo:block>
|
4679
5095
|
|
4680
5096
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
@@ -4817,15 +5233,20 @@
|
|
4817
5233
|
<!-- ========================= -->
|
4818
5234
|
<xsl:template match="*[local-name()='em']">
|
4819
5235
|
<fo:inline font-style="italic">
|
5236
|
+
<xsl:call-template name="refine_italic_style"/>
|
4820
5237
|
<xsl:apply-templates/>
|
4821
5238
|
</fo:inline>
|
4822
5239
|
</xsl:template>
|
4823
5240
|
|
5241
|
+
<xsl:template name="refine_italic_style">
|
5242
|
+
|
5243
|
+
</xsl:template>
|
5244
|
+
|
4824
5245
|
<xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
4825
5246
|
<xsl:param name="split_keep-within-line"/>
|
4826
5247
|
<fo:inline font-weight="bold">
|
4827
5248
|
|
4828
|
-
|
5249
|
+
<xsl:call-template name="refine_strong_style"/>
|
4829
5250
|
|
4830
5251
|
<xsl:apply-templates>
|
4831
5252
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
@@ -4833,6 +5254,12 @@
|
|
4833
5254
|
</fo:inline>
|
4834
5255
|
</xsl:template>
|
4835
5256
|
|
5257
|
+
<xsl:template name="refine_strong_style">
|
5258
|
+
|
5259
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
5260
|
+
|
5261
|
+
</xsl:template>
|
5262
|
+
|
4836
5263
|
<xsl:template match="*[local-name()='padding']">
|
4837
5264
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
4838
5265
|
</xsl:template>
|
@@ -5303,7 +5730,10 @@
|
|
5303
5730
|
</xsl:choose>
|
5304
5731
|
</xsl:variable>
|
5305
5732
|
|
5306
|
-
|
5733
|
+
<!-- replace sequence #x200B and space TO space -->
|
5734
|
+
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
|
5735
|
+
|
5736
|
+
<xsl:value-of select="$text10"/>
|
5307
5737
|
</xsl:template>
|
5308
5738
|
|
5309
5739
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -5978,6 +6408,11 @@
|
|
5978
6408
|
|
5979
6409
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
5980
6410
|
|
6411
|
+
<!-- DEBUG -->
|
6412
|
+
<!-- <xsl:copy-of select="ancestor::*[local-name() = 'stem']/@font-family"/> -->
|
6413
|
+
|
6414
|
+
<xsl:call-template name="refine_mathml-style"/>
|
6415
|
+
|
5981
6416
|
<xsl:if test="$isGenerateTableIF = 'true' and ancestor::*[local-name() = 'td' or local-name() = 'th' or local-name() = 'dl'] and not(following-sibling::node()[not(self::comment())][normalize-space() != ''])"> <!-- math in table cell, and math is last element -->
|
5982
6417
|
<!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
|
5983
6418
|
</xsl:if>
|
@@ -6082,6 +6517,8 @@
|
|
6082
6517
|
|
6083
6518
|
<fo:instream-foreign-object fox:alt-text="Math">
|
6084
6519
|
|
6520
|
+
<xsl:call-template name="refine_mathml_insteam_object_style"/>
|
6521
|
+
|
6085
6522
|
<!-- put MathML in Actual Text -->
|
6086
6523
|
<!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
|
6087
6524
|
<xsl:attribute name="fox:actual-text">
|
@@ -6102,6 +6539,10 @@
|
|
6102
6539
|
</fo:instream-foreign-object>
|
6103
6540
|
</xsl:template>
|
6104
6541
|
|
6542
|
+
<xsl:template name="refine_mathml_insteam_object_style">
|
6543
|
+
|
6544
|
+
</xsl:template> <!-- refine_mathml_insteam_object_style -->
|
6545
|
+
|
6105
6546
|
<xsl:template match="mathml:*" mode="mathml_actual_text">
|
6106
6547
|
<!-- <xsl:text>a+b</xsl:text> -->
|
6107
6548
|
<xsl:text><</xsl:text>
|
@@ -6246,6 +6687,8 @@
|
|
6246
6687
|
<xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
|
6247
6688
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
6248
6689
|
|
6690
|
+
<xsl:call-template name="refine_mathml-style"/>
|
6691
|
+
|
6249
6692
|
<xsl:choose>
|
6250
6693
|
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
6251
6694
|
<xsl:otherwise>
|
@@ -6290,6 +6733,8 @@
|
|
6290
6733
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
6291
6734
|
</xsl:if>
|
6292
6735
|
|
6736
|
+
<xsl:call-template name="refine_link-style"/>
|
6737
|
+
|
6293
6738
|
<xsl:choose>
|
6294
6739
|
<xsl:when test="$target_text = ''">
|
6295
6740
|
<xsl:apply-templates/>
|
@@ -6377,6 +6822,9 @@
|
|
6377
6822
|
<xsl:call-template name="insert_basic_link">
|
6378
6823
|
<xsl:with-param name="element">
|
6379
6824
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
6825
|
+
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
|
6826
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
6827
|
+
</xsl:if>
|
6380
6828
|
<xsl:if test="parent::*[local-name() = 'add']">
|
6381
6829
|
<xsl:call-template name="append_add-style"/>
|
6382
6830
|
</xsl:if>
|
@@ -6438,6 +6886,8 @@
|
|
6438
6886
|
<fo:table-cell display-align="center">
|
6439
6887
|
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
6440
6888
|
|
6889
|
+
<xsl:call-template name="refine_formula-stem-block-style"/>
|
6890
|
+
|
6441
6891
|
<xsl:apply-templates/>
|
6442
6892
|
</fo:block>
|
6443
6893
|
</fo:table-cell>
|
@@ -6479,6 +6929,8 @@
|
|
6479
6929
|
|
6480
6930
|
<xsl:call-template name="setBlockSpanAll"/>
|
6481
6931
|
|
6932
|
+
<xsl:call-template name="refine_note-style"/>
|
6933
|
+
|
6482
6934
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
6483
6935
|
|
6484
6936
|
<fo:list-block>
|
@@ -6509,6 +6961,10 @@
|
|
6509
6961
|
|
6510
6962
|
</xsl:template>
|
6511
6963
|
|
6964
|
+
<xsl:template name="refine_note_block_style">
|
6965
|
+
|
6966
|
+
</xsl:template>
|
6967
|
+
|
6512
6968
|
<xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
6513
6969
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
6514
6970
|
<xsl:choose>
|
@@ -6530,12 +6986,16 @@
|
|
6530
6986
|
|
6531
6987
|
<xsl:call-template name="setBlockSpanAll"/>
|
6532
6988
|
|
6989
|
+
<xsl:call-template name="refine_termnote-style"/>
|
6990
|
+
|
6533
6991
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
6534
6992
|
|
6535
6993
|
<xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
|
6536
6994
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
6537
6995
|
</xsl:if>
|
6538
6996
|
|
6997
|
+
<xsl:call-template name="refine_termnote-name-style"/>
|
6998
|
+
|
6539
6999
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
6540
7000
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
6541
7001
|
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
@@ -6705,6 +7165,8 @@
|
|
6705
7165
|
<xsl:otherwise>
|
6706
7166
|
<fo:block xsl:use-attribute-sets="image-style">
|
6707
7167
|
|
7168
|
+
<xsl:call-template name="refine_image-style"/>
|
7169
|
+
|
6708
7170
|
<xsl:variable name="src">
|
6709
7171
|
<xsl:call-template name="image_src"/>
|
6710
7172
|
</xsl:variable>
|
@@ -7554,10 +8016,7 @@
|
|
7554
8016
|
<xsl:if test="normalize-space() != ''">
|
7555
8017
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
7556
8018
|
|
7557
|
-
|
7558
|
-
<xsl:attribute name="margin-top">0</xsl:attribute>
|
7559
|
-
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
7560
|
-
</xsl:if>
|
8019
|
+
<xsl:call-template name="refine_figure-name-style"/>
|
7561
8020
|
|
7562
8021
|
<xsl:apply-templates/>
|
7563
8022
|
</fo:block>
|
@@ -7822,6 +8281,8 @@
|
|
7822
8281
|
</xsl:attribute>
|
7823
8282
|
</xsl:for-each>
|
7824
8283
|
|
8284
|
+
<xsl:call-template name="refine_sourcecode-style"/>
|
8285
|
+
|
7825
8286
|
<!-- remove margin between rows in the table with sourcecode line numbers -->
|
7826
8287
|
<xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
|
7827
8288
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
@@ -8526,6 +8987,8 @@
|
|
8526
8987
|
|
8527
8988
|
<xsl:call-template name="setBlockSpanAll"/>
|
8528
8989
|
|
8990
|
+
<xsl:call-template name="refine_example-style"/>
|
8991
|
+
|
8529
8992
|
<xsl:variable name="fo_element">
|
8530
8993
|
<xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
|
8531
8994
|
list
|
@@ -8636,6 +9099,12 @@
|
|
8636
9099
|
|
8637
9100
|
</xsl:template>
|
8638
9101
|
|
9102
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
9103
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
9104
|
+
<xsl:apply-templates/>
|
9105
|
+
</fo:inline>
|
9106
|
+
</xsl:template>
|
9107
|
+
|
8639
9108
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
8640
9109
|
<xsl:param name="fo_element">block</xsl:param>
|
8641
9110
|
|
@@ -8653,6 +9122,8 @@
|
|
8653
9122
|
</xsl:if>
|
8654
9123
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
8655
9124
|
|
9125
|
+
<xsl:call-template name="refine_example-p-style"/>
|
9126
|
+
|
8656
9127
|
<xsl:apply-templates/>
|
8657
9128
|
</fo:block>
|
8658
9129
|
</fo:block-container>
|
@@ -8669,6 +9140,7 @@
|
|
8669
9140
|
</xsl:otherwise>
|
8670
9141
|
</xsl:choose>
|
8671
9142
|
</xsl:template> <!-- example/p -->
|
9143
|
+
|
8672
9144
|
<!-- ====== -->
|
8673
9145
|
<!-- ====== -->
|
8674
9146
|
|
@@ -8680,6 +9152,8 @@
|
|
8680
9152
|
<xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
8681
9153
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
8682
9154
|
|
9155
|
+
<xsl:call-template name="refine_termsource-style"/>
|
9156
|
+
|
8683
9157
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
8684
9158
|
<xsl:variable name="termsource_text">
|
8685
9159
|
<xsl:apply-templates/>
|
@@ -8795,6 +9269,8 @@
|
|
8795
9269
|
<fo:block-container margin-left="0mm">
|
8796
9270
|
<fo:block-container xsl:use-attribute-sets="quote-style">
|
8797
9271
|
|
9272
|
+
<xsl:call-template name="refine_quote-style"/>
|
9273
|
+
|
8798
9274
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
8799
9275
|
<fo:block role="BlockQuote">
|
8800
9276
|
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
@@ -8809,6 +9285,11 @@
|
|
8809
9285
|
</fo:block>
|
8810
9286
|
</xsl:if>
|
8811
9287
|
|
9288
|
+
<!-- render footnotes after references -->
|
9289
|
+
<xsl:apply-templates select=".//jis:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
|
9290
|
+
<xsl:with-param name="ancestor">quote</xsl:with-param>
|
9291
|
+
</xsl:apply-templates>
|
9292
|
+
|
8812
9293
|
</fo:block-container>
|
8813
9294
|
</fo:block-container>
|
8814
9295
|
</xsl:template>
|
@@ -8869,8 +9350,7 @@
|
|
8869
9350
|
|
8870
9351
|
</xsl:if>
|
8871
9352
|
|
8872
|
-
<xsl:
|
8873
|
-
<xsl:variable name="text" select="normalize-space()"/>
|
9353
|
+
<xsl:call-template name="refine_eref-style"/>
|
8874
9354
|
|
8875
9355
|
<xsl:call-template name="insert_basic_link">
|
8876
9356
|
<xsl:with-param name="element">
|
@@ -8880,6 +9360,8 @@
|
|
8880
9360
|
</xsl:if>
|
8881
9361
|
<xsl:if test="@type = 'inline'">
|
8882
9362
|
|
9363
|
+
<xsl:call-template name="refine_basic_link_style"/>
|
9364
|
+
|
8883
9365
|
</xsl:if>
|
8884
9366
|
|
8885
9367
|
<xsl:choose>
|
@@ -8912,6 +9394,11 @@
|
|
8912
9394
|
</xsl:otherwise>
|
8913
9395
|
</xsl:choose>
|
8914
9396
|
</xsl:template>
|
9397
|
+
|
9398
|
+
<xsl:template name="refine_basic_link_style">
|
9399
|
+
|
9400
|
+
</xsl:template> <!-- refine_basic_link_style -->
|
9401
|
+
|
8915
9402
|
<!-- ====== -->
|
8916
9403
|
<!-- END eref -->
|
8917
9404
|
<!-- ====== -->
|
@@ -9049,11 +9536,17 @@
|
|
9049
9536
|
<fo:block>
|
9050
9537
|
<xsl:call-template name="setId"/>
|
9051
9538
|
|
9539
|
+
<xsl:call-template name="sections_element_style"/>
|
9540
|
+
|
9052
9541
|
<xsl:apply-templates/>
|
9053
9542
|
</fo:block>
|
9054
9543
|
|
9055
9544
|
</xsl:template>
|
9056
9545
|
|
9546
|
+
<xsl:template name="sections_element_style">
|
9547
|
+
|
9548
|
+
</xsl:template> <!-- sections_element_style -->
|
9549
|
+
|
9057
9550
|
<xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
9058
9551
|
<fo:block break-after="page"/>
|
9059
9552
|
<fo:block>
|
@@ -9068,10 +9561,16 @@
|
|
9068
9561
|
|
9069
9562
|
<xsl:call-template name="setBlockSpanAll"/>
|
9070
9563
|
|
9564
|
+
<xsl:call-template name="refine_clause_style"/>
|
9565
|
+
|
9071
9566
|
<xsl:apply-templates/>
|
9072
9567
|
</fo:block>
|
9073
9568
|
</xsl:template>
|
9074
9569
|
|
9570
|
+
<xsl:template name="refine_clause_style">
|
9571
|
+
|
9572
|
+
</xsl:template> <!-- refine_clause_style -->
|
9573
|
+
|
9075
9574
|
<xsl:template match="*[local-name() = 'definitions']">
|
9076
9575
|
<fo:block id="{@id}">
|
9077
9576
|
<xsl:apply-templates/>
|
@@ -9084,10 +9583,16 @@
|
|
9084
9583
|
|
9085
9584
|
<xsl:call-template name="setBlockSpanAll"/>
|
9086
9585
|
|
9586
|
+
<xsl:call-template name="refine_annex_style"/>
|
9587
|
+
|
9087
9588
|
</fo:block>
|
9088
9589
|
<xsl:apply-templates/>
|
9089
9590
|
</xsl:template>
|
9090
9591
|
|
9592
|
+
<xsl:template name="refine_annex_style">
|
9593
|
+
|
9594
|
+
</xsl:template>
|
9595
|
+
|
9091
9596
|
<xsl:template match="*[local-name() = 'review']"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
9092
9597
|
<!-- comment 2019-11-29 -->
|
9093
9598
|
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
@@ -9165,6 +9670,9 @@
|
|
9165
9670
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
9166
9671
|
</xsl:choose>
|
9167
9672
|
</xsl:when>
|
9673
|
+
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
9674
|
+
<xsl:value-of select="@label"/>
|
9675
|
+
</xsl:when>
|
9168
9676
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
9169
9677
|
|
9170
9678
|
<!-- Example: for BSI <?list-start 2?> -->
|
@@ -9222,10 +9730,10 @@
|
|
9222
9730
|
<xsl:when test="$type = 'arabic'">
|
9223
9731
|
1)
|
9224
9732
|
</xsl:when>
|
9225
|
-
<xsl:when test="$type = 'alphabet'">
|
9733
|
+
<xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
|
9226
9734
|
a)
|
9227
9735
|
</xsl:when>
|
9228
|
-
<xsl:when test="$type = 'alphabet_upper'">
|
9736
|
+
<xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
|
9229
9737
|
A.
|
9230
9738
|
</xsl:when>
|
9231
9739
|
<xsl:when test="$type = 'roman'">
|
@@ -9253,6 +9761,8 @@
|
|
9253
9761
|
</xsl:choose>
|
9254
9762
|
</xsl:attribute>
|
9255
9763
|
|
9764
|
+
<xsl:call-template name="refine_list_container_style"/>
|
9765
|
+
|
9256
9766
|
<fo:block-container margin-left="0mm">
|
9257
9767
|
<fo:block>
|
9258
9768
|
<xsl:apply-templates select="." mode="list"/>
|
@@ -9277,6 +9787,10 @@
|
|
9277
9787
|
</xsl:choose>
|
9278
9788
|
</xsl:template>
|
9279
9789
|
|
9790
|
+
<xsl:template name="refine_list_container_style">
|
9791
|
+
|
9792
|
+
</xsl:template> <!-- refine_list_container_style -->
|
9793
|
+
|
9280
9794
|
<xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
|
9281
9795
|
|
9282
9796
|
<xsl:apply-templates select="*[local-name() = 'name']">
|
@@ -9287,7 +9801,7 @@
|
|
9287
9801
|
|
9288
9802
|
<xsl:variable name="provisional_distance_between_starts_">
|
9289
9803
|
<attributes xsl:use-attribute-sets="list-style">
|
9290
|
-
|
9804
|
+
<xsl:call-template name="refine_list-style_provisional-distance-between-starts"/>
|
9291
9805
|
</attributes>
|
9292
9806
|
</xsl:variable>
|
9293
9807
|
<xsl:variable name="provisional_distance_between_starts" select="normalize-space(xalan:nodeset($provisional_distance_between_starts_)/attributes/@provisional-distance-between-starts)"/>
|
@@ -9323,6 +9837,8 @@
|
|
9323
9837
|
<addon><xsl:value-of select="$addon"/></addon> -->
|
9324
9838
|
</xsl:if>
|
9325
9839
|
|
9840
|
+
<xsl:call-template name="refine_list-style"/>
|
9841
|
+
|
9326
9842
|
<xsl:if test="*[local-name() = 'name']">
|
9327
9843
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
9328
9844
|
</xsl:if>
|
@@ -9335,6 +9851,10 @@
|
|
9335
9851
|
<xsl:apply-templates select="./*[local-name() = 'note']"/>
|
9336
9852
|
</xsl:template>
|
9337
9853
|
|
9854
|
+
<xsl:template name="refine_list-style_provisional-distance-between-starts">
|
9855
|
+
|
9856
|
+
</xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
|
9857
|
+
|
9338
9858
|
<xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
|
9339
9859
|
<xsl:param name="process">false</xsl:param>
|
9340
9860
|
<xsl:if test="$process = 'true'">
|
@@ -9348,13 +9868,12 @@
|
|
9348
9868
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
9349
9869
|
<xsl:copy-of select="@id"/>
|
9350
9870
|
|
9871
|
+
<xsl:call-template name="refine_list-item-style"/>
|
9872
|
+
|
9351
9873
|
<fo:list-item-label end-indent="label-end()">
|
9352
9874
|
<fo:block xsl:use-attribute-sets="list-item-label-style">
|
9353
9875
|
|
9354
|
-
|
9355
|
-
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
9356
|
-
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
9357
|
-
</xsl:if>
|
9876
|
+
<xsl:call-template name="refine_list-item-label-style"/>
|
9358
9877
|
|
9359
9878
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
9360
9879
|
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
@@ -9362,11 +9881,14 @@
|
|
9362
9881
|
</xsl:if>
|
9363
9882
|
|
9364
9883
|
<xsl:call-template name="getListItemFormat"/>
|
9884
|
+
|
9365
9885
|
</fo:block>
|
9366
9886
|
</fo:list-item-label>
|
9367
9887
|
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
9368
9888
|
<fo:block>
|
9369
9889
|
|
9890
|
+
<xsl:call-template name="refine_list-item-body-style"/>
|
9891
|
+
|
9370
9892
|
<xsl:apply-templates/>
|
9371
9893
|
|
9372
9894
|
<!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
|
@@ -9684,6 +10206,12 @@
|
|
9684
10206
|
|
9685
10207
|
<fo:block id="{@id}">
|
9686
10208
|
<xsl:apply-templates/>
|
10209
|
+
|
10210
|
+
<!-- render footnotes after references -->
|
10211
|
+
<xsl:apply-templates select=".//jis:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
|
10212
|
+
<xsl:with-param name="ancestor">references</xsl:with-param>
|
10213
|
+
</xsl:apply-templates>
|
10214
|
+
|
9687
10215
|
</fo:block>
|
9688
10216
|
</xsl:template>
|
9689
10217
|
|
@@ -9703,6 +10231,12 @@
|
|
9703
10231
|
|
9704
10232
|
<fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
|
9705
10233
|
<xsl:apply-templates/>
|
10234
|
+
|
10235
|
+
<!-- render footnotes after references -->
|
10236
|
+
<xsl:apply-templates select=".//jis:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]" mode="fn_after_element">
|
10237
|
+
<xsl:with-param name="ancestor">references</xsl:with-param>
|
10238
|
+
</xsl:apply-templates>
|
10239
|
+
|
9706
10240
|
</fo:block>
|
9707
10241
|
|
9708
10242
|
</xsl:template> <!-- references -->
|
@@ -10283,6 +10817,9 @@
|
|
10283
10817
|
</xsl:copy>
|
10284
10818
|
</xsl:template>
|
10285
10819
|
|
10820
|
+
<!-- prevent empty thead processing in XSL-FO, remove it -->
|
10821
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'thead'][count(*) = 0]" mode="update_xml_step1"/>
|
10822
|
+
|
10286
10823
|
<xsl:template name="add_id">
|
10287
10824
|
<xsl:if test="not(@id)">
|
10288
10825
|
<!-- add @id - first element with @id plus '_element_name' -->
|
@@ -10671,6 +11208,14 @@
|
|
10671
11208
|
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" mode="linear_xml" name="linear_xml_fn">
|
10672
11209
|
<xsl:variable name="p_fn_">
|
10673
11210
|
<xsl:call-template name="get_fn_list"/>
|
11211
|
+
<!-- <xsl:choose>
|
11212
|
+
<xsl:when test="$namespace = 'jis'">
|
11213
|
+
<xsl:call-template name="get_fn_list_for_element"/>
|
11214
|
+
</xsl:when>
|
11215
|
+
<xsl:otherwise>
|
11216
|
+
<xsl:call-template name="get_fn_list"/>
|
11217
|
+
</xsl:otherwise>
|
11218
|
+
</xsl:choose> -->
|
10674
11219
|
</xsl:variable>
|
10675
11220
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
10676
11221
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
@@ -10685,8 +11230,17 @@
|
|
10685
11230
|
<xsl:attribute name="current_fn_number">
|
10686
11231
|
<xsl:value-of select="$current_fn_number"/>
|
10687
11232
|
</xsl:attribute>
|
11233
|
+
<xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
|
10688
11234
|
<xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
|
10689
|
-
|
11235
|
+
|
11236
|
+
<xsl:choose>
|
11237
|
+
<xsl:when test="ancestor::*[local-name() = 'ul' or local-name() ='ol' or local-name() = 'bibitem' or local-name() = 'quote']">true</xsl:when>
|
11238
|
+
<xsl:otherwise><xsl:value-of select="$skip_footnote_body_"/></xsl:otherwise>
|
11239
|
+
</xsl:choose>
|
11240
|
+
|
11241
|
+
</xsl:attribute>
|
11242
|
+
<xsl:attribute name="ref_id">
|
11243
|
+
<xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
10690
11244
|
</xsl:attribute>
|
10691
11245
|
<xsl:apply-templates select="node()" mode="linear_xml"/>
|
10692
11246
|
</xsl:copy>
|