metanorma-iso 3.4.2 → 3.4.3

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: 9929b1cb4a3a27bc2d67e5cc35208ce6c0cde2edfcf610819b52431664a6d6e1
4
- data.tar.gz: 1387bd4a7a70668aa172c398ef68e1ec7382742ae81d929e92925974be424526
3
+ metadata.gz: 370c95ed634b5f69d7fe7133ceae5d05de4d68d8561c85e86844528dc6311833
4
+ data.tar.gz: 81d6900cc3ef2ce858d06e6c50415cd837d39787fcef055277e0db9314c355ff
5
5
  SHA512:
6
- metadata.gz: 39a5747db6618a81b7e0785edbf83c3e9bec40fdf11c7b51bf40eeb8f21e60a12acd50f6f1189eea94dd291b848174b83e354adeddc28d35b7c4bccbeb792f46
7
- data.tar.gz: fc1a91e0703ecda60bf4e92b6528e5f6c1205675ad5b1b7daa20264154c4e0844c4ef53a141279b98e1bcad39e49eff22d481fffb6ff639889ce88989faea35e
6
+ metadata.gz: 2ec200175fa3d89c8304c9f267d8070cb068f4e58cf9ff8d56acfc48f4c561124f84695c95062da979cd16deb5abf0b0cd2612a208788dcdbcca5e881c31a38f
7
+ data.tar.gz: 837d81ef10cd6535c3bc209e5d6809cd362d40c5c5b4c4dd77d26ce50b76aa4407fd61a29961f43c2e07b23e23fb5aef15955440dc2c32aa07239d8d989c2df4
@@ -827,7 +827,9 @@ nav {
827
827
  background-color: black;
828
828
  color: white !important;
829
829
  cursor: pointer;
830
- z-index: 100;
830
+ left: 0;
831
+ top: 0;
832
+ z-index: 103;
831
833
  }
832
834
  #toggle span {
833
835
  text-align: center;
@@ -776,7 +776,9 @@ nav {
776
776
  background-color: #f7f7f7;
777
777
  color: black !important;
778
778
  cursor: pointer;
779
- z-index: 100;
779
+ left: 0;
780
+ top: 0;
781
+ z-index: 103;
780
782
  }
781
783
  #toggle span {
782
784
  text-align: center;
@@ -50,38 +50,6 @@ module IsoDoc
50
50
  def requirements_processor
51
51
  ::Metanorma::Requirements::Iso
52
52
  end
53
-
54
- def std_docid_semantic(id)
55
- id.nil? and return nil
56
- ret = Nokogiri::XML.fragment(id)
57
- ret.traverse do |x|
58
- x.text? or next
59
- x.replace(std_docid_semantic1(x.text))
60
- end
61
- to_xml(ret)
62
- end
63
-
64
- def std_docid_semantic1(id)
65
- id1 = id.sub(%r{\p{Zs}\(all\p{Zs}parts\)}, "###ALLPARTS###")
66
- ids = id1.split(/(\p{Zs})/)
67
- agency?(ids[0].sub(%r{^([^/]+)/.*$}, "\\1")) or return id
68
- ids.map! do |i|
69
- if %w(GUIDE TR TS DIR).include?(i)
70
- "<span class='stddocNumber'>#{i}</span>"
71
- elsif /\p{Zs}/.match?(i) then i
72
- else std_docid_semantic_full(i)
73
- end
74
- end.join.gsub(%r{</span>(\p{Zs}+)<}, "\\1</span><")
75
- .sub("###ALLPARTS###", " (all parts)")
76
- end
77
-
78
- def std_docid_semantic_full(ident)
79
- ident
80
- .sub(/^([^0-9]+)(\p{Zs}|$)/, "<span class='stdpublisher'>\\1</span>\\2")
81
- .sub(/([0-9]+)/, "<span class='stddocNumber'>\\1</span>")
82
- .sub(/-([0-9]+)/, "-<span class='stddocPartNumber'>\\1</span>")
83
- .sub(/:([0-9]{4})(?!\d)/, ":<span class='stdyear'>\\1</span>")
84
- end
85
53
  end
86
54
  end
87
55
  end
@@ -1,3 +1,5 @@
1
+ require "pubid"
2
+
1
3
  module IsoDoc
2
4
  module Iso
3
5
  class PresentationXMLConvert < IsoDoc::PresentationXMLConvert
@@ -151,9 +153,15 @@ module IsoDoc
151
153
  @xrefs.anchor(node["target"], :type))
152
154
  end
153
155
 
154
- def anchor_xref(node, target, container: false)
155
- # require "debug"; binding.b
156
- super
156
+ def annotate_docid?(_id)
157
+ true
158
+ end
159
+
160
+ def std_docid_span_classes(id)
161
+ id.gsub('class="publisher"', 'class="stdpublisher"')
162
+ .gsub('class="docnumber"', 'class="stddocNumber"')
163
+ .gsub('class="part"', 'class="stddocPartNumber"')
164
+ .gsub('class="year"', 'class="stdyear"')
157
165
  end
158
166
  end
159
167
  end
@@ -187,6 +187,15 @@ Applicable to modify and delete</a:documentation>
187
187
  <a:documentation>Optional caption of this block</a:documentation>
188
188
  </attribute>
189
189
  </optional>
190
+ <optional>
191
+ <attribute name="position">
192
+ <a:documentation>For an "add" change, whether the change is added before or after the location</a:documentation>
193
+ <choice>
194
+ <value>before</value>
195
+ <value>after</value>
196
+ </choice>
197
+ </attribute>
198
+ </optional>
190
199
  <optional>
191
200
  <element name="location">
192
201
  <a:documentation>The location(s) in the original document which have undergone the change described in this block</a:documentation>
@@ -1142,11 +1142,11 @@ NOTE: This should preferably be encoded as a URI or short identifier, rather th
1142
1142
  <a:documentation>Information about how long the current description of the bibliographic item is valid for</a:documentation>
1143
1143
  </ref>
1144
1144
  </optional>
1145
- <optional>
1145
+ <zeroOrMore>
1146
1146
  <ref name="depiction">
1147
1147
  <a:documentation>Depiction of the bibliographic item, typically an image</a:documentation>
1148
1148
  </ref>
1149
- </optional>
1149
+ </zeroOrMore>
1150
1150
  </define>
1151
1151
  <define name="ReducedBibliographicItem">
1152
1152
  <a:documentation>Reduced description of a bibliographic resource, without mandatory title and docidentifier, used for document relations
@@ -2015,15 +2015,11 @@ provided that it is not the entire bibliographic item that is so related</a:docu
2015
2015
  <a:documentation>A version of the bibliographic item (within an edition). Can be used for drafts</a:documentation>
2016
2016
  <element name="version">
2017
2017
  <optional>
2018
- <ref name="revision-date">
2019
- <a:documentation>The date at which the current version of the bibliographic item was produced</a:documentation>
2020
- </ref>
2021
- </optional>
2022
- <optional>
2023
- <ref name="draft">
2024
- <a:documentation>The identifier for the current draft of the bibliographic item</a:documentation>
2025
- </ref>
2018
+ <attribute name="type">
2019
+ <a:documentation>Versioning scheme, in case of multiple versioning schemes</a:documentation>
2020
+ </attribute>
2026
2021
  </optional>
2022
+ <text/>
2027
2023
  </element>
2028
2024
  </define>
2029
2025
  <define name="vedition">
@@ -2063,13 +2059,13 @@ provided that it is not the entire bibliographic item that is so related</a:docu
2063
2059
  <ref name="LocalizedString"/>
2064
2060
  </element>
2065
2061
  </optional>
2066
- <oneOrMore>
2062
+ <zeroOrMore>
2067
2063
  <element name="taxon">
2068
2064
  <a:documentation>The keywords as a hierarchical taxonomy. For example, the sequence of `taxon` elements
2069
2065
  `pump`, `centrifugal pump`, `line shaft pump` represents a taxonomic classification</a:documentation>
2070
2066
  <ref name="LocalizedString"/>
2071
2067
  </element>
2072
- </oneOrMore>
2068
+ </zeroOrMore>
2073
2069
  <zeroOrMore>
2074
2070
  <ref name="vocabid">
2075
2071
  <a:documentation>Identifiers for the keyword as a controlled vocabulary</a:documentation>
@@ -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.5 -->
3
+ <!-- VERSION v2.1.6 -->
4
4
 
5
5
  <!--
6
6
  ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
@@ -164,6 +164,9 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
164
164
  </choice>
165
165
  </attribute>
166
166
  </optional>
167
+ <optional>
168
+ <ref name="DisplayDirective"/>
169
+ </optional>
167
170
  </define>
168
171
  <define name="DlAttributes">
169
172
  <ref name="BlockAttributes"/>
@@ -814,6 +817,9 @@ titlecase, or lowercase</a:documentation>
814
817
  </define>
815
818
  <define name="UlAttributes" combine="interleave">
816
819
  <ref name="BlockAttributes"/>
820
+ <optional>
821
+ <ref name="DisplayDirective"/>
822
+ </optional>
817
823
  </define>
818
824
  <define name="TableAttributes" combine="interleave">
819
825
  <optional>
@@ -1968,7 +1974,7 @@ used in document amendments</a:documentation>
1968
1974
  <a:documentation>Zero or more examples of how the term is to be used</a:documentation>
1969
1975
  </ref>
1970
1976
  </zeroOrMore>
1971
- <ref name="TermSource">
1977
+ <ref name="TermSources">
1972
1978
  <a:documentation>Bibliographic references for the managed term</a:documentation>
1973
1979
  </ref>
1974
1980
  </element>
@@ -2077,7 +2083,7 @@ used in document amendments</a:documentation>
2077
2083
  <a:documentation>Information about how the designation is to be used</a:documentation>
2078
2084
  </ref>
2079
2085
  </optional>
2080
- <ref name="TermSource">
2086
+ <ref name="TermSources">
2081
2087
  <a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
2082
2088
  </ref>
2083
2089
  </define>
@@ -2348,7 +2354,7 @@ used in document amendments</a:documentation>
2348
2354
  <ref name="formula"/>
2349
2355
  </choice>
2350
2356
  </oneOrMore>
2351
- <ref name="TermSource">
2357
+ <ref name="TermSources">
2352
2358
  <a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
2353
2359
  </ref>
2354
2360
  </element>
@@ -2365,7 +2371,7 @@ used in document amendments</a:documentation>
2365
2371
  <ref name="formula"/>
2366
2372
  </choice>
2367
2373
  </oneOrMore>
2368
- <ref name="TermSource">
2374
+ <ref name="TermSources">
2369
2375
  <a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
2370
2376
  </ref>
2371
2377
  </element>
@@ -2788,6 +2794,26 @@ to span across both columns</a:documentation>
2788
2794
  </attribute>
2789
2795
  </optional>
2790
2796
  </define>
2797
+ <define name="DisplayDirective">
2798
+ <a:documentation>Directive on how to render a block in Presentation XML </a:documentation>
2799
+ <optional>
2800
+ <attribute name="display">
2801
+ <a:documentation>Display style for block.
2802
+ If the block is `ol` or `ul` and dispay is `table`,
2803
+ the list is to be rendered as a table, with a column for each nested level, and a row for each terminal sublist</a:documentation>
2804
+ </attribute>
2805
+ </optional>
2806
+ <optional>
2807
+ <attribute name="display-directives">
2808
+ <a:documentation>display-directives is a key-value set of attributes, guiding how the rendering of the block should happen.
2809
+ The key-value set is comma-delimited, and encoded as `key1='value1',key2='value'`,
2810
+ as with stem//mn/@data-metanorma-numberformat
2811
+ * If the block is `ol` or `ul` and dispay is `table`, display-directives can have the value `colgroup='col1,col2,...coln'`,
2812
+ where each col value is a percentage width of the column in the output table (with no % suffix).
2813
+ e.g. `colgroup='50,33.3,16.7'` </a:documentation>
2814
+ </attribute>
2815
+ </optional>
2816
+ </define>
2791
2817
  <define name="ReferencesAttributes">
2792
2818
  <optional>
2793
2819
  <attribute name="obligation">
@@ -2800,7 +2826,7 @@ Normative References contents contain normative references, but as a clause in t
2800
2826
  <data type="boolean"/>
2801
2827
  </attribute>
2802
2828
  </define>
2803
- <define name="TermSource">
2829
+ <define name="TermSources">
2804
2830
  <zeroOrMore>
2805
2831
  <ref name="termsource"/>
2806
2832
  </zeroOrMore>
@@ -47,7 +47,15 @@ the tag name of the top level containers</a:documentation>
47
47
  </optional>
48
48
  <optional>
49
49
  <attribute name="model">
50
- <a:documentation>Model of requirements realised by this requirement, e.g. "ogc" for Modspec</a:documentation>
50
+ <a:documentation>Model of requirements realised by this requirement, e.g. "ogc" for Modspec.
51
+ Current legal values: ogc, default</a:documentation>
52
+ </attribute>
53
+ </optional>
54
+ <optional>
55
+ <attribute name="render">
56
+ <a:documentation>Rendering of requirements realised by this requirement. Current legal values:
57
+ default:: default, inline
58
+ ogc:: default</a:documentation>
51
59
  </attribute>
52
60
  </optional>
53
61
  <optional>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iso
3
- VERSION = "3.4.2".freeze
3
+ VERSION = "3.4.3".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.2
4
+ version: 3.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-13 00:00:00.000000000 Z
11
+ date: 2026-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc