lib/isodoc/itu/itu.recommendation-supplement.xsl in metanorma-itu-1.3.6 vs lib/isodoc/itu/itu.recommendation-supplement.xsl in metanorma-itu-1.3.7

- old
+ new

@@ -3082,10 +3082,11 @@ <fo:table-row> <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}"> + <xsl:if test="ancestor::*[local-name()='preface']"> <xsl:attribute name="border">solid black 0pt</xsl:attribute> </xsl:if> <!-- fn will be processed inside 'note' processing --> @@ -3094,10 +3095,14 @@ + + <!-- for BSI (not PAS) display Notes before footnotes --> + + <!-- except gb --> <xsl:apply-templates select="../*[local-name()='note']" mode="process"/> @@ -3119,10 +3124,14 @@ <!-- fn processing --> <xsl:call-template name="fn_display"/> + + <!-- for PAS display Notes after footnotes --> + + </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> @@ -3176,10 +3185,11 @@ </xsl:if> <xsl:if test="$parent-name = 'tfoot'"> + </xsl:if> @@ -3313,19 +3323,26 @@ + + <!-- Table's note name (NOTE, for example) --> + <fo:inline padding-right="2mm"> + + <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/> </fo:inline> + + <xsl:apply-templates mode="process"/> </fo:block> </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process"> <xsl:apply-templates/> @@ -3345,14 +3362,16 @@ </xsl:variable> <xsl:for-each select="xalan:nodeset($references)//fn"> <xsl:variable name="reference" select="@reference"/> <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note--> <fo:block margin-bottom="12pt"> + + <xsl:attribute name="margin-bottom">2pt</xsl:attribute> <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute> <xsl:attribute name="text-indent">-5mm</xsl:attribute> <xsl:attribute name="start-indent">5mm</xsl:attribute> @@ -3376,10 +3395,11 @@ <!-- <xsl:if test="@preface = 'true'"> --> <xsl:text>)</xsl:text> <!-- </xsl:if> --> + </fo:inline> <fo:inline> <!-- <xsl:apply-templates /> --> <xsl:copy-of select="./node()"/> @@ -3528,10 +3548,11 @@ <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id--> <xsl:value-of select="@reference"/> + </fo:basic-link> </fo:inline> </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']"> <fo:inline> <xsl:apply-templates/> @@ -4550,10 +4571,11 @@ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style"> + <fo:block-container margin-left="0mm"> @@ -5745,20 +5767,22 @@ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute> <xsl:attribute name="vertical-align">super</xsl:attribute> </xsl:if> - + + + <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}"> - <xsl:if test="normalize-space(@citeas) = ''"> <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute> </xsl:if> <xsl:if test="@type = 'inline'"> + </xsl:if> <xsl:apply-templates/> </fo:basic-link> @@ -6682,6 +6706,102 @@ <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when> <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when> <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise> </xsl:choose> </xsl:attribute> + </xsl:template><xsl:template name="number-to-words"> + <xsl:param name="number"/> + <xsl:param name="first"/> + <xsl:if test="$number != ''"> + <xsl:variable name="words"> + <words> + <word cardinal="1">One-</word> + <word ordinal="1">First </word> + <word cardinal="2">Two-</word> + <word ordinal="2">Second </word> + <word cardinal="3">Three-</word> + <word ordinal="3">Third </word> + <word cardinal="4">Four-</word> + <word ordinal="4">Fourth </word> + <word cardinal="5">Five-</word> + <word ordinal="5">Fifth </word> + <word cardinal="6">Six-</word> + <word ordinal="6">Sixth </word> + <word cardinal="7">Seven-</word> + <word ordinal="7">Seventh </word> + <word cardinal="8">Eight-</word> + <word ordinal="8">Eighth </word> + <word cardinal="9">Nine-</word> + <word ordinal="9">Ninth </word> + <word ordinal="10">Tenth </word> + <word ordinal="11">Eleventh </word> + <word ordinal="12">Twelfth </word> + <word ordinal="13">Thirteenth </word> + <word ordinal="14">Fourteenth </word> + <word ordinal="15">Fifteenth </word> + <word ordinal="16">Sixteenth </word> + <word ordinal="17">Seventeenth </word> + <word ordinal="18">Eighteenth </word> + <word ordinal="19">Nineteenth </word> + <word cardinal="20">Twenty-</word> + <word ordinal="20">Twentieth </word> + <word cardinal="30">Thirty-</word> + <word ordinal="30">Thirtieth </word> + <word cardinal="40">Forty-</word> + <word ordinal="40">Fortieth </word> + <word cardinal="50">Fifty-</word> + <word ordinal="50">Fiftieth </word> + <word cardinal="60">Sixty-</word> + <word ordinal="60">Sixtieth </word> + <word cardinal="70">Seventy-</word> + <word ordinal="70">Seventieth </word> + <word cardinal="80">Eighty-</word> + <word ordinal="80">Eightieth </word> + <word cardinal="90">Ninety-</word> + <word ordinal="90">Ninetieth </word> + <word cardinal="100">Hundred-</word> + <word ordinal="100">Hundredth </word> + </words> + </xsl:variable> + + <xsl:variable name="ordinal" select="xalan:nodeset($words)//word[@ordinal = $number]/text()"/> + + <xsl:variable name="value"> + <xsl:choose> + <xsl:when test="$ordinal != ''"> + <xsl:value-of select="$ordinal"/> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$number &lt; 100"> + <xsl:variable name="decade" select="concat(substring($number,1,1), '0')"/> + <xsl:variable name="digit" select="substring($number,2)"/> + <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $decade]/text()"/> + <xsl:value-of select="xalan:nodeset($words)//word[@ordinal = $digit]/text()"/> + </xsl:when> + <xsl:otherwise> + <!-- more 100 --> + <xsl:variable name="hundred" select="substring($number,1,1)"/> + <xsl:variable name="digits" select="number(substring($number,2))"/> + <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $hundred]/text()"/> + <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = '100']/text()"/> + <xsl:call-template name="number-to-words"> + <xsl:with-param name="number" select="$digits"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:choose> + <xsl:when test="$first = 'true'"> + <xsl:variable name="value_lc" select="java:toLowerCase(java:java.lang.String.new($value))"/> + <xsl:call-template name="capitalize"> + <xsl:with-param name="str" select="$value_lc"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$value"/> + </xsl:otherwise> + </xsl:choose> + </xsl:if> </xsl:template></xsl:stylesheet> \ No newline at end of file