sts 0.5.2 → 0.5.3

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 (197) 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/Gemfile +1 -1
  7. data/lib/sts/content_groups/helpers.rb +27 -0
  8. data/lib/sts/enum_values.rb +17 -0
  9. data/lib/sts/iso_sts/app.rb +26 -1
  10. data/lib/sts/iso_sts/app_group.rb +1 -0
  11. data/lib/sts/iso_sts/array.rb +1 -0
  12. data/lib/sts/iso_sts/back.rb +1 -0
  13. data/lib/sts/iso_sts/body.rb +4 -0
  14. data/lib/sts/iso_sts/bold.rb +23 -11
  15. data/lib/sts/iso_sts/caption.rb +1 -0
  16. data/lib/sts/iso_sts/content_groups/highlight_elements.rb +285 -0
  17. data/lib/sts/iso_sts/def.rb +1 -0
  18. data/lib/sts/iso_sts/def_item.rb +1 -0
  19. data/lib/sts/iso_sts/def_list.rb +1 -0
  20. data/lib/sts/iso_sts/disp_formula.rb +5 -1
  21. data/lib/sts/iso_sts/document_identification.rb +1 -0
  22. data/lib/sts/iso_sts/fig.rb +1 -0
  23. data/lib/sts/iso_sts/fn.rb +1 -0
  24. data/lib/sts/iso_sts/fn_group.rb +1 -0
  25. data/lib/sts/iso_sts/front.rb +3 -0
  26. data/lib/sts/iso_sts/graphic.rb +5 -0
  27. data/lib/sts/iso_sts/inline_formula.rb +1 -1
  28. data/lib/sts/iso_sts/iso_meta.rb +2 -1
  29. data/lib/sts/iso_sts/italic.rb +23 -11
  30. data/lib/sts/iso_sts/list.rb +1 -0
  31. data/lib/sts/iso_sts/list_item.rb +7 -4
  32. data/lib/sts/iso_sts/mathml2/math.rb +20 -18
  33. data/lib/sts/iso_sts/mixed_citation.rb +34 -10
  34. data/lib/sts/iso_sts/nat_meta.rb +1 -0
  35. data/lib/sts/iso_sts/non_normative_example.rb +5 -0
  36. data/lib/sts/iso_sts/non_normative_note.rb +1 -0
  37. data/lib/sts/iso_sts/paragraph.rb +32 -20
  38. data/lib/sts/iso_sts/permissions.rb +1 -0
  39. data/lib/sts/iso_sts/preformat.rb +8 -5
  40. data/lib/sts/iso_sts/ref.rb +1 -0
  41. data/lib/sts/iso_sts/ref_list.rb +1 -0
  42. data/lib/sts/iso_sts/reg_meta.rb +1 -0
  43. data/lib/sts/iso_sts/sec.rb +10 -0
  44. data/lib/sts/iso_sts/standard.rb +6 -0
  45. data/lib/sts/iso_sts/standard_cross_reference.rb +1 -0
  46. data/lib/sts/iso_sts/standard_identification.rb +1 -0
  47. data/lib/sts/iso_sts/std.rb +4 -4
  48. data/lib/sts/iso_sts/styled_content.rb +17 -15
  49. data/lib/sts/iso_sts/table.rb +1 -0
  50. data/lib/sts/iso_sts/table_wrap.rb +1 -0
  51. data/lib/sts/iso_sts/table_wrap_foot.rb +1 -0
  52. data/lib/sts/iso_sts/td.rb +32 -14
  53. data/lib/sts/iso_sts/term.rb +1 -1
  54. data/lib/sts/iso_sts/term_sec.rb +1 -0
  55. data/lib/sts/iso_sts/th.rb +32 -14
  56. data/lib/sts/iso_sts/title.rb +15 -7
  57. data/lib/sts/iso_sts/title_wrap.rb +1 -0
  58. data/lib/sts/iso_sts/tr.rb +1 -0
  59. data/lib/sts/iso_sts.rb +2 -0
  60. data/lib/sts/{niso_sts/mathml.rb → mathml.rb} +1 -3
  61. data/lib/sts/namespaces.rb +1 -0
  62. data/lib/sts/niso_sts/abstract.rb +1 -0
  63. data/lib/sts/niso_sts/ack.rb +1 -1
  64. data/lib/sts/niso_sts/address.rb +1 -0
  65. data/lib/sts/niso_sts/adoption.rb +1 -1
  66. data/lib/sts/niso_sts/adoption_front.rb +1 -0
  67. data/lib/sts/niso_sts/alternatives.rb +1 -4
  68. data/lib/sts/niso_sts/annotation.rb +1 -3
  69. data/lib/sts/niso_sts/app.rb +14 -1
  70. data/lib/sts/niso_sts/app_group.rb +5 -0
  71. data/lib/sts/niso_sts/author_comment.rb +1 -3
  72. data/lib/sts/niso_sts/author_notes.rb +1 -1
  73. data/lib/sts/niso_sts/award_group.rb +1 -0
  74. data/lib/sts/niso_sts/back.rb +5 -4
  75. data/lib/sts/niso_sts/bio.rb +1 -3
  76. data/lib/sts/niso_sts/body.rb +36 -0
  77. data/lib/sts/niso_sts/boxed_text.rb +5 -1
  78. data/lib/sts/niso_sts/break.rb +11 -0
  79. data/lib/sts/niso_sts/caption.rb +7 -1
  80. data/lib/sts/niso_sts/chem_struct_wrap.rb +1 -0
  81. data/lib/sts/niso_sts/citation_alternatives.rb +1 -0
  82. data/lib/sts/niso_sts/collab.rb +8 -0
  83. data/lib/sts/niso_sts/conference.rb +1 -0
  84. data/lib/sts/niso_sts/content_groups/body_elements.rb +50 -0
  85. data/lib/sts/niso_sts/content_groups/citation_elements.rb +74 -0
  86. data/lib/sts/niso_sts/content_groups/emphasized_text.rb +67 -0
  87. data/lib/sts/niso_sts/content_groups/highlight_elements.rb +51 -0
  88. data/lib/sts/niso_sts/content_groups/inside_cell.rb +116 -0
  89. data/lib/sts/niso_sts/content_groups/p_elements.rb +41 -0
  90. data/lib/sts/niso_sts/content_groups/para_level.rb +67 -0
  91. data/lib/sts/niso_sts/content_groups/styled_content_elements.rb +93 -0
  92. data/lib/sts/niso_sts/content_groups/table_group_attributes.rb +62 -0
  93. data/lib/sts/niso_sts/content_groups.rb +8 -0
  94. data/lib/sts/niso_sts/contrib.rb +1 -0
  95. data/lib/sts/niso_sts/contrib_group.rb +1 -0
  96. data/lib/sts/niso_sts/counts.rb +1 -0
  97. data/lib/sts/niso_sts/custom_meta.rb +1 -0
  98. data/lib/sts/niso_sts/date.rb +1 -0
  99. data/lib/sts/niso_sts/def_item.rb +9 -0
  100. data/lib/sts/niso_sts/def_list.rb +6 -1
  101. data/lib/sts/niso_sts/disp_formula_group.rb +3 -4
  102. data/lib/sts/niso_sts/disp_quote.rb +1 -1
  103. data/lib/sts/niso_sts/display_formula.rb +12 -0
  104. data/lib/sts/niso_sts/document_identification.rb +1 -0
  105. data/lib/sts/niso_sts/editing_instruction.rb +1 -3
  106. data/lib/sts/niso_sts/element_citation.rb +1 -1
  107. data/lib/sts/niso_sts/ext_link.rb +16 -2
  108. data/lib/sts/niso_sts/fig_group.rb +1 -0
  109. data/lib/sts/niso_sts/figure.rb +14 -1
  110. data/lib/sts/niso_sts/floats_group.rb +1 -4
  111. data/lib/sts/niso_sts/fn.rb +2 -1
  112. data/lib/sts/niso_sts/front.rb +1 -0
  113. data/lib/sts/niso_sts/funding_group.rb +1 -0
  114. data/lib/sts/niso_sts/glossary.rb +1 -1
  115. data/lib/sts/niso_sts/graphic.rb +2 -0
  116. data/lib/sts/niso_sts/ics.rb +2 -0
  117. data/lib/sts/niso_sts/index_term.rb +1 -0
  118. data/lib/sts/niso_sts/inline_formula.rb +11 -0
  119. data/lib/sts/niso_sts/institution_wrap.rb +1 -0
  120. data/lib/sts/niso_sts/kwd_group.rb +1 -0
  121. data/lib/sts/niso_sts/label.rb +3 -2
  122. data/lib/sts/niso_sts/list.rb +7 -2
  123. data/lib/sts/niso_sts/list_item.rb +7 -2
  124. data/lib/sts/niso_sts/media.rb +1 -0
  125. data/lib/sts/niso_sts/meta_note.rb +1 -1
  126. data/lib/sts/niso_sts/metadata_iso.rb +1 -1
  127. data/lib/sts/niso_sts/metadata_std.rb +16 -6
  128. data/lib/sts/niso_sts/milestone_end.rb +1 -3
  129. data/lib/sts/niso_sts/milestone_start.rb +1 -3
  130. data/lib/sts/niso_sts/mixed_citation.rb +22 -0
  131. data/lib/sts/niso_sts/monospace.rb +9 -0
  132. data/lib/sts/niso_sts/name.rb +1 -0
  133. data/lib/sts/niso_sts/nat_meta.rb +1 -0
  134. data/lib/sts/niso_sts/nested_kwd.rb +1 -0
  135. data/lib/sts/niso_sts/nlm_citation.rb +1 -1
  136. data/lib/sts/niso_sts/non_normative_example.rb +15 -2
  137. data/lib/sts/niso_sts/non_normative_note.rb +12 -2
  138. data/lib/sts/niso_sts/normative_example.rb +1 -1
  139. data/lib/sts/niso_sts/normative_note.rb +1 -1
  140. data/lib/sts/niso_sts/note.rb +1 -1
  141. data/lib/sts/niso_sts/notes.rb +1 -1
  142. data/lib/sts/niso_sts/notes_group.rb +1 -0
  143. data/lib/sts/niso_sts/open_access.rb +1 -4
  144. data/lib/sts/niso_sts/paragraph.rb +37 -7
  145. data/lib/sts/niso_sts/permissions.rb +1 -0
  146. data/lib/sts/niso_sts/preformat.rb +15 -0
  147. data/lib/sts/niso_sts/private_char.rb +1 -3
  148. data/lib/sts/niso_sts/pub_date.rb +2 -0
  149. data/lib/sts/niso_sts/publisher.rb +1 -0
  150. data/lib/sts/niso_sts/reference.rb +1 -0
  151. data/lib/sts/niso_sts/reference_list.rb +6 -1
  152. data/lib/sts/niso_sts/reference_standard.rb +2 -0
  153. data/lib/sts/niso_sts/reg_meta.rb +1 -0
  154. data/lib/sts/niso_sts/release_date.rb +9 -6
  155. data/lib/sts/niso_sts/ruby.rb +1 -0
  156. data/lib/sts/niso_sts/section.rb +39 -4
  157. data/lib/sts/niso_sts/speech.rb +1 -1
  158. data/lib/sts/niso_sts/standard.rb +3 -0
  159. data/lib/sts/niso_sts/standard_identification.rb +1 -1
  160. data/lib/sts/niso_sts/statement.rb +1 -1
  161. data/lib/sts/niso_sts/std_doc_meta.rb +1 -0
  162. data/lib/sts/niso_sts/std_org.rb +1 -0
  163. data/lib/sts/niso_sts/styled_content.rb +37 -0
  164. data/lib/sts/niso_sts/sub.rb +11 -0
  165. data/lib/sts/niso_sts/subj_group.rb +1 -0
  166. data/lib/sts/niso_sts/sup.rb +13 -0
  167. data/lib/sts/niso_sts/supplementary_material.rb +1 -0
  168. data/lib/sts/niso_sts/term_display.rb +1 -0
  169. data/lib/sts/niso_sts/term_section.rb +3 -3
  170. data/lib/sts/niso_sts/title.rb +20 -0
  171. data/lib/sts/niso_sts/trans_abstract.rb +1 -0
  172. data/lib/sts/niso_sts/underline.rb +5 -0
  173. data/lib/sts/niso_sts/uri.rb +2 -0
  174. data/lib/sts/niso_sts/verse_group.rb +1 -1
  175. data/lib/sts/niso_sts/volume_issue_group.rb +1 -4
  176. data/lib/sts/tbx_iso_tml/bold.rb +28 -1
  177. data/lib/sts/tbx_iso_tml/col.rb +10 -0
  178. data/lib/sts/tbx_iso_tml/definition.rb +16 -2
  179. data/lib/sts/tbx_iso_tml/example.rb +9 -1
  180. data/lib/sts/tbx_iso_tml/fn.rb +3 -2
  181. data/lib/sts/tbx_iso_tml/italic.rb +25 -1
  182. data/lib/sts/tbx_iso_tml/msup.rb +2 -1
  183. data/lib/sts/tbx_iso_tml/note.rb +11 -7
  184. data/lib/sts/tbx_iso_tml/source.rb +4 -0
  185. data/lib/sts/tbx_iso_tml/table.rb +1 -0
  186. data/lib/sts/tbx_iso_tml/table_wrap.rb +3 -0
  187. data/lib/sts/tbx_iso_tml/table_wrap_foot.rb +1 -0
  188. data/lib/sts/tbx_iso_tml/tbody.rb +9 -1
  189. data/lib/sts/tbx_iso_tml/td.rb +22 -8
  190. data/lib/sts/tbx_iso_tml/term.rb +9 -5
  191. data/lib/sts/tbx_iso_tml/tfoot.rb +5 -1
  192. data/lib/sts/tbx_iso_tml/th.rb +27 -6
  193. data/lib/sts/tbx_iso_tml/thead.rb +9 -1
  194. data/lib/sts/tbx_iso_tml/tr.rb +16 -0
  195. data/lib/sts/version.rb +1 -1
  196. data/lib/sts.rb +10 -0
  197. metadata +19 -3
@@ -14,6 +14,7 @@ module Sts
14
14
 
15
15
  xml do
16
16
  element "table-wrap-foot"
17
+ ordered
17
18
 
18
19
  map_element "title", to: :title
19
20
  map_element "p", to: :paragraph
@@ -18,20 +18,30 @@ module Sts
18
18
  attribute :valign, :string
19
19
  attribute :content, :string, collection: true
20
20
  attribute :paragraph, ::Sts::IsoSts::Paragraph, collection: true
21
- attribute :fig, ::Sts::IsoSts::Fig
22
- attribute :graphic, ::Sts::IsoSts::Graphic
23
- attribute :disp_formula, ::Sts::IsoSts::DispFormula
24
- attribute :list, ::Sts::IsoSts::List
25
- attribute :def_list, ::Sts::IsoSts::DefList
26
- attribute :math, ::Sts::IsoSts::Mathml2::Math
27
- attribute :std, ::Sts::IsoSts::Std
28
- attribute :fn, ::Sts::TbxIsoTml::Fn
29
- attribute :xref, ::Sts::TbxIsoTml::Xref
30
- attribute :bold, ::Sts::IsoSts::Bold
31
- attribute :italic, ::Sts::IsoSts::Italic
32
- attribute :non_normative_note, ::Sts::IsoSts::NonNormativeNote
33
- attribute :non_normative_example, ::Sts::IsoSts::NonNormativeExample
34
- attribute :styled_content, ::Sts::IsoSts::StyledContent
21
+ attribute :fig, ::Sts::IsoSts::Fig, collection: true
22
+ attribute :graphic, ::Sts::IsoSts::Graphic, collection: true
23
+ attribute :disp_formula, ::Sts::IsoSts::DispFormula, collection: true
24
+ attribute :list, ::Sts::IsoSts::List, collection: true
25
+ attribute :def_list, ::Sts::IsoSts::DefList, collection: true
26
+ attribute :math, Mml::V3::Math, collection: true
27
+ attribute :std, ::Sts::IsoSts::Std, collection: true
28
+ attribute :fn, ::Sts::TbxIsoTml::Fn, collection: true
29
+ attribute :xref, ::Sts::TbxIsoTml::Xref, collection: true
30
+ attribute :bold, ::Sts::IsoSts::Bold, collection: true
31
+ attribute :italic, ::Sts::IsoSts::Italic, collection: true
32
+ attribute :non_normative_note, ::Sts::IsoSts::NonNormativeNote,
33
+ collection: true
34
+ attribute :non_normative_example, ::Sts::IsoSts::NonNormativeExample,
35
+ collection: true
36
+ attribute :styled_content, ::Sts::IsoSts::StyledContent, collection: true
37
+ attribute :brk, ::Sts::IsoSts::Break, collection: true
38
+ attribute :underline, ::Sts::NisoSts::Underline, collection: true
39
+ attribute :sub, ::Sts::NisoSts::Sub, collection: true
40
+ attribute :sup, ::Sts::NisoSts::Sup, collection: true
41
+ attribute :ext_link, ::Sts::NisoSts::ExtLink, collection: true
42
+ attribute :monospace, ::Sts::NisoSts::Monospace, collection: true
43
+ attribute :sc, ::Sts::NisoSts::Sc, collection: true
44
+ attribute :strike, ::Sts::NisoSts::Strike, collection: true
35
45
 
36
46
  xml do # rubocop:disable Metrics/BlockLength
37
47
  element "td"
@@ -68,6 +78,14 @@ module Sts
68
78
  map_element "non-normative-note", to: :non_normative_note
69
79
  map_element "non-normative-example", to: :non_normative_example
70
80
  map_element "styled-content", to: :styled_content
81
+ map_element "break", to: :brk
82
+ map_element "underline", to: :underline
83
+ map_element "sub", to: :sub
84
+ map_element "sup", to: :sup
85
+ map_element "ext-link", to: :ext_link
86
+ map_element "monospace", to: :monospace
87
+ map_element "sc", to: :sc
88
+ map_element "strike", to: :strike
71
89
  end
72
90
  end
73
91
  end
@@ -17,7 +17,7 @@ module Sts
17
17
  attribute :uri, ::Sts::NisoSts::Uri
18
18
  attribute :named_content, ::Sts::NisoSts::NamedContent
19
19
  attribute :styled_content, ::Sts::IsoSts::StyledContent
20
- attribute :math, ::Sts::IsoSts::Mathml2::Math
20
+ attribute :math, Mml::V3::Math
21
21
 
22
22
  xml do
23
23
  element "term"
@@ -24,6 +24,7 @@ module Sts
24
24
 
25
25
  xml do
26
26
  element "term-sec"
27
+ ordered
27
28
 
28
29
  map_attribute "id", to: :id
29
30
  map_attribute "lang", to: :xml_lang
@@ -18,20 +18,30 @@ module Sts
18
18
  attribute :valign, :string
19
19
  attribute :content, :string, collection: true
20
20
  attribute :paragraph, ::Sts::IsoSts::Paragraph, collection: true
21
- attribute :fig, ::Sts::IsoSts::Fig
22
- attribute :graphic, ::Sts::IsoSts::Graphic
23
- attribute :disp_formula, ::Sts::IsoSts::DispFormula
24
- attribute :list, ::Sts::IsoSts::List
25
- attribute :def_list, ::Sts::IsoSts::DefList
26
- attribute :math, ::Sts::IsoSts::Mathml2::Math
27
- attribute :std, ::Sts::IsoSts::Std
28
- attribute :fn, ::Sts::TbxIsoTml::Fn
29
- attribute :xref, ::Sts::TbxIsoTml::Xref
30
- attribute :bold, ::Sts::IsoSts::Bold
31
- attribute :italic, ::Sts::IsoSts::Italic
32
- attribute :non_normative_note, ::Sts::IsoSts::NonNormativeNote
33
- attribute :non_normative_example, ::Sts::IsoSts::NonNormativeExample
34
- attribute :styled_content, ::Sts::IsoSts::StyledContent
21
+ attribute :fig, ::Sts::IsoSts::Fig, collection: true
22
+ attribute :graphic, ::Sts::IsoSts::Graphic, collection: true
23
+ attribute :disp_formula, ::Sts::IsoSts::DispFormula, collection: true
24
+ attribute :list, ::Sts::IsoSts::List, collection: true
25
+ attribute :def_list, ::Sts::IsoSts::DefList, collection: true
26
+ attribute :math, Mml::V3::Math, collection: true
27
+ attribute :std, ::Sts::IsoSts::Std, collection: true
28
+ attribute :fn, ::Sts::TbxIsoTml::Fn, collection: true
29
+ attribute :xref, ::Sts::TbxIsoTml::Xref, collection: true
30
+ attribute :bold, ::Sts::IsoSts::Bold, collection: true
31
+ attribute :italic, ::Sts::IsoSts::Italic, collection: true
32
+ attribute :non_normative_note, ::Sts::IsoSts::NonNormativeNote,
33
+ collection: true
34
+ attribute :non_normative_example, ::Sts::IsoSts::NonNormativeExample,
35
+ collection: true
36
+ attribute :styled_content, ::Sts::IsoSts::StyledContent, collection: true
37
+ attribute :brk, ::Sts::IsoSts::Break, collection: true
38
+ attribute :underline, ::Sts::NisoSts::Underline, collection: true
39
+ attribute :sub, ::Sts::NisoSts::Sub, collection: true
40
+ attribute :sup, ::Sts::NisoSts::Sup, collection: true
41
+ attribute :ext_link, ::Sts::NisoSts::ExtLink, collection: true
42
+ attribute :monospace, ::Sts::NisoSts::Monospace, collection: true
43
+ attribute :sc, ::Sts::NisoSts::Sc, collection: true
44
+ attribute :strike, ::Sts::NisoSts::Strike, collection: true
35
45
 
36
46
  xml do # rubocop:disable Metrics/BlockLength
37
47
  element "th"
@@ -68,6 +78,14 @@ module Sts
68
78
  map_element "non-normative-note", to: :non_normative_note
69
79
  map_element "non-normative-example", to: :non_normative_example
70
80
  map_element "styled-content", to: :styled_content
81
+ map_element "break", to: :brk
82
+ map_element "underline", to: :underline
83
+ map_element "sub", to: :sub
84
+ map_element "sup", to: :sup
85
+ map_element "ext-link", to: :ext_link
86
+ map_element "monospace", to: :monospace
87
+ map_element "sc", to: :sc
88
+ map_element "strike", to: :strike
71
89
  end
72
90
  end
73
91
  end
@@ -4,13 +4,17 @@ module Sts
4
4
  module IsoSts
5
5
  class Title < Lutaml::Model::Serializable
6
6
  attribute :content, :string, collection: true
7
- attribute :bold, ::Sts::IsoSts::Bold
8
- attribute :italic, ::Sts::IsoSts::Italic
9
- attribute :sub, ::Sts::NisoSts::Sub
10
- attribute :sup, ::Sts::NisoSts::Sup
11
- attribute :xref, ::Sts::TbxIsoTml::Xref
12
- attribute :break, ::Sts::IsoSts::Break
13
- attribute :styled_content, ::Sts::IsoSts::StyledContent
7
+ attribute :bold, ::Sts::IsoSts::Bold, collection: true
8
+ attribute :italic, ::Sts::IsoSts::Italic, collection: true
9
+ attribute :sub, ::Sts::NisoSts::Sub, collection: true
10
+ attribute :sup, ::Sts::NisoSts::Sup, collection: true
11
+ attribute :xref, ::Sts::TbxIsoTml::Xref, collection: true
12
+ attribute :break, ::Sts::IsoSts::Break, collection: true
13
+ attribute :styled_content, ::Sts::IsoSts::StyledContent, collection: true
14
+ attribute :monospace, ::Sts::NisoSts::Monospace, collection: true
15
+ attribute :sc, ::Sts::NisoSts::Sc, collection: true
16
+ attribute :inline_formula, ::Sts::IsoSts::InlineFormula, collection: true
17
+ attribute :std, ::Sts::IsoSts::Std, collection: true
14
18
 
15
19
  xml do
16
20
  element "title"
@@ -24,6 +28,10 @@ module Sts
24
28
  map_element "xref", to: :xref
25
29
  map_element "break", to: :break
26
30
  map_element "styled-content", to: :styled_content
31
+ map_element "monospace", to: :monospace
32
+ map_element "sc", to: :sc
33
+ map_element "inline-formula", to: :inline_formula
34
+ map_element "std", to: :std
27
35
  end
28
36
  end
29
37
  end
@@ -12,6 +12,7 @@ module Sts
12
12
 
13
13
  xml do
14
14
  element "title-wrap"
15
+ ordered
15
16
 
16
17
  map_attribute "id", to: :id
17
18
  map_attribute "xml:lang", to: :xml_lang
@@ -15,6 +15,7 @@ module Sts
15
15
 
16
16
  xml do
17
17
  element "tr"
18
+ ordered
18
19
 
19
20
  map_attribute "id", to: :id
20
21
  map_attribute "content-type", to: :content_type
data/lib/sts/iso_sts.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "mml"
4
+
3
5
  module Sts
4
6
  module IsoSts
5
7
  autoload :Standard, "#{__dir__}/iso_sts/standard"
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "lutaml/model"
4
+ require "mml"
4
5
 
5
6
  module Sts
6
7
  module Mathml
7
8
  class Math < Lutaml::Model::Serializable
8
- # Delegate to Mml::V3::Math for actual MathML handling
9
9
  attribute :id, :string
10
10
  attribute :display, :string
11
11
  attribute :math, Mml::V3::Math
@@ -38,7 +38,6 @@ module Sts
38
38
  math.display = value if math
39
39
  end
40
40
 
41
- # Forward missing methods to the underlying math object
42
41
  def method_missing(method_name, *args, &block)
43
42
  if math.respond_to?(method_name)
44
43
  math.send(method_name, *args, &block)
@@ -56,7 +55,6 @@ module Sts
56
55
  end
57
56
 
58
57
  def self.from_xml(input)
59
- # Parse the inner math element and wrap it
60
58
  parsed = Mml::V3::Math.from_xml(input)
61
59
  math = new
62
60
  math.instance_variable_set(:@math, parsed)
@@ -7,6 +7,7 @@ module Sts
7
7
 
8
8
  class TbxNamespace < Lutaml::Xml::Namespace
9
9
  uri "urn:iso:std:iso:30042:ed-1"
10
+ uri_aliases "urn:iso:std:iso:30042:ed-2"
10
11
  prefix_default "tbx"
11
12
  end
12
13
  end
@@ -11,6 +11,7 @@ module Sts
11
11
 
12
12
  xml do
13
13
  element "abstract"
14
+ ordered
14
15
 
15
16
  map_attribute "id", to: :id
16
17
  map_attribute "abstract-type", to: :abstract_type
@@ -12,7 +12,7 @@ module Sts
12
12
 
13
13
  xml do
14
14
  element "ack"
15
- mixed_content
15
+ ordered
16
16
 
17
17
  map_attribute "id", to: :id
18
18
  map_attribute "xml:lang", to: :xml_lang
@@ -14,6 +14,7 @@ module Sts
14
14
 
15
15
  xml do
16
16
  element "address"
17
+ ordered
17
18
 
18
19
  map_element "addr-line", to: :addr_line
19
20
  map_element "city", to: :city
@@ -12,7 +12,7 @@ module Sts
12
12
 
13
13
  xml do
14
14
  element "adoption"
15
- mixed_content
15
+ ordered
16
16
 
17
17
  map_attribute "id", to: :id
18
18
  map_attribute "lang", to: :lang
@@ -5,6 +5,7 @@ module Sts
5
5
  class AdoptionFront < Front
6
6
  xml do
7
7
  element "adoption-front"
8
+ ordered
8
9
  map_element "iso-meta", to: :iso_meta
9
10
  map_element "std-meta", to: :std_meta
10
11
  map_element "sec", to: :sec
@@ -3,12 +3,9 @@
3
3
  module Sts
4
4
  module NisoSts
5
5
  class Alternatives < Lutaml::Model::Serializable
6
- attribute :content, :string, collection: true
7
6
  xml do
8
7
  element "alternatives"
9
- mixed_content
10
-
11
- map_content to: :content
8
+ ordered
12
9
  end
13
10
  end
14
11
  end
@@ -8,17 +8,15 @@ module Sts
8
8
  attribute :xml_lang, :string
9
9
  attribute :specific_use, :string
10
10
  attribute :symbol, :string
11
- attribute :content, :string, collection: true
12
11
  xml do
13
12
  element "annotation"
14
- mixed_content
13
+ ordered
15
14
 
16
15
  map_attribute "id", to: :id
17
16
  map_attribute "content-type", to: :content_type
18
17
  map_attribute "xml:lang", to: :xml_lang
19
18
  map_attribute "specific-use", to: :specific_use
20
19
  map_attribute "symbol", to: :symbol
21
- map_content to: :content
22
20
  end
23
21
  end
24
22
  end
@@ -14,11 +14,18 @@ module Sts
14
14
  attribute :ref_list, ::Sts::NisoSts::ReferenceList, collection: true
15
15
  attribute :non_normative_note, ::Sts::NisoSts::NonNormativeNote,
16
16
  collection: true
17
+ attribute :non_normative_example, ::Sts::NisoSts::NonNormativeExample,
18
+ collection: true
17
19
  attribute :table_wrap, ::Sts::TbxIsoTml::TableWrap, collection: true
20
+ attribute :list, ::Sts::NisoSts::List, collection: true
21
+ attribute :array, ::Sts::NisoSts::SectionArray, collection: true
22
+ attribute :preformat, ::Sts::NisoSts::Preformat, collection: true
23
+ attribute :boxed_text, ::Sts::NisoSts::BoxedText, collection: true
24
+ attribute :graphic, ::Sts::NisoSts::Graphic, collection: true
18
25
 
19
26
  xml do
20
27
  element "app"
21
- mixed_content
28
+ ordered
22
29
 
23
30
  map_attribute "id", to: :id
24
31
  map_attribute "content-type", to: :content_type
@@ -31,7 +38,13 @@ module Sts
31
38
  map_element "p", to: :paragraph
32
39
  map_element "ref-list", to: :ref_list
33
40
  map_element "non-normative-note", to: :non_normative_note
41
+ map_element "non-normative-example", to: :non_normative_example
34
42
  map_element "table-wrap", to: :table_wrap
43
+ map_element "list", to: :list
44
+ map_element "array", to: :array
45
+ map_element "preformat", to: :preformat
46
+ map_element "boxed-text", to: :boxed_text
47
+ map_element "graphic", to: :graphic
35
48
  end
36
49
  end
37
50
  end
@@ -3,11 +3,16 @@
3
3
  module Sts
4
4
  module NisoSts
5
5
  class AppGroup < Lutaml::Model::Serializable
6
+ attribute :id, :string
7
+ attribute :content_type, :string
6
8
  attribute :app, Sts::NisoSts::App, collection: true
7
9
 
8
10
  xml do
9
11
  element "app-group"
12
+ ordered
10
13
 
14
+ map_attribute "id", to: :id
15
+ map_attribute "content-type", to: :content_type
11
16
  map_element "app", to: :app
12
17
  end
13
18
  end
@@ -7,16 +7,14 @@ module Sts
7
7
  attribute :content_type, :string
8
8
  attribute :specific_use, :string
9
9
  attribute :xml_lang, :string
10
- attribute :content, :string, collection: true
11
10
  xml do
12
11
  element "author-comment"
13
- mixed_content
12
+ ordered
14
13
 
15
14
  map_attribute "id", to: :id
16
15
  map_attribute "content-type", to: :content_type
17
16
  map_attribute "specific-use", to: :specific_use
18
17
  map_attribute "xml:lang", to: :xml_lang
19
- map_content to: :content
20
18
  end
21
19
  end
22
20
  end
@@ -14,7 +14,7 @@ module Sts
14
14
 
15
15
  xml do
16
16
  element "author-notes"
17
- mixed_content
17
+ ordered
18
18
 
19
19
  map_attribute "id", to: :id
20
20
  map_attribute "xml:lang", to: :xml_lang
@@ -12,6 +12,7 @@ module Sts
12
12
 
13
13
  xml do
14
14
  element "award-group"
15
+ ordered
15
16
 
16
17
  map_attribute "id", to: :id
17
18
  map_attribute "award-type", to: :award_type
@@ -3,13 +3,14 @@
3
3
  module Sts
4
4
  module NisoSts
5
5
  class Back < Lutaml::Model::Serializable
6
- attribute :ref_list, ::Sts::NisoSts::ReferenceList
7
- attribute :app_group, ::Sts::NisoSts::AppGroup
8
- attribute :sec, ::Sts::NisoSts::Section
9
- attribute :fn_group, ::Sts::NisoSts::FnGroup
6
+ attribute :ref_list, ::Sts::NisoSts::ReferenceList, collection: true
7
+ attribute :app_group, ::Sts::NisoSts::AppGroup, collection: true
8
+ attribute :sec, ::Sts::NisoSts::Section, collection: true
9
+ attribute :fn_group, ::Sts::NisoSts::FnGroup, collection: true
10
10
 
11
11
  xml do
12
12
  element "back"
13
+ ordered
13
14
 
14
15
  map_element "ref-list", to: :ref_list
15
16
  map_element "app-group", to: :app_group
@@ -4,17 +4,15 @@ module Sts
4
4
  module NisoSts
5
5
  class Bio < Lutaml::Model::Serializable
6
6
  attribute :id, :string
7
- attribute :content, :string, collection: true
8
7
  attribute :bold, ::Sts::TbxIsoTml::Bold, collection: true
9
8
  attribute :italic, ::Sts::TbxIsoTml::Italic, collection: true
10
9
  attribute :paragraph, ::Sts::NisoSts::Paragraph, collection: true
11
10
 
12
11
  xml do
13
12
  element "bio"
14
- mixed_content
13
+ ordered
15
14
 
16
15
  map_attribute "id", to: :id
17
- map_content to: :content
18
16
  map_element "bold", to: :bold
19
17
  map_element "italic", to: :italic
20
18
  map_element "p", to: :paragraph
@@ -4,10 +4,46 @@ module Sts
4
4
  module NisoSts
5
5
  class Body < Lutaml::Model::Serializable
6
6
  attribute :sec, ::Sts::NisoSts::Section, collection: true
7
+ attribute :term_sec, ::Sts::NisoSts::TermSection, collection: true
8
+ attribute :paragraph, ::Sts::NisoSts::Paragraph, collection: true
9
+ attribute :list, ::Sts::NisoSts::List, collection: true
10
+ attribute :def_list, ::Sts::NisoSts::DefList, collection: true
11
+ attribute :table_wrap, ::Sts::TbxIsoTml::TableWrap, collection: true
12
+ attribute :fig, ::Sts::NisoSts::Figure, collection: true
13
+ attribute :non_normative_note, ::Sts::NisoSts::NonNormativeNote,
14
+ collection: true
15
+ attribute :non_normative_example, ::Sts::NisoSts::NonNormativeExample,
16
+ collection: true
17
+ attribute :preformat, ::Sts::NisoSts::Preformat, collection: true
18
+ attribute :styled_content, ::Sts::NisoSts::StyledContent, collection: true
19
+ attribute :array, ::Sts::NisoSts::SectionArray, collection: true
20
+ attribute :disp_formula, ::Sts::NisoSts::DisplayFormula, collection: true
21
+ attribute :disp_formula_group, ::Sts::NisoSts::DispFormulaGroup,
22
+ collection: true
23
+ attribute :editing_instruction, ::Sts::NisoSts::EditingInstruction,
24
+ collection: true
25
+ attribute :disp_quote, ::Sts::NisoSts::DispQuote, collection: true
7
26
 
8
27
  xml do
9
28
  element "body"
29
+ ordered
30
+
10
31
  map_element "sec", to: :sec
32
+ map_element "term-sec", to: :term_sec
33
+ map_element "p", to: :paragraph
34
+ map_element "list", to: :list
35
+ map_element "def-list", to: :def_list
36
+ map_element "table-wrap", to: :table_wrap
37
+ map_element "fig", to: :fig
38
+ map_element "non-normative-note", to: :non_normative_note
39
+ map_element "non-normative-example", to: :non_normative_example
40
+ map_element "preformat", to: :preformat
41
+ map_element "styled-content", to: :styled_content
42
+ map_element "array", to: :array
43
+ map_element "disp-formula", to: :disp_formula
44
+ map_element "disp-formula-group", to: :disp_formula_group
45
+ map_element "editing-instruction", to: :editing_instruction
46
+ map_element "disp-quote", to: :disp_quote
11
47
  end
12
48
  end
13
49
  end
@@ -11,10 +11,12 @@ module Sts
11
11
  attribute :caption, ::Sts::NisoSts::Caption
12
12
  attribute :label, ::Sts::NisoSts::Label
13
13
  attribute :paragraphs, ::Sts::NisoSts::Paragraph, collection: true
14
+ attribute :preformat, ::Sts::NisoSts::Preformat, collection: true
15
+ attribute :list, ::Sts::NisoSts::List, collection: true
14
16
 
15
17
  xml do
16
18
  element "boxed-text"
17
- mixed_content
19
+ ordered
18
20
 
19
21
  map_attribute "id", to: :id
20
22
  map_attribute "content-type", to: :content_type
@@ -25,6 +27,8 @@ module Sts
25
27
  map_element "caption", to: :caption
26
28
  map_element "label", to: :label
27
29
  map_element "p", to: :paragraphs
30
+ map_element "preformat", to: :preformat
31
+ map_element "list", to: :list
28
32
  end
29
33
  end
30
34
  end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sts
4
+ module NisoSts
5
+ class Break < Lutaml::Model::Serializable
6
+ xml do
7
+ element "break"
8
+ end
9
+ end
10
+ end
11
+ end
@@ -29,14 +29,20 @@ module Sts
29
29
  attribute :paragraphs, ::Sts::NisoSts::Paragraph, collection: true
30
30
  attribute :non_normative_note, ::Sts::NisoSts::NonNormativeNote,
31
31
  collection: true
32
+ attribute :label, ::Sts::NisoSts::Label
33
+ attribute :list, ::Sts::NisoSts::List, collection: true
34
+ attribute :def_list, ::Sts::NisoSts::DefList, collection: true
32
35
 
33
36
  xml do
34
37
  element "caption"
35
- mixed_content
38
+ ordered
36
39
 
37
40
  map_element "p", to: :paragraphs
38
41
  map_element "non-normative-note", to: :non_normative_note
39
42
  map_element "title", to: :title
43
+ map_element "label", to: :label
44
+ map_element "list", to: :list
45
+ map_element "def-list", to: :def_list
40
46
  end
41
47
  end
42
48
  end
@@ -15,6 +15,7 @@ module Sts
15
15
 
16
16
  xml do
17
17
  element "chem-struct-wrap"
18
+ ordered
18
19
 
19
20
  map_attribute "id", to: :id
20
21
  map_attribute "content-type", to: :content_type
@@ -9,6 +9,7 @@ module Sts
9
9
 
10
10
  xml do
11
11
  element "citation-alternatives"
12
+ ordered
12
13
 
13
14
  map_element "mixed-citation", to: :mixed_citation
14
15
  map_element "element-citation", to: :element_citation
@@ -10,6 +10,10 @@ module Sts
10
10
  attribute :id, :string
11
11
  attribute :collab_alternatives, ::Sts::NisoSts::CollabAlternatives
12
12
  attribute :on_behalf_of, :string
13
+ attribute :sc, ::Sts::NisoSts::Sc, collection: true
14
+ attribute :bold, ::Sts::TbxIsoTml::Bold, collection: true
15
+ attribute :italic, ::Sts::TbxIsoTml::Italic, collection: true
16
+ attribute :underline, ::Sts::NisoSts::Underline, collection: true
13
17
 
14
18
  xml do
15
19
  element "collab"
@@ -21,6 +25,10 @@ module Sts
21
25
  map_attribute "id", to: :id
22
26
  map_element "collab-alternatives", to: :collab_alternatives
23
27
  map_element "on-behalf-of", to: :on_behalf_of
28
+ map_element "sc", to: :sc
29
+ map_element "bold", to: :bold
30
+ map_element "italic", to: :italic
31
+ map_element "underline", to: :underline
24
32
  map_content to: :content
25
33
  end
26
34
  end
@@ -14,6 +14,7 @@ module Sts
14
14
 
15
15
  xml do
16
16
  element "conference"
17
+ ordered
17
18
 
18
19
  map_element "conf-date", to: :conf_date
19
20
  map_element "conf-name", to: :conf_name