metanorma-iec 2.7.8 → 2.7.10

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: 166fc172babb1d1d0faca61bee2ce568fea3fd81b121d70914e6ab93a6b970d6
4
+ data.tar.gz: 98d3ed3445ccfd6990ca0a677d2041076417652c949c48b4eb3e865444309f0f
5
5
  SHA512:
6
- metadata.gz: 647149621b1a03d206edbfebbb5b0531382de436c1bbb33d902a8f53a4b1f3fc5626e2e01127b488225917c77fd34c34aa0aba108d7dfc5e4222cf3f4acb0baa
7
- data.tar.gz: 670560402ec2a70e21a802156f1df0a45a99e00a9fc1c15d9654bc0b7ba78b7eb211f6861eae93807e0acf4f622da4770880719c031dcc2160dd6f0bc6efd265
6
+ metadata.gz: 3e21b51702068630a1d9d59246af61ff7da096a1ef77b8deb8a896b97dd22155e70ebcc4c8d4cfdecff59f256e658580e0f6779bd70e8ed55b0d5284e464f3c5
7
+ data.tar.gz: 3a33cc8d361ea0511310937cccff1f6063313d08682cc066f8d0d64261f9905bdaf158363b93559e1e5927cdbf7c21a684cdbedeb4171bf83551fb820c11de42
@@ -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="."/>
@@ -3428,7 +3408,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
3428
3408
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
3429
3409
  <xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
3430
3410
 
3431
- <xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
3411
+ <xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or (ancestor::mn:tt and ancestor::mn:table and string-length() &gt; 20) or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
3432
3412
 
3433
3413
  <xsl:variable name="parent" select="local-name(..)"/>
3434
3414
 
@@ -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,15 +14537,29 @@ 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 -->
14551
14555
 
14552
14556
  <xsl:template name="processPrefaceSectionsDefault">
14557
+ <xsl:param name="num"/>
14553
14558
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
14554
14559
  <xsl:sort select="@displayorder" data-type="number"/>
14555
- <xsl:apply-templates select="."/>
14560
+ <xsl:apply-templates select=".">
14561
+ <xsl:with-param name="num" select="$num"/>
14562
+ </xsl:apply-templates>
14556
14563
  </xsl:for-each>
14557
14564
  </xsl:template>
14558
14565
 
@@ -466,11 +466,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
466
466
  <a:documentation>Contact information for the organization, including address, phone number, and email</a:documentation>
467
467
  </ref>
468
468
  </optional>
469
- <optional>
469
+ <zeroOrMore>
470
470
  <ref name="logo">
471
471
  <a:documentation>A logo for the organization</a:documentation>
472
472
  </ref>
473
- </optional>
473
+ </zeroOrMore>
474
474
  </define>
475
475
  <define name="orgname">
476
476
  <element name="name">
@@ -502,6 +502,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
502
502
  </define>
503
503
  <define name="logo">
504
504
  <element name="logo">
505
+ <optional>
506
+ <attribute name="type">
507
+ <a:documentation>The type of logo</a:documentation>
508
+ </attribute>
509
+ </optional>
505
510
  <ref name="image-no-id"/>
506
511
  </element>
507
512
  </define>
@@ -513,6 +518,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
513
518
  <a:documentation>Description of what is being depicted</a:documentation>
514
519
  </attribute>
515
520
  </optional>
521
+ <optional>
522
+ <attribute name="type">
523
+ <a:documentation>Description of what kind of depiction this</a:documentation>
524
+ </attribute>
525
+ </optional>
516
526
  <zeroOrMore>
517
527
  <ref name="image-no-id">
518
528
  <a:documentation>A visual depiction of the bibliographic item</a:documentation>
@@ -690,7 +700,7 @@ Examples include GRID, LEI, CrossRef, and Ringgold</a:documentation>
690
700
  <define name="CitationType">
691
701
  <attribute name="bibitemid">
692
702
  <a:documentation>Bibliographic item that the citation applies to, referenced as the anchor of a bibliographic description</a:documentation>
693
- <data type="IDREF"/>
703
+ <ref name="IdRefType"/>
694
704
  </attribute>
695
705
  <choice>
696
706
  <zeroOrMore>
@@ -1236,9 +1246,9 @@ Refer to `BibliographicItem` for definitions</a:documentation>
1236
1246
  <optional>
1237
1247
  <ref name="validity"/>
1238
1248
  </optional>
1239
- <optional>
1249
+ <zeroOrMore>
1240
1250
  <ref name="depiction"/>
1241
- </optional>
1251
+ </zeroOrMore>
1242
1252
  </define>
1243
1253
  <define name="btitle">
1244
1254
  <a:documentation>A title of a bibliographic item, associated with a type of title</a:documentation>
@@ -1296,17 +1306,17 @@ for which this claim of validity is made, if applicable</a:documentation>
1296
1306
  </define>
1297
1307
  <define name="validityBegins">
1298
1308
  <element name="validityBegins">
1299
- <ref name="ISO8601Date"/>
1309
+ <ref name="ISO8601DateTime"/>
1300
1310
  </element>
1301
1311
  </define>
1302
1312
  <define name="validityEnds">
1303
1313
  <element name="validityEnds">
1304
- <ref name="ISO8601Date"/>
1314
+ <ref name="ISO8601DateTime"/>
1305
1315
  </element>
1306
1316
  </define>
1307
1317
  <define name="validityRevision">
1308
1318
  <element name="revision">
1309
- <ref name="ISO8601Date"/>
1319
+ <ref name="ISO8601DateTime"/>
1310
1320
  </element>
1311
1321
  </define>
1312
1322
  <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.5 -->
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.10".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.10
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-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso