metanorma-iec 2.4.1 → 2.4.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10177bc4adcd772657e975fa25b6291c9bc160c5305f6de3771dca5165376958
|
4
|
+
data.tar.gz: 3e8e6457114391eab0741c6835962f8971a1d7c4895538c815372e6dc38aef80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a7d53c37f35af53686200f67f136562922c1ddecd44526782e25ba244939c5860956aceda69a2c4458d80d58e5a5aeb4e6d548d4a5cb3846f18b04665a81997
|
7
|
+
data.tar.gz: e6bd168b98945bae77c74f348cacfb4ee20f81860cff0c6f8b3e4a6608a3e2372a726fc303069add01c99414da251d3ac527ee5b2ee8a7acc842c7be0073016a
|
@@ -1018,7 +1018,13 @@
|
|
1018
1018
|
</xsl:call-template>
|
1019
1019
|
<xsl:text> </xsl:text>
|
1020
1020
|
<fo:inline>
|
1021
|
-
<xsl:variable name="
|
1021
|
+
<xsl:variable name="edition_" select="normalize-space(//iec:iec-standard/iec:bibdata/iec:edition[normalize-space(@language) = ''])"/>
|
1022
|
+
<xsl:variable name="edition">
|
1023
|
+
<xsl:choose>
|
1024
|
+
<xsl:when test="$edition_ = ''">1</xsl:when>
|
1025
|
+
<xsl:otherwise><xsl:value-of select="$edition_"/></xsl:otherwise>
|
1026
|
+
</xsl:choose>
|
1027
|
+
</xsl:variable>
|
1022
1028
|
<xsl:value-of select="$edition"/>
|
1023
1029
|
<xsl:if test="not(contains($edition, '.'))">.0</xsl:if>
|
1024
1030
|
</fo:inline>
|
@@ -2630,6 +2636,10 @@
|
|
2630
2636
|
|
2631
2637
|
</xsl:attribute-set>
|
2632
2638
|
|
2639
|
+
<xsl:template name="refine_termexample-style">
|
2640
|
+
|
2641
|
+
</xsl:template>
|
2642
|
+
|
2633
2643
|
<xsl:attribute-set name="example-style">
|
2634
2644
|
|
2635
2645
|
<xsl:attribute name="space-before">8pt</xsl:attribute>
|
@@ -3804,6 +3814,36 @@
|
|
3804
3814
|
</xsl:for-each>
|
3805
3815
|
</xsl:template>
|
3806
3816
|
|
3817
|
+
<xsl:template name="processMainSectionsDefault_flatxml">
|
3818
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
3819
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3820
|
+
<xsl:variable name="flatxml">
|
3821
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
3822
|
+
</xsl:variable>
|
3823
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
3824
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
3825
|
+
|
3826
|
+
</xsl:for-each>
|
3827
|
+
|
3828
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
3829
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3830
|
+
<xsl:variable name="flatxml">
|
3831
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
3832
|
+
</xsl:variable>
|
3833
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
3834
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
3835
|
+
</xsl:for-each>
|
3836
|
+
|
3837
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
3838
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3839
|
+
<xsl:variable name="flatxml">
|
3840
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
3841
|
+
</xsl:variable>
|
3842
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
3843
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
3844
|
+
</xsl:for-each>
|
3845
|
+
</xsl:template>
|
3846
|
+
|
3807
3847
|
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
3808
3848
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
|
3809
3849
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
|
@@ -5967,13 +6007,13 @@
|
|
5967
6007
|
<tr>
|
5968
6008
|
<td>
|
5969
6009
|
<xsl:attribute name="id">
|
5970
|
-
<xsl:value-of select="concat($id,'
|
6010
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
|
5971
6011
|
</xsl:attribute>
|
5972
6012
|
<xsl:apply-templates/>
|
5973
6013
|
</td>
|
5974
6014
|
<td>
|
5975
6015
|
<xsl:attribute name="id">
|
5976
|
-
<xsl:value-of select="concat($id,'
|
6016
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
|
5977
6017
|
</xsl:attribute>
|
5978
6018
|
|
5979
6019
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
|
@@ -6655,6 +6695,10 @@
|
|
6655
6695
|
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
6656
6696
|
</xsl:template>
|
6657
6697
|
|
6698
|
+
<xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
|
6699
|
+
<xsl:value-of select="."/>
|
6700
|
+
</xsl:template>
|
6701
|
+
|
6658
6702
|
<!-- ========================= -->
|
6659
6703
|
<!-- END Rich text formatting -->
|
6660
6704
|
<!-- ========================= -->
|
@@ -7285,7 +7329,7 @@
|
|
7285
7329
|
</xsl:choose>
|
7286
7330
|
</xsl:variable>
|
7287
7331
|
<xsl:attribute name="id">
|
7288
|
-
<xsl:value-of select="concat($id,'
|
7332
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
|
7289
7333
|
</xsl:attribute>
|
7290
7334
|
|
7291
7335
|
<xsl:for-each select="*[local-name() = 'p']">
|
@@ -7293,7 +7337,7 @@
|
|
7293
7337
|
<xsl:copy-of select="@*"/>
|
7294
7338
|
<xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
|
7295
7339
|
<xsl:attribute name="id">
|
7296
|
-
<xsl:value-of select="concat($id,'
|
7340
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
|
7297
7341
|
</xsl:attribute>
|
7298
7342
|
|
7299
7343
|
<!-- <xsl:copy-of select="node()" /> -->
|
@@ -7357,7 +7401,7 @@
|
|
7357
7401
|
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
|
7358
7402
|
<xsl:copy>
|
7359
7403
|
<xsl:attribute name="id">
|
7360
|
-
<xsl:value-of select="concat($id,'
|
7404
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
|
7361
7405
|
</xsl:attribute>
|
7362
7406
|
<xsl:copy-of select="node()"/>
|
7363
7407
|
</xsl:copy>
|
@@ -10173,7 +10217,7 @@
|
|
10173
10217
|
<!-- ====== -->
|
10174
10218
|
<xsl:template match="*[local-name() = 'termexample']">
|
10175
10219
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
10176
|
-
|
10220
|
+
<xsl:call-template name="refine_termexample-style"/>
|
10177
10221
|
<xsl:call-template name="setBlockSpanAll"/>
|
10178
10222
|
|
10179
10223
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
@@ -84,10 +84,11 @@ module IsoDoc
|
|
84
84
|
<p class="zzSTDTitle1"> </p>
|
85
85
|
<p class="zzSTDTitle2"><strong>#{title2}</strong></p>
|
86
86
|
OUTPUT
|
87
|
+
title1 &&= Metanorma::Utils.case_transform_xml(title1, :upcase)
|
87
88
|
ins.next = <<~OUTPUT
|
88
89
|
<pagebreak/><p class="zzSTDTitle1">#{@i18n.get['IEC']}</p>
|
89
90
|
<p class="zzSTDTitle1">____________</p><p class="zzSTDTitle1"> </p>
|
90
|
-
<p class="zzSTDTitle1"><strong>#{title1
|
91
|
+
<p class="zzSTDTitle1"><strong>#{title1}</strong></p>#{title2out}
|
91
92
|
<p class="zzSTDTitle1"> </p>
|
92
93
|
OUTPUT
|
93
94
|
end
|
data/lib/metanorma/iec/front.rb
CHANGED
@@ -63,9 +63,9 @@ module Metanorma
|
|
63
63
|
type: get_typeabbr(node),
|
64
64
|
edition: node.attr("edition"), publisher: pub[0],
|
65
65
|
unpublished: /^[0-5]/.match?(get_stage(node)),
|
66
|
-
copublisher: pub[1..-1] }
|
66
|
+
copublisher: pub[1..-1] }
|
67
67
|
ret[:copublisher].empty? and ret.delete(:copublisher)
|
68
|
-
ret
|
68
|
+
compact_blank(ret)
|
69
69
|
end
|
70
70
|
|
71
71
|
def iso_id_stage(node)
|
@@ -143,11 +143,11 @@ module Metanorma
|
|
143
143
|
@id_revdate = node.attr("revdate")
|
144
144
|
ret = { number: node.attr("amendment-number") ||
|
145
145
|
node.attr("corrigendum-number"),
|
146
|
-
year: iso_id_year(node) }
|
146
|
+
year: iso_id_year(node) }
|
147
147
|
if stage && !cen?(node.attr("publisher"))
|
148
148
|
ret[:stage] = stage
|
149
149
|
end
|
150
|
-
ret
|
150
|
+
compact_blank(ret)
|
151
151
|
end
|
152
152
|
|
153
153
|
def report_illegal_stage(stage, substage)
|
data/metanorma-iec.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
31
31
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
32
32
|
|
33
|
-
spec.add_dependency "metanorma-iso", "~> 2.7.
|
33
|
+
spec.add_dependency "metanorma-iso", "~> 2.7.2"
|
34
34
|
spec.add_dependency "pubid-iec"
|
35
35
|
spec.add_dependency "ruby-jing"
|
36
36
|
|
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.4.
|
4
|
+
version: 2.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-iso
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.7.
|
19
|
+
version: 2.7.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.7.
|
26
|
+
version: 2.7.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pubid-iec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|