sts 0.5.3 → 0.5.4
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/GAPS.guidelines.iso-sts-ed2.1/01-maintenance.md +19 -0
- data/GAPS.guidelines.iso-sts-ed2.1/03-general.md +75 -0
- data/GAPS.guidelines.iso-sts-ed2.1/04-structure.md +75 -0
- data/GAPS.guidelines.iso-sts-ed2.1/05-content.md +63 -0
- data/GAPS.guidelines.iso-sts-ed2.1/06-tables.md +53 -0
- data/GAPS.guidelines.iso-sts-ed2.1/07-formulae.md +41 -0
- data/GAPS.guidelines.iso-sts-ed2.1/08-figures.md +45 -0
- data/GAPS.guidelines.iso-sts-ed2.1/09-terms.md +56 -0
- data/GAPS.guidelines.iso-sts-ed2.1/10-references.md +56 -0
- data/GAPS.guidelines.iso-sts-ed2.1/annex-a-multilingual.md +79 -0
- data/GAPS.guidelines.niso-sts-v1.0/01-introduction-scope.md +27 -0
- data/GAPS.guidelines.niso-sts-v1.0/02-document-structure.md +100 -0
- data/GAPS.guidelines.niso-sts-v1.0/03-front-matter.md +149 -0
- data/GAPS.guidelines.niso-sts-v1.0/04-body-content.md +209 -0
- data/GAPS.guidelines.niso-sts-v1.0/05-tables-figures.md +152 -0
- data/GAPS.guidelines.niso-sts-v1.0/06-math-formulae.md +128 -0
- data/GAPS.guidelines.niso-sts-v1.0/07-references.md +113 -0
- data/GAPS.guidelines.niso-sts-v1.0/08-terminology.md +127 -0
- data/GAPS.guidelines.niso-sts-v1.0/09-metadata.md +113 -0
- data/GAPS.guidelines.niso-sts-v1.0/10-iso-iec-variant.md +141 -0
- data/GAPS.guidelines.niso-sts-v1.0/SUMMARY.md +96 -0
- data/GAPS.guidelines.schema-xref.md +101 -0
- data/Gemfile +1 -0
- data/TODO.sts-refactor/00-overview.md +172 -0
- data/TODO.sts-refactor/01-mathml-delegation.md +153 -0
- data/TODO.sts-refactor/02-type-resolution.md +122 -0
- data/TODO.sts-refactor/03-namespace-coupling.md +158 -0
- data/TODO.sts-refactor/04-register-versioning.md +180 -0
- data/TODO.sts-refactor/05-missing-elements.md +195 -0
- data/TODO.sts-refactor/06-missing-attributes.md +152 -0
- data/TODO.sts-refactor/07-incomplete-models.md +180 -0
- data/TODO.sts-refactor/08-isoiec-profile.md +169 -0
- data/TODO.sts-refactor/09-autoload-cleanup.md +88 -0
- data/TODO.sts-refactor/10-test-coverage.md +164 -0
- data/TODO.sts-refactor/11-duplicate-models.md +168 -0
- data/lib/sts/iso_sts/annex_type.rb +2 -0
- data/lib/sts/iso_sts/bold.rb +9 -9
- data/lib/sts/iso_sts/break.rb +3 -0
- data/lib/sts/iso_sts/comm_ref.rb +2 -0
- data/lib/sts/iso_sts/content_language.rb +22 -0
- data/lib/sts/iso_sts/copyright_holder.rb +4 -2
- data/lib/sts/iso_sts/copyright_statement.rb +4 -2
- data/lib/sts/iso_sts/copyright_year.rb +3 -0
- data/lib/sts/iso_sts/doc_ref.rb +2 -0
- data/lib/sts/iso_sts/document_identification.rb +2 -0
- data/lib/sts/iso_sts/edition.rb +2 -0
- data/lib/sts/iso_sts/ext_link.rb +1 -1
- data/lib/sts/iso_sts/front.rb +2 -0
- data/lib/sts/iso_sts/iso_meta.rb +2 -2
- data/lib/sts/iso_sts/italic.rb +9 -9
- data/lib/sts/iso_sts/label.rb +7 -5
- data/lib/sts/iso_sts/language.rb +2 -0
- data/lib/sts/iso_sts/meta_date.rb +20 -0
- data/lib/sts/iso_sts/mixed_citation.rb +5 -5
- data/lib/sts/iso_sts/monospace.rb +26 -0
- data/lib/sts/iso_sts/named_content.rb +44 -0
- data/lib/sts/iso_sts/nat_meta.rb +4 -4
- data/lib/sts/iso_sts/page_count.rb +2 -0
- data/lib/sts/iso_sts/paragraph.rb +8 -8
- data/lib/sts/iso_sts/permissions.rb +2 -0
- data/lib/sts/iso_sts/preformat.rb +3 -3
- data/lib/sts/iso_sts/reg_meta.rb +4 -4
- data/lib/sts/iso_sts/release_date.rb +2 -0
- data/lib/sts/iso_sts/sc.rb +26 -0
- data/lib/sts/iso_sts/sec.rb +2 -2
- data/lib/sts/iso_sts/secretariat.rb +2 -0
- data/lib/sts/iso_sts/standard_cross_reference.rb +4 -2
- data/lib/sts/iso_sts/standard_identification.rb +2 -0
- data/lib/sts/iso_sts/standard_ref.rb +16 -0
- data/lib/sts/iso_sts/std.rb +3 -1
- data/lib/sts/iso_sts/std_ref.rb +2 -0
- data/lib/sts/iso_sts/strike.rb +26 -0
- data/lib/sts/iso_sts/styled_content.rb +11 -9
- data/lib/sts/iso_sts/sub.rb +2 -0
- data/lib/sts/iso_sts/sup.rb +2 -0
- data/lib/sts/iso_sts/table_wrap_foot.rb +2 -0
- data/lib/sts/iso_sts/td.rb +7 -7
- data/lib/sts/iso_sts/term.rb +5 -5
- data/lib/sts/iso_sts/th.rb +7 -7
- data/lib/sts/iso_sts/title.rb +6 -4
- data/lib/sts/iso_sts/title_compl.rb +2 -0
- data/lib/sts/iso_sts/title_full.rb +2 -0
- data/lib/sts/iso_sts/title_intro.rb +2 -0
- data/lib/sts/iso_sts/title_main.rb +2 -0
- data/lib/sts/iso_sts/underline.rb +26 -0
- data/lib/sts/iso_sts/uri.rb +32 -0
- data/lib/sts/iso_sts/xref.rb +3 -3
- data/lib/sts/iso_sts.rb +9 -0
- data/lib/sts/mathml.rb +12 -58
- data/lib/sts/namespaces.rb +2 -0
- data/lib/sts/niso_sts/abstract.rb +2 -0
- data/lib/sts/niso_sts/access_date.rb +2 -0
- data/lib/sts/niso_sts/accrediting_organization.rb +2 -0
- data/lib/sts/niso_sts/addr_line.rb +2 -0
- data/lib/sts/niso_sts/address.rb +2 -0
- data/lib/sts/niso_sts/aff_alternatives.rb +3 -0
- data/lib/sts/niso_sts/alt_text.rb +2 -0
- data/lib/sts/niso_sts/alt_title.rb +2 -0
- data/lib/sts/niso_sts/alternatives.rb +2 -0
- data/lib/sts/niso_sts/anonymous.rb +3 -0
- data/lib/sts/niso_sts/app.rb +2 -0
- data/lib/sts/niso_sts/article_title.rb +2 -0
- data/lib/sts/niso_sts/attrib.rb +2 -0
- data/lib/sts/niso_sts/authorization.rb +2 -0
- data/lib/sts/niso_sts/award_group.rb +22 -4
- data/lib/sts/niso_sts/award_id.rb +6 -0
- data/lib/sts/niso_sts/back.rb +22 -4
- data/lib/sts/niso_sts/body.rb +2 -0
- data/lib/sts/niso_sts/boxed_text.rb +38 -4
- data/lib/sts/niso_sts/break.rb +3 -0
- data/lib/sts/niso_sts/caption.rb +8 -0
- data/lib/sts/niso_sts/chapter_title.rb +2 -0
- data/lib/sts/niso_sts/chem_struct.rb +2 -0
- data/lib/sts/niso_sts/citation_alternatives.rb +2 -0
- data/lib/sts/niso_sts/city.rb +2 -0
- data/lib/sts/niso_sts/code.rb +111 -0
- data/lib/sts/niso_sts/collab_alternatives.rb +3 -0
- data/lib/sts/niso_sts/comm_ref_group.rb +3 -0
- data/lib/sts/niso_sts/comment.rb +2 -0
- data/lib/sts/niso_sts/compound_subject.rb +29 -0
- data/lib/sts/niso_sts/compound_subject_part.rb +39 -0
- data/lib/sts/niso_sts/conf_acronym.rb +2 -0
- data/lib/sts/niso_sts/conf_date.rb +2 -0
- data/lib/sts/niso_sts/conf_loc.rb +2 -0
- data/lib/sts/niso_sts/conf_name.rb +2 -0
- data/lib/sts/niso_sts/conf_num.rb +2 -0
- data/lib/sts/niso_sts/conf_sponsor.rb +2 -0
- data/lib/sts/niso_sts/conf_theme.rb +2 -0
- data/lib/sts/niso_sts/conference.rb +2 -0
- data/lib/sts/niso_sts/content_language.rb +2 -0
- data/lib/sts/niso_sts/contrib_id.rb +2 -0
- data/lib/sts/niso_sts/copyright_holder.rb +2 -0
- data/lib/sts/niso_sts/copyright_statement.rb +2 -0
- data/lib/sts/niso_sts/copyright_year.rb +2 -0
- data/lib/sts/niso_sts/country.rb +2 -0
- data/lib/sts/niso_sts/counts.rb +2 -0
- data/lib/sts/niso_sts/custom_meta.rb +2 -0
- data/lib/sts/niso_sts/custom_meta_group.rb +3 -0
- data/lib/sts/niso_sts/data_title.rb +29 -0
- data/lib/sts/niso_sts/date.rb +2 -0
- data/lib/sts/niso_sts/date_in_citation.rb +2 -0
- data/lib/sts/niso_sts/day.rb +2 -0
- data/lib/sts/niso_sts/def.rb +3 -0
- data/lib/sts/niso_sts/def_head.rb +18 -0
- data/lib/sts/niso_sts/def_item.rb +4 -0
- data/lib/sts/niso_sts/def_list.rb +21 -4
- data/lib/sts/niso_sts/degrees.rb +2 -0
- data/lib/sts/niso_sts/disp_formula_group.rb +0 -2
- data/lib/sts/niso_sts/disp_quote.rb +2 -0
- data/lib/sts/niso_sts/display_formula.rb +37 -4
- data/lib/sts/niso_sts/doc_number.rb +2 -0
- data/lib/sts/niso_sts/doc_type.rb +2 -0
- data/lib/sts/niso_sts/editing_instruction.rb +8 -2
- data/lib/sts/niso_sts/edition.rb +2 -0
- data/lib/sts/niso_sts/elocation_id.rb +2 -0
- data/lib/sts/niso_sts/email.rb +2 -0
- data/lib/sts/niso_sts/equation_count.rb +2 -0
- data/lib/sts/niso_sts/era.rb +2 -0
- data/lib/sts/niso_sts/ext_link.rb +16 -0
- data/lib/sts/niso_sts/fax.rb +2 -0
- data/lib/sts/niso_sts/fig_count.rb +2 -0
- data/lib/sts/niso_sts/floats_group.rb +2 -0
- data/lib/sts/niso_sts/fn_group.rb +3 -0
- data/lib/sts/niso_sts/fpage.rb +2 -0
- data/lib/sts/niso_sts/front.rb +15 -0
- data/lib/sts/niso_sts/funding_source.rb +2 -0
- data/lib/sts/niso_sts/given_names.rb +2 -0
- data/lib/sts/niso_sts/gov.rb +2 -0
- data/lib/sts/niso_sts/graphic.rb +4 -0
- data/lib/sts/niso_sts/hr.rb +3 -0
- data/lib/sts/niso_sts/ics.rb +3 -0
- data/lib/sts/niso_sts/ics_desc.rb +2 -0
- data/lib/sts/niso_sts/ics_wrap.rb +9 -0
- data/lib/sts/niso_sts/index.rb +32 -0
- data/lib/sts/niso_sts/index_div.rb +30 -0
- data/lib/sts/niso_sts/index_entry.rb +32 -0
- data/lib/sts/niso_sts/index_title_group.rb +22 -0
- data/lib/sts/niso_sts/inline_formula.rb +29 -4
- data/lib/sts/niso_sts/inline_media.rb +50 -0
- data/lib/sts/niso_sts/institution.rb +2 -0
- data/lib/sts/niso_sts/institution_id.rb +2 -0
- data/lib/sts/niso_sts/institution_wrap.rb +2 -0
- data/lib/sts/niso_sts/intro.rb +2 -0
- data/lib/sts/niso_sts/is_proof.rb +2 -0
- data/lib/sts/niso_sts/isbn.rb +2 -0
- data/lib/sts/niso_sts/issn.rb +2 -0
- data/lib/sts/niso_sts/issn_l.rb +2 -0
- data/lib/sts/niso_sts/issue.rb +2 -0
- data/lib/sts/niso_sts/kwd_group.rb +8 -0
- data/lib/sts/niso_sts/label.rb +4 -0
- data/lib/sts/niso_sts/legend.rb +39 -0
- data/lib/sts/niso_sts/license.rb +2 -0
- data/lib/sts/niso_sts/license_p.rb +2 -0
- data/lib/sts/niso_sts/list.rb +2 -0
- data/lib/sts/niso_sts/list_item.rb +2 -2
- data/lib/sts/niso_sts/long_desc.rb +2 -0
- data/lib/sts/niso_sts/lpage.rb +2 -0
- data/lib/sts/niso_sts/main.rb +2 -0
- data/lib/sts/niso_sts/meta_date.rb +2 -0
- data/lib/sts/niso_sts/metadata_std.rb +0 -2
- data/lib/sts/niso_sts/mml_content.rb +0 -2
- data/lib/sts/niso_sts/month.rb +2 -0
- data/lib/sts/niso_sts/name.rb +2 -0
- data/lib/sts/niso_sts/name_alternatives.rb +5 -0
- data/lib/sts/niso_sts/named_content.rb +51 -1
- data/lib/sts/niso_sts/nat_meta.rb +2 -0
- data/lib/sts/niso_sts/nested_kwd.rb +2 -0
- data/lib/sts/niso_sts/non_normative_note.rb +2 -0
- data/lib/sts/niso_sts/normative_note.rb +2 -0
- data/lib/sts/niso_sts/object_id.rb +4 -0
- data/lib/sts/niso_sts/on_behalf_of.rb +2 -0
- data/lib/sts/niso_sts/open_access.rb +2 -0
- data/lib/sts/niso_sts/originator.rb +2 -0
- data/lib/sts/niso_sts/page_count.rb +2 -0
- data/lib/sts/niso_sts/page_range.rb +2 -0
- data/lib/sts/niso_sts/paragraph.rb +2 -0
- data/lib/sts/niso_sts/part_number.rb +2 -0
- data/lib/sts/niso_sts/part_of_speech.rb +2 -0
- data/lib/sts/niso_sts/patent.rb +2 -0
- data/lib/sts/niso_sts/permissions.rb +6 -1
- data/lib/sts/niso_sts/phone.rb +2 -0
- data/lib/sts/niso_sts/postal_code.rb +2 -0
- data/lib/sts/niso_sts/prefix.rb +2 -0
- data/lib/sts/niso_sts/price.rb +2 -0
- data/lib/sts/niso_sts/principal_award_recipient.rb +2 -0
- data/lib/sts/niso_sts/principal_investigator.rb +2 -0
- data/lib/sts/niso_sts/private_char.rb +2 -0
- data/lib/sts/niso_sts/processing_meta.rb +54 -0
- data/lib/sts/niso_sts/product.rb +2 -0
- data/lib/sts/niso_sts/proj_id.rb +2 -0
- data/lib/sts/niso_sts/pub_date.rb +2 -0
- data/lib/sts/niso_sts/pub_id.rb +2 -0
- data/lib/sts/niso_sts/publisher.rb +2 -0
- data/lib/sts/niso_sts/publisher_loc.rb +2 -0
- data/lib/sts/niso_sts/publisher_name.rb +2 -0
- data/lib/sts/niso_sts/ref_count.rb +2 -0
- data/lib/sts/niso_sts/reference_standard.rb +2 -2
- data/lib/sts/niso_sts/reg_meta.rb +2 -0
- data/lib/sts/niso_sts/related_term.rb +2 -0
- data/lib/sts/niso_sts/release_date.rb +2 -0
- data/lib/sts/niso_sts/release_version.rb +2 -0
- data/lib/sts/niso_sts/release_version_id.rb +2 -0
- data/lib/sts/niso_sts/role.rb +35 -0
- data/lib/sts/niso_sts/sdo.rb +2 -0
- data/lib/sts/niso_sts/season.rb +2 -0
- data/lib/sts/niso_sts/sec_meta.rb +26 -0
- data/lib/sts/niso_sts/secretariat.rb +2 -0
- data/lib/sts/niso_sts/section.rb +8 -0
- data/lib/sts/niso_sts/see_also_entry.rb +26 -0
- data/lib/sts/niso_sts/see_entry.rb +26 -0
- data/lib/sts/niso_sts/self_uri.rb +2 -0
- data/lib/sts/niso_sts/series.rb +2 -0
- data/lib/sts/niso_sts/series_text.rb +2 -0
- data/lib/sts/niso_sts/series_title.rb +2 -0
- data/lib/sts/niso_sts/sig.rb +2 -0
- data/lib/sts/niso_sts/size.rb +2 -0
- data/lib/sts/niso_sts/source.rb +29 -0
- data/lib/sts/niso_sts/speaker.rb +2 -0
- data/lib/sts/niso_sts/standard_identification.rb +2 -0
- data/lib/sts/niso_sts/state.rb +2 -0
- data/lib/sts/niso_sts/std_doc_meta.rb +49 -11
- data/lib/sts/niso_sts/std_id.rb +2 -0
- data/lib/sts/niso_sts/std_id_group.rb +3 -0
- data/lib/sts/niso_sts/std_org_abbrev.rb +2 -0
- data/lib/sts/niso_sts/std_org_group.rb +3 -0
- data/lib/sts/niso_sts/std_org_name.rb +2 -0
- data/lib/sts/niso_sts/std_organization.rb +2 -0
- data/lib/sts/niso_sts/string_conf.rb +2 -0
- data/lib/sts/niso_sts/string_date.rb +2 -0
- data/lib/sts/niso_sts/string_name.rb +2 -0
- data/lib/sts/niso_sts/styled_content.rb +2 -0
- data/lib/sts/niso_sts/subj_group.rb +11 -1
- data/lib/sts/niso_sts/subtitle.rb +2 -0
- data/lib/sts/niso_sts/suffix.rb +2 -0
- data/lib/sts/niso_sts/suppl_number.rb +2 -0
- data/lib/sts/niso_sts/suppl_type.rb +2 -0
- data/lib/sts/niso_sts/suppl_version.rb +2 -0
- data/lib/sts/niso_sts/surname.rb +2 -0
- data/lib/sts/niso_sts/table_count.rb +2 -0
- data/lib/sts/niso_sts/table_wrap_group.rb +32 -0
- data/lib/sts/niso_sts/term_display.rb +22 -1
- data/lib/sts/niso_sts/term_display_string.rb +22 -0
- data/lib/sts/niso_sts/term_head.rb +2 -0
- data/lib/sts/niso_sts/term_source.rb +2 -0
- data/lib/sts/niso_sts/tex_math.rb +2 -0
- data/lib/sts/niso_sts/textual_form.rb +2 -0
- data/lib/sts/niso_sts/time_stamp.rb +2 -0
- data/lib/sts/niso_sts/title.rb +6 -0
- data/lib/sts/niso_sts/title_wrap.rb +2 -0
- data/lib/sts/niso_sts/toc.rb +32 -0
- data/lib/sts/niso_sts/toc_div.rb +30 -0
- data/lib/sts/niso_sts/toc_entry.rb +30 -0
- data/lib/sts/niso_sts/toc_title_group.rb +22 -0
- data/lib/sts/niso_sts/trans_source.rb +2 -0
- data/lib/sts/niso_sts/trans_title.rb +2 -0
- data/lib/sts/niso_sts/trans_title_group.rb +3 -0
- data/lib/sts/niso_sts/uri.rb +2 -0
- data/lib/sts/niso_sts/urn.rb +2 -0
- data/lib/sts/niso_sts/verse_line.rb +2 -0
- data/lib/sts/niso_sts/version.rb +2 -0
- data/lib/sts/niso_sts/volume.rb +2 -0
- data/lib/sts/niso_sts/volume_id.rb +2 -0
- data/lib/sts/niso_sts/volume_issue_group.rb +2 -0
- data/lib/sts/niso_sts/volume_series.rb +2 -0
- data/lib/sts/niso_sts/word_count.rb +2 -0
- data/lib/sts/niso_sts/year.rb +2 -0
- data/lib/sts/niso_sts.rb +35 -10
- data/lib/sts/profiles/iso_iec/constraints.rb +43 -0
- data/lib/sts/profiles/iso_iec/validator.rb +73 -0
- data/lib/sts/profiles/iso_iec.rb +10 -0
- data/lib/sts/profiles.rb +7 -0
- data/lib/sts/tbx_iso_tml/bold.rb +2 -0
- data/lib/sts/tbx_iso_tml/caption.rb +3 -0
- data/lib/sts/tbx_iso_tml/cross_reference.rb +2 -0
- data/lib/sts/tbx_iso_tml/definition.rb +2 -0
- data/lib/sts/tbx_iso_tml/entailed_term.rb +2 -0
- data/lib/sts/tbx_iso_tml/example.rb +0 -2
- data/lib/sts/tbx_iso_tml/external_graphic.rb +2 -0
- data/lib/sts/tbx_iso_tml/external_source.rb +2 -0
- data/lib/sts/tbx_iso_tml/fn_group.rb +3 -0
- data/lib/sts/tbx_iso_tml/geographical_usage.rb +3 -0
- data/lib/sts/tbx_iso_tml/grammatical_gender.rb +2 -0
- data/lib/sts/tbx_iso_tml/grammatical_number.rb +2 -0
- data/lib/sts/tbx_iso_tml/italic.rb +2 -0
- data/lib/sts/tbx_iso_tml/lang_set.rb +2 -0
- data/lib/sts/tbx_iso_tml/mfenced.rb +2 -0
- data/lib/sts/tbx_iso_tml/mfrac.rb +2 -2
- data/lib/sts/tbx_iso_tml/mi.rb +3 -2
- data/lib/sts/tbx_iso_tml/mrow.rb +2 -2
- data/lib/sts/tbx_iso_tml/mspace.rb +2 -0
- data/lib/sts/tbx_iso_tml/mstyle.rb +2 -2
- data/lib/sts/tbx_iso_tml/msub.rb +2 -0
- data/lib/sts/tbx_iso_tml/msup.rb +2 -0
- data/lib/sts/tbx_iso_tml/munder.rb +3 -0
- data/lib/sts/tbx_iso_tml/munderover.rb +2 -0
- data/lib/sts/tbx_iso_tml/normative_authorization.rb +2 -0
- data/lib/sts/tbx_iso_tml/part_of_speech.rb +2 -0
- data/lib/sts/tbx_iso_tml/pronunciation.rb +3 -0
- data/lib/sts/tbx_iso_tml/see.rb +2 -0
- data/lib/sts/tbx_iso_tml/semantics.rb +2 -0
- data/lib/sts/tbx_iso_tml/source.rb +2 -0
- data/lib/sts/tbx_iso_tml/subject_field.rb +2 -0
- data/lib/sts/tbx_iso_tml/sup.rb +3 -2
- data/lib/sts/tbx_iso_tml/table_wrap.rb +0 -1
- data/lib/sts/tbx_iso_tml/table_wrap_foot.rb +2 -0
- data/lib/sts/tbx_iso_tml/td.rb +115 -24
- data/lib/sts/tbx_iso_tml/term_type.rb +2 -0
- data/lib/sts/tbx_iso_tml/th.rb +124 -30
- data/lib/sts/tbx_iso_tml/xref.rb +2 -2
- data/lib/sts/version.rb +1 -1
- data/lib/sts.rb +1 -12
- data/reference-docs/Guidelines for coding ed.2.1.pdf +0 -0
- data/reference-docs/NISO-STS-1-2-compare-1-0.pdf +0 -0
- data/reference-docs/NISOSTS-guidelines-v1.0.pdf +0 -0
- metadata +71 -14
- data/lib/sts/content_groups/helpers.rb +0 -27
- data/lib/sts/enum_values.rb +0 -17
- data/lib/sts/iso_sts/content_groups/highlight_elements.rb +0 -285
- data/lib/sts/niso_sts/content_groups/body_elements.rb +0 -50
- data/lib/sts/niso_sts/content_groups/citation_elements.rb +0 -74
- data/lib/sts/niso_sts/content_groups/emphasized_text.rb +0 -67
- data/lib/sts/niso_sts/content_groups/highlight_elements.rb +0 -51
- data/lib/sts/niso_sts/content_groups/inside_cell.rb +0 -116
- data/lib/sts/niso_sts/content_groups/p_elements.rb +0 -41
- data/lib/sts/niso_sts/content_groups/para_level.rb +0 -67
- data/lib/sts/niso_sts/content_groups/styled_content_elements.rb +0 -93
- data/lib/sts/niso_sts/content_groups/table_group_attributes.rb +0 -62
- data/lib/sts/niso_sts/content_groups.rb +0 -8
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# 03: Namespace Coupling Architecture Fix
|
|
2
|
+
|
|
3
|
+
**Priority**: HIGH
|
|
4
|
+
**Category**: Architecture
|
|
5
|
+
**Estimated Effort**: High
|
|
6
|
+
**Files Affected**: `lib/sts/iso_sts/content_groups/highlight_elements.rb` (194+ references)
|
|
7
|
+
|
|
8
|
+
## Problem
|
|
9
|
+
|
|
10
|
+
`lib/sts/iso_sts/content_groups/highlight_elements.rb` contains 194+ references to `Sts::NisoSts::*` types:
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
# Examples from highlight_elements.rb
|
|
14
|
+
[:sub, "Sts::NisoSts::Sub", "sub"]
|
|
15
|
+
[:sup, "Sts::NisoSts::Sup", "sup"]
|
|
16
|
+
[:italic, "Sts::NisoSts::Italic", "italic"]
|
|
17
|
+
[:bold, "Sts::NisoSts::Bold", "bold"]
|
|
18
|
+
# ... 190 more
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Why This Is Wrong
|
|
22
|
+
|
|
23
|
+
1. **Violation of namespace isolation**: IsoSts should not depend on NisoSts implementation
|
|
24
|
+
2. **Shared-namespace ambiguity**: These elements appear in both ISOSTS and NISO STS but with different attribute sets
|
|
25
|
+
3. **Tight coupling**: Changes to NisoSts can break IsoSts
|
|
26
|
+
4. **Schema divergence ignored**: `<p>` in ISOSTS has different attributes than `<p>` in NISO STS Extended
|
|
27
|
+
|
|
28
|
+
### Root Cause
|
|
29
|
+
|
|
30
|
+
The schemas ARE different:
|
|
31
|
+
- ISOSTS `<p>`: `@content-type, @id, @specific-use, @xml:lang`
|
|
32
|
+
- NISO STS Extended `<p>`: `@content-type, @id, @originator, @specific-use, @style-type, @xml:base, @xml:lang`
|
|
33
|
+
|
|
34
|
+
## Solution: Three-Tier Architecture
|
|
35
|
+
|
|
36
|
+
### Tier 1: Shared Base Types
|
|
37
|
+
|
|
38
|
+
Create shared types in `Sts::Base` that both namespaces inherit:
|
|
39
|
+
|
|
40
|
+
```ruby
|
|
41
|
+
# lib/sts/base/text/emphasis.rb
|
|
42
|
+
module Sts
|
|
43
|
+
module Base
|
|
44
|
+
module Text
|
|
45
|
+
class Emphasis < Lutaml::Model::Serializable
|
|
46
|
+
# Shared attributes/methods
|
|
47
|
+
attribute :id, :string
|
|
48
|
+
attribute :base_fontsize, :string
|
|
49
|
+
attribute :baseline_shift, :string
|
|
50
|
+
attribute :color, :string
|
|
51
|
+
|
|
52
|
+
xml do
|
|
53
|
+
map_attribute :id, to: :id
|
|
54
|
+
# ...
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
class Bold < Emphasis
|
|
59
|
+
xml { element "bold" }
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
class Italic < Emphasis
|
|
63
|
+
xml { element "italic" }
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
class Sub < Emphasis
|
|
67
|
+
xml { element "sub" }
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
class Sup < Emphasis
|
|
71
|
+
xml { element "sup" }
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Tier 2: IsoSts-Specific Extensions
|
|
79
|
+
|
|
80
|
+
```ruby
|
|
81
|
+
# lib/sts/iso_sts/text/emphasis.rb
|
|
82
|
+
module Sts
|
|
83
|
+
module IsoSts
|
|
84
|
+
module Text
|
|
85
|
+
class Bold < ::Sts::Base::Text::Bold
|
|
86
|
+
# Add IsoSts-specific attributes
|
|
87
|
+
attribute :content_type, :string
|
|
88
|
+
|
|
89
|
+
xml do
|
|
90
|
+
# Override/add IsoSts-specific mapping
|
|
91
|
+
map_attribute "content-type", to: :content_type
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Tier 3: NisoSts-Specific Extensions
|
|
100
|
+
|
|
101
|
+
```ruby
|
|
102
|
+
# lib/sts/niso_sts/text/emphasis.rb
|
|
103
|
+
module Sts
|
|
104
|
+
module NisoSts
|
|
105
|
+
module Text
|
|
106
|
+
class Bold < ::Sts::Base::Text::Bold
|
|
107
|
+
# Add NisoSts-specific attributes
|
|
108
|
+
attribute :originator, :string
|
|
109
|
+
attribute :style_type, :string
|
|
110
|
+
|
|
111
|
+
xml do
|
|
112
|
+
map_attribute "originator", to: :originator
|
|
113
|
+
map_attribute "style-type", to: :style_type
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Implementation Strategy
|
|
122
|
+
|
|
123
|
+
1. **Phase 1**: Identify all shared element types (bold, italic, sub, sup, p, etc.)
|
|
124
|
+
2. **Phase 2**: Create base types with MINIMAL shared attributes
|
|
125
|
+
3. **Phase 3**: Refactor IsoSts to extend bases
|
|
126
|
+
4. **Phase 4**: Refactor NisoSts to extend bases
|
|
127
|
+
5. **Phase 5**: Delete `Sts::NisoSts::*` references from IsoSts content groups
|
|
128
|
+
|
|
129
|
+
## Files to Refactor
|
|
130
|
+
|
|
131
|
+
Primary targets:
|
|
132
|
+
- `lib/sts/iso_sts/content_groups/highlight_elements.rb`
|
|
133
|
+
- `lib/sts/iso_sts/content_groups/emphasis_elements.rb` (if exists)
|
|
134
|
+
- `lib/sts/niso_sts/content_groups/highlight_elements.rb`
|
|
135
|
+
|
|
136
|
+
## Verification
|
|
137
|
+
|
|
138
|
+
1. No `Sts::NisoSts` references in `lib/sts/iso_sts/`
|
|
139
|
+
2. All round-trip tests pass
|
|
140
|
+
3. Schema validation against both ISOSTS DTD and NISO STS XSD passes
|
|
141
|
+
|
|
142
|
+
## Dependencies
|
|
143
|
+
|
|
144
|
+
- `01-mathml-delegation.md` — uses similar patterns
|
|
145
|
+
- `02-type-resolution.md` — must be clean first
|
|
146
|
+
|
|
147
|
+
## TODO Checklist
|
|
148
|
+
|
|
149
|
+
- [ ] Audit all IsoSts → NisoSts references
|
|
150
|
+
- [ ] Categorize by shared vs. truly namespace-specific
|
|
151
|
+
- [ ] Design base type hierarchy
|
|
152
|
+
- [ ] Create `lib/sts/base/` directory structure
|
|
153
|
+
- [ ] Implement base types for shared elements
|
|
154
|
+
- [ ] Refactor IsoSts to use base types
|
|
155
|
+
- [ ] Refactor NisoSts to use base types
|
|
156
|
+
- [ ] Remove cross-namespace references
|
|
157
|
+
- [ ] Verify no circular dependencies
|
|
158
|
+
- [ ] Run full test suite
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# 04: Schema Versioning via lutaml-model Registers
|
|
2
|
+
|
|
3
|
+
**Priority**: HIGH
|
|
4
|
+
**Category**: Architecture
|
|
5
|
+
**Estimated Effort**: Very High
|
|
6
|
+
**Files Affected**: New architecture, all model files
|
|
7
|
+
|
|
8
|
+
## Problem
|
|
9
|
+
|
|
10
|
+
Currently sts-ruby uses flat module namespaces (`IsoSts`, `NisoSts`) with no versioning. Real-world standards have multiple schema versions that differ in element sets and attributes:
|
|
11
|
+
|
|
12
|
+
- **ISOSTS v1.1** (2013, frozen DTD)
|
|
13
|
+
- **NISO STS 1.0** (2017, DTD/XSD/RNG, interchange + extended)
|
|
14
|
+
- **NISO STS 1.2** (2022, backwards compatible with NISO STS 1.0)
|
|
15
|
+
|
|
16
|
+
Schema differences exist on the same element names (e.g., `<p>` attributes differ between ISOSTS and NISO STS Extended).
|
|
17
|
+
|
|
18
|
+
## Reference: mml Gem Pattern
|
|
19
|
+
|
|
20
|
+
The mml gem provides the correct versioning architecture:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
mml/
|
|
24
|
+
├── lib/mml.rb # Top-level entry, requires version modules
|
|
25
|
+
├── lib/mml/
|
|
26
|
+
│ ├── base/ # Shared mixins via `included` hook
|
|
27
|
+
│ │ ├── math.rb # Mml::Base::Math module
|
|
28
|
+
│ │ ├── mi.rb # Mml::Base::Mi module
|
|
29
|
+
│ │ └── ...
|
|
30
|
+
│ ├── v2/ # MathML 2.0 versioned classes
|
|
31
|
+
│ │ ├── math.rb # Mml::V2::Math < Serializable; includes Mml::Base::Math
|
|
32
|
+
│ │ ├── mi.rb # Mml::V2::Mi < Serializable; includes Mml::Base::Mi
|
|
33
|
+
│ │ └── configuration.rb # Mml::V2::Configuration with CONTEXT_ID = :mml_v2
|
|
34
|
+
│ ├── v3/ # MathML 3.0 versioned classes
|
|
35
|
+
│ │ ├── math.rb # Mml::V3::Math < Serializable; includes Mml::Base::Math
|
|
36
|
+
│ │ ├── configuration.rb # Mml::V3::Configuration with CONTEXT_ID = :mml_v3
|
|
37
|
+
│ │ └── ...
|
|
38
|
+
│ └── configuration.rb # Mml::Configuration, dispatches to version
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Key Mechanisms
|
|
42
|
+
|
|
43
|
+
1. **Register per version**: Each version creates a `Lutaml::Model::Register` with unique ID
|
|
44
|
+
2. **`lutaml_default_register`**: Class method on each versioned class points to its register
|
|
45
|
+
3. **Shared modules**: `Mml::Base::*` mixins define shared attributes/behavior via `included` hook
|
|
46
|
+
4. **Version-specific classes**: `Mml::V3::Math` extends shared module with V3-specific attributes
|
|
47
|
+
|
|
48
|
+
```ruby
|
|
49
|
+
# From mml gem
|
|
50
|
+
module Mml
|
|
51
|
+
module V3
|
|
52
|
+
class Configuration
|
|
53
|
+
CONTEXT_ID = :mml_v3
|
|
54
|
+
|
|
55
|
+
def self.register_model(klass, id:)
|
|
56
|
+
register = Lutaml::Model::Register.new(id: CONTEXT_ID)
|
|
57
|
+
register.register_model(klass, id: id)
|
|
58
|
+
klass.define_singleton_method(:lutaml_default_register) { register }
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Proposed Architecture for sts-ruby
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
lib/sts/
|
|
69
|
+
├── base/ # Shared element modules (Tier 1)
|
|
70
|
+
│ ├── text/ # Bold, Italic, Sub, Sup, etc.
|
|
71
|
+
│ ├── struct/ # Section, Paragraph, List, etc.
|
|
72
|
+
│ ├── meta/ # Title, Label, Caption, etc.
|
|
73
|
+
│ └── refs/ # Xref, BiblioRef, etc.
|
|
74
|
+
├── iso_sts/ # ISOSTS v1.1 (frozen)
|
|
75
|
+
│ ├── v1_1/ # ISOSTS v1.1 classes
|
|
76
|
+
│ │ ├── standard.rb # IsoSts::V1_1::Standard
|
|
77
|
+
│ │ ├── paragraph.rb # IsoSts::V1_1::Paragraph (ISOSTS-specific attributes)
|
|
78
|
+
│ │ └── configuration.rb # IsoSts::V1_1::Configuration
|
|
79
|
+
│ └── iso_sts.rb
|
|
80
|
+
├── niso_sts/ # NISO STS (evolving)
|
|
81
|
+
│ ├── v1_0/ # NISO STS 1.0 classes
|
|
82
|
+
│ │ ├── standard.rb # NisoSts::V1_0::Standard
|
|
83
|
+
│ │ ├── paragraph.rb # NisoSts::V1_0::Paragraph
|
|
84
|
+
│ │ └── configuration.rb # NisoSts::V1_0::Configuration
|
|
85
|
+
│ ├── v1_2/ # NISO STS 1.2 classes (extends v1_0)
|
|
86
|
+
│ │ ├── processing_meta.rb # New in 1.2
|
|
87
|
+
│ │ ├── code.rb # New in 1.2
|
|
88
|
+
│ │ ├── standard.rb # NisoSts::V1_2::Standard (adds processing-meta)
|
|
89
|
+
│ │ └── configuration.rb # NisoSts::V1_2::Configuration
|
|
90
|
+
│ └── niso_sts.rb
|
|
91
|
+
├── tbx_iso_tml/ # TBX (versioned with ISO 30042)
|
|
92
|
+
└── sts.rb # Top-level entry point
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Register Registration Pattern
|
|
96
|
+
|
|
97
|
+
```ruby
|
|
98
|
+
module Sts
|
|
99
|
+
module NisoSts
|
|
100
|
+
module V1_0
|
|
101
|
+
class Configuration
|
|
102
|
+
CONTEXT_ID = :niso_sts_v1_0
|
|
103
|
+
|
|
104
|
+
def self.setup!
|
|
105
|
+
register = Lutaml::Model::Register.new(id: CONTEXT_ID)
|
|
106
|
+
# Register all V1_0 models
|
|
107
|
+
Dir[File.join(__dir__, '*.rb')].sort.each do |f|
|
|
108
|
+
require f
|
|
109
|
+
end
|
|
110
|
+
# Set default register for each class
|
|
111
|
+
constants.each do |c|
|
|
112
|
+
klass = const_get(c)
|
|
113
|
+
next unless klass.is_a?(Class) && klass < Lutaml::Model::Serializable
|
|
114
|
+
klass.define_singleton_method(:lutaml_default_register) { register }
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Migration Strategy
|
|
124
|
+
|
|
125
|
+
### Phase 1: Create Register Infrastructure
|
|
126
|
+
- Create `Sts::Configuration` with register setup
|
|
127
|
+
- Create base register for `:iso_sts_v1_1` and `:niso_sts_v1_0`
|
|
128
|
+
|
|
129
|
+
### Phase 2: Create Base Types
|
|
130
|
+
- Extract shared elements from both namespaces into `Sts::Base::*`
|
|
131
|
+
- See `03-namespace-coupling.md` for details
|
|
132
|
+
|
|
133
|
+
### Phase 3: Version the Models
|
|
134
|
+
- Rename current `Sts::IsoSts::*` → `Sts::IsoSts::V1_1::*`
|
|
135
|
+
- Rename current `Sts::NisoSts::*` → `Sts::NisoSts::V1_0::*`
|
|
136
|
+
- Set `lutaml_default_register` on each versioned class
|
|
137
|
+
|
|
138
|
+
### Phase 4: Backward Compatibility Shims
|
|
139
|
+
- Provide temporary aliases at current paths:
|
|
140
|
+
```ruby
|
|
141
|
+
module Sts
|
|
142
|
+
module IsoSts
|
|
143
|
+
# Temporary backward compat - remove in next major version
|
|
144
|
+
Standard = V1_1::Standard
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
```
|
|
148
|
+
- Mark for deprecation in next major release
|
|
149
|
+
|
|
150
|
+
### Phase 5: Add NISO STS 1.2 Support
|
|
151
|
+
- Create `Sts::NisoSts::V1_2` namespace
|
|
152
|
+
- Extend V1_0 models with 1.2 additions
|
|
153
|
+
- See `05-missing-elements.md` for NISO STS 1.2 additions
|
|
154
|
+
|
|
155
|
+
## Verification
|
|
156
|
+
|
|
157
|
+
1. `bundle exec rspec` passes with versioned model loading
|
|
158
|
+
2. ISOSTS documents parse with ISOSTS register
|
|
159
|
+
3. NISO STS 1.0 documents parse with NISO STS 1.0 register
|
|
160
|
+
4. No cross-register contamination
|
|
161
|
+
|
|
162
|
+
## Dependencies
|
|
163
|
+
|
|
164
|
+
- `01-mathml-delegation.md` — MathML already follows this pattern
|
|
165
|
+
- `02-type-resolution.md` — Register provides type resolution
|
|
166
|
+
- `03-namespace-coupling.md` — Base types needed for versioning
|
|
167
|
+
|
|
168
|
+
## TODO Checklist
|
|
169
|
+
|
|
170
|
+
- [ ] Read `lutaml-model` register/global_register source
|
|
171
|
+
- [ ] Read mml gem's versioning pattern fully
|
|
172
|
+
- [ ] Design sts-ruby register architecture
|
|
173
|
+
- [ ] Create `Sts::Configuration` with register setup
|
|
174
|
+
- [ ] Phase 1: Register infrastructure
|
|
175
|
+
- [ ] Phase 2: Base types (coordinated with 03-namespace-coupling)
|
|
176
|
+
- [ ] Phase 3: Version models
|
|
177
|
+
- [ ] Phase 4: Backward compat shims
|
|
178
|
+
- [ ] Phase 5: NISO STS 1.2 support
|
|
179
|
+
- [ ] Update tests for versioned parsing
|
|
180
|
+
- [ ] Document API changes
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# 05: Missing Elements Implementation
|
|
2
|
+
|
|
3
|
+
**Priority**: HIGH
|
|
4
|
+
**Category**: Feature Gap
|
|
5
|
+
**Estimated Effort**: High
|
|
6
|
+
**Files Affected**: New model files, autoload entries
|
|
7
|
+
|
|
8
|
+
## Elements Missing from sts-ruby
|
|
9
|
+
|
|
10
|
+
### Critical (Round-Trip Impact)
|
|
11
|
+
|
|
12
|
+
#### `<processing-meta>` (NISO STS 1.2)
|
|
13
|
+
- **Parent**: `<standard>` (peer to `<front>`, `<body>`, `<back>`)
|
|
14
|
+
- **Attributes**: `@tagset-family`, `@base-tagset`, `@table-model`, `@mathml`, `@math-representation`, `@terminology-model`
|
|
15
|
+
- **Children**: `<extended-by>`, `<restricted-by>`, `<custom-meta-group>`
|
|
16
|
+
- **Reference**: NISO STS 1.2 comparison doc, Section 3
|
|
17
|
+
|
|
18
|
+
#### `<code>` (NISO STS 1.2)
|
|
19
|
+
- **Parents**: `<p>`, `<sec>`, `<list-item>`, and many block contexts
|
|
20
|
+
- **Attributes**: `@code-type`, `@code-version`, `@content-type`, `@executable`, `@id`, `@language`, `@language-version`, `@xml:base`, `@xml:lang`
|
|
21
|
+
- **Content**: Mixed (text + inline elements)
|
|
22
|
+
- **Reference**: NISO STS 1.2, Section 4
|
|
23
|
+
|
|
24
|
+
#### `<inline-code>` (NISO STS 1.2)
|
|
25
|
+
- **Parents**: Inline contexts
|
|
26
|
+
- **Attributes**: Same pattern as `<code>` but for inline usage
|
|
27
|
+
- **Reference**: NISO STS 1.2, Section 4
|
|
28
|
+
|
|
29
|
+
#### `<legend>` (NISO STS 1.2)
|
|
30
|
+
- **Parents**: `<boxed-text>`, `<chem-struct-wrap>`, `<disp-formula>`, `<disp-formula-group>`, `<fig>`, `<fig-group>`, `<graphic>`, `<media>`, `<supplementary-material>`, `<table-wrap>`, `<table-wrap-group>`
|
|
31
|
+
- **Children**: Mixed content with emphasis elements
|
|
32
|
+
- **Reference**: NISO STS 1.2, Section 4
|
|
33
|
+
|
|
34
|
+
#### `<inline-media>` (NISO STS 1.2)
|
|
35
|
+
- **Parents**: Inline contexts
|
|
36
|
+
- **Attributes**: Standard media attributes
|
|
37
|
+
- **Reference**: NISO STS 1.2, Section 4
|
|
38
|
+
|
|
39
|
+
#### `<sub-part-number>` (NISO STS 1.2)
|
|
40
|
+
- **Parent**: `<std-ident>`
|
|
41
|
+
- **Content**: String
|
|
42
|
+
- **Reference**: NISO STS 1.2, Section 4
|
|
43
|
+
|
|
44
|
+
#### `<index>` Hierarchy
|
|
45
|
+
- `<index>` — container for back matter index
|
|
46
|
+
- `<index-div>` — index division
|
|
47
|
+
- `<index-entry>` — individual index entry
|
|
48
|
+
- `<index-title-group>` — index title
|
|
49
|
+
- `<index-term-range-end>` — range end marker
|
|
50
|
+
- `<see-entry>` — "see" cross-reference
|
|
51
|
+
- `<see-also-entry>` — "see also" cross-reference
|
|
52
|
+
- **Reference**: GAPS.guidelines.schema-xref.md
|
|
53
|
+
|
|
54
|
+
#### `<toc>` Hierarchy
|
|
55
|
+
- `<toc>` — table of contents container (in `<front>`)
|
|
56
|
+
- `<toc-div>` — TOC division
|
|
57
|
+
- `<toc-entry>` — TOC entry
|
|
58
|
+
- `<toc-title-group>` — TOC title
|
|
59
|
+
- `<toc-group>` — TOC group (in `<sec>`)
|
|
60
|
+
- **Reference**: GAPS.guidelines.schema-xrf.md
|
|
61
|
+
|
|
62
|
+
#### `<table-wrap-group>`
|
|
63
|
+
- **Parents**: `<sec>`, `<app>`
|
|
64
|
+
- **Children**: `<table-wrap>` collection
|
|
65
|
+
- **Reference**: GAPS.guidelines.schema-xref.md
|
|
66
|
+
|
|
67
|
+
#### `<sec-meta>`
|
|
68
|
+
- **Parent**: `<sec>`
|
|
69
|
+
- **Content**: Section metadata
|
|
70
|
+
- **Reference**: GAPS.guidelines.schema-xref.md
|
|
71
|
+
|
|
72
|
+
#### `<std-doc-meta>`
|
|
73
|
+
- **Parent**: `<front>`
|
|
74
|
+
- **Content**: Standard document metadata
|
|
75
|
+
- **Reference**: GAPS.guidelines.schema-xref.md
|
|
76
|
+
|
|
77
|
+
### Table Model (OASIS CALS) — Lower Priority
|
|
78
|
+
|
|
79
|
+
| Element | Notes |
|
|
80
|
+
|---------|-------|
|
|
81
|
+
| `<tgroup>` | Table group with column specs |
|
|
82
|
+
| `<colspec>` | Column specification |
|
|
83
|
+
| `<row>` | Table row |
|
|
84
|
+
| `<entry>` | Table cell |
|
|
85
|
+
|
|
86
|
+
Most modern ISO documents use XHTML tables. OASIS CALS needed for legacy documents.
|
|
87
|
+
|
|
88
|
+
### Less Critical / Edge Cases
|
|
89
|
+
|
|
90
|
+
| Element | Notes |
|
|
91
|
+
|---------|-------|
|
|
92
|
+
| `<abbrev>` | Abbreviation display element |
|
|
93
|
+
| `<article-categories>` | JATS legacy — skip for NISO STS |
|
|
94
|
+
| `<article-id>` | JATS legacy — skip |
|
|
95
|
+
| `<article-meta>` | JATS legacy — skip |
|
|
96
|
+
| `<compl-title-wrap>` | Complementary title wrap |
|
|
97
|
+
| `<compound-subject>` | Compound subject |
|
|
98
|
+
| `<compound-subject-part>` | Part of compound subject |
|
|
99
|
+
| `<count>` | Count element |
|
|
100
|
+
| `<fallback>` | Alternatives fallback |
|
|
101
|
+
| `<fixed-case>` | Fixed-case text |
|
|
102
|
+
| `<free_to_read>` | ALI namespace |
|
|
103
|
+
| `<glyph-data>` | Private character glyph data |
|
|
104
|
+
| `<glyph-ref>` | Private character glyph reference |
|
|
105
|
+
| `<include>` | XInclude element |
|
|
106
|
+
| `<intro-title-wrap>` | Introduction title wrap |
|
|
107
|
+
| `<issue-id>` | Journal issue ID — skip |
|
|
108
|
+
| `<issue-part>` | Journal issue part — skip |
|
|
109
|
+
| `<issue-sponsor>` | Journal issue sponsor — skip |
|
|
110
|
+
| `<issue-title>` | Journal issue title — skip |
|
|
111
|
+
| `<journal-id>` | Journal ID — skip |
|
|
112
|
+
| `<license_ref>` | ALI license reference |
|
|
113
|
+
| `<main-title-wrap>` | Main title wrap |
|
|
114
|
+
| `<nav-pointer>` | Navigation pointer |
|
|
115
|
+
| `<nav-pointer-group>` | Navigation pointer group |
|
|
116
|
+
| `<num>` | Number element |
|
|
117
|
+
| `<overline-end>` | Overline end marker |
|
|
118
|
+
| `<overline-start>` | Overline start marker |
|
|
119
|
+
| `<part-title>` | Part title |
|
|
120
|
+
| `<sub-part>` | Sub-part element |
|
|
121
|
+
| `<title-group>` | Title group |
|
|
122
|
+
| `<trans-subtitle>` | Translated subtitle |
|
|
123
|
+
| `<underline-end>` | Underline end marker |
|
|
124
|
+
| `<underline-start>` | Underline start marker |
|
|
125
|
+
| `<term-display-string>` | New in NISO STS 1.2 |
|
|
126
|
+
|
|
127
|
+
## Implementation Order
|
|
128
|
+
|
|
129
|
+
1. `<processing-meta>` — needed for schema validation routing
|
|
130
|
+
2. `<code>` and `<inline-code>` — high frequency in real documents
|
|
131
|
+
3. `<legend>` — needed for formula/figure keys
|
|
132
|
+
4. `<inline-media>` — straightforward
|
|
133
|
+
5. `<index>` hierarchy — needed for back matter
|
|
134
|
+
6. `<toc>` hierarchy — needed for front matter
|
|
135
|
+
7. `<table-wrap-group>` — grouped table handling
|
|
136
|
+
8. `<sec-meta>` and `<std-doc-meta>` — structural metadata
|
|
137
|
+
9. OASIS CALS tables — legacy support
|
|
138
|
+
10. Edge case elements — as needed
|
|
139
|
+
|
|
140
|
+
## File Structure
|
|
141
|
+
|
|
142
|
+
Each new element follows the established pattern:
|
|
143
|
+
|
|
144
|
+
```ruby
|
|
145
|
+
# lib/sts/niso_sts/processing_meta.rb
|
|
146
|
+
module Sts
|
|
147
|
+
module NisoSts
|
|
148
|
+
class ProcessingMeta < Lutaml::Model::Serializable
|
|
149
|
+
attribute :tagset_family, :string
|
|
150
|
+
attribute :base_tagset, :string
|
|
151
|
+
attribute :table_model, :string
|
|
152
|
+
attribute :mathml, :string
|
|
153
|
+
attribute :math_representation, :string
|
|
154
|
+
attribute :terminology_model, :string
|
|
155
|
+
attribute :extended_by, ExtendedBy, collection: true
|
|
156
|
+
attribute :restricted_by, RestrictedBy, collection: true
|
|
157
|
+
attribute :custom_meta_group, CustomMetaGroup
|
|
158
|
+
|
|
159
|
+
xml do
|
|
160
|
+
element "processing-meta"
|
|
161
|
+
map_attribute "tagset-family", to: :tagset_family
|
|
162
|
+
map_attribute "base-tagset", to: :base_tagset
|
|
163
|
+
map_attribute "table-model", to: :table_model
|
|
164
|
+
map_attribute "mathml", to: :mathml
|
|
165
|
+
map_attribute "math-representation", to: :math_representation
|
|
166
|
+
map_attribute "terminology-model", to: :terminology_model
|
|
167
|
+
map_element "extended-by", to: :extended_by
|
|
168
|
+
map_element "restricted-by", to: :restricted_by
|
|
169
|
+
map_element "custom-meta-group", to: :custom_meta_group
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Dependencies
|
|
177
|
+
|
|
178
|
+
- `04-register-versioning.md` — new elements should be registered in appropriate version namespace
|
|
179
|
+
|
|
180
|
+
## TODO Checklist
|
|
181
|
+
|
|
182
|
+
- [x] `<processing-meta>` with all attributes
|
|
183
|
+
- [x] `<code>` and `<inline-code>`
|
|
184
|
+
- [x] `<legend>`
|
|
185
|
+
- [x] `<inline-media>`
|
|
186
|
+
- [x] `<sub-part-number>` in `<std-ident>`
|
|
187
|
+
- [x] `<index>` hierarchy (7 elements)
|
|
188
|
+
- [x] `<toc>` hierarchy (5 elements)
|
|
189
|
+
- [x] `<table-wrap-group>`
|
|
190
|
+
- [x] `<sec-meta>`
|
|
191
|
+
- [x] `<std-doc-meta>` (expanded to full XSD model)
|
|
192
|
+
- [x] `<term-display-string>` (NISO STS 1.2)
|
|
193
|
+
- [ ] OASIS CALS table elements
|
|
194
|
+
- [x] Update autoload entries for all new elements
|
|
195
|
+
- [x] Add/update round-trip tests for each element
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# 06: Missing Attributes Implementation
|
|
2
|
+
|
|
3
|
+
**Priority**: HIGH
|
|
4
|
+
**Category**: Feature Gap
|
|
5
|
+
**Estimated Effort**: Medium
|
|
6
|
+
**Files Affected**: Existing model files
|
|
7
|
+
|
|
8
|
+
## `@id` Missing on Elements (From Guidelines Sec 3.4)
|
|
9
|
+
|
|
10
|
+
The IEC/ISO Coding Guidelines ed.2.1 Section 3.4 lists elements that MUST carry `@id`. These are missing in sts-ruby:
|
|
11
|
+
|
|
12
|
+
| Element | Current Model | Has `@id` | Fix |
|
|
13
|
+
|---------|--------------|-----------|-----|
|
|
14
|
+
| `<def-item>` | `DefItem` | No | Add `attribute :id, :string` |
|
|
15
|
+
| `<graphic>` | `Graphic` | No | Add `attribute :id, :string` |
|
|
16
|
+
| `<list-item>` | `ListItem` | No | Add `attribute :id, :string` |
|
|
17
|
+
| `<mixed-citation>` | `MixedCitation` | No | Add `attribute :id, :string` |
|
|
18
|
+
| `<std>` | `ReferenceStandard` | No | Add `attribute :id, :string` |
|
|
19
|
+
| `<table-wrap-foot>` | `TableWrapFoot` | No | Add `attribute :id, :string` |
|
|
20
|
+
| `<xref>` | `Xref` | No | Add `attribute :id, :string` |
|
|
21
|
+
|
|
22
|
+
### Implementation Pattern
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
# For each affected model, add:
|
|
26
|
+
attribute :id, :string
|
|
27
|
+
|
|
28
|
+
# In xml block:
|
|
29
|
+
map_attribute "id", to: :id
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## New Attributes from NISO STS 1.2
|
|
33
|
+
|
|
34
|
+
### `@stage-code` on `<release-version>`
|
|
35
|
+
```ruby
|
|
36
|
+
attribute :stage_code, :string
|
|
37
|
+
# map_attribute "stage-code", to: :stage_code
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### `@assigning-authority` Added to Multiple Elements
|
|
41
|
+
Per NISO STS 1.2 Section 7:
|
|
42
|
+
- `<article-id>`, `<award-id>`, `<compound-kwd>`, `<compound-subject>`
|
|
43
|
+
- `<contrib-id>`, `<institution-id>`, `<issue-id>`, `<journal-id>`
|
|
44
|
+
- `<kwd>`, `<kwd-group>`, `<nested-kwd>`, `<object-id>`
|
|
45
|
+
- `<resource-id>`, `<subject>`, `<subj-group>`, `<volume-id>`
|
|
46
|
+
|
|
47
|
+
### `@award-id-type`, `@award-type`, XLink on `<award-id>`
|
|
48
|
+
Per NISO STS 1.2 Section 7:
|
|
49
|
+
```ruby
|
|
50
|
+
attribute :award_id_type, :string
|
|
51
|
+
attribute :award_type, :string
|
|
52
|
+
attribute :xlink_href, :string
|
|
53
|
+
attribute :xlink_type, :string
|
|
54
|
+
attribute :xlink_role, :string
|
|
55
|
+
attribute :xlink_title, :string
|
|
56
|
+
attribute :xlink_show, :string
|
|
57
|
+
attribute :xlink_actuate, :string
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### `@custom-type` / `@custom-value` Solution
|
|
61
|
+
Per NISO STS 1.2 Section 7, these attributes get custom-type/custom-value:
|
|
62
|
+
- `@form-type`
|
|
63
|
+
- `@person-group-type`
|
|
64
|
+
- `@pub-id-type`
|
|
65
|
+
- `@related-term-type`
|
|
66
|
+
- `@ref-type`
|
|
67
|
+
- `std/@type` (dated, undated, multipart)
|
|
68
|
+
- `std-ref/@type`
|
|
69
|
+
|
|
70
|
+
### `@dtd-version` Made Optional with Value List
|
|
71
|
+
```ruby
|
|
72
|
+
attribute :dtd_version, :string
|
|
73
|
+
# Values: "iso-0.9", "iso-1.0", "iso-1.1", "1.0", "1.1d1", "1.2"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### `@degree-contribution` on `<role>`
|
|
77
|
+
```ruby
|
|
78
|
+
attribute :degree_contribution, :string
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### `@hreflang` on XLink-bearing Elements
|
|
82
|
+
Added to any element with `@xlink:href`:
|
|
83
|
+
- `<related-article>`, `<related-object>`, and all elements with xlink
|
|
84
|
+
|
|
85
|
+
### `@originator` on Multiple Elements
|
|
86
|
+
Per NISO STS 1.2 Section 7:
|
|
87
|
+
- `<meta-date>`, `<release-date>`, `<release-version-id>`
|
|
88
|
+
- `<secretariat>`, `<self-uri>`, `<wi-number>`
|
|
89
|
+
|
|
90
|
+
### `@style-detail` on `<styled-content>` and `<list>`
|
|
91
|
+
```ruby
|
|
92
|
+
attribute :style_detail, :string
|
|
93
|
+
# Usage: <list list-type="bullet" style-detail="dash">
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### `@use-type` on `<std>`, `<mixed-citation>`, `<element-citation>`
|
|
97
|
+
```ruby
|
|
98
|
+
attribute :use_type, :string
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### `@vocab` and `@vocab-identifier`
|
|
102
|
+
Added to: `<kwd>`, `<compound-kwd>`, `<nested-kwd>`, `<subject>`, `<compound-subject>`, `<inline-media>`, `<institution-id>`
|
|
103
|
+
|
|
104
|
+
### `@vocab-term` and `@vocab-term-identifier` on `<inline-media>`
|
|
105
|
+
|
|
106
|
+
### `@specific-use` on `<release-version>`
|
|
107
|
+
|
|
108
|
+
### New `xref/@ref-type` Value: "abbreviation"
|
|
109
|
+
|
|
110
|
+
### `@list-type` Added Value: "arabic"
|
|
111
|
+
|
|
112
|
+
## `@xml:lang` Missing on Multilingual Elements
|
|
113
|
+
|
|
114
|
+
IEC documents use multiple languages. Check and add `@xml:lang` to:
|
|
115
|
+
- `<p>`, `<title>`, `<term>`, `<def>`, `<label>`, `<caption>`
|
|
116
|
+
- Any element in `MetadataStd` that supports multi-language variants
|
|
117
|
+
|
|
118
|
+
## `@content-type` Missing
|
|
119
|
+
- `<p>` (NisoSts) — already has, verify
|
|
120
|
+
- `<editing-instruction>` — missing per IEC guidelines
|
|
121
|
+
|
|
122
|
+
## Implementation Order
|
|
123
|
+
|
|
124
|
+
1. Fix `@id` on 7 elements (trivial, high impact)
|
|
125
|
+
2. Add `@originator` to elements that need it
|
|
126
|
+
3. Add `@assigning-authority` to listed elements
|
|
127
|
+
4. Add `@xml:lang` to multilingual elements
|
|
128
|
+
5. Add `@style-detail`, `@use-type`, `@custom-type` attributes
|
|
129
|
+
6. Add XLink attributes to `<award-id>`
|
|
130
|
+
7. Add remaining NISO STS 1.2 attributes
|
|
131
|
+
|
|
132
|
+
## Dependencies
|
|
133
|
+
|
|
134
|
+
- `04-register-versioning.md` — some attributes are version-specific
|
|
135
|
+
|
|
136
|
+
## TODO Checklist
|
|
137
|
+
|
|
138
|
+
- [x] Add `@id` to 7 elements listed above
|
|
139
|
+
- [x] Add `@originator` to elements (Paragraph, Section, Abstract, App, DispQuote, List, NormativeNote, NonNormativeNote, DefList)
|
|
140
|
+
- [x] Add `@assigning-authority` to 16 elements (XSD has it on `ext-link` only — done)
|
|
141
|
+
- [x] Add `@xml:lang` to multilingual elements (Label, Caption, DefItem, DefList)
|
|
142
|
+
- [x] Add NISO STS 1.2 specific attributes (vocab, vocab-identifier on IcsWrap, KwdGroup, NamedContent, Role, SubjGroup, Term)
|
|
143
|
+
- [x] Add missing attributes to `<award-id>` (id, specific-use, xml:lang)
|
|
144
|
+
- [x] Add missing attributes to `<ext-link>` (assigning-authority, id, specific-use, xml:lang, xlink attrs)
|
|
145
|
+
- [x] Add missing attributes to `<title>` (content-type, id, specific-use)
|
|
146
|
+
- [x] Add missing attributes to `<caption>` (id, specific-use, xml:lang)
|
|
147
|
+
- [x] Add `@vocab`/`@vocab-identifier` to elements (IcsWrap, KwdGroup, NamedContent, Role, SubjGroup, Term)
|
|
148
|
+
- [ ] Verify attribute mappings match XSD/DTD (OASIS CALS remaining)
|
|
149
|
+
- [x] Add `@id` to all 161 NisoSts models that have `@id` in XSD
|
|
150
|
+
- [x] Add `@id` to 32 TbxIsoTml models
|
|
151
|
+
- [x] Add `@id` to 29 IsoSts models
|
|
152
|
+
- [x] Run round-trip tests after each batch
|