lib/isodoc/ogc/ogc.white-paper.xsl in metanorma-ogc-1.3.3 vs lib/isodoc/ogc/ogc.white-paper.xsl in metanorma-ogc-1.3.4

- old
+ new

@@ -1062,10 +1062,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> @@ -1167,10 +1168,11 @@ <xsl:attribute name="margin-right">12.5mm</xsl:attribute> + </xsl:attribute-set><xsl:attribute-set name="example-body-style"> </xsl:attribute-set><xsl:attribute-set name="example-name-style"> @@ -1190,14 +1192,12 @@ <xsl:attribute name="margin-top">12pt</xsl:attribute> <xsl:attribute name="margin-bottom">12pt</xsl:attribute> <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"> @@ -1245,10 +1245,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> @@ -1270,18 +1271,20 @@ <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 name="color">blue</xsl:attribute> <xsl:attribute name="text-decoration">underline</xsl:attribute> + </xsl:attribute-set><xsl:attribute-set name="note-style"> @@ -1375,17 +1378,19 @@ + </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-set><xsl:attribute-set name="figure-name-style"> @@ -1459,12 +1464,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> @@ -2223,10 +2230,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"> @@ -2604,10 +2612,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'"/> @@ -2888,10 +2897,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']"> @@ -3381,10 +3392,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)"/> @@ -3392,23 +3413,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> @@ -3995,10 +4016,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> @@ -4280,10 +4302,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 @@ -4389,16 +4412,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> @@ -4510,10 +4534,11 @@ + <xsl:choose> <xsl:when test="$depth &gt;= 5"/> <xsl:when test="$depth &gt;= 4">5</xsl:when> <xsl:when test="$depth &gt;= 3 and ancestor::ogc:terms">3</xsl:when> <xsl:when test="$depth &gt;= 2">4</xsl:when> @@ -5334,10 +5359,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"/> @@ -5474,10 +5502,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