reqif 0.1.0 → 0.2.1

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 (118) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +7 -4
  3. data/.rubocop.yml +17 -6
  4. data/.rubocop_todo.yml +63 -0
  5. data/CLAUDE.md +73 -0
  6. data/Gemfile +6 -2
  7. data/README.adoc +61 -1
  8. data/lib/reqif/alternative_id.rb +2 -2
  9. data/lib/reqif/attribute_definition_boolean.rb +5 -4
  10. data/lib/reqif/attribute_definition_date.rb +5 -4
  11. data/lib/reqif/attribute_definition_enumeration.rb +5 -4
  12. data/lib/reqif/attribute_definition_integer.rb +5 -4
  13. data/lib/reqif/attribute_definition_real.rb +5 -4
  14. data/lib/reqif/attribute_definition_string.rb +5 -4
  15. data/lib/reqif/attribute_definition_xhtml.rb +5 -4
  16. data/lib/reqif/attribute_value_boolean.rb +3 -2
  17. data/lib/reqif/attribute_value_date.rb +4 -3
  18. data/lib/reqif/attribute_value_enumeration.rb +3 -2
  19. data/lib/reqif/attribute_value_integer.rb +4 -3
  20. data/lib/reqif/attribute_value_real.rb +4 -3
  21. data/lib/reqif/attribute_value_string.rb +3 -2
  22. data/lib/reqif/attribute_value_xhtml.rb +3 -2
  23. data/lib/reqif/children.rb +3 -2
  24. data/lib/reqif/core_content.rb +3 -2
  25. data/lib/reqif/datatype_definition_boolean.rb +5 -4
  26. data/lib/reqif/datatype_definition_date.rb +5 -4
  27. data/lib/reqif/datatype_definition_enumeration.rb +5 -4
  28. data/lib/reqif/datatype_definition_integer.rb +7 -6
  29. data/lib/reqif/datatype_definition_real.rb +7 -6
  30. data/lib/reqif/datatype_definition_string.rb +5 -4
  31. data/lib/reqif/datatype_definition_xhtml.rb +5 -4
  32. data/lib/reqif/datatypes.rb +23 -12
  33. data/lib/reqif/default_value.rb +4 -3
  34. data/lib/reqif/definition.rb +24 -16
  35. data/lib/reqif/doors/identifier.rb +15 -0
  36. data/lib/reqif/doors/module_definition.rb +23 -0
  37. data/lib/reqif/doors/namespace.rb +10 -0
  38. data/lib/reqif/doors/readonly_attributes.rb +48 -0
  39. data/lib/reqif/doors/rif_definition.rb +26 -0
  40. data/lib/reqif/doors/string_type.rb +12 -0
  41. data/lib/reqif/doors.rb +12 -0
  42. data/lib/reqif/editable_atts.rb +24 -16
  43. data/lib/reqif/embedded_value.rb +4 -3
  44. data/lib/reqif/enum_value.rb +4 -4
  45. data/lib/reqif/high_precision_date_time.rb +52 -0
  46. data/lib/reqif/namespace.rb +16 -0
  47. data/lib/reqif/object.rb +3 -3
  48. data/lib/reqif/properties.rb +2 -2
  49. data/lib/reqif/relation_group.rb +5 -4
  50. data/lib/reqif/relation_group_type.rb +5 -4
  51. data/lib/reqif/req_if.rb +7 -2
  52. data/lib/reqif/req_if_content.rb +3 -2
  53. data/lib/reqif/req_if_header.rb +4 -5
  54. data/lib/reqif/req_if_tool_extension.rb +48 -2
  55. data/lib/reqif/reqif_float.rb +98 -0
  56. data/lib/reqif/reqif_integer.rb +36 -0
  57. data/lib/reqif/source.rb +3 -3
  58. data/lib/reqif/source_specification.rb +3 -3
  59. data/lib/reqif/spec_attributes.rb +25 -13
  60. data/lib/reqif/spec_hierarchy.rb +5 -4
  61. data/lib/reqif/spec_object.rb +5 -4
  62. data/lib/reqif/spec_object_type.rb +5 -4
  63. data/lib/reqif/spec_objects.rb +3 -2
  64. data/lib/reqif/spec_relation.rb +5 -4
  65. data/lib/reqif/spec_relation_groups.rb +2 -2
  66. data/lib/reqif/spec_relation_type.rb +5 -4
  67. data/lib/reqif/spec_relations.rb +3 -3
  68. data/lib/reqif/spec_types.rb +3 -2
  69. data/lib/reqif/specification.rb +5 -4
  70. data/lib/reqif/specification_type.rb +5 -4
  71. data/lib/reqif/specifications.rb +3 -2
  72. data/lib/reqif/specified_values.rb +2 -2
  73. data/lib/reqif/string_type.rb +7 -0
  74. data/lib/reqif/target.rb +3 -3
  75. data/lib/reqif/target_specification.rb +3 -3
  76. data/lib/reqif/the_header.rb +3 -2
  77. data/lib/reqif/tool_extensions.rb +2 -2
  78. data/lib/reqif/type.rb +28 -20
  79. data/lib/reqif/values.rb +8 -5
  80. data/lib/reqif/version.rb +1 -1
  81. data/lib/reqif/xhtml/div.rb +18 -0
  82. data/lib/reqif/xhtml/namespace.rb +10 -0
  83. data/lib/reqif/xhtml/p.rb +18 -0
  84. data/lib/reqif/xhtml/span.rb +18 -0
  85. data/lib/reqif/xhtml.rb +12 -0
  86. data/lib/reqif/xhtml_content.rb +181 -2
  87. data/lib/reqif.rb +70 -14
  88. data/references/driver.xsd +270 -270
  89. data/references/reqif.xsd +892 -892
  90. data/reqif.gemspec +4 -3
  91. data/spec/fixtures/antcc_MAG8000-LTE-FeatureSpecReqBL4.reqif +4299 -0
  92. data/spec/fixtures/ea_example.reqif.xml +236 -0
  93. data/spec/fixtures/eclipse_capella_Sample.xml +177 -0
  94. data/spec/fixtures/eclipse_capella_Sample1.xml +239 -0
  95. data/spec/fixtures/eclipse_capella_Sample2.xml +239 -0
  96. data/spec/fixtures/eclipse_capella_Sample3.xml +304 -0
  97. data/spec/fixtures/eclipse_capella_model1.xml +4080 -0
  98. data/spec/fixtures/eclipse_rmf_sample.reqif +96 -0
  99. data/spec/fixtures/eclipse_rmf_specRelationTest.reqif +110 -0
  100. data/spec/fixtures/polarion_export.xml +70 -0
  101. data/spec/fixtures/strictdoc_01_minimal_reqif_sample.reqif +4 -0
  102. data/spec/fixtures/strictdoc_02_read_reqif_input.reqif +3996 -0
  103. data/spec/fixtures/strictdoc_04_convert_reqif_to_json_sample1_polarion.reqif +197 -0
  104. data/spec/fixtures/strictdoc_04_convert_reqif_to_json_sample2_sdoc.reqif +451 -0
  105. data/spec/fixtures/strictdoc_04_convert_reqif_to_json_sample3_eclipse_rmf.reqif +334 -0
  106. data/spec/fixtures/strictdoc_04_convert_reqif_to_json_sample_polarion_reqifz.reqifz +0 -0
  107. data/spec/reqif/data_types_spec.rb +29 -0
  108. data/spec/reqif/polarion_export_spec.rb +22 -0
  109. data/spec/reqif/req_if_header_spec.rb +31 -0
  110. data/spec/reqif/req_if_spec.rb +43 -0
  111. data/spec/reqif/spec_objects_spec.rb +35 -0
  112. data/spec/reqif/spec_relations_spec.rb +33 -0
  113. data/spec/reqif/spec_types_spec.rb +40 -0
  114. data/spec/reqif/specifications_spec.rb +35 -0
  115. data/spec/reqif/tool_extension_spec.rb +27 -0
  116. data/spec/reqif_spec.rb +56 -0
  117. data/spec/spec_helper.rb +70 -0
  118. metadata +58 -11
data/lib/reqif/type.rb CHANGED
@@ -2,32 +2,40 @@ require "lutaml/model"
2
2
 
3
3
  module Reqif
4
4
  class Type < Lutaml::Model::Serializable
5
- attribute :datatype_definition_boolean_ref, :string
6
- attribute :specification_type_ref, :string
7
- attribute :relation_group_type_ref, :string
8
- attribute :datatype_definition_date_ref, :string
9
- attribute :datatype_definition_enumeration_ref, :string
10
- attribute :datatype_definition_integer_ref, :string
11
- attribute :datatype_definition_real_ref, :string
12
- attribute :datatype_definition_string_ref, :string
13
- attribute :datatype_definition_xhtml_ref, :string
14
- attribute :spec_object_type_ref, :string
15
- attribute :spec_relation_type_ref, :string
5
+ attribute :datatype_definition_boolean_ref, StringType
6
+ attribute :specification_type_ref, StringType
7
+ attribute :relation_group_type_ref, StringType
8
+ attribute :datatype_definition_date_ref, StringType
9
+ attribute :datatype_definition_enumeration_ref, StringType
10
+ attribute :datatype_definition_integer_ref, StringType
11
+ attribute :datatype_definition_real_ref, StringType
12
+ attribute :datatype_definition_string_ref, StringType
13
+ attribute :datatype_definition_xhtml_ref, StringType
14
+ attribute :spec_object_type_ref, StringType
15
+ attribute :spec_relation_type_ref, StringType
16
16
 
17
17
  xml do
18
- root "TYPE"
19
- namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
18
+ element "TYPE"
19
+ namespace Namespace
20
+ ordered
20
21
 
21
22
  # TODO: Only one of these values can be active at the same time
22
- map_element "DATATYPE-DEFINITION-BOOLEAN-REF", to: :datatype_definition_boolean_ref
23
+ map_element "DATATYPE-DEFINITION-BOOLEAN-REF",
24
+ to: :datatype_definition_boolean_ref
23
25
  map_element "SPECIFICATION-TYPE-REF", to: :specification_type_ref
24
26
  map_element "RELATION-GROUP-TYPE-REF", to: :relation_group_type_ref
25
- map_element "DATATYPE-DEFINITION-DATE-REF", to: :datatype_definition_date_ref
26
- map_element "DATATYPE-DEFINITION-ENUMERATION-REF", to: :datatype_definition_enumeration_ref
27
- map_element "DATATYPE-DEFINITION-INTEGER-REF", to: :datatype_definition_integer_ref
28
- map_element "DATATYPE-DEFINITION-REAL-REF", to: :datatype_definition_real_ref
29
- map_element "DATATYPE-DEFINITION-STRING-REF", to: :datatype_definition_string_ref
30
- map_element "DATATYPE-DEFINITION-XHTML-REF", to: :datatype_definition_xhtml_ref
27
+ map_element "DATATYPE-DEFINITION-DATE-REF",
28
+ to: :datatype_definition_date_ref
29
+ map_element "DATATYPE-DEFINITION-ENUMERATION-REF",
30
+ to: :datatype_definition_enumeration_ref
31
+ map_element "DATATYPE-DEFINITION-INTEGER-REF",
32
+ to: :datatype_definition_integer_ref
33
+ map_element "DATATYPE-DEFINITION-REAL-REF",
34
+ to: :datatype_definition_real_ref
35
+ map_element "DATATYPE-DEFINITION-STRING-REF",
36
+ to: :datatype_definition_string_ref
37
+ map_element "DATATYPE-DEFINITION-XHTML-REF",
38
+ to: :datatype_definition_xhtml_ref
31
39
  map_element "SPEC-OBJECT-TYPE-REF", to: :spec_object_type_ref
32
40
  map_element "SPEC-RELATION-TYPE-REF", to: :spec_relation_type_ref
33
41
  end
data/lib/reqif/values.rb CHANGED
@@ -4,21 +4,24 @@ module Reqif
4
4
  class Values < Lutaml::Model::Serializable
5
5
  attribute :attribute_value_boolean, AttributeValueBoolean, collection: true
6
6
  attribute :attribute_value_date, AttributeValueDate, collection: true
7
- attribute :attribute_value_enumeration, AttributeValueEnumeration, collection: true
7
+ attribute :attribute_value_enumeration, AttributeValueEnumeration,
8
+ collection: true
8
9
  attribute :attribute_value_integer, AttributeValueInteger, collection: true
9
10
  attribute :attribute_value_real, AttributeValueReal, collection: true
10
11
  attribute :attribute_value_string, AttributeValueString, collection: true
11
12
  attribute :attribute_value_xhtml, AttributeValueXhtml, collection: true
12
- attribute :enum_value_ref, :string, collection: true
13
+ attribute :enum_value_ref, StringType, collection: true
13
14
 
14
15
  # TODO: if ENUM-VALUE-REF is present, all others cannot be present.
15
16
  xml do
16
- root "VALUES"
17
- namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
17
+ element "VALUES"
18
+ namespace Namespace
19
+ ordered
18
20
 
19
21
  map_element "ATTRIBUTE-VALUE-BOOLEAN", to: :attribute_value_boolean
20
22
  map_element "ATTRIBUTE-VALUE-DATE", to: :attribute_value_date
21
- map_element "ATTRIBUTE-VALUE-ENUMERATION", to: :attribute_value_enumeration
23
+ map_element "ATTRIBUTE-VALUE-ENUMERATION",
24
+ to: :attribute_value_enumeration
22
25
  map_element "ATTRIBUTE-VALUE-INTEGER", to: :attribute_value_integer
23
26
  map_element "ATTRIBUTE-VALUE-REAL", to: :attribute_value_real
24
27
  map_element "ATTRIBUTE-VALUE-STRING", to: :attribute_value_string
data/lib/reqif/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Reqif
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Reqif
6
+ module Xhtml
7
+ class Div < Lutaml::Model::Serializable
8
+ attribute :content, :string
9
+
10
+ xml do
11
+ element "div"
12
+ namespace Namespace
13
+
14
+ map_content to: :content
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,10 @@
1
+ require "lutaml/model"
2
+
3
+ module Reqif
4
+ module Xhtml
5
+ class Namespace < Lutaml::Xml::Namespace
6
+ uri "http://www.w3.org/1999/xhtml"
7
+ prefix_default "xhtml"
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Reqif
6
+ module Xhtml
7
+ class P < Lutaml::Model::Serializable
8
+ attribute :content, :string
9
+
10
+ xml do
11
+ element "p"
12
+ namespace Namespace
13
+
14
+ map_content to: :content
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Reqif
6
+ module Xhtml
7
+ class Span < Lutaml::Model::Serializable
8
+ attribute :content, :string
9
+
10
+ xml do
11
+ element "span"
12
+ namespace Namespace
13
+
14
+ map_content to: :content
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Reqif
6
+ module Xhtml
7
+ autoload :Namespace, "#{__dir__}/xhtml/namespace.rb"
8
+ autoload :Div, "#{__dir__}/xhtml/div.rb"
9
+ autoload :Span, "#{__dir__}/xhtml/span.rb"
10
+ autoload :P, "#{__dir__}/xhtml/p.rb"
11
+ end
12
+ end
@@ -1,10 +1,189 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "lutaml/model"
2
4
 
3
5
  module Reqif
4
6
  class XhtmlContent < Lutaml::Model::Serializable
7
+ # All XHTML block and inline elements that can appear in XHTML-CONTENT
8
+ attribute :div, Hyperlang::Xhtml::Div, collection: true
9
+ attribute :p, Hyperlang::Xhtml::P, collection: true
10
+ attribute :span, Hyperlang::Xhtml::Span, collection: true
11
+ attribute :br, Hyperlang::Xhtml::Br, collection: true
12
+ attribute :strong, Hyperlang::Xhtml::Strong, collection: true
13
+ attribute :em, Hyperlang::Xhtml::Em, collection: true
14
+ attribute :ul, Hyperlang::Xhtml::Ul, collection: true
15
+ attribute :ol, Hyperlang::Xhtml::Ol, collection: true
16
+ attribute :li, Hyperlang::Xhtml::Li, collection: true
17
+ attribute :a, Hyperlang::Xhtml::A, collection: true
18
+ attribute :h1, Hyperlang::Xhtml::H1, collection: true
19
+ attribute :h2, Hyperlang::Xhtml::H2, collection: true
20
+ attribute :h3, Hyperlang::Xhtml::H3, collection: true
21
+ attribute :h4, Hyperlang::Xhtml::H4, collection: true
22
+ attribute :h5, Hyperlang::Xhtml::H5, collection: true
23
+ attribute :h6, Hyperlang::Xhtml::H6, collection: true
24
+ attribute :img, Hyperlang::Xhtml::Img, collection: true
25
+ attribute :blockquote, Hyperlang::Xhtml::Blockquote, collection: true
26
+ attribute :pre, Hyperlang::Xhtml::Pre, collection: true
27
+ attribute :code, Hyperlang::Xhtml::Code, collection: true
28
+ attribute :dl, Hyperlang::Xhtml::Dl, collection: true
29
+ attribute :dt, Hyperlang::Xhtml::Dt, collection: true
30
+ attribute :dd, Hyperlang::Xhtml::Dd, collection: true
31
+ attribute :table, Hyperlang::Xhtml::Table, collection: true
32
+ attribute :tr, Hyperlang::Xhtml::Tr, collection: true
33
+ attribute :th, Hyperlang::Xhtml::Th, collection: true
34
+ attribute :td, Hyperlang::Xhtml::Td, collection: true
35
+ attribute :thead, Hyperlang::Xhtml::Thead, collection: true
36
+ attribute :tbody, Hyperlang::Xhtml::Tbody, collection: true
37
+ attribute :tfoot, Hyperlang::Xhtml::Tfoot, collection: true
38
+ attribute :caption, Hyperlang::Xhtml::Caption, collection: true
39
+ attribute :form, Hyperlang::Xhtml::Form, collection: true
40
+ attribute :input, Hyperlang::Xhtml::Input, collection: true
41
+ attribute :select, Hyperlang::Xhtml::Select, collection: true
42
+ attribute :option, Hyperlang::Xhtml::Option, collection: true
43
+ attribute :textarea, Hyperlang::Xhtml::Textarea, collection: true
44
+ attribute :button, Hyperlang::Xhtml::Button, collection: true
45
+ attribute :label, Hyperlang::Xhtml::Label, collection: true
46
+ attribute :fieldset, Hyperlang::Xhtml::Fieldset, collection: true
47
+ attribute :legend, Hyperlang::Xhtml::Legend, collection: true
48
+ attribute :hr, Hyperlang::Xhtml::Hr, collection: true
49
+ attribute :address, Hyperlang::Xhtml::Address, collection: true
50
+ attribute :b, Hyperlang::Xhtml::B, collection: true
51
+ attribute :i, Hyperlang::Xhtml::I, collection: true
52
+ attribute :u, Hyperlang::Xhtml::U, collection: true
53
+ attribute :s, Hyperlang::Xhtml::S, collection: true
54
+ attribute :strike, Hyperlang::Xhtml::Strike, collection: true
55
+ attribute :big, Hyperlang::Xhtml::Big, collection: true
56
+ attribute :small, Hyperlang::Xhtml::Small, collection: true
57
+ attribute :sub, Hyperlang::Xhtml::Sub, collection: true
58
+ attribute :sup, Hyperlang::Xhtml::Sup, collection: true
59
+ attribute :tt, Hyperlang::Xhtml::Tt, collection: true
60
+ attribute :abbr, Hyperlang::Xhtml::Abbr, collection: true
61
+ attribute :acronym, Hyperlang::Xhtml::Acronym, collection: true
62
+ attribute :cite, Hyperlang::Xhtml::Cite, collection: true
63
+ attribute :code, Hyperlang::Xhtml::Code, collection: true
64
+ attribute :dfn, Hyperlang::Xhtml::Dfn, collection: true
65
+ attribute :kbd, Hyperlang::Xhtml::Kbd, collection: true
66
+ attribute :samp, Hyperlang::Xhtml::Samp, collection: true
67
+ attribute :var, Hyperlang::Xhtml::Var, collection: true
68
+ attribute :q, Hyperlang::Xhtml::Q, collection: true
69
+ attribute :del, Hyperlang::Xhtml::Del, collection: true
70
+ attribute :ins, Hyperlang::Xhtml::Ins, collection: true
71
+ attribute :noscript, Hyperlang::Xhtml::Noscript, collection: true
72
+ attribute :script, Hyperlang::Xhtml::Script, collection: true
73
+ attribute :map, Hyperlang::Xhtml::Map, collection: true
74
+ attribute :area, Hyperlang::Xhtml::Area, collection: true
75
+ attribute :object, Hyperlang::Xhtml::Object, collection: true
76
+ attribute :param, Hyperlang::Xhtml::Param, collection: true
77
+ attribute :col, Hyperlang::Xhtml::Col, collection: true
78
+ attribute :colgroup, Hyperlang::Xhtml::Colgroup, collection: true
79
+ attribute :ruby, Hyperlang::Xhtml::Ruby, collection: true
80
+ attribute :rb, Hyperlang::Xhtml::Rb, collection: true
81
+ attribute :rt, Hyperlang::Xhtml::Rt, collection: true
82
+ attribute :rp, Hyperlang::Xhtml::Rp, collection: true
83
+ attribute :rbc, Hyperlang::Xhtml::Rbc, collection: true
84
+ attribute :rtc, Hyperlang::Xhtml::Rtc, collection: true
85
+ attribute :content, :string, collection: true
5
86
  xml do
6
- root "XHTML-CONTENT"
7
- namespace "http://www.omg.org/spec/ReqIF/20110401/reqif.xsd", "REQIF"
87
+ element "XHTML-CONTENT"
88
+ namespace Namespace
89
+ mixed_content
90
+ map_content to: :content
91
+
92
+ # Block and structural elements
93
+ map_element "div", to: :div
94
+ map_element "p", to: :p
95
+ map_element "h1", to: :h1
96
+ map_element "h2", to: :h2
97
+ map_element "h3", to: :h3
98
+ map_element "h4", to: :h4
99
+ map_element "h5", to: :h5
100
+ map_element "h6", to: :h6
101
+ map_element "blockquote", to: :blockquote
102
+ map_element "pre", to: :pre
103
+ map_element "hr", to: :hr
104
+ map_element "address", to: :address
105
+
106
+ # Lists
107
+ map_element "ul", to: :ul
108
+ map_element "ol", to: :ol
109
+ map_element "li", to: :li
110
+ map_element "dl", to: :dl
111
+ map_element "dt", to: :dt
112
+ map_element "dd", to: :dd
113
+
114
+ # Tables
115
+ map_element "table", to: :table
116
+ map_element "caption", to: :caption
117
+ map_element "thead", to: :thead
118
+ map_element "tbody", to: :tbody
119
+ map_element "tfoot", to: :tfoot
120
+ map_element "tr", to: :tr
121
+ map_element "th", to: :th
122
+ map_element "td", to: :td
123
+ map_element "col", to: :col
124
+ map_element "colgroup", to: :colgroup
125
+
126
+ # Inline text elements
127
+ map_element "span", to: :span
128
+ map_element "br", to: :br
129
+ map_element "strong", to: :strong
130
+ map_element "em", to: :em
131
+ map_element "a", to: :a
132
+ map_element "img", to: :img
133
+ map_element "code", to: :code
134
+ map_element "q", to: :q
135
+ map_element "b", to: :b
136
+ map_element "i", to: :i
137
+ map_element "u", to: :u
138
+ map_element "s", to: :s
139
+ map_element "strike", to: :strike
140
+ map_element "big", to: :big
141
+ map_element "small", to: :small
142
+ map_element "sub", to: :sub
143
+ map_element "sup", to: :sup
144
+ map_element "tt", to: :tt
145
+ map_element "abbr", to: :abbr
146
+ map_element "acronym", to: :acronym
147
+ map_element "cite", to: :cite
148
+ map_element "dfn", to: :dfn
149
+ map_element "kbd", to: :kbd
150
+ map_element "samp", to: :samp
151
+ map_element "var", to: :var
152
+
153
+ # Forms
154
+ map_element "form", to: :form
155
+ map_element "input", to: :input
156
+ map_element "select", to: :select
157
+ map_element "option", to: :option
158
+ map_element "textarea", to: :textarea
159
+ map_element "button", to: :button
160
+ map_element "label", to: :label
161
+ map_element "fieldset", to: :fieldset
162
+ map_element "legend", to: :legend
163
+
164
+ # Edit elements
165
+ map_element "del", to: :del
166
+ map_element "ins", to: :ins
167
+
168
+ # Scripting
169
+ map_element "noscript", to: :noscript
170
+ map_element "script", to: :script
171
+
172
+ # Image map
173
+ map_element "map", to: :map
174
+ map_element "area", to: :area
175
+
176
+ # Object
177
+ map_element "object", to: :object
178
+ map_element "param", to: :param
179
+
180
+ # Ruby
181
+ map_element "ruby", to: :ruby
182
+ map_element "rb", to: :rb
183
+ map_element "rt", to: :rt
184
+ map_element "rp", to: :rp
185
+ map_element "rbc", to: :rbc
186
+ map_element "rtc", to: :rtc
8
187
  end
9
188
  end
10
189
  end
data/lib/reqif.rb CHANGED
@@ -2,21 +2,77 @@
2
2
 
3
3
  require "lutaml/model"
4
4
 
5
- Lutaml::Model::Config.configure do |config|
6
- require "lutaml/model/xml_adapter/nokogiri_adapter"
7
- config.xml_adapter = Lutaml::Model::XmlAdapter::NokogiriAdapter
8
- end
9
-
10
5
  module Reqif
11
6
  class Error < StandardError; end
12
7
 
13
- # Your code goes here...
8
+ autoload :AlternativeId, "reqif/alternative_id.rb"
9
+ autoload :AttributeDefinitionBoolean, "reqif/attribute_definition_boolean.rb"
10
+ autoload :AttributeDefinitionDate, "reqif/attribute_definition_date.rb"
11
+ autoload :AttributeDefinitionEnumeration,
12
+ "reqif/attribute_definition_enumeration.rb"
13
+ autoload :AttributeDefinitionInteger, "reqif/attribute_definition_integer.rb"
14
+ autoload :AttributeDefinitionReal, "reqif/attribute_definition_real.rb"
15
+ autoload :AttributeDefinitionString, "reqif/attribute_definition_string.rb"
16
+ autoload :AttributeDefinitionXhtml, "reqif/attribute_definition_xhtml.rb"
17
+ autoload :AttributeValueBoolean, "reqif/attribute_value_boolean.rb"
18
+ autoload :AttributeValueDate, "reqif/attribute_value_date.rb"
19
+ autoload :AttributeValueEnumeration, "reqif/attribute_value_enumeration.rb"
20
+ autoload :AttributeValueInteger, "reqif/attribute_value_integer.rb"
21
+ autoload :AttributeValueReal, "reqif/attribute_value_real.rb"
22
+ autoload :AttributeValueString, "reqif/attribute_value_string.rb"
23
+ autoload :AttributeValueXhtml, "reqif/attribute_value_xhtml.rb"
24
+ autoload :Children, "reqif/children.rb"
25
+ autoload :CoreContent, "reqif/core_content.rb"
26
+ autoload :DatatypeDefinitionBoolean, "reqif/datatype_definition_boolean.rb"
27
+ autoload :DatatypeDefinitionDate, "reqif/datatype_definition_date.rb"
28
+ autoload :DatatypeDefinitionEnumeration,
29
+ "reqif/datatype_definition_enumeration.rb"
30
+ autoload :DatatypeDefinitionInteger, "reqif/datatype_definition_integer.rb"
31
+ autoload :DatatypeDefinitionReal, "reqif/datatype_definition_real.rb"
32
+ autoload :DatatypeDefinitionString, "reqif/datatype_definition_string.rb"
33
+ autoload :DatatypeDefinitionXhtml, "reqif/datatype_definition_xhtml.rb"
34
+ autoload :Datatypes, "reqif/datatypes.rb"
35
+ autoload :DefaultValue, "reqif/default_value.rb"
36
+ autoload :Definition, "reqif/definition.rb"
37
+ autoload :Doors, "reqif/doors.rb"
38
+ autoload :EditableAtts, "reqif/editable_atts.rb"
39
+ autoload :EmbeddedValue, "reqif/embedded_value.rb"
40
+ autoload :EnumValue, "reqif/enum_value.rb"
41
+ autoload :HighPrecisionDateTime, "reqif/high_precision_date_time.rb"
42
+ autoload :Namespace, "reqif/namespace.rb"
43
+ autoload :Object, "reqif/object.rb"
44
+ autoload :Properties, "reqif/properties.rb"
45
+ autoload :RelationGroup, "reqif/relation_group.rb"
46
+ autoload :RelationGroupType, "reqif/relation_group_type.rb"
47
+ autoload :ReqIf, "reqif/req_if.rb"
48
+ autoload :ReqIfContent, "reqif/req_if_content.rb"
49
+ autoload :ReqIfHeader, "reqif/req_if_header.rb"
50
+ autoload :ReqIfToolExtension, "reqif/req_if_tool_extension.rb"
51
+ autoload :ReqifFloat, "reqif/reqif_float.rb"
52
+ autoload :ReqifInteger, "reqif/reqif_integer.rb"
53
+ autoload :Source, "reqif/source.rb"
54
+ autoload :SourceSpecification, "reqif/source_specification.rb"
55
+ autoload :SpecAttributes, "reqif/spec_attributes.rb"
56
+ autoload :SpecHierarchy, "reqif/spec_hierarchy.rb"
57
+ autoload :SpecObject, "reqif/spec_object.rb"
58
+ autoload :SpecObjectType, "reqif/spec_object_type.rb"
59
+ autoload :SpecObjects, "reqif/spec_objects.rb"
60
+ autoload :SpecRelation, "reqif/spec_relation.rb"
61
+ autoload :SpecRelationGroups, "reqif/spec_relation_groups.rb"
62
+ autoload :SpecRelationType, "reqif/spec_relation_type.rb"
63
+ autoload :SpecRelations, "reqif/spec_relations.rb"
64
+ autoload :SpecTypes, "reqif/spec_types.rb"
65
+ autoload :Specification, "reqif/specification.rb"
66
+ autoload :SpecificationType, "reqif/specification_type.rb"
67
+ autoload :Specifications, "reqif/specifications.rb"
68
+ autoload :SpecifiedValues, "reqif/specified_values.rb"
69
+ autoload :StringType, "reqif/string_type.rb"
70
+ autoload :Target, "reqif/target.rb"
71
+ autoload :TargetSpecification, "reqif/target_specification.rb"
72
+ autoload :TheHeader, "reqif/the_header.rb"
73
+ autoload :ToolExtensions, "reqif/tool_extensions.rb"
74
+ autoload :Type, "reqif/type.rb"
75
+ autoload :Values, "reqif/values.rb"
76
+ autoload :Xhtml, "reqif/xhtml.rb"
77
+ autoload :XhtmlContent, "reqif/xhtml_content.rb"
14
78
  end
15
-
16
- require "zeitwerk"
17
-
18
- loader = Zeitwerk::Loader.for_gem
19
- loader.push_dir(__dir__) #, namespace: Reqif)
20
- loader.ignore("#{__dir__}/reqif.rb")
21
- loader.setup
22
- loader.eager_load