stepmod-utils 0.4.13 → 0.5.0

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 (88) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +4 -3
  3. data/exe/stepmod-annotate-all +5 -4
  4. data/exe/stepmod-convert-express-description +4 -6
  5. data/exe/stepmod-convert-express-resource +4 -6
  6. data/exe/stepmod-extract-concepts +5 -4
  7. data/exe/stepmod-srl-migrate +53 -21
  8. data/exe/stepmod-validate-express +13 -15
  9. data/lib/stepmod/utils/change.rb +47 -4
  10. data/lib/stepmod/utils/change_collection.rb +1 -1
  11. data/lib/stepmod/utils/change_edition.rb +6 -6
  12. data/lib/stepmod/utils/changes_extractor.rb +46 -10
  13. data/lib/stepmod/utils/concept.rb +12 -10
  14. data/lib/stepmod/utils/converters/blockquote.rb +0 -2
  15. data/lib/stepmod/utils/converters/def.rb +4 -4
  16. data/lib/stepmod/utils/converters/dt.rb +1 -1
  17. data/lib/stepmod/utils/converters/em_express_description.rb +8 -7
  18. data/lib/stepmod/utils/converters/eqn.rb +8 -6
  19. data/lib/stepmod/utils/converters/express_figure.rb +1 -1
  20. data/lib/stepmod/utils/converters/express_g.rb +1 -1
  21. data/lib/stepmod/utils/converters/express_table.rb +1 -1
  22. data/lib/stepmod/utils/converters/ext_description.rb +2 -1
  23. data/lib/stepmod/utils/converters/figure.rb +5 -5
  24. data/lib/stepmod/utils/converters/module_ref.rb +3 -5
  25. data/lib/stepmod/utils/converters/module_ref_express_description.rb +3 -7
  26. data/lib/stepmod/utils/converters/ol.rb +7 -7
  27. data/lib/stepmod/utils/converters/stepmod_ext_description.rb +3 -3
  28. data/lib/stepmod/utils/converters/strong.rb +12 -11
  29. data/lib/stepmod/utils/converters/term.rb +0 -1
  30. data/lib/stepmod/utils/express_bibdata.rb +6 -2
  31. data/lib/stepmod/utils/html_to_asciimath.rb +80 -80
  32. data/lib/stepmod/utils/parsers/mapping_table_parser.rb +31 -0
  33. data/lib/stepmod/utils/parsers/models/a.rb +40 -0
  34. data/lib/stepmod/utils/parsers/models/aa.rb +53 -0
  35. data/lib/stepmod/utils/parsers/models/ae.rb +54 -0
  36. data/lib/stepmod/utils/parsers/models/aimelt.rb +21 -0
  37. data/lib/stepmod/utils/parsers/models/alt.rb +19 -0
  38. data/lib/stepmod/utils/parsers/models/alt_map.rb +46 -0
  39. data/lib/stepmod/utils/parsers/models/alt_scmap.rb +34 -0
  40. data/lib/stepmod/utils/parsers/models/b.rb +58 -0
  41. data/lib/stepmod/utils/parsers/models/bigeqn.rb +55 -0
  42. data/lib/stepmod/utils/parsers/models/bold.rb +52 -0
  43. data/lib/stepmod/utils/parsers/models/bom_ref.rb +21 -0
  44. data/lib/stepmod/utils/parsers/models/constraint.rb +19 -0
  45. data/lib/stepmod/utils/parsers/models/dd.rb +86 -0
  46. data/lib/stepmod/utils/parsers/models/description.rb +86 -0
  47. data/lib/stepmod/utils/parsers/models/dl.rb +24 -0
  48. data/lib/stepmod/utils/parsers/models/dt.rb +86 -0
  49. data/lib/stepmod/utils/parsers/models/eqn.rb +57 -0
  50. data/lib/stepmod/utils/parsers/models/example.rb +84 -0
  51. data/lib/stepmod/utils/parsers/models/express_extref.rb +21 -0
  52. data/lib/stepmod/utils/parsers/models/express_ref.rb +21 -0
  53. data/lib/stepmod/utils/parsers/models/figure.rb +30 -0
  54. data/lib/stepmod/utils/parsers/models/i.rb +52 -0
  55. data/lib/stepmod/utils/parsers/models/img.rb +25 -0
  56. data/lib/stepmod/utils/parsers/models/imgarea.rb +23 -0
  57. data/lib/stepmod/utils/parsers/models/li.rb +86 -0
  58. data/lib/stepmod/utils/parsers/models/mapping_table.rb +26 -0
  59. data/lib/stepmod/utils/parsers/models/module_ref.rb +21 -0
  60. data/lib/stepmod/utils/parsers/models/note.rb +84 -0
  61. data/lib/stepmod/utils/parsers/models/ol.rb +25 -0
  62. data/lib/stepmod/utils/parsers/models/p.rb +56 -0
  63. data/lib/stepmod/utils/parsers/models/refpath.rb +23 -0
  64. data/lib/stepmod/utils/parsers/models/refpath_extend.rb +23 -0
  65. data/lib/stepmod/utils/parsers/models/rules.rb +19 -0
  66. data/lib/stepmod/utils/parsers/models/sc.rb +36 -0
  67. data/lib/stepmod/utils/parsers/models/screen.rb +55 -0
  68. data/lib/stepmod/utils/parsers/models/source.rb +21 -0
  69. data/lib/stepmod/utils/parsers/models/sub.rb +52 -0
  70. data/lib/stepmod/utils/parsers/models/sup.rb +52 -0
  71. data/lib/stepmod/utils/parsers/models/table.rb +29 -0
  72. data/lib/stepmod/utils/parsers/models/td.rb +98 -0
  73. data/lib/stepmod/utils/parsers/models/th.rb +98 -0
  74. data/lib/stepmod/utils/parsers/models/title.rb +53 -0
  75. data/lib/stepmod/utils/parsers/models/tr.rb +26 -0
  76. data/lib/stepmod/utils/parsers/models/tt.rb +68 -0
  77. data/lib/stepmod/utils/parsers/models/ul.rb +21 -0
  78. data/lib/stepmod/utils/parsers/models.rb +0 -0
  79. data/lib/stepmod/utils/parsers/types/string_without_indent.rb +17 -0
  80. data/lib/stepmod/utils/parsers.rb +4 -0
  81. data/lib/stepmod/utils/smrl_description_converter.rb +2 -1
  82. data/lib/stepmod/utils/smrl_resource_converter.rb +2 -1
  83. data/lib/stepmod/utils/stepmod_file_annotator.rb +14 -7
  84. data/lib/stepmod/utils/term.rb +1 -1
  85. data/lib/stepmod/utils/terms_extractor.rb +33 -31
  86. data/lib/stepmod/utils/version.rb +1 -1
  87. data/stepmod-utils.gemspec +4 -3
  88. metadata +76 -13
@@ -0,0 +1,56 @@
1
+ require "shale"
2
+
3
+ require_relative "a"
4
+ require_relative "b"
5
+ require_relative "bold"
6
+ require_relative "bom_ref"
7
+ require_relative "express_extref"
8
+ require_relative "express_ref"
9
+ require_relative "i"
10
+ require_relative "img"
11
+ require_relative "module_ref"
12
+ require_relative "sub"
13
+ require_relative "sup"
14
+ require_relative "tt"
15
+
16
+ module Stepmod
17
+ module Utils
18
+ module Parsers
19
+ module Models
20
+ class P < Shale::Mapper
21
+ attribute :content, Shale::Type::String
22
+ attribute :express_ref, ExpressRef, collection: true
23
+ attribute :express_extref, ExpressExtref, collection: true
24
+ attribute :module_ref, ModuleRef, collection: true
25
+ attribute :bom_ref, BomRef, collection: true
26
+ attribute :i, Italic, collection: true
27
+ attribute :b, B, collection: true
28
+ attribute :sub, Sub, collection: true
29
+ attribute :sup, Sup, collection: true
30
+ attribute :tt, Tt, collection: true
31
+ attribute :bold, Bold, collection: true
32
+ attribute :a, A, collection: true
33
+ attribute :img, Img, collection: true
34
+
35
+ xml do
36
+ root "p"
37
+
38
+ map_content to: :content
39
+ map_element "express_ref", to: :express_ref
40
+ map_element "express_extref", to: :express_extref
41
+ map_element "module_ref", to: :module_ref
42
+ map_element "bom_ref", to: :bom_ref
43
+ map_element "i", to: :i
44
+ map_element "b", to: :b
45
+ map_element "sub", to: :sub
46
+ map_element "sup", to: :sup
47
+ map_element "tt", to: :tt
48
+ map_element "bold", to: :bold
49
+ map_element "a", to: :a
50
+ map_element "img", to: :img
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,23 @@
1
+ require "shale"
2
+ require_relative "../types/string_without_indent"
3
+
4
+ module Stepmod
5
+ module Utils
6
+ module Parsers
7
+ module Models
8
+ class Refpath < Shale::Mapper
9
+ attribute :content,
10
+ Stepmod::Utils::Parsers::Types::StringWithoutIndent
11
+ attribute :space, Shale::Type::Value
12
+
13
+ xml do
14
+ root "refpath"
15
+
16
+ map_content to: :content
17
+ map_attribute "space", to: :space
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ require "shale"
2
+
3
+ module Stepmod
4
+ module Utils
5
+ module Parsers
6
+ module Models
7
+ class RefpathExtend < Shale::Mapper
8
+ attribute :content, Shale::Type::String
9
+ attribute :extended_select, Shale::Type::Value
10
+ attribute :space, Shale::Type::Value
11
+
12
+ xml do
13
+ root "refpath_extend"
14
+
15
+ map_content to: :content
16
+ map_attribute "extended_select", to: :extended_select
17
+ map_attribute "space", to: :space
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,19 @@
1
+ require "shale"
2
+
3
+ module Stepmod
4
+ module Utils
5
+ module Parsers
6
+ module Models
7
+ class Rules < Shale::Mapper
8
+ attribute :content, Shale::Type::String
9
+
10
+ xml do
11
+ root "rules"
12
+
13
+ map_content to: :content
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,36 @@
1
+ require "shale"
2
+
3
+ require_relative "alt_scmap"
4
+ require_relative "description"
5
+ require_relative "rules"
6
+ require_relative "source"
7
+
8
+ module Stepmod
9
+ module Utils
10
+ module Parsers
11
+ module Models
12
+ class Sc < Shale::Mapper
13
+ attribute :constraint, Shale::Type::Value
14
+ attribute :entity, Shale::Type::Value
15
+ attribute :original_module, Shale::Type::Value
16
+ attribute :description, Description
17
+ attribute :rules, Rules
18
+ attribute :source, Source
19
+ attribute :alt_scmap, AltScmap
20
+
21
+ xml do
22
+ root "sc"
23
+
24
+ map_attribute "constraint", to: :constraint
25
+ map_attribute "entity", to: :entity
26
+ map_attribute "original_module", to: :original_module
27
+ map_element "description", to: :description
28
+ map_element "rules", to: :rules
29
+ map_element "source", to: :source
30
+ map_element "alt_scmap", to: :alt_scmap
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,55 @@
1
+ require "shale"
2
+
3
+ require_relative "a"
4
+ require_relative "b"
5
+ require_relative "bold"
6
+ require_relative "bom_ref"
7
+ require_relative "express_extref"
8
+ require_relative "express_ref"
9
+ require_relative "i"
10
+ require_relative "module_ref"
11
+ require_relative "sub"
12
+ require_relative "sup"
13
+ require_relative "tt"
14
+
15
+ module Stepmod
16
+ module Utils
17
+ module Parsers
18
+ module Models
19
+ class Screen < Shale::Mapper
20
+ attribute :content, Shale::Type::String
21
+ attribute :xml_space, Shale::Type::String
22
+ attribute :express_ref, ExpressRef, collection: true
23
+ attribute :express_extref, ExpressExtref, collection: true
24
+ attribute :module_ref, ModuleRef, collection: true
25
+ attribute :bom_ref, BomRef, collection: true
26
+ attribute :i, Italic, collection: true
27
+ attribute :b, B, collection: true
28
+ attribute :sub, Sub, collection: true
29
+ attribute :sup, Sup, collection: true
30
+ attribute :tt, Tt, collection: true
31
+ attribute :bold, Bold, collection: true
32
+ attribute :a, A, collection: true
33
+
34
+ xml do
35
+ root "screen"
36
+
37
+ map_content to: :content
38
+ map_attribute "xml-space", to: :xml_space
39
+ map_element "express_ref", to: :express_ref
40
+ map_element "express_extref", to: :express_extref
41
+ map_element "module_ref", to: :module_ref
42
+ map_element "bom_ref", to: :bom_ref
43
+ map_element "i", to: :i
44
+ map_element "b", to: :b
45
+ map_element "sub", to: :sub
46
+ map_element "sup", to: :sup
47
+ map_element "tt", to: :tt
48
+ map_element "bold", to: :bold
49
+ map_element "a", to: :a
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,21 @@
1
+ require "shale"
2
+
3
+ module Stepmod
4
+ module Utils
5
+ module Parsers
6
+ module Models
7
+ class Source < Shale::Mapper
8
+ attribute :content, Shale::Type::String
9
+ attribute :space, Shale::Type::Value
10
+
11
+ xml do
12
+ root "source"
13
+
14
+ map_content to: :content
15
+ map_attribute "space", to: :space
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,52 @@
1
+ require "shale"
2
+
3
+ require_relative "a"
4
+ require_relative "b"
5
+ require_relative "bold"
6
+ require_relative "bom_ref"
7
+ require_relative "express_extref"
8
+ require_relative "express_ref"
9
+ require_relative "i"
10
+ require_relative "module_ref"
11
+ require_relative "sup"
12
+ require_relative "tt"
13
+
14
+ module Stepmod
15
+ module Utils
16
+ module Parsers
17
+ module Models
18
+ class Sub < Shale::Mapper
19
+ attribute :content, Shale::Type::String
20
+ attribute :express_ref, ExpressRef, collection: true
21
+ attribute :express_extref, ExpressExtref, collection: true
22
+ attribute :module_ref, ModuleRef, collection: true
23
+ attribute :bom_ref, BomRef, collection: true
24
+ attribute :i, Italic, collection: true
25
+ attribute :b, B, collection: true
26
+ attribute :sub, Sub, collection: true
27
+ attribute :sup, Sup, collection: true
28
+ attribute :tt, Tt, collection: true
29
+ attribute :bold, Bold, collection: true
30
+ attribute :a, A, collection: true
31
+
32
+ xml do
33
+ root "sub"
34
+
35
+ map_content to: :content
36
+ map_element "express_ref", to: :express_ref
37
+ map_element "express_extref", to: :express_extref
38
+ map_element "module_ref", to: :module_ref
39
+ map_element "bom_ref", to: :bom_ref
40
+ map_element "i", to: :i
41
+ map_element "b", to: :b
42
+ map_element "sub", to: :sub
43
+ map_element "sup", to: :sup
44
+ map_element "tt", to: :tt
45
+ map_element "bold", to: :bold
46
+ map_element "a", to: :a
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,52 @@
1
+ require "shale"
2
+
3
+ require_relative "a"
4
+ require_relative "b"
5
+ require_relative "bold"
6
+ require_relative "bom_ref"
7
+ require_relative "express_extref"
8
+ require_relative "express_ref"
9
+ require_relative "i"
10
+ require_relative "module_ref"
11
+ require_relative "sub"
12
+ require_relative "tt"
13
+
14
+ module Stepmod
15
+ module Utils
16
+ module Parsers
17
+ module Models
18
+ class Sup < Shale::Mapper
19
+ attribute :content, Shale::Type::String
20
+ attribute :express_ref, ExpressRef, collection: true
21
+ attribute :express_extref, ExpressExtref, collection: true
22
+ attribute :module_ref, ModuleRef, collection: true
23
+ attribute :bom_ref, BomRef, collection: true
24
+ attribute :i, Italic, collection: true
25
+ attribute :b, B, collection: true
26
+ attribute :sub, Sub, collection: true
27
+ attribute :sup, Sup, collection: true
28
+ attribute :tt, Tt, collection: true
29
+ attribute :bold, Bold, collection: true
30
+ attribute :a, A, collection: true
31
+
32
+ xml do
33
+ root "sup"
34
+
35
+ map_content to: :content
36
+ map_element "express_ref", to: :express_ref
37
+ map_element "express_extref", to: :express_extref
38
+ map_element "module_ref", to: :module_ref
39
+ map_element "bom_ref", to: :bom_ref
40
+ map_element "i", to: :i
41
+ map_element "b", to: :b
42
+ map_element "sub", to: :sub
43
+ map_element "sup", to: :sup
44
+ map_element "tt", to: :tt
45
+ map_element "bold", to: :bold
46
+ map_element "a", to: :a
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,29 @@
1
+ require "shale"
2
+
3
+ require_relative "tr"
4
+
5
+ module Stepmod
6
+ module Utils
7
+ module Parsers
8
+ module Models
9
+ class Table < Shale::Mapper
10
+ attribute :caption, Shale::Type::String
11
+ attribute :id, Shale::Type::String
12
+ attribute :number, Shale::Type::String
13
+ attribute :width, Shale::Type::String
14
+ attribute :tr, Tr, collection: true
15
+
16
+ xml do
17
+ root "table"
18
+
19
+ map_attribute "caption", to: :caption
20
+ map_attribute "id", to: :id
21
+ map_attribute "number", to: :number
22
+ map_attribute "width", to: :width
23
+ map_element "tr", to: :tr
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,98 @@
1
+ require "shale"
2
+
3
+ require_relative "a"
4
+ require_relative "b"
5
+ require_relative "bigeqn"
6
+ require_relative "bold"
7
+ require_relative "bom_ref"
8
+ require_relative "dl"
9
+ require_relative "eqn"
10
+ require_relative "example"
11
+ require_relative "express_extref"
12
+ require_relative "express_ref"
13
+ require_relative "figure"
14
+ require_relative "i"
15
+ require_relative "module_ref"
16
+ require_relative "note"
17
+ require_relative "ol"
18
+ require_relative "p"
19
+ require_relative "screen"
20
+ require_relative "sub"
21
+ require_relative "sup"
22
+ require_relative "table"
23
+ require_relative "tt"
24
+ require_relative "ul"
25
+
26
+ module Stepmod
27
+ module Utils
28
+ module Parsers
29
+ module Models
30
+ class Td < Shale::Mapper
31
+ attribute :content, Shale::Type::String
32
+ attribute :rowspan, Shale::Type::String
33
+ attribute :colspan, Shale::Type::String
34
+ attribute :align, Shale::Type::String
35
+ attribute :valign, Shale::Type::String
36
+ attribute :width, Shale::Type::String
37
+ attribute :height, Shale::Type::String
38
+ attribute :express_ref, ExpressRef, collection: true
39
+ attribute :express_extref, ExpressExtref, collection: true
40
+ attribute :module_ref, ModuleRef, collection: true
41
+ attribute :bom_ref, BomRef, collection: true
42
+ attribute :i, Italic, collection: true
43
+ attribute :b, B, collection: true
44
+ attribute :sub, Sub, collection: true
45
+ attribute :sup, Sup, collection: true
46
+ attribute :tt, Tt, collection: true
47
+ attribute :bold, Bold, collection: true
48
+ attribute :a, A, collection: true
49
+ attribute :p, P, collection: true
50
+ attribute :ul, Ul, collection: true
51
+ attribute :ol, Ol, collection: true
52
+ attribute :dl, Dl, collection: true
53
+ attribute :screen, Screen, collection: true
54
+ attribute :note, Note, collection: true
55
+ attribute :example, Example, collection: true
56
+ attribute :eqn, Eqn, collection: true
57
+ attribute :bigeqn, Bigeqn, collection: true
58
+ attribute :figure, Figure, collection: true
59
+ attribute :table, Table, collection: true
60
+
61
+ xml do
62
+ root "td"
63
+
64
+ map_content to: :content
65
+ map_attribute "rowspan", to: :rowspan
66
+ map_attribute "colspan", to: :colspan
67
+ map_attribute "align", to: :align
68
+ map_attribute "valign", to: :valign
69
+ map_attribute "width", to: :width
70
+ map_attribute "height", to: :height
71
+ map_element "express_ref", to: :express_ref
72
+ map_element "express_extref", to: :express_extref
73
+ map_element "module_ref", to: :module_ref
74
+ map_element "bom_ref", to: :bom_ref
75
+ map_element "i", to: :i
76
+ map_element "b", to: :b
77
+ map_element "sub", to: :sub
78
+ map_element "sup", to: :sup
79
+ map_element "tt", to: :tt
80
+ map_element "bold", to: :bold
81
+ map_element "a", to: :a
82
+ map_element "p", to: :p
83
+ map_element "ul", to: :ul
84
+ map_element "ol", to: :ol
85
+ map_element "dl", to: :dl
86
+ map_element "screen", to: :screen
87
+ map_element "note", to: :note
88
+ map_element "example", to: :example
89
+ map_element "eqn", to: :eqn
90
+ map_element "bigeqn", to: :bigeqn
91
+ map_element "figure", to: :figure
92
+ map_element "table", to: :table
93
+ end
94
+ end
95
+ end
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,98 @@
1
+ require "shale"
2
+
3
+ require_relative "a"
4
+ require_relative "b"
5
+ require_relative "bigeqn"
6
+ require_relative "bold"
7
+ require_relative "bom_ref"
8
+ require_relative "dl"
9
+ require_relative "eqn"
10
+ require_relative "example"
11
+ require_relative "express_extref"
12
+ require_relative "express_ref"
13
+ require_relative "figure"
14
+ require_relative "i"
15
+ require_relative "module_ref"
16
+ require_relative "note"
17
+ require_relative "ol"
18
+ require_relative "p"
19
+ require_relative "screen"
20
+ require_relative "sub"
21
+ require_relative "sup"
22
+ require_relative "table"
23
+ require_relative "tt"
24
+ require_relative "ul"
25
+
26
+ module Stepmod
27
+ module Utils
28
+ module Parsers
29
+ module Models
30
+ class Th < Shale::Mapper
31
+ attribute :content, Shale::Type::String
32
+ attribute :rowspan, Shale::Type::String
33
+ attribute :colspan, Shale::Type::String
34
+ attribute :align, Shale::Type::String
35
+ attribute :valign, Shale::Type::String
36
+ attribute :width, Shale::Type::String
37
+ attribute :height, Shale::Type::String
38
+ attribute :express_ref, ExpressRef, collection: true
39
+ attribute :express_extref, ExpressExtref, collection: true
40
+ attribute :module_ref, ModuleRef, collection: true
41
+ attribute :bom_ref, BomRef, collection: true
42
+ attribute :i, Italic, collection: true
43
+ attribute :b, B, collection: true
44
+ attribute :sub, Sub, collection: true
45
+ attribute :sup, Sup, collection: true
46
+ attribute :tt, Tt, collection: true
47
+ attribute :bold, Bold, collection: true
48
+ attribute :a, A, collection: true
49
+ attribute :p, P, collection: true
50
+ attribute :ul, Ul, collection: true
51
+ attribute :ol, Ol, collection: true
52
+ attribute :dl, Dl, collection: true
53
+ attribute :screen, Screen, collection: true
54
+ attribute :note, Note, collection: true
55
+ attribute :example, Example, collection: true
56
+ attribute :eqn, Eqn, collection: true
57
+ attribute :bigeqn, Bigeqn, collection: true
58
+ attribute :figure, Figure, collection: true
59
+ attribute :table, Table, collection: true
60
+
61
+ xml do
62
+ root "th"
63
+
64
+ map_content to: :content
65
+ map_attribute "rowspan", to: :rowspan
66
+ map_attribute "colspan", to: :colspan
67
+ map_attribute "align", to: :align
68
+ map_attribute "valign", to: :valign
69
+ map_attribute "width", to: :width
70
+ map_attribute "height", to: :height
71
+ map_element "express_ref", to: :express_ref
72
+ map_element "express_extref", to: :express_extref
73
+ map_element "module_ref", to: :module_ref
74
+ map_element "bom_ref", to: :bom_ref
75
+ map_element "i", to: :i
76
+ map_element "b", to: :b
77
+ map_element "sub", to: :sub
78
+ map_element "sup", to: :sup
79
+ map_element "tt", to: :tt
80
+ map_element "bold", to: :bold
81
+ map_element "a", to: :a
82
+ map_element "p", to: :p
83
+ map_element "ul", to: :ul
84
+ map_element "ol", to: :ol
85
+ map_element "dl", to: :dl
86
+ map_element "screen", to: :screen
87
+ map_element "note", to: :note
88
+ map_element "example", to: :example
89
+ map_element "eqn", to: :eqn
90
+ map_element "bigeqn", to: :bigeqn
91
+ map_element "figure", to: :figure
92
+ map_element "table", to: :table
93
+ end
94
+ end
95
+ end
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,53 @@
1
+ require "shale"
2
+
3
+ require_relative "a"
4
+ require_relative "b"
5
+ require_relative "bold"
6
+ require_relative "bom_ref"
7
+ require_relative "express_extref"
8
+ require_relative "express_ref"
9
+ require_relative "i"
10
+ require_relative "module_ref"
11
+ require_relative "sub"
12
+ require_relative "sup"
13
+ require_relative "tt"
14
+
15
+ module Stepmod
16
+ module Utils
17
+ module Parsers
18
+ module Models
19
+ class Title < Shale::Mapper
20
+ attribute :content, Shale::Type::String
21
+ attribute :express_ref, ExpressRef, collection: true
22
+ attribute :express_extref, ExpressExtref, collection: true
23
+ attribute :module_ref, ModuleRef, collection: true
24
+ attribute :bom_ref, BomRef, collection: true
25
+ attribute :i, Italic, collection: true
26
+ attribute :b, B, collection: true
27
+ attribute :sub, Sub, collection: true
28
+ attribute :sup, Sup, collection: true
29
+ attribute :tt, Tt, collection: true
30
+ attribute :bold, Bold, collection: true
31
+ attribute :a, A, collection: true
32
+
33
+ xml do
34
+ root "title"
35
+
36
+ map_content to: :content
37
+ map_element "express_ref", to: :express_ref
38
+ map_element "express_extref", to: :express_extref
39
+ map_element "module_ref", to: :module_ref
40
+ map_element "bom_ref", to: :bom_ref
41
+ map_element "i", to: :i
42
+ map_element "b", to: :b
43
+ map_element "sub", to: :sub
44
+ map_element "sup", to: :sup
45
+ map_element "tt", to: :tt
46
+ map_element "bold", to: :bold
47
+ map_element "a", to: :a
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,26 @@
1
+ require "shale"
2
+
3
+ require_relative "td"
4
+ require_relative "th"
5
+
6
+ module Stepmod
7
+ module Utils
8
+ module Parsers
9
+ module Models
10
+ class Tr < Shale::Mapper
11
+ attribute :align, Shale::Type::String
12
+ attribute :th, Th, collection: true
13
+ attribute :td, Td, collection: true
14
+
15
+ xml do
16
+ root "tr"
17
+
18
+ map_attribute "align", to: :align
19
+ map_element "th", to: :th
20
+ map_element "td", to: :td
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end