moxml 0.5.159 → 0.5.160

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 824fc75872bed077049fca259a7b667634c2938e4a22c3899d7c898a0a585c98
4
- data.tar.gz: f639f83b2c39247bb825ce017932ada226d9fb8b11ad6567893f1cb00babaa7f
3
+ metadata.gz: 3baac5f598cb14a214bcf65d8f19f7d73d6d70c7f3fc0b53766f07bac4f2d176
4
+ data.tar.gz: 54e53fb3aa363edd679bca122996d5a224bfa58a99e656a35acc59182dd66f45
5
5
  SHA512:
6
- metadata.gz: eca084853becfa0d0dfaa80e88f492f1d4541e32a97aed2480f441db3bd33990d7c0f6ab2879db8aa9fb92216bcc6782afa573384e4126724801f38094a53c99
7
- data.tar.gz: 6429a255c098e7291fd45b0034d23abbe7a3acc1fccbdb9956f1ac2e3002890415388d3e060b1d20869d3783d38f986917e633597b8e05dcd3b3effffc9e7cf6
6
+ metadata.gz: 705c62afbefc4678ad231e380644023416a5e0cf19e94dd59437c0570abca635e4570db661272490ed1f37804230623d9836e5cc2b8e70619bea1cc16f2fe0a6
7
+ data.tar.gz: e40cf23891b36aaca41bb1c62d01b0e7479c5c1c5eada2fa9563f315399d943a170381d5467019e7e956f06940b71aad59db2d19099a545ebf67d7d4603168c8
@@ -39,6 +39,8 @@ Generated by `bundle exec rake docs:coverage` from the coverage matrix and the d
39
39
  | XSLT | equivalent | loud (NotImplementedError) | loud (NotImplementedError) | loud (NotImplementedError) | loud (NotImplementedError) | loud (NotImplementedError) | equivalent
40
40
  | SAX | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent
41
41
  | materialization | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent
42
+ | validation | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent
43
+ | validation under-detections | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent
42
44
  | loud capability contracts | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent
43
45
  |===
44
46
 
@@ -253,6 +253,23 @@ Pins:: `spec/moxml/plan_conformance_spec.rb`
253
253
  matching is global; unmatched subtrees are dropped per the pinned
254
254
  semantics.
255
255
 
256
+ === Validation
257
+
258
+ Pins:: `spec/moxml/xsd_spec.rb`, `spec/moxml/xsd_underdetection_spec.rb`
259
+
260
+ XSD validation through engines that ship a validator (libxml2;
261
+ leptris tier-1: recognized roots, one-level content descent, lexical
262
+ checks). `validate` returns accumulated `ValidationError` entries —
263
+ message always; line/column/path where the engine reports them, nil
264
+ where it does not; `[]` means valid. Documents outside the engine's
265
+ scope validate laxly, except that strict `xs:any` /
266
+ `xs:anyAttribute` wildcard matches and `xsi:nil` are re-checked from
267
+ the schema source on every adapter — the re-check can only
268
+ under-report, never false-report. Unsupported adapters raise
269
+ `Moxml::NotImplementedError` at compile; `Moxml::XSD.supported?`
270
+ answers without raising. RELAX NG rides engines with an RNG face
271
+ (the same shapes).
272
+
256
273
  === Errors and loud degradation
257
274
 
258
275
  Pins:: `spec/consistency/loud_degradation_spec.rb`
data/lib/moxml/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Moxml
4
- VERSION = "0.5.159"
4
+ VERSION = "0.5.160"
5
5
  end
data/lib/moxml/xsd.rb CHANGED
@@ -5,7 +5,10 @@ module Moxml
5
5
  # an XSD validator (currently leptris, tier-1: named+typed
6
6
  # top-level elements, one-level content-model descent, lexical
7
7
  # builtin/simpleType checks — see docs/c14n for the sibling
8
- # pattern).
8
+ # pattern). Beside the engine, SchemaRules re-checks strict
9
+ # wildcards and xsi:nil from the schema source on every adapter —
10
+ # engines that miss those shapes stay model-conformant, and
11
+ # engines that already detect them get no duplicate findings.
9
12
  #
10
13
  # ctx = Moxml.new(:leptris)
11
14
  # schema = ctx.xsd(<<~XSD)
@@ -24,7 +27,8 @@ module Moxml
24
27
  # Adapters without an engine raise Moxml::NotImplementedError at
25
28
  # compile; Moxml::XSD.supported?(context) answers without
26
29
  # raising. The tier-1 scope is the engine's: documents outside it
27
- # validate laxly (see the binding's xsd_validate_spec).
30
+ # validate laxly, except for the re-checked shapes above (which
31
+ # can only under-report, never false-report).
28
32
  module XSD
29
33
  SUPPORTED_ADAPTERS = %i[leptris nokogiri].freeze
30
34
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "spec_helper"
4
4
 
5
+ # Processing model §Validation (normative): pinned here.
5
6
  # Moxml::XSD contract (leptris tier-1 faces): compile + validate
6
7
  # with accumulated errors; unsupported adapters raise
7
8
  # NotImplementedError at compile.
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "spec_helper"
4
4
 
5
+ # Processing model §Validation (normative): pinned here.
5
6
  # #452: tier-1 engines can accept, inside their recognized scope,
6
7
  # instances that violate strict wildcards or xsi:nil. The
7
8
  # Ruby-side SchemaRules post-validation closes those gaps from the
@@ -77,6 +77,14 @@ module ModelCoverage
77
77
  section: "Materialization",
78
78
  pin: "spec/moxml/plan_conformance_spec.rb",
79
79
  },
80
+ "validation" => {
81
+ section: "Validation",
82
+ pin: "spec/moxml/xsd_spec.rb",
83
+ },
84
+ "validation under-detections" => {
85
+ section: "Validation",
86
+ pin: "spec/moxml/xsd_underdetection_spec.rb",
87
+ },
80
88
  "loud capability contracts" => {
81
89
  section: "Errors and loud degradation",
82
90
  pin: "spec/consistency/loud_degradation_spec.rb",
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.159
4
+ version: 0.5.160
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.