metanorma-document 0.5.1 → 0.5.2.pre.alpha.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 +4 -4
- data/README.adoc +81 -0
- data/Rakefile +3 -7
- data/data/themes/ogc.yaml +5 -0
- data/lib/metanorma/basic_document/ancillary_blocks/figure_block.rb +2 -2
- data/lib/metanorma/basic_document/multi_paragraph/admonition_block.rb +2 -2
- data/lib/metanorma/document/cli.rb +134 -0
- data/lib/metanorma/document/components/ancillary_blocks/figure_block.rb +5 -0
- data/lib/metanorma/document/components/ancillary_blocks/fmt_figure_element.rb +47 -0
- data/lib/metanorma/document/components/ancillary_blocks/formula_block.rb +2 -0
- data/lib/metanorma/document/components/ancillary_blocks/imagemap_element.rb +73 -0
- data/lib/metanorma/document/components/ancillary_blocks/literal_block.rb +2 -0
- data/lib/metanorma/document/components/ancillary_blocks/sourcecode_block.rb +2 -0
- data/lib/metanorma/document/components/ancillary_blocks/svg_target_element.rb +27 -0
- data/lib/metanorma/document/components/ancillary_blocks/svgmap_element.rb +28 -0
- data/lib/metanorma/document/components/ancillary_blocks.rb +4 -0
- data/lib/metanorma/document/components/bib_data/bibliographic_item.rb +4 -0
- data/lib/metanorma/document/components/blocks/fmt_provision.rb +25 -0
- data/lib/metanorma/document/components/blocks/note_block.rb +8 -0
- data/lib/metanorma/document/components/blocks/permission_model.rb +9 -0
- data/lib/metanorma/document/components/blocks/recommendation_model.rb +9 -0
- data/lib/metanorma/document/components/blocks/requirement_base.rb +12 -0
- data/lib/metanorma/document/components/blocks/requirement_import.rb +23 -0
- data/lib/metanorma/document/components/blocks/requirement_measurement_target.rb +23 -0
- data/lib/metanorma/document/components/blocks/requirement_model.rb +9 -0
- data/lib/metanorma/document/components/blocks/requirement_specification.rb +23 -0
- data/lib/metanorma/document/components/blocks/requirement_verification.rb +23 -0
- data/lib/metanorma/document/components/blocks.rb +8 -0
- data/lib/metanorma/document/components/data_types/formatted_string.rb +9 -0
- data/lib/metanorma/document/components/id_elements/image.rb +4 -0
- data/lib/metanorma/document/components/inline/columnbreak_element.rb +17 -0
- data/lib/metanorma/document/components/inline/concept_element.rb +18 -0
- data/lib/metanorma/document/components/inline/date_element.rb +29 -0
- data/lib/metanorma/document/components/inline/display_text_element.rb +2 -0
- data/lib/metanorma/document/components/inline/em_raw_element.rb +6 -7
- data/lib/metanorma/document/components/inline/eref_element.rb +48 -22
- data/lib/metanorma/document/components/inline/eref_stack.rb +23 -0
- data/lib/metanorma/document/components/inline/error_message.rb +28 -0
- data/lib/metanorma/document/components/inline/fmt_date_element.rb +28 -0
- data/lib/metanorma/document/components/inline/fmt_date_inline_element.rb +26 -0
- data/lib/metanorma/document/components/inline/fmt_eref_element.rb +25 -0
- data/lib/metanorma/document/components/inline/fmt_origin_element.rb +24 -0
- data/lib/metanorma/document/components/inline/fmt_preferred_element.rb +3 -0
- data/lib/metanorma/document/components/inline/fmt_source_element.rb +31 -0
- data/lib/metanorma/document/components/inline/fn_element.rb +11 -0
- data/lib/metanorma/document/components/inline/link_element.rb +8 -0
- data/lib/metanorma/document/components/inline/name_with_id_element.rb +2 -0
- data/lib/metanorma/document/components/inline/refterm_element.rb +21 -0
- data/lib/metanorma/document/components/inline/semx_element.rb +22 -0
- data/lib/metanorma/document/components/inline/sourcelocality_stack_element.rb +27 -0
- data/lib/metanorma/document/components/inline/span_element.rb +2 -0
- data/lib/metanorma/document/components/inline/stem_inline_element.rb +2 -0
- data/lib/metanorma/document/components/inline/strong_raw_element.rb +6 -9
- data/lib/metanorma/document/components/inline/sub_element.rb +2 -0
- data/lib/metanorma/document/components/inline/termref_element.rb +24 -0
- data/lib/metanorma/document/components/inline/title_with_annotation_element.rb +10 -31
- data/lib/metanorma/document/components/inline/variant_title_element.rb +2 -0
- data/lib/metanorma/document/components/inline/vocabulary.rb +36 -0
- data/lib/metanorma/document/components/inline.rb +23 -0
- data/lib/metanorma/document/components/lists/dd_element.rb +6 -1
- data/lib/metanorma/document/components/lists/definition.rb +2 -0
- data/lib/metanorma/document/components/lists/definition_list.rb +3 -0
- data/lib/metanorma/document/components/lists/dt_element.rb +3 -0
- data/lib/metanorma/document/components/lists/fmt_list_element.rb +73 -0
- data/lib/metanorma/document/components/lists/list_item.rb +3 -0
- data/lib/metanorma/document/components/lists/ordered_list.rb +4 -2
- data/lib/metanorma/document/components/lists/unordered_list.rb +2 -0
- data/lib/metanorma/document/components/lists.rb +2 -0
- data/lib/metanorma/document/components/multi_paragraph/quote_block.rb +16 -0
- data/lib/metanorma/document/components/multi_paragraph/review_block.rb +2 -2
- data/lib/metanorma/document/components/paragraphs/paragraph_block.rb +15 -0
- data/lib/metanorma/document/components/reference_elements/citation.rb +7 -0
- data/lib/metanorma/document/components/reference_elements/source_element.rb +4 -0
- data/lib/metanorma/document/components/semantic/node.rb +46 -0
- data/lib/metanorma/document/components/semantic.rb +11 -0
- data/lib/metanorma/document/components/tables/header_table_cell.rb +1 -0
- data/lib/metanorma/document/components/tables/table_cell.rb +70 -44
- data/lib/metanorma/document/components/tables/text_table_cell.rb +1 -0
- data/lib/metanorma/document/components/tables/text_table_row.rb +2 -0
- data/lib/metanorma/document/components/text_elements/ruby_annotation_element.rb +26 -0
- data/lib/metanorma/document/components/text_elements/ruby_element.rb +41 -6
- data/lib/metanorma/document/components/text_elements/ruby_pronunciation_element.rb +25 -0
- data/lib/metanorma/document/components/text_elements/strike_element.rb +3 -0
- data/lib/metanorma/document/components/text_elements/underline_element.rb +3 -0
- data/lib/metanorma/document/components/text_elements.rb +2 -0
- data/lib/metanorma/document/components.rb +1 -0
- data/lib/metanorma/document/grammar_vocabulary.rb +109 -0
- data/lib/metanorma/document/mirror_seed.rb +253 -0
- data/lib/metanorma/document/mko/collection.rb +168 -0
- data/lib/metanorma/document/mko/exporter.rb +17 -0
- data/lib/metanorma/document/mko/project.rb +1110 -0
- data/lib/metanorma/document/mko.rb +122 -0
- data/lib/metanorma/document/model_access.rb +44 -0
- data/lib/metanorma/document/native_models.rb +319 -0
- data/lib/metanorma/document/plain_text.rb +39 -0
- data/lib/metanorma/document/relaton/version_info.rb +4 -0
- data/lib/metanorma/document/version.rb +1 -1
- data/lib/metanorma/document.rb +19 -26
- data/lib/metanorma/{collection → document_collection}/directive.rb +1 -1
- data/lib/metanorma/{collection → document_collection}/doc_container.rb +6 -2
- data/lib/metanorma/{collection → document_collection}/entry.rb +2 -2
- data/lib/metanorma/{collection → document_collection}/root.rb +2 -2
- data/lib/metanorma/document_collection.rb +10 -0
- data/lib/metanorma/html/base_renderer.rb +94 -25
- data/lib/metanorma/html/component/footnote_collector.rb +21 -20
- data/lib/metanorma/html/concerns/metadata_extraction.rb +8 -3
- data/lib/metanorma/html/concerns/presentation_validation.rb +1 -2
- data/lib/metanorma/html/concerns/text_extraction.rb +154 -35
- data/lib/metanorma/html/concerns.rb +19 -0
- data/lib/metanorma/html/drops/admonition_drop.rb +1 -1
- data/lib/metanorma/html/drops/footnote_drop.rb +1 -1
- data/lib/metanorma/html/drops/sourcecode_drop.rb +22 -4
- data/lib/metanorma/html/generator.rb +11 -187
- data/lib/metanorma/html/renderer_delegation.rb +2 -2
- data/lib/metanorma/html/renderers/block_renderer.rb +206 -46
- data/lib/metanorma/html/renderers/inline_renderer.rb +144 -17
- data/lib/metanorma/html/renderers/section_renderer.rb +12 -2
- data/lib/metanorma/html/renderers/semantic_renderer.rb +487 -0
- data/lib/metanorma/html/renderers.rb +2 -0
- data/lib/metanorma/html/standard_renderer.rb +732 -76
- data/lib/metanorma/html/templates/_agency_cover.html.liquid +30 -0
- data/lib/metanorma/html/templates/_columnbreak.html.liquid +1 -0
- data/lib/metanorma/html/templates/_cover.html.liquid +3 -0
- data/lib/metanorma/html/templates/_main_content.html.liquid +1 -1
- data/lib/metanorma/html/templates/_ruby.html.liquid +1 -0
- data/lib/metanorma/html/templates/_sourcecode.html.liquid +4 -3
- data/lib/metanorma/html/templates/_standard_cover.html.liquid +54 -3
- data/lib/metanorma/html.rb +30 -15
- data/tasks/flavors.rake +116 -0
- data/tasks/grammar.rake +28 -0
- data/tasks/roundtrip_samples.rake +48 -34
- metadata +121 -416
- data/frontend/dist/app.css +0 -1
- data/frontend/dist/app.iife.js +0 -24
- data/lib/metanorma/bipm_document/metadata/bipm_bib_data_extension_type.rb +0 -20
- data/lib/metanorma/bipm_document/metadata/bipm_bibliographic_item.rb +0 -17
- data/lib/metanorma/bipm_document/metadata/bipm_structured_identifier.rb +0 -21
- data/lib/metanorma/bipm_document/metadata/depiction_element.rb +0 -18
- data/lib/metanorma/bipm_document/metadata.rb +0 -15
- data/lib/metanorma/bipm_document/root.rb +0 -25
- data/lib/metanorma/bipm_document.rb +0 -8
- data/lib/metanorma/bsi_document/metadata/bsi_bib_data_extension_type.rb +0 -10
- data/lib/metanorma/bsi_document/metadata/bsi_bibliographic_item.rb +0 -15
- data/lib/metanorma/bsi_document/metadata.rb +0 -12
- data/lib/metanorma/bsi_document/root.rb +0 -29
- data/lib/metanorma/bsi_document/sections/bsi_annex_section.rb +0 -25
- data/lib/metanorma/bsi_document/sections/bsi_clause_section.rb +0 -25
- data/lib/metanorma/bsi_document/sections/bsi_sections.rb +0 -27
- data/lib/metanorma/bsi_document/sections.rb +0 -11
- data/lib/metanorma/bsi_document.rb +0 -11
- data/lib/metanorma/cc_document/metadata/cc_bib_data_extension_type.rb +0 -12
- data/lib/metanorma/cc_document/metadata/cc_bibliographic_item.rb +0 -17
- data/lib/metanorma/cc_document/metadata.rb +0 -11
- data/lib/metanorma/cc_document/root.rb +0 -25
- data/lib/metanorma/cc_document.rb +0 -8
- data/lib/metanorma/collection.rb +0 -10
- data/lib/metanorma/csa_document/root.rb +0 -27
- data/lib/metanorma/csa_document.rb +0 -9
- data/lib/metanorma/gb_document/metadata/gb_bib_data_extension_type.rb +0 -10
- data/lib/metanorma/gb_document/metadata/gb_bibliographic_item.rb +0 -15
- data/lib/metanorma/gb_document/metadata.rb +0 -12
- data/lib/metanorma/gb_document/root.rb +0 -29
- data/lib/metanorma/gb_document.rb +0 -10
- data/lib/metanorma/generic_document/root.rb +0 -31
- data/lib/metanorma/generic_document.rb +0 -7
- data/lib/metanorma/html/bipm_renderer.rb +0 -23
- data/lib/metanorma/html/cc_renderer.rb +0 -9
- data/lib/metanorma/html/csa_renderer.rb +0 -9
- data/lib/metanorma/html/flavor.rb +0 -50
- data/lib/metanorma/html/flavor_registry.rb +0 -49
- data/lib/metanorma/html/icc_renderer.rb +0 -10
- data/lib/metanorma/html/iec_renderer.rb +0 -9
- data/lib/metanorma/html/ieee_renderer.rb +0 -9
- data/lib/metanorma/html/ietf_renderer.rb +0 -9
- data/lib/metanorma/html/iho_renderer.rb +0 -9
- data/lib/metanorma/html/iso_renderer.rb +0 -535
- data/lib/metanorma/html/itu_renderer.rb +0 -9
- data/lib/metanorma/html/ogc_renderer.rb +0 -23
- data/lib/metanorma/html/pdfa_renderer.rb +0 -10
- data/lib/metanorma/html/ribose_renderer.rb +0 -9
- data/lib/metanorma/html/templates/_bipm_cover.html.liquid +0 -27
- data/lib/metanorma/html/templates/_iso_cover.html.liquid +0 -31
- data/lib/metanorma/html/templates/_iso_doc_title.html.liquid +0 -3
- data/lib/metanorma/iec_document/root.rb +0 -27
- data/lib/metanorma/iec_document.rb +0 -9
- data/lib/metanorma/ieee_document/metadata/ieee_bib_data_extension_type.rb +0 -18
- data/lib/metanorma/ieee_document/metadata/ieee_bibliographic_item.rb +0 -20
- data/lib/metanorma/ieee_document/metadata/ieee_structured_identifier.rb +0 -25
- data/lib/metanorma/ieee_document/metadata.rb +0 -14
- data/lib/metanorma/ieee_document/root.rb +0 -29
- data/lib/metanorma/ieee_document/sections/ieee_sections.rb +0 -31
- data/lib/metanorma/ieee_document/sections.rb +0 -9
- data/lib/metanorma/ieee_document.rb +0 -11
- data/lib/metanorma/ietf_document/metadata/ietf_bib_data_extension_type.rb +0 -31
- data/lib/metanorma/ietf_document/metadata/ietf_bibliographic_item.rb +0 -51
- data/lib/metanorma/ietf_document/metadata/ietf_editorial_group.rb +0 -17
- data/lib/metanorma/ietf_document/metadata/pi_settings.rb +0 -32
- data/lib/metanorma/ietf_document/metadata.rb +0 -16
- data/lib/metanorma/ietf_document/root.rb +0 -30
- data/lib/metanorma/ietf_document/sections/ietf_annex_section.rb +0 -26
- data/lib/metanorma/ietf_document/sections/ietf_clause_section.rb +0 -26
- data/lib/metanorma/ietf_document/sections/ietf_content_section.rb +0 -25
- data/lib/metanorma/ietf_document/sections/ietf_sections.rb +0 -35
- data/lib/metanorma/ietf_document/sections.rb +0 -12
- data/lib/metanorma/ietf_document.rb +0 -11
- data/lib/metanorma/iho_document/metadata/iho_bib_data_extension_type.rb +0 -23
- data/lib/metanorma/iho_document/metadata/iho_bibliographic_item.rb +0 -20
- data/lib/metanorma/iho_document/metadata/iho_editorial_group.rb +0 -19
- data/lib/metanorma/iho_document/metadata/iho_series.rb +0 -22
- data/lib/metanorma/iho_document/metadata/iho_sub_group.rb +0 -18
- data/lib/metanorma/iho_document/metadata.rb +0 -15
- data/lib/metanorma/iho_document/root.rb +0 -25
- data/lib/metanorma/iho_document.rb +0 -8
- data/lib/metanorma/iso_document/annotation_container.rb +0 -7
- data/lib/metanorma/iso_document/blocks/iso_admonition_block.rb +0 -27
- data/lib/metanorma/iso_document/blocks/iso_admonition_type.rb +0 -25
- data/lib/metanorma/iso_document/blocks.rb +0 -12
- data/lib/metanorma/iso_document/boilerplate.rb +0 -7
- data/lib/metanorma/iso_document/metadata/abstract_title.rb +0 -36
- data/lib/metanorma/iso_document/metadata/doc_identifier.rb +0 -26
- data/lib/metanorma/iso_document/metadata/doctype_element.rb +0 -20
- data/lib/metanorma/iso_document/metadata/ics.rb +0 -19
- data/lib/metanorma/iso_document/metadata/iec_document_category.rb +0 -23
- data/lib/metanorma/iso_document/metadata/iso_bib_data_extension_type.rb +0 -38
- data/lib/metanorma/iso_document/metadata/iso_bibliographic_item.rb +0 -103
- data/lib/metanorma/iso_document/metadata/iso_document_id.rb +0 -46
- data/lib/metanorma/iso_document/metadata/iso_document_stage_codes.rb +0 -26
- data/lib/metanorma/iso_document/metadata/iso_document_status.rb +0 -26
- data/lib/metanorma/iso_document/metadata/iso_document_substage_codes.rb +0 -26
- data/lib/metanorma/iso_document/metadata/iso_document_type.rb +0 -25
- data/lib/metanorma/iso_document/metadata/iso_localized_title.rb +0 -61
- data/lib/metanorma/iso_document/metadata/iso_project_group.rb +0 -32
- data/lib/metanorma/iso_document/metadata/iso_sub_group.rb +0 -38
- data/lib/metanorma/iso_document/metadata/language_element.rb +0 -18
- data/lib/metanorma/iso_document/metadata/metanorma_extension.rb +0 -9
- data/lib/metanorma/iso_document/metadata/project_number.rb +0 -22
- data/lib/metanorma/iso_document/metadata/script_element.rb +0 -18
- data/lib/metanorma/iso_document/metadata/stage_element.rb +0 -26
- data/lib/metanorma/iso_document/metadata/stagename_element.rb +0 -18
- data/lib/metanorma/iso_document/metadata/structured_identifier.rb +0 -16
- data/lib/metanorma/iso_document/metadata/title_amd.rb +0 -12
- data/lib/metanorma/iso_document/metadata/title_amendment_prefix.rb +0 -12
- data/lib/metanorma/iso_document/metadata/title_collection.rb +0 -47
- data/lib/metanorma/iso_document/metadata/title_full.rb +0 -12
- data/lib/metanorma/iso_document/metadata/title_intro.rb +0 -12
- data/lib/metanorma/iso_document/metadata/title_main.rb +0 -12
- data/lib/metanorma/iso_document/metadata/title_part.rb +0 -12
- data/lib/metanorma/iso_document/metadata/title_part_prefix.rb +0 -12
- data/lib/metanorma/iso_document/metadata.rb +0 -44
- data/lib/metanorma/iso_document/root.rb +0 -26
- data/lib/metanorma/iso_document/sections/colophon.rb +0 -3
- data/lib/metanorma/iso_document/sections/iso_abstract_section.rb +0 -15
- data/lib/metanorma/iso_document/sections/iso_amendment_clause.rb +0 -24
- data/lib/metanorma/iso_document/sections/iso_annex_section.rb +0 -50
- data/lib/metanorma/iso_document/sections/iso_clause_section.rb +0 -49
- data/lib/metanorma/iso_document/sections/iso_foreword_section.rb +0 -33
- data/lib/metanorma/iso_document/sections/iso_preface.rb +0 -51
- data/lib/metanorma/iso_document/sections/iso_sections.rb +0 -51
- data/lib/metanorma/iso_document/sections/iso_terms_section.rb +0 -76
- data/lib/metanorma/iso_document/sections.rb +0 -17
- data/lib/metanorma/iso_document/terms/iso_term.rb +0 -71
- data/lib/metanorma/iso_document/terms/iso_term_collection.rb +0 -20
- data/lib/metanorma/iso_document/terms/term_definition.rb +0 -30
- data/lib/metanorma/iso_document/terms/term_designation.rb +0 -44
- data/lib/metanorma/iso_document/terms/term_domain_element.rb +0 -18
- data/lib/metanorma/iso_document/terms/term_example.rb +0 -40
- data/lib/metanorma/iso_document/terms/term_expression.rb +0 -10
- data/lib/metanorma/iso_document/terms/term_note.rb +0 -42
- data/lib/metanorma/iso_document/terms/term_origin.rb +0 -4
- data/lib/metanorma/iso_document/terms/term_source.rb +0 -21
- data/lib/metanorma/iso_document/terms/verbal_definition.rb +0 -42
- data/lib/metanorma/iso_document/terms.rb +0 -21
- data/lib/metanorma/iso_document.rb +0 -15
- data/lib/metanorma/itu_document/metadata/itu_bib_data_extension_type.rb +0 -26
- data/lib/metanorma/itu_document/metadata/itu_bibliographic_item.rb +0 -21
- data/lib/metanorma/itu_document/metadata/itu_series.rb +0 -22
- data/lib/metanorma/itu_document/metadata/itu_structured_identifier.rb +0 -23
- data/lib/metanorma/itu_document/metadata/meeting_date.rb +0 -18
- data/lib/metanorma/itu_document/metadata/meeting_element.rb +0 -18
- data/lib/metanorma/itu_document/metadata/study_period.rb +0 -18
- data/lib/metanorma/itu_document/metadata.rb +0 -18
- data/lib/metanorma/itu_document/root.rb +0 -25
- data/lib/metanorma/itu_document.rb +0 -8
- data/lib/metanorma/jis_document/metadata/jis_bib_data_extension_type.rb +0 -10
- data/lib/metanorma/jis_document/metadata/jis_bibliographic_item.rb +0 -15
- data/lib/metanorma/jis_document/metadata.rb +0 -12
- data/lib/metanorma/jis_document/root.rb +0 -29
- data/lib/metanorma/jis_document/sections/jis_annex_section.rb +0 -20
- data/lib/metanorma/jis_document/sections.rb +0 -9
- data/lib/metanorma/jis_document.rb +0 -11
- data/lib/metanorma/m3d_document/metadata/m3d_bib_data_extension_type.rb +0 -10
- data/lib/metanorma/m3d_document/metadata/m3d_bibliographic_item.rb +0 -15
- data/lib/metanorma/m3d_document/metadata.rb +0 -12
- data/lib/metanorma/m3d_document/root.rb +0 -29
- data/lib/metanorma/m3d_document.rb +0 -10
- data/lib/metanorma/mirror/default_registry.rb +0 -191
- data/lib/metanorma/mirror/handler_registry.rb +0 -60
- data/lib/metanorma/mirror/handler_result.rb +0 -37
- data/lib/metanorma/mirror/handlers/admonition.rb +0 -18
- data/lib/metanorma/mirror/handlers/example.rb +0 -21
- data/lib/metanorma/mirror/handlers/figure.rb +0 -53
- data/lib/metanorma/mirror/handlers/formula.rb +0 -35
- data/lib/metanorma/mirror/handlers/inline/catalog.rb +0 -52
- data/lib/metanorma/mirror/handlers/inline/rich_html_renderer.rb +0 -158
- data/lib/metanorma/mirror/handlers/inline/text_extractor.rb +0 -116
- data/lib/metanorma/mirror/handlers/inline.rb +0 -226
- data/lib/metanorma/mirror/handlers/list.rb +0 -110
- data/lib/metanorma/mirror/handlers/note.rb +0 -26
- data/lib/metanorma/mirror/handlers/paragraph.rb +0 -19
- data/lib/metanorma/mirror/handlers/quote.rb +0 -16
- data/lib/metanorma/mirror/handlers/review.rb +0 -19
- data/lib/metanorma/mirror/handlers/section.rb +0 -149
- data/lib/metanorma/mirror/handlers/sourcecode.rb +0 -27
- data/lib/metanorma/mirror/handlers/structural.rb +0 -68
- data/lib/metanorma/mirror/handlers/table.rb +0 -81
- data/lib/metanorma/mirror/handlers/term.rb +0 -100
- data/lib/metanorma/mirror/handlers.rb +0 -60
- data/lib/metanorma/mirror/id_strategy/positional.rb +0 -166
- data/lib/metanorma/mirror/id_strategy/preserve.rb +0 -12
- data/lib/metanorma/mirror/id_strategy.rb +0 -34
- data/lib/metanorma/mirror/math_util.rb +0 -53
- data/lib/metanorma/mirror/metadata.rb +0 -37
- data/lib/metanorma/mirror/model/container.rb +0 -47
- data/lib/metanorma/mirror/model/factory.rb +0 -52
- data/lib/metanorma/mirror/model/guide.rb +0 -26
- data/lib/metanorma/mirror/model/leaf.rb +0 -17
- data/lib/metanorma/mirror/model/mark.rb +0 -53
- data/lib/metanorma/mirror/model/node.rb +0 -47
- data/lib/metanorma/mirror/model/soft_break.rb +0 -33
- data/lib/metanorma/mirror/model/text.rb +0 -34
- data/lib/metanorma/mirror/model.rb +0 -16
- data/lib/metanorma/mirror/output/builder.rb +0 -39
- data/lib/metanorma/mirror/output/formats/base_format.rb +0 -90
- data/lib/metanorma/mirror/output/formats/inline_format.rb +0 -142
- data/lib/metanorma/mirror/output/formats.rb +0 -53
- data/lib/metanorma/mirror/output/pipeline.rb +0 -93
- data/lib/metanorma/mirror/output/pipeline_context.rb +0 -22
- data/lib/metanorma/mirror/output.rb +0 -12
- data/lib/metanorma/mirror/rewriter.rb +0 -123
- data/lib/metanorma/mirror/safe_attr.rb +0 -16
- data/lib/metanorma/mirror/serialization/json_serializer.rb +0 -25
- data/lib/metanorma/mirror/serialization/yaml_serializer.rb +0 -20
- data/lib/metanorma/mirror/serialization.rb +0 -10
- data/lib/metanorma/mirror/transformer.rb +0 -110
- data/lib/metanorma/mirror.rb +0 -31
- data/lib/metanorma/nist_document/metadata/nist_bib_data_extension_type.rb +0 -10
- data/lib/metanorma/nist_document/metadata/nist_bibliographic_item.rb +0 -15
- data/lib/metanorma/nist_document/metadata.rb +0 -12
- data/lib/metanorma/nist_document/root.rb +0 -29
- data/lib/metanorma/nist_document/sections/errata.rb +0 -16
- data/lib/metanorma/nist_document/sections/errata_clause.rb +0 -20
- data/lib/metanorma/nist_document/sections/errata_row.rb +0 -22
- data/lib/metanorma/nist_document/sections/nist_preface.rb +0 -30
- data/lib/metanorma/nist_document/sections.rb +0 -12
- data/lib/metanorma/nist_document.rb +0 -11
- data/lib/metanorma/ogc_document/metadata/ogc_bib_data_extension_type.rb +0 -12
- data/lib/metanorma/ogc_document/metadata/ogc_bibliographic_item.rb +0 -19
- data/lib/metanorma/ogc_document/metadata.rb +0 -12
- data/lib/metanorma/ogc_document/root.rb +0 -25
- data/lib/metanorma/ogc_document.rb +0 -8
- data/lib/metanorma/plateau_document/metadata/plateau_bibliographic_item.rb +0 -13
- data/lib/metanorma/plateau_document/metadata.rb +0 -10
- data/lib/metanorma/plateau_document/root.rb +0 -29
- data/lib/metanorma/plateau_document.rb +0 -10
- data/lib/metanorma/registers/setup.rb +0 -166
- data/lib/metanorma/registers.rb +0 -7
- data/lib/metanorma/ribose_document/metadata/ribose_bib_data_extension_type.rb +0 -20
- data/lib/metanorma/ribose_document/metadata/ribose_bibliographic_item.rb +0 -18
- data/lib/metanorma/ribose_document/metadata.rb +0 -12
- data/lib/metanorma/ribose_document/root.rb +0 -26
- data/lib/metanorma/ribose_document.rb +0 -8
- data/lib/metanorma/standard_document/annotation_container.rb +0 -39
- data/lib/metanorma/standard_document/block_attributes.rb +0 -281
- data/lib/metanorma/standard_document/blocks/amend_block.rb +0 -50
- data/lib/metanorma/standard_document/blocks/amend_content_block.rb +0 -35
- data/lib/metanorma/standard_document/blocks/auto_number.rb +0 -20
- data/lib/metanorma/standard_document/blocks/block_source.rb +0 -22
- data/lib/metanorma/standard_document/blocks/change_type.rb +0 -21
- data/lib/metanorma/standard_document/blocks/element_name.rb +0 -22
- data/lib/metanorma/standard_document/blocks/form.rb +0 -38
- data/lib/metanorma/standard_document/blocks/image_map_area_type.rb +0 -24
- data/lib/metanorma/standard_document/blocks/image_map_area_type_type.rb +0 -21
- data/lib/metanorma/standard_document/blocks/image_map_block.rb +0 -32
- data/lib/metanorma/standard_document/blocks/image_map_coords.rb +0 -19
- data/lib/metanorma/standard_document/blocks/image_map_radius.rb +0 -19
- data/lib/metanorma/standard_document/blocks/multilingual_rendering_type.rb +0 -21
- data/lib/metanorma/standard_document/blocks/passthrough.rb +0 -3
- data/lib/metanorma/standard_document/blocks/requirement_model.rb +0 -20
- data/lib/metanorma/standard_document/blocks/source_origin_element.rb +0 -23
- data/lib/metanorma/standard_document/blocks/standard_admonition_block.rb +0 -32
- data/lib/metanorma/standard_document/blocks/standard_block.rb +0 -28
- data/lib/metanorma/standard_document/blocks/standard_block_no_notes.rb +0 -34
- data/lib/metanorma/standard_document/blocks/standard_example_block.rb +0 -30
- data/lib/metanorma/standard_document/blocks/standard_figure_block.rb +0 -32
- data/lib/metanorma/standard_document/blocks/standard_formula_block.rb +0 -30
- data/lib/metanorma/standard_document/blocks/standard_note_block.rb +0 -64
- data/lib/metanorma/standard_document/blocks/standard_paragraph_block.rb +0 -25
- data/lib/metanorma/standard_document/blocks/standard_quote_block.rb +0 -29
- data/lib/metanorma/standard_document/blocks/standard_sourcecode_block.rb +0 -32
- data/lib/metanorma/standard_document/blocks/standard_table_block.rb +0 -39
- data/lib/metanorma/standard_document/blocks/svg_map_block.rb +0 -23
- data/lib/metanorma/standard_document/blocks/svg_target_type.rb +0 -20
- data/lib/metanorma/standard_document/blocks/table_col.rb +0 -16
- data/lib/metanorma/standard_document/blocks/to_c.rb +0 -17
- data/lib/metanorma/standard_document/blocks.rb +0 -60
- data/lib/metanorma/standard_document/boilerplate.rb +0 -32
- data/lib/metanorma/standard_document/elements/add.rb +0 -3
- data/lib/metanorma/standard_document/elements/del.rb +0 -3
- data/lib/metanorma/standard_document/elements/form_input.rb +0 -27
- data/lib/metanorma/standard_document/elements/input.rb +0 -12
- data/lib/metanorma/standard_document/elements/input_type.rb +0 -27
- data/lib/metanorma/standard_document/elements/label.rb +0 -19
- data/lib/metanorma/standard_document/elements/option.rb +0 -27
- data/lib/metanorma/standard_document/elements/orientation_type.rb +0 -27
- data/lib/metanorma/standard_document/elements/select.rb +0 -32
- data/lib/metanorma/standard_document/elements/standard_page_break_element.rb +0 -22
- data/lib/metanorma/standard_document/elements/textarea.rb +0 -25
- data/lib/metanorma/standard_document/elements.rb +0 -20
- data/lib/metanorma/standard_document/lists/standard_definition.rb +0 -24
- data/lib/metanorma/standard_document/lists/standard_definition_list.rb +0 -30
- data/lib/metanorma/standard_document/lists/standard_definition_term.rb +0 -27
- data/lib/metanorma/standard_document/lists/standard_unordered_list.rb +0 -28
- data/lib/metanorma/standard_document/lists/unordered_checkable_list_item.rb +0 -26
- data/lib/metanorma/standard_document/lists.rb +0 -17
- data/lib/metanorma/standard_document/metadata/editorial_group_type.rb +0 -25
- data/lib/metanorma/standard_document/metadata/ics_type.rb +0 -26
- data/lib/metanorma/standard_document/metadata/metanorma_extension.rb +0 -26
- data/lib/metanorma/standard_document/metadata/presentation_metadata.rb +0 -107
- data/lib/metanorma/standard_document/metadata/semantic_metadata.rb +0 -18
- data/lib/metanorma/standard_document/metadata/standard_bib_data.rb +0 -25
- data/lib/metanorma/standard_document/metadata/standard_bib_data_extension_type.rb +0 -37
- data/lib/metanorma/standard_document/metadata/structured_identifier_type.rb +0 -48
- data/lib/metanorma/standard_document/metadata/technical_committee_type.rb +0 -27
- data/lib/metanorma/standard_document/metadata/unitsml/amount_of_substance.rb +0 -19
- data/lib/metanorma/standard_document/metadata/unitsml/base_quantity.rb +0 -34
- data/lib/metanorma/standard_document/metadata/unitsml/dimension.rb +0 -39
- data/lib/metanorma/standard_document/metadata/unitsml/dimension_set.rb +0 -19
- data/lib/metanorma/standard_document/metadata/unitsml/electric_current.rb +0 -19
- data/lib/metanorma/standard_document/metadata/unitsml/enumerated_root_unit.rb +0 -23
- data/lib/metanorma/standard_document/metadata/unitsml/length.rb +0 -19
- data/lib/metanorma/standard_document/metadata/unitsml/luminous_intensity.rb +0 -19
- data/lib/metanorma/standard_document/metadata/unitsml/mass.rb +0 -19
- data/lib/metanorma/standard_document/metadata/unitsml/namespace.rb +0 -17
- data/lib/metanorma/standard_document/metadata/unitsml/plane_angle.rb +0 -19
- data/lib/metanorma/standard_document/metadata/unitsml/prefix.rb +0 -30
- data/lib/metanorma/standard_document/metadata/unitsml/prefix_name.rb +0 -21
- data/lib/metanorma/standard_document/metadata/unitsml/prefix_set.rb +0 -19
- data/lib/metanorma/standard_document/metadata/unitsml/prefix_symbol.rb +0 -21
- data/lib/metanorma/standard_document/metadata/unitsml/quantity.rb +0 -28
- data/lib/metanorma/standard_document/metadata/unitsml/quantity_name.rb +0 -21
- data/lib/metanorma/standard_document/metadata/unitsml/quantity_set.rb +0 -19
- data/lib/metanorma/standard_document/metadata/unitsml/root_units.rb +0 -19
- data/lib/metanorma/standard_document/metadata/unitsml/thermodynamic_temperature.rb +0 -19
- data/lib/metanorma/standard_document/metadata/unitsml/time.rb +0 -19
- data/lib/metanorma/standard_document/metadata/unitsml/unit.rb +0 -32
- data/lib/metanorma/standard_document/metadata/unitsml/unit_name.rb +0 -21
- data/lib/metanorma/standard_document/metadata/unitsml/unit_set.rb +0 -19
- data/lib/metanorma/standard_document/metadata/unitsml/unit_symbol.rb +0 -36
- data/lib/metanorma/standard_document/metadata/unitsml/unit_system.rb +0 -23
- data/lib/metanorma/standard_document/metadata/unitsml/unitsml_root.rb +0 -28
- data/lib/metanorma/standard_document/metadata/unitsml.rb +0 -39
- data/lib/metanorma/standard_document/metadata.rb +0 -23
- data/lib/metanorma/standard_document/namespace.rb +0 -11
- data/lib/metanorma/standard_document/refs/reference_to_term.rb +0 -26
- data/lib/metanorma/standard_document/refs/reference_to_termbase.rb +0 -27
- data/lib/metanorma/standard_document/refs/standoc_locality_stack.rb +0 -24
- data/lib/metanorma/standard_document/refs/standoc_reference_to_citation_element.rb +0 -27
- data/lib/metanorma/standard_document/refs/standoc_reference_to_id_element.rb +0 -36
- data/lib/metanorma/standard_document/refs/xref_case_type.rb +0 -27
- data/lib/metanorma/standard_document/refs/xref_connective_type.rb +0 -27
- data/lib/metanorma/standard_document/refs/xref_target_type.rb +0 -25
- data/lib/metanorma/standard_document/refs.rb +0 -18
- data/lib/metanorma/standard_document/root.rb +0 -10
- data/lib/metanorma/standard_document/root_attributes.rb +0 -78
- data/lib/metanorma/standard_document/sections/abstract.rb +0 -19
- data/lib/metanorma/standard_document/sections/acknowledgements.rb +0 -19
- data/lib/metanorma/standard_document/sections/annex_section.rb +0 -69
- data/lib/metanorma/standard_document/sections/bibliography_section.rb +0 -20
- data/lib/metanorma/standard_document/sections/boilerplate_type.rb +0 -32
- data/lib/metanorma/standard_document/sections/clause_hierarchical_section.rb +0 -32
- data/lib/metanorma/standard_document/sections/clause_section.rb +0 -91
- data/lib/metanorma/standard_document/sections/colophon.rb +0 -16
- data/lib/metanorma/standard_document/sections/definition_section.rb +0 -72
- data/lib/metanorma/standard_document/sections/floating_section_title.rb +0 -23
- data/lib/metanorma/standard_document/sections/floating_title.rb +0 -27
- data/lib/metanorma/standard_document/sections/foreword.rb +0 -19
- data/lib/metanorma/standard_document/sections/introduction.rb +0 -20
- data/lib/metanorma/standard_document/sections/misc_container.rb +0 -31
- data/lib/metanorma/standard_document/sections/normative_type.rb +0 -29
- data/lib/metanorma/standard_document/sections/preface.rb +0 -36
- data/lib/metanorma/standard_document/sections/sections.rb +0 -47
- data/lib/metanorma/standard_document/sections/standard_content_section.rb +0 -41
- data/lib/metanorma/standard_document/sections/standard_hierarchical_section.rb +0 -30
- data/lib/metanorma/standard_document/sections/standard_references_section.rb +0 -74
- data/lib/metanorma/standard_document/sections/standard_section.rb +0 -39
- data/lib/metanorma/standard_document/sections/terms_section.rb +0 -61
- data/lib/metanorma/standard_document/sections.rb +0 -34
- data/lib/metanorma/standard_document/standard_document_type.rb +0 -15
- data/lib/metanorma/standard_document/terms/abbreviation_type.rb +0 -27
- data/lib/metanorma/standard_document/terms/concept.rb +0 -42
- data/lib/metanorma/standard_document/terms/definition_collection.rb +0 -24
- data/lib/metanorma/standard_document/terms/designation.rb +0 -31
- data/lib/metanorma/standard_document/terms/expression_designation.rb +0 -38
- data/lib/metanorma/standard_document/terms/expression_type.rb +0 -27
- data/lib/metanorma/standard_document/terms/grammar_gender.rb +0 -27
- data/lib/metanorma/standard_document/terms/grammar_info.rb +0 -36
- data/lib/metanorma/standard_document/terms/graphical_symbol_designation.rb +0 -25
- data/lib/metanorma/standard_document/terms/letter_symbol_designation.rb +0 -27
- data/lib/metanorma/standard_document/terms/non_verbal_representation.rb +0 -33
- data/lib/metanorma/standard_document/terms/related_term.rb +0 -31
- data/lib/metanorma/standard_document/terms/related_term_type.rb +0 -28
- data/lib/metanorma/standard_document/terms/term.rb +0 -66
- data/lib/metanorma/standard_document/terms/term_collection.rb +0 -24
- data/lib/metanorma/standard_document/terms/term_definition.rb +0 -29
- data/lib/metanorma/standard_document/terms/term_expression.rb +0 -20
- data/lib/metanorma/standard_document/terms/term_name_element.rb +0 -29
- data/lib/metanorma/standard_document/terms/term_source.rb +0 -29
- data/lib/metanorma/standard_document/terms/term_source_status.rb +0 -29
- data/lib/metanorma/standard_document/terms/term_source_type.rb +0 -21
- data/lib/metanorma/standard_document/terms/verbal_expression.rb +0 -35
- data/lib/metanorma/standard_document/terms.rb +0 -33
- data/lib/metanorma/standard_document.rb +0 -27
- data/lib/metanorma/un_document/blocks/un_admonition_block.rb +0 -86
- data/lib/metanorma/un_document/blocks.rb +0 -9
- data/lib/metanorma/un_document/metadata/un_bib_data_extension_type.rb +0 -10
- data/lib/metanorma/un_document/metadata/un_bibliographic_item.rb +0 -15
- data/lib/metanorma/un_document/metadata.rb +0 -12
- data/lib/metanorma/un_document/root.rb +0 -37
- data/lib/metanorma/un_document/sections/un_abstract_section.rb +0 -48
- data/lib/metanorma/un_document/sections/un_preface.rb +0 -40
- data/lib/metanorma/un_document/sections/un_sections.rb +0 -24
- data/lib/metanorma/un_document/sections.rb +0 -11
- data/lib/metanorma/un_document/un_text_element.rb +0 -116
- data/lib/metanorma/un_document.rb +0 -13
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Metanorma
|
|
4
|
+
module Document
|
|
5
|
+
module Components
|
|
6
|
+
module Inline
|
|
7
|
+
# Rendered counterpart of `<origin>` (a quote-attribution eref):
|
|
8
|
+
# the normalised reference text. Identical grammar shape to
|
|
9
|
+
# eref — the shared ErefContract declares and maps it.
|
|
10
|
+
class FmtOriginElement < Lutaml::Model::Serializable
|
|
11
|
+
include Inline::Vocabulary
|
|
12
|
+
include RenderedDisplay
|
|
13
|
+
|
|
14
|
+
ErefContract.declare_attributes(self)
|
|
15
|
+
|
|
16
|
+
xml do
|
|
17
|
+
element "fmt-origin"
|
|
18
|
+
ErefContract.apply_mapping(self)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -9,10 +9,13 @@ module Metanorma
|
|
|
9
9
|
|
|
10
10
|
attribute :p, "Metanorma::Document::Components::Paragraphs::ParagraphBlock",
|
|
11
11
|
collection: true
|
|
12
|
+
attribute :semx, "Metanorma::Document::Components::Inline::SemxElement",
|
|
13
|
+
collection: true
|
|
12
14
|
|
|
13
15
|
xml do
|
|
14
16
|
element "fmt-preferred"
|
|
15
17
|
map_element "p", to: :p
|
|
18
|
+
map_element "semx", to: :semx
|
|
16
19
|
end
|
|
17
20
|
end
|
|
18
21
|
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Metanorma
|
|
4
|
+
module Document
|
|
5
|
+
module Components
|
|
6
|
+
module Inline
|
|
7
|
+
# Rendered counterpart of a quote `<source>`: the formatted
|
|
8
|
+
# attribution (author, source, modification) as a single semx
|
|
9
|
+
# slice. Rendered to the exclusion of the semantic source
|
|
10
|
+
# content when present.
|
|
11
|
+
class FmtSourceElement < Lutaml::Model::Serializable
|
|
12
|
+
include RenderedDisplay
|
|
13
|
+
|
|
14
|
+
attribute :status, :string
|
|
15
|
+
attribute :source_type, :string
|
|
16
|
+
attribute :text, :string, collection: true
|
|
17
|
+
attribute :semx, SemxElement, collection: true
|
|
18
|
+
|
|
19
|
+
xml do
|
|
20
|
+
element "fmt-source"
|
|
21
|
+
mixed_content
|
|
22
|
+
map_attribute "status", to: :status
|
|
23
|
+
map_attribute "type", to: :source_type
|
|
24
|
+
map_content to: :text
|
|
25
|
+
map_element "semx", to: :semx
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -6,6 +6,7 @@ module Metanorma
|
|
|
6
6
|
module Inline
|
|
7
7
|
class FnElement < Lutaml::Model::Serializable
|
|
8
8
|
attribute :id, :string
|
|
9
|
+
attribute :anchor, :string
|
|
9
10
|
attribute :reference, :string
|
|
10
11
|
attribute :hiddenref, :boolean
|
|
11
12
|
attribute :target, :string
|
|
@@ -13,17 +14,27 @@ module Metanorma
|
|
|
13
14
|
attribute :original_reference, :string
|
|
14
15
|
attribute :p, "Metanorma::Document::Components::Paragraphs::ParagraphBlock",
|
|
15
16
|
collection: true
|
|
17
|
+
attribute :ul, "Metanorma::Document::Components::Lists::UnorderedList",
|
|
18
|
+
collection: true
|
|
19
|
+
attribute :ol, "Metanorma::Document::Components::Lists::OrderedList",
|
|
20
|
+
collection: true
|
|
21
|
+
attribute :table, "Metanorma::Document::Components::Tables::TableBlock",
|
|
22
|
+
collection: true
|
|
16
23
|
attribute :fmt_fn_label, "Metanorma::Document::Components::Inline::FmtFnLabelElement"
|
|
17
24
|
|
|
18
25
|
xml do
|
|
19
26
|
element "fn"
|
|
20
27
|
map_attribute "id", to: :id
|
|
28
|
+
map_attribute "anchor", to: :anchor
|
|
21
29
|
map_attribute "reference", to: :reference
|
|
22
30
|
map_attribute "hiddenref", to: :hiddenref
|
|
23
31
|
map_attribute "target", to: :target
|
|
24
32
|
map_attribute "semx-id", to: :semx_id
|
|
25
33
|
map_attribute "original-reference", to: :original_reference
|
|
26
34
|
map_element "p", to: :p
|
|
35
|
+
map_element "ul", to: :ul
|
|
36
|
+
map_element "ol", to: :ol
|
|
37
|
+
map_element "table", to: :table
|
|
27
38
|
map_element "fmt-fn-label", to: :fmt_fn_label
|
|
28
39
|
end
|
|
29
40
|
end
|
|
@@ -5,6 +5,8 @@ module Metanorma
|
|
|
5
5
|
module Components
|
|
6
6
|
module Inline
|
|
7
7
|
class LinkElement < Lutaml::Model::Serializable
|
|
8
|
+
include Metanorma::Document::Components::Inline::Vocabulary
|
|
9
|
+
|
|
8
10
|
attribute :id, :string
|
|
9
11
|
attribute :target, :string
|
|
10
12
|
attribute :update_type, :string
|
|
@@ -21,6 +23,12 @@ module Metanorma
|
|
|
21
23
|
map_attribute "style", to: :style
|
|
22
24
|
map_content to: :content
|
|
23
25
|
map_element "link", to: :link
|
|
26
|
+
|
|
27
|
+
# Presentation XML states formatted link text as inline
|
|
28
|
+
# children (<link><em>Title</em></link>): accept the full
|
|
29
|
+
# inline vocabulary so it is not dropped at parse time.
|
|
30
|
+
Metanorma::Document::Components::Inline::Vocabulary::VocabularyXmlMapping
|
|
31
|
+
.apply_inline_mappings(self)
|
|
24
32
|
end
|
|
25
33
|
end
|
|
26
34
|
end
|
|
@@ -6,6 +6,7 @@ module Metanorma
|
|
|
6
6
|
module Inline
|
|
7
7
|
class NameWithIdElement < Lutaml::Model::Serializable
|
|
8
8
|
attribute :id, :string
|
|
9
|
+
attribute :anchor, :string
|
|
9
10
|
attribute :semx_id, :string
|
|
10
11
|
attribute :text, :string
|
|
11
12
|
attribute :stem, TextElements::StemElement, collection: true
|
|
@@ -13,6 +14,7 @@ module Metanorma
|
|
|
13
14
|
xml do
|
|
14
15
|
element "name"
|
|
15
16
|
map_attribute "id", to: :id
|
|
17
|
+
map_attribute "anchor", to: :anchor
|
|
16
18
|
map_attribute "semx-id", to: :semx_id
|
|
17
19
|
map_content to: :text
|
|
18
20
|
map_element "stem", to: :stem
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Metanorma
|
|
4
|
+
module Document
|
|
5
|
+
module Components
|
|
6
|
+
module Inline
|
|
7
|
+
# <refterm> outside a <concept> (e.g. inside a related-term semx
|
|
8
|
+
# whose lookup failed): the native renderer serializes the element
|
|
9
|
+
# itself as escaped text ("<refterm>…</refterm>").
|
|
10
|
+
class ReftermElement < Lutaml::Model::Serializable
|
|
11
|
+
attribute :text, :string
|
|
12
|
+
|
|
13
|
+
xml do
|
|
14
|
+
element "refterm"
|
|
15
|
+
map_content to: :text
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -19,6 +19,12 @@ module Metanorma
|
|
|
19
19
|
attribute :text, :string, collection: true
|
|
20
20
|
attribute :fmt_xref, "Metanorma::Document::Components::Inline::FmtXrefElement",
|
|
21
21
|
collection: true
|
|
22
|
+
attribute :fmt_eref,
|
|
23
|
+
"Metanorma::Document::Components::Inline::FmtErefElement",
|
|
24
|
+
collection: true
|
|
25
|
+
attribute :fmt_origin,
|
|
26
|
+
"Metanorma::Document::Components::Inline::FmtOriginElement",
|
|
27
|
+
collection: true
|
|
22
28
|
attribute :fmt_concept, "Metanorma::Document::Components::Inline::FmtConceptElement",
|
|
23
29
|
collection: true
|
|
24
30
|
attribute :asciimath, AsciimathElement, collection: true
|
|
@@ -30,12 +36,21 @@ module Metanorma
|
|
|
30
36
|
attribute :strong, StrongRawElement, collection: true
|
|
31
37
|
attribute :origin, ErefElement, collection: true
|
|
32
38
|
attribute :em, EmRawElement, collection: true
|
|
39
|
+
attribute :ruby, "Metanorma::Document::Components::TextElements::RubyElement", collection: true
|
|
33
40
|
attribute :fmt_link, LinkElement, collection: true
|
|
34
41
|
attribute :sup, SupElement, collection: true
|
|
35
42
|
attribute :span, "Metanorma::Document::Components::Inline::SpanElement",
|
|
36
43
|
collection: true
|
|
37
44
|
attribute :xref, XrefElement, collection: true
|
|
38
45
|
attribute :eref, ErefElement, collection: true
|
|
46
|
+
attribute :refterm, ReftermElement, collection: true
|
|
47
|
+
attribute :ol, "Metanorma::Document::Components::Lists::OrderedList",
|
|
48
|
+
collection: true
|
|
49
|
+
attribute :ul, "Metanorma::Document::Components::Lists::UnorderedList",
|
|
50
|
+
collection: true
|
|
51
|
+
attribute :fmt_preferred,
|
|
52
|
+
"Metanorma::Document::Components::Inline::FmtPreferredElement",
|
|
53
|
+
collection: true
|
|
39
54
|
|
|
40
55
|
# Term/metadata child elements
|
|
41
56
|
attribute :title_child, SemxChildElement, collection: true
|
|
@@ -79,6 +94,8 @@ module Metanorma
|
|
|
79
94
|
map_attribute "source", to: :source
|
|
80
95
|
map_content to: :text
|
|
81
96
|
map_element "fmt-xref", to: :fmt_xref
|
|
97
|
+
map_element "fmt-eref", to: :fmt_eref
|
|
98
|
+
map_element "fmt-origin", to: :fmt_origin
|
|
82
99
|
map_element "fmt-concept", to: :fmt_concept
|
|
83
100
|
map_element "asciimath", to: :asciimath
|
|
84
101
|
map_element "math", to: :math
|
|
@@ -87,11 +104,16 @@ module Metanorma
|
|
|
87
104
|
map_element "strong", to: :strong
|
|
88
105
|
map_element "origin", to: :origin
|
|
89
106
|
map_element "em", to: :em
|
|
107
|
+
map_element "ruby", to: :ruby
|
|
90
108
|
map_element "fmt-link", to: :fmt_link
|
|
91
109
|
map_element "sup", to: :sup
|
|
92
110
|
map_element "span", to: :span
|
|
93
111
|
map_element "xref", to: :xref
|
|
94
112
|
map_element "eref", to: :eref
|
|
113
|
+
map_element "refterm", to: :refterm
|
|
114
|
+
map_element "ol", to: :ol
|
|
115
|
+
map_element "ul", to: :ul
|
|
116
|
+
map_element "fmt-preferred", to: :fmt_preferred
|
|
95
117
|
# Term/metadata children
|
|
96
118
|
map_element "title", to: :title_child
|
|
97
119
|
map_element "name", to: :name_child
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Metanorma
|
|
4
|
+
module Document
|
|
5
|
+
module Components
|
|
6
|
+
module Inline
|
|
7
|
+
# A stack of source localities — the rendered form of the
|
|
8
|
+
# localities a quote source cites (mirrors localityStack for
|
|
9
|
+
# sources). The overlay references a `sourcelocality` child
|
|
10
|
+
# pattern that no grammar defines (standoc-models dangling
|
|
11
|
+
# reference); text parses today, the child maps once the
|
|
12
|
+
# grammar defines it.
|
|
13
|
+
class SourcelocalityStackElement < Lutaml::Model::Serializable
|
|
14
|
+
include RenderedDisplay
|
|
15
|
+
|
|
16
|
+
attribute :text, :string, collection: true
|
|
17
|
+
|
|
18
|
+
xml do
|
|
19
|
+
element "sourcelocalityStack"
|
|
20
|
+
mixed_content
|
|
21
|
+
map_content to: :text
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -12,6 +12,7 @@ module Metanorma
|
|
|
12
12
|
|
|
13
13
|
attribute :class_attr, :string
|
|
14
14
|
attribute :style, :string
|
|
15
|
+
attribute :anchor, :string
|
|
15
16
|
attribute :callout,
|
|
16
17
|
Metanorma::Document::Components::ReferenceElements::Callout,
|
|
17
18
|
collection: true
|
|
@@ -21,6 +22,7 @@ module Metanorma
|
|
|
21
22
|
mixed_content
|
|
22
23
|
map_attribute "class", to: :class_attr
|
|
23
24
|
map_attribute "style", to: :style
|
|
25
|
+
map_attribute "anchor", to: :anchor
|
|
24
26
|
map_content to: :text
|
|
25
27
|
map_element "callout", to: :callout
|
|
26
28
|
Vocabulary::VocabularyXmlMapping.apply_inline_mappings(self)
|
|
@@ -14,6 +14,7 @@ module Metanorma
|
|
|
14
14
|
attribute :stem_type, :string
|
|
15
15
|
attribute :asciimath, AsciimathElement, collection: true
|
|
16
16
|
attribute :math, SemanticMathElement, collection: true
|
|
17
|
+
attribute :latexmath, TextElements::LatexmathElement, collection: true
|
|
17
18
|
|
|
18
19
|
xml do
|
|
19
20
|
element "stem"
|
|
@@ -22,6 +23,7 @@ module Metanorma
|
|
|
22
23
|
map_attribute "type", to: :stem_type
|
|
23
24
|
map_element "asciimath", to: :asciimath
|
|
24
25
|
map_element "math", to: :math
|
|
26
|
+
map_element "latexmath", to: :latexmath
|
|
25
27
|
end
|
|
26
28
|
end
|
|
27
29
|
end
|
|
@@ -4,21 +4,18 @@ module Metanorma
|
|
|
4
4
|
module Document
|
|
5
5
|
module Components
|
|
6
6
|
module Inline
|
|
7
|
+
# Strongly emphasised raw text: accepts the full inline
|
|
8
|
+
# vocabulary as children so no inline payload inside <strong>
|
|
9
|
+
# is dropped at parse time.
|
|
7
10
|
class StrongRawElement < Lutaml::Model::Serializable
|
|
8
|
-
|
|
9
|
-
attribute :semx, "Metanorma::Document::Components::Inline::SemxElement",
|
|
10
|
-
collection: true
|
|
11
|
-
attribute :span, "Metanorma::Document::Components::Inline::SpanElement",
|
|
12
|
-
collection: true
|
|
13
|
-
attribute :br, BrElement, collection: true
|
|
11
|
+
include Metanorma::Document::Components::Inline::Vocabulary
|
|
14
12
|
|
|
15
13
|
xml do
|
|
16
14
|
element "strong"
|
|
17
15
|
mixed_content
|
|
18
16
|
map_content to: :text
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
map_element "br", to: :br
|
|
17
|
+
Metanorma::Document::Components::Inline::Vocabulary::VocabularyXmlMapping
|
|
18
|
+
.apply_inline_mappings(self)
|
|
22
19
|
end
|
|
23
20
|
end
|
|
24
21
|
end
|
|
@@ -6,9 +6,11 @@ module Metanorma
|
|
|
6
6
|
module Inline
|
|
7
7
|
class SubElement < Lutaml::Model::Serializable
|
|
8
8
|
attribute :content, :string
|
|
9
|
+
attribute :sub, SubElement, collection: true
|
|
9
10
|
xml do
|
|
10
11
|
element "sub"
|
|
11
12
|
map_content to: :content
|
|
13
|
+
map_element "sub", to: :sub
|
|
12
14
|
end
|
|
13
15
|
end
|
|
14
16
|
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Metanorma
|
|
4
|
+
module Document
|
|
5
|
+
module Components
|
|
6
|
+
module Inline
|
|
7
|
+
# Cross-reference to a term defined within a termbase.
|
|
8
|
+
class TermrefElement < Lutaml::Model::Serializable
|
|
9
|
+
attribute :base, :string
|
|
10
|
+
attribute :target, :string
|
|
11
|
+
attribute :text, :string, collection: true
|
|
12
|
+
|
|
13
|
+
xml do
|
|
14
|
+
element "termref"
|
|
15
|
+
mixed_content
|
|
16
|
+
map_attribute "base", to: :base
|
|
17
|
+
map_attribute "target", to: :target
|
|
18
|
+
map_content to: :text
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -5,48 +5,27 @@ module Metanorma
|
|
|
5
5
|
module Components
|
|
6
6
|
module Inline
|
|
7
7
|
class TitleWithAnnotationElement < Lutaml::Model::Serializable
|
|
8
|
+
include Metanorma::Document::Components::Inline::Vocabulary
|
|
9
|
+
|
|
8
10
|
attribute :id, :string
|
|
11
|
+
attribute :anchor, :string
|
|
9
12
|
attribute :semx_id, :string
|
|
10
|
-
attribute :text, :string, collection: true
|
|
11
13
|
attribute :fmt_annotation_end, FmtAnnotationBodyElement
|
|
12
14
|
|
|
13
|
-
# Inline elements
|
|
14
|
-
attribute :em, EmRawElement, collection: true
|
|
15
|
-
attribute :strong, StrongRawElement, collection: true
|
|
16
|
-
attribute :sub, SubElement, collection: true
|
|
17
|
-
attribute :sup, SupElement, collection: true
|
|
18
|
-
attribute :tt, TtElement, collection: true
|
|
19
|
-
attribute :underline, "Metanorma::Document::Components::TextElements::UnderlineElement",
|
|
20
|
-
collection: true
|
|
21
|
-
attribute :strike, "Metanorma::Document::Components::TextElements::StrikeElement",
|
|
22
|
-
collection: true
|
|
23
|
-
attribute :smallcap, SmallCapElement, collection: true
|
|
24
|
-
attribute :br, BrElement, collection: true
|
|
25
|
-
attribute :stem, TextElements::StemElement, collection: true
|
|
26
|
-
attribute :xref, XrefElement, collection: true
|
|
27
|
-
attribute :eref, ErefElement, collection: true
|
|
28
|
-
attribute :link, LinkElement, collection: true
|
|
29
|
-
|
|
30
15
|
xml do
|
|
31
16
|
element "title"
|
|
32
17
|
mixed_content
|
|
33
18
|
map_attribute "id", to: :id
|
|
19
|
+
map_attribute "anchor", to: :anchor
|
|
34
20
|
map_attribute "semx-id", to: :semx_id
|
|
35
21
|
map_content to: :text
|
|
36
|
-
map_element "em", to: :em
|
|
37
|
-
map_element "strong", to: :strong
|
|
38
|
-
map_element "sub", to: :sub
|
|
39
|
-
map_element "sup", to: :sup
|
|
40
|
-
map_element "tt", to: :tt
|
|
41
|
-
map_element "underline", to: :underline
|
|
42
|
-
map_element "strike", to: :strike
|
|
43
|
-
map_element "smallcap", to: :smallcap
|
|
44
|
-
map_element "br", to: :br
|
|
45
|
-
map_element "stem", to: :stem
|
|
46
|
-
map_element "xref", to: :xref
|
|
47
|
-
map_element "eref", to: :eref
|
|
48
|
-
map_element "link", to: :link
|
|
49
22
|
map_element "fmt-annotation-end", to: :fmt_annotation_end
|
|
23
|
+
|
|
24
|
+
# Titles carry the full inline vocabulary (footnotes on
|
|
25
|
+
# clause titles, formatted links, math); including the
|
|
26
|
+
# shared vocabulary keeps every child at parse time.
|
|
27
|
+
Metanorma::Document::Components::Inline::Vocabulary::VocabularyXmlMapping
|
|
28
|
+
.apply_inline_mappings(self)
|
|
50
29
|
end
|
|
51
30
|
end
|
|
52
31
|
end
|
|
@@ -7,6 +7,7 @@ module Metanorma
|
|
|
7
7
|
class VariantTitleElement < Lutaml::Model::Serializable
|
|
8
8
|
attribute :type, :string
|
|
9
9
|
attribute :id, :string
|
|
10
|
+
attribute :anchor, :string
|
|
10
11
|
attribute :text, :string, collection: true
|
|
11
12
|
attribute :span, SpanElement, collection: true
|
|
12
13
|
attribute :semx, SemxElement, collection: true
|
|
@@ -17,6 +18,7 @@ module Metanorma
|
|
|
17
18
|
mixed_content
|
|
18
19
|
map_attribute "type", to: :type
|
|
19
20
|
map_attribute "id", to: :id
|
|
21
|
+
map_attribute "anchor", to: :anchor
|
|
20
22
|
map_content to: :text
|
|
21
23
|
map_element "span", to: :span
|
|
22
24
|
map_element "semx", to: :semx
|
|
@@ -110,12 +110,39 @@ module Metanorma
|
|
|
110
110
|
base.attribute :input,
|
|
111
111
|
Metanorma::Document::Elements::Input,
|
|
112
112
|
collection: true
|
|
113
|
+
base.attribute :passthrough,
|
|
114
|
+
Metanorma::Document::Components::Blocks::Passthrough,
|
|
115
|
+
collection: true
|
|
116
|
+
base.attribute :date,
|
|
117
|
+
Metanorma::Document::Components::Inline::DateElement,
|
|
118
|
+
collection: true
|
|
119
|
+
base.attribute :fmt_date,
|
|
120
|
+
Metanorma::Document::Components::Inline::FmtDateElement,
|
|
121
|
+
collection: true
|
|
122
|
+
base.attribute :erefstack,
|
|
123
|
+
Metanorma::Document::Components::Inline::ErefStack,
|
|
124
|
+
collection: true
|
|
113
125
|
end
|
|
114
126
|
|
|
115
127
|
def declare_rendered_display_attributes_on(base)
|
|
116
128
|
base.attribute :fmt_stem,
|
|
117
129
|
Metanorma::Document::Components::Inline::FmtStemElement,
|
|
118
130
|
collection: true
|
|
131
|
+
base.attribute :fmt_eref,
|
|
132
|
+
Metanorma::Document::Components::Inline::FmtErefElement,
|
|
133
|
+
collection: true
|
|
134
|
+
base.attribute :fmt_link,
|
|
135
|
+
Metanorma::Document::Components::Inline::LinkElement,
|
|
136
|
+
collection: true
|
|
137
|
+
base.attribute :fmt_origin,
|
|
138
|
+
Metanorma::Document::Components::Inline::FmtOriginElement,
|
|
139
|
+
collection: true
|
|
140
|
+
base.attribute :fmt_source,
|
|
141
|
+
Metanorma::Document::Components::Inline::FmtSourceElement,
|
|
142
|
+
collection: true
|
|
143
|
+
base.attribute :fmt_date_inline,
|
|
144
|
+
Metanorma::Document::Components::Inline::FmtDateInlineElement,
|
|
145
|
+
collection: true
|
|
119
146
|
base.attribute :fmt_concept,
|
|
120
147
|
Metanorma::Document::Components::Inline::FmtConceptElement,
|
|
121
148
|
collection: true
|
|
@@ -168,7 +195,16 @@ module Metanorma
|
|
|
168
195
|
"add" => :add,
|
|
169
196
|
"del" => :del,
|
|
170
197
|
"input" => :input,
|
|
198
|
+
"passthrough" => :passthrough,
|
|
199
|
+
"date" => :date,
|
|
200
|
+
"fmt-date" => :fmt_date,
|
|
201
|
+
"erefstack" => :erefstack,
|
|
171
202
|
"fmt-stem" => :fmt_stem,
|
|
203
|
+
"fmt-eref" => :fmt_eref,
|
|
204
|
+
"fmt-link" => :fmt_link,
|
|
205
|
+
"fmt-origin" => :fmt_origin,
|
|
206
|
+
"fmt-source" => :fmt_source,
|
|
207
|
+
"fmt-date-inline" => :fmt_date_inline,
|
|
172
208
|
"fmt-concept" => :fmt_concept,
|
|
173
209
|
"fmt-fn-label" => :fmt_fn_label,
|
|
174
210
|
"fmt-annotation-start" => :fmt_annotation_start,
|
|
@@ -20,6 +20,7 @@ module Metanorma
|
|
|
20
20
|
"metanorma/document/components/inline/link_element"
|
|
21
21
|
autoload :BrElement, "metanorma/document/components/inline/br_element"
|
|
22
22
|
autoload :TabElement, "metanorma/document/components/inline/tab_element"
|
|
23
|
+
autoload :ColumnbreakElement, "metanorma/document/components/inline/columnbreak_element"
|
|
23
24
|
autoload :AsciimathElement,
|
|
24
25
|
"metanorma/document/components/inline/asciimath_element"
|
|
25
26
|
autoload :MathElement,
|
|
@@ -36,6 +37,8 @@ module Metanorma
|
|
|
36
37
|
autoload :ConceptElement,
|
|
37
38
|
"metanorma/document/components/inline/concept_element"
|
|
38
39
|
autoload :FnElement, "metanorma/document/components/inline/fn_element"
|
|
40
|
+
autoload :ReftermElement,
|
|
41
|
+
"metanorma/document/components/inline/refterm_element"
|
|
39
42
|
autoload :SemxChildElement,
|
|
40
43
|
"metanorma/document/components/inline/semx_child_element"
|
|
41
44
|
autoload :SemxElement,
|
|
@@ -44,6 +47,16 @@ module Metanorma
|
|
|
44
47
|
"metanorma/document/components/inline/span_element"
|
|
45
48
|
autoload :FmtStemElement,
|
|
46
49
|
"metanorma/document/components/inline/fmt_stem_element"
|
|
50
|
+
autoload :FmtErefElement,
|
|
51
|
+
"metanorma/document/components/inline/fmt_eref_element"
|
|
52
|
+
autoload :FmtOriginElement,
|
|
53
|
+
"metanorma/document/components/inline/fmt_origin_element"
|
|
54
|
+
autoload :FmtSourceElement,
|
|
55
|
+
"metanorma/document/components/inline/fmt_source_element"
|
|
56
|
+
autoload :FmtDateInlineElement,
|
|
57
|
+
"metanorma/document/components/inline/fmt_date_inline_element"
|
|
58
|
+
autoload :SourcelocalityStackElement,
|
|
59
|
+
"metanorma/document/components/inline/sourcelocality_stack_element"
|
|
47
60
|
autoload :FmtFnLabelElement,
|
|
48
61
|
"metanorma/document/components/inline/fmt_fn_label_element"
|
|
49
62
|
autoload :FmtConceptElement,
|
|
@@ -102,6 +115,16 @@ module Metanorma
|
|
|
102
115
|
"metanorma/document/components/inline/semantic_content"
|
|
103
116
|
autoload :LocationElement,
|
|
104
117
|
"metanorma/document/components/inline/location_element"
|
|
118
|
+
autoload :DateElement,
|
|
119
|
+
"metanorma/document/components/inline/date_element"
|
|
120
|
+
autoload :FmtDateElement,
|
|
121
|
+
"metanorma/document/components/inline/fmt_date_element"
|
|
122
|
+
autoload :ErefStack,
|
|
123
|
+
"metanorma/document/components/inline/eref_stack"
|
|
124
|
+
autoload :ErrorMessage,
|
|
125
|
+
"metanorma/document/components/inline/error_message"
|
|
126
|
+
autoload :TermrefElement,
|
|
127
|
+
"metanorma/document/components/inline/termref_element"
|
|
105
128
|
autoload :SemanticMathElement,
|
|
106
129
|
"metanorma/document/components/inline/semantic_math_element"
|
|
107
130
|
autoload :RenderedMathElement,
|
|
@@ -7,6 +7,7 @@ module Metanorma
|
|
|
7
7
|
# Definition description element, containing paragraphs.
|
|
8
8
|
class DdElement < Lutaml::Model::Serializable
|
|
9
9
|
attribute :id, :string
|
|
10
|
+
attribute :anchor, :string
|
|
10
11
|
attribute :semx_id, :string
|
|
11
12
|
attribute :p, "Metanorma::Document::Components::Paragraphs::ParagraphBlock",
|
|
12
13
|
collection: true
|
|
@@ -34,8 +35,12 @@ module Metanorma
|
|
|
34
35
|
attribute :fmt_fn_body, "Metanorma::Document::Components::Inline::FmtFnBodyElement"
|
|
35
36
|
|
|
36
37
|
xml do
|
|
37
|
-
|
|
38
|
+
# Order-aware dd: the IETF transformer rebuilds children in
|
|
39
|
+
# source order (p, dl, p interleave), which requires the
|
|
40
|
+
# parse to capture element_order for this model.
|
|
41
|
+
root "dd", ordered: true
|
|
38
42
|
map_attribute "id", to: :id
|
|
43
|
+
map_attribute "anchor", to: :anchor
|
|
39
44
|
map_attribute "semx-id", to: :semx_id
|
|
40
45
|
map_element "p", to: :p
|
|
41
46
|
map_element "ul", to: :ul
|
|
@@ -6,6 +6,7 @@ module Metanorma
|
|
|
6
6
|
module Lists
|
|
7
7
|
# Definition used to constitute a definition list.
|
|
8
8
|
class Definition < Lutaml::Model::Serializable
|
|
9
|
+
attribute :anchor, :string
|
|
9
10
|
attribute :item, "Metanorma::Document::Components::TextElements::TextElement",
|
|
10
11
|
collection: true
|
|
11
12
|
attribute :definition,
|
|
@@ -18,6 +19,7 @@ module Metanorma
|
|
|
18
19
|
|
|
19
20
|
xml do
|
|
20
21
|
element "dd"
|
|
22
|
+
map_attribute "anchor", to: :anchor
|
|
21
23
|
map_element "item", to: :item
|
|
22
24
|
map_element "definition", to: :definition
|
|
23
25
|
map_element "p", to: :p
|
|
@@ -15,6 +15,8 @@ module Metanorma
|
|
|
15
15
|
attribute :name, Metanorma::Document::Components::Inline::NameWithIdElement
|
|
16
16
|
attribute :dt, DtElement, collection: true
|
|
17
17
|
attribute :dd, DdElement, collection: true
|
|
18
|
+
attribute :note, "Metanorma::Document::Components::Blocks::NoteBlock",
|
|
19
|
+
collection: true
|
|
18
20
|
attribute :fmt_name, Metanorma::Document::Components::Inline::FmtNameElement
|
|
19
21
|
attribute :json_type, :string
|
|
20
22
|
|
|
@@ -41,6 +43,7 @@ module Metanorma
|
|
|
41
43
|
map_element "name", to: :name
|
|
42
44
|
map_element "dt", to: :dt
|
|
43
45
|
map_element "dd", to: :dd
|
|
46
|
+
map_element "note", to: :note
|
|
44
47
|
map_element "fmt-name", to: :fmt_name
|
|
45
48
|
end
|
|
46
49
|
end
|
|
@@ -19,6 +19,8 @@ module Metanorma
|
|
|
19
19
|
collection: true
|
|
20
20
|
attribute :em, "Metanorma::Document::Components::Inline::EmRawElement",
|
|
21
21
|
collection: true
|
|
22
|
+
attribute :ruby, "Metanorma::Document::Components::TextElements::RubyElement",
|
|
23
|
+
collection: true
|
|
22
24
|
attribute :strong, "Metanorma::Document::Components::Inline::StrongRawElement",
|
|
23
25
|
collection: true
|
|
24
26
|
attribute :sub, :string, collection: true
|
|
@@ -52,6 +54,7 @@ module Metanorma
|
|
|
52
54
|
map_element "span", to: :span
|
|
53
55
|
map_element "tt", to: :tt
|
|
54
56
|
map_element "em", to: :em
|
|
57
|
+
map_element "ruby", to: :ruby
|
|
55
58
|
map_element "strong", to: :strong
|
|
56
59
|
map_element "sub", to: :sub
|
|
57
60
|
map_element "sup", to: :sup
|