metanorma-iec 2.4.1 → 2.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iec/iec.international-standard.xsl +117 -16
- data/lib/isodoc/iec/init.rb +5 -0
- data/lib/isodoc/iec/presentation_xml_convert.rb +2 -6
- data/lib/metanorma/iec/biblio.rng +28 -25
- data/lib/metanorma/iec/front.rb +4 -4
- data/lib/metanorma/iec/version.rb +1 -1
- data/metanorma-iec.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67f13ed076d84721e934f89543ebd35bfb61dcde9a119fb1a74a6c37972ae638
|
4
|
+
data.tar.gz: 3c6d285ba5b25b7ede8fe587eb12634cc41a3bfde605f544480def7d7ddbf5ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12f7b8b241864d2c4ab78ca9862bf51b5d6a070959cce22501793e0709f06d37b21283e3b5447d942f21cf9a37dc61a293698e7a373b744d1774679ff812b530
|
7
|
+
data.tar.gz: 6dc3974076f9f24f247c1007e71d9eee1202bd96bdc89cf04cc900e48b137eb4870aee233461134d5ab29e8938238cb0bda7bea2ac806777d32bfc5cd91ac760
|
@@ -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>
|
@@ -2110,6 +2116,8 @@
|
|
2110
2116
|
<xsl:param name="svg_images"/> <!-- svg images array -->
|
2111
2117
|
<xsl:variable name="images" select="document($svg_images)"/>
|
2112
2118
|
<xsl:param name="basepath"/> <!-- base path for images -->
|
2119
|
+
<xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
|
2120
|
+
<xsl:param name="inputxml_filename"/> <!-- input xml file name -->
|
2113
2121
|
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
2114
2122
|
<xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
|
2115
2123
|
<xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
|
@@ -2162,6 +2170,20 @@
|
|
2162
2170
|
<xsl:call-template name="getLang"/>
|
2163
2171
|
</xsl:variable>
|
2164
2172
|
|
2173
|
+
<xsl:variable name="inputxml_filename_prefix">
|
2174
|
+
<xsl:choose>
|
2175
|
+
<xsl:when test="contains($inputxml_filename, '.presentation.xml')">
|
2176
|
+
<xsl:value-of select="substring-before($inputxml_filename, '.presentation.xml')"/>
|
2177
|
+
</xsl:when>
|
2178
|
+
<xsl:when test="contains($inputxml_filename, '.xml')">
|
2179
|
+
<xsl:value-of select="substring-before($inputxml_filename, '.xml')"/>
|
2180
|
+
</xsl:when>
|
2181
|
+
<xsl:otherwise>
|
2182
|
+
<xsl:value-of select="$inputxml_filename"/>
|
2183
|
+
</xsl:otherwise>
|
2184
|
+
</xsl:choose>
|
2185
|
+
</xsl:variable>
|
2186
|
+
|
2165
2187
|
<!-- Note 1: Each xslt has declated variable `namespace` that allows to set some properties, processing logic, etc. for concrete xslt.
|
2166
2188
|
You can put such conditions by using xslt construction `xsl:if test="..."` or <xsl:choose><xsl:when test=""></xsl:when><xsl:otherwiste></xsl:otherwiste></xsl:choose>,
|
2167
2189
|
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 -->
|
@@ -2630,6 +2652,10 @@
|
|
2630
2652
|
|
2631
2653
|
</xsl:attribute-set>
|
2632
2654
|
|
2655
|
+
<xsl:template name="refine_termexample-style">
|
2656
|
+
|
2657
|
+
</xsl:template>
|
2658
|
+
|
2633
2659
|
<xsl:attribute-set name="example-style">
|
2634
2660
|
|
2635
2661
|
<xsl:attribute name="space-before">8pt</xsl:attribute>
|
@@ -3119,6 +3145,10 @@
|
|
3119
3145
|
|
3120
3146
|
</xsl:attribute-set>
|
3121
3147
|
|
3148
|
+
<xsl:template name="refine_figure-block-style">
|
3149
|
+
|
3150
|
+
</xsl:template>
|
3151
|
+
|
3122
3152
|
<xsl:attribute-set name="figure-style">
|
3123
3153
|
|
3124
3154
|
</xsl:attribute-set>
|
@@ -3804,6 +3834,36 @@
|
|
3804
3834
|
</xsl:for-each>
|
3805
3835
|
</xsl:template>
|
3806
3836
|
|
3837
|
+
<xsl:template name="processMainSectionsDefault_flatxml">
|
3838
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
3839
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3840
|
+
<xsl:variable name="flatxml">
|
3841
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
3842
|
+
</xsl:variable>
|
3843
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
3844
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
3845
|
+
|
3846
|
+
</xsl:for-each>
|
3847
|
+
|
3848
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
3849
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3850
|
+
<xsl:variable name="flatxml">
|
3851
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
3852
|
+
</xsl:variable>
|
3853
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
3854
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
3855
|
+
</xsl:for-each>
|
3856
|
+
|
3857
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
3858
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3859
|
+
<xsl:variable name="flatxml">
|
3860
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
3861
|
+
</xsl:variable>
|
3862
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
3863
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
3864
|
+
</xsl:for-each>
|
3865
|
+
</xsl:template>
|
3866
|
+
|
3807
3867
|
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
3808
3868
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
|
3809
3869
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
|
@@ -4034,7 +4094,7 @@
|
|
4034
4094
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
4035
4095
|
|
4036
4096
|
<xsl:variable name="colwidths">
|
4037
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
4097
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col']) and not(@class = 'dl')">
|
4038
4098
|
<xsl:call-template name="calculate-column-widths">
|
4039
4099
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
4040
4100
|
<xsl:with-param name="table" select="$simple-table"/>
|
@@ -4146,6 +4206,11 @@
|
|
4146
4206
|
<fo:table-column column-width="{@width}"/>
|
4147
4207
|
</xsl:for-each>
|
4148
4208
|
</xsl:when>
|
4209
|
+
<xsl:when test="@class = 'dl'">
|
4210
|
+
<xsl:for-each select=".//*[local-name()='tr'][1]/*">
|
4211
|
+
<fo:table-column column-width="{@width}"/>
|
4212
|
+
</xsl:for-each>
|
4213
|
+
</xsl:when>
|
4149
4214
|
<xsl:otherwise>
|
4150
4215
|
<xsl:call-template name="insertTableColumnWidth">
|
4151
4216
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
@@ -5494,6 +5559,7 @@
|
|
5494
5559
|
<!-- ===================== -->
|
5495
5560
|
<!-- Definition List -->
|
5496
5561
|
<!-- ===================== -->
|
5562
|
+
|
5497
5563
|
<xsl:template match="*[local-name()='dl']">
|
5498
5564
|
<xsl:variable name="isAdded" select="@added"/>
|
5499
5565
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -5713,10 +5779,21 @@
|
|
5713
5779
|
</xsl:variable>
|
5714
5780
|
|
5715
5781
|
<xsl:variable name="colwidths">
|
5716
|
-
<xsl:
|
5717
|
-
|
5718
|
-
<xsl:
|
5719
|
-
|
5782
|
+
<xsl:choose>
|
5783
|
+
<!-- dl from table[@class='dl'] -->
|
5784
|
+
<xsl:when test="*[local-name() = 'colgroup']">
|
5785
|
+
<autolayout/>
|
5786
|
+
<xsl:for-each select="*[local-name() = 'colgroup']/*[local-name() = 'col']">
|
5787
|
+
<column><xsl:value-of select="translate(@width,'%m','')"/></column>
|
5788
|
+
</xsl:for-each>
|
5789
|
+
</xsl:when>
|
5790
|
+
<xsl:otherwise>
|
5791
|
+
<xsl:call-template name="calculate-column-widths">
|
5792
|
+
<xsl:with-param name="cols-count" select="2"/>
|
5793
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
5794
|
+
</xsl:call-template>
|
5795
|
+
</xsl:otherwise>
|
5796
|
+
</xsl:choose>
|
5720
5797
|
</xsl:variable>
|
5721
5798
|
|
5722
5799
|
<!-- <xsl:text disable-output-escaping="yes"><!- -</xsl:text>
|
@@ -5967,13 +6044,13 @@
|
|
5967
6044
|
<tr>
|
5968
6045
|
<td>
|
5969
6046
|
<xsl:attribute name="id">
|
5970
|
-
<xsl:value-of select="concat($id,'
|
6047
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
|
5971
6048
|
</xsl:attribute>
|
5972
6049
|
<xsl:apply-templates/>
|
5973
6050
|
</td>
|
5974
6051
|
<td>
|
5975
6052
|
<xsl:attribute name="id">
|
5976
|
-
<xsl:value-of select="concat($id,'
|
6053
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
|
5977
6054
|
</xsl:attribute>
|
5978
6055
|
|
5979
6056
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
|
@@ -6655,6 +6732,10 @@
|
|
6655
6732
|
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
6656
6733
|
</xsl:template>
|
6657
6734
|
|
6735
|
+
<xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
|
6736
|
+
<xsl:value-of select="."/>
|
6737
|
+
</xsl:template>
|
6738
|
+
|
6658
6739
|
<!-- ========================= -->
|
6659
6740
|
<!-- END Rich text formatting -->
|
6660
6741
|
<!-- ========================= -->
|
@@ -7285,7 +7366,7 @@
|
|
7285
7366
|
</xsl:choose>
|
7286
7367
|
</xsl:variable>
|
7287
7368
|
<xsl:attribute name="id">
|
7288
|
-
<xsl:value-of select="concat($id,'
|
7369
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
|
7289
7370
|
</xsl:attribute>
|
7290
7371
|
|
7291
7372
|
<xsl:for-each select="*[local-name() = 'p']">
|
@@ -7293,7 +7374,7 @@
|
|
7293
7374
|
<xsl:copy-of select="@*"/>
|
7294
7375
|
<xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
|
7295
7376
|
<xsl:attribute name="id">
|
7296
|
-
<xsl:value-of select="concat($id,'
|
7377
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
|
7297
7378
|
</xsl:attribute>
|
7298
7379
|
|
7299
7380
|
<!-- <xsl:copy-of select="node()" /> -->
|
@@ -7357,7 +7438,7 @@
|
|
7357
7438
|
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
|
7358
7439
|
<xsl:copy>
|
7359
7440
|
<xsl:attribute name="id">
|
7360
|
-
<xsl:value-of select="concat($id,'
|
7441
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
|
7361
7442
|
</xsl:attribute>
|
7362
7443
|
<xsl:copy-of select="node()"/>
|
7363
7444
|
</xsl:copy>
|
@@ -7884,6 +7965,12 @@
|
|
7884
7965
|
<xsl:when test="@updatetype = 'true'">
|
7885
7966
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
7886
7967
|
</xsl:when>
|
7968
|
+
<xsl:when test="contains(@target, concat('_', $inputxml_filename_prefix, '_attachments'))">
|
7969
|
+
<!-- link to the PDF attachment -->
|
7970
|
+
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
7971
|
+
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
7972
|
+
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
7973
|
+
</xsl:when>
|
7887
7974
|
<xsl:otherwise>
|
7888
7975
|
<xsl:value-of select="normalize-space(@target)"/>
|
7889
7976
|
</xsl:otherwise>
|
@@ -8291,6 +8378,7 @@
|
|
8291
8378
|
<xsl:variable name="isAdded" select="@added"/>
|
8292
8379
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
8293
8380
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
8381
|
+
<xsl:call-template name="refine_figure-block-style"/>
|
8294
8382
|
|
8295
8383
|
<xsl:call-template name="setTrackChangesStyles">
|
8296
8384
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
@@ -10173,7 +10261,7 @@
|
|
10173
10261
|
<!-- ====== -->
|
10174
10262
|
<xsl:template match="*[local-name() = 'termexample']">
|
10175
10263
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
10176
|
-
|
10264
|
+
<xsl:call-template name="refine_termexample-style"/>
|
10177
10265
|
<xsl:call-template name="setBlockSpanAll"/>
|
10178
10266
|
|
10179
10267
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
@@ -12675,10 +12763,10 @@
|
|
12675
12763
|
|
12676
12764
|
<xsl:template name="addPDFUAmeta">
|
12677
12765
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
12678
|
-
|
12679
|
-
|
12680
|
-
|
12681
|
-
|
12766
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
12767
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
12768
|
+
</pdf:dictionary>
|
12769
|
+
</pdf:catalog>
|
12682
12770
|
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
12683
12771
|
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
12684
12772
|
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
@@ -12730,6 +12818,19 @@
|
|
12730
12818
|
</rdf:Description>
|
12731
12819
|
</rdf:RDF>
|
12732
12820
|
</x:xmpmeta>
|
12821
|
+
<!-- add attachments -->
|
12822
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
12823
|
+
<xsl:choose>
|
12824
|
+
<xsl:when test="normalize-space() != ''">
|
12825
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{.}" filename="{@name}"/>
|
12826
|
+
</xsl:when>
|
12827
|
+
<xsl:otherwise>
|
12828
|
+
<!-- _{filename}_attachments -->
|
12829
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath, '_', $inputxml_filename_prefix, '_attachments', '/', @name, ')')"/>
|
12830
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{@name}"/>
|
12831
|
+
</xsl:otherwise>
|
12832
|
+
</xsl:choose>
|
12833
|
+
</xsl:for-each>
|
12733
12834
|
</xsl:template> <!-- addPDFUAmeta -->
|
12734
12835
|
|
12735
12836
|
<xsl:template name="getId">
|
data/lib/isodoc/iec/init.rb
CHANGED
@@ -21,6 +21,11 @@ module IsoDoc
|
|
21
21
|
i18nyaml: i18nyaml || @i18nyaml)
|
22
22
|
end
|
23
23
|
|
24
|
+
def bibrenderer
|
25
|
+
::Relaton::Render::Iec::General.new(options.merge(language: @lang,
|
26
|
+
i18nhash: @i18n.get))
|
27
|
+
end
|
28
|
+
|
24
29
|
def convert1(docxml, filename, dir)
|
25
30
|
id = docxml&.at(ns("//bibdata/docnumber"))&.text
|
26
31
|
@is_iev = id == "60050"
|
@@ -50,11 +50,6 @@ module IsoDoc
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
def bibrenderer
|
54
|
-
::Relaton::Render::Iec::General.new(language: @lang,
|
55
|
-
i18nhash: @i18n.get)
|
56
|
-
end
|
57
|
-
|
58
53
|
def rearrange_clauses(docxml)
|
59
54
|
insert_foreword(docxml) # feeds preface_rearrange
|
60
55
|
super
|
@@ -84,10 +79,11 @@ module IsoDoc
|
|
84
79
|
<p class="zzSTDTitle1"> </p>
|
85
80
|
<p class="zzSTDTitle2"><strong>#{title2}</strong></p>
|
86
81
|
OUTPUT
|
82
|
+
title1 &&= Metanorma::Utils.case_transform_xml(title1, :upcase)
|
87
83
|
ins.next = <<~OUTPUT
|
88
84
|
<pagebreak/><p class="zzSTDTitle1">#{@i18n.get['IEC']}</p>
|
89
85
|
<p class="zzSTDTitle1">____________</p><p class="zzSTDTitle1"> </p>
|
90
|
-
<p class="zzSTDTitle1"><strong>#{title1
|
86
|
+
<p class="zzSTDTitle1"><strong>#{title1}</strong></p>#{title2out}
|
91
87
|
<p class="zzSTDTitle1"> </p>
|
92
88
|
OUTPUT
|
93
89
|
end
|
@@ -338,29 +338,32 @@
|
|
338
338
|
</define>
|
339
339
|
<define name="organization">
|
340
340
|
<element name="organization">
|
341
|
-
<
|
342
|
-
<ref name="orgname"/>
|
343
|
-
</oneOrMore>
|
344
|
-
<zeroOrMore>
|
345
|
-
<ref name="subdivision"/>
|
346
|
-
</zeroOrMore>
|
347
|
-
<optional>
|
348
|
-
<ref name="abbreviation"/>
|
349
|
-
</optional>
|
350
|
-
<zeroOrMore>
|
351
|
-
<ref name="uri"/>
|
352
|
-
</zeroOrMore>
|
353
|
-
<zeroOrMore>
|
354
|
-
<ref name="org-identifier"/>
|
355
|
-
</zeroOrMore>
|
356
|
-
<zeroOrMore>
|
357
|
-
<ref name="contact"/>
|
358
|
-
</zeroOrMore>
|
359
|
-
<optional>
|
360
|
-
<ref name="logo"/>
|
361
|
-
</optional>
|
341
|
+
<ref name="OrganizationType"/>
|
362
342
|
</element>
|
363
343
|
</define>
|
344
|
+
<define name="OrganizationType">
|
345
|
+
<oneOrMore>
|
346
|
+
<ref name="orgname"/>
|
347
|
+
</oneOrMore>
|
348
|
+
<zeroOrMore>
|
349
|
+
<ref name="subdivision"/>
|
350
|
+
</zeroOrMore>
|
351
|
+
<optional>
|
352
|
+
<ref name="abbreviation"/>
|
353
|
+
</optional>
|
354
|
+
<zeroOrMore>
|
355
|
+
<ref name="uri"/>
|
356
|
+
</zeroOrMore>
|
357
|
+
<zeroOrMore>
|
358
|
+
<ref name="org-identifier"/>
|
359
|
+
</zeroOrMore>
|
360
|
+
<zeroOrMore>
|
361
|
+
<ref name="contact"/>
|
362
|
+
</zeroOrMore>
|
363
|
+
<optional>
|
364
|
+
<ref name="logo"/>
|
365
|
+
</optional>
|
366
|
+
</define>
|
364
367
|
<define name="orgname">
|
365
368
|
<element name="name">
|
366
369
|
<choice>
|
@@ -371,10 +374,10 @@
|
|
371
374
|
</define>
|
372
375
|
<define name="subdivision">
|
373
376
|
<element name="subdivision">
|
374
|
-
<
|
375
|
-
<
|
376
|
-
|
377
|
-
|
377
|
+
<optional>
|
378
|
+
<attribute name="type"/>
|
379
|
+
</optional>
|
380
|
+
<ref name="OrganizationType"/>
|
378
381
|
</element>
|
379
382
|
</define>
|
380
383
|
<define name="logo">
|
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.3"
|
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.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: 2024-
|
11
|
+
date: 2024-03-04 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.3
|
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.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pubid-iec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|