metanorma-document 0.2.8 → 0.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 +4 -4
- data/lib/metanorma/document/components/blocks/note_block.rb +1 -1
- data/lib/metanorma/document/components/inline/eref_element.rb +1 -1
- data/lib/metanorma/document/components/inline/fn_element.rb +1 -1
- data/lib/metanorma/document/components/lists/unordered_list.rb +2 -2
- data/lib/metanorma/document/components/multi_paragraph/admonition_block.rb +5 -2
- data/lib/metanorma/document/components/paragraphs/paragraph_block.rb +2 -2
- data/lib/metanorma/document/version.rb +1 -1
- data/lib/metanorma/html/base_renderer.rb +2 -2
- data/lib/metanorma/html/iso_renderer.rb +24 -1
- data/lib/metanorma/ietf_document/sections/ietf_annex_section.rb +1 -1
- data/lib/metanorma/ietf_document/sections/ietf_clause_section.rb +1 -1
- data/lib/metanorma/ietf_document/sections/ietf_content_section.rb +1 -1
- data/lib/metanorma/iso_document/metadata/doc_identifier.rb +1 -1
- data/lib/metanorma/iso_document/sections/iso_terms_section.rb +4 -3
- data/lib/metanorma/iso_document/terms/term_example.rb +2 -1
- data/lib/metanorma/iso_document/terms/term_note.rb +2 -1
- data/lib/metanorma/iso_document/terms/verbal_definition.rb +2 -1
- data/lib/metanorma/iso_document.rb +0 -1
- data/lib/metanorma/jis_document/sections/jis_annex_section.rb +1 -1
- data/lib/metanorma/standard_document/annotation_container.rb +25 -2
- data/lib/metanorma/standard_document/blocks/amend_content_block.rb +21 -3
- data/lib/metanorma/standard_document/blocks/standard_block_no_notes.rb +2 -2
- data/lib/metanorma/standard_document/boilerplate.rb +20 -2
- data/lib/metanorma/standard_document/sections/annex_section.rb +2 -2
- data/lib/metanorma/standard_document/sections/clause_hierarchical_section.rb +1 -1
- data/lib/metanorma/standard_document/sections/clause_section.rb +2 -2
- data/lib/metanorma/standard_document/sections/definition_section.rb +2 -2
- data/lib/metanorma/standard_document/sections/standard_content_section.rb +2 -2
- data/lib/metanorma/standard_document/sections/standard_hierarchical_section.rb +1 -1
- data/lib/metanorma/standard_document/sections/standard_references_section.rb +2 -2
- data/lib/metanorma/standard_document/sections/standard_section.rb +1 -1
- data/lib/metanorma/standard_document/sections/terms_section.rb +2 -2
- metadata +2 -3
- data/lib/metanorma/iso_document/raw_paragraph.rb +0 -23
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da12347749776b99b68dcc3816de625289ce2e56f51a9716c05d38088a4913b7
|
|
4
|
+
data.tar.gz: 2bf0989d205c0ab6a0c282fd5c4cab7d0c7deaccf012baafc64fa97c9160029f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1af9848d0640195e2176378b067214afe02f1da504893ed09686625e0a79f637bfad69fa5575d0959b59d31e78eff2b986dcdb42d63169db853ab808fb52bf22
|
|
7
|
+
data.tar.gz: 8dd05a2a8ed9344e5d70a35ab3c4653ec9b4c69dc001ef3cd400c6822b4874b8582304df5eee0798f37f8da43388e90fc71dbd88402d41fc1e401cd95fcd396a
|
|
@@ -7,7 +7,7 @@ module Metanorma
|
|
|
7
7
|
attribute :type, :string
|
|
8
8
|
attribute :bibitemid, :string
|
|
9
9
|
attribute :citeas, :string
|
|
10
|
-
attribute :normative, :
|
|
10
|
+
attribute :normative, :boolean
|
|
11
11
|
attribute :alt, :string
|
|
12
12
|
attribute :display_format, :string
|
|
13
13
|
attribute :relative, :string
|
|
@@ -5,7 +5,7 @@ module Metanorma
|
|
|
5
5
|
class FnElement < Lutaml::Model::Serializable
|
|
6
6
|
attribute :id, :string
|
|
7
7
|
attribute :reference, :string
|
|
8
|
-
attribute :hiddenref, :
|
|
8
|
+
attribute :hiddenref, :boolean
|
|
9
9
|
attribute :target, :string
|
|
10
10
|
attribute :semx_id, :string
|
|
11
11
|
attribute :original_reference, :string
|
|
@@ -9,10 +9,10 @@ module Metanorma
|
|
|
9
9
|
attribute :id, :string
|
|
10
10
|
attribute :semx_id, :string
|
|
11
11
|
attribute :original_id, :string
|
|
12
|
-
attribute :nobullet, :
|
|
12
|
+
attribute :nobullet, :boolean
|
|
13
13
|
attribute :spacing, :string
|
|
14
14
|
attribute :indent, :string
|
|
15
|
-
attribute :bare, :
|
|
15
|
+
attribute :bare, :boolean
|
|
16
16
|
attribute :json_type, :string
|
|
17
17
|
|
|
18
18
|
def json_type
|
|
@@ -10,7 +10,10 @@ module Metanorma
|
|
|
10
10
|
# Subclass of admonition determining how it is to be rendered; e.g.
|
|
11
11
|
# Warning, Note, Tip.
|
|
12
12
|
# Distinct admonition types are often associated with distinct icons or rendering.
|
|
13
|
-
attribute :type, :string
|
|
13
|
+
attribute :type, :string,
|
|
14
|
+
values: %w[danger caution warning important
|
|
15
|
+
safety\ precautions editorial tip note
|
|
16
|
+
commentary]
|
|
14
17
|
|
|
15
18
|
# Caption of admonition.
|
|
16
19
|
attribute :name, Metanorma::Document::Components::TextElements::TextElement,
|
|
@@ -28,7 +31,7 @@ module Metanorma
|
|
|
28
31
|
attribute :target, :string
|
|
29
32
|
|
|
30
33
|
# Whether the admonition is excluded from automatic numbering (UN).
|
|
31
|
-
attribute :unnumbered, :
|
|
34
|
+
attribute :unnumbered, :boolean
|
|
32
35
|
|
|
33
36
|
# Paragraphs within the admonition.
|
|
34
37
|
attribute :paragraphs,
|
|
@@ -11,8 +11,8 @@ module Metanorma
|
|
|
11
11
|
attribute :alignment, :string
|
|
12
12
|
attribute :semx_id, :string
|
|
13
13
|
attribute :original_id, :string
|
|
14
|
-
attribute :keep_with_next, :
|
|
15
|
-
attribute :keep_with_previous, :
|
|
14
|
+
attribute :keep_with_next, :boolean
|
|
15
|
+
attribute :keep_with_previous, :boolean
|
|
16
16
|
attribute :indent, :string
|
|
17
17
|
attribute :class_attr, :string
|
|
18
18
|
attribute :type_attr, :string
|
|
@@ -1143,7 +1143,7 @@ module Metanorma
|
|
|
1143
1143
|
end
|
|
1144
1144
|
|
|
1145
1145
|
def render_mixed_inline(node)
|
|
1146
|
-
# Models using map_all_content
|
|
1146
|
+
# Models using map_all_content: raw XML in content
|
|
1147
1147
|
if raw_content_node?(node)
|
|
1148
1148
|
raw = node.content
|
|
1149
1149
|
if raw.is_a?(String) && !raw.strip.empty?
|
|
@@ -1385,7 +1385,7 @@ module Metanorma
|
|
|
1385
1385
|
end
|
|
1386
1386
|
end
|
|
1387
1387
|
|
|
1388
|
-
# Process raw XML content from map_all_content models
|
|
1388
|
+
# Process raw XML content from map_all_content models.
|
|
1389
1389
|
# Strips source elements (xref, eref, stem) that have a following <semx>
|
|
1390
1390
|
# wrapper, keeping only the semx display content.
|
|
1391
1391
|
def render_raw_content(raw_xml)
|
|
@@ -589,7 +589,7 @@ module Metanorma
|
|
|
589
589
|
def render_boilerplate(boilerplate, **_opts)
|
|
590
590
|
return unless boilerplate
|
|
591
591
|
|
|
592
|
-
content = boilerplate
|
|
592
|
+
content = boilerplate_to_xml(boilerplate)
|
|
593
593
|
return unless content
|
|
594
594
|
|
|
595
595
|
@output << "<div class=\"boilerplate-copyright\">"
|
|
@@ -616,6 +616,29 @@ module Metanorma
|
|
|
616
616
|
@output << "</div>"
|
|
617
617
|
end
|
|
618
618
|
|
|
619
|
+
def boilerplate_to_xml(boilerplate)
|
|
620
|
+
parts = []
|
|
621
|
+
%i[copyright_statement license_statement legal_statement
|
|
622
|
+
feedback_statement clause].each do |attr|
|
|
623
|
+
items = boilerplate.public_send(attr)
|
|
624
|
+
next unless items
|
|
625
|
+
|
|
626
|
+
tag = attr.to_s.gsub("_", "-")
|
|
627
|
+
items.each do |item|
|
|
628
|
+
inner = item.to_xml
|
|
629
|
+
next if !inner || inner.strip.empty?
|
|
630
|
+
|
|
631
|
+
# Strip the outer <clause> wrapper — the inner content is what matters
|
|
632
|
+
stripped = inner.strip
|
|
633
|
+
stripped = stripped.sub(%r{^<clause[^>]*>\n?}, "").sub(%r{\n?</clause>$}, "")
|
|
634
|
+
parts << "<#{tag}>#{stripped}</#{tag}>"
|
|
635
|
+
end
|
|
636
|
+
end
|
|
637
|
+
return nil if parts.empty?
|
|
638
|
+
|
|
639
|
+
parts.join("\n")
|
|
640
|
+
end
|
|
641
|
+
|
|
619
642
|
def convert_boilerplate_links(raw)
|
|
620
643
|
doc = Nokogiri::XML.fragment(raw)
|
|
621
644
|
doc.css("link").each do |link|
|
|
@@ -6,7 +6,7 @@ module Metanorma
|
|
|
6
6
|
class IetfAnnexSection < Metanorma::StandardDocument::Sections::AnnexSection
|
|
7
7
|
# IETF-specific attributes
|
|
8
8
|
attribute :numbered, :string
|
|
9
|
-
attribute :remove_in_rfc, :
|
|
9
|
+
attribute :remove_in_rfc, :boolean
|
|
10
10
|
|
|
11
11
|
# Sub-clauses within IETF annex use IetfClauseSection
|
|
12
12
|
attribute :clause, IetfClauseSection, collection: true
|
|
@@ -6,7 +6,7 @@ module Metanorma
|
|
|
6
6
|
class IetfClauseSection < Metanorma::StandardDocument::Sections::ClauseSection
|
|
7
7
|
# IETF-specific attributes
|
|
8
8
|
attribute :numbered, :string
|
|
9
|
-
attribute :remove_in_rfc, :
|
|
9
|
+
attribute :remove_in_rfc, :boolean
|
|
10
10
|
|
|
11
11
|
# Recursive IETF sub-clauses
|
|
12
12
|
attribute :clause, IetfClauseSection, collection: true
|
|
@@ -5,7 +5,7 @@ module Metanorma
|
|
|
5
5
|
module Sections
|
|
6
6
|
class IetfContentSection < Metanorma::StandardDocument::Sections::ContentSection
|
|
7
7
|
attribute :numbered, :string
|
|
8
|
-
attribute :remove_in_rfc, :
|
|
8
|
+
attribute :remove_in_rfc, :boolean
|
|
9
9
|
|
|
10
10
|
# Recursive IETF sub-clauses
|
|
11
11
|
attribute :subsection, IetfContentSection, collection: true
|
|
@@ -7,7 +7,7 @@ module Metanorma
|
|
|
7
7
|
# Used for the multiple <docidentifier> elements in bibdata/bibitem.
|
|
8
8
|
class DocIdentifier < Lutaml::Model::Serializable
|
|
9
9
|
attribute :type, :string
|
|
10
|
-
attribute :primary, :
|
|
10
|
+
attribute :primary, :boolean
|
|
11
11
|
attribute :scope, :string
|
|
12
12
|
attribute :language, :string
|
|
13
13
|
attribute :value, :string
|
|
@@ -12,12 +12,13 @@ module Metanorma
|
|
|
12
12
|
attribute :type, :string
|
|
13
13
|
attribute :number, :string
|
|
14
14
|
attribute :obligation, :string
|
|
15
|
-
attribute :inline_header, :
|
|
16
|
-
attribute :unnumbered, :
|
|
15
|
+
attribute :inline_header, :boolean
|
|
16
|
+
attribute :unnumbered, :boolean
|
|
17
17
|
attribute :toc, :string
|
|
18
18
|
attribute :class_attr, :string
|
|
19
19
|
attribute :title, Metanorma::Document::Components::Inline::TitleWithAnnotationElement
|
|
20
|
-
attribute :p,
|
|
20
|
+
attribute :p, Metanorma::Document::Components::Paragraphs::ParagraphBlock,
|
|
21
|
+
collection: true
|
|
21
22
|
attribute :ul, Metanorma::Document::Components::Lists::UnorderedList,
|
|
22
23
|
collection: true
|
|
23
24
|
attribute :term, Metanorma::IsoDocument::Terms::IsoTerm,
|
|
@@ -8,7 +8,8 @@ module Metanorma
|
|
|
8
8
|
attribute :id, :string
|
|
9
9
|
attribute :semx_id, :string
|
|
10
10
|
attribute :autonum, :string
|
|
11
|
-
attribute :p,
|
|
11
|
+
attribute :p, Metanorma::Document::Components::Paragraphs::ParagraphBlock,
|
|
12
|
+
collection: true
|
|
12
13
|
attribute :ol, Metanorma::Document::Components::Lists::OrderedList,
|
|
13
14
|
collection: true
|
|
14
15
|
attribute :ul, Metanorma::Document::Components::Lists::UnorderedList,
|
|
@@ -9,7 +9,8 @@ module Metanorma
|
|
|
9
9
|
attribute :anchor, :string
|
|
10
10
|
attribute :semx_id, :string
|
|
11
11
|
attribute :autonum, :string
|
|
12
|
-
attribute :p,
|
|
12
|
+
attribute :p, Metanorma::Document::Components::Paragraphs::ParagraphBlock,
|
|
13
|
+
collection: true
|
|
13
14
|
attribute :ol, Metanorma::Document::Components::Lists::OrderedList,
|
|
14
15
|
collection: true
|
|
15
16
|
attribute :ul, Metanorma::Document::Components::Lists::UnorderedList,
|
|
@@ -7,7 +7,8 @@ module Metanorma
|
|
|
7
7
|
class VerbalDefinition < Lutaml::Model::Serializable
|
|
8
8
|
attribute :id, :string
|
|
9
9
|
attribute :semx_id, :string
|
|
10
|
-
attribute :p,
|
|
10
|
+
attribute :p, Metanorma::Document::Components::Paragraphs::ParagraphBlock,
|
|
11
|
+
collection: true
|
|
11
12
|
attribute :ol, Metanorma::Document::Components::Lists::OrderedList,
|
|
12
13
|
collection: true
|
|
13
14
|
attribute :ul, Metanorma::Document::Components::Lists::UnorderedList,
|
|
@@ -6,7 +6,6 @@ module Metanorma
|
|
|
6
6
|
autoload :Blocks, "metanorma/iso_document/blocks"
|
|
7
7
|
autoload :Boilerplate, "metanorma/iso_document/boilerplate"
|
|
8
8
|
autoload :Metadata, "metanorma/iso_document/metadata"
|
|
9
|
-
autoload :RawParagraph, "metanorma/iso_document/raw_paragraph"
|
|
10
9
|
autoload :Root, "metanorma/iso_document/root"
|
|
11
10
|
autoload :Sections, "metanorma/iso_document/sections"
|
|
12
11
|
autoload :Terms, "metanorma/iso_document/terms"
|
|
@@ -3,11 +3,34 @@
|
|
|
3
3
|
module Metanorma
|
|
4
4
|
module StandardDocument
|
|
5
5
|
class AnnotationContainer < Lutaml::Model::Serializable
|
|
6
|
-
|
|
6
|
+
class Annotation < Lutaml::Model::Serializable
|
|
7
|
+
attribute :id, :string
|
|
8
|
+
attribute :reviewer, :string
|
|
9
|
+
attribute :from, :string
|
|
10
|
+
attribute :to, :string
|
|
11
|
+
attribute :type, :string
|
|
12
|
+
attribute :date, :string
|
|
13
|
+
attribute :paragraphs,
|
|
14
|
+
Metanorma::Document::Components::Paragraphs::ParagraphBlock,
|
|
15
|
+
collection: true
|
|
16
|
+
|
|
17
|
+
xml do
|
|
18
|
+
element "annotation"
|
|
19
|
+
map_attribute "id", to: :id
|
|
20
|
+
map_attribute "reviewer", to: :reviewer
|
|
21
|
+
map_attribute "from", to: :from
|
|
22
|
+
map_attribute "to", to: :to
|
|
23
|
+
map_attribute "type", to: :type
|
|
24
|
+
map_attribute "date", to: :date
|
|
25
|
+
map_element "p", to: :paragraphs
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
attribute :annotations, Annotation, collection: true
|
|
7
30
|
|
|
8
31
|
xml do
|
|
9
32
|
element "annotation-container"
|
|
10
|
-
|
|
33
|
+
map_element "annotation", to: :annotations
|
|
11
34
|
end
|
|
12
35
|
end
|
|
13
36
|
end
|
|
@@ -4,12 +4,30 @@ module Metanorma
|
|
|
4
4
|
module StandardDocument
|
|
5
5
|
module Blocks
|
|
6
6
|
# Content block for amend description and new-content elements.
|
|
7
|
-
#
|
|
7
|
+
# Contains block-level content: paragraphs, notes, lists, tables, etc.
|
|
8
8
|
class AmendContentBlock < Lutaml::Model::Serializable
|
|
9
|
-
attribute :
|
|
9
|
+
attribute :paragraphs,
|
|
10
|
+
Metanorma::Document::Components::Paragraphs::ParagraphBlock,
|
|
11
|
+
collection: true
|
|
12
|
+
attribute :note,
|
|
13
|
+
Metanorma::Document::Components::Blocks::NoteBlock,
|
|
14
|
+
collection: true
|
|
15
|
+
attribute :ol,
|
|
16
|
+
Metanorma::Document::Components::Lists::OrderedList,
|
|
17
|
+
collection: true
|
|
18
|
+
attribute :ul,
|
|
19
|
+
Metanorma::Document::Components::Lists::UnorderedList,
|
|
20
|
+
collection: true
|
|
21
|
+
attribute :dl,
|
|
22
|
+
Metanorma::Document::Components::Lists::DefinitionList,
|
|
23
|
+
collection: true
|
|
10
24
|
|
|
11
25
|
xml do
|
|
12
|
-
|
|
26
|
+
map_element "p", to: :paragraphs
|
|
27
|
+
map_element "note", to: :note
|
|
28
|
+
map_element "ol", to: :ol
|
|
29
|
+
map_element "ul", to: :ul
|
|
30
|
+
map_element "dl", to: :dl
|
|
13
31
|
end
|
|
14
32
|
end
|
|
15
33
|
end
|
|
@@ -4,8 +4,8 @@ module Metanorma
|
|
|
4
4
|
module StandardDocument
|
|
5
5
|
module Blocks
|
|
6
6
|
class StandardBlockNoNotes < Metanorma::Document::Components::Blocks::BasicBlockNoNotes
|
|
7
|
-
attribute :keep_with_next, :
|
|
8
|
-
attribute :keep_lines_together, :
|
|
7
|
+
attribute :keep_with_next, :boolean
|
|
8
|
+
attribute :keep_lines_together, :boolean
|
|
9
9
|
attribute :tag, :string
|
|
10
10
|
attribute :multilingual_rendering, :string
|
|
11
11
|
attribute :columns, :string
|
|
@@ -3,11 +3,29 @@
|
|
|
3
3
|
module Metanorma
|
|
4
4
|
module StandardDocument
|
|
5
5
|
class Boilerplate < Lutaml::Model::Serializable
|
|
6
|
-
attribute :
|
|
6
|
+
attribute :copyright_statement,
|
|
7
|
+
Metanorma::StandardDocument::Sections::ContentSection,
|
|
8
|
+
collection: true
|
|
9
|
+
attribute :license_statement,
|
|
10
|
+
Metanorma::StandardDocument::Sections::ContentSection,
|
|
11
|
+
collection: true
|
|
12
|
+
attribute :legal_statement,
|
|
13
|
+
Metanorma::StandardDocument::Sections::ContentSection,
|
|
14
|
+
collection: true
|
|
15
|
+
attribute :feedback_statement,
|
|
16
|
+
Metanorma::StandardDocument::Sections::ContentSection,
|
|
17
|
+
collection: true
|
|
18
|
+
attribute :clause,
|
|
19
|
+
Metanorma::StandardDocument::Sections::ContentSection,
|
|
20
|
+
collection: true
|
|
7
21
|
|
|
8
22
|
xml do
|
|
9
23
|
element "boilerplate"
|
|
10
|
-
|
|
24
|
+
map_element "copyright-statement", to: :copyright_statement
|
|
25
|
+
map_element "license-statement", to: :license_statement
|
|
26
|
+
map_element "legal-statement", to: :legal_statement
|
|
27
|
+
map_element "feedback-statement", to: :feedback_statement
|
|
28
|
+
map_element "clause", to: :clause
|
|
11
29
|
end
|
|
12
30
|
end
|
|
13
31
|
end
|
|
@@ -19,9 +19,9 @@ module Metanorma
|
|
|
19
19
|
attribute :id, :string
|
|
20
20
|
attribute :number, :string
|
|
21
21
|
attribute :obligation, :string
|
|
22
|
-
attribute :unnumbered, :
|
|
22
|
+
attribute :unnumbered, :boolean
|
|
23
23
|
attribute :toc, :string
|
|
24
|
-
attribute :inline_header, :
|
|
24
|
+
attribute :inline_header, :boolean
|
|
25
25
|
attribute :title,
|
|
26
26
|
Metanorma::Document::Components::Inline::TitleWithAnnotationElement
|
|
27
27
|
|
|
@@ -20,8 +20,8 @@ module Metanorma
|
|
|
20
20
|
attribute :type, :string
|
|
21
21
|
attribute :number, :string
|
|
22
22
|
attribute :obligation, :string
|
|
23
|
-
attribute :inline_header, :
|
|
24
|
-
attribute :unnumbered, :
|
|
23
|
+
attribute :inline_header, :boolean
|
|
24
|
+
attribute :unnumbered, :boolean
|
|
25
25
|
attribute :toc, :string
|
|
26
26
|
attribute :class_attr, :string
|
|
27
27
|
attribute :title,
|
|
@@ -20,8 +20,8 @@ module Metanorma
|
|
|
20
20
|
attribute :type, :string
|
|
21
21
|
attribute :number, :string
|
|
22
22
|
attribute :obligation, :string
|
|
23
|
-
attribute :inline_header, :
|
|
24
|
-
attribute :unnumbered, :
|
|
23
|
+
attribute :inline_header, :boolean
|
|
24
|
+
attribute :unnumbered, :boolean
|
|
25
25
|
attribute :toc, :string
|
|
26
26
|
attribute :class_attr, :string
|
|
27
27
|
attribute :title,
|
|
@@ -18,8 +18,8 @@ module Metanorma
|
|
|
18
18
|
attribute :type, :string
|
|
19
19
|
attribute :number, :string
|
|
20
20
|
attribute :obligation, :string
|
|
21
|
-
attribute :inline_header, :
|
|
22
|
-
attribute :unnumbered, :
|
|
21
|
+
attribute :inline_header, :boolean
|
|
22
|
+
attribute :unnumbered, :boolean
|
|
23
23
|
attribute :toc, :string
|
|
24
24
|
attribute :class_attr, :string
|
|
25
25
|
attribute :title,
|
|
@@ -17,9 +17,9 @@ module Metanorma
|
|
|
17
17
|
# bibliographical references (as modelled in Relaton), along with
|
|
18
18
|
# any prefatory text.
|
|
19
19
|
class StandardReferencesSection < Metanorma::StandardDocument::Sections::StandardSection
|
|
20
|
-
attribute :normative, :
|
|
20
|
+
attribute :normative, :boolean
|
|
21
21
|
attribute :obligation, :string
|
|
22
|
-
attribute :hidden, :
|
|
22
|
+
attribute :hidden, :boolean
|
|
23
23
|
attribute :references, Metanorma::Document::Components::BibData::BibliographicItem,
|
|
24
24
|
collection: true
|
|
25
25
|
attribute :passthrough, Metanorma::StandardDocument::Blocks::Passthrough,
|
|
@@ -10,7 +10,7 @@ module Metanorma
|
|
|
10
10
|
attribute :amend, Metanorma::StandardDocument::Blocks::AmendBlock
|
|
11
11
|
attribute :number, :string
|
|
12
12
|
attribute :branch_number, :string
|
|
13
|
-
attribute :unnumbered, :
|
|
13
|
+
attribute :unnumbered, :boolean
|
|
14
14
|
attribute :obligation, :string
|
|
15
15
|
|
|
16
16
|
attribute :semx_id, :string
|
|
@@ -19,8 +19,8 @@ module Metanorma
|
|
|
19
19
|
attribute :type, :string
|
|
20
20
|
attribute :number, :string
|
|
21
21
|
attribute :obligation, :string
|
|
22
|
-
attribute :inline_header, :
|
|
23
|
-
attribute :unnumbered, :
|
|
22
|
+
attribute :inline_header, :boolean
|
|
23
|
+
attribute :unnumbered, :boolean
|
|
24
24
|
attribute :toc, :string
|
|
25
25
|
attribute :class_attr, :string
|
|
26
26
|
attribute :title,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-document
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.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: 2026-05-
|
|
11
|
+
date: 2026-05-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|
|
@@ -604,7 +604,6 @@ files:
|
|
|
604
604
|
- lib/metanorma/iso_document/metadata/title_main.rb
|
|
605
605
|
- lib/metanorma/iso_document/metadata/title_part.rb
|
|
606
606
|
- lib/metanorma/iso_document/metadata/title_part_prefix.rb
|
|
607
|
-
- lib/metanorma/iso_document/raw_paragraph.rb
|
|
608
607
|
- lib/metanorma/iso_document/root.rb
|
|
609
608
|
- lib/metanorma/iso_document/sections.rb
|
|
610
609
|
- lib/metanorma/iso_document/sections/colophon.rb
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module IsoDocument
|
|
5
|
-
# Paragraph with mixed inline content preserved as raw XML.
|
|
6
|
-
# Used for contexts where <p> contains inline elements like
|
|
7
|
-
# <concept>, <xref>, <em>, <strong>, <stem>, <fn>, <link>.
|
|
8
|
-
class RawParagraph < Lutaml::Model::Serializable
|
|
9
|
-
attribute :id, :string
|
|
10
|
-
attribute :semx_id, :string
|
|
11
|
-
attribute :original_id, :string
|
|
12
|
-
attribute :content, :string
|
|
13
|
-
|
|
14
|
-
xml do
|
|
15
|
-
element "p"
|
|
16
|
-
map_attribute "id", to: :id
|
|
17
|
-
map_attribute "semx-id", to: :semx_id
|
|
18
|
-
map_attribute "original-id", to: :original_id
|
|
19
|
-
map_all_content to: :content
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|