metanorma-iso 1.8.4 → 1.9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +1 -1
- data/.rubocop.yml +1 -1
- data/lib/asciidoctor/iso/cleanup.rb +0 -1
- data/lib/asciidoctor/iso/isodoc.rng +50 -8
- data/lib/asciidoctor/iso/isostandard.rng +7 -3
- data/lib/asciidoctor/iso/section.rb +3 -0
- data/lib/asciidoctor/iso/validate.rb +4 -17
- data/lib/asciidoctor/iso/validate_section.rb +50 -34
- data/lib/asciidoctor/iso/validate_style.rb +3 -3
- data/lib/isodoc/iso/base_convert.rb +41 -16
- data/lib/isodoc/iso/html/isodoc.css +475 -20
- data/lib/isodoc/iso/html/isodoc.scss +456 -23
- data/lib/isodoc/iso/html/wordstyle.css +202 -31
- data/lib/isodoc/iso/html/wordstyle.scss +194 -32
- data/lib/isodoc/iso/iso.amendment.xsl +480 -388
- data/lib/isodoc/iso/iso.international-standard.xsl +480 -388
- data/lib/isodoc/iso/isosts_convert.rb +12 -13
- data/lib/isodoc/iso/metadata.rb +2 -2
- data/lib/isodoc/iso/presentation_xml_convert.rb +62 -9
- data/lib/isodoc/iso/sts_convert.rb +4 -5
- data/lib/isodoc/iso/word_convert.rb +153 -39
- data/lib/isodoc/iso/xref.rb +17 -1
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +4 -4
- data/spec/asciidoctor/section_spec.rb +128 -7
- data/spec/asciidoctor/validate_spec.rb +15 -15
- data/spec/isodoc/amd_spec.rb +193 -201
- data/spec/isodoc/blocks_spec.rb +100 -88
- data/spec/isodoc/i18n_spec.rb +36 -36
- data/spec/isodoc/inline_spec.rb +472 -2
- data/spec/isodoc/iso_spec.rb +86 -138
- data/spec/isodoc/postproc_spec.rb +19 -10
- data/spec/isodoc/ref_spec.rb +6 -6
- data/spec/isodoc/section_spec.rb +394 -276
- data/spec/isodoc/table_spec.rb +166 -231
- data/spec/isodoc/terms_spec.rb +11 -8
- data/spec/isodoc/xref_spec.rb +147 -118
- metadata +8 -8
@@ -23,13 +23,6 @@
|
|
23
23
|
<xsl:variable name="marginTop" select="27.4"/>
|
24
24
|
<xsl:variable name="marginBottom" select="13"/>
|
25
25
|
|
26
|
-
<xsl:variable name="figure_name_height">14</xsl:variable>
|
27
|
-
<xsl:variable name="width_effective" select="$pageWidth - $marginLeftRight1 - $marginLeftRight2"/><!-- paper width minus margins -->
|
28
|
-
<xsl:variable name="height_effective" select="$pageHeight - $marginTop - $marginBottom - $figure_name_height"/><!-- paper height minus margins and title height -->
|
29
|
-
<xsl:variable name="image_dpi" select="96"/>
|
30
|
-
<xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/>
|
31
|
-
<xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/>
|
32
|
-
|
33
26
|
<xsl:variable name="docidentifierISO" select="/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso'] | /iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'ISO']"/>
|
34
27
|
|
35
28
|
<xsl:variable name="all_rights_reserved">
|
@@ -1915,257 +1908,6 @@
|
|
1915
1908
|
</fo:block>
|
1916
1909
|
</xsl:template>
|
1917
1910
|
|
1918
|
-
<!-- =================== -->
|
1919
|
-
<!-- SVG images processing -->
|
1920
|
-
<!-- =================== -->
|
1921
|
-
<xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image']) and *[local-name() = 'svg']]/*[local-name() = 'name']/*[local-name() = 'bookmark']" priority="2"/>
|
1922
|
-
<xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image'])]/*[local-name() = 'svg']" priority="2" name="image_svg">
|
1923
|
-
<xsl:param name="name"/>
|
1924
|
-
|
1925
|
-
<xsl:variable name="svg_content">
|
1926
|
-
<xsl:apply-templates select="." mode="svg_update"/>
|
1927
|
-
</xsl:variable>
|
1928
|
-
|
1929
|
-
<xsl:variable name="alt-text">
|
1930
|
-
<xsl:choose>
|
1931
|
-
<xsl:when test="normalize-space(../*[local-name() = 'name']) != ''">
|
1932
|
-
<xsl:value-of select="../*[local-name() = 'name']"/>
|
1933
|
-
</xsl:when>
|
1934
|
-
<xsl:when test="normalize-space($name) != ''">
|
1935
|
-
<xsl:value-of select="$name"/>
|
1936
|
-
</xsl:when>
|
1937
|
-
<xsl:otherwise>Figure</xsl:otherwise>
|
1938
|
-
</xsl:choose>
|
1939
|
-
</xsl:variable>
|
1940
|
-
|
1941
|
-
<xsl:choose>
|
1942
|
-
<xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
|
1943
|
-
<fo:block>
|
1944
|
-
<xsl:variable name="width" select="@width"/>
|
1945
|
-
<xsl:variable name="height" select="@height"/>
|
1946
|
-
|
1947
|
-
<xsl:variable name="scale_x">
|
1948
|
-
<xsl:choose>
|
1949
|
-
<xsl:when test="$width > $width_effective_px">
|
1950
|
-
<xsl:value-of select="$width_effective_px div $width"/>
|
1951
|
-
</xsl:when>
|
1952
|
-
<xsl:otherwise>1</xsl:otherwise>
|
1953
|
-
</xsl:choose>
|
1954
|
-
</xsl:variable>
|
1955
|
-
|
1956
|
-
<xsl:variable name="scale_y">
|
1957
|
-
<xsl:choose>
|
1958
|
-
<xsl:when test="$height * $scale_x > $height_effective_px">
|
1959
|
-
<xsl:value-of select="$height_effective_px div ($height * $scale_x)"/>
|
1960
|
-
</xsl:when>
|
1961
|
-
<xsl:otherwise>1</xsl:otherwise>
|
1962
|
-
</xsl:choose>
|
1963
|
-
</xsl:variable>
|
1964
|
-
|
1965
|
-
<xsl:variable name="scale">
|
1966
|
-
<xsl:choose>
|
1967
|
-
<xsl:when test="$scale_y != 1">
|
1968
|
-
<xsl:value-of select="$scale_x * $scale_y"/>
|
1969
|
-
</xsl:when>
|
1970
|
-
<xsl:otherwise>
|
1971
|
-
<xsl:value-of select="$scale_x"/>
|
1972
|
-
</xsl:otherwise>
|
1973
|
-
</xsl:choose>
|
1974
|
-
</xsl:variable>
|
1975
|
-
|
1976
|
-
<xsl:variable name="width_scale" select="round($width * $scale)"/>
|
1977
|
-
<xsl:variable name="height_scale" select="round($height * $scale)"/>
|
1978
|
-
|
1979
|
-
<fo:table table-layout="fixed" width="100%">
|
1980
|
-
<fo:table-column column-width="proportional-column-width(1)"/>
|
1981
|
-
<fo:table-column column-width="{$width_scale}px"/>
|
1982
|
-
<fo:table-column column-width="proportional-column-width(1)"/>
|
1983
|
-
<fo:table-body>
|
1984
|
-
<fo:table-row>
|
1985
|
-
<fo:table-cell column-number="2">
|
1986
|
-
<fo:block>
|
1987
|
-
<fo:block-container width="{$width_scale}px" height="{$height_scale}px">
|
1988
|
-
<xsl:if test="../*[local-name() = 'name']/*[local-name() = 'bookmark']">
|
1989
|
-
<fo:block line-height="0" font-size="0">
|
1990
|
-
<xsl:for-each select="../*[local-name() = 'name']/*[local-name() = 'bookmark']">
|
1991
|
-
<xsl:call-template name="bookmark"/>
|
1992
|
-
</xsl:for-each>
|
1993
|
-
</fo:block>
|
1994
|
-
</xsl:if>
|
1995
|
-
<fo:block text-depth="0" line-height="0" font-size="0">
|
1996
|
-
|
1997
|
-
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
1998
|
-
<xsl:attribute name="width">100%</xsl:attribute>
|
1999
|
-
<xsl:attribute name="content-height">100%</xsl:attribute>
|
2000
|
-
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
2001
|
-
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2002
|
-
|
2003
|
-
<xsl:apply-templates select="xalan:nodeset($svg_content)" mode="svg_remove_a"/>
|
2004
|
-
</fo:instream-foreign-object>
|
2005
|
-
</fo:block>
|
2006
|
-
|
2007
|
-
<xsl:apply-templates select=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]" mode="svg_imagemap_links">
|
2008
|
-
<xsl:with-param name="scale" select="$scale"/>
|
2009
|
-
</xsl:apply-templates>
|
2010
|
-
</fo:block-container>
|
2011
|
-
</fo:block>
|
2012
|
-
</fo:table-cell>
|
2013
|
-
</fo:table-row>
|
2014
|
-
</fo:table-body>
|
2015
|
-
</fo:table>
|
2016
|
-
</fo:block>
|
2017
|
-
|
2018
|
-
</xsl:when>
|
2019
|
-
<xsl:otherwise>
|
2020
|
-
<fo:block xsl:use-attribute-sets="image-style">
|
2021
|
-
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
2022
|
-
<xsl:attribute name="width">100%</xsl:attribute>
|
2023
|
-
<xsl:attribute name="content-height">100%</xsl:attribute>
|
2024
|
-
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
2025
|
-
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
2026
|
-
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
2027
|
-
<!-- effective height / width = 1.48, 1.4 - with title -->
|
2028
|
-
<xsl:if test="@height > (@width * 1.4)"> <!-- for images with big height -->
|
2029
|
-
<xsl:variable name="width" select="((@width * 1.4) div @height) * 100"/>
|
2030
|
-
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
2031
|
-
</xsl:if>
|
2032
|
-
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2033
|
-
<xsl:copy-of select="$svg_content"/>
|
2034
|
-
</fo:instream-foreign-object>
|
2035
|
-
</fo:block>
|
2036
|
-
</xsl:otherwise>
|
2037
|
-
</xsl:choose>
|
2038
|
-
</xsl:template>
|
2039
|
-
|
2040
|
-
<xsl:template match="@*|node()" mode="svg_update">
|
2041
|
-
<xsl:copy>
|
2042
|
-
<xsl:apply-templates select="@*|node()" mode="svg_update"/>
|
2043
|
-
</xsl:copy>
|
2044
|
-
</xsl:template>
|
2045
|
-
|
2046
|
-
<xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
2047
|
-
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
2048
|
-
<xsl:value-of select="."/>
|
2049
|
-
</xsl:attribute>
|
2050
|
-
</xsl:template>
|
2051
|
-
|
2052
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
2053
|
-
<xsl:variable name="svg_content" select="document(@src)"/>
|
2054
|
-
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
2055
|
-
<xsl:for-each select="xalan:nodeset($svg_content)/node()">
|
2056
|
-
<xsl:call-template name="image_svg">
|
2057
|
-
<xsl:with-param name="name" select="$name"/>
|
2058
|
-
</xsl:call-template>
|
2059
|
-
</xsl:for-each>
|
2060
|
-
</xsl:template>
|
2061
|
-
|
2062
|
-
<xsl:template match="@*|node()" mode="svg_remove_a">
|
2063
|
-
<xsl:copy>
|
2064
|
-
<xsl:apply-templates select="@*|node()" mode="svg_remove_a"/>
|
2065
|
-
</xsl:copy>
|
2066
|
-
</xsl:template>
|
2067
|
-
|
2068
|
-
<xsl:template match="*[local-name() = 'a']" mode="svg_remove_a">
|
2069
|
-
<xsl:apply-templates mode="svg_remove_a"/>
|
2070
|
-
</xsl:template>
|
2071
|
-
|
2072
|
-
<xsl:template match="*[local-name() = 'a']" mode="svg_imagemap_links">
|
2073
|
-
<xsl:param name="scale"/>
|
2074
|
-
<xsl:variable name="dest">
|
2075
|
-
<xsl:choose>
|
2076
|
-
<xsl:when test="starts-with(@href, '#')">
|
2077
|
-
<xsl:value-of select="substring-after(@href, '#')"/>
|
2078
|
-
</xsl:when>
|
2079
|
-
<xsl:otherwise>
|
2080
|
-
<xsl:value-of select="@href"/>
|
2081
|
-
</xsl:otherwise>
|
2082
|
-
</xsl:choose>
|
2083
|
-
</xsl:variable>
|
2084
|
-
<xsl:for-each select="./*[local-name() = 'rect']">
|
2085
|
-
<xsl:call-template name="insertSVGMapLink">
|
2086
|
-
<xsl:with-param name="left" select="floor(@x * $scale)"/>
|
2087
|
-
<xsl:with-param name="top" select="floor(@y * $scale)"/>
|
2088
|
-
<xsl:with-param name="width" select="floor(@width * $scale)"/>
|
2089
|
-
<xsl:with-param name="height" select="floor(@height * $scale)"/>
|
2090
|
-
<xsl:with-param name="dest" select="$dest"/>
|
2091
|
-
</xsl:call-template>
|
2092
|
-
</xsl:for-each>
|
2093
|
-
|
2094
|
-
<xsl:for-each select="./*[local-name() = 'polygon']">
|
2095
|
-
<xsl:variable name="points">
|
2096
|
-
<xsl:call-template name="split">
|
2097
|
-
<xsl:with-param name="pText" select="@points"/>
|
2098
|
-
</xsl:call-template>
|
2099
|
-
</xsl:variable>
|
2100
|
-
<xsl:variable name="x_coords">
|
2101
|
-
<xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
|
2102
|
-
<xsl:sort select="." data-type="number"/>
|
2103
|
-
<x><xsl:value-of select="."/></x>
|
2104
|
-
</xsl:for-each>
|
2105
|
-
</xsl:variable>
|
2106
|
-
<xsl:variable name="y_coords">
|
2107
|
-
<xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
|
2108
|
-
<xsl:sort select="." data-type="number"/>
|
2109
|
-
<y><xsl:value-of select="."/></y>
|
2110
|
-
</xsl:for-each>
|
2111
|
-
</xsl:variable>
|
2112
|
-
<xsl:variable name="x" select="xalan:nodeset($x_coords)//x[1]"/>
|
2113
|
-
<xsl:variable name="y" select="xalan:nodeset($y_coords)//y[1]"/>
|
2114
|
-
<xsl:variable name="width" select="xalan:nodeset($x_coords)//x[last()] - $x"/>
|
2115
|
-
<xsl:variable name="height" select="xalan:nodeset($y_coords)//y[last()] - $y"/>
|
2116
|
-
<xsl:call-template name="insertSVGMapLink">
|
2117
|
-
<xsl:with-param name="left" select="floor($x * $scale)"/>
|
2118
|
-
<xsl:with-param name="top" select="floor($y * $scale)"/>
|
2119
|
-
<xsl:with-param name="width" select="floor($width * $scale)"/>
|
2120
|
-
<xsl:with-param name="height" select="floor($height * $scale)"/>
|
2121
|
-
<xsl:with-param name="dest" select="$dest"/>
|
2122
|
-
</xsl:call-template>
|
2123
|
-
</xsl:for-each>
|
2124
|
-
|
2125
|
-
<xsl:for-each select="./*[local-name() = 'circle']">
|
2126
|
-
<xsl:call-template name="insertSVGMapLink">
|
2127
|
-
<xsl:with-param name="left" select="floor((@cx - @r) * $scale)"/>
|
2128
|
-
<xsl:with-param name="top" select="floor((@cy - @r) * $scale)"/>
|
2129
|
-
<xsl:with-param name="width" select="floor(@r * 2 * $scale)"/>
|
2130
|
-
<xsl:with-param name="height" select="floor(@r * 2 * $scale)"/>
|
2131
|
-
<xsl:with-param name="dest" select="$dest"/>
|
2132
|
-
</xsl:call-template>
|
2133
|
-
</xsl:for-each>
|
2134
|
-
<xsl:for-each select="./*[local-name() = 'ellipse']">
|
2135
|
-
<xsl:call-template name="insertSVGMapLink">
|
2136
|
-
<xsl:with-param name="left" select="floor((@cx - @rx) * $scale)"/>
|
2137
|
-
<xsl:with-param name="top" select="floor((@cy - @ry) * $scale)"/>
|
2138
|
-
<xsl:with-param name="width" select="floor(@rx * 2 * $scale)"/>
|
2139
|
-
<xsl:with-param name="height" select="floor(@ry * 2 * $scale)"/>
|
2140
|
-
<xsl:with-param name="dest" select="$dest"/>
|
2141
|
-
</xsl:call-template>
|
2142
|
-
</xsl:for-each>
|
2143
|
-
</xsl:template>
|
2144
|
-
|
2145
|
-
<xsl:template name="insertSVGMapLink">
|
2146
|
-
<xsl:param name="left"/>
|
2147
|
-
<xsl:param name="top"/>
|
2148
|
-
<xsl:param name="width"/>
|
2149
|
-
<xsl:param name="height"/>
|
2150
|
-
<xsl:param name="dest"/>
|
2151
|
-
<fo:block-container position="absolute" left="{$left}px" top="{$top}px" width="{$width}px" height="{$height}px">
|
2152
|
-
<fo:block font-size="1pt">
|
2153
|
-
<fo:basic-link internal-destination="{$dest}" fox:alt-text="svg link">
|
2154
|
-
<fo:inline-container inline-progression-dimension="100%">
|
2155
|
-
<fo:block-container height="{$height - 1}px" width="100%">
|
2156
|
-
<!-- DEBUG <xsl:if test="local-name()='polygon'">
|
2157
|
-
<xsl:attribute name="background-color">magenta</xsl:attribute>
|
2158
|
-
</xsl:if> -->
|
2159
|
-
<fo:block> </fo:block></fo:block-container>
|
2160
|
-
</fo:inline-container>
|
2161
|
-
</fo:basic-link>
|
2162
|
-
</fo:block>
|
2163
|
-
</fo:block-container>
|
2164
|
-
</xsl:template>
|
2165
|
-
|
2166
|
-
<!-- =================== -->
|
2167
|
-
<!-- End SVG images processing -->
|
2168
|
-
<!-- =================== -->
|
2169
1911
|
|
2170
1912
|
<!-- For express listings PDF attachments -->
|
2171
1913
|
<xsl:template match="*[local-name() = 'eref'][contains(@bibitemid, '.exp')]" priority="2">
|
@@ -2357,96 +2099,14 @@
|
|
2357
2099
|
<xsl:text>iVBORw0KGgoAAAANSUhEUgAAAFEAAABHCAIAAADwYjznAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAA66SURBVHhezZt5sM/VG8fNVH7JruxkSZKQ3TAYS7aGajKpFBnRxBjjkhrLrRgmYwm59hrGjC0miSmmIgoVZYu00GJtxkyMkV2/1+fzPh7nfr7fe33v/X6/9/d7/3HmOc/nLM/7PM95zjnfS6F//xc4f/786dOnXaXAUdCcjx071rt373vvvbdChQrNmzdfuXKl+1CAKFDOR44cqVWrVqFChf4T4vbbb7/zzjsnT57sPhcUCo7ztWvX2rRpc9tttxUtWvSuEAgwp/z0009dowJBwXGeM2dO4cKFRZWySJEikvF2o0aNrly54tqlHwXE+cyZM9WrV4czJMW5WLFixv+OO+6YPn26a5p+FBDnjIwM/Ak9AHMcm5mZyWY2TeXKlf/66y/XOs0oCM4HDhwoU6aMMSSqs7Kyfv75Z5jjYXmeff7yyy+7DmlGQXB+7LHHcLKFcdu2bXft2vXtt9/Onz9fS8AnVqRkyZLff/+965NOpJ3zh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8SJUrwjA32M9cj/d/zILuFV3MTBKua0qomhOoAvtJgn0yQbBogpcFpQ5jG9BEhUvpVARmO7dq141QOOF++fJk0Vq5cOb5pVf5PoLBMHvDiFtShQwf9EuzOZ3D06NFNmzbpfKI0KPUDyVZK8GUrfZjeBCsFk4MWubYJPnswvSFSFVBu3ryZJ5fj+e+//wVuVmgt0lkFPgAAAABJRU5ErkJggg==</xsl:text>
|
2358
2100
|
</xsl:variable>
|
2359
2101
|
|
2360
|
-
|
2361
|
-
<xsl:
|
2362
|
-
<xsl:
|
2363
|
-
<words>
|
2364
|
-
<word cardinal="1">One-</word>
|
2365
|
-
<word ordinal="1">First </word>
|
2366
|
-
<word cardinal="2">Two-</word>
|
2367
|
-
<word ordinal="2">Second </word>
|
2368
|
-
<word cardinal="3">Three-</word>
|
2369
|
-
<word ordinal="3">Third </word>
|
2370
|
-
<word cardinal="4">Four-</word>
|
2371
|
-
<word ordinal="4">Fourth </word>
|
2372
|
-
<word cardinal="5">Five-</word>
|
2373
|
-
<word ordinal="5">Fifth </word>
|
2374
|
-
<word cardinal="6">Six-</word>
|
2375
|
-
<word ordinal="6">Sixth </word>
|
2376
|
-
<word cardinal="7">Seven-</word>
|
2377
|
-
<word ordinal="7">Seventh </word>
|
2378
|
-
<word cardinal="8">Eight-</word>
|
2379
|
-
<word ordinal="8">Eighth </word>
|
2380
|
-
<word cardinal="9">Nine-</word>
|
2381
|
-
<word ordinal="9">Ninth </word>
|
2382
|
-
<word ordinal="10">Tenth </word>
|
2383
|
-
<word ordinal="11">Eleventh </word>
|
2384
|
-
<word ordinal="12">Twelfth </word>
|
2385
|
-
<word ordinal="13">Thirteenth </word>
|
2386
|
-
<word ordinal="14">Fourteenth </word>
|
2387
|
-
<word ordinal="15">Fifteenth </word>
|
2388
|
-
<word ordinal="16">Sixteenth </word>
|
2389
|
-
<word ordinal="17">Seventeenth </word>
|
2390
|
-
<word ordinal="18">Eighteenth </word>
|
2391
|
-
<word ordinal="19">Nineteenth </word>
|
2392
|
-
<word cardinal="20">Twenty-</word>
|
2393
|
-
<word ordinal="20">Twentieth </word>
|
2394
|
-
<word cardinal="30">Thirty-</word>
|
2395
|
-
<word ordinal="30">Thirtieth </word>
|
2396
|
-
<word cardinal="40">Forty-</word>
|
2397
|
-
<word ordinal="40">Fortieth </word>
|
2398
|
-
<word cardinal="50">Fifty-</word>
|
2399
|
-
<word ordinal="50">Fiftieth </word>
|
2400
|
-
<word cardinal="60">Sixty-</word>
|
2401
|
-
<word ordinal="60">Sixtieth </word>
|
2402
|
-
<word cardinal="70">Seventy-</word>
|
2403
|
-
<word ordinal="70">Seventieth </word>
|
2404
|
-
<word cardinal="80">Eighty-</word>
|
2405
|
-
<word ordinal="80">Eightieth </word>
|
2406
|
-
<word cardinal="90">Ninety-</word>
|
2407
|
-
<word ordinal="90">Ninetieth </word>
|
2408
|
-
<word cardinal="100">Hundred-</word>
|
2409
|
-
<word ordinal="100">Hundredth </word>
|
2410
|
-
</words>
|
2411
|
-
</xsl:variable>
|
2412
|
-
|
2413
|
-
<xsl:variable name="ordinal" select="xalan:nodeset($words)//word[@ordinal = $number]/text()"/>
|
2414
|
-
|
2102
|
+
<xsl:template name="printEdition">
|
2103
|
+
<xsl:variable name="edition" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:edition)"/>
|
2104
|
+
<xsl:text> </xsl:text>
|
2415
2105
|
<xsl:choose>
|
2416
|
-
<xsl:when test="$
|
2417
|
-
<xsl:
|
2418
|
-
|
2419
|
-
|
2420
|
-
<xsl:choose>
|
2421
|
-
<xsl:when test="$number < 100">
|
2422
|
-
<xsl:variable name="decade" select="concat(substring($number,1,1), '0')"/>
|
2423
|
-
<xsl:variable name="digit" select="substring($number,2)"/>
|
2424
|
-
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $decade]/text()"/>
|
2425
|
-
<xsl:value-of select="xalan:nodeset($words)//word[@ordinal = $digit]/text()"/>
|
2426
|
-
</xsl:when>
|
2427
|
-
<xsl:otherwise>
|
2428
|
-
<!-- more 100 -->
|
2429
|
-
<xsl:variable name="hundred" select="substring($number,1,1)"/>
|
2430
|
-
<xsl:variable name="digits" select="number(substring($number,2))"/>
|
2431
|
-
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $hundred]/text()"/>
|
2432
|
-
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = '100']/text()"/>
|
2433
|
-
<xsl:call-template name="number-to-words">
|
2434
|
-
<xsl:with-param name="number" select="$digits"/>
|
2435
|
-
</xsl:call-template>
|
2436
|
-
</xsl:otherwise>
|
2437
|
-
</xsl:choose>
|
2438
|
-
</xsl:otherwise>
|
2439
|
-
</xsl:choose>
|
2440
|
-
</xsl:template>
|
2441
|
-
|
2442
|
-
<xsl:template name="printEdition">
|
2443
|
-
<xsl:variable name="edition" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:edition)"/>
|
2444
|
-
<xsl:text> </xsl:text>
|
2445
|
-
<xsl:choose>
|
2446
|
-
<xsl:when test="number($edition) = $edition">
|
2447
|
-
<xsl:call-template name="number-to-words">
|
2448
|
-
<xsl:with-param name="number" select="$edition"/>
|
2449
|
-
</xsl:call-template>
|
2106
|
+
<xsl:when test="number($edition) = $edition">
|
2107
|
+
<xsl:call-template name="number-to-words">
|
2108
|
+
<xsl:with-param name="number" select="$edition"/>
|
2109
|
+
</xsl:call-template>
|
2450
2110
|
</xsl:when>
|
2451
2111
|
<xsl:when test="$edition != ''">
|
2452
2112
|
<xsl:value-of select="$edition"/>
|
@@ -2712,7 +2372,7 @@
|
|
2712
2372
|
|
2713
2373
|
|
2714
2374
|
|
2715
|
-
|
2375
|
+
|
2716
2376
|
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
2717
2377
|
|
2718
2378
|
|
@@ -2782,6 +2442,7 @@
|
|
2782
2442
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
2783
2443
|
|
2784
2444
|
|
2445
|
+
|
2785
2446
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
2786
2447
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2787
2448
|
|
@@ -2804,6 +2465,8 @@
|
|
2804
2465
|
|
2805
2466
|
|
2806
2467
|
|
2468
|
+
</xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
|
2469
|
+
|
2807
2470
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
2808
2471
|
|
2809
2472
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
@@ -2836,6 +2499,7 @@
|
|
2836
2499
|
|
2837
2500
|
|
2838
2501
|
|
2502
|
+
|
2839
2503
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
2840
2504
|
|
2841
2505
|
|
@@ -2857,6 +2521,7 @@
|
|
2857
2521
|
|
2858
2522
|
|
2859
2523
|
|
2524
|
+
|
2860
2525
|
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
2861
2526
|
|
2862
2527
|
|
@@ -2902,10 +2567,12 @@
|
|
2902
2567
|
|
2903
2568
|
|
2904
2569
|
|
2570
|
+
|
2905
2571
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2906
2572
|
|
2907
2573
|
|
2908
2574
|
|
2575
|
+
|
2909
2576
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2910
2577
|
|
2911
2578
|
|
@@ -2965,6 +2632,7 @@
|
|
2965
2632
|
|
2966
2633
|
|
2967
2634
|
|
2635
|
+
|
2968
2636
|
|
2969
2637
|
|
2970
2638
|
|
@@ -3040,6 +2708,8 @@
|
|
3040
2708
|
<xsl:attribute name="font-family">Cambria Math</xsl:attribute>
|
3041
2709
|
|
3042
2710
|
|
2711
|
+
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
2712
|
+
|
3043
2713
|
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
|
3044
2714
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
3045
2715
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
@@ -3050,14 +2720,15 @@
|
|
3050
2720
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
3051
2721
|
|
3052
2722
|
<!-- Normative references -->
|
3053
|
-
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
2723
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]" mode="contents"/>
|
3054
2724
|
<!-- Terms and definitions -->
|
3055
2725
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
|
3056
2726
|
<!-- Another main sections -->
|
3057
2727
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
|
3058
2728
|
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
3059
2729
|
<!-- Bibliography -->
|
3060
|
-
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
2730
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
2731
|
+
|
3061
2732
|
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
3062
2733
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
3063
2734
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
@@ -3093,11 +2764,11 @@
|
|
3093
2764
|
<xsl:variable name="table">
|
3094
2765
|
|
3095
2766
|
<xsl:variable name="simple-table">
|
3096
|
-
<xsl:call-template name="getSimpleTable"/>
|
2767
|
+
<xsl:call-template name="getSimpleTable"/>
|
3097
2768
|
</xsl:variable>
|
3098
2769
|
|
3099
2770
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
3100
|
-
<fo:block> </fo:block>
|
2771
|
+
<fo:block> </fo:block>
|
3101
2772
|
</xsl:if> -->
|
3102
2773
|
|
3103
2774
|
<!-- $namespace = 'iso' or -->
|
@@ -3215,6 +2886,7 @@
|
|
3215
2886
|
|
3216
2887
|
|
3217
2888
|
|
2889
|
+
|
3218
2890
|
</xsl:variable>
|
3219
2891
|
|
3220
2892
|
|
@@ -3358,6 +3030,9 @@
|
|
3358
3030
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3359
3031
|
|
3360
3032
|
|
3033
|
+
|
3034
|
+
|
3035
|
+
|
3361
3036
|
<xsl:choose>
|
3362
3037
|
<xsl:when test="$continued = 'true'">
|
3363
3038
|
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
@@ -3511,6 +3186,7 @@
|
|
3511
3186
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3512
3187
|
</xsl:call-template>
|
3513
3188
|
|
3189
|
+
|
3514
3190
|
<xsl:apply-templates/>
|
3515
3191
|
</fo:table-header>
|
3516
3192
|
</xsl:template><xsl:template name="table-header-title">
|
@@ -3666,6 +3342,7 @@
|
|
3666
3342
|
<fo:table-row>
|
3667
3343
|
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
3668
3344
|
|
3345
|
+
|
3669
3346
|
<xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
|
3670
3347
|
|
3671
3348
|
|
@@ -3678,6 +3355,10 @@
|
|
3678
3355
|
|
3679
3356
|
|
3680
3357
|
|
3358
|
+
|
3359
|
+
<!-- for BSI (not PAS) display Notes before footnotes -->
|
3360
|
+
|
3361
|
+
|
3681
3362
|
<!-- except gb -->
|
3682
3363
|
|
3683
3364
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
@@ -3703,6 +3384,10 @@
|
|
3703
3384
|
<!-- fn processing -->
|
3704
3385
|
<xsl:call-template name="fn_display"/>
|
3705
3386
|
|
3387
|
+
|
3388
|
+
<!-- for PAS display Notes after footnotes -->
|
3389
|
+
|
3390
|
+
|
3706
3391
|
</fo:table-cell>
|
3707
3392
|
</fo:table-row>
|
3708
3393
|
</fo:table-body>
|
@@ -3769,8 +3454,8 @@
|
|
3769
3454
|
<fo:table-cell>
|
3770
3455
|
|
3771
3456
|
<fo:marker marker-class-name="table_continued">
|
3772
|
-
|
3773
|
-
|
3457
|
+
<xsl:value-of select="$title_continued"/>
|
3458
|
+
</fo:marker>
|
3774
3459
|
<fo:block/>
|
3775
3460
|
</fo:table-cell>
|
3776
3461
|
</fo:table-row>
|
@@ -3811,6 +3496,7 @@
|
|
3811
3496
|
</xsl:if>
|
3812
3497
|
<xsl:if test="$parent-name = 'tfoot'">
|
3813
3498
|
|
3499
|
+
|
3814
3500
|
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
3815
3501
|
<xsl:attribute name="border-left">solid black 1pt</xsl:attribute>
|
3816
3502
|
<xsl:attribute name="border-right">solid black 1pt</xsl:attribute>
|
@@ -3821,6 +3507,10 @@
|
|
3821
3507
|
|
3822
3508
|
|
3823
3509
|
|
3510
|
+
|
3511
|
+
|
3512
|
+
|
3513
|
+
|
3824
3514
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
3825
3515
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
3826
3516
|
</xsl:if> -->
|
@@ -3902,6 +3592,7 @@
|
|
3902
3592
|
|
3903
3593
|
|
3904
3594
|
|
3595
|
+
|
3905
3596
|
<xsl:if test="ancestor::*[local-name() = 'tfoot']">
|
3906
3597
|
<xsl:attribute name="border">solid black 0</xsl:attribute>
|
3907
3598
|
</xsl:if>
|
@@ -3914,6 +3605,9 @@
|
|
3914
3605
|
|
3915
3606
|
|
3916
3607
|
|
3608
|
+
|
3609
|
+
|
3610
|
+
|
3917
3611
|
<xsl:if test=".//*[local-name() = 'table']">
|
3918
3612
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3919
3613
|
</xsl:if>
|
@@ -3938,6 +3632,7 @@
|
|
3938
3632
|
|
3939
3633
|
<fo:block font-size="10pt" margin-bottom="12pt">
|
3940
3634
|
|
3635
|
+
|
3941
3636
|
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
3942
3637
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3943
3638
|
|
@@ -3946,8 +3641,13 @@
|
|
3946
3641
|
|
3947
3642
|
|
3948
3643
|
|
3644
|
+
|
3645
|
+
<!-- Table's note name (NOTE, for example) -->
|
3646
|
+
|
3949
3647
|
<fo:inline padding-right="2mm">
|
3950
3648
|
|
3649
|
+
|
3650
|
+
|
3951
3651
|
|
3952
3652
|
|
3953
3653
|
|
@@ -3955,6 +3655,8 @@
|
|
3955
3655
|
|
3956
3656
|
</fo:inline>
|
3957
3657
|
|
3658
|
+
|
3659
|
+
|
3958
3660
|
<xsl:apply-templates mode="process"/>
|
3959
3661
|
</fo:block>
|
3960
3662
|
|
@@ -3974,6 +3676,8 @@
|
|
3974
3676
|
<xsl:variable name="reference" select="@reference"/>
|
3975
3677
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
3976
3678
|
<fo:block margin-bottom="12pt">
|
3679
|
+
|
3680
|
+
|
3977
3681
|
|
3978
3682
|
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
3979
3683
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -3992,9 +3696,11 @@
|
|
3992
3696
|
|
3993
3697
|
|
3994
3698
|
|
3699
|
+
|
3995
3700
|
<xsl:value-of select="@reference"/>
|
3996
3701
|
|
3997
3702
|
|
3703
|
+
|
3998
3704
|
</fo:inline>
|
3999
3705
|
<fo:inline>
|
4000
3706
|
|
@@ -4130,6 +3836,8 @@
|
|
4130
3836
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
4131
3837
|
<fo:inline font-size="80%" keep-with-previous.within-line="always">
|
4132
3838
|
|
3839
|
+
|
3840
|
+
|
4133
3841
|
<xsl:if test="ancestor::*[local-name()='td']">
|
4134
3842
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
4135
3843
|
<!-- <xsl:attribute name="alignment-baseline">hanging</xsl:attribute> -->
|
@@ -4141,11 +3849,14 @@
|
|
4141
3849
|
|
4142
3850
|
|
4143
3851
|
|
3852
|
+
|
3853
|
+
|
4144
3854
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
4145
3855
|
|
4146
3856
|
|
4147
3857
|
<xsl:value-of select="@reference"/>
|
4148
3858
|
|
3859
|
+
|
4149
3860
|
</fo:basic-link>
|
4150
3861
|
</fo:inline>
|
4151
3862
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -4457,6 +4168,7 @@
|
|
4457
4168
|
|
4458
4169
|
<fo:table-row>
|
4459
4170
|
|
4171
|
+
|
4460
4172
|
<fo:table-cell>
|
4461
4173
|
|
4462
4174
|
<fo:block margin-top="6pt">
|
@@ -4474,6 +4186,7 @@
|
|
4474
4186
|
|
4475
4187
|
|
4476
4188
|
|
4189
|
+
|
4477
4190
|
<xsl:apply-templates/>
|
4478
4191
|
<!-- <xsl:if test="$namespace = 'gb'">
|
4479
4192
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -5028,7 +4741,15 @@
|
|
5028
4741
|
<xsl:copy>
|
5029
4742
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
5030
4743
|
</xsl:copy>
|
5031
|
-
<
|
4744
|
+
<xsl:choose>
|
4745
|
+
<!-- if in msub, then don't add space -->
|
4746
|
+
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
4747
|
+
<!-- if next char in digit, don't add space -->
|
4748
|
+
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
4749
|
+
<xsl:otherwise>
|
4750
|
+
<mathml:mspace width="0.5ex"/>
|
4751
|
+
</xsl:otherwise>
|
4752
|
+
</xsl:choose>
|
5032
4753
|
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
5033
4754
|
<xsl:variable name="target">
|
5034
4755
|
<xsl:choose>
|
@@ -5052,6 +4773,8 @@
|
|
5052
4773
|
</xsl:variable>
|
5053
4774
|
<fo:inline xsl:use-attribute-sets="link-style">
|
5054
4775
|
|
4776
|
+
|
4777
|
+
|
5055
4778
|
<xsl:choose>
|
5056
4779
|
<xsl:when test="$target_text = ''">
|
5057
4780
|
<xsl:apply-templates/>
|
@@ -5160,6 +4883,7 @@
|
|
5160
4883
|
|
5161
4884
|
|
5162
4885
|
|
4886
|
+
|
5163
4887
|
<fo:block-container margin-left="0mm">
|
5164
4888
|
|
5165
4889
|
|
@@ -5203,6 +4927,7 @@
|
|
5203
4927
|
</xsl:choose>
|
5204
4928
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
5205
4929
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
4930
|
+
|
5206
4931
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
5207
4932
|
|
5208
4933
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
@@ -5278,6 +5003,7 @@
|
|
5278
5003
|
</xsl:call-template>
|
5279
5004
|
|
5280
5005
|
<fo:block>
|
5006
|
+
|
5281
5007
|
<xsl:apply-templates/>
|
5282
5008
|
</fo:block>
|
5283
5009
|
<xsl:call-template name="fn_display_figure"/>
|
@@ -5400,6 +5126,234 @@
|
|
5400
5126
|
<xsl:param name="height"/>
|
5401
5127
|
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="0" x2="{$width}" y2="{$height}" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
5402
5128
|
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="{$height}" x2="{$width}" y2="0" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
5129
|
+
</xsl:template><xsl:variable name="figure_name_height">14</xsl:variable><xsl:variable name="width_effective" select="$pageWidth - $marginLeftRight1 - $marginLeftRight2"/><xsl:variable name="height_effective" select="$pageHeight - $marginTop - $marginBottom - $figure_name_height"/><xsl:variable name="image_dpi" select="96"/><xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/><xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/><xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image']) and *[local-name() = 'svg']]/*[local-name() = 'name']/*[local-name() = 'bookmark']" priority="2"/><xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image'])]/*[local-name() = 'svg']" priority="2" name="image_svg">
|
5130
|
+
<xsl:param name="name"/>
|
5131
|
+
|
5132
|
+
<xsl:variable name="svg_content">
|
5133
|
+
<xsl:apply-templates select="." mode="svg_update"/>
|
5134
|
+
</xsl:variable>
|
5135
|
+
|
5136
|
+
<xsl:variable name="alt-text">
|
5137
|
+
<xsl:choose>
|
5138
|
+
<xsl:when test="normalize-space(../*[local-name() = 'name']) != ''">
|
5139
|
+
<xsl:value-of select="../*[local-name() = 'name']"/>
|
5140
|
+
</xsl:when>
|
5141
|
+
<xsl:when test="normalize-space($name) != ''">
|
5142
|
+
<xsl:value-of select="$name"/>
|
5143
|
+
</xsl:when>
|
5144
|
+
<xsl:otherwise>Figure</xsl:otherwise>
|
5145
|
+
</xsl:choose>
|
5146
|
+
</xsl:variable>
|
5147
|
+
|
5148
|
+
<xsl:choose>
|
5149
|
+
<xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
|
5150
|
+
<fo:block>
|
5151
|
+
<xsl:variable name="width" select="@width"/>
|
5152
|
+
<xsl:variable name="height" select="@height"/>
|
5153
|
+
|
5154
|
+
<xsl:variable name="scale_x">
|
5155
|
+
<xsl:choose>
|
5156
|
+
<xsl:when test="$width > $width_effective_px">
|
5157
|
+
<xsl:value-of select="$width_effective_px div $width"/>
|
5158
|
+
</xsl:when>
|
5159
|
+
<xsl:otherwise>1</xsl:otherwise>
|
5160
|
+
</xsl:choose>
|
5161
|
+
</xsl:variable>
|
5162
|
+
|
5163
|
+
<xsl:variable name="scale_y">
|
5164
|
+
<xsl:choose>
|
5165
|
+
<xsl:when test="$height * $scale_x > $height_effective_px">
|
5166
|
+
<xsl:value-of select="$height_effective_px div ($height * $scale_x)"/>
|
5167
|
+
</xsl:when>
|
5168
|
+
<xsl:otherwise>1</xsl:otherwise>
|
5169
|
+
</xsl:choose>
|
5170
|
+
</xsl:variable>
|
5171
|
+
|
5172
|
+
<xsl:variable name="scale">
|
5173
|
+
<xsl:choose>
|
5174
|
+
<xsl:when test="$scale_y != 1">
|
5175
|
+
<xsl:value-of select="$scale_x * $scale_y"/>
|
5176
|
+
</xsl:when>
|
5177
|
+
<xsl:otherwise>
|
5178
|
+
<xsl:value-of select="$scale_x"/>
|
5179
|
+
</xsl:otherwise>
|
5180
|
+
</xsl:choose>
|
5181
|
+
</xsl:variable>
|
5182
|
+
|
5183
|
+
<xsl:variable name="width_scale" select="round($width * $scale)"/>
|
5184
|
+
<xsl:variable name="height_scale" select="round($height * $scale)"/>
|
5185
|
+
|
5186
|
+
<fo:table table-layout="fixed" width="100%">
|
5187
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
5188
|
+
<fo:table-column column-width="{$width_scale}px"/>
|
5189
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
5190
|
+
<fo:table-body>
|
5191
|
+
<fo:table-row>
|
5192
|
+
<fo:table-cell column-number="2">
|
5193
|
+
<fo:block>
|
5194
|
+
<fo:block-container width="{$width_scale}px" height="{$height_scale}px">
|
5195
|
+
<xsl:if test="../*[local-name() = 'name']/*[local-name() = 'bookmark']">
|
5196
|
+
<fo:block line-height="0" font-size="0">
|
5197
|
+
<xsl:for-each select="../*[local-name() = 'name']/*[local-name() = 'bookmark']">
|
5198
|
+
<xsl:call-template name="bookmark"/>
|
5199
|
+
</xsl:for-each>
|
5200
|
+
</fo:block>
|
5201
|
+
</xsl:if>
|
5202
|
+
<fo:block text-depth="0" line-height="0" font-size="0">
|
5203
|
+
|
5204
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
5205
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
5206
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
5207
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5208
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5209
|
+
|
5210
|
+
<xsl:apply-templates select="xalan:nodeset($svg_content)" mode="svg_remove_a"/>
|
5211
|
+
</fo:instream-foreign-object>
|
5212
|
+
</fo:block>
|
5213
|
+
|
5214
|
+
<xsl:apply-templates select=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]" mode="svg_imagemap_links">
|
5215
|
+
<xsl:with-param name="scale" select="$scale"/>
|
5216
|
+
</xsl:apply-templates>
|
5217
|
+
</fo:block-container>
|
5218
|
+
</fo:block>
|
5219
|
+
</fo:table-cell>
|
5220
|
+
</fo:table-row>
|
5221
|
+
</fo:table-body>
|
5222
|
+
</fo:table>
|
5223
|
+
</fo:block>
|
5224
|
+
|
5225
|
+
</xsl:when>
|
5226
|
+
<xsl:otherwise>
|
5227
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
5228
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
5229
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
5230
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
5231
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5232
|
+
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
5233
|
+
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
5234
|
+
<!-- effective height / width = 1.48, 1.4 - with title -->
|
5235
|
+
<xsl:if test="@height > (@width * 1.4)"> <!-- for images with big height -->
|
5236
|
+
<xsl:variable name="width" select="((@width * 1.4) div @height) * 100"/>
|
5237
|
+
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
5238
|
+
</xsl:if>
|
5239
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5240
|
+
<xsl:copy-of select="$svg_content"/>
|
5241
|
+
</fo:instream-foreign-object>
|
5242
|
+
</fo:block>
|
5243
|
+
</xsl:otherwise>
|
5244
|
+
</xsl:choose>
|
5245
|
+
</xsl:template><xsl:template match="@*|node()" mode="svg_update">
|
5246
|
+
<xsl:copy>
|
5247
|
+
<xsl:apply-templates select="@*|node()" mode="svg_update"/>
|
5248
|
+
</xsl:copy>
|
5249
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
5250
|
+
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
5251
|
+
<xsl:value-of select="."/>
|
5252
|
+
</xsl:attribute>
|
5253
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
5254
|
+
<xsl:variable name="svg_content" select="document(@src)"/>
|
5255
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
5256
|
+
<xsl:for-each select="xalan:nodeset($svg_content)/node()">
|
5257
|
+
<xsl:call-template name="image_svg">
|
5258
|
+
<xsl:with-param name="name" select="$name"/>
|
5259
|
+
</xsl:call-template>
|
5260
|
+
</xsl:for-each>
|
5261
|
+
</xsl:template><xsl:template match="@*|node()" mode="svg_remove_a">
|
5262
|
+
<xsl:copy>
|
5263
|
+
<xsl:apply-templates select="@*|node()" mode="svg_remove_a"/>
|
5264
|
+
</xsl:copy>
|
5265
|
+
</xsl:template><xsl:template match="*[local-name() = 'a']" mode="svg_remove_a">
|
5266
|
+
<xsl:apply-templates mode="svg_remove_a"/>
|
5267
|
+
</xsl:template><xsl:template match="*[local-name() = 'a']" mode="svg_imagemap_links">
|
5268
|
+
<xsl:param name="scale"/>
|
5269
|
+
<xsl:variable name="dest">
|
5270
|
+
<xsl:choose>
|
5271
|
+
<xsl:when test="starts-with(@href, '#')">
|
5272
|
+
<xsl:value-of select="substring-after(@href, '#')"/>
|
5273
|
+
</xsl:when>
|
5274
|
+
<xsl:otherwise>
|
5275
|
+
<xsl:value-of select="@href"/>
|
5276
|
+
</xsl:otherwise>
|
5277
|
+
</xsl:choose>
|
5278
|
+
</xsl:variable>
|
5279
|
+
<xsl:for-each select="./*[local-name() = 'rect']">
|
5280
|
+
<xsl:call-template name="insertSVGMapLink">
|
5281
|
+
<xsl:with-param name="left" select="floor(@x * $scale)"/>
|
5282
|
+
<xsl:with-param name="top" select="floor(@y * $scale)"/>
|
5283
|
+
<xsl:with-param name="width" select="floor(@width * $scale)"/>
|
5284
|
+
<xsl:with-param name="height" select="floor(@height * $scale)"/>
|
5285
|
+
<xsl:with-param name="dest" select="$dest"/>
|
5286
|
+
</xsl:call-template>
|
5287
|
+
</xsl:for-each>
|
5288
|
+
|
5289
|
+
<xsl:for-each select="./*[local-name() = 'polygon']">
|
5290
|
+
<xsl:variable name="points">
|
5291
|
+
<xsl:call-template name="split">
|
5292
|
+
<xsl:with-param name="pText" select="@points"/>
|
5293
|
+
</xsl:call-template>
|
5294
|
+
</xsl:variable>
|
5295
|
+
<xsl:variable name="x_coords">
|
5296
|
+
<xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
|
5297
|
+
<xsl:sort select="." data-type="number"/>
|
5298
|
+
<x><xsl:value-of select="."/></x>
|
5299
|
+
</xsl:for-each>
|
5300
|
+
</xsl:variable>
|
5301
|
+
<xsl:variable name="y_coords">
|
5302
|
+
<xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
|
5303
|
+
<xsl:sort select="." data-type="number"/>
|
5304
|
+
<y><xsl:value-of select="."/></y>
|
5305
|
+
</xsl:for-each>
|
5306
|
+
</xsl:variable>
|
5307
|
+
<xsl:variable name="x" select="xalan:nodeset($x_coords)//x[1]"/>
|
5308
|
+
<xsl:variable name="y" select="xalan:nodeset($y_coords)//y[1]"/>
|
5309
|
+
<xsl:variable name="width" select="xalan:nodeset($x_coords)//x[last()] - $x"/>
|
5310
|
+
<xsl:variable name="height" select="xalan:nodeset($y_coords)//y[last()] - $y"/>
|
5311
|
+
<xsl:call-template name="insertSVGMapLink">
|
5312
|
+
<xsl:with-param name="left" select="floor($x * $scale)"/>
|
5313
|
+
<xsl:with-param name="top" select="floor($y * $scale)"/>
|
5314
|
+
<xsl:with-param name="width" select="floor($width * $scale)"/>
|
5315
|
+
<xsl:with-param name="height" select="floor($height * $scale)"/>
|
5316
|
+
<xsl:with-param name="dest" select="$dest"/>
|
5317
|
+
</xsl:call-template>
|
5318
|
+
</xsl:for-each>
|
5319
|
+
|
5320
|
+
<xsl:for-each select="./*[local-name() = 'circle']">
|
5321
|
+
<xsl:call-template name="insertSVGMapLink">
|
5322
|
+
<xsl:with-param name="left" select="floor((@cx - @r) * $scale)"/>
|
5323
|
+
<xsl:with-param name="top" select="floor((@cy - @r) * $scale)"/>
|
5324
|
+
<xsl:with-param name="width" select="floor(@r * 2 * $scale)"/>
|
5325
|
+
<xsl:with-param name="height" select="floor(@r * 2 * $scale)"/>
|
5326
|
+
<xsl:with-param name="dest" select="$dest"/>
|
5327
|
+
</xsl:call-template>
|
5328
|
+
</xsl:for-each>
|
5329
|
+
<xsl:for-each select="./*[local-name() = 'ellipse']">
|
5330
|
+
<xsl:call-template name="insertSVGMapLink">
|
5331
|
+
<xsl:with-param name="left" select="floor((@cx - @rx) * $scale)"/>
|
5332
|
+
<xsl:with-param name="top" select="floor((@cy - @ry) * $scale)"/>
|
5333
|
+
<xsl:with-param name="width" select="floor(@rx * 2 * $scale)"/>
|
5334
|
+
<xsl:with-param name="height" select="floor(@ry * 2 * $scale)"/>
|
5335
|
+
<xsl:with-param name="dest" select="$dest"/>
|
5336
|
+
</xsl:call-template>
|
5337
|
+
</xsl:for-each>
|
5338
|
+
</xsl:template><xsl:template name="insertSVGMapLink">
|
5339
|
+
<xsl:param name="left"/>
|
5340
|
+
<xsl:param name="top"/>
|
5341
|
+
<xsl:param name="width"/>
|
5342
|
+
<xsl:param name="height"/>
|
5343
|
+
<xsl:param name="dest"/>
|
5344
|
+
<fo:block-container position="absolute" left="{$left}px" top="{$top}px" width="{$width}px" height="{$height}px">
|
5345
|
+
<fo:block font-size="1pt">
|
5346
|
+
<fo:basic-link internal-destination="{$dest}" fox:alt-text="svg link">
|
5347
|
+
<fo:inline-container inline-progression-dimension="100%">
|
5348
|
+
<fo:block-container height="{$height - 1}px" width="100%">
|
5349
|
+
<!-- DEBUG <xsl:if test="local-name()='polygon'">
|
5350
|
+
<xsl:attribute name="background-color">magenta</xsl:attribute>
|
5351
|
+
</xsl:if> -->
|
5352
|
+
<fo:block> </fo:block></fo:block-container>
|
5353
|
+
</fo:inline-container>
|
5354
|
+
</fo:basic-link>
|
5355
|
+
</fo:block>
|
5356
|
+
</fo:block-container>
|
5403
5357
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
5404
5358
|
<xsl:apply-templates mode="contents"/>
|
5405
5359
|
<xsl:text> </xsl:text>
|
@@ -5428,28 +5382,39 @@
|
|
5428
5382
|
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
5429
5383
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
5430
5384
|
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
5385
|
+
<xsl:if test="@bundle = 'true'">
|
5386
|
+
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
5387
|
+
</xsl:if>
|
5431
5388
|
<fo:bookmark-title>
|
5432
|
-
<xsl:variable name="bookmark-title_">
|
5433
|
-
<xsl:call-template name="getLangVersion">
|
5434
|
-
<xsl:with-param name="lang" select="@lang"/>
|
5435
|
-
<xsl:with-param name="doctype" select="@doctype"/>
|
5436
|
-
<xsl:with-param name="title" select="@title-part"/>
|
5437
|
-
</xsl:call-template>
|
5438
|
-
</xsl:variable>
|
5439
5389
|
<xsl:choose>
|
5440
|
-
<xsl:when test="normalize-space(
|
5441
|
-
<xsl:
|
5442
|
-
|
5443
|
-
|
5390
|
+
<xsl:when test="not(normalize-space(@bundle) = 'true')"> <!-- 'bundle' means several different documents (not language versions) in one xml -->
|
5391
|
+
<xsl:variable name="bookmark-title_">
|
5392
|
+
<xsl:call-template name="getLangVersion">
|
5393
|
+
<xsl:with-param name="lang" select="@lang"/>
|
5394
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
5395
|
+
<xsl:with-param name="title" select="@title-part"/>
|
5396
|
+
</xsl:call-template>
|
5397
|
+
</xsl:variable>
|
5444
5398
|
<xsl:choose>
|
5445
|
-
<xsl:when test="
|
5446
|
-
|
5447
|
-
|
5448
|
-
<xsl:otherwise
|
5399
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
5400
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
5401
|
+
</xsl:when>
|
5402
|
+
<xsl:otherwise>
|
5403
|
+
<xsl:choose>
|
5404
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
5405
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
5406
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
5407
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
5408
|
+
</xsl:choose>
|
5409
|
+
</xsl:otherwise>
|
5449
5410
|
</xsl:choose>
|
5411
|
+
</xsl:when>
|
5412
|
+
<xsl:otherwise>
|
5413
|
+
<xsl:value-of select="@title-part"/>
|
5450
5414
|
</xsl:otherwise>
|
5451
5415
|
</xsl:choose>
|
5452
5416
|
</fo:bookmark-title>
|
5417
|
+
|
5453
5418
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
5454
5419
|
|
5455
5420
|
<xsl:call-template name="insertFigureBookmarks">
|
@@ -5548,20 +5513,28 @@
|
|
5548
5513
|
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
5549
5514
|
</xsl:choose>
|
5550
5515
|
</xsl:template><xsl:template match="item" mode="bookmark">
|
5551
|
-
<
|
5552
|
-
|
5553
|
-
|
5554
|
-
|
5555
|
-
<xsl:
|
5556
|
-
|
5557
|
-
|
5558
|
-
|
5559
|
-
|
5560
|
-
|
5516
|
+
<xsl:choose>
|
5517
|
+
<xsl:when test="@id != ''">
|
5518
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
5519
|
+
<fo:bookmark-title>
|
5520
|
+
<xsl:if test="@section != ''">
|
5521
|
+
<xsl:value-of select="@section"/>
|
5522
|
+
<xsl:text> </xsl:text>
|
5523
|
+
</xsl:if>
|
5524
|
+
<xsl:value-of select="normalize-space(title)"/>
|
5525
|
+
</fo:bookmark-title>
|
5526
|
+
<xsl:apply-templates mode="bookmark"/>
|
5527
|
+
</fo:bookmark>
|
5528
|
+
</xsl:when>
|
5529
|
+
<xsl:otherwise>
|
5530
|
+
<xsl:apply-templates mode="bookmark"/>
|
5531
|
+
</xsl:otherwise>
|
5532
|
+
</xsl:choose>
|
5561
5533
|
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
5562
5534
|
<xsl:if test="normalize-space() != ''">
|
5563
5535
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
5564
5536
|
|
5537
|
+
|
5565
5538
|
<xsl:apply-templates/>
|
5566
5539
|
</fo:block>
|
5567
5540
|
</xsl:if>
|
@@ -5642,6 +5615,7 @@
|
|
5642
5615
|
|
5643
5616
|
<fo:block-container margin-left="0mm">
|
5644
5617
|
<xsl:copy-of select="@id"/>
|
5618
|
+
|
5645
5619
|
<xsl:if test="parent::*[local-name() = 'note']">
|
5646
5620
|
<xsl:attribute name="margin-left">
|
5647
5621
|
<xsl:choose>
|
@@ -5652,7 +5626,9 @@
|
|
5652
5626
|
|
5653
5627
|
</xsl:if>
|
5654
5628
|
<fo:block-container margin-left="0mm">
|
5655
|
-
|
5629
|
+
|
5630
|
+
|
5631
|
+
|
5656
5632
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
5657
5633
|
<xsl:variable name="_font-size">
|
5658
5634
|
|
@@ -5681,10 +5657,14 @@
|
|
5681
5657
|
</xsl:choose>
|
5682
5658
|
</xsl:attribute>
|
5683
5659
|
</xsl:if>
|
5684
|
-
|
5685
|
-
|
5660
|
+
|
5661
|
+
<xsl:apply-templates/>
|
5662
|
+
</fo:block>
|
5663
|
+
|
5664
|
+
|
5686
5665
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
5687
5666
|
|
5667
|
+
|
5688
5668
|
</fo:block-container>
|
5689
5669
|
</fo:block-container>
|
5690
5670
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -6033,6 +6013,8 @@
|
|
6033
6013
|
<fo:inline>
|
6034
6014
|
|
6035
6015
|
|
6016
|
+
|
6017
|
+
|
6036
6018
|
<xsl:value-of select="$localized.source"/>
|
6037
6019
|
<xsl:text>: </xsl:text>
|
6038
6020
|
|
@@ -6109,7 +6091,9 @@
|
|
6109
6091
|
|
6110
6092
|
|
6111
6093
|
</xsl:if>
|
6112
|
-
|
6094
|
+
|
6095
|
+
|
6096
|
+
|
6113
6097
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
6114
6098
|
<xsl:if test="normalize-space(@citeas) = ''">
|
6115
6099
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
@@ -6118,6 +6102,7 @@
|
|
6118
6102
|
|
6119
6103
|
|
6120
6104
|
|
6105
|
+
|
6121
6106
|
</xsl:if>
|
6122
6107
|
|
6123
6108
|
<xsl:apply-templates/>
|
@@ -6263,6 +6248,7 @@
|
|
6263
6248
|
<xsl:call-template name="setId"/>
|
6264
6249
|
|
6265
6250
|
|
6251
|
+
|
6266
6252
|
<xsl:apply-templates/>
|
6267
6253
|
</fo:block>
|
6268
6254
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -6535,17 +6521,17 @@
|
|
6535
6521
|
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
6536
6522
|
<xsl:choose>
|
6537
6523
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
6538
|
-
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
6524
|
+
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
6539
6525
|
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
6540
6526
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
6541
|
-
</xsl:if>
|
6527
|
+
</xsl:if> -->
|
6542
6528
|
<xsl:value-of select="$_doc_ident"/>
|
6543
6529
|
</xsl:when>
|
6544
6530
|
<xsl:otherwise>
|
6545
|
-
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
6531
|
+
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
6546
6532
|
<xsl:if test="$type != ''">
|
6547
6533
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
6548
|
-
</xsl:if>
|
6534
|
+
</xsl:if> -->
|
6549
6535
|
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
6550
6536
|
</xsl:otherwise>
|
6551
6537
|
</xsl:choose>
|
@@ -7051,4 +7037,110 @@
|
|
7051
7037
|
<xsl:value-of select="$align"/>
|
7052
7038
|
</xsl:when>
|
7053
7039
|
</xsl:choose>
|
7040
|
+
</xsl:template><xsl:template name="setTextAlignment">
|
7041
|
+
<xsl:param name="default">left</xsl:param>
|
7042
|
+
<xsl:attribute name="text-align">
|
7043
|
+
<xsl:choose>
|
7044
|
+
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
7045
|
+
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
7046
|
+
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
7047
|
+
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
7048
|
+
</xsl:choose>
|
7049
|
+
</xsl:attribute>
|
7050
|
+
</xsl:template><xsl:template name="number-to-words">
|
7051
|
+
<xsl:param name="number"/>
|
7052
|
+
<xsl:param name="first"/>
|
7053
|
+
<xsl:if test="$number != ''">
|
7054
|
+
<xsl:variable name="words">
|
7055
|
+
<words>
|
7056
|
+
<word cardinal="1">One-</word>
|
7057
|
+
<word ordinal="1">First </word>
|
7058
|
+
<word cardinal="2">Two-</word>
|
7059
|
+
<word ordinal="2">Second </word>
|
7060
|
+
<word cardinal="3">Three-</word>
|
7061
|
+
<word ordinal="3">Third </word>
|
7062
|
+
<word cardinal="4">Four-</word>
|
7063
|
+
<word ordinal="4">Fourth </word>
|
7064
|
+
<word cardinal="5">Five-</word>
|
7065
|
+
<word ordinal="5">Fifth </word>
|
7066
|
+
<word cardinal="6">Six-</word>
|
7067
|
+
<word ordinal="6">Sixth </word>
|
7068
|
+
<word cardinal="7">Seven-</word>
|
7069
|
+
<word ordinal="7">Seventh </word>
|
7070
|
+
<word cardinal="8">Eight-</word>
|
7071
|
+
<word ordinal="8">Eighth </word>
|
7072
|
+
<word cardinal="9">Nine-</word>
|
7073
|
+
<word ordinal="9">Ninth </word>
|
7074
|
+
<word ordinal="10">Tenth </word>
|
7075
|
+
<word ordinal="11">Eleventh </word>
|
7076
|
+
<word ordinal="12">Twelfth </word>
|
7077
|
+
<word ordinal="13">Thirteenth </word>
|
7078
|
+
<word ordinal="14">Fourteenth </word>
|
7079
|
+
<word ordinal="15">Fifteenth </word>
|
7080
|
+
<word ordinal="16">Sixteenth </word>
|
7081
|
+
<word ordinal="17">Seventeenth </word>
|
7082
|
+
<word ordinal="18">Eighteenth </word>
|
7083
|
+
<word ordinal="19">Nineteenth </word>
|
7084
|
+
<word cardinal="20">Twenty-</word>
|
7085
|
+
<word ordinal="20">Twentieth </word>
|
7086
|
+
<word cardinal="30">Thirty-</word>
|
7087
|
+
<word ordinal="30">Thirtieth </word>
|
7088
|
+
<word cardinal="40">Forty-</word>
|
7089
|
+
<word ordinal="40">Fortieth </word>
|
7090
|
+
<word cardinal="50">Fifty-</word>
|
7091
|
+
<word ordinal="50">Fiftieth </word>
|
7092
|
+
<word cardinal="60">Sixty-</word>
|
7093
|
+
<word ordinal="60">Sixtieth </word>
|
7094
|
+
<word cardinal="70">Seventy-</word>
|
7095
|
+
<word ordinal="70">Seventieth </word>
|
7096
|
+
<word cardinal="80">Eighty-</word>
|
7097
|
+
<word ordinal="80">Eightieth </word>
|
7098
|
+
<word cardinal="90">Ninety-</word>
|
7099
|
+
<word ordinal="90">Ninetieth </word>
|
7100
|
+
<word cardinal="100">Hundred-</word>
|
7101
|
+
<word ordinal="100">Hundredth </word>
|
7102
|
+
</words>
|
7103
|
+
</xsl:variable>
|
7104
|
+
|
7105
|
+
<xsl:variable name="ordinal" select="xalan:nodeset($words)//word[@ordinal = $number]/text()"/>
|
7106
|
+
|
7107
|
+
<xsl:variable name="value">
|
7108
|
+
<xsl:choose>
|
7109
|
+
<xsl:when test="$ordinal != ''">
|
7110
|
+
<xsl:value-of select="$ordinal"/>
|
7111
|
+
</xsl:when>
|
7112
|
+
<xsl:otherwise>
|
7113
|
+
<xsl:choose>
|
7114
|
+
<xsl:when test="$number < 100">
|
7115
|
+
<xsl:variable name="decade" select="concat(substring($number,1,1), '0')"/>
|
7116
|
+
<xsl:variable name="digit" select="substring($number,2)"/>
|
7117
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $decade]/text()"/>
|
7118
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@ordinal = $digit]/text()"/>
|
7119
|
+
</xsl:when>
|
7120
|
+
<xsl:otherwise>
|
7121
|
+
<!-- more 100 -->
|
7122
|
+
<xsl:variable name="hundred" select="substring($number,1,1)"/>
|
7123
|
+
<xsl:variable name="digits" select="number(substring($number,2))"/>
|
7124
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $hundred]/text()"/>
|
7125
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = '100']/text()"/>
|
7126
|
+
<xsl:call-template name="number-to-words">
|
7127
|
+
<xsl:with-param name="number" select="$digits"/>
|
7128
|
+
</xsl:call-template>
|
7129
|
+
</xsl:otherwise>
|
7130
|
+
</xsl:choose>
|
7131
|
+
</xsl:otherwise>
|
7132
|
+
</xsl:choose>
|
7133
|
+
</xsl:variable>
|
7134
|
+
<xsl:choose>
|
7135
|
+
<xsl:when test="$first = 'true'">
|
7136
|
+
<xsl:variable name="value_lc" select="java:toLowerCase(java:java.lang.String.new($value))"/>
|
7137
|
+
<xsl:call-template name="capitalize">
|
7138
|
+
<xsl:with-param name="str" select="$value_lc"/>
|
7139
|
+
</xsl:call-template>
|
7140
|
+
</xsl:when>
|
7141
|
+
<xsl:otherwise>
|
7142
|
+
<xsl:value-of select="$value"/>
|
7143
|
+
</xsl:otherwise>
|
7144
|
+
</xsl:choose>
|
7145
|
+
</xsl:if>
|
7054
7146
|
</xsl:template></xsl:stylesheet>
|