metanorma-jis 0.6.6 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/jis/i18n-en.yaml +9 -0
- data/lib/isodoc/jis/i18n-ja.yaml +10 -0
- data/lib/isodoc/jis/jis.international-standard.xsl +326 -229
- data/lib/isodoc/jis/presentation_xml_convert.rb +63 -12
- data/lib/isodoc/jis/xref.rb +14 -2
- data/lib/metanorma/jis/biblio.rng +1 -1
- data/lib/metanorma/jis/cleanup.rb +0 -1
- data/lib/metanorma/jis/converter.rb +2 -0
- data/lib/metanorma/jis/isodoc.rng +35 -10
- data/lib/metanorma/jis/log.rb +20 -0
- data/lib/metanorma/jis/validate.rb +2 -4
- data/lib/metanorma/jis/version.rb +1 -1
- data/lib/relaton/render-jis/config.yml +58 -11
- data/lib/relaton/render-jis/fields.rb +19 -0
- data/lib/relaton/render-jis/general.rb +2 -7
- data/metanorma-jis.gemspec +3 -2
- metadata +24 -8
|
@@ -989,41 +989,48 @@
|
|
|
989
989
|
<xsl:template name="cover-page">
|
|
990
990
|
<xsl:param name="num"/>
|
|
991
991
|
<xsl:param name="docidentifier"/>
|
|
992
|
-
<xsl:
|
|
993
|
-
<xsl:
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
<xsl:
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
<xsl:call-template name="
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
992
|
+
<xsl:choose>
|
|
993
|
+
<xsl:when test="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'coverpage-image']/mn:value/mn:image and normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:full-coverpage-replacement) = 'true'">
|
|
994
|
+
<xsl:call-template name="insertCoverPageFullImage"/>
|
|
995
|
+
</xsl:when>
|
|
996
|
+
<xsl:otherwise>
|
|
997
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
998
|
+
<xsl:variable name="doctype"><xsl:call-template name="get_doctype"/></xsl:variable>
|
|
999
|
+
<xsl:variable name="docidentifier_JIS"><xsl:call-template name="get_docidentifier_JIS"/></xsl:variable>
|
|
1000
|
+
<xsl:variable name="doclang"><xsl:call-template name="getLang"/></xsl:variable>
|
|
1001
|
+
<xsl:variable name="copyrightText"><xsl:call-template name="get_copyrightText"/></xsl:variable>
|
|
1002
|
+
<xsl:choose>
|
|
1003
|
+
<xsl:when test="$vertical_layout = 'true'">
|
|
1004
|
+
<xsl:call-template name="insertCoverPageVerticalLayout">
|
|
1005
|
+
<xsl:with-param name="num" select="$num"/>
|
|
1006
|
+
<xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS"/>
|
|
1007
|
+
</xsl:call-template>
|
|
1008
|
+
</xsl:when>
|
|
1009
|
+
<xsl:when test="$doctype = 'technical-specification'">
|
|
1010
|
+
<xsl:call-template name="insertCoverPageJSA">
|
|
1011
|
+
<xsl:with-param name="num" select="$num"/>
|
|
1012
|
+
<xsl:with-param name="doclang" select="$doclang"/>
|
|
1013
|
+
<xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS"/>
|
|
1014
|
+
</xsl:call-template>
|
|
1015
|
+
</xsl:when>
|
|
1016
|
+
<xsl:otherwise>
|
|
1017
|
+
<xsl:call-template name="insertCoverPage">
|
|
1018
|
+
<xsl:with-param name="num" select="$num"/>
|
|
1019
|
+
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
|
1020
|
+
<xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS"/>
|
|
1021
|
+
</xsl:call-template>
|
|
1022
|
+
</xsl:otherwise>
|
|
1023
|
+
</xsl:choose>
|
|
1019
1024
|
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1025
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
|
1026
|
+
<xsl:call-template name="insertInnerCoverPage">
|
|
1027
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
|
1028
|
+
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
|
1029
|
+
</xsl:call-template>
|
|
1030
|
+
</xsl:if>
|
|
1031
|
+
</xsl:if>
|
|
1032
|
+
</xsl:otherwise>
|
|
1033
|
+
</xsl:choose>
|
|
1027
1034
|
</xsl:template>
|
|
1028
1035
|
|
|
1029
1036
|
<xsl:template name="inner-cover-page">
|
|
@@ -1893,57 +1900,6 @@
|
|
|
1893
1900
|
<xsl:call-template name="getLevel"/>
|
|
1894
1901
|
</xsl:variable>
|
|
1895
1902
|
|
|
1896
|
-
<xsl:variable name="font-family">
|
|
1897
|
-
<xsl:choose>
|
|
1898
|
-
<xsl:when test="$vertical_layout = 'true'">Noto Sans JP</xsl:when>
|
|
1899
|
-
<xsl:otherwise>IPAexGothic</xsl:otherwise>
|
|
1900
|
-
</xsl:choose>
|
|
1901
|
-
</xsl:variable>
|
|
1902
|
-
|
|
1903
|
-
<xsl:variable name="font-size">
|
|
1904
|
-
<xsl:choose>
|
|
1905
|
-
<xsl:when test="$vertical_layout = 'true'">12pt</xsl:when>
|
|
1906
|
-
<xsl:otherwise>
|
|
1907
|
-
<xsl:choose>
|
|
1908
|
-
<xsl:when test="@type = 'section-title'">18pt</xsl:when>
|
|
1909
|
-
<xsl:when test="@ancestor = 'foreword' and $level = '1'">14pt</xsl:when>
|
|
1910
|
-
<xsl:when test="@ancestor = 'annex' and $level = '1' and preceding-sibling::mn:annex[1][@commentary = 'true']">16pt</xsl:when>
|
|
1911
|
-
<xsl:when test="@ancestor = 'annex' and $level = '1'">14pt</xsl:when>
|
|
1912
|
-
<xsl:otherwise>10pt</xsl:otherwise>
|
|
1913
|
-
</xsl:choose>
|
|
1914
|
-
</xsl:otherwise>
|
|
1915
|
-
</xsl:choose>
|
|
1916
|
-
</xsl:variable>
|
|
1917
|
-
|
|
1918
|
-
<xsl:variable name="font-weight">
|
|
1919
|
-
<xsl:choose>
|
|
1920
|
-
<xsl:when test="$vertical_layout = 'true'">500</xsl:when> <!-- bold, or 500 (medium) ? -->
|
|
1921
|
-
<xsl:otherwise>normal</xsl:otherwise>
|
|
1922
|
-
</xsl:choose>
|
|
1923
|
-
</xsl:variable>
|
|
1924
|
-
|
|
1925
|
-
<xsl:variable name="text-align">
|
|
1926
|
-
<xsl:choose>
|
|
1927
|
-
<xsl:when test="@ancestor = 'foreword' and $level = 1">center</xsl:when>
|
|
1928
|
-
<xsl:when test="@ancestor = 'annex' and $level = 1">center</xsl:when>
|
|
1929
|
-
<xsl:otherwise>left</xsl:otherwise>
|
|
1930
|
-
</xsl:choose>
|
|
1931
|
-
</xsl:variable>
|
|
1932
|
-
|
|
1933
|
-
<xsl:variable name="margin-top">
|
|
1934
|
-
<xsl:choose>
|
|
1935
|
-
<xsl:when test="@ancestor = 'foreword' and $level = 1">9mm</xsl:when>
|
|
1936
|
-
<xsl:when test="@ancestor = 'annex' and $level = '1' and preceding-sibling::mn:annex[1][@commentary = 'true']">1mm</xsl:when>
|
|
1937
|
-
<xsl:when test="$level = 1">6.5mm</xsl:when>
|
|
1938
|
-
<xsl:when test="@ancestor = 'foreword' and $level = 2">0mm</xsl:when>
|
|
1939
|
-
<xsl:when test="@ancestor = 'annex' and $level = 2">4.5mm</xsl:when>
|
|
1940
|
-
<xsl:when test="@ancestor = 'bibliography' and $level = 2">0mm</xsl:when>
|
|
1941
|
-
<xsl:when test="$level = 2">2mm</xsl:when>
|
|
1942
|
-
<xsl:when test="$level >= 3">2mm</xsl:when>
|
|
1943
|
-
<xsl:otherwise>0mm</xsl:otherwise>
|
|
1944
|
-
</xsl:choose>
|
|
1945
|
-
</xsl:variable>
|
|
1946
|
-
|
|
1947
1903
|
<xsl:variable name="element-name">
|
|
1948
1904
|
<xsl:choose>
|
|
1949
1905
|
<xsl:when test="@inline-header = 'true'">fo:inline</xsl:when>
|
|
@@ -1951,24 +1907,11 @@
|
|
|
1951
1907
|
</xsl:choose>
|
|
1952
1908
|
</xsl:variable>
|
|
1953
1909
|
|
|
1954
|
-
<xsl:variable name="margin-bottom">
|
|
1955
|
-
<xsl:choose>
|
|
1956
|
-
<xsl:when test="@ancestor = 'foreword' and $level = 1">9mm</xsl:when>
|
|
1957
|
-
<xsl:when test="@ancestor = 'annex' and $level = '1' and preceding-sibling::mn:annex[1][@commentary = 'true']">7mm</xsl:when>
|
|
1958
|
-
<xsl:when test="$level = 1 and following-sibling::mn:clause">8pt</xsl:when>
|
|
1959
|
-
<xsl:when test="$level = 1">12pt</xsl:when>
|
|
1960
|
-
<xsl:when test="$level = 2 and following-sibling::mn:clause">8pt</xsl:when>
|
|
1961
|
-
<xsl:when test="$level >= 2">12pt</xsl:when>
|
|
1962
|
-
<xsl:when test="@type = 'section-title'">6mm</xsl:when>
|
|
1963
|
-
<xsl:when test="@inline-header = 'true'">0pt</xsl:when>
|
|
1964
|
-
<xsl:when test="@ancestor = 'annex' and $level = 1">6mm</xsl:when>
|
|
1965
|
-
<xsl:otherwise>0mm</xsl:otherwise>
|
|
1966
|
-
</xsl:choose>
|
|
1967
|
-
</xsl:variable>
|
|
1968
|
-
|
|
1969
1910
|
<!-- to space-before Foreword -->
|
|
1970
1911
|
<xsl:if test="@ancestor = 'foreword' and $level = '1'"><fo:block/></xsl:if>
|
|
1971
1912
|
|
|
1913
|
+
<xsl:variable name="title_styles"><styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"/></styles></xsl:variable>
|
|
1914
|
+
|
|
1972
1915
|
<xsl:choose>
|
|
1973
1916
|
<xsl:when test="@inline-header = 'true' and following-sibling::*[1][self::mn:p]">
|
|
1974
1917
|
<fo:block role="H{$level}">
|
|
@@ -1981,25 +1924,7 @@
|
|
|
1981
1924
|
</xsl:when>
|
|
1982
1925
|
<xsl:otherwise>
|
|
1983
1926
|
<xsl:element name="{$element-name}">
|
|
1984
|
-
<xsl:
|
|
1985
|
-
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
|
1986
|
-
<xsl:attribute name="font-weight"><xsl:value-of select="$font-weight"/></xsl:attribute>
|
|
1987
|
-
<xsl:attribute name="text-align"><xsl:value-of select="$text-align"/></xsl:attribute>
|
|
1988
|
-
<xsl:attribute name="space-before"><xsl:value-of select="$margin-top"/></xsl:attribute>
|
|
1989
|
-
<xsl:attribute name="margin-bottom"><xsl:value-of select="$margin-bottom"/></xsl:attribute>
|
|
1990
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
1991
|
-
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
|
1992
|
-
|
|
1993
|
-
<xsl:if test="@type = 'floating-title' or @type = 'section-title'">
|
|
1994
|
-
<xsl:copy-of select="@id"/>
|
|
1995
|
-
</xsl:if>
|
|
1996
|
-
|
|
1997
|
-
<xsl:if test="$vertical_layout = 'true'">
|
|
1998
|
-
<!-- <xsl:attribute name="letter-spacing">1mm</xsl:attribute> -->
|
|
1999
|
-
<xsl:if test="not($text-align = 'center')">
|
|
2000
|
-
<xsl:attribute name="margin-left">-6mm</xsl:attribute>
|
|
2001
|
-
</xsl:if>
|
|
2002
|
-
</xsl:if>
|
|
1927
|
+
<xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
|
|
2003
1928
|
|
|
2004
1929
|
<!-- if first and last childs are `add` ace-tag, then move start ace-tag before title -->
|
|
2005
1930
|
<xsl:if test="mn:tab[1]/following-sibling::node()[last()][self::mn:add][starts-with(text(), $ace_tag)]">
|
|
@@ -2158,46 +2083,14 @@
|
|
|
2158
2083
|
<xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
|
|
2159
2084
|
<xsl:variable name="element-name">fo:block</xsl:variable>
|
|
2160
2085
|
|
|
2161
|
-
<xsl:
|
|
2162
|
-
<xsl:
|
|
2163
|
-
<xsl:with-param name="
|
|
2164
|
-
</
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
<xsl:if test="not(parent::mn:note or parent::mn:li or ancestor::mn:table)">
|
|
2168
|
-
<xsl:attribute name="text-indent"><xsl:value-of select="$text_indent"/>mm</xsl:attribute>
|
|
2169
|
-
</xsl:if>
|
|
2170
|
-
|
|
2171
|
-
<xsl:copy-of select="@id"/>
|
|
2172
|
-
|
|
2173
|
-
<xsl:attribute name="line-height">1.5</xsl:attribute>
|
|
2174
|
-
<!-- bookmarks only in paragraph -->
|
|
2175
|
-
|
|
2176
|
-
<xsl:if test="count(mn:bookmark) != 0 and count(*) = count(mn:bookmark) and normalize-space() = ''">
|
|
2177
|
-
<xsl:attribute name="font-size">0</xsl:attribute>
|
|
2178
|
-
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
2179
|
-
<xsl:attribute name="line-height">0</xsl:attribute>
|
|
2180
|
-
</xsl:if>
|
|
2181
|
-
|
|
2182
|
-
<xsl:if test="ancestor::*[@key = 'true']">
|
|
2183
|
-
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
|
2184
|
-
</xsl:if>
|
|
2185
|
-
|
|
2186
|
-
<xsl:if test="parent::mn:fmt-definition">
|
|
2187
|
-
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
|
2188
|
-
</xsl:if>
|
|
2189
|
-
|
|
2190
|
-
<xsl:if test="parent::mn:li or following-sibling::*[1][self::mn:ol or self::mn:ul or self::mn:note or self::mn:example] or parent::mn:quote">
|
|
2191
|
-
<xsl:attribute name="margin-bottom">4pt</xsl:attribute>
|
|
2192
|
-
</xsl:if>
|
|
2193
|
-
|
|
2194
|
-
<xsl:if test="parent::mn:td or parent::mn:th or parent::mn:dd">
|
|
2195
|
-
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
2196
|
-
</xsl:if>
|
|
2086
|
+
<xsl:variable name="p_styles">
|
|
2087
|
+
<styles xsl:use-attribute-sets="p-style">
|
|
2088
|
+
<xsl:call-template name="refine_p-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template>
|
|
2089
|
+
</styles>
|
|
2090
|
+
</xsl:variable>
|
|
2197
2091
|
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
</xsl:if>
|
|
2092
|
+
<xsl:element name="{$element-name}">
|
|
2093
|
+
<xsl:copy-of select="xalan:nodeset($p_styles)/styles/@*"/>
|
|
2201
2094
|
|
|
2202
2095
|
<xsl:apply-templates>
|
|
2203
2096
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
|
@@ -3260,6 +3153,23 @@
|
|
|
3260
3153
|
<xsl:param name="section"/>
|
|
3261
3154
|
<xsl:param name="copyrightText"/>
|
|
3262
3155
|
<xsl:param name="section_title"/>
|
|
3156
|
+
|
|
3157
|
+
<xsl:call-template name="insertHeader">
|
|
3158
|
+
<xsl:with-param name="docidentifier" select="$docidentifier"/>
|
|
3159
|
+
<xsl:with-param name="section" select="$section"/>
|
|
3160
|
+
<xsl:with-param name="section_title" select="$section_title"/>
|
|
3161
|
+
</xsl:call-template>
|
|
3162
|
+
|
|
3163
|
+
<xsl:call-template name="insertFooter">
|
|
3164
|
+
<xsl:with-param name="section" select="$section"/>
|
|
3165
|
+
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
|
3166
|
+
</xsl:call-template>
|
|
3167
|
+
</xsl:template>
|
|
3168
|
+
|
|
3169
|
+
<xsl:template name="insertHeader">
|
|
3170
|
+
<xsl:param name="docidentifier"/>
|
|
3171
|
+
<xsl:param name="section"/>
|
|
3172
|
+
<xsl:param name="section_title"/>
|
|
3263
3173
|
<fo:static-content flow-name="header-odd-first" role="artifact">
|
|
3264
3174
|
<fo:block-container font-family="Arial" font-size="9pt" height="26mm" display-align="after" text-align="right">
|
|
3265
3175
|
<xsl:if test="$vertical_layout = 'true'">
|
|
@@ -3315,11 +3225,6 @@
|
|
|
3315
3225
|
<fo:block> </fo:block>
|
|
3316
3226
|
</fo:block-container>
|
|
3317
3227
|
</fo:static-content>
|
|
3318
|
-
|
|
3319
|
-
<xsl:call-template name="insertFooter">
|
|
3320
|
-
<xsl:with-param name="section" select="$section"/>
|
|
3321
|
-
<xsl:with-param name="copyrightText" select="$copyrightText"/>
|
|
3322
|
-
</xsl:call-template>
|
|
3323
3228
|
</xsl:template>
|
|
3324
3229
|
|
|
3325
3230
|
<xsl:template name="insertFooter">
|
|
@@ -3327,9 +3232,9 @@
|
|
|
3327
3232
|
<xsl:param name="copyrightText"/>
|
|
3328
3233
|
<fo:static-content flow-name="footer">
|
|
3329
3234
|
<fo:block-container height="24mm" display-align="after">
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3235
|
+
<xsl:if test="$section = 'commentary'">
|
|
3236
|
+
<xsl:attribute name="height">24.5mm</xsl:attribute>
|
|
3237
|
+
</xsl:if>
|
|
3333
3238
|
<xsl:if test="$section = 'preface'">
|
|
3334
3239
|
<fo:block font-size="9pt" text-align="center" space-after="10pt">(<fo:inline font-family="Times New Roman"><fo:page-number/></fo:inline>)</fo:block>
|
|
3335
3240
|
</xsl:if>
|
|
@@ -7661,6 +7566,10 @@
|
|
|
7661
7566
|
</xsl:element>
|
|
7662
7567
|
</xsl:template>
|
|
7663
7568
|
|
|
7569
|
+
<!-- show sourcecode's name 'before' or 'after' source code -->
|
|
7570
|
+
<xsl:variable name="sourcecode-name-position"><xsl:text>after</xsl:text>
|
|
7571
|
+
</xsl:variable>
|
|
7572
|
+
|
|
7664
7573
|
<xsl:template match="mn:sourcecode" name="sourcecode">
|
|
7665
7574
|
|
|
7666
7575
|
<xsl:variable name="sourcecode_attributes">
|
|
@@ -7684,7 +7593,12 @@
|
|
|
7684
7593
|
|
|
7685
7594
|
<xsl:call-template name="refine_sourcecode-container-style"/>
|
|
7686
7595
|
|
|
7687
|
-
<fo:block-container margin-left="0mm" role="SKIP">
|
|
7596
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
7597
|
+
|
|
7598
|
+
<!-- <xsl:if test="$namespace = 'rsd'"> -->
|
|
7599
|
+
<xsl:if test="$sourcecode-name-position = 'before'">
|
|
7600
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
|
|
7601
|
+
</xsl:if>
|
|
7688
7602
|
|
|
7689
7603
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
|
7690
7604
|
|
|
@@ -7706,7 +7620,16 @@
|
|
|
7706
7620
|
</fo:block>
|
|
7707
7621
|
|
|
7708
7622
|
<xsl:apply-templates select="mn:dl"/> <!-- Key table -->
|
|
7709
|
-
|
|
7623
|
+
|
|
7624
|
+
<!-- <xsl:choose>
|
|
7625
|
+
<xsl:when test="$namespace = 'rsd'"></xsl:when>
|
|
7626
|
+
<xsl:otherwise>
|
|
7627
|
+
<xsl:apply-templates select="mn:fmt-name" /> --><!-- show sourcecode's name AFTER content -->
|
|
7628
|
+
<!-- </xsl:otherwise>
|
|
7629
|
+
</xsl:choose> -->
|
|
7630
|
+
<xsl:if test="$sourcecode-name-position = 'after'">
|
|
7631
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
|
|
7632
|
+
</xsl:if>
|
|
7710
7633
|
|
|
7711
7634
|
</fo:block-container>
|
|
7712
7635
|
</fo:block-container>
|
|
@@ -8972,95 +8895,89 @@
|
|
|
8972
8895
|
<xsl:template name="refine_term-style">
|
|
8973
8896
|
</xsl:template>
|
|
8974
8897
|
|
|
8975
|
-
<xsl:attribute-set name="term-
|
|
8898
|
+
<xsl:attribute-set name="term-number-style">
|
|
8976
8899
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
8977
8900
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
8978
8901
|
<xsl:attribute name="space-after">2pt</xsl:attribute>
|
|
8979
8902
|
</xsl:attribute-set> <!-- term-name-style -->
|
|
8980
8903
|
|
|
8981
|
-
<xsl:template name="refine_term-
|
|
8904
|
+
<xsl:template name="refine_term-number-style">
|
|
8982
8905
|
<xsl:if test="not($vertical_layout = 'true')">
|
|
8983
8906
|
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
|
8984
8907
|
</xsl:if>
|
|
8985
8908
|
</xsl:template>
|
|
8986
8909
|
|
|
8987
|
-
<xsl:attribute-set name="preferred-style">
|
|
8988
|
-
</xsl:attribute-set> <!-- preferred-style -->
|
|
8989
|
-
|
|
8990
|
-
<xsl:template name="refine_preferred-style">
|
|
8991
|
-
</xsl:template>
|
|
8992
|
-
|
|
8993
|
-
<xsl:attribute-set name="preferred-block-style">
|
|
8910
|
+
<xsl:attribute-set name="term-preferred-block-style">
|
|
8994
8911
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
|
8995
8912
|
|
|
8996
|
-
<xsl:template name="
|
|
8913
|
+
<xsl:template name="refine_term-preferred-block-style">
|
|
8997
8914
|
<xsl:if test="$vertical_layout = 'true'">
|
|
8998
8915
|
<xsl:attribute name="letter-spacing">1mm</xsl:attribute>
|
|
8999
8916
|
<xsl:attribute name="margin-left">-6mm</xsl:attribute>
|
|
9000
8917
|
</xsl:if>
|
|
9001
8918
|
</xsl:template>
|
|
9002
8919
|
|
|
9003
|
-
<xsl:attribute-set name="preferred-
|
|
8920
|
+
<xsl:attribute-set name="term-preferred-style">
|
|
9004
8921
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
9005
8922
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
9006
8923
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
9007
8924
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
|
9008
8925
|
|
|
9009
|
-
<xsl:template name="
|
|
8926
|
+
<xsl:template name="refine_term-preferred-style">
|
|
9010
8927
|
<xsl:if test="mn:strong">
|
|
9011
8928
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
9012
8929
|
</xsl:if>
|
|
9013
8930
|
</xsl:template>
|
|
9014
8931
|
|
|
9015
|
-
<xsl:attribute-set name="domain-style">
|
|
9016
|
-
</xsl:attribute-set> <!-- domain-style -->
|
|
8932
|
+
<xsl:attribute-set name="term-domain-style">
|
|
8933
|
+
</xsl:attribute-set> <!-- term-domain-style -->
|
|
9017
8934
|
|
|
9018
|
-
<xsl:template name="
|
|
8935
|
+
<xsl:template name="refine_term-domain-style">
|
|
9019
8936
|
</xsl:template>
|
|
9020
8937
|
|
|
9021
|
-
<xsl:attribute-set name="admitted-style">
|
|
9022
|
-
</xsl:attribute-set> <!-- admitted-style -->
|
|
8938
|
+
<xsl:attribute-set name="term-admitted-style">
|
|
8939
|
+
</xsl:attribute-set> <!-- term-admitted-style -->
|
|
9023
8940
|
|
|
9024
|
-
<xsl:template name="
|
|
8941
|
+
<xsl:template name="refine_term-admitted-style">
|
|
9025
8942
|
</xsl:template>
|
|
9026
8943
|
|
|
9027
|
-
<xsl:attribute-set name="deprecates-style">
|
|
9028
|
-
</xsl:attribute-set> <!-- deprecates-style -->
|
|
8944
|
+
<xsl:attribute-set name="term-deprecates-style">
|
|
8945
|
+
</xsl:attribute-set> <!-- term-deprecates-style -->
|
|
9029
8946
|
|
|
9030
|
-
<xsl:template name="
|
|
8947
|
+
<xsl:template name="refine_term-deprecates-style">
|
|
9031
8948
|
</xsl:template>
|
|
9032
8949
|
|
|
9033
|
-
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
|
8950
|
+
<xsl:attribute-set name="term-related-block-style" use-attribute-sets="term-preferred-block-style">
|
|
9034
8951
|
</xsl:attribute-set>
|
|
9035
8952
|
|
|
9036
|
-
<xsl:template name="
|
|
8953
|
+
<xsl:template name="refine_term-related-block-style">
|
|
9037
8954
|
</xsl:template>
|
|
9038
8955
|
|
|
9039
|
-
<xsl:attribute-set name="definition-style">
|
|
8956
|
+
<xsl:attribute-set name="term-definition-style">
|
|
9040
8957
|
<xsl:attribute name="space-before">2pt</xsl:attribute>
|
|
9041
8958
|
<xsl:attribute name="space-after">2pt</xsl:attribute>
|
|
9042
|
-
</xsl:attribute-set> <!-- definition-style -->
|
|
8959
|
+
</xsl:attribute-set> <!-- term-definition-style -->
|
|
9043
8960
|
|
|
9044
|
-
<xsl:template name="
|
|
8961
|
+
<xsl:template name="refine_term-definition-style">
|
|
9045
8962
|
</xsl:template>
|
|
9046
8963
|
|
|
9047
|
-
<xsl:attribute-set name="termsource-style">
|
|
8964
|
+
<xsl:attribute-set name="term-termsource-style">
|
|
9048
8965
|
<xsl:attribute name="margin-left">6mm</xsl:attribute>
|
|
9049
|
-
</xsl:attribute-set> <!-- termsource-style -->
|
|
8966
|
+
</xsl:attribute-set> <!-- term-termsource-style -->
|
|
9050
8967
|
|
|
9051
|
-
<xsl:template name="
|
|
9052
|
-
</xsl:template> <!--
|
|
8968
|
+
<xsl:template name="refine_term-termsource-style">
|
|
8969
|
+
</xsl:template> <!-- refine_term-termsource-style -->
|
|
9053
8970
|
|
|
9054
|
-
<xsl:attribute-set name="termsource-text-style">
|
|
9055
|
-
</xsl:attribute-set> <!-- termsource-text-style -->
|
|
8971
|
+
<xsl:attribute-set name="term-termsource-text-style">
|
|
8972
|
+
</xsl:attribute-set> <!-- term-termsource-text-style -->
|
|
9056
8973
|
|
|
9057
|
-
<xsl:template name="
|
|
8974
|
+
<xsl:template name="refine_term-termsource-text-style">
|
|
9058
8975
|
</xsl:template>
|
|
9059
8976
|
|
|
9060
|
-
<xsl:attribute-set name="origin-style">
|
|
9061
|
-
</xsl:attribute-set> <!-- origin-style -->
|
|
8977
|
+
<xsl:attribute-set name="term-origin-style">
|
|
8978
|
+
</xsl:attribute-set> <!-- term-origin-style -->
|
|
9062
8979
|
|
|
9063
|
-
<xsl:template name="
|
|
8980
|
+
<xsl:template name="refine_term-origin-style">
|
|
9064
8981
|
</xsl:template>
|
|
9065
8982
|
|
|
9066
8983
|
<!-- ====== -->
|
|
@@ -9104,9 +9021,9 @@
|
|
|
9104
9021
|
<!-- modification -->
|
|
9105
9022
|
<!-- ====== -->
|
|
9106
9023
|
<xsl:template match="mn:fmt-termsource" name="termsource">
|
|
9107
|
-
<fo:block xsl:use-attribute-sets="termsource-style">
|
|
9024
|
+
<fo:block xsl:use-attribute-sets="term-termsource-style">
|
|
9108
9025
|
|
|
9109
|
-
<xsl:call-template name="
|
|
9026
|
+
<xsl:call-template name="refine_term-termsource-style"/>
|
|
9110
9027
|
|
|
9111
9028
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
|
9112
9029
|
<xsl:variable name="termsource_text">
|
|
@@ -9154,8 +9071,8 @@
|
|
|
9154
9071
|
|
|
9155
9072
|
<!-- text SOURCE: -->
|
|
9156
9073
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
|
9157
|
-
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
|
9158
|
-
<xsl:call-template name="
|
|
9074
|
+
<fo:inline xsl:use-attribute-sets="term-termsource-text-style">
|
|
9075
|
+
<xsl:call-template name="refine_term-termsource-text-style"/>
|
|
9159
9076
|
<xsl:value-of select="."/>
|
|
9160
9077
|
</fo:inline>
|
|
9161
9078
|
</xsl:template>
|
|
@@ -9167,8 +9084,8 @@
|
|
|
9167
9084
|
<xsl:if test="normalize-space(@citeas) = ''">
|
|
9168
9085
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
|
9169
9086
|
</xsl:if>
|
|
9170
|
-
<fo:inline xsl:use-attribute-sets="origin-style">
|
|
9171
|
-
<xsl:call-template name="
|
|
9087
|
+
<fo:inline xsl:use-attribute-sets="term-origin-style">
|
|
9088
|
+
<xsl:call-template name="refine_term-origin-style"/>
|
|
9172
9089
|
<xsl:apply-templates/>
|
|
9173
9090
|
</fo:inline>
|
|
9174
9091
|
</fo:basic-link>
|
|
@@ -9216,14 +9133,14 @@
|
|
|
9216
9133
|
<xsl:variable name="levelTerm">
|
|
9217
9134
|
<xsl:call-template name="getLevelTermName"/>
|
|
9218
9135
|
</xsl:variable>
|
|
9219
|
-
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
|
9136
|
+
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="term-preferred-block-style">
|
|
9220
9137
|
|
|
9221
|
-
<xsl:call-template name="
|
|
9138
|
+
<xsl:call-template name="refine_term-preferred-block-style"/>
|
|
9222
9139
|
|
|
9223
9140
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
|
9224
9141
|
|
|
9225
|
-
<fo:block xsl:use-attribute-sets="term-
|
|
9226
|
-
<xsl:call-template name="refine_term-
|
|
9142
|
+
<fo:block xsl:use-attribute-sets="term-number-style" role="SKIP">
|
|
9143
|
+
<xsl:call-template name="refine_term-number-style"/>
|
|
9227
9144
|
|
|
9228
9145
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
|
9229
9146
|
<xsl:call-template name="setIDforNamedDestination"/>
|
|
@@ -9233,8 +9150,8 @@
|
|
|
9233
9150
|
</fo:block>
|
|
9234
9151
|
</xsl:if>
|
|
9235
9152
|
|
|
9236
|
-
<fo:block xsl:use-attribute-sets="preferred-
|
|
9237
|
-
<xsl:call-template name="
|
|
9153
|
+
<fo:block xsl:use-attribute-sets="term-preferred-style" role="SKIP">
|
|
9154
|
+
<xsl:call-template name="refine_term-preferred-style"/>
|
|
9238
9155
|
<xsl:if test="$vertical_layout = 'true'">
|
|
9239
9156
|
<xsl:attribute name="margin-left">6mm</xsl:attribute>
|
|
9240
9157
|
<xsl:attribute name="font-family">Noto Sans JP</xsl:attribute>
|
|
@@ -9262,15 +9179,15 @@
|
|
|
9262
9179
|
<xsl:template match="mn:domain"/>
|
|
9263
9180
|
|
|
9264
9181
|
<xsl:template match="mn:fmt-admitted">
|
|
9265
|
-
<fo:block xsl:use-attribute-sets="admitted-style">
|
|
9266
|
-
<xsl:call-template name="
|
|
9182
|
+
<fo:block xsl:use-attribute-sets="term-admitted-style">
|
|
9183
|
+
<xsl:call-template name="refine_term-admitted-style"/>
|
|
9267
9184
|
<xsl:apply-templates/>
|
|
9268
9185
|
</fo:block>
|
|
9269
9186
|
</xsl:template>
|
|
9270
9187
|
|
|
9271
9188
|
<xsl:template match="mn:fmt-deprecates">
|
|
9272
|
-
<fo:block xsl:use-attribute-sets="deprecates-style">
|
|
9273
|
-
<xsl:call-template name="
|
|
9189
|
+
<fo:block xsl:use-attribute-sets="term-deprecates-style">
|
|
9190
|
+
<xsl:call-template name="refine_term-deprecates-style"/>
|
|
9274
9191
|
<xsl:apply-templates/>
|
|
9275
9192
|
</fo:block>
|
|
9276
9193
|
</xsl:template>
|
|
@@ -9283,8 +9200,8 @@
|
|
|
9283
9200
|
<!-- End Preferred, admitted, deprecated -->
|
|
9284
9201
|
|
|
9285
9202
|
<xsl:template match="mn:fmt-related">
|
|
9286
|
-
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
|
9287
|
-
<xsl:call-template name="
|
|
9203
|
+
<fo:block role="SKIP" xsl:use-attribute-sets="term-related-block-style">
|
|
9204
|
+
<xsl:call-template name="refine_term-related-block-style"/>
|
|
9288
9205
|
<xsl:apply-templates/>
|
|
9289
9206
|
</fo:block>
|
|
9290
9207
|
</xsl:template>
|
|
@@ -9298,8 +9215,8 @@
|
|
|
9298
9215
|
<!-- definition -->
|
|
9299
9216
|
<!-- ========== -->
|
|
9300
9217
|
<xsl:template match="mn:fmt-definition">
|
|
9301
|
-
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
|
9302
|
-
<xsl:call-template name="
|
|
9218
|
+
<fo:block xsl:use-attribute-sets="term-definition-style" role="SKIP">
|
|
9219
|
+
<xsl:call-template name="refine_term-definition-style"/>
|
|
9303
9220
|
<xsl:apply-templates/>
|
|
9304
9221
|
</fo:block>
|
|
9305
9222
|
</xsl:template>
|
|
@@ -13610,6 +13527,10 @@
|
|
|
13610
13527
|
<!-- image -->
|
|
13611
13528
|
<!-- ====== -->
|
|
13612
13529
|
|
|
13530
|
+
<!-- show figure's name 'before' or 'after' image -->
|
|
13531
|
+
<xsl:variable name="figure-name-position"><xsl:text>after</xsl:text>
|
|
13532
|
+
</xsl:variable>
|
|
13533
|
+
|
|
13613
13534
|
<xsl:template match="mn:figure" name="figure">
|
|
13614
13535
|
<xsl:variable name="isAdded" select="@added"/>
|
|
13615
13536
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
|
@@ -13622,6 +13543,10 @@
|
|
|
13622
13543
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
|
13623
13544
|
</xsl:call-template>
|
|
13624
13545
|
|
|
13546
|
+
<xsl:if test="$figure-name-position = 'before'"> <!-- show figure's name BEFORE image -->
|
|
13547
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
|
13548
|
+
</xsl:if>
|
|
13549
|
+
|
|
13625
13550
|
<!-- Example: Dimensions in millimeters -->
|
|
13626
13551
|
<xsl:apply-templates select="mn:note[@type = 'units']"/>
|
|
13627
13552
|
|
|
@@ -13647,7 +13572,16 @@
|
|
|
13647
13572
|
<xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
|
|
13648
13573
|
<xsl:call-template name="showFigureKey"/>
|
|
13649
13574
|
</xsl:if>
|
|
13650
|
-
|
|
13575
|
+
|
|
13576
|
+
<!-- <xsl:choose>
|
|
13577
|
+
<xsl:when test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'rsd'"></xsl:when>
|
|
13578
|
+
<xsl:otherwise>
|
|
13579
|
+
<xsl:apply-templates select="mn:fmt-name" /> --> <!-- show figure's name AFTER image -->
|
|
13580
|
+
<!-- </xsl:otherwise>
|
|
13581
|
+
</xsl:choose> -->
|
|
13582
|
+
<xsl:if test="$figure-name-position = 'after'">
|
|
13583
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
|
|
13584
|
+
</xsl:if>
|
|
13651
13585
|
|
|
13652
13586
|
</fo:block-container>
|
|
13653
13587
|
<xsl:if test="$vertical_layout = 'true'">
|
|
@@ -15843,7 +15777,6 @@
|
|
|
15843
15777
|
</xsl:attribute-set>
|
|
15844
15778
|
|
|
15845
15779
|
<xsl:template name="refine_references-non-normative-title-style">
|
|
15846
|
-
|
|
15847
15780
|
</xsl:template>
|
|
15848
15781
|
|
|
15849
15782
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
|
@@ -17933,7 +17866,7 @@
|
|
|
17933
17866
|
<!-- ===================================== -->
|
|
17934
17867
|
|
|
17935
17868
|
<xsl:attribute-set name="annex-title-style">
|
|
17936
|
-
</xsl:attribute-set>
|
|
17869
|
+
</xsl:attribute-set> <!-- annex-title-style -->
|
|
17937
17870
|
|
|
17938
17871
|
<xsl:template name="refine_annex-title-style">
|
|
17939
17872
|
</xsl:template>
|
|
@@ -17944,6 +17877,143 @@
|
|
|
17944
17877
|
<xsl:template name="refine_p-zzSTDTitle1-style">
|
|
17945
17878
|
</xsl:template>
|
|
17946
17879
|
|
|
17880
|
+
<xsl:attribute-set name="p-style">
|
|
17881
|
+
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
|
17882
|
+
<xsl:attribute name="line-height">1.5</xsl:attribute>
|
|
17883
|
+
</xsl:attribute-set> <!-- p-style -->
|
|
17884
|
+
|
|
17885
|
+
<xsl:template name="refine_p-style">
|
|
17886
|
+
<xsl:param name="element-name"/>
|
|
17887
|
+
<xsl:param name="margin"/>
|
|
17888
|
+
<xsl:call-template name="setBlockAttributes">
|
|
17889
|
+
<xsl:with-param name="text_align_default">justify</xsl:with-param>
|
|
17890
|
+
</xsl:call-template>
|
|
17891
|
+
|
|
17892
|
+
<xsl:if test="not(parent::mn:note or parent::mn:li or ancestor::mn:table)">
|
|
17893
|
+
<xsl:attribute name="text-indent"><xsl:value-of select="$text_indent"/>mm</xsl:attribute>
|
|
17894
|
+
</xsl:if>
|
|
17895
|
+
|
|
17896
|
+
<xsl:copy-of select="@id"/>
|
|
17897
|
+
|
|
17898
|
+
<!-- bookmarks only in paragraph -->
|
|
17899
|
+
|
|
17900
|
+
<xsl:if test="count(mn:bookmark) != 0 and count(*) = count(mn:bookmark) and normalize-space() = ''">
|
|
17901
|
+
<xsl:attribute name="font-size">0</xsl:attribute>
|
|
17902
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
17903
|
+
<xsl:attribute name="line-height">0</xsl:attribute>
|
|
17904
|
+
</xsl:if>
|
|
17905
|
+
|
|
17906
|
+
<xsl:if test="ancestor::*[@key = 'true']">
|
|
17907
|
+
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
|
17908
|
+
</xsl:if>
|
|
17909
|
+
|
|
17910
|
+
<xsl:if test="parent::mn:fmt-definition">
|
|
17911
|
+
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
|
17912
|
+
</xsl:if>
|
|
17913
|
+
|
|
17914
|
+
<xsl:if test="parent::mn:li or following-sibling::*[1][self::mn:ol or self::mn:ul or self::mn:note or self::mn:example] or parent::mn:quote">
|
|
17915
|
+
<xsl:attribute name="margin-bottom">4pt</xsl:attribute>
|
|
17916
|
+
</xsl:if>
|
|
17917
|
+
|
|
17918
|
+
<xsl:if test="parent::mn:td or parent::mn:th or parent::mn:dd">
|
|
17919
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
17920
|
+
</xsl:if>
|
|
17921
|
+
|
|
17922
|
+
<xsl:if test="parent::mn:clause[@type = 'inner-cover-note'] or ancestor::mn:boilerplate">
|
|
17923
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
17924
|
+
</xsl:if>
|
|
17925
|
+
<!-- $namespace = 'jis' -->
|
|
17926
|
+
|
|
17927
|
+
</xsl:template> <!-- refine_p-style -->
|
|
17928
|
+
|
|
17929
|
+
<xsl:attribute-set name="title-style">
|
|
17930
|
+
<!-- Note: font-size for level 1 title -->
|
|
17931
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
|
17932
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
17933
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
17934
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
17935
|
+
<xsl:attribute name="space-before">6.5mm</xsl:attribute>
|
|
17936
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
17937
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
17938
|
+
</xsl:attribute-set> <!-- title-style -->
|
|
17939
|
+
|
|
17940
|
+
<xsl:template name="refine_title-style">
|
|
17941
|
+
<xsl:param name="element-name"/>
|
|
17942
|
+
<xsl:variable name="level">
|
|
17943
|
+
<xsl:call-template name="getLevel"/>
|
|
17944
|
+
</xsl:variable>
|
|
17945
|
+
|
|
17946
|
+
<xsl:if test="@inline-header = 'true'">
|
|
17947
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
17948
|
+
</xsl:if>
|
|
17949
|
+
|
|
17950
|
+
<xsl:if test="@type = 'section-title'">
|
|
17951
|
+
<xsl:attribute name="margin-bottom">6mm</xsl:attribute>
|
|
17952
|
+
</xsl:if>
|
|
17953
|
+
|
|
17954
|
+
<xsl:if test="$level = 1">
|
|
17955
|
+
<xsl:if test="following-sibling::mn:clause">
|
|
17956
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
|
17957
|
+
</xsl:if>
|
|
17958
|
+
<xsl:if test="@ancestor = 'foreword'">
|
|
17959
|
+
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
|
17960
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
17961
|
+
<xsl:attribute name="space-before">9mm</xsl:attribute>
|
|
17962
|
+
<xsl:attribute name="margin-bottom">9mm</xsl:attribute>
|
|
17963
|
+
</xsl:if>
|
|
17964
|
+
<xsl:if test="@ancestor = 'annex'">
|
|
17965
|
+
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
|
17966
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
17967
|
+
<xsl:if test="preceding-sibling::mn:annex[1][@commentary = 'true']">
|
|
17968
|
+
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
|
17969
|
+
<xsl:attribute name="space-before">1mm</xsl:attribute>
|
|
17970
|
+
<xsl:attribute name="margin-bottom">7mm</xsl:attribute>
|
|
17971
|
+
</xsl:if>
|
|
17972
|
+
</xsl:if>
|
|
17973
|
+
</xsl:if>
|
|
17974
|
+
|
|
17975
|
+
<xsl:if test="$level = 2">
|
|
17976
|
+
<xsl:attribute name="space-before">2mm</xsl:attribute>
|
|
17977
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
17978
|
+
<xsl:if test="@ancestor = 'foreword'">
|
|
17979
|
+
<xsl:attribute name="space-before">0mm</xsl:attribute>
|
|
17980
|
+
</xsl:if>
|
|
17981
|
+
<xsl:if test="@ancestor = 'annex'">
|
|
17982
|
+
<xsl:attribute name="space-before">4.5mm</xsl:attribute>
|
|
17983
|
+
</xsl:if>
|
|
17984
|
+
<xsl:if test="@ancestor = 'bibliography'">
|
|
17985
|
+
<xsl:attribute name="space-before">0mm</xsl:attribute>
|
|
17986
|
+
</xsl:if>
|
|
17987
|
+
<xsl:if test="following-sibling::mn:clause">
|
|
17988
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
|
17989
|
+
</xsl:if>
|
|
17990
|
+
</xsl:if>
|
|
17991
|
+
|
|
17992
|
+
<xsl:if test="$level >= 3">
|
|
17993
|
+
<xsl:attribute name="space-before">2mm</xsl:attribute>
|
|
17994
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
17995
|
+
</xsl:if>
|
|
17996
|
+
|
|
17997
|
+
<xsl:if test="@type = 'section-title'">
|
|
17998
|
+
<xsl:attribute name="font-size">18pt</xsl:attribute>
|
|
17999
|
+
</xsl:if>
|
|
18000
|
+
|
|
18001
|
+
<xsl:if test="@type = 'floating-title' or @type = 'section-title'">
|
|
18002
|
+
<xsl:copy-of select="@id"/>
|
|
18003
|
+
</xsl:if>
|
|
18004
|
+
|
|
18005
|
+
<xsl:if test="$vertical_layout = 'true'">
|
|
18006
|
+
<xsl:attribute name="font-family">Noto Sans JP</xsl:attribute>
|
|
18007
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
18008
|
+
<xsl:attribute name="font-weight">500</xsl:attribute>
|
|
18009
|
+
<xsl:if test="not($level = 1 and (@ancestor = 'foreword' or @ancestor = 'annex'))">
|
|
18010
|
+
<xsl:attribute name="margin-left">-6mm</xsl:attribute>
|
|
18011
|
+
</xsl:if>
|
|
18012
|
+
</xsl:if>
|
|
18013
|
+
<!-- $namespace = 'jis' -->
|
|
18014
|
+
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
|
18015
|
+
</xsl:template> <!-- refine_title-style -->
|
|
18016
|
+
|
|
17947
18017
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
17948
18018
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
17949
18019
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
@@ -18282,6 +18352,12 @@
|
|
|
18282
18352
|
</xsl:choose>
|
|
18283
18353
|
</xsl:template>
|
|
18284
18354
|
|
|
18355
|
+
<xsl:attribute-set name="reset-margins-style">
|
|
18356
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
18357
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
18358
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
18359
|
+
</xsl:attribute-set>
|
|
18360
|
+
|
|
18285
18361
|
<xsl:attribute-set name="clause-style">
|
|
18286
18362
|
|
|
18287
18363
|
</xsl:attribute-set>
|
|
@@ -19317,8 +19393,9 @@
|
|
|
19317
19393
|
|
|
19318
19394
|
<xsl:template name="setTextAlignment">
|
|
19319
19395
|
<xsl:param name="default">left</xsl:param>
|
|
19396
|
+
<xsl:param name="skip_default">false</xsl:param>
|
|
19320
19397
|
<xsl:variable name="align" select="normalize-space(@align)"/>
|
|
19321
|
-
<xsl:
|
|
19398
|
+
<xsl:variable name="text_align">
|
|
19322
19399
|
<xsl:choose>
|
|
19323
19400
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
|
19324
19401
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
|
@@ -19326,9 +19403,13 @@
|
|
|
19326
19403
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
|
19327
19404
|
<xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
|
|
19328
19405
|
<xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
|
|
19406
|
+
<xsl:when test="$skip_default = 'true'"/>
|
|
19329
19407
|
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
|
19330
19408
|
</xsl:choose>
|
|
19331
|
-
</xsl:
|
|
19409
|
+
</xsl:variable>
|
|
19410
|
+
<xsl:if test="normalize-space($text_align) != ''">
|
|
19411
|
+
<xsl:attribute name="text-align"><xsl:value-of select="$text_align"/></xsl:attribute>
|
|
19412
|
+
</xsl:if>
|
|
19332
19413
|
<xsl:if test="$align = 'indent'">
|
|
19333
19414
|
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
|
19334
19415
|
</xsl:if>
|
|
@@ -19336,8 +19417,10 @@
|
|
|
19336
19417
|
|
|
19337
19418
|
<xsl:template name="setBlockAttributes">
|
|
19338
19419
|
<xsl:param name="text_align_default">left</xsl:param>
|
|
19420
|
+
<xsl:param name="skip_text_align_default">false</xsl:param>
|
|
19339
19421
|
<xsl:call-template name="setTextAlignment">
|
|
19340
19422
|
<xsl:with-param name="default" select="$text_align_default"/>
|
|
19423
|
+
<xsl:with-param name="skip_default" select="$skip_text_align_default"/>
|
|
19341
19424
|
</xsl:call-template>
|
|
19342
19425
|
<xsl:call-template name="setKeepAttributes"/>
|
|
19343
19426
|
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
|
@@ -19380,6 +19463,20 @@
|
|
|
19380
19463
|
</fo:block-container>
|
|
19381
19464
|
</xsl:template>
|
|
19382
19465
|
|
|
19466
|
+
<!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
|
|
19467
|
+
<xsl:template name="insertCoverPageFullImage">
|
|
19468
|
+
<xsl:param name="name">coverpage-image</xsl:param>
|
|
19469
|
+
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image">
|
|
19470
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
|
19471
|
+
<fo:flow flow-name="xsl-region-body">
|
|
19472
|
+
<xsl:call-template name="insertBackgroundPageImage">
|
|
19473
|
+
<xsl:with-param name="number" select="position()"/>
|
|
19474
|
+
</xsl:call-template>
|
|
19475
|
+
</fo:flow>
|
|
19476
|
+
</fo:page-sequence>
|
|
19477
|
+
</xsl:for-each>
|
|
19478
|
+
</xsl:template>
|
|
19479
|
+
|
|
19383
19480
|
<xsl:template name="insertPageImage">
|
|
19384
19481
|
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
|
19385
19482
|
<xsl:param name="bitmap_width" select="$pageWidth"/>
|