metanorma-jis 1.0.0 → 1.0.1

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: 7e2dd4ab84c0a6ed18a6fd314efc02f0fd4d21541ecefe84ca12ccfb7aafbad8
4
- data.tar.gz: 376add510f1d13bbc145750ecf15eb3ac37e82ce3dfeac8cdd5c7f3a6de2fc28
3
+ metadata.gz: 4f4b866779290adcd5a6ebfa304c2bcd11efdcfa039ad8e32b9bf1a7fd0d8420
4
+ data.tar.gz: ff89ac0602425434bdc8711c4ce6856475aed99f509f4b39cb4d7cec898da379
5
5
  SHA512:
6
- metadata.gz: 1d998d2221b79cf39d75fa49ad989ab48cf13a851d8cdca786ce1e72a7ac93a96d164599412c0fa726a72ac1bd13840c37c3092bf29a0a2bfb8d48ad35af1fe0
7
- data.tar.gz: ba1d3e6a819c3fc7b4dd834c9168b83becffd936595d3b2ccf68b89d2f2c072f1ba0a03ff9b16d358fcaf5ab0c4c899a26878ef6be03ef59a8e8ff24af51bdcd
6
+ metadata.gz: 3b4b622379cda25fb154f58be052fd2dd102bf9c18d7c8e6bdb2ac97827ba41b7f0bea44525690a1ac644257ddeff9cfaec1d2542c38ec7ab9b36e58415169e4
7
+ data.tar.gz: 14a62cf400fa6142ec8d4f4e39d3e86c10d85a5a0c2374fbd93d4e8723b95cc501f6875480fcd0dd531881e052f9b88676d6c3e95bf42323342f422c7d36a512
@@ -15773,10 +15773,10 @@
15773
15773
  <!-- END Admonition -->
15774
15774
  <!-- ================ -->
15775
15775
 
15776
- <xsl:attribute-set name="references-non-normative-title-style">
15776
+ <xsl:attribute-set name="bibliography-title-style">
15777
15777
  </xsl:attribute-set>
15778
15778
 
15779
- <xsl:template name="refine_references-non-normative-title-style">
15779
+ <xsl:template name="refine_bibliography-title-style">
15780
15780
  </xsl:template>
15781
15781
 
15782
15782
  <!-- bibitem in Normative References (references/@normative="true") -->
@@ -17866,9 +17866,18 @@
17866
17866
  <!-- ===================================== -->
17867
17867
 
17868
17868
  <xsl:attribute-set name="annex-title-style">
17869
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
17870
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
17871
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
17872
+ <xsl:attribute name="text-align">center</xsl:attribute>
17869
17873
  </xsl:attribute-set> <!-- annex-title-style -->
17870
17874
 
17871
17875
  <xsl:template name="refine_annex-title-style">
17876
+ <xsl:if test="preceding-sibling::mn:annex[1][@commentary = 'true']">
17877
+ <xsl:attribute name="font-size">16pt</xsl:attribute>
17878
+ <xsl:attribute name="space-before">1mm</xsl:attribute>
17879
+ <xsl:attribute name="margin-bottom">7mm</xsl:attribute>
17880
+ </xsl:if>
17872
17881
  </xsl:template>
17873
17882
 
17874
17883
  <xsl:attribute-set name="p-zzSTDTitle1-style">
@@ -17961,14 +17970,17 @@
17961
17970
  <xsl:attribute name="space-before">9mm</xsl:attribute>
17962
17971
  <xsl:attribute name="margin-bottom">9mm</xsl:attribute>
17963
17972
  </xsl:if>
17964
- <xsl:if test="@ancestor = 'annex'">
17965
- <xsl:attribute name="font-size">14pt</xsl:attribute>
17966
- <xsl:attribute name="text-align">center</xsl:attribute>
17967
- <xsl:if test="preceding-sibling::mn:annex[1][@commentary = 'true']">
17968
- <xsl:attribute name="font-size">16pt</xsl:attribute>
17969
- <xsl:attribute name="space-before">1mm</xsl:attribute>
17970
- <xsl:attribute name="margin-bottom">7mm</xsl:attribute>
17971
- </xsl:if>
17973
+ <xsl:if test="@ancestor = 'annex'"><!-- Annex title -->
17974
+ <xsl:variable name="annex_title_styles">
17975
+ <styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
17976
+ </xsl:variable>
17977
+ <xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
17978
+ </xsl:if>
17979
+ <xsl:if test="@ancestor = 'bibliography'"><!-- Bibliography section title -->
17980
+ <xsl:variable name="bibliography_title_styles">
17981
+ <styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
17982
+ </xsl:variable>
17983
+ <xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
17972
17984
  </xsl:if>
17973
17985
  </xsl:if>
17974
17986
 
@@ -203,6 +203,8 @@ module IsoDoc
203
203
 
204
204
  def bracketed_refs_processing(docxml); end
205
205
 
206
+ def short_style_origin(docxml); end
207
+
206
208
  def norm_ref_entry_code(_ordinal, idents, _ids, _standard, datefn, bib)
207
209
  delim = bib.at(ns("./language"))&.text == "ja" ? "&#x3000;" : "<esc>,</esc> "
208
210
  ret = (idents[:ordinal] || idents[:metanorma] || idents[:sdo]).to_s
@@ -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">
@@ -100,13 +100,11 @@ module Metanorma
100
100
  def multiling_noko_value(value, tag, xml)
101
101
  if value.is_a?(Hash)
102
102
  value.each do |k, v|
103
- xml.send tag, language: k do |x|
104
- x << v
105
- end
103
+ add_noko_elem(xml, tag, v, language: k)
106
104
  end
107
105
  elsif value.is_a?(Array)
108
- value.each { |a| xml.send tag, a }
109
- else xml.send tag, value
106
+ value.each { |a| add_noko_elem(xml, tag, a) }
107
+ else add_noko_elem(xml, tag, value)
110
108
  end
111
109
  end
112
110
 
@@ -121,7 +119,7 @@ module Metanorma
121
119
  abbr = org[:abbr]
122
120
  abbr ||= org_abbrev[name_str]
123
121
  default_org && b = node&.attr("subdivision-abbr") and abbr = b
124
- abbr and xml.abbreviation abbr
122
+ add_noko_elem(xml, "abbreviation", abbr)
125
123
  end
126
124
 
127
125
  def copyright_parse(node)
@@ -145,8 +143,8 @@ module Metanorma
145
143
 
146
144
  def metadata_id(node, xml)
147
145
  if id = node.attr("docidentifier")
148
- xml.docidentifier id.sub(/^JIS /, ""),
149
- **attr_code(type: "JIS", primary: "true")
146
+ add_noko_elem(xml, "docidentifier", id.sub(/^JIS /, ""),
147
+ **attr_code(type: "JIS", primary: "true"))
150
148
  else iso_id(node, xml)
151
149
  end
152
150
  end
@@ -185,7 +183,8 @@ module Metanorma
185
183
 
186
184
  def iso_id_out(xml, params, _with_prf)
187
185
  id = iso_id_default(params).to_s(with_publisher: false)
188
- xml.docidentifier id.strip, type: "JIS", primary: "true"
186
+ add_noko_elem(xml, "docidentifier", id.strip, type: "JIS",
187
+ primary: "true")
189
188
  end
190
189
 
191
190
  def iso_id_default(params)
@@ -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 Jis
3
- VERSION = "1.0.0".freeze
3
+ VERSION = "1.0.1".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-jis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
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: japanese_calendar