metanorma-cc 2.9.0 → 2.9.1.pre.alpha.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.
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar ns='https://www.metanorma.org/ns/standoc' xmlns="http://relaxng.org/ns/structure/1.0">
3
3
  <include href="relaton-cc.rng"/>
4
- <include href="isodoc.rng"/>
4
+ <include href="standoc.rng"/>
5
5
  </grammar>
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "metanorma/standoc"
4
+
5
+ module Metanorma
6
+ module Cc::Document
7
+ class Root < Lutaml::Model::Serializable
8
+ include Metanorma::Standoc::Document::RootAttributes
9
+
10
+ attribute :bibdata,
11
+ Metanorma::Standoc::Document::Metadata::StandardBibData
12
+ attribute :preface,
13
+ Metanorma::Standoc::Document::Sections::Preface
14
+ attribute :sections,
15
+ Metanorma::Standoc::Document::Sections::Sections,
16
+ collection: true
17
+ attribute :annex,
18
+ Metanorma::Standoc::Document::Sections::AnnexSection,
19
+ collection: true
20
+ attribute :misccontainer,
21
+ Metanorma::Standoc::Document::Sections::MiscContainer
22
+
23
+ xml do
24
+ element "metanorma"
25
+ namespace Metanorma::Standoc::Document::Namespace
26
+
27
+ Metanorma::Standoc::Document::RootXmlMapping.apply(self)
28
+
29
+ map_element "misc-container", to: :misccontainer
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Forward-declare parent namespace so this file is safe to require
4
+ # directly (without first requiring metanorma/cc.rb).
5
+ module Metanorma
6
+ module Cc
7
+ autoload :Registers, "metanorma/cc/registers"
8
+ end
9
+ end
10
+
11
+ require "metanorma-generic"
12
+
13
+ module Metanorma
14
+ module Cc::Document
15
+ autoload :Root, "metanorma/cc/document/root"
16
+ end
17
+ end
18
+
19
+ require "metanorma-core"
20
+
21
+ # OCP adoption: ONE registration in the metanorma-core flavor table
22
+ # (metanorma-core#18). Lazy: the table exists only on the flavor-table
23
+ # line of metanorma-core; skip silently on resolutions without it.
24
+ if defined?(Metanorma::Core::Flavors)
25
+ Metanorma::Cc::Registers.setup
26
+ Metanorma::Core::Flavors.register(Metanorma::Core::Flavor.new(
27
+ name: :cc,
28
+ gem: "metanorma-cc",
29
+ model_root: Metanorma::Cc::Document::Root,
30
+ pubid_module: nil,
31
+ renderers: { html: lambda do |_document, **_options|
32
+ Metanorma::Html::StandardRenderer
33
+ end },
34
+ ))
35
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Metanorma
6
+ module Cc
7
+ # CC's lutaml-model register: creates the :cc_document context.
8
+ # The cc model chain is the standoc one (RootXmlMapping, standoc
9
+ # section classes), so the fallback resolves through the ISO
10
+ # register, matching the gb/ogc/jis flavor registers.
11
+ module Registers
12
+ module_function
13
+
14
+ def setup
15
+ reg = Lutaml::Model::Register.new(:cc_document,
16
+ fallback: [:iso_document])
17
+ Lutaml::Model::GlobalRegister.register(reg)
18
+ end
19
+ end
20
+ end
21
+ 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.2.0 -->
3
+ <!-- VERSION v2.3.0 -->
4
4
 
5
5
  <!--
6
6
  ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
@@ -328,7 +328,7 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
328
328
  </optional>
329
329
  </define>
330
330
  <define name="ExampleBodyContent">
331
- <a:documentation>Content alternatives of an example in the isodoc context: as basicdoc,
331
+ <a:documentation>Content alternatives of an example in the standoc context: as basicdoc,
332
332
  with figure admitted, and note admitted only trailing the example body
333
333
  rather than interleaved. The content hook is overridden rather than
334
334
  ExampleBody itself, so that the extension seam survives: additive
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Cc
3
- VERSION = "2.9.0".freeze
3
+ VERSION = "2.9.1.pre.alpha.2".freeze
4
4
  end
5
5
  end
data/lib/metanorma/cc.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "metanorma-core"
2
2
  require "metanorma-generic"
3
3
  require_relative "./cc/processor"
4
+ require "metanorma/cc/document"
4
5
 
5
6
  module Metanorma
6
7
  module Cc
@@ -29,4 +30,3 @@ module Metanorma
29
30
  end
30
31
  end
31
32
  Metanorma::Registry.instance.register(Metanorma::Cc::Processor)
32
-
data/metanorma-cc.gemspec CHANGED
@@ -29,10 +29,9 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ["lib"]
30
30
  spec.required_ruby_version = Gem::Requirement.new(">= 3.3.0")
31
31
 
32
- spec.add_dependency "metanorma-generic", "~> 3.5.0"
32
+ spec.add_dependency "metanorma-generic", ">= 3.5.1.pre.alpha.1"
33
33
 
34
34
  spec.add_development_dependency "debug"
35
- spec.add_development_dependency "equivalent-xml", "~> 0.6"
36
35
  spec.add_development_dependency "guard", "~> 2.14"
37
36
  spec.add_development_dependency "guard-rspec", "~> 4.7"
38
37
  spec.add_development_dependency "rake", "~> 13.0"
metadata CHANGED
@@ -1,28 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-cc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0
4
+ version: 2.9.1.pre.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
+ autorequire:
8
9
  bindir: exe
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-10-26 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: metanorma-generic
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
- - - "~>"
17
+ - - ">="
17
18
  - !ruby/object:Gem::Version
18
- version: 3.5.0
19
+ version: 3.5.1.pre.alpha.1
19
20
  type: :runtime
20
21
  prerelease: false
21
22
  version_requirements: !ruby/object:Gem::Requirement
22
23
  requirements:
23
- - - "~>"
24
+ - - ">="
24
25
  - !ruby/object:Gem::Version
25
- version: 3.5.0
26
+ version: 3.5.1.pre.alpha.1
26
27
  - !ruby/object:Gem::Dependency
27
28
  name: debug
28
29
  requirement: !ruby/object:Gem::Requirement
@@ -37,20 +38,6 @@ dependencies:
37
38
  - - ">="
38
39
  - !ruby/object:Gem::Version
39
40
  version: '0'
40
- - !ruby/object:Gem::Dependency
41
- name: equivalent-xml
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '0.6'
47
- type: :development
48
- prerelease: false
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '0.6'
54
41
  - !ruby/object:Gem::Dependency
55
42
  name: guard
56
43
  requirement: !ruby/object:Gem::Requirement
@@ -211,20 +198,16 @@ files:
211
198
  - README.adoc
212
199
  - lib/isodoc/cc/base_convert.rb
213
200
  - lib/isodoc/cc/cc.standard.xsl
214
- - lib/isodoc/cc/html/_coverpage.css
215
201
  - lib/isodoc/cc/html/_coverpage.scss
216
- - lib/isodoc/cc/html/cc.css
217
202
  - lib/isodoc/cc/html/cc.scss
218
203
  - lib/isodoc/cc/html/dots-w@2x.png
219
204
  - lib/isodoc/cc/html/dots@2x.png
220
205
  - lib/isodoc/cc/html/header.html
221
206
  - lib/isodoc/cc/html/html_cc_intro.html
222
207
  - lib/isodoc/cc/html/html_cc_titlepage.html
223
- - lib/isodoc/cc/html/htmlstyle.css
224
208
  - lib/isodoc/cc/html/htmlstyle.scss
225
209
  - lib/isodoc/cc/html/word_cc_intro.html
226
210
  - lib/isodoc/cc/html/word_cc_titlepage.html
227
- - lib/isodoc/cc/html/wordstyle.css
228
211
  - lib/isodoc/cc/html/wordstyle.scss
229
212
  - lib/isodoc/cc/html_convert.rb
230
213
  - lib/isodoc/cc/i18n-en.yaml
@@ -244,7 +227,8 @@ files:
244
227
  - lib/metanorma/cc/cc.rng
245
228
  - lib/metanorma/cc/cleanup.rb
246
229
  - lib/metanorma/cc/converter.rb
247
- - lib/metanorma/cc/isodoc.rng
230
+ - lib/metanorma/cc/document.rb
231
+ - lib/metanorma/cc/document/root.rb
248
232
  - lib/metanorma/cc/log.rb
249
233
  - lib/metanorma/cc/mathml4-content.rng
250
234
  - lib/metanorma/cc/mathml4-core.rng
@@ -253,8 +237,10 @@ files:
253
237
  - lib/metanorma/cc/mathml4.rng
254
238
  - lib/metanorma/cc/metanorma-mathml.rng
255
239
  - lib/metanorma/cc/processor.rb
240
+ - lib/metanorma/cc/registers.rb
256
241
  - lib/metanorma/cc/relaton-cc.rng
257
242
  - lib/metanorma/cc/reqt.rng
243
+ - lib/metanorma/cc/standoc.rng
258
244
  - lib/metanorma/cc/validate.rb
259
245
  - lib/metanorma/cc/version.rb
260
246
  - metanorma-cc.gemspec
@@ -263,6 +249,7 @@ homepage: https://github.com/metanorma/metanorma-cc
263
249
  licenses:
264
250
  - BSD-2-Clause
265
251
  metadata: {}
252
+ post_install_message:
266
253
  rdoc_options: []
267
254
  require_paths:
268
255
  - lib
@@ -277,7 +264,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
264
  - !ruby/object:Gem::Version
278
265
  version: '0'
279
266
  requirements: []
280
- rubygems_version: 4.0.16
267
+ rubygems_version: 3.5.22
268
+ signing_key:
281
269
  specification_version: 4
282
270
  summary: metanorma-cc lets you write CalConnect standards in AsciiDoc.
283
271
  test_files: []