xsd 2.6.2 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +9 -0
- data/lib/xsd/base_object.rb +12 -3
- data/lib/xsd/objects/any.rb +6 -0
- data/lib/xsd/objects/any_attribute.rb +6 -0
- data/lib/xsd/shared/named.rb +1 -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: 6ec3eb825c36a39f706cd6a684d294b443fa7c59a4e9494ef8b1a6e65f226e5e
|
4
|
+
data.tar.gz: 659b6e95914a0d3a4e04c7b5e17ec54cebbda343b8154b7cd5ff6dd9f2a2ca93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d5dc6738b374642049d316e7213f2b7c83177182cc8aeed164ff7253d8c3a349faf6c46a8781ad1734fa4daa5337462cee769d72bdd7c69d959e18b3ea8605b
|
7
|
+
data.tar.gz: e1d929216f6e9239f5ab82ddaf20558b6e562917e6f1c51c392bd988c699f73af0500f9837fd85c8f76afaccb170f88c6a3ddd723b0be7660e596e1010ef7aa1
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## [2.7.0] - 2024-04-17
|
2
|
+
|
3
|
+
- Return <xs:any> and <xs:anyAttribute> from collect_elements/collect_attributes
|
4
|
+
|
5
|
+
## [2.6.3] - 2024-04-13
|
6
|
+
|
7
|
+
- Fix retrieving documentation for referenced elements
|
8
|
+
- Cache "namespace" call result
|
9
|
+
|
1
10
|
## [2.6.2] - 2024-04-12
|
2
11
|
|
3
12
|
- Get default value for element/attribute "form" property from schema
|
data/lib/xsd/base_object.rb
CHANGED
@@ -189,7 +189,16 @@ module XSD
|
|
189
189
|
# Return element documentation
|
190
190
|
# @return Array<String>
|
191
191
|
def documentation
|
192
|
-
|
192
|
+
@documentation ||= begin
|
193
|
+
docs = documentation_for(node)
|
194
|
+
if docs.any?
|
195
|
+
docs
|
196
|
+
elsif is_a?(Referenced) && referenced?
|
197
|
+
documentation_for(reference.node)
|
198
|
+
else
|
199
|
+
[]
|
200
|
+
end
|
201
|
+
end
|
193
202
|
end
|
194
203
|
|
195
204
|
# Return documentation for specified node
|
@@ -211,7 +220,7 @@ module XSD
|
|
211
220
|
else
|
212
221
|
# map children recursive
|
213
222
|
map_children(:*).map do |obj|
|
214
|
-
if obj.is_a?(Element)
|
223
|
+
if obj.is_a?(Element) || obj.is_a?(Any)
|
215
224
|
obj
|
216
225
|
else
|
217
226
|
# get elements considering references
|
@@ -235,7 +244,7 @@ module XSD
|
|
235
244
|
else
|
236
245
|
# map children recursive
|
237
246
|
map_children(:*).map do |obj|
|
238
|
-
if obj.is_a?(Attribute)
|
247
|
+
if obj.is_a?(Attribute) || obj.is_a?(AnyAttribute)
|
239
248
|
obj
|
240
249
|
else
|
241
250
|
# get attributes considering references
|
data/lib/xsd/objects/any.rb
CHANGED
data/lib/xsd/shared/named.rb
CHANGED
@@ -5,8 +5,7 @@ module XSD
|
|
5
5
|
# Get definition namespace
|
6
6
|
# @return String
|
7
7
|
def namespace
|
8
|
-
|
9
|
-
is_referenced && referenced? ? reference.schema.target_namespace : schema.target_namespace
|
8
|
+
@namespace ||= (is_a?(Referenced) && referenced? ? reference.schema : schema).target_namespace
|
10
9
|
end
|
11
10
|
|
12
11
|
# Get absolute definition name
|
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.
|
4
|
+
version: 2.7.0
|
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-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|