Skip to content

Commit

Permalink
bipm xslt updated for #274 part 9
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 committed Nov 8, 2020
1 parent acc096c commit 91fc900
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 20 deletions.
1 change: 1 addition & 0 deletions xslt_src/bipm.brochure.presentation.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2595,6 +2595,7 @@
<xsl:otherwise>justify</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:copy-of select="@font-family"/>
<xsl:if test="not(ancestor::bipm:table)">
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
</xsl:if>
Expand Down
88 changes: 68 additions & 20 deletions xslt_src/common.presentation.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2815,9 +2815,12 @@
<xsl:attribute name="margin-left">0mm</xsl:attribute>
</xsl:if>
<xsl:if test="$namespace = 'bipm'">
<!-- <xsl:if test="not(ancestor::*[local-name() = 'li'])"> -->
<xsl:if test="not(ancestor::*[local-name() = 'li'])">
<xsl:attribute name="margin-left">0mm</xsl:attribute>
<!-- </xsl:if> -->
</xsl:if>
<xsl:if test="ancestor::*[local-name() = 'li']">
<xsl:attribute name="margin-left">6.5mm</xsl:attribute><!-- 8 mm -->
</xsl:if>
</xsl:if>
<xsl:if test="parent::*[local-name() = 'note']">
<xsl:attribute name="margin-left">
Expand Down Expand Up @@ -2858,9 +2861,16 @@
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
</xsl:if>
<xsl:variable name="title-where">
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-where'"/>
</xsl:call-template>
<xsl:if test="$namespace = 'iso'">
<xsl:call-template name="getLocalizedString">
<xsl:with-param name="key">where</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:if test="$namespace = 'bipm' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iho' or $namespace = 'itu' or $namespace = 'm3d' or $namespace = 'mpfd' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' or $namespace = 'rsd' or $namespace = 'unece' or $namespace = 'unece-rec'">
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-where'"/>
</xsl:call-template>
</xsl:if>
</xsl:variable>
<xsl:value-of select="$title-where"/>
</fo:block>
Expand All @@ -2880,9 +2890,16 @@
<xsl:attribute name="margin-bottom">0</xsl:attribute>
</xsl:if>
<xsl:variable name="title-where">
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-where'"/>
</xsl:call-template>
<xsl:if test="$namespace = 'iso'">
<xsl:call-template name="getLocalizedString">
<xsl:with-param name="key">where</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:if test="$namespace = 'bipm' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iho' or $namespace = 'itu' or $namespace = 'm3d' or $namespace = 'mpfd' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' or $namespace = 'rsd' or $namespace = 'unece' or $namespace = 'unece-rec'">
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-where'"/>
</xsl:call-template>
</xsl:if>
</xsl:variable>
<xsl:value-of select="$title-where"/><xsl:text>&#xA0;</xsl:text>
<xsl:apply-templates select="*[local-name()='dt']/*"/>
Expand All @@ -2907,9 +2924,16 @@
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
</xsl:if>
<xsl:variable name="title-where">
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-where'"/>
</xsl:call-template>
<xsl:if test="$namespace = 'iso'">
<xsl:call-template name="getLocalizedString">
<xsl:with-param name="key">where</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:if test="$namespace = 'bipm' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iho' or $namespace = 'itu' or $namespace = 'm3d' or $namespace = 'mpfd' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' or $namespace = 'rsd' or $namespace = 'unece' or $namespace = 'unece-rec'">
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-where'"/>
</xsl:call-template>
</xsl:if>
</xsl:variable>
<xsl:value-of select="$title-where"/><xsl:if test="$namespace = 'itu'">:</xsl:if>
</fo:block>
Expand All @@ -2929,9 +2953,16 @@
<xsl:attribute name="text-indent">7.4mm</xsl:attribute>
</xsl:if>
<xsl:variable name="title-key">
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-key'"/>
</xsl:call-template>
<xsl:if test="$namespace = 'iso'">
<xsl:call-template name="getLocalizedString">
<xsl:with-param name="key">key</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:if test="$namespace = 'bipm' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iho' or $namespace = 'itu' or $namespace = 'm3d' or $namespace = 'mpfd' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' or $namespace = 'rsd' or $namespace = 'unece' or $namespace = 'unece-rec'">
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-key'"/>
</xsl:call-template>
</xsl:if>
</xsl:variable>
<xsl:value-of select="$title-key"/>
</fo:block>
Expand Down Expand Up @@ -3850,10 +3881,18 @@

<xsl:template match="*[local-name() = 'modification']">
<xsl:variable name="title-modified">
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-modified'"/>
</xsl:call-template>
<xsl:if test="$namespace = 'iso'">
<xsl:call-template name="getLocalizedString">
<xsl:with-param name="key">modified</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:if test="$namespace = 'bipm' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iho' or $namespace = 'itu' or $namespace = 'm3d' or $namespace = 'mpfd' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' or $namespace = 'rsd' or $namespace = 'unece' or $namespace = 'unece-rec'">
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-modified'"/>
</xsl:call-template>
</xsl:if>
</xsl:variable>

<xsl:choose>
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
Expand Down Expand Up @@ -5048,9 +5087,18 @@
<xsl:attribute name="font-weight">bold</xsl:attribute>
<xsl:attribute name="padding-right">1mm</xsl:attribute>
</xsl:if>
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-source'"/>
</xsl:call-template>

<xsl:if test="$namespace = 'iso'">
<xsl:call-template name="getLocalizedString">
<xsl:with-param name="key">source</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:if test="$namespace = 'bipm' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iho' or $namespace = 'itu' or $namespace = 'm3d' or $namespace = 'mpfd' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' or $namespace = 'rsd' or $namespace = 'unece' or $namespace = 'unece-rec'">
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-source'"/>
</xsl:call-template>
</xsl:if>

<xsl:text>: </xsl:text>
</fo:inline>
</xsl:if>
Expand Down

0 comments on commit 91fc900

Please sign in to comment.