lib/isodoc/ogc/ogc.best-practice.xsl in metanorma-ogc-1.3.3 vs lib/isodoc/ogc/ogc.best-practice.xsl in metanorma-ogc-1.3.4

- old
+ new

@@ -1626,10 +1626,11 @@ </xsl:attribute-set><xsl:attribute-set name="link-style"> + <!-- <xsl:attribute name="color">rgb(33, 55, 92)</xsl:attribute> --> <xsl:attribute name="text-decoration">underline</xsl:attribute> </xsl:attribute-set><xsl:attribute-set name="sourcecode-style"> @@ -1733,10 +1734,11 @@ + </xsl:attribute-set><xsl:attribute-set name="example-body-style"> </xsl:attribute-set><xsl:attribute-set name="example-name-style"> @@ -1752,14 +1754,12 @@ <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="keep-with-next">always</xsl:attribute> - - - + </xsl:attribute-set><xsl:attribute-set name="example-p-style"> @@ -1803,10 +1803,11 @@ + </xsl:attribute-set><xsl:attribute-set name="appendix-style"> <xsl:attribute name="font-size">12pt</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="margin-top">12pt</xsl:attribute> @@ -1826,16 +1827,18 @@ + </xsl:attribute-set><xsl:attribute-set name="eref-style"> + </xsl:attribute-set><xsl:attribute-set name="note-style"> @@ -1931,15 +1934,17 @@ + </xsl:attribute-set><xsl:attribute-set name="origin-style"> + </xsl:attribute-set><xsl:attribute-set name="term-style"> </xsl:attribute-set><xsl:attribute-set name="figure-name-style"> @@ -2008,12 +2013,14 @@ </xsl:attribute-set><xsl:attribute-set name="admitted-style"> <xsl:attribute name="font-size">11pt</xsl:attribute> + </xsl:attribute-set><xsl:attribute-set name="deprecates-style"> + </xsl:attribute-set><xsl:attribute-set name="definition-style"> <xsl:attribute name="space-after">6pt</xsl:attribute> @@ -2788,10 +2795,11 @@ + <xsl:if test="$lang = 'ar'"> <xsl:attribute name="padding-right">1mm</xsl:attribute> </xsl:if> <xsl:if test="@colspan"> <xsl:attribute name="number-columns-spanned"> @@ -3164,10 +3172,11 @@ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always"> + <xsl:variable name="title-key"> <xsl:call-template name="getTitle"> <xsl:with-param name="name" select="'title-key'"/> @@ -3450,10 +3459,12 @@ </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']"> <fo:inline font-weight="bold"> <xsl:apply-templates/> </fo:inline> + </xsl:template><xsl:template match="*[local-name()='padding']"> + <fo:inline padding-right="{@value}"> </fo:inline> </xsl:template><xsl:template match="*[local-name()='sup']"> <fo:inline font-size="80%" vertical-align="super"> <xsl:apply-templates/> </fo:inline> </xsl:template><xsl:template match="*[local-name()='sub']"> @@ -3943,10 +3954,20 @@ </xsl:copy> <mathml:mspace width="0.5ex"/> </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"> <xsl:variable name="target"> <xsl:choose> + <xsl:when test="@updatetype = 'true'"> + <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="normalize-space(@target)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="target_text"> + <xsl:choose> <xsl:when test="starts-with(normalize-space(@target), 'mailto:')"> <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="normalize-space(@target)"/> @@ -3954,23 +3975,23 @@ </xsl:choose> </xsl:variable> <fo:inline xsl:use-attribute-sets="link-style"> <xsl:choose> - <xsl:when test="$target = ''"> + <xsl:when test="$target_text = ''"> <xsl:apply-templates/> </xsl:when> <xsl:otherwise> - <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}"> + <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}"> <xsl:choose> <xsl:when test="normalize-space(.) = ''"> - <!-- <xsl:value-of select="$target"/> --> <xsl:call-template name="add-zero-spaces-link-java"> - <xsl:with-param name="text" select="$target"/> + <xsl:with-param name="text" select="$target_text"/> </xsl:call-template> </xsl:when> <xsl:otherwise> + <!-- output text from <link>text</link> --> <xsl:apply-templates/> </xsl:otherwise> </xsl:choose> </fo:basic-link> </xsl:otherwise> @@ -4591,10 +4612,11 @@ </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item"> <xsl:text> </xsl:text> </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode"> <fo:block-container margin-left="0mm"> + <xsl:copy-of select="@id"/> <xsl:if test="parent::*[local-name() = 'note']"> <xsl:attribute name="margin-left"> <xsl:choose> <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when> <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise> @@ -4876,10 +4898,11 @@ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']"> <fo:inline><xsl:apply-templates/></fo:inline> </xsl:template><xsl:template match="*[local-name() = 'example']"> <fo:block id="{@id}" xsl:use-attribute-sets="example-style"> + <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/> <xsl:variable name="element"> inline @@ -4984,16 +5007,17 @@ <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="padding-right">1mm</xsl:attribute> + <xsl:call-template name="getTitle"> <xsl:with-param name="name" select="'title-source'"/> </xsl:call-template> + <xsl:text>: </xsl:text> - <xsl:text>: </xsl:text> </fo:inline> <fo:inline xsl:use-attribute-sets="origin-style"> <xsl:apply-templates/> </fo:inline> @@ -5102,10 +5126,11 @@ + <xsl:choose> <xsl:when test="$depth = 2">2</xsl:when> <xsl:otherwise>1</xsl:otherwise> </xsl:choose> @@ -5925,10 +5950,13 @@ <xsl:variable name="level"> <xsl:choose> <xsl:when test="parent::*[local-name() = 'preface']"> <xsl:value-of select="$level_total - 1"/> </xsl:when> + <xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause --> + <xsl:value-of select="$level_total - 1"/> + </xsl:when> <xsl:when test="ancestor::*[local-name() = 'preface']"> <xsl:value-of select="$level_total - 2"/> </xsl:when> <!-- <xsl:when test="parent::*[local-name() = 'sections']"> <xsl:value-of select="$level_total - 1"/> @@ -6065,10 +6093,17 @@ <xsl:value-of select="$data_value"/> </xsl:when> <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"> <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/> </xsl:when> - <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise> + <xsl:otherwise> + <xsl:variable name="key_"> + <xsl:call-template name="capitalize"> + <xsl:with-param name="str" select="translate($key, '_', ' ')"/> + </xsl:call-template> + </xsl:variable> + <xsl:value-of select="$key_"/> + </xsl:otherwise> </xsl:choose> </xsl:template><xsl:template name="setTrackChangesStyles"> <xsl:param name="isAdded"/> <xsl:param name="isDeleted"/> \ No newline at end of file