xsd 2.7.1 → 2.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -1
- data/lib/xsd/objects/restriction.rb +12 -2
- data/lib/xsd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9c91e0e5bbb59fb9f8350cfc63af850aaf6aa7bdb7512c3735d297743838075
|
4
|
+
data.tar.gz: 32c0ba7d54f5296ba378bfdc88a2f3f42d7c83c1e7101b9c59fdae1e7d3d72c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ae295c6457d02e0ffbb3bd06e8ad69469f779f9d15694694942e7cd6099d07d3865b8ca77674b94d00ed53bb564ffa73a9e7f32744972ea6393c50e88cd2b4e
|
7
|
+
data.tar.gz: c5b1a9aca305db447abd51117de1fbaee05da4bc3137b08a9f8bf775d3fe33fd56d1a25871a03bfaad41cd476e575bb09aaa4acc14c6c91c21d0cb8e81d72513
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
## [2.7.
|
1
|
+
## [2.7.3] - 2024-04-21
|
2
2
|
|
3
3
|
- Return <xs:any> and <xs:anyAttribute> from collect_elements/collect_attributes
|
4
4
|
- Make multiple_allowed? available on all definitions with max occurs
|
5
|
+
- Don't return duplicated attributes from complex restriction
|
5
6
|
|
6
7
|
## [2.6.3] - 2024-04-13
|
7
8
|
|
@@ -62,8 +62,18 @@ module XSD
|
|
62
62
|
# @param [Boolean] include_base
|
63
63
|
# @return Array<Element>
|
64
64
|
def collect_elements(include_base = false)
|
65
|
-
#
|
66
|
-
|
65
|
+
# Don't include elements from base by default, that will lead to element duplicates because
|
66
|
+
# elements in complex restriction MUST be all listen in restricting type
|
67
|
+
super(include_base)
|
68
|
+
end
|
69
|
+
|
70
|
+
# Get all available attributes on the current stack level, optionally including base type attributes
|
71
|
+
# @param [Boolean] include_base
|
72
|
+
# @return Array<Attribute>
|
73
|
+
def collect_attributes(include_base = true)
|
74
|
+
result = super(include_base)
|
75
|
+
# Filter restricted attributes to avoid duplicates from restricting and restricted type
|
76
|
+
include_base ? result.inject({}) { |hash, item| hash[item.name] = item; hash }.values : result
|
67
77
|
end
|
68
78
|
end
|
69
79
|
end
|
data/lib/xsd/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xsd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- d.arkhipov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|