lib/isodoc/iho/iho.specification.xsl in metanorma-iho-0.3.3 vs lib/isodoc/iho/iho.specification.xsl in metanorma-iho-0.3.4

- old
+ new

@@ -1120,10 +1120,11 @@ <xsl:attribute name="color">blue</xsl:attribute> <xsl:attribute name="text-decoration">underline</xsl:attribute> + </xsl:attribute-set><xsl:attribute-set name="sourcecode-style"> <xsl:attribute name="white-space">pre</xsl:attribute> <xsl:attribute name="wrap-option">wrap</xsl:attribute> @@ -1188,10 +1189,11 @@ + </xsl:attribute-set><xsl:attribute-set name="example-body-style"> </xsl:attribute-set><xsl:attribute-set name="example-name-style"> @@ -1207,14 +1209,12 @@ - - - + </xsl:attribute-set><xsl:attribute-set name="example-p-style"> @@ -1259,10 +1259,11 @@ + </xsl:attribute-set><xsl:attribute-set name="appendix-style"> </xsl:attribute-set><xsl:attribute-set name="appendix-example-style"> @@ -1275,15 +1276,17 @@ <xsl:attribute name="color">blue</xsl:attribute> <xsl:attribute name="text-decoration">underline</xsl:attribute> + </xsl:attribute-set><xsl:attribute-set name="eref-style"> + </xsl:attribute-set><xsl:attribute-set name="note-style"> @@ -1377,17 +1380,19 @@ <xsl:attribute name="margin-bottom">12pt</xsl:attribute> + </xsl:attribute-set><xsl:attribute-set name="origin-style"> <xsl:attribute name="color">blue</xsl:attribute> <xsl:attribute name="text-decoration">underline</xsl:attribute> + </xsl:attribute-set><xsl:attribute-set name="term-style"> <xsl:attribute name="margin-bottom">10pt</xsl:attribute> </xsl:attribute-set><xsl:attribute-set name="figure-name-style"> @@ -1456,12 +1461,14 @@ </xsl:attribute-set><xsl:attribute-set name="domain-style"> </xsl:attribute-set><xsl:attribute-set name="admitted-style"> + </xsl:attribute-set><xsl:attribute-set name="deprecates-style"> + </xsl:attribute-set><xsl:attribute-set name="definition-style"> <xsl:attribute name="margin-bottom">6pt</xsl:attribute> @@ -2210,10 +2217,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"> @@ -2578,10 +2586,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'"/> @@ -2866,10 +2875,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']"> @@ -3359,10 +3370,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)"/> @@ -3370,23 +3391,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> @@ -3960,10 +3981,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> @@ -4237,10 +4259,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"> block @@ -4346,16 +4369,17 @@ <fo:inline> + <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> @@ -4478,10 +4502,11 @@ + </xsl:variable> <xsl:variable name="padding-right"> <xsl:choose> <xsl:when test="normalize-space($padding) = ''">0</xsl:when> @@ -5242,10 +5267,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"/> @@ -5382,10 +5410,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