moxml 0.5.146 → 0.5.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +35 -0
- data/README.adoc +19 -1
- data/docs/_pages/adapter-compatibility.adoc +7 -0
- data/docs/_pages/divergences.adoc +90 -0
- data/docs/_references/index.adoc +9 -0
- data/docs/_references/processing-model.adoc +211 -0
- data/docs/index.adoc +9 -0
- data/lib/moxml/adapter/leptris.rb +30 -2
- data/lib/moxml/adapter/libxml.rb +5 -0
- data/lib/moxml/adapter/oga.rb +10 -0
- data/lib/moxml/document.rb +9 -0
- data/lib/moxml/version.rb +1 -1
- data/spec/consistency/divergence_register_spec.rb +109 -0
- data/spec/consistency/document_text_spec.rb +30 -0
- data/spec/consistency/eol_normalization_spec.rb +8 -8
- data/spec/consistency/loud_degradation_spec.rb +44 -0
- data/spec/consistency/model_coverage_audit_spec.rb +113 -0
- data/spec/consistency/spec_constant_uniqueness_spec.rb +29 -0
- data/spec/consistency/xpath_idioms_spec.rb +1 -1
- data/spec/moxml/adapter/leptris_detached_text_spec.rb +34 -0
- data/spec/moxml/adapter/leptris_parse_lint_spec.rb +35 -0
- data/spec/moxml/adapter/shared_examples/adapter_contract.rb +3 -3
- data/spec/moxml/c14n/adapter_delegation_spec.rb +3 -3
- data/spec/moxml/c14n/comments_pis_spec.rb +2 -2
- data/spec/moxml/c14n/subset_spec.rb +4 -4
- data/spec/moxml/c14n/w3c_examples_spec.rb +3 -1
- data/spec/moxml/declaration_preservation_spec.rb +2 -2
- data/spec/moxml/element_add_element_spec.rb +3 -3
- data/spec/moxml/element_attribute_pairs_spec.rb +2 -2
- data/spec/moxml/node_spec.rb +1 -1
- data/spec/moxml/plan_conformance_spec.rb +3 -3
- data/spec/moxml/sax_entity_parity_spec.rb +3 -3
- data/spec/moxml/sax_spec.rb +7 -7
- data/spec/moxml/struct_plan_spec.rb +2 -2
- data/spec/moxml/xpath_capabilities_spec.rb +13 -13
- metadata +10 -1
|
@@ -83,7 +83,7 @@ RSpec.describe "XPath Capabilities" do
|
|
|
83
83
|
programming = doc.xpath("//book[@category='programming']")
|
|
84
84
|
expect(programming.length).to be >= 0 # May not work on all
|
|
85
85
|
rescue Moxml::XPathError
|
|
86
|
-
skip "Attribute value predicates not supported on #{adapter_name}"
|
|
86
|
+
skip "D-12: Attribute value predicates not supported on #{adapter_name}"
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
|
|
@@ -98,7 +98,7 @@ RSpec.describe "XPath Capabilities" do
|
|
|
98
98
|
items = doc.xpath("//book:item", namespaces)
|
|
99
99
|
expect(items.length).to be >= 0
|
|
100
100
|
rescue Moxml::XPathError, NoMethodError
|
|
101
|
-
skip "Namespace XPath not supported on #{adapter_name}"
|
|
101
|
+
skip "D-12: Namespace XPath not supported on #{adapter_name}"
|
|
102
102
|
end
|
|
103
103
|
|
|
104
104
|
it "handles default namespaces" do
|
|
@@ -108,7 +108,7 @@ RSpec.describe "XPath Capabilities" do
|
|
|
108
108
|
library = doc.xpath("//lib:library", namespaces)
|
|
109
109
|
expect(library.length).to be >= 0
|
|
110
110
|
rescue Moxml::XPathError, NoMethodError
|
|
111
|
-
skip "Default namespace XPath not supported on #{adapter_name}"
|
|
111
|
+
skip "D-12: Default namespace XPath not supported on #{adapter_name}"
|
|
112
112
|
end
|
|
113
113
|
end
|
|
114
114
|
|
|
@@ -118,7 +118,7 @@ RSpec.describe "XPath Capabilities" do
|
|
|
118
118
|
first_book = doc.xpath("//book[1]")
|
|
119
119
|
expect(first_book.length).to be >= 0
|
|
120
120
|
rescue Moxml::XPathError
|
|
121
|
-
skip "Position predicates not supported on #{adapter_name}"
|
|
121
|
+
skip "D-12: Position predicates not supported on #{adapter_name}"
|
|
122
122
|
end
|
|
123
123
|
|
|
124
124
|
it "supports position() function" do
|
|
@@ -126,7 +126,7 @@ RSpec.describe "XPath Capabilities" do
|
|
|
126
126
|
first_books = doc.xpath("//book[position()=1]")
|
|
127
127
|
expect(first_books.length).to be >= 0
|
|
128
128
|
rescue Moxml::XPathError
|
|
129
|
-
skip "position() function not supported on #{adapter_name}"
|
|
129
|
+
skip "D-12: position() function not supported on #{adapter_name}"
|
|
130
130
|
end
|
|
131
131
|
end
|
|
132
132
|
|
|
@@ -135,11 +135,11 @@ RSpec.describe "XPath Capabilities" do
|
|
|
135
135
|
doc = Moxml.new.parse(simple_xml)
|
|
136
136
|
result = doc.xpath("count(//book)")
|
|
137
137
|
# REXML's XPath has no function support and yields an empty set
|
|
138
|
-
skip "count() function not supported on #{adapter_name}" if result.is_a?(Moxml::NodeSet)
|
|
138
|
+
skip "D-12: count() function not supported on #{adapter_name}" if result.is_a?(Moxml::NodeSet)
|
|
139
139
|
|
|
140
140
|
expect(result).to eq(2)
|
|
141
141
|
rescue Moxml::XPathError, NoMethodError
|
|
142
|
-
skip "count() function not supported on #{adapter_name}"
|
|
142
|
+
skip "D-12: count() function not supported on #{adapter_name}"
|
|
143
143
|
end
|
|
144
144
|
|
|
145
145
|
it "supports text() node selection" do
|
|
@@ -147,7 +147,7 @@ RSpec.describe "XPath Capabilities" do
|
|
|
147
147
|
texts = doc.xpath("//title/text()")
|
|
148
148
|
expect(texts.length).to be >= 0
|
|
149
149
|
rescue Moxml::XPathError
|
|
150
|
-
skip "text() not supported on #{adapter_name}"
|
|
150
|
+
skip "D-12: text() not supported on #{adapter_name}"
|
|
151
151
|
end
|
|
152
152
|
end
|
|
153
153
|
|
|
@@ -157,7 +157,7 @@ RSpec.describe "XPath Capabilities" do
|
|
|
157
157
|
cheap_books = doc.xpath("//book[@id < 2]")
|
|
158
158
|
expect(cheap_books.length).to be >= 0
|
|
159
159
|
rescue Moxml::XPathError
|
|
160
|
-
skip "Numeric predicates not supported on #{adapter_name}"
|
|
160
|
+
skip "D-12: Numeric predicates not supported on #{adapter_name}"
|
|
161
161
|
end
|
|
162
162
|
|
|
163
163
|
it "supports boolean expressions ([cond1 and cond2])" do
|
|
@@ -165,7 +165,7 @@ RSpec.describe "XPath Capabilities" do
|
|
|
165
165
|
result = doc.xpath("//book[@id and @category]")
|
|
166
166
|
expect(result.length).to be >= 0
|
|
167
167
|
rescue Moxml::XPathError
|
|
168
|
-
skip "Boolean expressions not supported on #{adapter_name}"
|
|
168
|
+
skip "D-12: Boolean expressions not supported on #{adapter_name}"
|
|
169
169
|
end
|
|
170
170
|
end
|
|
171
171
|
|
|
@@ -175,7 +175,7 @@ RSpec.describe "XPath Capabilities" do
|
|
|
175
175
|
children = doc.xpath("/library/child::book")
|
|
176
176
|
expect(children.length).to be >= 0
|
|
177
177
|
rescue Moxml::XPathError
|
|
178
|
-
skip "child:: axis not supported on #{adapter_name}"
|
|
178
|
+
skip "D-12: child:: axis not supported on #{adapter_name}"
|
|
179
179
|
end
|
|
180
180
|
|
|
181
181
|
it "supports descendant axis" do
|
|
@@ -183,7 +183,7 @@ RSpec.describe "XPath Capabilities" do
|
|
|
183
183
|
descendants = doc.xpath("//library/descendant::title")
|
|
184
184
|
expect(descendants.length).to be >= 0
|
|
185
185
|
rescue Moxml::XPathError
|
|
186
|
-
skip "descendant:: axis not supported on #{adapter_name}"
|
|
186
|
+
skip "D-12: descendant:: axis not supported on #{adapter_name}"
|
|
187
187
|
end
|
|
188
188
|
end
|
|
189
189
|
|
|
@@ -193,7 +193,7 @@ RSpec.describe "XPath Capabilities" do
|
|
|
193
193
|
items = doc.xpath("//book | //magazine")
|
|
194
194
|
expect(items.length).to be >= 0
|
|
195
195
|
rescue Moxml::XPathError
|
|
196
|
-
skip "Union operator not supported on #{adapter_name}"
|
|
196
|
+
skip "D-12: Union operator not supported on #{adapter_name}"
|
|
197
197
|
end
|
|
198
198
|
end
|
|
199
199
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: moxml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.147
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -73,6 +73,7 @@ files:
|
|
|
73
73
|
- docs/_pages/compatibility.adoc
|
|
74
74
|
- docs/_pages/configuration.adoc
|
|
75
75
|
- docs/_pages/conversion-apis.adoc
|
|
76
|
+
- docs/_pages/divergences.adoc
|
|
76
77
|
- docs/_pages/error-handling.adoc
|
|
77
78
|
- docs/_pages/headed-ox-limitations.adoc
|
|
78
79
|
- docs/_pages/headed-ox.adoc
|
|
@@ -84,6 +85,7 @@ files:
|
|
|
84
85
|
- docs/_pages/thread-safety.adoc
|
|
85
86
|
- docs/_references/document-api.adoc
|
|
86
87
|
- docs/_references/index.adoc
|
|
88
|
+
- docs/_references/processing-model.adoc
|
|
87
89
|
- docs/_tutorials/basic-usage.adoc
|
|
88
90
|
- docs/_tutorials/builder-pattern.adoc
|
|
89
91
|
- docs/_tutorials/index.adoc
|
|
@@ -310,9 +312,14 @@ files:
|
|
|
310
312
|
- sig/moxml.rbs
|
|
311
313
|
- spec/consistency/README.md
|
|
312
314
|
- spec/consistency/adapter_parity_spec.rb
|
|
315
|
+
- spec/consistency/divergence_register_spec.rb
|
|
316
|
+
- spec/consistency/document_text_spec.rb
|
|
313
317
|
- spec/consistency/eol_normalization_spec.rb
|
|
314
318
|
- spec/consistency/html_doctype_spec.rb
|
|
319
|
+
- spec/consistency/loud_degradation_spec.rb
|
|
320
|
+
- spec/consistency/model_coverage_audit_spec.rb
|
|
315
321
|
- spec/consistency/round_trip_spec.rb
|
|
322
|
+
- spec/consistency/spec_constant_uniqueness_spec.rb
|
|
316
323
|
- spec/consistency/xpath_idioms_spec.rb
|
|
317
324
|
- spec/consistency/xslt_spec.rb
|
|
318
325
|
- spec/examples/README.md
|
|
@@ -453,9 +460,11 @@ files:
|
|
|
453
460
|
- spec/moxml/adapter/leptris_attribute_snapshot_spec.rb
|
|
454
461
|
- spec/moxml/adapter/leptris_binding_cap_spec.rb
|
|
455
462
|
- spec/moxml/adapter/leptris_contract_reads_spec.rb
|
|
463
|
+
- spec/moxml/adapter/leptris_detached_text_spec.rb
|
|
456
464
|
- spec/moxml/adapter/leptris_doc_parts_spec.rb
|
|
457
465
|
- spec/moxml/adapter/leptris_document_declaration_spec.rb
|
|
458
466
|
- spec/moxml/adapter/leptris_inbody_comment_spec.rb
|
|
467
|
+
- spec/moxml/adapter/leptris_parse_lint_spec.rb
|
|
459
468
|
- spec/moxml/adapter/leptris_parse_skips_spec.rb
|
|
460
469
|
- spec/moxml/adapter/leptris_record_driver_spec.rb
|
|
461
470
|
- spec/moxml/adapter/leptris_sax_dup_attr_spec.rb
|