lib/isodoc/ogc/ogc.best-practice.xsl in metanorma-ogc-1.3.6 vs lib/isodoc/ogc/ogc.best-practice.xsl in metanorma-ogc-1.3.7

- old
+ new

@@ -2675,20 +2675,25 @@ <fo:table-row> <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}"> + <!-- fn will be processed inside 'note' processing --> <xsl:attribute name="border">solid black 0pt</xsl:attribute> + + <!-- for BSI (not PAS) display Notes before footnotes --> + + <!-- except gb --> <xsl:apply-templates select="../*[local-name()='note']" mode="process"/> @@ -2710,10 +2715,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> @@ -2767,10 +2776,11 @@ </xsl:if> <xsl:if test="$parent-name = 'tfoot'"> + </xsl:if> <xsl:attribute name="min-height">8.5mm</xsl:attribute> @@ -2911,19 +2921,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/> @@ -2945,15 +2962,17 @@ </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"> + + <fo:inline font-size="80%" padding-right="5mm" id="{@id}"> <xsl:attribute name="vertical-align">super</xsl:attribute> @@ -2964,10 +2983,11 @@ <xsl:value-of select="@reference"/> + </fo:inline> <fo:inline> <!-- <xsl:apply-templates /> --> <xsl:copy-of select="./node()"/> @@ -3120,10 +3140,11 @@ </xsl:attribute> <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/> @@ -4132,10 +4153,11 @@ <xsl:attribute name="margin-bottom">0pt</xsl:attribute> </xsl:if> + <fo:block-container margin-left="0mm"> @@ -5388,21 +5410,23 @@ <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> @@ -6459,6 +6483,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