metanorma-plateau 1.2.1 → 1.2.2

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: 5216a29d12ec97ea08cd293a8424eb56bc7f8487abcb05d7e8605f76d4bfbbea
4
- data.tar.gz: a34fa09773500f77484c9e0fdb59b8c9c44b5386d4ca36b249aef8b69464b3cb
3
+ metadata.gz: 61a7684c746d7b6b93e22ef00c72b7f2ed07a5fec087b82e5e8e6ffecc38859d
4
+ data.tar.gz: 24bf9edcb866dbac1a138fe949a0a41b507f8d323750f2becea5f3e17194ba04
5
5
  SHA512:
6
- metadata.gz: b4d64fa9a76290f5bf140b5655af2d758c97bfc9f109e014bb908acd64814b4a88d6fbd4b42b3919ec93bc98c16e7774cc4339c1ae6f8c0b5f6d17558d6c9c22
7
- data.tar.gz: 6b9ea93d58e3b12fdd47dfe35de29f4831f6420d5be088c00fae7daa2b9ea9c4c3469c942121150293567b02543043fdf5e3f9c11df02ffa6acef260bbbc1e3f
6
+ metadata.gz: 2d1ac86e09f64d70a2e95959fe5ce073a37e020872f0b654d6a78b23d1acb70f917f4fb148df4036c8bbe9e131159887bd83f84a8530d4aa94aa1a3b72a5745d
7
+ data.tar.gz: a9a0538c5839b842541175011b2f7e8cb40c60303c196cc37c5c439303489ff880e968ef41f3786eb525fb9ec52eb7a9bd28de784144422d4c44a52ab8641b8c
@@ -11959,10 +11959,10 @@
11959
11959
  <!-- END Admonition -->
11960
11960
  <!-- ================ -->
11961
11961
 
11962
- <xsl:attribute-set name="references-non-normative-title-style">
11962
+ <xsl:attribute-set name="bibliography-title-style">
11963
11963
  </xsl:attribute-set>
11964
11964
 
11965
- <xsl:template name="refine_references-non-normative-title-style">
11965
+ <xsl:template name="refine_bibliography-title-style">
11966
11966
  </xsl:template>
11967
11967
 
11968
11968
  <!-- bibitem in Normative References (references/@normative="true") -->
@@ -14016,6 +14016,10 @@
14016
14016
  <!-- ===================================== -->
14017
14017
 
14018
14018
  <xsl:attribute-set name="annex-title-style">
14019
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
14020
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
14021
+ <xsl:attribute name="text-align">center</xsl:attribute>
14022
+ <xsl:attribute name="space-before">0mm</xsl:attribute>
14019
14023
  </xsl:attribute-set> <!-- annex-title-style -->
14020
14024
 
14021
14025
  <xsl:template name="refine_annex-title-style">
@@ -14160,11 +14164,6 @@
14160
14164
  <xsl:attribute name="space-before">9mm</xsl:attribute>
14161
14165
  <xsl:attribute name="margin-bottom">9mm</xsl:attribute>
14162
14166
  </xsl:if>
14163
- <xsl:if test="ancestor::mn:annex">
14164
- <xsl:attribute name="font-size">14pt</xsl:attribute>
14165
- <xsl:attribute name="text-align">center</xsl:attribute>
14166
- <xsl:attribute name="space-before">0mm</xsl:attribute>
14167
- </xsl:if>
14168
14167
  <xsl:if test="$doctype = 'technical-report'">
14169
14168
  <xsl:attribute name="font-size">16pt</xsl:attribute>
14170
14169
  </xsl:if>
@@ -14225,6 +14224,20 @@
14225
14224
  </xsl:if>
14226
14225
  </xsl:if>
14227
14226
 
14227
+ <xsl:if test="parent::mn:annex"><!-- Annex title -->
14228
+ <xsl:variable name="annex_title_styles">
14229
+ <styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
14230
+ </xsl:variable>
14231
+ <xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
14232
+ </xsl:if>
14233
+
14234
+ <xsl:if test="parent::mn:references[not(@normative='true')]"><!-- Bibliography section title -->
14235
+ <xsl:variable name="bibliography_title_styles">
14236
+ <styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
14237
+ </xsl:variable>
14238
+ <xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
14239
+ </xsl:if>
14240
+
14228
14241
  <xsl:if test="@type = 'floating-title' or @type = 'section-title'">
14229
14242
  <xsl:copy-of select="@id"/>
14230
14243
  </xsl:if>
@@ -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">
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plateau
3
3
  # after term def processed, process source after paragraphs so that
4
- # the moving of paragraphs there does not nclude termdef
4
+ # the moving of paragraphs there does not include termdef
5
5
  class Converter < Jis::Converter
6
6
  def termdef_cleanup(xmldoc)
7
7
  super
@@ -13,16 +13,6 @@ module Metanorma
13
13
  end
14
14
  end
15
15
 
16
- # Abandoned in favour of JIS ordering
17
- # def pub_class(bib)
18
- # return 1 if bib.at("#{PUBLISHER}[name = '#{pub_hash['en']}']") ||
19
- # bib.at("#{PUBLISHER}[name = '#{pub_hash['ja']}']") ||
20
- # bib.at("#{PUBLISHER}[abbreviation = 'MLIT']")
21
- # return 2 if bib["type"] == "standard"
22
- #
23
- # 3
24
- # end
25
-
26
16
  def biblio_reorder(xmldoc)
27
17
  xmldoc.xpath("//references").each do |r|
28
18
  biblio_reorder1(r)
@@ -44,8 +44,9 @@ module Metanorma
44
44
 
45
45
  def metadata_id(node, xml)
46
46
  if id = node.attr("docidentifier")
47
- xml.docidentifier "PLATEAU #{id.sub(/^PLATEAU /, '')}",
48
- **attr_code(type: "PLATEAU", primary: "true")
47
+ add_noko_elem(xml, "docidentifier",
48
+ "PLATEAU #{id.sub(/^PLATEAU /, '')}", type: "PLATEAU",
49
+ primary: "true")
49
50
  else iso_id(node, xml)
50
51
  end
51
52
  end
@@ -53,16 +54,17 @@ module Metanorma
53
54
  # do not use pubid
54
55
  def iso_id(node, xml)
55
56
  id = node.attr("docnumber") or return
56
- xml.docidentifier "PLATEAU #{id.sub(/^PLATEAU /, '')}",
57
- **attr_code(type: "PLATEAU", primary: "true")
57
+ add_noko_elem(xml, "docidentifier",
58
+ "PLATEAU #{id.sub(/^PLATEAU /, '')}", type: "PLATEAU",
59
+ primary: "true")
58
60
  end
59
61
 
60
62
  # do not use pubid
61
63
  def metadata_status(node, xml)
62
64
  stage = get_stage(node)
63
65
  xml.status do |s|
64
- s.stage stage
65
- i = node.attr("iteration") and s.iteration i
66
+ add_noko_elem(s, "stage", stage)
67
+ add_noko_elem(s, "iteration", node.attr("iteration"))
66
68
  end
67
69
  end
68
70
 
@@ -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 Plateau
3
- VERSION = "1.2.1".freeze
3
+ VERSION = "1.2.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-plateau
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.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: 2025-11-05 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-jis