metanorma-iec 2.7.8 → 2.7.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7eefcc773e3048b7ab34be286c4afa430ca40b7308fd9aea8ff214a9f19f83d
4
- data.tar.gz: dfc318182ef7651aa5c1bc7c19b379674202aabe5ff5937e100207cd43211682
3
+ metadata.gz: bffe3dc7f47a6224338384ab6f340cf8f7aeaeceb35d285b62cd6164b903cf17
4
+ data.tar.gz: 51bf729e3384078f31137aad3ce4957215f8587414773701fbf49f9ece90a8cd
5
5
  SHA512:
6
- metadata.gz: 647149621b1a03d206edbfebbb5b0531382de436c1bbb33d902a8f53a4b1f3fc5626e2e01127b488225917c77fd34c34aa0aba108d7dfc5e4222cf3f4acb0baa
7
- data.tar.gz: 670560402ec2a70e21a802156f1df0a45a99e00a9fc1c15d9654bc0b7ba78b7eb211f6861eae93807e0acf4f622da4770880719c031dcc2160dd6f0bc6efd265
6
+ metadata.gz: 0e590c6b1bee11faf37e90981be854eadf793c85f24973589b497539f881a2b5628896b496592c273fc1f6a692afab578ef4f6addfc5de77066d5f9c8a97219c
7
+ data.tar.gz: b2298ce01b023231d8736215e77c2e6c5d2e95da65dce72436b19ac2490cca1a438fad66851068d5ef059ff730dc942d6b7291a03b6425e07f1807a5a4384b4b
@@ -1823,34 +1823,14 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
1823
1823
  <!-- ====== -->
1824
1824
  <!-- title -->
1825
1825
  <!-- ====== -->
1826
- <xsl:template match="mn:introduction/mn:fmt-title">
1827
- <fo:block font-size="12pt" text-align="center" margin-bottom="12pt" role="H1">
1828
- <xsl:apply-templates/>
1829
- <xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
1830
- </fo:block>
1831
- </xsl:template>
1826
+ <!-- Introduction title text spacing -->
1832
1827
  <xsl:template match="mn:introduction/mn:fmt-title/text()">
1833
1828
  <xsl:call-template name="addLetterSpacing">
1834
1829
  <xsl:with-param name="text" select="."/>
1835
1830
  </xsl:call-template>
1836
1831
  </xsl:template>
1837
1832
 
1838
- <xsl:template match="mn:annex/mn:fmt-title">
1839
- <xsl:call-template name="setNamedDestination"/>
1840
- <fo:block xsl:use-attribute-sets="annex-title-style">
1841
- <xsl:call-template name="refine_annex-title-style"/>
1842
-
1843
- <xsl:apply-templates/>
1844
- <xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
1845
- </fo:block>
1846
- </xsl:template>
1847
-
1848
- <!-- Bibliography -->
1849
- <xsl:template match="mn:references[not(@normative='true')]/mn:fmt-title">
1850
- <fo:block xsl:use-attribute-sets="references-non-normative-title-style">
1851
- <xsl:apply-templates/>
1852
- </fo:block>
1853
- </xsl:template>
1833
+ <!-- Bibliography title text spacing -->
1854
1834
  <xsl:template match="mn:references[not(@normative='true')]/mn:fmt-title/text()">
1855
1835
  <xsl:call-template name="addLetterSpacing">
1856
1836
  <xsl:with-param name="text" select="."/>
@@ -12339,15 +12319,18 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
12339
12319
  <!-- END Admonition -->
12340
12320
  <!-- ================ -->
12341
12321
 
12342
- <xsl:attribute-set name="references-non-normative-title-style">
12322
+ <xsl:attribute-set name="bibliography-title-style">
12343
12323
  <xsl:attribute name="font-size">12pt</xsl:attribute>
12324
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
12344
12325
  <xsl:attribute name="text-align">center</xsl:attribute>
12326
+ <xsl:attribute name="space-before">0pt</xsl:attribute>
12327
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
12345
12328
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
12346
12329
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
12347
12330
  <xsl:attribute name="role">H1</xsl:attribute>
12348
12331
  </xsl:attribute-set>
12349
12332
 
12350
- <xsl:template name="refine_references-non-normative-title-style">
12333
+ <xsl:template name="refine_bibliography-title-style">
12351
12334
  </xsl:template>
12352
12335
 
12353
12336
  <!-- bibitem in Normative References (references/@normative="true") -->
@@ -14459,15 +14442,16 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
14459
14442
  <!-- ===================================== -->
14460
14443
 
14461
14444
  <xsl:attribute-set name="annex-title-style">
14445
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
14462
14446
  <xsl:attribute name="font-size">12pt</xsl:attribute>
14447
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
14463
14448
  <xsl:attribute name="text-align">center</xsl:attribute>
14449
+ <xsl:attribute name="space-before">0</xsl:attribute>
14464
14450
  <xsl:attribute name="margin-bottom">32pt</xsl:attribute>
14465
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
14466
14451
  <xsl:attribute name="role">H1</xsl:attribute>
14467
14452
  </xsl:attribute-set> <!-- annex-title-style -->
14468
14453
 
14469
14454
  <xsl:template name="refine_annex-title-style">
14470
- <!-- <xsl:call-template name="setIDforNamedDestination"/> -->
14471
14455
  </xsl:template>
14472
14456
 
14473
14457
  <xsl:attribute-set name="p-zzSTDTitle1-style">
@@ -14529,6 +14513,15 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
14529
14513
  <xsl:if test="(ancestor::mn:sections and $level = 1) or (ancestor::mn:annex and $level &lt;= 2) or (ancestor::mn:references[not (preceding-sibling::mn:references)])">
14530
14514
  <xsl:attribute name="font-size">11pt</xsl:attribute>
14531
14515
  </xsl:if>
14516
+ <xsl:if test="$level = 1">
14517
+ <xsl:if test="ancestor::mn:introduction">
14518
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
14519
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
14520
+ <xsl:attribute name="text-align">center</xsl:attribute>
14521
+ <xsl:attribute name="space-before">0pt</xsl:attribute>
14522
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
14523
+ </xsl:if>
14524
+ </xsl:if>
14532
14525
  <xsl:if test="$level &gt;= 2">
14533
14526
  <xsl:attribute name="space-before">10pt</xsl:attribute>
14534
14527
  <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
@@ -14544,7 +14537,18 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
14544
14537
  <xsl:attribute name="space-before">5pt</xsl:attribute>
14545
14538
  </xsl:if>
14546
14539
  </xsl:if>
14547
-
14540
+ <xsl:if test="parent::mn:references[not(@normative='true')]"><!-- Bibliography section title -->
14541
+ <xsl:variable name="bibliography_title_styles">
14542
+ <styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
14543
+ </xsl:variable>
14544
+ <xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
14545
+ </xsl:if>
14546
+ <xsl:if test="parent::mn:annex"><!-- Annex title -->
14547
+ <xsl:variable name="annex_title_styles">
14548
+ <styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
14549
+ </xsl:variable>
14550
+ <xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
14551
+ </xsl:if>
14548
14552
  <!-- $namespace = 'iec' -->
14549
14553
  <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
14550
14554
  </xsl:template> <!-- refine_title-style -->
@@ -690,7 +690,7 @@ Examples include GRID, LEI, CrossRef, and Ringgold</a:documentation>
690
690
  <define name="CitationType">
691
691
  <attribute name="bibitemid">
692
692
  <a:documentation>Bibliographic item that the citation applies to, referenced as the anchor of a bibliographic description</a:documentation>
693
- <data type="IDREF"/>
693
+ <ref name="IdRefType"/>
694
694
  </attribute>
695
695
  <choice>
696
696
  <zeroOrMore>
@@ -1296,17 +1296,17 @@ for which this claim of validity is made, if applicable</a:documentation>
1296
1296
  </define>
1297
1297
  <define name="validityBegins">
1298
1298
  <element name="validityBegins">
1299
- <ref name="ISO8601Date"/>
1299
+ <ref name="ISO8601DateTime"/>
1300
1300
  </element>
1301
1301
  </define>
1302
1302
  <define name="validityEnds">
1303
1303
  <element name="validityEnds">
1304
- <ref name="ISO8601Date"/>
1304
+ <ref name="ISO8601DateTime"/>
1305
1305
  </element>
1306
1306
  </define>
1307
1307
  <define name="validityRevision">
1308
1308
  <element name="revision">
1309
- <ref name="ISO8601Date"/>
1309
+ <ref name="ISO8601DateTime"/>
1310
1310
  </element>
1311
1311
  </define>
1312
1312
  <define name="TypedTitleString">
@@ -23,8 +23,11 @@ module Metanorma
23
23
  def metadata_status(node, xml)
24
24
  x = iso_id_default(iso_id_params(node)).stage
25
25
  xml.status do |s|
26
- s.stage x.harmonized_code.stage, **attr_code(abbreviation: x.abbr)
27
- s.substage x.harmonized_code.substage
26
+ add_noko_elem(s, "stage", x.harmonized_code.stage,
27
+ abbreviation: x.abbr)
28
+ # s.stage x.harmonized_code.stage, **attr_code(abbreviation: x.abbr)
29
+ add_noko_elem(s, "substage", x.harmonized_code.substage)
30
+ # s.substage x.harmonized_code.substage
28
31
  end
29
32
  rescue *STAGE_ERROR
30
33
  report_illegal_stage(get_stage(node), get_substage(node))
@@ -88,23 +91,38 @@ module Metanorma
88
91
  end
89
92
 
90
93
  def iso_id_out_common(xml, params, _with_prf)
91
- xml.docidentifier iso_id_default(params).to_s,
92
- **attr_code(type: "ISO", primary: "true")
93
- xml.docidentifier iso_id_reference(params).to_s,
94
- **attr_code(type: "iso-reference")
94
+ add_noko_elem(xml, "docidentifier", iso_id_default(params).to_s,
95
+ type: "ISO", primary: "true")
96
+ # xml.docidentifier iso_id_default(params).to_s,
97
+ # **attr_code(type: "ISO", primary: "true")
98
+ add_noko_elem(xml, "docidentifier", iso_id_reference(params).to_s,
99
+ type: "iso-reference")
100
+ # xml.docidentifier iso_id_reference(params).to_s,
101
+ # **attr_code(type: "iso-reference")
95
102
  @id_revdate and
96
- xml.docidentifier iso_id_revdate(params.merge(year: @id_revdate))
97
- .to_s(with_edition_month_date: true),
98
- **attr_code(type: "iso-revdate")
99
- xml.docidentifier iso_id_reference(params).urn,
100
- **attr_code(type: "URN")
103
+ add_noko_elem(xml, "docidentifier",
104
+ iso_id_revdate(params.merge(year: @id_revdate)).to_s(
105
+ with_edition_month_date: true,
106
+ ),
107
+ type: "iso-revdate")
108
+ # xml.docidentifier iso_id_revdate(params.merge(year: @id_revdate))
109
+ # .to_s(with_edition_month_date: true),
110
+ # **attr_code(type: "iso-revdate")
111
+ add_noko_elem(xml, "docidentifier", iso_id_reference(params).urn,
112
+ type: "URN")
113
+ # xml.docidentifier iso_id_reference(params).urn,
114
+ # **attr_code(type: "URN")
101
115
  end
102
116
 
103
117
  def iso_id_out_non_amd(xml, params, _with_prf)
104
- xml.docidentifier iso_id_undated(params).to_s,
105
- **attr_code(type: "iso-undated")
106
- xml.docidentifier iso_id_with_lang(params).to_s,
107
- **attr_code(type: "iso-with-lang")
118
+ add_noko_elem(xml, "docidentifier", iso_id_undated(params).to_s,
119
+ type: "iso-undated")
120
+ # xml.docidentifier iso_id_undated(params).to_s,
121
+ # **attr_code(type: "iso-undated")
122
+ add_noko_elem(xml, "docidentifier", iso_id_with_lang(params).to_s,
123
+ type: "iso-with-lang")
124
+ # xml.docidentifier iso_id_with_lang(params).to_s,
125
+ # **attr_code(type: "iso-with-lang")
108
126
  end
109
127
 
110
128
  def iso_id_revdate(params)
@@ -158,12 +176,19 @@ module Metanorma
158
176
 
159
177
  def metadata_ext(node, xml)
160
178
  super
161
- a = node.attr("function") and xml.function a
162
- a = node.attr("accessibility-color-inside") and
163
- xml.accessibility_color_inside a
164
- a = node.attr("cen-processing") and xml.cen_processing a
165
- a = node.attr("secretary") and xml.secretary a
166
- a = node.attr("interest-to-committees") and xml.interest_to_committees a
179
+ add_noko_elem(xml, "function", node.attr("function"))
180
+ # a = node.attr("function") and xml.function a
181
+ add_noko_elem(xml, "accessibility_color_inside",
182
+ node.attr("accessibility-color-inside"))
183
+ # a = node.attr("accessibility-color-inside") and
184
+ # xml.accessibility_color_inside a
185
+ add_noko_elem(xml, "cen_processing", node.attr("cen-processing"))
186
+ # a = node.attr("cen-processing") and xml.cen_processing a
187
+ add_noko_elem(xml, "secretary", node.attr("secretary"))
188
+ # a = node.attr("secretary") and xml.secretary a
189
+ add_noko_elem(xml, "interest_to_committees",
190
+ node.attr("interest-to-committees"))
191
+ # a = node.attr("interest-to-committees") and xml.interest_to_committees a
167
192
  end
168
193
  end
169
194
  end
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <!-- VERSION v2.1.3 -->
3
+ <!-- VERSION v2.1.4 -->
4
4
 
5
5
  <!--
6
6
  ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
@@ -905,15 +905,32 @@ titlecase, or lowercase</a:documentation>
905
905
  </element>
906
906
  </define>
907
907
  <define name="image" combine="choice">
908
- <element name="svg">
909
- <a:documentation>Add svg mark up to image</a:documentation>
910
- <oneOrMore>
911
- <choice>
912
- <text/>
913
- <ref name="AnyElement"/>
914
- </choice>
915
- </oneOrMore>
916
- </element>
908
+ <choice>
909
+ <element name="image">
910
+ <ref name="RequiredId"/>
911
+ <ref name="ImageAttributes"/>
912
+ <optional>
913
+ <element name="svg">
914
+ <a:documentation>Allow svg in image/svg, for consistency</a:documentation>
915
+ <oneOrMore>
916
+ <choice>
917
+ <text/>
918
+ <ref name="AnyElement"/>
919
+ </choice>
920
+ </oneOrMore>
921
+ </element>
922
+ </optional>
923
+ </element>
924
+ <element name="svg">
925
+ <a:documentation>Add svg mark up to image</a:documentation>
926
+ <oneOrMore>
927
+ <choice>
928
+ <text/>
929
+ <ref name="AnyElement"/>
930
+ </choice>
931
+ </oneOrMore>
932
+ </element>
933
+ </choice>
917
934
  </define>
918
935
  <define name="ParagraphFnBody" combine="interleave">
919
936
  <ref name="BlockSource">
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.7.8".freeze
3
+ VERSION = "2.7.9".freeze
4
4
  end
5
5
  end
6
6
 
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.7.8
4
+ version: 2.7.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-03 00:00:00.000000000 Z
11
+ date: 2025-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso