sts 0.5.2 → 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.
Files changed (446) hide show
  1. checksums.yaml +4 -4
  2. data/.gitmodules +3 -0
  3. data/.rubocop.yml +3 -0
  4. data/.rubocop_todo.yml +17 -3
  5. data/CLAUDE.md +72 -0
  6. data/GAPS.guidelines.iso-sts-ed2.1/01-maintenance.md +19 -0
  7. data/GAPS.guidelines.iso-sts-ed2.1/03-general.md +75 -0
  8. data/GAPS.guidelines.iso-sts-ed2.1/04-structure.md +75 -0
  9. data/GAPS.guidelines.iso-sts-ed2.1/05-content.md +63 -0
  10. data/GAPS.guidelines.iso-sts-ed2.1/06-tables.md +53 -0
  11. data/GAPS.guidelines.iso-sts-ed2.1/07-formulae.md +41 -0
  12. data/GAPS.guidelines.iso-sts-ed2.1/08-figures.md +45 -0
  13. data/GAPS.guidelines.iso-sts-ed2.1/09-terms.md +56 -0
  14. data/GAPS.guidelines.iso-sts-ed2.1/10-references.md +56 -0
  15. data/GAPS.guidelines.iso-sts-ed2.1/annex-a-multilingual.md +79 -0
  16. data/GAPS.guidelines.niso-sts-v1.0/01-introduction-scope.md +27 -0
  17. data/GAPS.guidelines.niso-sts-v1.0/02-document-structure.md +100 -0
  18. data/GAPS.guidelines.niso-sts-v1.0/03-front-matter.md +149 -0
  19. data/GAPS.guidelines.niso-sts-v1.0/04-body-content.md +209 -0
  20. data/GAPS.guidelines.niso-sts-v1.0/05-tables-figures.md +152 -0
  21. data/GAPS.guidelines.niso-sts-v1.0/06-math-formulae.md +128 -0
  22. data/GAPS.guidelines.niso-sts-v1.0/07-references.md +113 -0
  23. data/GAPS.guidelines.niso-sts-v1.0/08-terminology.md +127 -0
  24. data/GAPS.guidelines.niso-sts-v1.0/09-metadata.md +113 -0
  25. data/GAPS.guidelines.niso-sts-v1.0/10-iso-iec-variant.md +141 -0
  26. data/GAPS.guidelines.niso-sts-v1.0/SUMMARY.md +96 -0
  27. data/GAPS.guidelines.schema-xref.md +101 -0
  28. data/Gemfile +2 -1
  29. data/TODO.sts-refactor/00-overview.md +172 -0
  30. data/TODO.sts-refactor/01-mathml-delegation.md +153 -0
  31. data/TODO.sts-refactor/02-type-resolution.md +122 -0
  32. data/TODO.sts-refactor/03-namespace-coupling.md +158 -0
  33. data/TODO.sts-refactor/04-register-versioning.md +180 -0
  34. data/TODO.sts-refactor/05-missing-elements.md +195 -0
  35. data/TODO.sts-refactor/06-missing-attributes.md +152 -0
  36. data/TODO.sts-refactor/07-incomplete-models.md +180 -0
  37. data/TODO.sts-refactor/08-isoiec-profile.md +169 -0
  38. data/TODO.sts-refactor/09-autoload-cleanup.md +88 -0
  39. data/TODO.sts-refactor/10-test-coverage.md +164 -0
  40. data/TODO.sts-refactor/11-duplicate-models.md +168 -0
  41. data/lib/sts/iso_sts/annex_type.rb +2 -0
  42. data/lib/sts/iso_sts/app.rb +26 -1
  43. data/lib/sts/iso_sts/app_group.rb +1 -0
  44. data/lib/sts/iso_sts/array.rb +1 -0
  45. data/lib/sts/iso_sts/back.rb +1 -0
  46. data/lib/sts/iso_sts/body.rb +4 -0
  47. data/lib/sts/iso_sts/bold.rb +23 -11
  48. data/lib/sts/iso_sts/break.rb +3 -0
  49. data/lib/sts/iso_sts/caption.rb +1 -0
  50. data/lib/sts/iso_sts/comm_ref.rb +2 -0
  51. data/lib/sts/iso_sts/content_language.rb +22 -0
  52. data/lib/sts/iso_sts/copyright_holder.rb +4 -2
  53. data/lib/sts/iso_sts/copyright_statement.rb +4 -2
  54. data/lib/sts/iso_sts/copyright_year.rb +3 -0
  55. data/lib/sts/iso_sts/def.rb +1 -0
  56. data/lib/sts/iso_sts/def_item.rb +1 -0
  57. data/lib/sts/iso_sts/def_list.rb +1 -0
  58. data/lib/sts/iso_sts/disp_formula.rb +5 -1
  59. data/lib/sts/iso_sts/doc_ref.rb +2 -0
  60. data/lib/sts/iso_sts/document_identification.rb +3 -0
  61. data/lib/sts/iso_sts/edition.rb +2 -0
  62. data/lib/sts/iso_sts/ext_link.rb +1 -1
  63. data/lib/sts/iso_sts/fig.rb +1 -0
  64. data/lib/sts/iso_sts/fn.rb +1 -0
  65. data/lib/sts/iso_sts/fn_group.rb +1 -0
  66. data/lib/sts/iso_sts/front.rb +5 -0
  67. data/lib/sts/iso_sts/graphic.rb +5 -0
  68. data/lib/sts/iso_sts/inline_formula.rb +1 -1
  69. data/lib/sts/iso_sts/iso_meta.rb +4 -3
  70. data/lib/sts/iso_sts/italic.rb +23 -11
  71. data/lib/sts/iso_sts/label.rb +7 -5
  72. data/lib/sts/iso_sts/language.rb +2 -0
  73. data/lib/sts/iso_sts/list.rb +1 -0
  74. data/lib/sts/iso_sts/list_item.rb +7 -4
  75. data/lib/sts/iso_sts/mathml2/math.rb +20 -18
  76. data/lib/sts/iso_sts/meta_date.rb +20 -0
  77. data/lib/sts/iso_sts/mixed_citation.rb +35 -11
  78. data/lib/sts/iso_sts/monospace.rb +26 -0
  79. data/lib/sts/iso_sts/named_content.rb +44 -0
  80. data/lib/sts/iso_sts/nat_meta.rb +5 -4
  81. data/lib/sts/iso_sts/non_normative_example.rb +5 -0
  82. data/lib/sts/iso_sts/non_normative_note.rb +1 -0
  83. data/lib/sts/iso_sts/page_count.rb +2 -0
  84. data/lib/sts/iso_sts/paragraph.rb +34 -22
  85. data/lib/sts/iso_sts/permissions.rb +3 -0
  86. data/lib/sts/iso_sts/preformat.rb +8 -5
  87. data/lib/sts/iso_sts/ref.rb +1 -0
  88. data/lib/sts/iso_sts/ref_list.rb +1 -0
  89. data/lib/sts/iso_sts/reg_meta.rb +5 -4
  90. data/lib/sts/iso_sts/release_date.rb +2 -0
  91. data/lib/sts/iso_sts/sc.rb +26 -0
  92. data/lib/sts/iso_sts/sec.rb +12 -2
  93. data/lib/sts/iso_sts/secretariat.rb +2 -0
  94. data/lib/sts/iso_sts/standard.rb +6 -0
  95. data/lib/sts/iso_sts/standard_cross_reference.rb +5 -2
  96. data/lib/sts/iso_sts/standard_identification.rb +3 -0
  97. data/lib/sts/iso_sts/standard_ref.rb +16 -0
  98. data/lib/sts/iso_sts/std.rb +7 -5
  99. data/lib/sts/iso_sts/std_ref.rb +2 -0
  100. data/lib/sts/iso_sts/strike.rb +26 -0
  101. data/lib/sts/iso_sts/styled_content.rb +19 -15
  102. data/lib/sts/iso_sts/sub.rb +2 -0
  103. data/lib/sts/iso_sts/sup.rb +2 -0
  104. data/lib/sts/iso_sts/table.rb +1 -0
  105. data/lib/sts/iso_sts/table_wrap.rb +1 -0
  106. data/lib/sts/iso_sts/table_wrap_foot.rb +3 -0
  107. data/lib/sts/iso_sts/td.rb +32 -14
  108. data/lib/sts/iso_sts/term.rb +6 -6
  109. data/lib/sts/iso_sts/term_sec.rb +1 -0
  110. data/lib/sts/iso_sts/th.rb +32 -14
  111. data/lib/sts/iso_sts/title.rb +17 -7
  112. data/lib/sts/iso_sts/title_compl.rb +2 -0
  113. data/lib/sts/iso_sts/title_full.rb +2 -0
  114. data/lib/sts/iso_sts/title_intro.rb +2 -0
  115. data/lib/sts/iso_sts/title_main.rb +2 -0
  116. data/lib/sts/iso_sts/title_wrap.rb +1 -0
  117. data/lib/sts/iso_sts/tr.rb +1 -0
  118. data/lib/sts/iso_sts/underline.rb +26 -0
  119. data/lib/sts/iso_sts/uri.rb +32 -0
  120. data/lib/sts/iso_sts/xref.rb +3 -3
  121. data/lib/sts/iso_sts.rb +11 -0
  122. data/lib/sts/mathml.rb +21 -0
  123. data/lib/sts/namespaces.rb +3 -0
  124. data/lib/sts/niso_sts/abstract.rb +3 -0
  125. data/lib/sts/niso_sts/access_date.rb +2 -0
  126. data/lib/sts/niso_sts/accrediting_organization.rb +2 -0
  127. data/lib/sts/niso_sts/ack.rb +1 -1
  128. data/lib/sts/niso_sts/addr_line.rb +2 -0
  129. data/lib/sts/niso_sts/address.rb +3 -0
  130. data/lib/sts/niso_sts/adoption.rb +1 -1
  131. data/lib/sts/niso_sts/adoption_front.rb +1 -0
  132. data/lib/sts/niso_sts/aff_alternatives.rb +3 -0
  133. data/lib/sts/niso_sts/alt_text.rb +2 -0
  134. data/lib/sts/niso_sts/alt_title.rb +2 -0
  135. data/lib/sts/niso_sts/alternatives.rb +3 -4
  136. data/lib/sts/niso_sts/annotation.rb +1 -3
  137. data/lib/sts/niso_sts/anonymous.rb +3 -0
  138. data/lib/sts/niso_sts/app.rb +16 -1
  139. data/lib/sts/niso_sts/app_group.rb +5 -0
  140. data/lib/sts/niso_sts/article_title.rb +2 -0
  141. data/lib/sts/niso_sts/attrib.rb +2 -0
  142. data/lib/sts/niso_sts/author_comment.rb +1 -3
  143. data/lib/sts/niso_sts/author_notes.rb +1 -1
  144. data/lib/sts/niso_sts/authorization.rb +2 -0
  145. data/lib/sts/niso_sts/award_group.rb +23 -4
  146. data/lib/sts/niso_sts/award_id.rb +6 -0
  147. data/lib/sts/niso_sts/back.rb +25 -6
  148. data/lib/sts/niso_sts/bio.rb +1 -3
  149. data/lib/sts/niso_sts/body.rb +38 -0
  150. data/lib/sts/niso_sts/boxed_text.rb +41 -3
  151. data/lib/sts/niso_sts/break.rb +14 -0
  152. data/lib/sts/niso_sts/caption.rb +15 -1
  153. data/lib/sts/niso_sts/chapter_title.rb +2 -0
  154. data/lib/sts/niso_sts/chem_struct.rb +2 -0
  155. data/lib/sts/niso_sts/chem_struct_wrap.rb +1 -0
  156. data/lib/sts/niso_sts/citation_alternatives.rb +3 -0
  157. data/lib/sts/niso_sts/city.rb +2 -0
  158. data/lib/sts/niso_sts/code.rb +111 -0
  159. data/lib/sts/niso_sts/collab.rb +8 -0
  160. data/lib/sts/niso_sts/collab_alternatives.rb +3 -0
  161. data/lib/sts/niso_sts/comm_ref_group.rb +3 -0
  162. data/lib/sts/niso_sts/comment.rb +2 -0
  163. data/lib/sts/niso_sts/compound_subject.rb +29 -0
  164. data/lib/sts/niso_sts/compound_subject_part.rb +39 -0
  165. data/lib/sts/niso_sts/conf_acronym.rb +2 -0
  166. data/lib/sts/niso_sts/conf_date.rb +2 -0
  167. data/lib/sts/niso_sts/conf_loc.rb +2 -0
  168. data/lib/sts/niso_sts/conf_name.rb +2 -0
  169. data/lib/sts/niso_sts/conf_num.rb +2 -0
  170. data/lib/sts/niso_sts/conf_sponsor.rb +2 -0
  171. data/lib/sts/niso_sts/conf_theme.rb +2 -0
  172. data/lib/sts/niso_sts/conference.rb +3 -0
  173. data/lib/sts/niso_sts/content_language.rb +2 -0
  174. data/lib/sts/niso_sts/contrib.rb +1 -0
  175. data/lib/sts/niso_sts/contrib_group.rb +1 -0
  176. data/lib/sts/niso_sts/contrib_id.rb +2 -0
  177. data/lib/sts/niso_sts/copyright_holder.rb +2 -0
  178. data/lib/sts/niso_sts/copyright_statement.rb +2 -0
  179. data/lib/sts/niso_sts/copyright_year.rb +2 -0
  180. data/lib/sts/niso_sts/country.rb +2 -0
  181. data/lib/sts/niso_sts/counts.rb +3 -0
  182. data/lib/sts/niso_sts/custom_meta.rb +3 -0
  183. data/lib/sts/niso_sts/custom_meta_group.rb +3 -0
  184. data/lib/sts/niso_sts/data_title.rb +29 -0
  185. data/lib/sts/niso_sts/date.rb +3 -0
  186. data/lib/sts/niso_sts/date_in_citation.rb +2 -0
  187. data/lib/sts/niso_sts/day.rb +2 -0
  188. data/lib/sts/niso_sts/def.rb +3 -0
  189. data/lib/sts/niso_sts/def_head.rb +18 -0
  190. data/lib/sts/niso_sts/def_item.rb +13 -0
  191. data/lib/sts/niso_sts/def_list.rb +25 -3
  192. data/lib/sts/niso_sts/degrees.rb +2 -0
  193. data/lib/sts/niso_sts/disp_formula_group.rb +1 -4
  194. data/lib/sts/niso_sts/disp_quote.rb +3 -1
  195. data/lib/sts/niso_sts/display_formula.rb +47 -2
  196. data/lib/sts/niso_sts/doc_number.rb +2 -0
  197. data/lib/sts/niso_sts/doc_type.rb +2 -0
  198. data/lib/sts/niso_sts/document_identification.rb +1 -0
  199. data/lib/sts/niso_sts/editing_instruction.rb +9 -5
  200. data/lib/sts/niso_sts/edition.rb +2 -0
  201. data/lib/sts/niso_sts/element_citation.rb +1 -1
  202. data/lib/sts/niso_sts/elocation_id.rb +2 -0
  203. data/lib/sts/niso_sts/email.rb +2 -0
  204. data/lib/sts/niso_sts/equation_count.rb +2 -0
  205. data/lib/sts/niso_sts/era.rb +2 -0
  206. data/lib/sts/niso_sts/ext_link.rb +32 -2
  207. data/lib/sts/niso_sts/fax.rb +2 -0
  208. data/lib/sts/niso_sts/fig_count.rb +2 -0
  209. data/lib/sts/niso_sts/fig_group.rb +1 -0
  210. data/lib/sts/niso_sts/figure.rb +14 -1
  211. data/lib/sts/niso_sts/floats_group.rb +3 -4
  212. data/lib/sts/niso_sts/fn.rb +2 -1
  213. data/lib/sts/niso_sts/fn_group.rb +3 -0
  214. data/lib/sts/niso_sts/fpage.rb +2 -0
  215. data/lib/sts/niso_sts/front.rb +16 -0
  216. data/lib/sts/niso_sts/funding_group.rb +1 -0
  217. data/lib/sts/niso_sts/funding_source.rb +2 -0
  218. data/lib/sts/niso_sts/given_names.rb +2 -0
  219. data/lib/sts/niso_sts/glossary.rb +1 -1
  220. data/lib/sts/niso_sts/gov.rb +2 -0
  221. data/lib/sts/niso_sts/graphic.rb +6 -0
  222. data/lib/sts/niso_sts/hr.rb +3 -0
  223. data/lib/sts/niso_sts/ics.rb +5 -0
  224. data/lib/sts/niso_sts/ics_desc.rb +2 -0
  225. data/lib/sts/niso_sts/ics_wrap.rb +9 -0
  226. data/lib/sts/niso_sts/index.rb +32 -0
  227. data/lib/sts/niso_sts/index_div.rb +30 -0
  228. data/lib/sts/niso_sts/index_entry.rb +32 -0
  229. data/lib/sts/niso_sts/index_term.rb +1 -0
  230. data/lib/sts/niso_sts/index_title_group.rb +22 -0
  231. data/lib/sts/niso_sts/inline_formula.rb +38 -2
  232. data/lib/sts/niso_sts/inline_media.rb +50 -0
  233. data/lib/sts/niso_sts/institution.rb +2 -0
  234. data/lib/sts/niso_sts/institution_id.rb +2 -0
  235. data/lib/sts/niso_sts/institution_wrap.rb +3 -0
  236. data/lib/sts/niso_sts/intro.rb +2 -0
  237. data/lib/sts/niso_sts/is_proof.rb +2 -0
  238. data/lib/sts/niso_sts/isbn.rb +2 -0
  239. data/lib/sts/niso_sts/issn.rb +2 -0
  240. data/lib/sts/niso_sts/issn_l.rb +2 -0
  241. data/lib/sts/niso_sts/issue.rb +2 -0
  242. data/lib/sts/niso_sts/kwd_group.rb +9 -0
  243. data/lib/sts/niso_sts/label.rb +7 -2
  244. data/lib/sts/niso_sts/legend.rb +39 -0
  245. data/lib/sts/niso_sts/license.rb +2 -0
  246. data/lib/sts/niso_sts/license_p.rb +2 -0
  247. data/lib/sts/niso_sts/list.rb +9 -2
  248. data/lib/sts/niso_sts/list_item.rb +9 -4
  249. data/lib/sts/niso_sts/long_desc.rb +2 -0
  250. data/lib/sts/niso_sts/lpage.rb +2 -0
  251. data/lib/sts/niso_sts/main.rb +2 -0
  252. data/lib/sts/niso_sts/media.rb +1 -0
  253. data/lib/sts/niso_sts/meta_date.rb +2 -0
  254. data/lib/sts/niso_sts/meta_note.rb +1 -1
  255. data/lib/sts/niso_sts/metadata_iso.rb +1 -1
  256. data/lib/sts/niso_sts/metadata_std.rb +16 -8
  257. data/lib/sts/niso_sts/milestone_end.rb +1 -3
  258. data/lib/sts/niso_sts/milestone_start.rb +1 -3
  259. data/lib/sts/niso_sts/mixed_citation.rb +22 -0
  260. data/lib/sts/niso_sts/mml_content.rb +0 -2
  261. data/lib/sts/niso_sts/monospace.rb +9 -0
  262. data/lib/sts/niso_sts/month.rb +2 -0
  263. data/lib/sts/niso_sts/name.rb +3 -0
  264. data/lib/sts/niso_sts/name_alternatives.rb +5 -0
  265. data/lib/sts/niso_sts/named_content.rb +51 -1
  266. data/lib/sts/niso_sts/nat_meta.rb +3 -0
  267. data/lib/sts/niso_sts/nested_kwd.rb +3 -0
  268. data/lib/sts/niso_sts/nlm_citation.rb +1 -1
  269. data/lib/sts/niso_sts/non_normative_example.rb +15 -2
  270. data/lib/sts/niso_sts/non_normative_note.rb +14 -2
  271. data/lib/sts/niso_sts/normative_example.rb +1 -1
  272. data/lib/sts/niso_sts/normative_note.rb +3 -1
  273. data/lib/sts/niso_sts/note.rb +1 -1
  274. data/lib/sts/niso_sts/notes.rb +1 -1
  275. data/lib/sts/niso_sts/notes_group.rb +1 -0
  276. data/lib/sts/niso_sts/object_id.rb +4 -0
  277. data/lib/sts/niso_sts/on_behalf_of.rb +2 -0
  278. data/lib/sts/niso_sts/open_access.rb +3 -4
  279. data/lib/sts/niso_sts/originator.rb +2 -0
  280. data/lib/sts/niso_sts/page_count.rb +2 -0
  281. data/lib/sts/niso_sts/page_range.rb +2 -0
  282. data/lib/sts/niso_sts/paragraph.rb +39 -7
  283. data/lib/sts/niso_sts/part_number.rb +2 -0
  284. data/lib/sts/niso_sts/part_of_speech.rb +2 -0
  285. data/lib/sts/niso_sts/patent.rb +2 -0
  286. data/lib/sts/niso_sts/permissions.rb +7 -1
  287. data/lib/sts/niso_sts/phone.rb +2 -0
  288. data/lib/sts/niso_sts/postal_code.rb +2 -0
  289. data/lib/sts/niso_sts/prefix.rb +2 -0
  290. data/lib/sts/niso_sts/preformat.rb +15 -0
  291. data/lib/sts/niso_sts/price.rb +2 -0
  292. data/lib/sts/niso_sts/principal_award_recipient.rb +2 -0
  293. data/lib/sts/niso_sts/principal_investigator.rb +2 -0
  294. data/lib/sts/niso_sts/private_char.rb +3 -3
  295. data/lib/sts/niso_sts/processing_meta.rb +54 -0
  296. data/lib/sts/niso_sts/product.rb +2 -0
  297. data/lib/sts/niso_sts/proj_id.rb +2 -0
  298. data/lib/sts/niso_sts/pub_date.rb +4 -0
  299. data/lib/sts/niso_sts/pub_id.rb +2 -0
  300. data/lib/sts/niso_sts/publisher.rb +3 -0
  301. data/lib/sts/niso_sts/publisher_loc.rb +2 -0
  302. data/lib/sts/niso_sts/publisher_name.rb +2 -0
  303. data/lib/sts/niso_sts/ref_count.rb +2 -0
  304. data/lib/sts/niso_sts/reference.rb +1 -0
  305. data/lib/sts/niso_sts/reference_list.rb +6 -1
  306. data/lib/sts/niso_sts/reference_standard.rb +4 -2
  307. data/lib/sts/niso_sts/reg_meta.rb +3 -0
  308. data/lib/sts/niso_sts/related_term.rb +2 -0
  309. data/lib/sts/niso_sts/release_date.rb +11 -6
  310. data/lib/sts/niso_sts/release_version.rb +2 -0
  311. data/lib/sts/niso_sts/release_version_id.rb +2 -0
  312. data/lib/sts/niso_sts/role.rb +35 -0
  313. data/lib/sts/niso_sts/ruby.rb +1 -0
  314. data/lib/sts/niso_sts/sdo.rb +2 -0
  315. data/lib/sts/niso_sts/season.rb +2 -0
  316. data/lib/sts/niso_sts/sec_meta.rb +26 -0
  317. data/lib/sts/niso_sts/secretariat.rb +2 -0
  318. data/lib/sts/niso_sts/section.rb +47 -4
  319. data/lib/sts/niso_sts/see_also_entry.rb +26 -0
  320. data/lib/sts/niso_sts/see_entry.rb +26 -0
  321. data/lib/sts/niso_sts/self_uri.rb +2 -0
  322. data/lib/sts/niso_sts/series.rb +2 -0
  323. data/lib/sts/niso_sts/series_text.rb +2 -0
  324. data/lib/sts/niso_sts/series_title.rb +2 -0
  325. data/lib/sts/niso_sts/sig.rb +2 -0
  326. data/lib/sts/niso_sts/size.rb +2 -0
  327. data/lib/sts/niso_sts/source.rb +29 -0
  328. data/lib/sts/niso_sts/speaker.rb +2 -0
  329. data/lib/sts/niso_sts/speech.rb +1 -1
  330. data/lib/sts/niso_sts/standard.rb +3 -0
  331. data/lib/sts/niso_sts/standard_identification.rb +3 -1
  332. data/lib/sts/niso_sts/state.rb +2 -0
  333. data/lib/sts/niso_sts/statement.rb +1 -1
  334. data/lib/sts/niso_sts/std_doc_meta.rb +50 -11
  335. data/lib/sts/niso_sts/std_id.rb +2 -0
  336. data/lib/sts/niso_sts/std_id_group.rb +3 -0
  337. data/lib/sts/niso_sts/std_org.rb +1 -0
  338. data/lib/sts/niso_sts/std_org_abbrev.rb +2 -0
  339. data/lib/sts/niso_sts/std_org_group.rb +3 -0
  340. data/lib/sts/niso_sts/std_org_name.rb +2 -0
  341. data/lib/sts/niso_sts/std_organization.rb +2 -0
  342. data/lib/sts/niso_sts/string_conf.rb +2 -0
  343. data/lib/sts/niso_sts/string_date.rb +2 -0
  344. data/lib/sts/niso_sts/string_name.rb +2 -0
  345. data/lib/sts/niso_sts/styled_content.rb +39 -0
  346. data/lib/sts/niso_sts/sub.rb +11 -0
  347. data/lib/sts/niso_sts/subj_group.rb +11 -0
  348. data/lib/sts/niso_sts/subtitle.rb +2 -0
  349. data/lib/sts/niso_sts/suffix.rb +2 -0
  350. data/lib/sts/niso_sts/sup.rb +13 -0
  351. data/lib/sts/niso_sts/suppl_number.rb +2 -0
  352. data/lib/sts/niso_sts/suppl_type.rb +2 -0
  353. data/lib/sts/niso_sts/suppl_version.rb +2 -0
  354. data/lib/sts/niso_sts/supplementary_material.rb +1 -0
  355. data/lib/sts/niso_sts/surname.rb +2 -0
  356. data/lib/sts/niso_sts/table_count.rb +2 -0
  357. data/lib/sts/niso_sts/table_wrap_group.rb +32 -0
  358. data/lib/sts/niso_sts/term_display.rb +22 -0
  359. data/lib/sts/niso_sts/term_display_string.rb +22 -0
  360. data/lib/sts/niso_sts/term_head.rb +2 -0
  361. data/lib/sts/niso_sts/term_section.rb +3 -3
  362. data/lib/sts/niso_sts/term_source.rb +2 -0
  363. data/lib/sts/niso_sts/tex_math.rb +2 -0
  364. data/lib/sts/niso_sts/textual_form.rb +2 -0
  365. data/lib/sts/niso_sts/time_stamp.rb +2 -0
  366. data/lib/sts/niso_sts/title.rb +26 -0
  367. data/lib/sts/niso_sts/title_wrap.rb +2 -0
  368. data/lib/sts/niso_sts/toc.rb +32 -0
  369. data/lib/sts/niso_sts/toc_div.rb +30 -0
  370. data/lib/sts/niso_sts/toc_entry.rb +30 -0
  371. data/lib/sts/niso_sts/toc_title_group.rb +22 -0
  372. data/lib/sts/niso_sts/trans_abstract.rb +1 -0
  373. data/lib/sts/niso_sts/trans_source.rb +2 -0
  374. data/lib/sts/niso_sts/trans_title.rb +2 -0
  375. data/lib/sts/niso_sts/trans_title_group.rb +3 -0
  376. data/lib/sts/niso_sts/underline.rb +5 -0
  377. data/lib/sts/niso_sts/uri.rb +4 -0
  378. data/lib/sts/niso_sts/urn.rb +2 -0
  379. data/lib/sts/niso_sts/verse_group.rb +1 -1
  380. data/lib/sts/niso_sts/verse_line.rb +2 -0
  381. data/lib/sts/niso_sts/version.rb +2 -0
  382. data/lib/sts/niso_sts/volume.rb +2 -0
  383. data/lib/sts/niso_sts/volume_id.rb +2 -0
  384. data/lib/sts/niso_sts/volume_issue_group.rb +3 -4
  385. data/lib/sts/niso_sts/volume_series.rb +2 -0
  386. data/lib/sts/niso_sts/word_count.rb +2 -0
  387. data/lib/sts/niso_sts/year.rb +2 -0
  388. data/lib/sts/niso_sts.rb +35 -10
  389. data/lib/sts/profiles/iso_iec/constraints.rb +43 -0
  390. data/lib/sts/profiles/iso_iec/validator.rb +73 -0
  391. data/lib/sts/profiles/iso_iec.rb +10 -0
  392. data/lib/sts/profiles.rb +7 -0
  393. data/lib/sts/tbx_iso_tml/bold.rb +30 -1
  394. data/lib/sts/tbx_iso_tml/caption.rb +3 -0
  395. data/lib/sts/tbx_iso_tml/col.rb +10 -0
  396. data/lib/sts/tbx_iso_tml/cross_reference.rb +2 -0
  397. data/lib/sts/tbx_iso_tml/definition.rb +18 -2
  398. data/lib/sts/tbx_iso_tml/entailed_term.rb +2 -0
  399. data/lib/sts/tbx_iso_tml/example.rb +9 -3
  400. data/lib/sts/tbx_iso_tml/external_graphic.rb +2 -0
  401. data/lib/sts/tbx_iso_tml/external_source.rb +2 -0
  402. data/lib/sts/tbx_iso_tml/fn.rb +3 -2
  403. data/lib/sts/tbx_iso_tml/fn_group.rb +3 -0
  404. data/lib/sts/tbx_iso_tml/geographical_usage.rb +3 -0
  405. data/lib/sts/tbx_iso_tml/grammatical_gender.rb +2 -0
  406. data/lib/sts/tbx_iso_tml/grammatical_number.rb +2 -0
  407. data/lib/sts/tbx_iso_tml/italic.rb +27 -1
  408. data/lib/sts/tbx_iso_tml/lang_set.rb +2 -0
  409. data/lib/sts/tbx_iso_tml/mfenced.rb +2 -0
  410. data/lib/sts/tbx_iso_tml/mfrac.rb +2 -2
  411. data/lib/sts/tbx_iso_tml/mi.rb +3 -2
  412. data/lib/sts/tbx_iso_tml/mrow.rb +2 -2
  413. data/lib/sts/tbx_iso_tml/mspace.rb +2 -0
  414. data/lib/sts/tbx_iso_tml/mstyle.rb +2 -2
  415. data/lib/sts/tbx_iso_tml/msub.rb +2 -0
  416. data/lib/sts/tbx_iso_tml/msup.rb +4 -1
  417. data/lib/sts/tbx_iso_tml/munder.rb +3 -0
  418. data/lib/sts/tbx_iso_tml/munderover.rb +2 -0
  419. data/lib/sts/tbx_iso_tml/normative_authorization.rb +2 -0
  420. data/lib/sts/tbx_iso_tml/note.rb +11 -7
  421. data/lib/sts/tbx_iso_tml/part_of_speech.rb +2 -0
  422. data/lib/sts/tbx_iso_tml/pronunciation.rb +3 -0
  423. data/lib/sts/tbx_iso_tml/see.rb +2 -0
  424. data/lib/sts/tbx_iso_tml/semantics.rb +2 -0
  425. data/lib/sts/tbx_iso_tml/source.rb +6 -0
  426. data/lib/sts/tbx_iso_tml/subject_field.rb +2 -0
  427. data/lib/sts/tbx_iso_tml/sup.rb +3 -2
  428. data/lib/sts/tbx_iso_tml/table.rb +1 -0
  429. data/lib/sts/tbx_iso_tml/table_wrap.rb +3 -1
  430. data/lib/sts/tbx_iso_tml/table_wrap_foot.rb +3 -0
  431. data/lib/sts/tbx_iso_tml/tbody.rb +9 -1
  432. data/lib/sts/tbx_iso_tml/td.rb +122 -17
  433. data/lib/sts/tbx_iso_tml/term.rb +9 -5
  434. data/lib/sts/tbx_iso_tml/term_type.rb +2 -0
  435. data/lib/sts/tbx_iso_tml/tfoot.rb +5 -1
  436. data/lib/sts/tbx_iso_tml/th.rb +133 -18
  437. data/lib/sts/tbx_iso_tml/thead.rb +9 -1
  438. data/lib/sts/tbx_iso_tml/tr.rb +16 -0
  439. data/lib/sts/tbx_iso_tml/xref.rb +2 -2
  440. data/lib/sts/version.rb +1 -1
  441. data/lib/sts.rb +1 -2
  442. data/reference-docs/Guidelines for coding ed.2.1.pdf +0 -0
  443. data/reference-docs/NISO-STS-1-2-compare-1-0.pdf +0 -0
  444. data/reference-docs/NISOSTS-guidelines-v1.0.pdf +0 -0
  445. metadata +76 -3
  446. data/lib/sts/niso_sts/mathml.rb +0 -69
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb09142275cd6246d7a63fe3b45489a11cf83f5e659151010ad50c84b4722f1c
4
- data.tar.gz: 232e2b93e82a446e863f5d5d4c0a18151445ed25fe82be4c7c4ef6b5eef4dba3
3
+ metadata.gz: 443e55e67ecb2e042fc9e4e54041c5c9e1af49e0c14356015ea7183b7f340539
4
+ data.tar.gz: cf38e564d3c8086b129debf1e8b173d7ed9a3d96291dbe70781627172d3e6df2
5
5
  SHA512:
6
- metadata.gz: c802673caa1e2cd33c596e16fbf53239b9be90cb7a0330ea5ae2b13d4bf93acdfad5a67aa6baac0bc618ad56ddcb33babfe70d3229364bb48dfb1a6449a60971
7
- data.tar.gz: 4c4185da827c98a9f469f29ae3604d28ae7f48d82adaf390e4d9a02d6026693210aaaa6f26e5ac01dadc8c69fdcb531fa05f88a6bd49b2e876785638a0075ad8
6
+ metadata.gz: fbeecaa968c2d3a0df65e6f1ad2ced97e523d92dc1816db3c0820d7de9653457db049ef780e27b82f550716b8622c3d12dde8f83aae15ada4c64a1d76a3948d9
7
+ data.tar.gz: 5a1e0c1c065bd160b28ccb27f91b4002c6e43c2377a1455ae12d4c1cbb82c8879d7b499322ee9d6f0856b6085cf5089de0fd31e19249ffb63acef93f4e1161ed
data/.gitmodules ADDED
@@ -0,0 +1,3 @@
1
+ [submodule "spec/fixtures/mn-samples-iso-private"]
2
+ path = spec/fixtures/mn-samples-iso-private
3
+ url = git@github.com:metanorma/mn-samples-iso-private.git
data/.rubocop.yml CHANGED
@@ -5,6 +5,9 @@ inherit_from:
5
5
  # local repo-specific modifications
6
6
  # ...
7
7
 
8
+ Metrics/BlockLength:
9
+ Max: 35
10
+
8
11
  AllCops:
9
12
  TargetRubyVersion: 2.6
10
13
  NewCops: enable
data/.rubocop_todo.yml CHANGED
@@ -1,20 +1,34 @@
1
1
  # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2026-04-03 22:12:14 UTC using RuboCop version 1.86.0.
2
+ # `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 50`
3
+ # on 2026-05-06 01:14:05 UTC using RuboCop version 1.86.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 8
9
+ # Offense count: 18
10
10
  # This cop supports safe autocorrection (--autocorrect).
11
11
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
12
12
  # URISchemes: http, https
13
13
  Layout/LineLength:
14
14
  Exclude:
15
+ - 'lib/sts/iso_sts/content_groups/highlight_elements.rb'
16
+ - 'lib/sts/niso_sts/content_groups/body_elements.rb'
17
+ - 'lib/sts/niso_sts/content_groups/emphasized_text.rb'
18
+ - 'lib/sts/niso_sts/content_groups/highlight_elements.rb'
19
+ - 'lib/sts/niso_sts/content_groups/inside_cell.rb'
20
+ - 'lib/sts/niso_sts/content_groups/styled_content_elements.rb'
21
+ - 'lib/sts/niso_sts/content_groups/table_group_attributes.rb'
15
22
  - 'lib/sts/niso_sts/mml_content/containers.rb'
16
23
  - 'lib/sts/niso_sts/mml_content/linear_algebra.rb'
17
24
  - 'lib/sts/niso_sts/term.rb'
18
25
  - 'lib/sts/tbx_iso_tml/lang_set.rb'
19
26
  - 'lib/sts/tbx_iso_tml/term_type.rb'
27
+ - 'spec/round_trip/reference_docs_spec.rb'
20
28
  - 'spec/spec_helper.rb'
29
+
30
+ # Offense count: 1
31
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
32
+ Metrics/AbcSize:
33
+ Exclude:
34
+ - 'lib/sts/iso_sts/mathml2/math.rb'
data/CLAUDE.md ADDED
@@ -0,0 +1,72 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Build and Test Commands
6
+
7
+ ```bash
8
+ # Run tests
9
+ bundle exec rspec
10
+
11
+ # Run tests with specific file
12
+ bundle exec rspec spec/sts_spec.rb
13
+
14
+ # Run RuboCop linting
15
+ bundle exec rubocop
16
+
17
+ # Run both (default task)
18
+ bundle exec rake
19
+ ```
20
+
21
+ ## Architecture
22
+
23
+ This is a Ruby gem for parsing NISO STS (National Information Standards Organization - Science and Technical Standards) XML documents. It uses `lutaml-model` for XML serialization/deserialization.
24
+
25
+ ### Namespace Structure
26
+
27
+ ```
28
+ Sts
29
+ ├── NisoSts # NISO STS elements (lib/sts/niso_sts/)
30
+ │ ├── MmlContent # MathML content elements (autoloaded)
31
+ │ └── Xi, Ali # Module elements
32
+ ├── TbxIsoTml # TBX ISO TML elements (lib/sts/tbx_iso_tml/)
33
+ ├── Mathml # MathML namespace wrapper
34
+ └── Namespaces # XML namespace definitions
35
+ ```
36
+
37
+ ### Key Implementation Patterns
38
+
39
+ **Element Classes** (in `lib/sts/niso_sts/`):
40
+ - Inherit from `Lutaml::Model::Serializable`
41
+ - Define attributes and XML mapping in `xml do ... end` block
42
+ - Use `map_element` to map child elements, `map_content` for text content
43
+ - Use `mixed_content` for elements that contain both text and child elements
44
+
45
+ **Example element structure:**
46
+ ```ruby
47
+ module Sts
48
+ module NisoSts
49
+ class SomeElement < Lutaml::Model::Serializable
50
+ attribute :id, :string
51
+ attribute :content, :string
52
+ attribute :child, ::Sts::NisoSts::ChildElement
53
+
54
+ xml do
55
+ element "some-element"
56
+ map_attribute "id", to: :id
57
+ map_content to: :content
58
+ map_element "child", to: :child
59
+ end
60
+ end
61
+ end
62
+ end
63
+ ```
64
+
65
+ **Autoload Pattern**: Elements are autoloaded via `lib/sts/niso_sts.rb`. When adding new elements, add autoloads in alphabetical order.
66
+
67
+ **Bold/Italic Elements**: These use `::Sts::TbxIsoTml::Bold` and `::Sts::TbxIsoTml::Italic` types (not `:string`), enabling proper round-tripping of nested markup.
68
+
69
+ ### Reference Data
70
+
71
+ - XSD schema: `reference-docs/NISO-STS-extended-1-MathML3-XSD/`
72
+ - Test fixtures: `spec/fixtures/`
@@ -0,0 +1,19 @@
1
+ # Sections 1-2: Maintenance & Legal Terms
2
+
3
+ ## Overview
4
+ Sections 1 and 2 are non-technical: Section 1 describes the maintenance process for the guidelines document, and Section 2 provides legal terms and disclaimer language. No XML elements or attributes are defined.
5
+
6
+ ## Element Coverage
7
+
8
+ | Element | Guidelines Usage | sts-ruby Model | Status | Notes |
9
+ |---------|-----------------|---------------|--------|-------|
10
+ | N/A | N/A | N/A | N/A | No XML elements defined in these sections |
11
+
12
+ ## Attribute Gaps
13
+
14
+ | Attribute | Parent Element | Guidelines Usage | Modeled | Status |
15
+ |-----------|---------------|-----------------|---------|--------|
16
+ | N/A | N/A | N/A | N/A | No attributes defined in these sections |
17
+
18
+ ## Key Gaps
19
+ None - these sections contain no XML coding instructions.
@@ -0,0 +1,75 @@
1
+ # Section 3: General
2
+
3
+ ## Overview
4
+ Section 3 covers general coding guidance, Online Standards Development (OSD), elements containing IDs, editorial notes, and formatting conventions. It introduces key structural patterns and lists elements that should carry `@id` attributes.
5
+
6
+ ## Element Coverage
7
+
8
+ | Element | Guidelines Usage | sts-ruby Model | Status | Notes |
9
+ |---------|-----------------|---------------|--------|-------|
10
+ | `<standard>` | Root element for standards documents | `NisoSts::Standard` | Partial | Missing `@xmlns:xi`, `@xmlns:xsi` attributes; missing `<processing-meta>` child |
11
+ | `<processing-meta>` | New in Ed 2.1 - metadata about the XML file (tagset, MathML version, table model, TBX model) | Missing | Missing | **Critical gap** - new element introduced in Ed 2.1 |
12
+ | `<front>` | Front matter container | `NisoSts::Front` | Supported | |
13
+ | `<body>` | Body container | `NisoSts::Body` | Supported | |
14
+ | `<back>` | Back matter container | `NisoSts::Back` | Supported | |
15
+
16
+ ## Attribute Gaps
17
+
18
+ | Attribute | Parent Element | Guidelines Usage | Modeled | Status |
19
+ |-----------|---------------|-----------------|---------|--------|
20
+ | `@base-tagset` | `<processing-meta>` | "interchange" | N/A | Missing (parent element missing) |
21
+ | `@mathml-version` | `<processing-meta>` | "3.0" | N/A | Missing (parent element missing) |
22
+ | `@table-model` | `<processing-meta>` | "xhtml" | N/A | Missing (parent element missing) |
23
+ | `@terminology-model` | `<processing-meta>` | "tbx" | N/A | Missing (parent element missing) |
24
+ | `@math-representation` | `<processing-meta>` | "mathml" | N/A | Missing (parent element missing) |
25
+ | `@tagset-family` | `<processing-meta>` | "sts" | N/A | Missing (parent element missing) |
26
+ | `@xmlns:xi` | `<standard>` | XInclude namespace declaration | No | Missing attribute |
27
+ | `@xmlns:xsi` | `<standard>` | XML Schema Instance namespace | No | Missing attribute |
28
+ | `@mml` | `<standard>` | MathML namespace (modeled as attribute) | Partial | Modeled as `:string`, not as namespace declaration |
29
+ | `@tbx` | `<standard>` | TBX namespace (modeled as attribute) | Partial | Modeled as `:string`, not as namespace declaration |
30
+
31
+ ## ID-Bearing Elements (Sec 3.4 Checklist)
32
+
33
+ The guidelines list 31 elements that should carry `@id`. Checking whether sts-ruby models support `@id`:
34
+
35
+ | Element | Has `@id` attribute | Notes |
36
+ |---------|-------------------|-------|
37
+ | `<app-group>` | Yes | |
38
+ | `<app>` | Yes | |
39
+ | `<code>` | N/A | Element not modeled |
40
+ | `<def-item>` | No | Missing `@id` on `DefItem` |
41
+ | `<def-list>` | Yes | |
42
+ | `<disp-formula>` | Yes | |
43
+ | `<fig>` | Yes | |
44
+ | `<fig-group>` | Yes | |
45
+ | `<graphic>` | No | Missing `@id` on `Graphic` |
46
+ | `<inline-code>` | N/A | Element not modeled |
47
+ | `<inline-formula>` | Yes | |
48
+ | `<inline-graphic>` | Yes | |
49
+ | `<legend>` | N/A | Element not modeled |
50
+ | `<list-item>` | No | Missing `@id` on `ListItem` |
51
+ | `<mml:math>` | Yes | |
52
+ | `<mixed-citation>` | No | Missing `@id` |
53
+ | `<p>` | Yes | |
54
+ | `<ref>` | Yes | |
55
+ | `<ref-list>` | Yes | |
56
+ | `<sec>` | Yes | |
57
+ | `<std>` | No | Missing `@id` on `ReferenceStandard` |
58
+ | `<table-wrap>` | Yes | |
59
+ | `<table-wrap-foot>` | No | Missing `@id` on `TableWrapFoot` |
60
+ | `<tbx:example>` | Yes | |
61
+ | `<tbx:note>` | Yes | |
62
+ | `<tbx:termEntry>` | Yes | |
63
+ | `<tbx:tig>` | Yes | |
64
+ | `<term-sec>` | Yes | |
65
+ | `<xref>` | No | Missing `@id` on `Xref` |
66
+
67
+ ## Key Gaps
68
+ - [ ] **CRITICAL**: `<processing-meta>` element not modeled -- new in Ed 2.1 with attributes `@base-tagset`, `@mathml-version`, `@table-model`, `@terminology-model`, `@math-representation`, `@tagset-family`, and child `<custom-meta-group>`
69
+ - [ ] **CRITICAL**: `<code>` element not modeled -- guidelines specify it for code blocks (replaces legacy `<preformat>`)
70
+ - [ ] **CRITICAL**: `<inline-code>` element not modeled -- inline code equivalent of `<code>`
71
+ - [ ] Missing `@id` on `<def-item>`, `<graphic>`, `<list-item>`, `<mixed-citation>`, `<std>`, `<table-wrap-foot>`, `<xref>` -- all listed in Sec 3.4 as needing IDs
72
+ - [ ] `<legend>` element not modeled -- used for formula keys and figure keys (Sec 7.3, 8.3)
73
+ - [ ] `NisoSts::Standard` does not map `<processing-meta>` as a child element
74
+ - [ ] `NisoSts::Permissions` does not model `<license>` as a child element
75
+ - [ ] `NisoSts::Permissions` maps `copyright-statement` as `:string` but guidelines show it can contain `<inline-graphic>` (IEC copyright)
@@ -0,0 +1,75 @@
1
+ # Section 4: Structure
2
+
3
+ ## Overview
4
+ Section 4 defines the document structure: front matter, body, and back matter. It covers metadata, foreword, introduction, clauses/subclauses, normative references, terms and definitions, annexes, and bibliography.
5
+
6
+ ## Element Coverage
7
+
8
+ | Element | Guidelines Usage | sts-ruby Model | Status | Notes |
9
+ |---------|-----------------|---------------|--------|-------|
10
+ | `<standard>` | Root element | `NisoSts::Standard` | Partial | Missing `<processing-meta>` child |
11
+ | `<front>` | Front matter container | `NisoSts::Front` | Partial | Missing `<std-doc-meta>` child; missing `<adoption-front>` |
12
+ | `<body>` | Body container | `NisoSts::Body` | Supported | |
13
+ | `<back>` | Back matter container | `NisoSts::Back` | Partial | Missing `<index>` child |
14
+ | `<std-meta>` | Standards metadata | `NisoSts::MetadataStd` | Partial | Missing `<abstract>`, multiple `<permissions>`, `<license>` inside permissions, `<isbn>`, `<std-id-group>` inside `<std-ident>`, `<counts>`, `<suppl-type>`, `<suppl-number>`, `<suppl-version>` |
15
+ | `<iso-meta>` | ISO-specific legacy metadata | `NisoSts::MetadataIso` | Partial | Deprecated per guidelines but still needed for legacy |
16
+ | `<std-doc-meta>` | Document-level metadata | `NisoSts::StdDocMeta` | Partial | Not mapped in `NisoSts::Front` |
17
+ | `<sec>` | Clauses and subclauses | `NisoSts::Section` | Supported | `@sec-type` mapped as `:type` |
18
+ | `<label>` | Clause/formula/figure numbers | `NisoSts::Label` | Supported | |
19
+ | `<title>` | Section/figure/table titles | `NisoSts::Title` | Supported | |
20
+ | `<p>` | Paragraphs | `NisoSts::Paragraph` | Supported | |
21
+ | `<ref-list>` | Normative refs and bibliography | `NisoSts::ReferenceList` | Supported | Has `@content-type` |
22
+ | `<ref>` | Individual reference | `NisoSts::Reference` | Partial | Missing `<non-normative-note>` child, missing `@specific-use` |
23
+ | `<std>` | Standard reference | `NisoSts::ReferenceStandard` | Partial | Missing `@content-type`, `@std-id` vs `@std-id-link-type`, `<std-id>` children not mapped |
24
+ | `<std-id>` | Standard identifier (URN, etc.) | `NisoSts::StdId` | Supported | |
25
+ | `<std-ref>` | Standard reference text | `NisoSts::StandardRef` | Supported | |
26
+ | `<mixed-citation>` | Non-standard references | `NisoSts::MixedCitation` | Partial | Missing `@id`, `<uri>`, `<break>` children |
27
+ | `<title-wrap>` | Title grouping with `@xml:lang` | `NisoSts::TitleWrap` | Supported | |
28
+ | `<proj-id>` | Project ID | `NisoSts::ProjId` | Supported | |
29
+ | `<std-ident>` | Standard identification block | `NisoSts::StandardIdentification` | Partial | Missing `<isbn>`, `<std-id-group>`, `<suppl-type/number/version>` |
30
+ | `<app-group>` | Annex group container | `NisoSts::AppGroup` | Supported | |
31
+ | `<app>` | Individual annex | `NisoSts::App` | Supported | Has `@content-type`, `<annex-type>` |
32
+ | `<annex-type>` | Annex type text (informative/normative) | Mapped as `:string` | Supported | |
33
+ | `<content-language>` | Document language | `NisoSts::ContentLanguage` | Supported | |
34
+ | `<permissions>` | Copyright info | `NisoSts::Permissions` | Partial | Missing `<license>` child; `copyright-statement` should allow markup not just string |
35
+ | `<license>` | License within permissions | `NisoSts::License` | Supported | Not mapped as child of Permissions |
36
+ | `<license-p>` | License paragraph | `NisoSts::LicenseP` | Supported | |
37
+ | `<custom-meta-group>` | Custom metadata group | `NisoSts::CustomMetaGroup` | Supported | |
38
+ | `<custom-meta>` | Custom metadata entry | `NisoSts::CustomMeta` | Supported | |
39
+ | `<meta-name>` | Custom metadata name | `NisoSts::CustomMeta` (attr) | Supported | |
40
+ | `<meta-value>` | Custom metadata value | `NisoSts::CustomMeta` (attr) | Supported | |
41
+ | `<index>` | Back matter index | Missing | Missing | Not modeled -- legacy but still referenced |
42
+ | `<self-uri>` | Self-reference URI | `NisoSts::SelfUri` | Supported | |
43
+
44
+ ## Attribute Gaps
45
+
46
+ | Attribute | Parent Element | Guidelines Usage | Modeled | Status |
47
+ |-----------|---------------|-----------------|---------|--------|
48
+ | `@sec-type` | `<sec>` | "foreword", "intro", "scope", "norm-refs", "terms", "numbered-paragraph" | Yes (as `:type`) | Supported |
49
+ | `@content-type` | `<app>` | "informative" / "normative" | Yes | Supported |
50
+ | `@content-type` | `<ref-list>` | "norm-refs", "bibl" | Yes | Supported |
51
+ | `@xml:lang` | `<title-wrap>` | Language code | Yes (via TitleWrap) | Supported |
52
+ | `@type` | `<std-ref>` | "dated" / "undated" | Yes | Supported |
53
+ | `@std-id-link-type` | `<std-id>` | "urn" | Yes | Supported |
54
+ | `@std-id-type` | `<std-id>` | "dated" / "undated" | Yes | Supported |
55
+ | `@orientation` | `<table-wrap>` | "landscape" / "portrait" | Yes | Supported |
56
+ | `@specific-use` | `<ref>` | "delete" (IEC amendments) | No | Missing |
57
+
58
+ ## Key Gaps
59
+ - [ ] **CRITICAL**: `<processing-meta>` not modeled as child of `<standard>` -- introduced in Ed 2.1
60
+ - [ ] **CRITICAL**: `NisoSts::Front` does not map `<std-doc-meta>` as a child element
61
+ - [ ] `NisoSts::Front` does not support `<adoption-front>` as child (it's on `Adoption` but not `Front`)
62
+ - [ ] `NisoSts::Permissions` does not contain `<license>` as a child element -- guidelines show `<license>` inside `<permissions>` (IEC example)
63
+ - [ ] `NisoSts::Permissions` maps `copyright-statement` as `:string` but guidelines show it can contain `<inline-graphic>` and mixed content (IEC example)
64
+ - [ ] `NisoSts::Permissions` does not support multiple `<copyright-holder>` elements (needed for B.4.2)
65
+ - [ ] `NisoSts::Reference` missing `<non-normative-note>` as a child (B.2.4)
66
+ - [ ] `NisoSts::Reference` missing `@specific-use` attribute (for IEC amendments "delete")
67
+ - [ ] `NisoSts::ReferenceStandard` missing `@content-type` attribute (used for "uri")
68
+ - [ ] `NisoSts::MixedCitation` missing `@id` attribute
69
+ - [ ] `<index>` element not modeled at all (legacy but still used in traditional production chain)
70
+ - [ ] `NisoSts::MetadataStd` missing `<abstract>` as a child (shown in IEC metadata C.2)
71
+ - [ ] `NisoSts::MetadataStd` missing `<isbn>` as a child (shown in IEC metadata C.2)
72
+ - [ ] `NisoSts::MetadataStd` missing `<suppl-type>`, `<suppl-number>`, `<suppl-version>` (shown in IEC metadata)
73
+ - [ ] `NisoSts::MetadataStd` missing `<counts>` child (shown in IEC metadata)
74
+ - [ ] `NisoSts::MetadataStd` missing `<license_ref>` child (shown in IEC metadata example, under `<license>`)
75
+ - [ ] `NisoSts::MetadataStd` only allows single `<permissions>` but IEC uses multiple (B.2.1)
@@ -0,0 +1,63 @@
1
+ # Section 5: Content
2
+
3
+ ## Overview
4
+ Section 5 covers content elements: text formatting, labels/titles, paragraphs, symbols, notes, examples, warnings, lists, text alignment arrays, quotations, graphics, and code.
5
+
6
+ ## Element Coverage
7
+
8
+ | Element | Guidelines Usage | sts-ruby Model | Status | Notes |
9
+ |---------|-----------------|---------------|--------|-------|
10
+ | `<p>` | General body text | `NisoSts::Paragraph` | Supported | Has `@id`, `@style-type`, `@specific-use`; mixed content |
11
+ | `<label>` | Numbering labels | `NisoSts::Label` | Supported | Mixed content with `<sup>` |
12
+ | `<title>` | Designation titles | `NisoSts::Title` | Supported | |
13
+ | `<bold>` | Bold formatting | `TbxIsoTml::Bold` | Supported | |
14
+ | `<italic>` | Italic formatting | `TbxIsoTml::Italic` | Supported | |
15
+ | `<underline>` | Underline formatting | `NisoSts::Underline` | Supported | |
16
+ | `<strike>` | Strikethrough | `NisoSts::Strike` | Supported | |
17
+ | `<monospace>` | Monospace font | `NisoSts::Monospace` | Supported | |
18
+ | `<sub>` | Subscript | `NisoSts::Sub` | Supported | |
19
+ | `<sup>` | Superscript | `NisoSts::Sup` | Supported | In `TbxIsoTml` namespace |
20
+ | `<sc>` | Small caps | `NisoSts::Sc` | Supported | |
21
+ | `<named-content>` | Variable quantities with `@content-type="variable"` | `NisoSts::NamedContent` | Partial | Missing `<sup>`, `<sub>`, `<italic>` children needed for variable symbols |
22
+ | `<non-normative-note>` | Notes in body text | `NisoSts::NonNormativeNote` | Supported | Has `@id`, `@content-type`, `<label>`, `<p>` |
23
+ | `<non-normative-example>` | Examples in body text | `NisoSts::NonNormativeExample` | Supported | Has `@id`, `<label>`, `<p>` |
24
+ | `<list>` | Ordered and unordered lists | `NisoSts::List` | Supported | Has `@list-type`, `@id`, `@content-type` |
25
+ | `<list-item>` | Items in lists | `NisoSts::ListItem` | Partial | Missing `@id` attribute |
26
+ | `<array>` | Text alignment tables | `NisoSts::SectionArray` | Partial | Only contains `<table>`, not colgroup or other structures |
27
+ | `<disp-quote>` | Block quotations | `NisoSts::DispQuote` | Partial | Missing `<permissions>` child; uses `<attribution>` instead of `<attrib>` with `@specific-use="source"` |
28
+ | `<graphic>` | Block graphics | `NisoSts::Graphic` | Partial | Missing `@id`, `@specific-use` attributes; missing `<label>`, `<caption>` children (ISO sub-figures B.2.16) |
29
+ | `<inline-graphic>` | Inline graphics | `NisoSts::InlineGraphic` | Supported | Has `@specific-use`, `@href`, etc. |
30
+ | `<code>` | Code blocks (new) | Missing | Missing | **Critical gap** -- replaces `<preformat>` for code; planned `@language`, `@language-version` attributes |
31
+ | `<inline-code>` | Inline code (new) | Missing | Missing | **Critical gap** -- inline equivalent of `<code>` |
32
+ | `<preformat>` | Preformatted text (legacy) | `NisoSts::Preformat` | Supported | Legacy, being replaced by `<code>` |
33
+ | `<styled-content>` | Styled text with semantic meaning | `NisoSts::StyledContent` | Supported | Has `@style`, `@style-type`, `@specific-use` |
34
+ | `<break>` | Line breaks | `NisoSts::Break` | Supported | |
35
+
36
+ ## Attribute Gaps
37
+
38
+ | Attribute | Parent Element | Guidelines Usage | Modeled | Status |
39
+ |-----------|---------------|-----------------|---------|--------|
40
+ | `@content-type` | `<p>` | "dimension" for unit statements, "warning" for warnings | No | Missing on `Paragraph` |
41
+ | `@list-type` | `<list>` | "alpha-lower", "arabic", "roman-lower", "dash", "bullet", "simple", "order", "roman-upper", "alpha-upper", "symbol", "other" | Yes | Supported |
42
+ | `@style-type` | `<p>` | Alignment: "align-left", "align-right", "align-center", etc. (legacy) | Yes | Supported |
43
+ | `@xlink:href` | `<graphic>` | Reference to graphic file | Yes | Supported (via `:xlink_href`) |
44
+ | `@specific-use` | `<graphic>` | Size indicator: "size:T", "size:S", "size:M", "size:L" | No | Missing on `Graphic` |
45
+ | `@id` | `<graphic>` | Element identifier | No | Missing on `Graphic` |
46
+ | `@id` | `<list-item>` | Element identifier (Sec 3.4) | No | Missing on `ListItem` |
47
+ | `@content-type` | `<non-normative-note>` | "warning" for warnings | Yes | Supported |
48
+ | `@language` | `<code>` | Code language (planned) | N/A | Element missing |
49
+ | `@language-version` | `<code>` | Code language version (planned) | N/A | Element missing |
50
+
51
+ ## Key Gaps
52
+ - [ ] **CRITICAL**: `<code>` element not modeled -- the primary element for code blocks in new content (replacing `<preformat>`)
53
+ - [ ] **CRITICAL**: `<inline-code>` element not modeled -- inline code equivalent
54
+ - [ ] `NisoSts::Paragraph` missing `@content-type` attribute -- guidelines use `<p content-type="dimension">` for unit statements in figures and tables
55
+ - [ ] `NisoSts::Graphic` missing `@id` attribute -- listed in Sec 3.4 as needing ID
56
+ - [ ] `NisoSts::Graphic` missing `@specific-use` attribute -- guidelines define size indicators (size:T, size:S, size:M, size:L)
57
+ - [ ] `NisoSts::Graphic` missing `<label>` and `<caption>` children -- ISO uses these for sub-figure captions (B.2.16)
58
+ - [ ] `NisoSts::ListItem` missing `@id` attribute -- listed in Sec 3.4 as needing ID
59
+ - [ ] `NisoSts::NamedContent` missing child elements (`<sup>`, `<sub>`, `<italic>`) -- needed for variable quantity symbols (Sec 5.5)
60
+ - [ ] `NisoSts::DispQuote` uses `<attribution>` but guidelines show `<attrib specific-use="source">` (Sec 5.9)
61
+ - [ ] `NisoSts::DispQuote` missing `<permissions>` child -- guidelines mention permissions within disp-quote
62
+ - [ ] `NisoSts::NonNormativeNote` missing `<xref>` child -- needed for references within notes
63
+ - [ ] `NisoSts::NonNormativeNote` missing `<non-normative-note>` child (nested notes in legacy B.2.10)
@@ -0,0 +1,53 @@
1
+ # Section 6: Tables
2
+
3
+ ## Overview
4
+ Section 6 covers formal and informal tables, table cell styling (alignment, borders, background color), merged cells, line breaks and lists within tables, and landscape tables.
5
+
6
+ ## Element Coverage
7
+
8
+ | Element | Guidelines Usage | sts-ruby Model | Status | Notes |
9
+ |---------|-----------------|---------------|--------|-------|
10
+ | `<table-wrap>` | Formal table container | `TbxIsoTml::TableWrap` | Partial | Missing `@width` attribute; label mapped as `:string` not as `Label` type |
11
+ | `<table>` | XHTML table | `TbxIsoTml::Table` | Supported | Has `@border`, `@frame`, `@rules`, `@width`, `@style`, `@cellspacing`, `@cellpadding` |
12
+ | `<col>` | Column specification | `TbxIsoTml::Col` | Supported | Has `@width`, `@align`, `@valign`, `@span` |
13
+ | `<colgroup>` | Column group | `TbxIsoTml::Colgroup` | Supported | |
14
+ | `<thead>` | Table header | `TbxIsoTml::Thead` | Supported | Has `@align`, `@valign`, `@style` |
15
+ | `<tbody>` | Table body | `TbxIsoTml::Tbody` | Supported | |
16
+ | `<tfoot>` | Table footer (legacy) | `TbxIsoTml::Tfoot` | Supported | |
17
+ | `<tr>` | Table row | `TbxIsoTml::Tr` | Supported | |
18
+ | `<th>` | Table header cell | `TbxIsoTml::Th` | Supported | Has `@align`, `@valign`, `@colspan`, `@rowspan`, `@style`, children including `<p>`, `<bold>`, `<break>` |
19
+ | `<td>` | Table data cell | `TbxIsoTml::Td` | Supported | Has `@align`, `@valign`, `@colspan`, `@rowspan`, `@style`; children include `<p>`, `<list>`, `<xref>`, `<non-normative-note>` |
20
+ | `<caption>` | Table caption | `NisoSts::Caption` | Supported | Contains `<title>`, `<p>` |
21
+ | `<label>` | Table label | `NisoSts::Label` | Supported | |
22
+ | `<table-wrap-foot>` | Table footer wrapper | `TbxIsoTml::TableWrapFoot` | Partial | Missing `@id`; missing `<p content-type="dimension">`; multiple `<fn>` elements not supported |
23
+ | `<fn>` | Footnotes in tables | `NisoSts::Fn` / `TbxIsoTml::Fn` | Supported | |
24
+ | `<break>` | Line breaks in cells | `NisoSts::Break` / `TbxIsoTml::TableBreak` | Supported | |
25
+ | `<array>` | Informal table container | `NisoSts::SectionArray` | Partial | Only supports `<table>`, not colgroup |
26
+
27
+ ## Attribute Gaps
28
+
29
+ | Attribute | Parent Element | Guidelines Usage | Modeled | Status |
30
+ |-----------|---------------|-----------------|---------|--------|
31
+ | `@orientation` | `<table-wrap>` | "landscape" / "portrait" | Yes | Supported |
32
+ | `@content-type` | `<table-wrap>` | "fig-index" (ISO figure keys), "dimension" | Yes | Supported |
33
+ | `@width` | `<table>` | Table width in px or % | Yes | Supported |
34
+ | `@width` | `<table-wrap>` | Table wrapper width | No | Missing |
35
+ | `@border` | `<table>` | Border width | Yes | Supported |
36
+ | `@frame` | `<table>` | Frame type ("box", etc.) | Yes | Supported |
37
+ | `@rules` | `<table>` | Rules ("all", "groups", etc.) | Yes | Supported |
38
+ | `@style` | `<td>`, `<th>` | Cell styling (borders, background-color) | Yes | Supported |
39
+ | `@align` | `<td>`, `<th>`, `<col>`, `<thead>`, `<tbody>` | Horizontal alignment | Yes | Supported |
40
+ | `@valign` | `<td>`, `<th>`, `<col>`, `<thead>`, `<tbody>` | Vertical alignment | Yes | Supported |
41
+ | `@colspan` | `<td>`, `<th>` | Column spanning | Yes | Supported |
42
+ | `@rowspan` | `<td>`, `<th>` | Row spanning | Yes | Supported |
43
+ | `@scope` | `<td>`, `<th>` | Scope for accessibility | Yes | Supported |
44
+ | `@content-type` | `<p>` (inside `<table-wrap-foot>`) | "dimension" for unit statements | No | `@content-type` missing on `Paragraph` |
45
+ | `@id` | `<table-wrap-foot>` | Element identifier | No | Missing on `TableWrapFoot` |
46
+
47
+ ## Key Gaps
48
+ - [ ] `TbxIsoTml::TableWrap` maps `<label>` as `:string` instead of `NisoSts::Label` type -- label can contain `<sup>` markup for footnote markers
49
+ - [ ] `TbxIsoTml::TableWrapFoot` missing `@id` attribute
50
+ - [ ] `TbxIsoTml::TableWrapFoot` only supports single `<fn>` -- guidelines show multiple `<fn>` elements in table footers
51
+ - [ ] `TbxIsoTml::TableWrapFoot` missing multiple `<p>` children -- guidelines show `<p content-type="dimension">` for unit statements
52
+ - [ ] `TbxIsoTml::TableWrapFoot` missing `<tr>` as child -- legacy IEC coding has `<tr>` inside `<table-wrap-foot>` (B.2.14)
53
+ - [ ] `NisoSts::Paragraph` missing `@content-type` attribute -- needed for `<p content-type="dimension">` in table footers
@@ -0,0 +1,41 @@
1
+ # Section 7: Formulae and Equations
2
+
3
+ ## Overview
4
+ Section 7 covers display formulae, inline formulae, formula numbering, notes to formulae, formula keys (using `<legend>`), and MathML.
5
+
6
+ ## Element Coverage
7
+
8
+ | Element | Guidelines Usage | sts-ruby Model | Status | Notes |
9
+ |---------|-----------------|---------------|--------|-------|
10
+ | `<disp-formula>` | Block formulae | `NisoSts::DisplayFormula` | Partial | Missing `<legend>`, `<non-normative-note>`, `<def-list>` children |
11
+ | `<inline-formula>` | Inline formulae | `NisoSts::InlineFormula` | Supported | Has `@id`, `<math>`, `<alternatives>` |
12
+ | `<mml:math>` | MathML expression | `TbxIsoTml::Math` | Partial | Limited MathML element support |
13
+ | `<label>` | Formula number e.g. "(1)" | `NisoSts::Label` | Supported | |
14
+ | `<legend>` | Formula key container (new) | Missing | Missing | **Critical gap** -- introduced for formula keys in Ed 2.1 OSD |
15
+ | `<def-list>` | Formula key definition list | `NisoSts::DefList` | Supported | Has `@list-content` (note: model has `@list-type` not `@list-content`) |
16
+ | `<def-item>` | Key term/definition pair | `NisoSts::DefItem` | Partial | Missing `@id` attribute |
17
+ | `<term>` | Key variable symbol | `NisoSts::Term` | Supported | |
18
+ | `<def>` | Key variable definition | `NisoSts::Def` | Supported | |
19
+ | `<non-normative-note>` | Notes to formulae | `NisoSts::NonNormativeNote` | Supported | Not mapped as child of `DisplayFormula` |
20
+ | `<tex-math>` | TeX math representation | `NisoSts::TexMath` | Supported | |
21
+ | `<graphic>` | Formula graphic | `NisoSts::Graphic` | Supported | |
22
+
23
+ ## Attribute Gaps
24
+
25
+ | Attribute | Parent Element | Guidelines Usage | Modeled | Status |
26
+ |-----------|---------------|-----------------|---------|--------|
27
+ | `@id` | `<disp-formula>` | Formula identifier | Yes | Supported |
28
+ | `@content-type` | `<disp-formula>` | Formula content type | Yes | Supported |
29
+ | `@display` | `<mml:math>` | "block" for display formulae | Yes | Supported |
30
+ | `@id` | `<mml:math>` | Math element ID (e.g. "mml_m5") | Yes | Supported |
31
+ | `@list-content` | `<def-list>` | "formula" for formula keys | No | Model has `@list-type` not `@list-content`; guidelines use `@list-content` |
32
+ | `@id` | `<def-item>` | Item identifier | No | Missing |
33
+
34
+ ## Key Gaps
35
+ - [ ] **CRITICAL**: `<legend>` element not modeled -- used for formula keys and figure keys (Sec 7.3, 8.3). Contains `<title>` and `<def-list>`
36
+ - [ ] **CRITICAL**: `NisoSts::DisplayFormula` missing `<legend>` as a child element -- primary container for formula keys in OSD
37
+ - [ ] **CRITICAL**: `NisoSts::DisplayFormula` missing `<non-normative-note>` as a child element -- Sec 7.2 explicitly allows notes after `<mml:math>`
38
+ - [ ] **CRITICAL**: `NisoSts::DisplayFormula` missing `<def-list>` as a child element -- needed when legend is not used
39
+ - [ ] `NisoSts::DefList` has `@list-type` but guidelines use `@list-content` (value "formula", "figure", "abbreviation") -- possible attribute name mismatch
40
+ - [ ] `NisoSts::DefItem` missing `@id` attribute -- all def-items in examples carry IDs
41
+ - [ ] `TbxIsoTml::Math` has limited MathML child elements -- missing `<mover>`, `<munder>`, `<mtable>`, `<mtr>`, `<mtd>`, `<mpadded>`, `<maction>`, `<mphantom>`, etc.
@@ -0,0 +1,45 @@
1
+ # Section 8: Figures
2
+
3
+ ## Overview
4
+ Section 8 covers figure elements, sub-figures and figure groups, figure keys, and unit statements in figures.
5
+
6
+ ## Element Coverage
7
+
8
+ | Element | Guidelines Usage | sts-ruby Model | Status | Notes |
9
+ |---------|-----------------|---------------|--------|-------|
10
+ | `<fig>` | Figure element | `NisoSts::Figure` | Partial | Missing `<legend>`, `<def-list>` (for IEC keys) should be collection, missing `<inline-graphic>`, missing `<supplementary-material>` |
11
+ | `<fig-group>` | Sub-figure group | `NisoSts::FigGroup` | Partial | Missing `<legend>`, `<non-normative-note>` children |
12
+ | `<label>` | Figure number | `NisoSts::Label` | Supported | |
13
+ | `<caption>` | Figure caption | `NisoSts::Caption` | Supported | Contains `<title>`, `<p>` |
14
+ | `<graphic>` | Figure graphic | `NisoSts::Graphic` | Partial | Missing `<label>`, `<caption>` children for sub-figure captions (ISO) |
15
+ | `<inline-graphic>` | Inline graphic in figure keys | `NisoSts::InlineGraphic` | Supported | |
16
+ | `<legend>` | Figure key container (new) | Missing | Missing | **Critical gap** -- introduced in Ed 2.1 for figure keys |
17
+ | `<def-list>` | Figure key items | `NisoSts::DefList` | Supported | Mapped in `Figure` but as singular (should be collection for multiple keys) |
18
+ | `<def-item>` | Key item pair | `NisoSts::DefItem` | Supported | |
19
+ | `<term>` | Key symbol/number | `NisoSts::Term` | Supported | |
20
+ | `<def>` | Key description | `NisoSts::Def` | Supported | |
21
+ | `<non-normative-note>` | Figure notes | `NisoSts::NonNormativeNote` | Supported | Mapped in `Figure` |
22
+ | `<table-wrap>` | ISO figure key table | `TbxIsoTml::TableWrap` | Supported | ISO uses `<table-wrap content-type="fig-index">` for figure keys |
23
+ | `<p>` | Unit statements, caption content | `NisoSts::Paragraph` | Partial | Missing `@content-type` for dimension statements |
24
+
25
+ ## Attribute Gaps
26
+
27
+ | Attribute | Parent Element | Guidelines Usage | Modeled | Status |
28
+ |-----------|---------------|-----------------|---------|--------|
29
+ | `@id` | `<fig>` | Figure identifier | Yes | Supported |
30
+ | `@orientation` | `<fig>` | "landscape" / "portrait" | Yes | Supported |
31
+ | `@fig-type` | `<fig>` | Usually "figure" (ISO) | Yes | Supported |
32
+ | `@content-type` | `<p>` (in `<caption>`) | "dimension" for unit statements | No | Missing on `Paragraph` |
33
+ | `@list-content` | `<def-list>` | "figure" for figure keys | No | Model has `@list-type` not `@list-content` |
34
+ | `@id` | `<fig-group>` | Figure group identifier | Yes | Supported |
35
+ | `@orientation` | `<fig-group>` | "landscape" / "portrait" | Yes | Supported |
36
+
37
+ ## Key Gaps
38
+ - [ ] **CRITICAL**: `<legend>` element not modeled -- the primary container for figure keys in OSD (Sec 8.3). Contains `<title>` ("Key") and `<def-list>`
39
+ - [ ] `NisoSts::Figure` missing `<legend>` as a child element
40
+ - [ ] `NisoSts::FigGroup` missing `<legend>` as a child element -- "only one `<legend>` for each `<fig-group>`" (Sec 8.2)
41
+ - [ ] `NisoSts::FigGroup` missing `<non-normative-note>` and `<non-normative-example>` children -- guidelines say these go in the last `<fig>` but the group should support them
42
+ - [ ] `NisoSts::Figure` maps `<def-list>` as singular but guidelines show figure can contain both `<def-list>` (IEC keys) and `<legend>` (new OSD keys)
43
+ - [ ] `NisoSts::Graphic` missing `<label>` and `<caption>` children -- ISO sub-figures use `<graphic>` with `<label>` and `<caption>` (Sec B.2.16)
44
+ - [ ] `NisoSts::Paragraph` missing `@content-type` attribute -- needed for `<p content-type="dimension">` in figure captions (Sec 8.4)
45
+ - [ ] `NisoSts::DefList` has `@list-type` but guidelines use `@list-content="figure"` -- possible attribute name mismatch
@@ -0,0 +1,56 @@
1
+ # Section 9: Terms and Definitions
2
+
3
+ ## Overview
4
+ Section 9 covers terminological entries using TBX (Term Base eXchange), including term entries, definitions, term information groups, examples, notes, cross-references, sources, and subject fields.
5
+
6
+ ## Element Coverage
7
+
8
+ | Element | Guidelines Usage | sts-ruby Model | Status | Notes |
9
+ |---------|-----------------|---------------|--------|-------|
10
+ | `<term-sec>` | Terminological entry container | `NisoSts::TermSection` | Supported | Has `@id`, `@sec-type`, `<label>`, `<termEntry>`, `<term-display>` |
11
+ | `<tbx:termEntry>` | TBX term entry | `TbxIsoTml::TermEntry` | Supported | Has `@id`, `<langSet>` |
12
+ | `<tbx:langSet>` | Language set | `TbxIsoTml::LangSet` | Supported | Has `@xml:lang`, `<definition>`, `<note>`, `<example>`, `<tig>`, `<source>`, `<subjectField>`, `<see>` |
13
+ | `<tbx:definition>` | Term definition | `TbxIsoTml::Definition` | Supported | Mixed content with `<entailedTerm>`, `<italic>`, `<sub>`, `<sup>`, `<list>`, `<std>` |
14
+ | `<tbx:tig>` | Term information group | `TbxIsoTml::TermInformationGroup` | Supported | Has `<term>`, `<partOfSpeech>`, `<normativeAuthorization>`, `<termType>`, `<grammaticalNumber>` |
15
+ | `<tbx:term>` | Term text | `TbxIsoTml::Term` | Supported | Has `@id`, mixed content with `<italic>`, `<bold>`, `<sub>`, `<sup>` |
16
+ | `<tbx:partOfSpeech>` | Part of speech | `TbxIsoTml::PartOfSpeech` | Supported | `@value`: noun, verb, adj, adv |
17
+ | `<tbx:normativeAuthorization>` | Term status | `TbxIsoTml::NormativeAuthorization` | Supported | `@value`: preferredTerm, admittedTerm, deprecatedTerm |
18
+ | `<tbx:termType>` | Term type | `TbxIsoTml::TermType` | Supported | `@value`: fullForm, abbreviation, symbol, formula, etc. |
19
+ | `<tbx:grammaticalNumber>` | Singular/plural | `TbxIsoTml::GrammaticalNumber` | Supported | `@value`: singular, plural |
20
+ | `<tbx:grammaticalGender>` | Gender | `TbxIsoTml::GrammaticalGender` | Supported | `@value`: masculine, feminine, neuter |
21
+ | `<tbx:geographicalUsage>` | Geographic usage | `TbxIsoTml::GeographicalUsage` | Supported | Content-based |
22
+ | `<tbx:pronunciation>` | Pronunciation | `TbxIsoTml::Pronunciation` | Supported | Content-based |
23
+ | `<tbx:note>` | Notes in terminology | `TbxIsoTml::Note` | Supported | Has `@id`, `<entailedTerm>`, `<xref>`, `<list>` |
24
+ | `<tbx:example>` | Examples in terminology | `TbxIsoTml::Example` | Supported | Has `@id`, `<entailedTerm>`, `<italic>` |
25
+ | `<tbx:entailedTerm>` | Cross-ref to other terms | `TbxIsoTml::EntailedTerm` | Supported | Has `@target`, content text |
26
+ | `<tbx:source>` | Source of term | `TbxIsoTml::Source` | Partial | Missing `<std>` child -- IEC codes `<std>` references inside source (Sec B.2.17) |
27
+ | `<tbx:subjectField>` | Subject field | `TbxIsoTml::SubjectField` | Supported | Content-based |
28
+ | `<tbx:see>` | Cross-reference from terms | `TbxIsoTml::See` | Supported | Has `@script`, content |
29
+ | `<term-display>` | Display-oriented terms (IEC) | `NisoSts::TermDisplay` | Partial | Missing `<term>` child, `<def>` child, `<list>` child -- guidelines show full display entries (Sec B.3.3) |
30
+ | `<label>` | Entry number | `NisoSts::Label` | Supported | |
31
+ | `<xref>` | Cross-references to terms | `TbxIsoTml::Xref` | Partial | Missing `@custom-type` attribute |
32
+
33
+ ## Attribute Gaps
34
+
35
+ | Attribute | Parent Element | Guidelines Usage | Modeled | Status |
36
+ |-----------|---------------|-----------------|---------|--------|
37
+ | `@xml:lang` | `<tbx:langSet>` | Language of the term entry | Yes | Supported |
38
+ | `@id` | `<tbx:termEntry>` | Term entry ID | Yes | Supported |
39
+ | `@id` | `<tbx:term>` | Term ID | Yes | Supported |
40
+ | `@value` | `<tbx:partOfSpeech>` | "noun", "verb", "adj", "adv" | Yes | Supported |
41
+ | `@value` | `<tbx:normativeAuthorization>` | "preferredTerm", "admittedTerm", "deprecatedTerm" | Yes | Supported |
42
+ | `@value` | `<tbx:termType>` | "fullForm", "abbreviation", "symbol", "formula" | Yes | Supported |
43
+ | `@target` | `<tbx:entailedTerm>` | ID of referenced entry | Yes | Supported |
44
+ | `@target` | `<tbx:see>` | ID of referenced element (legacy) | No | Missing `@target` on `See` |
45
+ | `@ref-type` | `<xref>` | "custom" for term cross-refs | Yes | Supported |
46
+ | `@custom-type` | `<xref>` | "term-entry" for cross-refs to terms | No | Missing on `Xref` |
47
+ | `@rid` | `<xref>` | Target element ID | Yes | Supported |
48
+
49
+ ## Key Gaps
50
+ - [ ] `TbxIsoTml::Source` missing `<std>` child element -- IEC codes standards references inside `<tbx:source>` (Sec B.2.17, Sec 9.2.8)
51
+ - [ ] `NisoSts::TermDisplay` is incomplete -- missing `<term>`, `<def>`, `<list>` children needed for IEC legacy term display (Sec B.3.3)
52
+ - [ ] `TbxIsoTml::See` missing `@target` attribute -- legacy `<tbx:see>` uses `@target` for cross-references (Sec B.2.18)
53
+ - [ ] `TbxIsoTml::Xref` missing `@custom-type` attribute -- guidelines specify `@custom-type="term-entry"` for cross-refs to terms from outside the terminology section (Sec 9.2.6)
54
+ - [ ] `TbxIsoTml::LangSet` missing `<xref>` child -- Sec 9.2.7 says `<xref>` is used for references from terms to other document sections (replaces `<tbx:see>`)
55
+ - [ ] `TbxIsoTml::Note` missing text content mapping -- TBX notes contain text directly, but model maps children only
56
+ - [ ] `TbxIsoTml::Example` missing `<break>` child -- may need line breaks in examples