|
1837 | 1837 | <xsl:if test="starts-with(@id, 'array_')">
|
1838 | 1838 | <xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1839 | 1839 | </xsl:if>
|
| 1840 | + <xsl:if test="$layoutVersion = '1951'"> |
| 1841 | + <xsl:attribute name="font-size">inherit</xsl:attribute> |
| 1842 | + </xsl:if> |
1840 | 1843 | <xsl:if test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
|
1841 | 1844 | <xsl:if test="normalize-space(@width) != 'text-width'">
|
1842 | 1845 | <xsl:attribute name="span">all</xsl:attribute>
|
|
2221 | 2224 | <xsl:if test="$continued = 'true'">
|
2222 | 2225 | <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
2223 | 2226 | </xsl:if>
|
| 2227 | + <xsl:if test="$layoutVersion = '1951'"> |
| 2228 | + <xsl:attribute name="font-size">inherit</xsl:attribute> |
| 2229 | + </xsl:if> |
2224 | 2230 | <xsl:if test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
|
2225 | 2231 | <xsl:attribute name="font-size">10pt</xsl:attribute>
|
2226 | 2232 | <xsl:if test="normalize-space(../@width) != 'text-width'">
|
|
3756 | 3762 | </xsl:if>
|
3757 | 3763 |
|
3758 | 3764 | <xsl:if test="$namespace = 'iso'">
|
| 3765 | + <xsl:if test="$layoutVersion = '1951'"> |
| 3766 | + <!-- <xsl:if test="$revision_date_num < 19680101"> --> |
| 3767 | + <xsl:attribute name="font-size">8.5pt</xsl:attribute> |
| 3768 | + <!-- </xsl:if> --> |
| 3769 | + </xsl:if> |
3759 | 3770 | <xsl:if test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
|
3760 | 3771 | <xsl:attribute name="font-size">9pt</xsl:attribute>
|
3761 | 3772 | </xsl:if>
|
|
3864 | 3875 | </xsl:if>
|
3865 | 3876 | <xsl:if test="$namespace = 'iso'">
|
3866 | 3877 | <xsl:variable name="note_name" select="*[local-name() = 'name']"/>
|
| 3878 | + <xsl:if test="$layoutVersion = '1951'"> |
| 3879 | + <xsl:if test="$revision_date_num"> <!-- < 19610101 --> |
| 3880 | + <xsl:attribute name="padding-right">0mm</xsl:attribute> |
| 3881 | + </xsl:if> |
| 3882 | + </xsl:if> |
3867 | 3883 | <xsl:if test="$layoutVersion = '1987'">
|
3868 | 3884 | <xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3869 | 3885 | <xsl:if test="not(translate($note_name,'0123456789','') = $note_name)"> <!-- NOTE with number -->
|
|
5463 | 5479 | </xsl:if>
|
5464 | 5480 | </xsl:if>
|
5465 | 5481 | <xsl:if test="$namespace = 'iso'">
|
| 5482 | + <xsl:if test="$layoutVersion = '1951'"> |
| 5483 | + <xsl:if test="$revision_date_num >= 19680101"> |
| 5484 | + <xsl:attribute name="font-size">9pt</xsl:attribute> |
| 5485 | + </xsl:if> |
| 5486 | + </xsl:if> |
5466 | 5487 | <xsl:if test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
|
5467 | 5488 | <xsl:attribute name="font-size">9pt</xsl:attribute>
|
5468 | 5489 | </xsl:if>
|
|
7664 | 7685 | $namespace = 'rsd'">
|
7665 | 7686 | <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style">
|
7666 | 7687 | <xsl:if test="$namespace = 'iso'">
|
| 7688 | + <xsl:if test="$layoutVersion = '1951'"> |
| 7689 | + <xsl:attribute name="font-size">inherit</xsl:attribute> |
| 7690 | + </xsl:if> |
7667 | 7691 | <xsl:if test="$layoutVersion = '2024'">
|
7668 | 7692 | <xsl:attribute name="margin-top">12pt</xsl:attribute>
|
7669 | 7693 | <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
|
9003 | 9027 | </xsl:choose>
|
9004 | 9028 | </xsl:variable>
|
9005 | 9029 | <xsl:variable name="current_fn_number_text">
|
9006 |
| - <xsl:value-of select="$current_fn_number"/> |
| 9030 | + <xsl:choose> |
| 9031 | + <xsl:when test="$namespace = 'iso'"> |
| 9032 | + <xsl:choose> |
| 9033 | + <xsl:when test="$layoutVersion = '1951' and translate($current_fn_number, '0123456789', '') = ''"> |
| 9034 | + <!-- replace number to asterisks --> |
| 9035 | + <xsl:call-template name="repeat"> |
| 9036 | + <xsl:with-param name="char" select="'*'"/> |
| 9037 | + <xsl:with-param name="count" select="$current_fn_number"/> |
| 9038 | + </xsl:call-template> |
| 9039 | + </xsl:when> |
| 9040 | + <xsl:otherwise><xsl:value-of select="$current_fn_number"/><xsl:text>)</xsl:text></xsl:otherwise> |
| 9041 | + </xsl:choose> |
| 9042 | + </xsl:when> |
| 9043 | + <xsl:otherwise> |
| 9044 | + <xsl:value-of select="$current_fn_number"/> |
| 9045 | + </xsl:otherwise> |
| 9046 | + </xsl:choose> |
9007 | 9047 | <xsl:if test="$namespace = 'bsi'">
|
9008 | 9048 | <xsl:if test="$document_type = 'PAS'">
|
9009 | 9049 | <xsl:text>)</xsl:text>
|
9010 | 9050 | </xsl:if>
|
9011 | 9051 | </xsl:if>
|
9012 |
| - <xsl:if test="$namespace = 'iso'"> |
9013 |
| - <xsl:text>)</xsl:text> |
9014 |
| - </xsl:if> |
9015 | 9052 | <xsl:if test="$namespace = 'jis'">
|
9016 | 9053 | <fo:inline font-weight="normal">)</fo:inline>
|
9017 | 9054 | </xsl:if>
|
@@ -10819,13 +10856,24 @@
|
10819 | 10856 | </fo:inline>
|
10820 | 10857 | </xsl:template>
|
10821 | 10858 |
|
10822 |
| - <xsl:template match="text()[ancestor::*[local-name()='smallcap']]"> |
| 10859 | + <xsl:template match="text()[ancestor::*[local-name()='smallcap']]" name="smallcaps"> |
| 10860 | + <xsl:param name="txt"/> |
10823 | 10861 | <!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
10824 |
| - <xsl:variable name="text" select="."/> |
| 10862 | + <xsl:variable name="text"> |
| 10863 | + <xsl:choose> |
| 10864 | + <xsl:when test="$txt != ''"> |
| 10865 | + <xsl:value-of select="$txt"/> |
| 10866 | + </xsl:when> |
| 10867 | + <xsl:otherwise> |
| 10868 | + <xsl:value-of select="."/> |
| 10869 | + </xsl:otherwise> |
| 10870 | + </xsl:choose> |
| 10871 | + </xsl:variable> |
10825 | 10872 | <xsl:variable name="ratio_">
|
10826 | 10873 | <xsl:choose>
|
10827 | 10874 | <xsl:when test="$namespace = 'iso'">
|
10828 | 10875 | <xsl:choose>
|
| 10876 | + <xsl:when test="$layoutVersion = '1951'">0.9</xsl:when> |
10829 | 10877 | <xsl:when test="$layoutVersion = '2024'">0.8</xsl:when>
|
10830 | 10878 | <xsl:otherwise>0.75</xsl:otherwise>
|
10831 | 10879 | </xsl:choose>
|
@@ -12775,13 +12823,25 @@
|
12775 | 12823 | </xsl:if>
|
12776 | 12824 | </xsl:if>
|
12777 | 12825 | <xsl:if test="$namespace = 'iso'">
|
12778 |
| - <xsl:if test="$layoutVersion = '1987'"> |
| 12826 | + <xsl:if test="$layoutVersion = '1951' or $layoutVersion = '1987'"> |
12779 | 12827 | <xsl:if test="following-sibling::*[1][self::iso:note] and not(preceding-sibling::*[1][self::iso:note])">
|
12780 | 12828 | <!-- NOTES -->
|
12781 | 12829 | <fo:block font-size="9.5pt" keep-with-next="always" margin-bottom="6pt" text-transform="uppercase">
|
12782 |
| - <xsl:call-template name="getLocalizedString"> |
12783 |
| - <xsl:with-param name="key">Note.pl</xsl:with-param> |
12784 |
| - </xsl:call-template> |
| 12830 | + <xsl:variable name="i18n_notes"> |
| 12831 | + <xsl:call-template name="getLocalizedString"> |
| 12832 | + <xsl:with-param name="key">Note.pl</xsl:with-param> |
| 12833 | + </xsl:call-template> |
| 12834 | + </xsl:variable> |
| 12835 | + <xsl:choose> |
| 12836 | + <xsl:when test="$layoutVersion = '1951'"> |
| 12837 | + <xsl:call-template name="smallcaps"> |
| 12838 | + <xsl:with-param name="txt" select="$i18n_notes"/> |
| 12839 | + </xsl:call-template> |
| 12840 | + </xsl:when> |
| 12841 | + <xsl:otherwise> |
| 12842 | + <xsl:value-of select="$i18n_notes"/> |
| 12843 | + </xsl:otherwise> |
| 12844 | + </xsl:choose> |
12785 | 12845 | </fo:block>
|
12786 | 12846 | </xsl:if>
|
12787 | 12847 | </xsl:if>
|
@@ -15483,11 +15543,16 @@
|
15483 | 15543 | <xsl:choose>
|
15484 | 15544 | <xsl:when test="$namespace = 'bsi' or
|
15485 | 15545 | $namespace = 'iho' or
|
15486 |
| - $namespace = 'iso' or |
15487 | 15546 | $namespace = 'jcgm' or
|
15488 | 15547 | $namespace = 'm3d' or
|
15489 | 15548 | $namespace = 'ogc' or
|
15490 | 15549 | $namespace = 'rsd'">inline</xsl:when> <!-- display first Example paragraph on the same line as EXAMPLE title -->
|
| 15550 | + <xsl:when test="$namespace = 'iso'"> |
| 15551 | + <xsl:choose> |
| 15552 | + <xsl:when test="$layoutVersion = '1951' and $revision_date_num < 19610101">list</xsl:when> |
| 15553 | + <xsl:otherwise>inline</xsl:otherwise> |
| 15554 | + </xsl:choose> |
| 15555 | + </xsl:when> |
15491 | 15556 | <xsl:when test="$namespace = 'iec'">
|
15492 | 15557 | <xsl:choose>
|
15493 | 15558 | <!-- if example contains only one (except 'name') element (paragraph for example), then display it on the same line as EXAMPLE title -->
|
@@ -15532,18 +15597,22 @@
|
15532 | 15597 |
|
15533 | 15598 | <xsl:when test="contains(normalize-space($fo_element), 'list')">
|
15534 | 15599 |
|
15535 |
| - <xsl:variable name="provisional_distance_between_starts"> |
| 15600 | + <xsl:variable name="provisional_distance_between_starts_"> |
15536 | 15601 | <xsl:choose>
|
| 15602 | + <xsl:when test="$namespace = 'iso'">45</xsl:when> |
15537 | 15603 | <xsl:when test="$namespace = 'jis'"><xsl:value-of select="10 + $text_indent"/></xsl:when>
|
15538 | 15604 | <xsl:otherwise>7</xsl:otherwise>
|
15539 | 15605 | </xsl:choose>
|
15540 | 15606 | </xsl:variable>
|
15541 |
| - <xsl:variable name="indent"> |
| 15607 | + <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/> |
| 15608 | + <xsl:variable name="indent_"> |
15542 | 15609 | <xsl:choose>
|
| 15610 | + <xsl:when test="$namespace = 'iso'">28</xsl:when> |
15543 | 15611 | <xsl:when test="$namespace = 'jis'"><xsl:value-of select="$text_indent"/></xsl:when>
|
15544 | 15612 | <xsl:otherwise>0</xsl:otherwise>
|
15545 | 15613 | </xsl:choose>
|
15546 | 15614 | </xsl:variable>
|
| 15615 | + <xsl:variable name="indent" select="normalize-space($indent_)"/> |
15547 | 15616 |
|
15548 | 15617 | <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
|
15549 | 15618 | <fo:list-item>
|
|
15632 | 15701 |
|
15633 | 15702 | <xsl:variable name="num"><xsl:number/></xsl:variable>
|
15634 | 15703 | <xsl:variable name="element">
|
15635 |
| - <xsl:if test="$namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'rsd'"> |
| 15704 | + <xsl:if test="$namespace = 'iso'"> |
| 15705 | + <xsl:choose> |
| 15706 | + <xsl:when test="$num = 1 and not(contains($fo_element, 'block'))">inline</xsl:when> |
| 15707 | + <xsl:otherwise> |
| 15708 | + <xsl:choose> |
| 15709 | + <xsl:when test="$layoutVersion = '1951' and $revision_date_num < 19610101">list</xsl:when> |
| 15710 | + <xsl:otherwise>block</xsl:otherwise> |
| 15711 | + </xsl:choose> |
| 15712 | + </xsl:otherwise> |
| 15713 | + </xsl:choose> |
| 15714 | + </xsl:if> |
| 15715 | + <xsl:if test="$namespace = 'jcgm' or $namespace = 'rsd'"> |
15636 | 15716 | <xsl:choose>
|
15637 | 15717 | <xsl:when test="$num = 1 and not(contains($fo_element, 'block'))">inline</xsl:when>
|
15638 | 15718 | <xsl:otherwise>block</xsl:otherwise>
|
|
16021 | 16101 | </xsl:choose>
|
16022 | 16102 | </xsl:if>
|
16023 | 16103 | <xsl:if test="$namespace = 'ieee'">1</xsl:if>
|
16024 |
| - <xsl:if test="$namespace = 'iso' or $namespace = 'jcgm'"> |
| 16104 | + <xsl:if test="$namespace = 'iso'"> |
| 16105 | + <xsl:choose> |
| 16106 | + <xsl:when test="$layoutVersion = '1951'">2</xsl:when> |
| 16107 | + <xsl:when test="$depth = 2">3</xsl:when> |
| 16108 | + <xsl:otherwise>4</xsl:otherwise> |
| 16109 | + </xsl:choose> |
| 16110 | + </xsl:if> |
| 16111 | + <xsl:if test=" $namespace = 'jcgm'"> |
16025 | 16112 | <xsl:choose>
|
16026 | 16113 | <xsl:when test="$depth = 2">3</xsl:when>
|
16027 | 16114 | <xsl:otherwise>4</xsl:otherwise>
|
|
16561 | 16648 | <label level="3" font-size="75%">o</label> <!-- white circle -->
|
16562 | 16649 | </xsl:when>
|
16563 | 16650 | <xsl:when test="$namespace = 'iso'">
|
16564 |
| - <label>—</label> <!-- em dash --> |
| 16651 | + <xsl:choose> |
| 16652 | + <xsl:when test="$layoutVersion = '1951'"> |
| 16653 | + <label>–</label> <!-- en dash --> |
| 16654 | + </xsl:when> |
| 16655 | + <xsl:otherwise> |
| 16656 | + <label>—</label> <!-- em dash --> |
| 16657 | + </xsl:otherwise> |
| 16658 | + </xsl:choose> |
16565 | 16659 | </xsl:when>
|
16566 | 16660 | <xsl:when test="$namespace = 'jcgm'">
|
16567 | 16661 | <label level="1">—</label> <!-- em dash -->
|
@@ -16671,14 +16765,19 @@
|
16671 | 16765 | </xsl:when>
|
16672 | 16766 | <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
16673 | 16767 |
|
16674 |
| - <xsl:variable name="label"> |
| 16768 | + <xsl:variable name="type" select="../@type"/> |
16675 | 16769 |
|
16676 |
| - <xsl:variable name="type" select="../@type"/> |
| 16770 | + <xsl:variable name="label"> |
16677 | 16771 |
|
16678 | 16772 | <xsl:variable name="style_prefix_">
|
16679 | 16773 | <xsl:if test="$type = 'roman'">
|
16680 | 16774 | <xsl:if test="$namespace = 'bipm'">(</xsl:if> <!-- Example: (i) -->
|
16681 | 16775 | </xsl:if>
|
| 16776 | + <xsl:if test="$type = 'alphabet'"> |
| 16777 | + <xsl:if test="$namespace = 'iso'"> |
| 16778 | + <xsl:if test="$layoutVersion = '1951'">(</xsl:if> <!-- Example: (a) --> |
| 16779 | + </xsl:if> |
| 16780 | + </xsl:if> |
16682 | 16781 | </xsl:variable>
|
16683 | 16782 | <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
|
16684 | 16783 |
|
@@ -16717,13 +16816,28 @@
|
16717 | 16816 | <xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
|
16718 | 16817 | <xsl:value-of select="$style_prefix"/>
|
16719 | 16818 | </xsl:if>
|
| 16819 | + |
16720 | 16820 | <xsl:value-of select="@label"/>
|
| 16821 | + |
16721 | 16822 | <xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
|
16722 | 16823 | <xsl:value-of select="$style_suffix"/>
|
16723 | 16824 | </xsl:if>
|
16724 | 16825 | </xsl:variable>
|
16725 | 16826 |
|
16726 |
| - <xsl:value-of select="normalize-space($label)"/> |
| 16827 | + |
| 16828 | + <xsl:choose> |
| 16829 | + <xsl:when test="$namespace = 'iso'"> |
| 16830 | + <xsl:choose> |
| 16831 | + <xsl:when test="$layoutVersion = '1951' and $type = 'alphabet'">(<fo:inline font-style="italic"><xsl:value-of select="@label"/></fo:inline>)</xsl:when> |
| 16832 | + <xsl:otherwise> |
| 16833 | + <xsl:value-of select="normalize-space($label)"/> |
| 16834 | + </xsl:otherwise> |
| 16835 | + </xsl:choose> |
| 16836 | + </xsl:when> |
| 16837 | + <xsl:otherwise> |
| 16838 | + <xsl:value-of select="normalize-space($label)"/> |
| 16839 | + </xsl:otherwise> |
| 16840 | + </xsl:choose> |
16727 | 16841 |
|
16728 | 16842 | </xsl:when>
|
16729 | 16843 | <xsl:otherwise> <!-- for ordered lists 'ol' -->
|
|
16842 | 16956 | </xsl:when>
|
16843 | 16957 | <xsl:otherwise>
|
16844 | 16958 | <xsl:choose>
|
| 16959 | + <xsl:when test="$namespace = 'iso'"> |
| 16960 | + <xsl:choose> |
| 16961 | + <xsl:when test="$layoutVersion = '1951' and local-name() = 'ul'"> |
| 16962 | + <fo:block-container margin-left="8mm"> |
| 16963 | + <xsl:if test="ancestor::*[local-name() = 'sections' or local-name() = 'annex']"> |
| 16964 | + <xsl:variable name="level"> |
| 16965 | + <xsl:for-each select="ancestor::*[1]"> |
| 16966 | + <xsl:call-template name="getLevel"/> |
| 16967 | + </xsl:for-each> |
| 16968 | + </xsl:variable> |
| 16969 | + <!-- 5 + 6 (from list-block provisional-distance-between-starts) mm --> |
| 16970 | + <xsl:attribute name="margin-left"> |
| 16971 | + <xsl:value-of select="5 + (($level - 1) * 6)"/>mm |
| 16972 | + </xsl:attribute> |
| 16973 | + </xsl:if> |
| 16974 | + <fo:block-container margin-left="0"> |
| 16975 | + <fo:block role="SKIP"> |
| 16976 | + <xsl:apply-templates select="." mode="list"> |
| 16977 | + <xsl:with-param name="indent" select="$indent"/> |
| 16978 | + </xsl:apply-templates> |
| 16979 | + </fo:block> |
| 16980 | + </fo:block-container> |
| 16981 | + </fo:block-container> |
| 16982 | + </xsl:when> |
| 16983 | + <xsl:otherwise> |
| 16984 | + <fo:block role="SKIP"> |
| 16985 | + <xsl:apply-templates select="." mode="list"> |
| 16986 | + <xsl:with-param name="indent" select="$indent"/> |
| 16987 | + </xsl:apply-templates> |
| 16988 | + </fo:block> |
| 16989 | + </xsl:otherwise> |
| 16990 | + </xsl:choose> |
| 16991 | + </xsl:when> |
16845 | 16992 | <xsl:when test="$namespace = 'jis'">
|
16846 | 16993 | <fo:block-container role="SKIP">
|
16847 | 16994 | <xsl:if test="ancestor::jis:ol or ancestor::jis:ul">
|
|
16968 | 17115 | <xsl:attribute name="provisional-distance-between-starts">5mm</xsl:attribute>
|
16969 | 17116 | </xsl:if>
|
16970 | 17117 | </xsl:if>
|
| 17118 | + |
| 17119 | + <xsl:if test="$namespace = 'iso'"> |
| 17120 | + <xsl:if test="$layoutVersion = '1951' and local-name() = 'ul'"> |
| 17121 | + <xsl:attribute name="provisional-distance-between-starts">5mm</xsl:attribute> |
| 17122 | + </xsl:if> |
| 17123 | + </xsl:if> |
| 17124 | + |
16971 | 17125 | <xsl:if test="$namespace = 'gb' or $namespace = 'm3d' or $namespace = 'mpfd'">
|
16972 | 17126 | <xsl:if test="local-name() = 'ol'">
|
16973 | 17127 | <xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
|
|
0 commit comments