metanorma-iec 2.2.1 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/iec/base_convert.rb +9 -9
- data/lib/isodoc/iec/html/htmlstyle.css +30 -1
- data/lib/isodoc/iec/iec.international-standard.xsl +78 -25
- data/lib/metanorma/iec/biblio.rng +1 -1
- data/lib/metanorma/iec/isodoc.rng +1 -1
- data/lib/metanorma/iec/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 3df1d6637e7c07bd1e152d015eab70efb8907e5b75fdcd988b38bcf9bf4710cd
         | 
| 4 | 
            +
              data.tar.gz: 6c00622ff41524f4451c0f3c43f0b36388eeff742c61ac33e5f2533681c57bbd
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 62f8813c4e594dcfb25ac7a681b8507647ec4cfcd18b2df774903cf54e32bafca9816bac62340771b3b2ac88ccbd1864a18e75f5225e14b6c58dd55282ca6955
         | 
| 7 | 
            +
              data.tar.gz: 30392d4a42b4fa9d2a9c3c8233c251e96a93b43e930a3653674e5f5ca12dad82c1f1021f0dc7a8fbad46b0dc3adf2e5dcac2970d0af54586b410138dc43ef14c
         | 
| @@ -19,7 +19,7 @@ module IsoDoc | |
| 19 19 |  | 
| 20 20 | 
             
                  def foreword1(sect, boilerplate, out)
         | 
| 21 21 | 
             
                    out.div **attr_code(id: sect ? sect["id"] : "") do |s|
         | 
| 22 | 
            -
                      s.h1( | 
| 22 | 
            +
                      s.h1(class: "ForewordTitle") { |h1| h1 << @i18n.foreword }
         | 
| 23 23 | 
             
                      @meta.get[:doctype] == "Amendment" or
         | 
| 24 24 | 
             
                        s.div **attr_code(class: "boilerplate_legal") do |s1|
         | 
| 25 25 | 
             
                          boilerplate&.elements&.each { |e| parse(e, s1) }
         | 
| @@ -29,23 +29,23 @@ module IsoDoc | |
| 29 29 | 
             
                  end
         | 
| 30 30 |  | 
| 31 31 | 
             
                  def iec_orgname(out)
         | 
| 32 | 
            -
                    out.p( | 
| 33 | 
            -
                    out.p( | 
| 34 | 
            -
                    out.p( | 
| 32 | 
            +
                    out.p(class: "zzSTDTitle1") { |p| p << @i18n.get["IEC"] }
         | 
| 33 | 
            +
                    out.p(class: "zzSTDTitle1") { |p| p << "____________" }
         | 
| 34 | 
            +
                    out.p(class: "zzSTDTitle1") { |p| p << " " }
         | 
| 35 35 | 
             
                  end
         | 
| 36 36 |  | 
| 37 37 | 
             
                  def middle_title(_isoxml, out)
         | 
| 38 38 | 
             
                    title1, title2 = middle_title_parts(out)
         | 
| 39 | 
            -
                    out.p( | 
| 39 | 
            +
                    out.p(class: "zzSTDTitle1") do |p|
         | 
| 40 40 | 
             
                      p.b { |b| b << title1 }
         | 
| 41 41 | 
             
                    end
         | 
| 42 42 | 
             
                    if title2
         | 
| 43 | 
            -
                      out.p( | 
| 44 | 
            -
                      out.p( | 
| 43 | 
            +
                      out.p(class: "zzSTDTitle1") { |p| p << " " }
         | 
| 44 | 
            +
                      out.p(class: "zzSTDTitle2") do |p|
         | 
| 45 45 | 
             
                        p.b { |b| b << title2 }
         | 
| 46 46 | 
             
                      end
         | 
| 47 47 | 
             
                    end
         | 
| 48 | 
            -
                    out.p( | 
| 48 | 
            +
                    out.p(class: "zzSTDTitle1") { |p| p << " " }
         | 
| 49 49 | 
             
                  end
         | 
| 50 50 |  | 
| 51 51 | 
             
                  def middle_title_parts(_out)
         | 
| @@ -80,7 +80,7 @@ module IsoDoc | |
| 80 80 | 
             
                    page_break(out)
         | 
| 81 81 | 
             
                    out.div **attr_code(id: node["id"]) do |div|
         | 
| 82 82 | 
             
                      depth = clause_title_depth(node, nil)
         | 
| 83 | 
            -
                      out.send "h#{depth}",  | 
| 83 | 
            +
                      out.send "h#{depth}", class: "zzSTDTitle2" do |p|
         | 
| 84 84 | 
             
                        p.b do |b|
         | 
| 85 85 | 
             
                          node&.at(ns("./title"))&.children&.each { |c2| parse(c2, b) }
         | 
| 86 86 | 
             
                        end
         | 
| @@ -131,6 +131,35 @@ a.FootnoteRef + a.FootnoteRef:before { | |
| 131 131 | 
             
              color: red;
         | 
| 132 132 | 
             
              text-decoration: line-through; }
         | 
| 133 133 |  | 
| 134 | 
            +
            /* code highlighting with line numbers */
         | 
| 135 | 
            +
            table.rouge-line-table td.rouge-gutter {
         | 
| 136 | 
            +
              -moz-user-select: none;
         | 
| 137 | 
            +
              -ms-user-select: none;
         | 
| 138 | 
            +
              -webkit-user-select: none;
         | 
| 139 | 
            +
              user-select: none;
         | 
| 140 | 
            +
              padding-right: 1em; }
         | 
| 141 | 
            +
             | 
| 142 | 
            +
            table.rouge-line-table td.rouge-code {
         | 
| 143 | 
            +
              -moz-user-select: all;
         | 
| 144 | 
            +
              -ms-user-select: all;
         | 
| 145 | 
            +
              -webkit-user-select: all;
         | 
| 146 | 
            +
              user-select: all; }
         | 
| 147 | 
            +
             | 
| 148 | 
            +
            table.rouge-line-table,
         | 
| 149 | 
            +
            table.rouge-line-table th,
         | 
| 150 | 
            +
            table.rouge-line-table td {
         | 
| 151 | 
            +
              width: auto;
         | 
| 152 | 
            +
              border: none;
         | 
| 153 | 
            +
              margin: 0;
         | 
| 154 | 
            +
              padding: 0;
         | 
| 155 | 
            +
              font-size: 100%; }
         | 
| 156 | 
            +
             | 
| 157 | 
            +
            table.rouge-line-table pre {
         | 
| 158 | 
            +
              margin: 0;
         | 
| 159 | 
            +
              padding: 0;
         | 
| 160 | 
            +
              overflow-x: visible;
         | 
| 161 | 
            +
              font-size: 100%; }
         | 
| 162 | 
            +
             | 
| 134 163 | 
             
            #standard-band {
         | 
| 135 164 | 
             
              background-color: #0AC442; }
         | 
| 136 165 |  | 
| @@ -903,7 +932,7 @@ table { | |
| 903 932 | 
             
              table th, table td {
         | 
| 904 933 | 
             
                padding: 1em; }
         | 
| 905 934 | 
             
              table td.header {
         | 
| 906 | 
            -
                font- | 
| 935 | 
            +
                font-weight: 400; }
         | 
| 907 936 | 
             
              table td,
         | 
| 908 937 | 
             
              table th {
         | 
| 909 938 | 
             
                font-size: 0.95em;
         | 
| @@ -4,7 +4,7 @@ | |
| 4 4 |  | 
| 5 5 | 
             
            	<xsl:param name="additionalXMLs" select="''"/> <!-- iec-rice.fr.xml  -->
         | 
| 6 6 |  | 
| 7 | 
            -
            	<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name']) | 
| 7 | 
            +
            	<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure' or local-name() = 'localized-strings')] and not(ancestor::*[local-name() = 'name']))]" use="@reference"/>
         | 
| 8 8 |  | 
| 9 9 | 
             
            	<xsl:variable name="additionalXMLsArray">
         | 
| 10 10 | 
             
            		<xsl:call-template name="split">
         | 
| @@ -1697,10 +1697,14 @@ | |
| 1697 1697 | 
             
            				<xsl:element name="{$element-name}">
         | 
| 1698 1698 | 
             
            					<xsl:attribute name="text-align">
         | 
| 1699 1699 | 
             
            						<xsl:choose>
         | 
| 1700 | 
            -
            							<xsl:when test="@align | 
| 1700 | 
            +
            							<xsl:when test="@align = 'justified'">justify</xsl:when>
         | 
| 1701 | 
            +
            							<xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
         | 
| 1701 1702 | 
             
            							<xsl:otherwise>justify</xsl:otherwise>
         | 
| 1702 1703 | 
             
            						</xsl:choose>
         | 
| 1703 1704 | 
             
            					</xsl:attribute>
         | 
| 1705 | 
            +
            					<xsl:if test="@align = 'indent'">
         | 
| 1706 | 
            +
            						<xsl:attribute name="margin-left">7mm</xsl:attribute>
         | 
| 1707 | 
            +
            					</xsl:if>
         | 
| 1704 1708 | 
             
            					<xsl:attribute name="margin-top">5pt</xsl:attribute>
         | 
| 1705 1709 | 
             
            					<xsl:if test="ancestor::iec:definition">
         | 
| 1706 1710 | 
             
            						<xsl:attribute name="margin-top">1pt</xsl:attribute>
         | 
| @@ -2036,14 +2040,14 @@ | |
| 2036 2040 | 
             
            	BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
         | 
| 2037 2041 |  | 
| 2038 2042 | 
             
            	<!--
         | 
| 2039 | 
            -
            	< | 
| 2043 | 
            +
            	<metanorma-extension>
         | 
| 2040 2044 | 
             
            		<presentation-metadata>
         | 
| 2041 2045 | 
             
            			<papersize>letter</papersize>
         | 
| 2042 2046 | 
             
            		</presentation-metadata>
         | 
| 2043 | 
            -
            	</ | 
| 2047 | 
            +
            	</metanorma-extension>
         | 
| 2044 2048 | 
             
            	-->
         | 
| 2045 2049 |  | 
| 2046 | 
            -
            	<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = ' | 
| 2050 | 
            +
            	<xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
         | 
| 2047 2051 | 
             
            	<xsl:variable name="papersize_width_">
         | 
| 2048 2052 | 
             
            		<xsl:choose>
         | 
| 2049 2053 | 
             
            			<xsl:when test="$papersize = 'letter'">215.9</xsl:when>
         | 
| @@ -2164,7 +2168,7 @@ | |
| 2164 2168 | 
             
            	<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
         | 
| 2165 2169 |  | 
| 2166 2170 | 
             
            	<xsl:variable name="title-list-tables">
         | 
| 2167 | 
            -
            		<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = ' | 
| 2171 | 
            +
            		<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
         | 
| 2168 2172 | 
             
            		<xsl:value-of select="$toc_table_title"/>
         | 
| 2169 2173 | 
             
            		<xsl:if test="normalize-space($toc_table_title) = ''">
         | 
| 2170 2174 | 
             
            			<xsl:call-template name="getTitle">
         | 
| @@ -2174,7 +2178,7 @@ | |
| 2174 2178 | 
             
            	</xsl:variable>
         | 
| 2175 2179 |  | 
| 2176 2180 | 
             
            	<xsl:variable name="title-list-figures">
         | 
| 2177 | 
            -
            		<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = ' | 
| 2181 | 
            +
            		<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
         | 
| 2178 2182 | 
             
            		<xsl:value-of select="$toc_figure_title"/>
         | 
| 2179 2183 | 
             
            		<xsl:if test="normalize-space($toc_figure_title) = ''">
         | 
| 2180 2184 | 
             
            			<xsl:call-template name="getTitle">
         | 
| @@ -2184,7 +2188,7 @@ | |
| 2184 2188 | 
             
            	</xsl:variable>
         | 
| 2185 2189 |  | 
| 2186 2190 | 
             
            	<xsl:variable name="title-list-recommendations">
         | 
| 2187 | 
            -
            		<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = ' | 
| 2191 | 
            +
            		<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
         | 
| 2188 2192 | 
             
            		<xsl:value-of select="$toc_requirement_title"/>
         | 
| 2189 2193 | 
             
            		<xsl:if test="normalize-space($toc_requirement_title) = ''">
         | 
| 2190 2194 | 
             
            			<xsl:call-template name="getTitle">
         | 
| @@ -2256,7 +2260,7 @@ | |
| 2256 2260 | 
             
            		<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
         | 
| 2257 2261 |  | 
| 2258 2262 | 
             
            		<xsl:variable name="additional_fonts_">
         | 
| 2259 | 
            -
            			<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = ' | 
| 2263 | 
            +
            			<xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] |       //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
         | 
| 2260 2264 | 
             
            				<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
         | 
| 2261 2265 | 
             
            			</xsl:for-each>
         | 
| 2262 2266 | 
             
            		</xsl:variable>
         | 
| @@ -3361,10 +3365,10 @@ | |
| 3361 3365 |  | 
| 3362 3366 | 
             
            	<xsl:template name="processTablesFigures_Contents">
         | 
| 3363 3367 | 
             
            		<xsl:param name="always"/>
         | 
| 3364 | 
            -
            		<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = ' | 
| 3368 | 
            +
            		<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
         | 
| 3365 3369 | 
             
            			<xsl:call-template name="processTables_Contents"/>
         | 
| 3366 3370 | 
             
            		</xsl:if>
         | 
| 3367 | 
            -
            		<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = ' | 
| 3371 | 
            +
            		<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
         | 
| 3368 3372 | 
             
            			<xsl:call-template name="processFigures_Contents"/>
         | 
| 3369 3373 | 
             
            		</xsl:if>
         | 
| 3370 3374 | 
             
            	</xsl:template>
         | 
| @@ -3708,6 +3712,8 @@ | |
| 3708 3712 | 
             
            								<xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
         | 
| 3709 3713 | 
             
            							</xsl:if>
         | 
| 3710 3714 |  | 
| 3715 | 
            +
            						<xsl:call-template name="setBordersTableArray"/>
         | 
| 3716 | 
            +
             | 
| 3711 3717 | 
             
            					</xsl:element>
         | 
| 3712 3718 | 
             
            				</xsl:variable>
         | 
| 3713 3719 |  | 
| @@ -3852,6 +3858,15 @@ | |
| 3852 3858 |  | 
| 3853 3859 | 
             
            	</xsl:template>
         | 
| 3854 3860 |  | 
| 3861 | 
            +
            	<xsl:template name="setBordersTableArray">
         | 
| 3862 | 
            +
             | 
| 3863 | 
            +
            			<xsl:if test="starts-with(@id, 'array_') or starts-with(ancestor::*[local-name() = 'table'][1]/@id, 'array_')">
         | 
| 3864 | 
            +
            				<!-- array - table without borders -->
         | 
| 3865 | 
            +
            				<xsl:attribute name="border">none</xsl:attribute>
         | 
| 3866 | 
            +
            			</xsl:if>
         | 
| 3867 | 
            +
             | 
| 3868 | 
            +
            	</xsl:template>
         | 
| 3869 | 
            +
             | 
| 3855 3870 | 
             
            	<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
         | 
| 3856 3871 | 
             
            		<xsl:param name="continued"/>
         | 
| 3857 3872 | 
             
            		<xsl:if test="normalize-space() != ''">
         | 
| @@ -4326,6 +4341,8 @@ | |
| 4326 4341 | 
             
            						<fo:table-row>
         | 
| 4327 4342 | 
             
            							<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
         | 
| 4328 4343 |  | 
| 4344 | 
            +
            								<xsl:call-template name="setBordersTableArray"/>
         | 
| 4345 | 
            +
             | 
| 4329 4346 | 
             
            								<!-- fn will be processed inside 'note' processing -->
         | 
| 4330 4347 |  | 
| 4331 4348 | 
             
            									<xsl:if test="../*[local-name()='note']">
         | 
| @@ -4342,6 +4359,7 @@ | |
| 4342 4359 |  | 
| 4343 4360 | 
             
            									<xsl:if test="../*[local-name()='note']">
         | 
| 4344 4361 | 
             
            										<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
         | 
| 4362 | 
            +
            											<xsl:call-template name="setBordersTableArray"/>
         | 
| 4345 4363 | 
             
            											<fo:block font-size="1pt"> </fo:block>
         | 
| 4346 4364 | 
             
            										</fo:block-container>
         | 
| 4347 4365 | 
             
            									</xsl:if>
         | 
| @@ -4457,6 +4475,8 @@ | |
| 4457 4475 | 
             
            	<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
         | 
| 4458 4476 | 
             
            		<fo:table-row xsl:use-attribute-sets="table-header-row-style">
         | 
| 4459 4477 |  | 
| 4478 | 
            +
            			<xsl:call-template name="setBordersTableArray"/>
         | 
| 4479 | 
            +
             | 
| 4460 4480 | 
             
            			<xsl:call-template name="setTableRowAttributes"/>
         | 
| 4461 4481 |  | 
| 4462 4482 | 
             
            			<xsl:apply-templates/>
         | 
| @@ -4480,6 +4500,8 @@ | |
| 4480 4500 | 
             
            				<xsl:attribute name="keep-with-next">always</xsl:attribute>
         | 
| 4481 4501 | 
             
            			</xsl:if>
         | 
| 4482 4502 |  | 
| 4503 | 
            +
            			<xsl:call-template name="setBordersTableArray"/>
         | 
| 4504 | 
            +
             | 
| 4483 4505 | 
             
            			<xsl:call-template name="setTableRowAttributes"/>
         | 
| 4484 4506 | 
             
            			<xsl:apply-templates/>
         | 
| 4485 4507 | 
             
            		</fo:table-row>
         | 
| @@ -4504,6 +4526,8 @@ | |
| 4504 4526 | 
             
            					<xsl:attribute name="font-weight">normal</xsl:attribute>
         | 
| 4505 4527 | 
             
            				</xsl:if>
         | 
| 4506 4528 |  | 
| 4529 | 
            +
            			<xsl:call-template name="setBordersTableArray"/>
         | 
| 4530 | 
            +
             | 
| 4507 4531 | 
             
            			<xsl:if test="$lang = 'ar'">
         | 
| 4508 4532 | 
             
            				<xsl:attribute name="padding-right">1mm</xsl:attribute>
         | 
| 4509 4533 | 
             
            			</xsl:if>
         | 
| @@ -4560,6 +4584,8 @@ | |
| 4560 4584 | 
             
            					<xsl:attribute name="text-align">center</xsl:attribute>
         | 
| 4561 4585 | 
             
            				</xsl:if>
         | 
| 4562 4586 |  | 
| 4587 | 
            +
            			<xsl:call-template name="setBordersTableArray"/>
         | 
| 4588 | 
            +
             | 
| 4563 4589 | 
             
            			<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
         | 
| 4564 4590 | 
             
            				<xsl:attribute name="padding-right">1mm</xsl:attribute>
         | 
| 4565 4591 | 
             
            			</xsl:if>
         | 
| @@ -4614,7 +4640,7 @@ | |
| 4614 4640 | 
             
            		</fn>
         | 
| 4615 4641 | 
             
            	-->
         | 
| 4616 4642 | 
             
            	<!-- footnotes in text (title, bibliography, main body, table's, figure's names), not for tables, figures -->
         | 
| 4617 | 
            -
            	<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name']) | 
| 4643 | 
            +
            	<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" priority="2" name="fn">
         | 
| 4618 4644 |  | 
| 4619 4645 | 
             
            		<!-- list of footnotes to calculate actual footnotes number -->
         | 
| 4620 4646 | 
             
            		<xsl:variable name="p_fn_">
         | 
| @@ -4671,8 +4697,7 @@ | |
| 4671 4697 | 
             
            				</fo:basic-link>
         | 
| 4672 4698 | 
             
            			</fo:inline>
         | 
| 4673 4699 | 
             
            		</xsl:variable>
         | 
| 4674 | 
            -
             | 
| 4675 | 
            -
            		gen_id=<xsl:value-of select="$gen_id"/> -->
         | 
| 4700 | 
            +
             | 
| 4676 4701 | 
             
            		<xsl:choose>
         | 
| 4677 4702 | 
             
            			<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
         | 
| 4678 4703 | 
             
            				<xsl:copy-of select="$footnote_inline"/>
         | 
| @@ -4727,7 +4752,7 @@ | |
| 4727 4752 | 
             
            					<!-- commented:
         | 
| 4728 4753 | 
             
            					 .//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] |
         | 
| 4729 4754 | 
             
            					 because 'fn' there is in biblio-tag -->
         | 
| 4730 | 
            -
            					<xsl:for-each select=".//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name']) | 
| 4755 | 
            +
            					<xsl:for-each select=".//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
         | 
| 4731 4756 | 
             
            						<!-- copy unique fn -->
         | 
| 4732 4757 | 
             
            						<fn gen_id="{generate-id(.)}">
         | 
| 4733 4758 | 
             
            							<xsl:copy-of select="@*"/>
         | 
| @@ -7291,7 +7316,9 @@ | |
| 7291 7316 |  | 
| 7292 7317 | 
             
            									<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
         | 
| 7293 7318 | 
             
            									<xsl:if test="number($scale) < 100">
         | 
| 7294 | 
            -
             | 
| 7319 | 
            +
             | 
| 7320 | 
            +
            												<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
         | 
| 7321 | 
            +
             | 
| 7295 7322 | 
             
            									</xsl:if>
         | 
| 7296 7323 |  | 
| 7297 7324 | 
             
            								</xsl:if>
         | 
| @@ -8228,7 +8255,7 @@ | |
| 8228 8255 | 
             
            	<!-- sourcecode  -->
         | 
| 8229 8256 | 
             
            	<!-- =============== -->
         | 
| 8230 8257 |  | 
| 8231 | 
            -
            	<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = ' | 
| 8258 | 
            +
            	<xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
         | 
| 8232 8259 | 
             
            	<xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
         | 
| 8233 8260 | 
             
            	<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
         | 
| 8234 8261 |  | 
| @@ -8317,6 +8344,12 @@ | |
| 8317 8344 | 
             
            								</xsl:attribute>
         | 
| 8318 8345 | 
             
            							</xsl:for-each>
         | 
| 8319 8346 |  | 
| 8347 | 
            +
            							<!-- remove margin between rows in the table with sourcecode line numbers -->
         | 
| 8348 | 
            +
            							<xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
         | 
| 8349 | 
            +
            								<xsl:attribute name="margin-top">0pt</xsl:attribute>
         | 
| 8350 | 
            +
            								<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
         | 
| 8351 | 
            +
            							</xsl:if>
         | 
| 8352 | 
            +
             | 
| 8320 8353 | 
             
            							<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
         | 
| 8321 8354 | 
             
            						</fo:block>
         | 
| 8322 8355 |  | 
| @@ -8365,7 +8398,7 @@ | |
| 8365 8398 | 
             
            	</xsl:template>
         | 
| 8366 8399 |  | 
| 8367 8400 | 
             
            	<!-- outer table with line numbers for sourcecode -->
         | 
| 8368 | 
            -
            	<xsl:template match="*[local-name()=' | 
| 8401 | 
            +
            	<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] |  -->
         | 
| 8369 8402 | 
             
            		<fo:block>
         | 
| 8370 8403 | 
             
            			<fo:table width="100%" table-layout="fixed">
         | 
| 8371 8404 | 
             
            				<xsl:copy-of select="@id"/>
         | 
| @@ -8377,16 +8410,16 @@ | |
| 8377 8410 | 
             
            			</fo:table>
         | 
| 8378 8411 | 
             
            		</fo:block>
         | 
| 8379 8412 | 
             
            	</xsl:template>
         | 
| 8380 | 
            -
            	<xsl:template match="*[local-name()=' | 
| 8413 | 
            +
            	<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']/*[local-name() = 'tbody']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']/*[local-name() = 'tbody'] |  -->
         | 
| 8381 8414 | 
             
            		<xsl:apply-templates/>
         | 
| 8382 8415 | 
             
            	</xsl:template>
         | 
| 8383 | 
            -
            	<xsl:template match="*[local-name()=' | 
| 8416 | 
            +
            	<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode']//*[local-name()='tr'] |  -->
         | 
| 8384 8417 | 
             
            		<fo:table-row>
         | 
| 8385 8418 | 
             
            			<xsl:apply-templates/>
         | 
| 8386 8419 | 
             
            		</fo:table-row>
         | 
| 8387 8420 | 
             
            	</xsl:template>
         | 
| 8388 8421 | 
             
            	<!-- first td with line numbers -->
         | 
| 8389 | 
            -
            	<xsl:template match="*[local-name()=' | 
| 8422 | 
            +
            	<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']/*[local-name()='td'][not(preceding-sibling::*)]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
         | 
| 8390 8423 | 
             
            		<fo:table-cell>
         | 
| 8391 8424 | 
             
            			<fo:block>
         | 
| 8392 8425 |  | 
| @@ -8406,8 +8439,9 @@ | |
| 8406 8439 | 
             
            			</fo:block>
         | 
| 8407 8440 | 
             
            		</fo:table-cell>
         | 
| 8408 8441 | 
             
            	</xsl:template>
         | 
| 8442 | 
            +
             | 
| 8409 8443 | 
             
            	<!-- second td with sourcecode -->
         | 
| 8410 | 
            -
            	<xsl:template match="*[local-name()=' | 
| 8444 | 
            +
            	<xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
         | 
| 8411 8445 | 
             
            		<fo:table-cell>
         | 
| 8412 8446 | 
             
            			<fo:block>
         | 
| 8413 8447 | 
             
            				<xsl:apply-templates/>
         | 
| @@ -8645,7 +8679,25 @@ | |
| 8645 8679 | 
             
            	<xsl:template match="*[local-name()='pre']" name="pre">
         | 
| 8646 8680 | 
             
            		<fo:block xsl:use-attribute-sets="pre-style">
         | 
| 8647 8681 | 
             
            			<xsl:copy-of select="@id"/>
         | 
| 8648 | 
            -
            			<xsl: | 
| 8682 | 
            +
            			<xsl:choose>
         | 
| 8683 | 
            +
             | 
| 8684 | 
            +
            				<xsl:when test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name()='td'][1][not(preceding-sibling::*)]"> <!-- pre in the first td in the table with @linenums = 'true' -->
         | 
| 8685 | 
            +
            					<xsl:if test="ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']"> <!-- is current tr isn't last -->
         | 
| 8686 | 
            +
            						<xsl:attribute name="margin-top">0pt</xsl:attribute>
         | 
| 8687 | 
            +
            						<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
         | 
| 8688 | 
            +
            					</xsl:if>
         | 
| 8689 | 
            +
            					<fo:instream-foreign-object fox:alt-text="{.}" content-width="95%">
         | 
| 8690 | 
            +
            						<math xmlns="http://www.w3.org/1998/Math/MathML">
         | 
| 8691 | 
            +
            							<mtext><xsl:value-of select="."/></mtext>
         | 
| 8692 | 
            +
            						</math>
         | 
| 8693 | 
            +
            					</fo:instream-foreign-object>
         | 
| 8694 | 
            +
            				</xsl:when>
         | 
| 8695 | 
            +
             | 
| 8696 | 
            +
            				<xsl:otherwise>
         | 
| 8697 | 
            +
            					<xsl:apply-templates/>
         | 
| 8698 | 
            +
            				</xsl:otherwise>
         | 
| 8699 | 
            +
             | 
| 8700 | 
            +
            			</xsl:choose>
         | 
| 8649 8701 | 
             
            		</fo:block>
         | 
| 8650 8702 | 
             
            	</xsl:template>
         | 
| 8651 8703 | 
             
            	<!-- =============== -->
         | 
| @@ -10276,8 +10328,8 @@ | |
| 10276 10328 |  | 
| 10277 10329 | 
             
            	<xsl:variable name="toc_level">
         | 
| 10278 10330 | 
             
            		<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
         | 
| 10279 | 
            -
            		<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = ' | 
| 10280 | 
            -
            		<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = ' | 
| 10331 | 
            +
            		<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels  Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
         | 
| 10332 | 
            +
            		<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
         | 
| 10281 10333 | 
             
            		<xsl:choose>
         | 
| 10282 10334 | 
             
            			<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
         | 
| 10283 10335 | 
             
            			<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when>  <!-- if there is value in xml -->
         | 
| @@ -11268,6 +11320,7 @@ | |
| 11268 11320 | 
             
            			<xsl:choose>
         | 
| 11269 11321 | 
             
            				<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
         | 
| 11270 11322 | 
             
            				<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
         | 
| 11323 | 
            +
            				<xsl:when test="$align = 'justified'">justify</xsl:when>
         | 
| 11271 11324 | 
             
            				<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
         | 
| 11272 11325 | 
             
            				<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
         | 
| 11273 11326 | 
             
            				<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
         | 
| @@ -1316,7 +1316,7 @@ | |
| 1316 1316 | 
             
                  <value>commentaryOf</value>
         | 
| 1317 1317 | 
             
                  <value>hasCommentary</value>
         | 
| 1318 1318 | 
             
                  <value>related</value>
         | 
| 1319 | 
            -
                  <value> | 
| 1319 | 
            +
                  <value>hasComplement</value>
         | 
| 1320 1320 | 
             
                  <value>complementOf</value>
         | 
| 1321 1321 | 
             
                  <value>obsoletes</value>
         | 
| 1322 1322 | 
             
                  <value>obsoletedBy</value>
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: metanorma-iec
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.2. | 
| 4 | 
            +
              version: 2.2.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Ribose Inc.
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2023-01-24 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: metanorma-iso
         |