metanorma-iho 1.2.8 → 1.2.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: 30da89e6d9b659db533ad837527513e9904905288a505c16bc049431f7e385f5
4
- data.tar.gz: 4b5292a9cfd07d358be2fe89454cb348255db4b9ceefd641284cf484c8aadac5
3
+ metadata.gz: 047b8afa4d2bda12e9646e698b9e6438b92d41a58d0642fdb266373f33155beb
4
+ data.tar.gz: 4954543c60c106353afb7395d878cfc0d4c62c8e7061b0d1fab9fc92a32b72b7
5
5
  SHA512:
6
- metadata.gz: 7f4565efcbf7454fa2ebb9d6e59d6b2a73da106dcd8c3157dac367d0a3ac18f28568a874ab571c6c2eb9494bfe1ba38466d9a904b237709770488e92eaeeb368
7
- data.tar.gz: d618eb6dfc45a401e92f542e030a2bb66aaf920c1b780b421047fd602addc3e6e1678ea6d1e1c530f3f460f57cc4ff3b94570a1a49e2bac9bf4765533a616be1
6
+ metadata.gz: 0b4d225989bd269accff32f96177a9e7912313e51bf5b6d54a523ecfbbd6c0082102d9bbf7b90f8d28e1047c17d757ca584a2b1d5ca0445f32f623226236e695
7
+ data.tar.gz: 20e85c84ff5e1f6ecc6bcc4d4da523384516e76d6aaba46620fff1e31cfa8b29e894810e643abb9ec9ddfd6b59bccd14aa1276907393666b5fe4816689136d32
@@ -921,25 +921,6 @@
921
921
  <!-- title -->
922
922
  <!-- ====== -->
923
923
 
924
- <xsl:template match="mn:annex/mn:fmt-title" name="annex_title">
925
- <fo:block xsl:use-attribute-sets="annex-title-style">
926
-
927
- <xsl:call-template name="refine_annex-title-style"/>
928
-
929
- <xsl:apply-templates/>
930
- <xsl:apply-templates select="following-sibling::*[1][mn:variant-title][@type = 'sub']" mode="subtitle"/>
931
- </fo:block>
932
- </xsl:template>
933
-
934
- <xsl:template match="mn:bibliography/mn:references[not(@normative='true')]/mn:fmt-title">
935
- <fo:block xsl:use-attribute-sets="references-non-normative-title-style">
936
-
937
- <xsl:call-template name="refine_references-non-normative-title-style"/>
938
-
939
- <xsl:apply-templates/>
940
- </fo:block>
941
- </xsl:template>
942
-
943
924
  <xsl:template match="mn:clause" priority="3">
944
925
  <xsl:if test="parent::mn:preface or (parent::mn:page_sequence and local-name(../..) = 'preface')">
945
926
  <fo:block break-after="page"/>
@@ -11316,7 +11297,7 @@
11316
11297
  <!-- END Admonition -->
11317
11298
  <!-- ================ -->
11318
11299
 
11319
- <xsl:attribute-set name="references-non-normative-title-style">
11300
+ <xsl:attribute-set name="bibliography-title-style">
11320
11301
  <xsl:attribute name="font-size">16pt</xsl:attribute>
11321
11302
  <xsl:attribute name="font-weight">bold</xsl:attribute>
11322
11303
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -11326,7 +11307,7 @@
11326
11307
  <xsl:attribute name="role">H1</xsl:attribute>
11327
11308
  </xsl:attribute-set>
11328
11309
 
11329
- <xsl:template name="refine_references-non-normative-title-style">
11310
+ <xsl:template name="refine_bibliography-title-style">
11330
11311
  </xsl:template>
11331
11312
 
11332
11313
  <!-- bibitem in Normative References (references/@normative="true") -->
@@ -13439,11 +13420,12 @@
13439
13420
  <!-- ===================================== -->
13440
13421
 
13441
13422
  <xsl:attribute-set name="annex-title-style">
13423
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
13442
13424
  <xsl:attribute name="font-size">12pt</xsl:attribute>
13443
13425
  <xsl:attribute name="font-weight">bold</xsl:attribute>
13444
13426
  <xsl:attribute name="text-align">center</xsl:attribute>
13427
+ <xsl:attribute name="space-before">0</xsl:attribute>
13445
13428
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13446
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
13447
13429
  <xsl:attribute name="role">H1</xsl:attribute>
13448
13430
  </xsl:attribute-set> <!-- annex-title-style -->
13449
13431
 
@@ -13559,6 +13541,20 @@
13559
13541
  <xsl:if test="../@id = '_document_history' or . = 'Document History'">
13560
13542
  <xsl:attribute name="text-align">center</xsl:attribute>
13561
13543
  </xsl:if>
13544
+
13545
+ <xsl:if test="parent::mn:annex"><!-- Annex title -->
13546
+ <xsl:variable name="annex_title_styles">
13547
+ <styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
13548
+ </xsl:variable>
13549
+ <xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
13550
+ </xsl:if>
13551
+
13552
+ <xsl:if test="parent::mn:references[not(@normative='true')] and ancestor::mn:bibliography">
13553
+ <xsl:variable name="bibliography_title_styles">
13554
+ <styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
13555
+ </xsl:variable>
13556
+ <xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
13557
+ </xsl:if>
13562
13558
  <!-- $namespace = 'iho' -->
13563
13559
  <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
13564
13560
  </xsl:template> <!-- refine_title-style -->
@@ -921,25 +921,6 @@
921
921
  <!-- title -->
922
922
  <!-- ====== -->
923
923
 
924
- <xsl:template match="mn:annex/mn:fmt-title" name="annex_title">
925
- <fo:block xsl:use-attribute-sets="annex-title-style">
926
-
927
- <xsl:call-template name="refine_annex-title-style"/>
928
-
929
- <xsl:apply-templates/>
930
- <xsl:apply-templates select="following-sibling::*[1][mn:variant-title][@type = 'sub']" mode="subtitle"/>
931
- </fo:block>
932
- </xsl:template>
933
-
934
- <xsl:template match="mn:bibliography/mn:references[not(@normative='true')]/mn:fmt-title">
935
- <fo:block xsl:use-attribute-sets="references-non-normative-title-style">
936
-
937
- <xsl:call-template name="refine_references-non-normative-title-style"/>
938
-
939
- <xsl:apply-templates/>
940
- </fo:block>
941
- </xsl:template>
942
-
943
924
  <xsl:template match="mn:clause" priority="3">
944
925
  <xsl:if test="parent::mn:preface or (parent::mn:page_sequence and local-name(../..) = 'preface')">
945
926
  <fo:block break-after="page"/>
@@ -11316,7 +11297,7 @@
11316
11297
  <!-- END Admonition -->
11317
11298
  <!-- ================ -->
11318
11299
 
11319
- <xsl:attribute-set name="references-non-normative-title-style">
11300
+ <xsl:attribute-set name="bibliography-title-style">
11320
11301
  <xsl:attribute name="font-size">16pt</xsl:attribute>
11321
11302
  <xsl:attribute name="font-weight">bold</xsl:attribute>
11322
11303
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -11326,7 +11307,7 @@
11326
11307
  <xsl:attribute name="role">H1</xsl:attribute>
11327
11308
  </xsl:attribute-set>
11328
11309
 
11329
- <xsl:template name="refine_references-non-normative-title-style">
11310
+ <xsl:template name="refine_bibliography-title-style">
11330
11311
  </xsl:template>
11331
11312
 
11332
11313
  <!-- bibitem in Normative References (references/@normative="true") -->
@@ -13439,11 +13420,12 @@
13439
13420
  <!-- ===================================== -->
13440
13421
 
13441
13422
  <xsl:attribute-set name="annex-title-style">
13423
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
13442
13424
  <xsl:attribute name="font-size">12pt</xsl:attribute>
13443
13425
  <xsl:attribute name="font-weight">bold</xsl:attribute>
13444
13426
  <xsl:attribute name="text-align">center</xsl:attribute>
13427
+ <xsl:attribute name="space-before">0</xsl:attribute>
13445
13428
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13446
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
13447
13429
  <xsl:attribute name="role">H1</xsl:attribute>
13448
13430
  </xsl:attribute-set> <!-- annex-title-style -->
13449
13431
 
@@ -13559,6 +13541,20 @@
13559
13541
  <xsl:if test="../@id = '_document_history' or . = 'Document History'">
13560
13542
  <xsl:attribute name="text-align">center</xsl:attribute>
13561
13543
  </xsl:if>
13544
+
13545
+ <xsl:if test="parent::mn:annex"><!-- Annex title -->
13546
+ <xsl:variable name="annex_title_styles">
13547
+ <styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
13548
+ </xsl:variable>
13549
+ <xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
13550
+ </xsl:if>
13551
+
13552
+ <xsl:if test="parent::mn:references[not(@normative='true')] and ancestor::mn:bibliography">
13553
+ <xsl:variable name="bibliography_title_styles">
13554
+ <styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
13555
+ </xsl:variable>
13556
+ <xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
13557
+ </xsl:if>
13562
13558
  <!-- $namespace = 'iho' -->
13563
13559
  <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
13564
13560
  </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">
@@ -12,8 +12,8 @@ module Metanorma
12
12
  def metadata_series(node, xml)
13
13
  series = node.attr("series") or return
14
14
  xml.series type: "main" do |s|
15
- s.title SERIESNAME[series.to_sym] || "N/A"
16
- s.abbreviation series
15
+ add_noko_elem(s, "title", SERIESNAME[series.to_sym] || "N/A")
16
+ add_noko_elem(s, "abbreviation", series)
17
17
  end
18
18
  end
19
19
 
@@ -27,10 +27,9 @@ module Metanorma
27
27
 
28
28
  def metadata_commentperiod(node, xml)
29
29
  from = node.attr("comment-from") or return
30
- to = node.attr("comment-to")
31
30
  xml.commentperiod do |c|
32
- c.from from
33
- c.to to if to
31
+ add_noko_elem(c, "from", from)
32
+ add_noko_elem(c, "to", node.attr("comment-to"))
34
33
  end
35
34
  end
36
35
 
@@ -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,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iho
3
- VERSION = "1.2.8".freeze
3
+ VERSION = "1.2.9".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iho
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.8
4
+ version: 1.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
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-generic