Skip to content

Commit

Permalink
ISO xslt updated for layout 1951, metanorma/metanorma-iso#1089
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 committed Aug 6, 2024
1 parent 3b6bc81 commit b08da95
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
6 changes: 3 additions & 3 deletions xslt_src/common.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -3760,9 +3760,9 @@

<xsl:if test="$namespace = 'iso'">
<xsl:if test="$layoutVersion = '1951'">
<xsl:if test="$revision_date_num &lt; 19680101">
<!-- <xsl:if test="$revision_date_num &lt; 19680101"> -->
<xsl:attribute name="font-size">8.5pt</xsl:attribute>
</xsl:if>
<!-- </xsl:if> -->
</xsl:if>
<xsl:if test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
<xsl:attribute name="font-size">9pt</xsl:attribute>
Expand Down Expand Up @@ -3873,7 +3873,7 @@
<xsl:if test="$namespace = 'iso'">
<xsl:variable name="note_name" select="*[local-name() = 'name']"/>
<xsl:if test="$layoutVersion = '1951'">
<xsl:if test="$revision_date_num &lt; 19610101">
<xsl:if test="$revision_date_num"> <!-- &lt; 19610101 -->
<xsl:attribute name="padding-right">0mm</xsl:attribute>
</xsl:if>
</xsl:if>
Expand Down
17 changes: 12 additions & 5 deletions xslt_src/iso.international-standard.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2840,7 +2840,7 @@
<!-- transform NOTE to Note for smallcaps feature working -->
<xsl:template match="iso:note/iso:name/text() | iso:example/iso:name/text()" mode="update_xml_step1" priority="3">
<xsl:choose>
<xsl:when test="$layoutVersion = '1951' and $revision_date_num &lt; 19680101">
<xsl:when test="$layoutVersion = '1951'"> <!-- and $revision_date_num &lt; 19680101 -->
<xsl:value-of select="substring(., 1, 1)"/>
<xsl:value-of select="java:toLowerCase(java:java.lang.String.new(substring(., 2)))"/>
</xsl:when>
Expand Down Expand Up @@ -4197,7 +4197,14 @@
<xsl:if test="$layoutVersion = '1951'">
<xsl:if test="not(ancestor::*[local-name() = 'li' or local-name() = 'td' or local-name() = 'th' or local-name() = 'dd'])">
<!-- for paragraphs in the main text -->
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
<xsl:choose>
<xsl:when test="$revision_date_num &lt; 19600101">
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:if test="(ancestor::iso:preface and parent::iso:clause) or ancestor::iso:foreword">
<xsl:attribute name="text-indent">7.1mm</xsl:attribute>
Expand Down Expand Up @@ -4302,7 +4309,7 @@

<xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/text()" priority="5">
<xsl:choose>
<xsl:when test="$layoutVersion = '1951' and $revision_date_num &lt; 19610101">
<xsl:when test="$layoutVersion = '1951'"> <!-- and $revision_date_num &lt; 19610101 -->
<xsl:call-template name="smallcaps"/>
<xsl:value-of select="concat('. ', $em_dash, ' ')"/>
</xsl:when>
Expand All @@ -4315,7 +4322,7 @@

<xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']/text()" priority="5">
<xsl:choose>
<xsl:when test="$layoutVersion = '1951' and $revision_date_num &lt; 19610101">
<xsl:when test="$layoutVersion = '1951'"> <!-- and $revision_date_num &lt; 19610101 -->
<xsl:call-template name="smallcaps"/>
<xsl:text>:</xsl:text>
</xsl:when>
Expand Down Expand Up @@ -4385,7 +4392,7 @@
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="$layoutVersion = '1951' and ($revision_date_num &gt;= 19680101 or $level &gt;= 2) and ancestor::*[local-name() = 'sections' or local-name() = 'annex'] and not(self::iso:introduction)">
<xsl:when test="$layoutVersion = '1951' and ($revision_date_num &gt;= 19690101 or $level &gt;= 2) and ancestor::*[local-name() = 'sections' or local-name() = 'annex'] and not(self::iso:introduction)">

<fo:list-block role="SKIP">
<xsl:attribute name="provisional-distance-between-starts">
Expand Down

0 comments on commit b08da95

Please sign in to comment.