metanorma-document 0.2.12 → 0.2.13
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/.github/workflows/rake.yml +21 -0
- data/.github/workflows/release.yml +25 -0
- data/.github/workflows/roundtrip-samples.yml +132 -0
- data/.gitignore +19 -0
- data/.rspec +3 -0
- data/.rubocop.yml +22 -0
- data/.rubocop_todo.yml +66 -164
- data/CHANGELOG.md +1 -0
- data/Gemfile +32 -0
- data/README.adoc +0 -144
- data/Rakefile +2 -14
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/data/javascripts/components/mn-lightbox.js +2 -18
- data/data/javascripts/components/mn-shortcuts.js +0 -2
- data/data/javascripts/core/mn-navigation.js +0 -8
- data/data/javascripts/core/mn-theme.js +9 -9
- data/data/logos/pdfa-logo.svg +94 -31
- data/data/stylesheets/base/_layout.css +0 -3
- data/data/stylesheets/base/_reset.css +3 -3
- data/data/stylesheets/base/_typography.css +5 -0
- data/data/stylesheets/components/bibliography.css +3 -3
- data/data/stylesheets/components/cover.css +1 -3
- data/data/stylesheets/components/figure.css +1 -13
- data/data/stylesheets/components/footnote.css +5 -65
- data/data/stylesheets/components/formula.css +0 -44
- data/data/stylesheets/components/header.css +2 -17
- data/data/stylesheets/components/inline.css +1 -1
- data/data/stylesheets/components/table.css +2 -15
- data/data/stylesheets/components/term.css +1 -0
- data/lib/metanorma/bipm_document/metadata/bipm_bibliographic_item.rb +14 -0
- data/lib/metanorma/bipm_document/metadata.rb +1 -1
- data/lib/metanorma/document/components/ancillary_blocks/sourcecode_block.rb +65 -0
- data/lib/metanorma/document/components/ancillary_blocks.rb +0 -4
- data/lib/metanorma/document/components/bib_data/bib_data.rb +0 -7
- data/lib/metanorma/document/components/blocks/requirement_model.rb +131 -0
- data/lib/metanorma/document/components/blocks.rb +7 -8
- data/lib/metanorma/document/components/id_elements/image.rb +0 -2
- data/lib/metanorma/document/components/inline/asciimath_element.rb +0 -2
- data/lib/metanorma/document/components/inline/attribution_element.rb +0 -2
- data/lib/metanorma/document/components/inline/bcp14_element.rb +0 -2
- data/lib/metanorma/document/components/inline/biblio_tag_element.rb +0 -2
- data/lib/metanorma/document/components/inline/br_element.rb +0 -2
- data/lib/metanorma/document/components/inline/comma_element.rb +0 -2
- data/lib/metanorma/document/components/inline/concept_element.rb +0 -2
- data/lib/metanorma/document/components/inline/display_text_element.rb +0 -2
- data/lib/metanorma/document/components/inline/em_raw_element.rb +0 -2
- data/lib/metanorma/document/components/inline/enum_comma_element.rb +0 -2
- data/lib/metanorma/document/components/inline/eref_element.rb +0 -2
- data/lib/metanorma/document/components/inline/fmt_admitted_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_annotation_body_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_annotation_end_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_annotation_start_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_concept_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_definition_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_fn_body_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_fn_label_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_footnote_container_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_identifier_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_name_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_preferred_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_sourcecode_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_stem_element.rb +0 -10
- data/lib/metanorma/document/components/inline/fmt_termsource_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_title_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_xref_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fmt_xref_label_element.rb +0 -4
- data/lib/metanorma/document/components/inline/fn_element.rb +0 -2
- data/lib/metanorma/document/components/inline/link_element.rb +0 -2
- data/lib/metanorma/document/components/inline/localized_string_element.rb +0 -2
- data/lib/metanorma/document/components/inline/localized_strings_element.rb +0 -2
- data/lib/metanorma/document/components/inline/math_element.rb +0 -2
- data/lib/metanorma/document/components/inline/name_with_id_element.rb +0 -4
- data/lib/metanorma/document/components/inline/semx_child_element.rb +0 -2
- data/lib/metanorma/document/components/inline/semx_element.rb +1 -13
- data/lib/metanorma/document/components/inline/small_cap_element.rb +0 -2
- data/lib/metanorma/document/components/inline/span_element.rb +15 -10
- data/lib/metanorma/document/components/inline/stem_inline_element.rb +1 -7
- data/lib/metanorma/document/components/inline/strong_raw_element.rb +0 -2
- data/lib/metanorma/document/components/inline/sub_element.rb +0 -2
- data/lib/metanorma/document/components/inline/sup_element.rb +0 -2
- data/lib/metanorma/document/components/inline/tab_element.rb +0 -2
- data/lib/metanorma/document/components/inline/title_with_annotation_element.rb +0 -4
- data/lib/metanorma/document/components/inline/tt_element.rb +0 -2
- data/lib/metanorma/document/components/inline/variant_title_element.rb +0 -2
- data/lib/metanorma/document/components/inline/xref_element.rb +0 -10
- data/lib/metanorma/document/components/inline.rb +0 -12
- data/lib/metanorma/document/components/multi_paragraph/quote_block.rb +29 -0
- data/lib/metanorma/document/components/multi_paragraph.rb +0 -2
- data/lib/metanorma/document/components/reference_elements/source_element.rb +31 -0
- data/lib/metanorma/document/components/reference_elements.rb +2 -2
- data/lib/metanorma/document/components/tables/table_block.rb +22 -0
- data/lib/metanorma/document/components/tables/table_section.rb +25 -0
- data/lib/metanorma/document/components/tables.rb +3 -5
- data/lib/metanorma/document/relaton/address.rb +27 -0
- data/lib/metanorma/document/relaton/bib_item_locality.rb +12 -3
- data/lib/metanorma/document/relaton/copyright_association.rb +10 -0
- data/lib/metanorma/document/relaton/edition.rb +7 -4
- data/lib/metanorma/document/relaton/organization.rb +14 -0
- data/lib/metanorma/document/relaton/phone.rb +9 -3
- data/lib/metanorma/document/relaton/place_type.rb +13 -0
- data/lib/metanorma/document/relaton/price_type.rb +9 -3
- data/lib/metanorma/document/relaton.rb +1 -6
- data/lib/metanorma/document/version.rb +1 -1
- data/lib/metanorma/document.rb +0 -2
- data/lib/metanorma/html/asset_pipeline.rb +0 -1
- data/lib/metanorma/html/base_renderer.rb +1008 -261
- data/lib/metanorma/html/bipm_renderer.rb +144 -15
- data/lib/metanorma/html/cc_renderer.rb +45 -1
- data/lib/metanorma/html/component/base.rb +7 -2
- data/lib/metanorma/html/component/index_section.rb +43 -41
- data/lib/metanorma/html/drops/admonition_drop.rb +4 -1
- data/lib/metanorma/html/drops/block_element_drop.rb +2 -7
- data/lib/metanorma/html/drops/example_drop.rb +4 -1
- data/lib/metanorma/html/drops/figure_drop.rb +22 -31
- data/lib/metanorma/html/drops/footnote_drop.rb +1 -1
- data/lib/metanorma/html/drops/formula_drop.rb +16 -45
- data/lib/metanorma/html/drops/note_drop.rb +7 -9
- data/lib/metanorma/html/drops/sourcecode_drop.rb +5 -12
- data/lib/metanorma/html/drops.rb +0 -2
- data/lib/metanorma/html/generator.rb +2 -2
- data/lib/metanorma/html/icc_renderer.rb +39 -0
- data/lib/metanorma/html/iec_renderer.rb +44 -1
- data/lib/metanorma/html/ieee_renderer.rb +45 -1
- data/lib/metanorma/html/ietf_renderer.rb +48 -1
- data/lib/metanorma/html/iho_renderer.rb +46 -1
- data/lib/metanorma/html/iso_renderer.rb +343 -290
- data/lib/metanorma/html/itu_renderer.rb +45 -1
- data/lib/metanorma/html/ogc_renderer.rb +76 -15
- data/lib/metanorma/html/oiml_renderer.rb +38 -18
- data/lib/metanorma/html/pdfa_renderer.rb +39 -0
- data/lib/metanorma/html/ribose_renderer.rb +45 -1
- data/lib/metanorma/html/standard_renderer.rb +229 -341
- data/lib/metanorma/html/templates/_footnotes.html.liquid +6 -6
- data/lib/metanorma/html/templates/_formula.html.liquid +1 -1
- data/lib/metanorma/html/templates/_header.html.liquid +1 -1
- data/lib/metanorma/html/templates/_iso_cover.html.liquid +1 -1
- data/lib/metanorma/html/templates/document.html.liquid +0 -4
- data/lib/metanorma/html/theme.rb +107 -180
- data/lib/metanorma/html.rb +3 -14
- data/lib/metanorma/ietf_document/metadata/ietf_bib_data_extension_type.rb +25 -0
- data/lib/metanorma/ietf_document/metadata.rb +0 -2
- data/lib/metanorma/iso_document/metadata/iso_bib_data_extension_type.rb +48 -0
- data/lib/metanorma/iso_document/metadata/iso_bibliographic_item.rb +72 -0
- data/lib/metanorma/iso_document/metadata/iso_document_status.rb +30 -0
- data/lib/metanorma/iso_document/metadata/iso_localized_title.rb +1 -4
- data/lib/metanorma/iso_document/metadata/structured_identifier.rb +17 -0
- data/lib/metanorma/iso_document/metadata/title_collection.rb +0 -1
- data/lib/metanorma/iso_document/metadata.rb +4 -9
- data/lib/metanorma/iso_document/terms/iso_term.rb +13 -0
- data/lib/metanorma/iso_document/terms.rb +0 -1
- data/lib/metanorma/itu_document/metadata/itu_bib_data_extension_type.rb +37 -0
- data/lib/metanorma/itu_document/metadata.rb +4 -3
- data/lib/metanorma/standard_document/block_attributes.rb +9 -5
- data/lib/metanorma/standard_document/blocks/block_source.rb +23 -0
- data/lib/metanorma/standard_document/blocks.rb +1 -1
- data/lib/metanorma/standard_document/terms/term_expression.rb +31 -0
- data/lib/metanorma/standard_document/terms.rb +0 -1
- data/metanorma-document.gemspec +35 -0
- metadata +13 -262
- data/CLAUDE.md +0 -26
- data/TODO.finalize/01-split-multi-class-files.md +0 -8
- data/TODO.finalize/02-remove-data-dist-iso-document-frontend.md +0 -6
- data/TODO.finalize/03-align-frontend-iife-and-gha-build.md +0 -11
- data/TODO.finalize/04-theme-per-flavor-config-driven.md +0 -9
- data/TODO.finalize/05-migrate-all-html-to-liquid.md +0 -16
- data/TODO.finalize/06-integrate-pubid-library.md +0 -16
- data/TODO.finalize/07-replace-relaton-models-with-relaton-bib.md +0 -39
- data/TODO.finalize/08-refactor-renderer-architecture.md +0 -25
- data/TODO.finalize/09-eliminate-code-smells.md +0 -14
- data/TODO.finalize/10-comprehensive-spec-coverage.md +0 -24
- data/TODO.finalize/11-config-driven-flavor-metadata.md +0 -20
- data/TODO.finalize/12-add-frozen-string-literal.md +0 -6
- data/TODO.finalize/13-extract-composition-from-god-class.md +0 -96
- data/TODO.finalize/14-config-driven-section-ordering.md +0 -31
- data/TODO.finalize/15-theme-directories-per-flavor.md +0 -46
- data/TODO.finalize/16-theme-lutaml-model-schema.md +0 -44
- data/data/javascripts/components/mn-footnotes.js +0 -68
- data/data/logos/oiml-logo-full-dark.svg +0 -1
- data/data/logos/oiml-logo-full-light.svg +0 -1
- data/data/logos/oiml-logo-icon-dark.svg +0 -1
- data/data/logos/oiml-logo-icon-light.svg +0 -1
- data/data/logos/oiml-logo.svg +0 -1
- data/data/themes/bipm.yaml +0 -60
- data/data/themes/cc.yaml +0 -43
- data/data/themes/icc.yaml +0 -39
- data/data/themes/iec.yaml +0 -44
- data/data/themes/ieee.yaml +0 -43
- data/data/themes/ietf.yaml +0 -45
- data/data/themes/iho.yaml +0 -46
- data/data/themes/iso.yaml +0 -40
- data/data/themes/itu.yaml +0 -45
- data/data/themes/ogc.yaml +0 -51
- data/data/themes/oiml.yaml +0 -56
- data/data/themes/pdfa.yaml +0 -44
- data/data/themes/ribose.yaml +0 -43
- data/exe/metanorma-document +0 -11
- data/frontend/e2e/sample-html.test.ts +0 -256
- data/frontend/index.html +0 -12
- data/frontend/package-lock.json +0 -4725
- data/frontend/package.json +0 -32
- data/frontend/postcss.config.js +0 -6
- data/frontend/src/App.vue +0 -79
- data/frontend/src/app.ts +0 -21
- data/frontend/src/components/AppSidebar.vue +0 -77
- data/frontend/src/components/DocumentReader.vue +0 -180
- data/frontend/src/components/MirrorRenderer.vue +0 -23
- data/frontend/src/components/ReadingProgressBar.vue +0 -29
- data/frontend/src/components/TextRenderer.vue +0 -131
- data/frontend/src/components/TocItem.vue +0 -57
- data/frontend/src/components/TopBar.vue +0 -49
- data/frontend/src/components/__tests__/MirrorRenderer.test.ts +0 -178
- data/frontend/src/components/blocks/AdmonitionBlock.vue +0 -74
- data/frontend/src/components/blocks/ClauseBlock.vue +0 -53
- data/frontend/src/components/blocks/ExampleBlock.vue +0 -21
- data/frontend/src/components/blocks/FallbackBlock.vue +0 -18
- data/frontend/src/components/blocks/FigureBlock.vue +0 -26
- data/frontend/src/components/blocks/FootnotesBlock.vue +0 -25
- data/frontend/src/components/blocks/ListBlocks.vue +0 -62
- data/frontend/src/components/blocks/NoteBlock.vue +0 -21
- data/frontend/src/components/blocks/ParagraphBlock.vue +0 -25
- data/frontend/src/components/blocks/QuoteBlock.vue +0 -25
- data/frontend/src/components/blocks/ReviewBlock.vue +0 -39
- data/frontend/src/components/blocks/SourcecodeBlock.vue +0 -52
- data/frontend/src/components/blocks/TableBlock.vue +0 -48
- data/frontend/src/components/blocks/index.ts +0 -36
- data/frontend/src/stores/__tests__/documentStore.fixture.test.ts +0 -272
- data/frontend/src/stores/__tests__/documentStore.test.ts +0 -143
- data/frontend/src/stores/__tests__/ebookStore.test.ts +0 -145
- data/frontend/src/stores/__tests__/uiStore.test.ts +0 -42
- data/frontend/src/stores/documentStore.ts +0 -153
- data/frontend/src/stores/ebookStore.ts +0 -179
- data/frontend/src/stores/uiStore.ts +0 -32
- data/frontend/src/styles.css +0 -156
- data/frontend/src/types/__tests__/rendering-contract.test.ts +0 -172
- data/frontend/src/types/rendering-contract.ts +0 -209
- data/frontend/src/utils/__tests__/typeMetadata.test.ts +0 -102
- data/frontend/src/utils/typeMetadata.ts +0 -121
- data/frontend/tailwind.config.js +0 -18
- data/frontend/test/fixtures/iso-document.json +0 -271
- data/frontend/tmp/debug_e2e.cjs +0 -46
- data/frontend/tsconfig.json +0 -25
- data/frontend/tsconfig.node.json +0 -11
- data/frontend/vite.config.ts +0 -37
- data/frontend/vitest.e2e.config.ts +0 -9
- data/lib/metanorma/bipm_document/metadata/depiction_element.rb +0 -18
- data/lib/metanorma/document/cli.rb +0 -116
- data/lib/metanorma/document/components/ancillary_blocks/callout_annotation.rb +0 -27
- data/lib/metanorma/document/components/ancillary_blocks/sourcecode_body.rb +0 -18
- data/lib/metanorma/document/components/blocks/classification_value.rb +0 -21
- data/lib/metanorma/document/components/blocks/permission_model.rb +0 -28
- data/lib/metanorma/document/components/blocks/recommendation_model.rb +0 -28
- data/lib/metanorma/document/components/blocks/requirement_base.rb +0 -30
- data/lib/metanorma/document/components/blocks/requirement_classification.rb +0 -20
- data/lib/metanorma/document/components/blocks/requirement_description.rb +0 -43
- data/lib/metanorma/document/components/blocks/requirement_inherit.rb +0 -24
- data/lib/metanorma/document/components/inline/location_element.rb +0 -24
- data/lib/metanorma/document/components/inline/rendered_display.rb +0 -23
- data/lib/metanorma/document/components/inline/rendered_math_element.rb +0 -21
- data/lib/metanorma/document/components/inline/semantic_content.rb +0 -51
- data/lib/metanorma/document/components/inline/semantic_math_element.rb +0 -20
- data/lib/metanorma/document/components/inline/vocabulary.rb +0 -184
- data/lib/metanorma/document/components/multi_paragraph/quote_author_element.rb +0 -20
- data/lib/metanorma/document/components/reference_elements/source_modification.rb +0 -21
- data/lib/metanorma/document/components/reference_elements/source_origin.rb +0 -28
- data/lib/metanorma/document/components/tables/col_element.rb +0 -18
- data/lib/metanorma/document/components/tables/col_group_element.rb +0 -18
- data/lib/metanorma/document/components/tables/table_body_section.rb +0 -16
- data/lib/metanorma/document/components/tables/table_foot_section.rb +0 -16
- data/lib/metanorma/document/components/tables/table_head_section.rb +0 -16
- data/lib/metanorma/document/relaton/copyright_owner.rb +0 -16
- data/lib/metanorma/document/relaton/formatted_address.rb +0 -29
- data/lib/metanorma/document/relaton/logo_element.rb +0 -18
- data/lib/metanorma/document/relaton/region_element.rb +0 -18
- data/lib/metanorma/html/drops/biblio_entry_drop.rb +0 -50
- data/lib/metanorma/html/renderers/block_renderer.rb +0 -372
- data/lib/metanorma/html/renderers/inline_renderer.rb +0 -655
- data/lib/metanorma/html/renderers/pubid_renderer.rb +0 -69
- data/lib/metanorma/html/renderers/section_renderer.rb +0 -193
- data/lib/metanorma/html/renderers.rb +0 -8
- data/lib/metanorma/html/templates/_audio.html.liquid +0 -1
- data/lib/metanorma/html/templates/_biblio_entry.html.liquid +0 -1
- data/lib/metanorma/html/templates/_bipm_cover.html.liquid +0 -27
- data/lib/metanorma/html/templates/_boilerplate.html.liquid +0 -1
- data/lib/metanorma/html/templates/_bookmark.html.liquid +0 -1
- data/lib/metanorma/html/templates/_br.html.liquid +0 -1
- data/lib/metanorma/html/templates/_definition_list.html.liquid +0 -6
- data/lib/metanorma/html/templates/_element.html.liquid +0 -1
- data/lib/metanorma/html/templates/_fn_marker.html.liquid +0 -1
- data/lib/metanorma/html/templates/_heading.html.liquid +0 -1
- data/lib/metanorma/html/templates/_image.html.liquid +0 -1
- data/lib/metanorma/html/templates/_inline_span.html.liquid +0 -1
- data/lib/metanorma/html/templates/_link.html.liquid +0 -1
- data/lib/metanorma/html/templates/_list.html.liquid +0 -3
- data/lib/metanorma/html/templates/_list_item.html.liquid +0 -1
- data/lib/metanorma/html/templates/_main_content.html.liquid +0 -1
- data/lib/metanorma/html/templates/_math_container.html.liquid +0 -1
- data/lib/metanorma/html/templates/_paragraph.html.liquid +0 -1
- data/lib/metanorma/html/templates/_prefatory_section.html.liquid +0 -1
- data/lib/metanorma/html/templates/_pubid_identifier.html.liquid +0 -1
- data/lib/metanorma/html/templates/_quote.html.liquid +0 -4
- data/lib/metanorma/html/templates/_ref_date.html.liquid +0 -1
- data/lib/metanorma/html/templates/_ref_title.html.liquid +0 -1
- data/lib/metanorma/html/templates/_section.html.liquid +0 -5
- data/lib/metanorma/html/templates/_standard_cover.html.liquid +0 -31
- data/lib/metanorma/html/templates/_standard_doc_title.html.liquid +0 -3
- data/lib/metanorma/html/templates/_stem_span.html.liquid +0 -1
- data/lib/metanorma/html/templates/_table.html.liquid +0 -9
- data/lib/metanorma/html/templates/_term_domain.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_example.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_note.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_number.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_source.html.liquid +0 -1
- data/lib/metanorma/html/templates/_term_text_note.html.liquid +0 -1
- data/lib/metanorma/html/templates/_video.html.liquid +0 -1
- data/lib/metanorma/html/templates/_wrapped_preface.html.liquid +0 -1
- data/lib/metanorma/ietf_document/metadata/pi_settings.rb +0 -32
- data/lib/metanorma/iso_document/metadata/doctype_element.rb +0 -20
- data/lib/metanorma/iso_document/metadata/language_element.rb +0 -18
- 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/terms/term_domain_element.rb +0 -18
- 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/mirror/default_registry.rb +0 -170
- 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/rich_html_renderer.rb +0 -159
- data/lib/metanorma/mirror/handlers/inline/text_extractor.rb +0 -116
- data/lib/metanorma/mirror/handlers/inline.rb +0 -225
- 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/metanorma_to_mirror.rb +0 -101
- 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 -25
- 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 -81
- data/lib/metanorma/mirror/output/formats.rb +0 -53
- data/lib/metanorma/mirror/output/html_renderer.rb +0 -95
- data/lib/metanorma/mirror/output/html_renderers/block_renderers.rb +0 -178
- data/lib/metanorma/mirror/output/html_renderers/inline_renderer.rb +0 -61
- data/lib/metanorma/mirror/output/html_renderers/list_renderers.rb +0 -96
- data/lib/metanorma/mirror/output/html_renderers/mark_renderers.rb +0 -64
- data/lib/metanorma/mirror/output/html_renderers/section_renderers.rb +0 -129
- data/lib/metanorma/mirror/output/html_renderers/structural_renderers.rb +0 -80
- data/lib/metanorma/mirror/output/html_renderers/table_renderers.rb +0 -87
- data/lib/metanorma/mirror/output/html_renderers.rb +0 -76
- data/lib/metanorma/mirror/output/pipeline.rb +0 -92
- data/lib/metanorma/mirror/output/pipeline_context.rb +0 -22
- data/lib/metanorma/mirror/output.rb +0 -14
- data/lib/metanorma/mirror/rewriter.rb +0 -121
- 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 -22
- data/lib/metanorma/mirror.rb +0 -32
- data/lib/metanorma/standard_document/annotation.rb +0 -37
- data/lib/metanorma/standard_document/blocks/source_origin_element.rb +0 -23
- data/lib/metanorma/standard_document/terms/term_name_element.rb +0 -29
- data/script/render_both.rb +0 -18
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module Html
|
|
5
|
-
module Renderers
|
|
6
|
-
class PubidRenderer
|
|
7
|
-
FLAVOR_PUBID_MAP = {
|
|
8
|
-
"IsoDocument" => :"Pubid::Iso",
|
|
9
|
-
"IecDocument" => :"Pubid::Iec",
|
|
10
|
-
"IeeeDocument" => :"Pubid::Ieee",
|
|
11
|
-
"IhoDocument" => :"Pubid::Iho",
|
|
12
|
-
"ItuDocument" => :"Pubid::Ithu",
|
|
13
|
-
"OimlDocument" => :"Pubid::Oiml",
|
|
14
|
-
}.freeze
|
|
15
|
-
|
|
16
|
-
def initialize(coordinator)
|
|
17
|
-
@coordinator = coordinator
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def parse_pubid(docidentifier_string)
|
|
21
|
-
return nil if docidentifier_string.nil? || docidentifier_string.strip.empty?
|
|
22
|
-
|
|
23
|
-
flavor_module = resolve_pubid_module
|
|
24
|
-
return nil unless flavor_module
|
|
25
|
-
|
|
26
|
-
flavor_module.parse(docidentifier_string)
|
|
27
|
-
rescue StandardError
|
|
28
|
-
nil
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def pubid_to_html(identifier)
|
|
32
|
-
return nil unless identifier
|
|
33
|
-
|
|
34
|
-
@coordinator.render_liquid("_pubid_identifier.html.liquid", {
|
|
35
|
-
"publisher" => identifier.publisher ? escape_html(identifier.publisher) : nil,
|
|
36
|
-
"number" => identifier.number ? escape_html(identifier.number.to_s) : nil,
|
|
37
|
-
"date" => identifier.date ? escape_html(identifier.date.to_s) : nil,
|
|
38
|
-
})
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
private
|
|
42
|
-
|
|
43
|
-
def escape_html(text)
|
|
44
|
-
@coordinator.escape_html(text)
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def resolve_pubid_module
|
|
48
|
-
flavor_name = @coordinator.flavor_name
|
|
49
|
-
return nil unless flavor_name
|
|
50
|
-
|
|
51
|
-
@coordinator.class.ancestors.each do |ancestor|
|
|
52
|
-
next unless ancestor.is_a?(Class)
|
|
53
|
-
|
|
54
|
-
ns = ancestor.name&.split("::")&.detect do |n|
|
|
55
|
-
FLAVOR_PUBID_MAP.key?(n)
|
|
56
|
-
end
|
|
57
|
-
next unless ns
|
|
58
|
-
|
|
59
|
-
mod = FLAVOR_PUBID_MAP[ns]
|
|
60
|
-
return Object.const_get(mod.to_s)
|
|
61
|
-
end
|
|
62
|
-
nil
|
|
63
|
-
rescue NameError
|
|
64
|
-
nil
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
end
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module Html
|
|
5
|
-
module Renderers
|
|
6
|
-
class SectionRenderer
|
|
7
|
-
def initialize(coordinator)
|
|
8
|
-
@coordinator = coordinator
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def render_basic_section(section, level: 1, **_opts)
|
|
12
|
-
attrs = element_attrs(id: safe_attr(section, :id))
|
|
13
|
-
title_html = render_section_title(section, level)
|
|
14
|
-
content = section.blocks&.filter_map do |block|
|
|
15
|
-
coordinator.render(block)
|
|
16
|
-
end&.join
|
|
17
|
-
notes_html = section.notes&.filter_map do |note|
|
|
18
|
-
coordinator.render_note(note)
|
|
19
|
-
end&.join
|
|
20
|
-
render_liquid("_section.html.liquid", {
|
|
21
|
-
"attrs" => attrs,
|
|
22
|
-
"title" => title_html,
|
|
23
|
-
"content" => content,
|
|
24
|
-
"notes" => notes_html,
|
|
25
|
-
})
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def render_hierarchical_section(section, level: 1, **_opts)
|
|
29
|
-
attrs = element_attrs(id: safe_attr(section, :id))
|
|
30
|
-
title_html = render_section_title(section, level)
|
|
31
|
-
content = render_section_content(section, level)
|
|
32
|
-
subsections_html = section.subsections&.filter_map do |sub|
|
|
33
|
-
coordinator.render(sub, level: level + 1)
|
|
34
|
-
end&.join
|
|
35
|
-
render_liquid("_section.html.liquid", {
|
|
36
|
-
"attrs" => attrs,
|
|
37
|
-
"title" => title_html,
|
|
38
|
-
"content" => "#{content}#{subsections_html}",
|
|
39
|
-
})
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def render_content_section(section, level: 1, **_opts)
|
|
43
|
-
render_hierarchical_section(section, level: level, **_opts)
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def render_section_title(section, level)
|
|
47
|
-
titles = section.title
|
|
48
|
-
return nil unless titles
|
|
49
|
-
return nil if titles.is_a?(Array) && titles.empty?
|
|
50
|
-
|
|
51
|
-
h = "h#{[[level, 6].min, 1].max}"
|
|
52
|
-
title_text = coordinator.extract_title_text(titles)
|
|
53
|
-
render_liquid("_heading.html.liquid", "tag" => h, "class_attr" => "",
|
|
54
|
-
"content" => escape_html(title_text))
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
def render_section_content(section, _level)
|
|
58
|
-
parts = []
|
|
59
|
-
section.blocks&.each do |block|
|
|
60
|
-
parts << (coordinator.render(block) || "")
|
|
61
|
-
end
|
|
62
|
-
section.notes&.each do |note|
|
|
63
|
-
parts << (coordinator.render_note(note) || "")
|
|
64
|
-
end
|
|
65
|
-
parts.join
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
def collect_ordered_children(section)
|
|
69
|
-
children = []
|
|
70
|
-
|
|
71
|
-
coordinator.walk_ordered(section) do |type, obj|
|
|
72
|
-
next if %i[text tab].include?(type)
|
|
73
|
-
|
|
74
|
-
children << obj
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
supplementary_attrs = %i[terms definitions]
|
|
78
|
-
supplementary_attrs.each do |attr|
|
|
79
|
-
val = safe_attr(section, attr)
|
|
80
|
-
next if val.nil?
|
|
81
|
-
|
|
82
|
-
Array(val).each do |v|
|
|
83
|
-
children << v unless children.include?(v)
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
children.compact!
|
|
88
|
-
sort_by_displayorder(children)
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
def render_ordered_content(section, level = 1)
|
|
92
|
-
children = collect_ordered_children(section)
|
|
93
|
-
parts = []
|
|
94
|
-
children.each do |node|
|
|
95
|
-
next if node.is_a?(String)
|
|
96
|
-
next if coordinator.is_title_element?(node, section)
|
|
97
|
-
|
|
98
|
-
parts << (coordinator.render(node, level: level + 1) || "")
|
|
99
|
-
end
|
|
100
|
-
parts.join
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
def sort_by_displayorder(children)
|
|
104
|
-
children.sort_by do |node|
|
|
105
|
-
order = if node.is_a?(Lutaml::Model::Serializable) &&
|
|
106
|
-
node.class.attributes.key?(:displayorder)
|
|
107
|
-
node.displayorder
|
|
108
|
-
end
|
|
109
|
-
order &&= order.to_i
|
|
110
|
-
order || Float::INFINITY
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
def render_preface(preface, **_opts)
|
|
115
|
-
order = coordinator.theme.preface_order
|
|
116
|
-
toc_filters = coordinator.theme.toc_filter_types
|
|
117
|
-
|
|
118
|
-
if coordinator.theme.preface_wrap
|
|
119
|
-
render_wrapped_preface(preface, order, toc_filters)
|
|
120
|
-
else
|
|
121
|
-
render_ordered_preface(preface, order, toc_filters)
|
|
122
|
-
end
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
def render_ordered_preface(preface, order, toc_filters)
|
|
126
|
-
parts = []
|
|
127
|
-
order.each do |section_name|
|
|
128
|
-
case section_name
|
|
129
|
-
when "clause"
|
|
130
|
-
clauses = preface_clauses_filtered(preface, toc_filters)
|
|
131
|
-
clauses&.each do |cl|
|
|
132
|
-
parts << (coordinator.render(cl, level: 1) || "")
|
|
133
|
-
end
|
|
134
|
-
else
|
|
135
|
-
value = safe_attr(preface, section_name.to_sym)
|
|
136
|
-
parts << (coordinator.render(value) || "") if value
|
|
137
|
-
end
|
|
138
|
-
end
|
|
139
|
-
parts.join
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
def render_wrapped_preface(preface, order, toc_filters)
|
|
143
|
-
clauses = preface_clauses_filtered(preface, toc_filters)
|
|
144
|
-
other_sections = order.reject { |n| n == "clause" }
|
|
145
|
-
has_others = other_sections.any? do |name|
|
|
146
|
-
val = safe_attr(preface, name.to_sym)
|
|
147
|
-
val && !Array(val).empty?
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
return nil if clauses.empty? && !has_others
|
|
151
|
-
|
|
152
|
-
coordinator.register_toc_entry(id: "preface", level: 1,
|
|
153
|
-
text: "Preface")
|
|
154
|
-
content = clauses.filter_map do |cl|
|
|
155
|
-
coordinator.render(cl, level: 2)
|
|
156
|
-
end.join
|
|
157
|
-
render_liquid("_wrapped_preface.html.liquid", content: content)
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
def preface_clauses_filtered(preface, toc_filters)
|
|
161
|
-
clauses = safe_attr(preface, :clause) || safe_attr(preface, :content)
|
|
162
|
-
clauses = Array(clauses)
|
|
163
|
-
return clauses if toc_filters.empty?
|
|
164
|
-
|
|
165
|
-
clauses.reject do |cl|
|
|
166
|
-
cl_type = safe_attr(cl, :type)
|
|
167
|
-
cl_type && toc_filters.include?(cl_type)
|
|
168
|
-
end
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
private
|
|
172
|
-
|
|
173
|
-
attr_reader :coordinator
|
|
174
|
-
|
|
175
|
-
def safe_attr(obj, method_name)
|
|
176
|
-
coordinator.safe_attr(obj, method_name)
|
|
177
|
-
end
|
|
178
|
-
|
|
179
|
-
def escape_html(text)
|
|
180
|
-
coordinator.escape_html(text)
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
def element_attrs(**attrs)
|
|
184
|
-
coordinator.element_attrs(**attrs)
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
def render_liquid(template_name, assigns)
|
|
188
|
-
coordinator.render_liquid(template_name, assigns)
|
|
189
|
-
end
|
|
190
|
-
end
|
|
191
|
-
end
|
|
192
|
-
end
|
|
193
|
-
end
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<audio{{ attrs }} controls></audio>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p{% if entry.id %} id="{{ entry.id }}"{% endif %} class="{{ entry.css_class }}">{% if entry.has_ordinal %}<span class="biblio-ordinal">{{ entry.ordinal_html }}</span> {% endif %}{% if entry.has_url %}<a href="{{ entry.url }}" target="_blank" rel="noopener" class="biblio-link">{% endif %}{% if entry.pubid_html %}<span class="ref-pubid">{{ entry.pubid_html }}</span>{% endif %}{% if entry.has_url %}</a>{% endif %} {{ entry.content_html }}</p>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<div class="title-section">
|
|
2
|
-
<div class="cover-grid">
|
|
3
|
-
<div class="cover-meta">
|
|
4
|
-
{% if logos %}
|
|
5
|
-
<div class="cover-publishers">
|
|
6
|
-
{% for svg in logos %}
|
|
7
|
-
{{ svg }}
|
|
8
|
-
{% endfor %}
|
|
9
|
-
</div>
|
|
10
|
-
{% endif %}
|
|
11
|
-
{% for id in doc_ids %}
|
|
12
|
-
<p class="cover-doc-id">{{ id }}</p>
|
|
13
|
-
{% endfor %}
|
|
14
|
-
{% if date %}
|
|
15
|
-
<p class="cover-date">{{ date }}</p>
|
|
16
|
-
{% endif %}
|
|
17
|
-
</div>
|
|
18
|
-
<div class="cover-body">
|
|
19
|
-
{% if title %}
|
|
20
|
-
<div class="cover-title"><span>{{ title }}</span></div>
|
|
21
|
-
{% endif %}
|
|
22
|
-
{% if stage %}
|
|
23
|
-
<div class="cover-stage"><p>{{ stage }}</p></div>
|
|
24
|
-
{% endif %}
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
</div><hr class="cover-separator" />
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="boilerplate-copyright">{{ content }}</div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<a id="{{ id }}"></a>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<br />
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<{{ tag }}{{ extra_attrs }}>{{ content }}</{{ tag }}>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<span{{ attrs }}><span class="fn-link" id="fnref-{{ number }}" tabindex="0" role="link" aria-label="Footnote {{ label }}" data-href="#footnote-{{ number }}">{{ label }}</span>{% if popup_html %}<span class="fn-popup">{{ popup_html }}</span>{% endif %}</span>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<{{ tag }}{{ class_attr }}>{{ content }}</{{ tag }}>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<img{{ attrs }} />
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<span{{ attrs }}>{{ content }}</span>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<a{{ attrs }}>{% if content %}{{ content }}{% else %}{{ display_text }}{% endif %}</a>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<li{{ attrs }}>{{ content }}</li>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<main class="main-section">{{ content }}</main>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<span class="math-container"{{ data_attrs }}><math xmlns="http://www.w3.org/1998/Math/MathML">{{ content }}</math></span>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p{{ attrs }}>{{ content }}</p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="prefatory-section">{{ content }}</div><hr class="cover-separator" />
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{% if publisher %}<span class="ref-publisher-name">{{ publisher }}</span>{% endif %}{% if number %} <span class="ref-doc-number">{{ number }}</span>{% endif %}{% if date %}:<span class="ref-year">{{ date }}</span>{% endif %}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{ prefix }}<span class="ref-year">{{ year }}</span>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
, <i>{{ content }}</i>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<div class="title-section">
|
|
2
|
-
<div class="cover-grid">
|
|
3
|
-
<div class="cover-meta">
|
|
4
|
-
{% if publisher_logos %}
|
|
5
|
-
<div class="cover-publishers">
|
|
6
|
-
{% for logo in publisher_logos %}
|
|
7
|
-
{{ logo }}
|
|
8
|
-
{% endfor %}
|
|
9
|
-
</div>
|
|
10
|
-
{% endif %}
|
|
11
|
-
{% if doc_id %}
|
|
12
|
-
<p class="cover-doc-id">{{ doc_id | escape }}</p>
|
|
13
|
-
{% endif %}
|
|
14
|
-
{% if pub_date %}
|
|
15
|
-
<p class="cover-date">{{ pub_date | escape }}</p>
|
|
16
|
-
{% endif %}
|
|
17
|
-
</div>
|
|
18
|
-
<div class="cover-body">
|
|
19
|
-
{% if doctype %}
|
|
20
|
-
<p class="cover-doctype">{{ doctype | escape }}</p>
|
|
21
|
-
{% endif %}
|
|
22
|
-
{% if title %}
|
|
23
|
-
<div class="cover-title"><span>{{ title | escape }}</span></div>
|
|
24
|
-
{% endif %}
|
|
25
|
-
{% if stage %}
|
|
26
|
-
<div class="cover-stage"><p>{{ stage | escape }}</p></div>
|
|
27
|
-
{% endif %}
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
<hr class="cover-separator" />
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<span class="stem"{{ data_attrs }}>{{ text }}</span>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<div class="table-scroll-wrapper">
|
|
2
|
-
{% if caption %}<div class="table-caption">{{ caption }}</div>{% endif %}
|
|
3
|
-
<table{{ attrs }}>
|
|
4
|
-
{% if colgroup_html %}{{ colgroup_html }}{% endif %}
|
|
5
|
-
{% if thead_html %}{{ thead_html }}{% endif %}
|
|
6
|
-
{{ tbody_html }}
|
|
7
|
-
{% if tfoot_html %}{{ tfoot_html }}{% endif %}
|
|
8
|
-
</table>
|
|
9
|
-
</div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p class="term-domain"><{{ text }}></p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p><span class="example-label">{{ label }}</span> {{ content }}</p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p><span class="term-note-label">{{ label }}: </span>{{ content }}</p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p class="term-number">{{ content }}</p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p class="term-source">[SOURCE: {{ content }}]</p>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div class="note-block"><p><span class="term-note-label">{{ label }}</span>{{ content }}</p></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<video{{ attrs }} controls></video>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div id="preface" class="preface-section"><h1 class="foreword-title">Preface</h1>{{ content }}</div>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module IetfDocument
|
|
5
|
-
module Metadata
|
|
6
|
-
class PiSettings < Lutaml::Model::Serializable
|
|
7
|
-
attribute :toc, :string
|
|
8
|
-
attribute :tocdepth, :string
|
|
9
|
-
attribute :symrefs, :string
|
|
10
|
-
attribute :sortrefs, :string
|
|
11
|
-
attribute :compact, :string
|
|
12
|
-
attribute :subcompact, :string
|
|
13
|
-
attribute :strict, :string
|
|
14
|
-
attribute :comments, :string
|
|
15
|
-
attribute :notedraftinprogress, :string
|
|
16
|
-
|
|
17
|
-
xml do
|
|
18
|
-
element "pi"
|
|
19
|
-
map_element "toc", to: :toc
|
|
20
|
-
map_element "tocdepth", to: :tocdepth
|
|
21
|
-
map_element "symrefs", to: :symrefs
|
|
22
|
-
map_element "sortrefs", to: :sortrefs
|
|
23
|
-
map_element "compact", to: :compact
|
|
24
|
-
map_element "subcompact", to: :subcompact
|
|
25
|
-
map_element "strict", to: :strict
|
|
26
|
-
map_element "comments", to: :comments
|
|
27
|
-
map_element "notedraftinprogress", to: :notedraftinprogress
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module IsoDocument
|
|
5
|
-
module Metadata
|
|
6
|
-
class DoctypeElement < Lutaml::Model::Serializable
|
|
7
|
-
attribute :language, :string
|
|
8
|
-
attribute :abbreviation, :string
|
|
9
|
-
attribute :value, :string
|
|
10
|
-
|
|
11
|
-
xml do
|
|
12
|
-
element "doctype"
|
|
13
|
-
map_attribute "language", to: :language, render_empty: true
|
|
14
|
-
map_attribute "abbreviation", to: :abbreviation
|
|
15
|
-
map_content to: :value
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module IsoDocument
|
|
5
|
-
module Metadata
|
|
6
|
-
class LanguageElement < Lutaml::Model::Serializable
|
|
7
|
-
attribute :current, :string
|
|
8
|
-
attribute :value, :string
|
|
9
|
-
|
|
10
|
-
xml do
|
|
11
|
-
element "language"
|
|
12
|
-
map_attribute "current", to: :current
|
|
13
|
-
map_content to: :value
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module IsoDocument
|
|
5
|
-
module Metadata
|
|
6
|
-
class ProjectNumber < Lutaml::Model::Serializable
|
|
7
|
-
attribute :part, :string
|
|
8
|
-
attribute :amendment, :string
|
|
9
|
-
attribute :origyr, :string
|
|
10
|
-
attribute :value, :string
|
|
11
|
-
|
|
12
|
-
xml do
|
|
13
|
-
element "project-number"
|
|
14
|
-
map_attribute "part", to: :part
|
|
15
|
-
map_attribute "amendment", to: :amendment
|
|
16
|
-
map_attribute "origyr", to: :origyr
|
|
17
|
-
map_content to: :value
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module IsoDocument
|
|
5
|
-
module Metadata
|
|
6
|
-
class ScriptElement < Lutaml::Model::Serializable
|
|
7
|
-
attribute :current, :string
|
|
8
|
-
attribute :value, :string
|
|
9
|
-
|
|
10
|
-
xml do
|
|
11
|
-
element "script"
|
|
12
|
-
map_attribute "current", to: :current
|
|
13
|
-
map_content to: :value
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module IsoDocument
|
|
5
|
-
module Metadata
|
|
6
|
-
class StageElement < Lutaml::Model::Serializable
|
|
7
|
-
attribute :abbreviation, :string
|
|
8
|
-
attribute :language, :string
|
|
9
|
-
attribute :type, :string
|
|
10
|
-
attribute :value, :string, collection: true
|
|
11
|
-
attribute :br, Metanorma::Document::Components::Inline::BrElement,
|
|
12
|
-
collection: true
|
|
13
|
-
|
|
14
|
-
xml do
|
|
15
|
-
element "stage"
|
|
16
|
-
mixed_content
|
|
17
|
-
map_attribute "abbreviation", to: :abbreviation
|
|
18
|
-
map_attribute "language", to: :language, render_empty: true
|
|
19
|
-
map_attribute "type", to: :type
|
|
20
|
-
map_content to: :value
|
|
21
|
-
map_element "br", to: :br
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module IsoDocument
|
|
5
|
-
module Metadata
|
|
6
|
-
class StagenameElement < Lutaml::Model::Serializable
|
|
7
|
-
attribute :abbreviation, :string
|
|
8
|
-
attribute :value, :string
|
|
9
|
-
|
|
10
|
-
xml do
|
|
11
|
-
element "stagename"
|
|
12
|
-
map_attribute "abbreviation", to: :abbreviation
|
|
13
|
-
map_content to: :value
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Metanorma
|
|
4
|
-
module IsoDocument
|
|
5
|
-
module Terms
|
|
6
|
-
class TermDomainElement < Lutaml::Model::Serializable
|
|
7
|
-
attribute :id, :string
|
|
8
|
-
attribute :text, :string
|
|
9
|
-
|
|
10
|
-
xml do
|
|
11
|
-
element "domain"
|
|
12
|
-
map_attribute "id", to: :id
|
|
13
|
-
map_content to: :text
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|