xsd 2.6.3 → 2.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1d2b1ea3cf4fb7f11e131e1a7cb9f446682b8be0bb1a38bb90817a9c0ef8717
4
- data.tar.gz: edbb623f773bd0909284728b42e71e8a49d6663159e7382d12cb9229f4057b05
3
+ metadata.gz: a204e10bdaaac5744ae8f38bf10e7d83a030a570134739e71a28db641bc955c3
4
+ data.tar.gz: e61695c62db5a99877b3d87098a42021df2b416a3ee00dfdeac13a8377ccdea8
5
5
  SHA512:
6
- metadata.gz: 0b474c9ac63f1dd09b4b1aef416eee487aeaa84135f12242ba7a9fde520094a42279a738b5ef99e4540b622c35b4dc0b581d1ec3b44fd6a98217022dba1ab66a
7
- data.tar.gz: ea99e743a50f84952b78f2d43463482ab630175c7eafcc92567bb9a35044698a50b2b2d6e92d33f274b07a3b8f6b3d639358d6d4020b8db140350396c3e3e9c2
6
+ metadata.gz: a70c3ac790859ee1d7a649f5ee1ee41b21aacc5fd29d6465a5dd3a113c755856f92f8aafeb937d42e98f57d6f6e3a4e1bb7231a5aeb12e78de8aee66b9cc7cbd
7
+ data.tar.gz: 77ae1a10ed5165d71b065814e5466a00f3831ccda312a7a18d4646f2d0d44b7775570ccade57731e75d51f9016c91c4721084f991692f53c6075949051dc5be9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [2.7.1] - 2024-04-17
2
+
3
+ - Return <xs:any> and <xs:anyAttribute> from collect_elements/collect_attributes
4
+ - Make multiple_allowed? available on all definitions with max occurs
5
+
1
6
  ## [2.6.3] - 2024-04-13
2
7
 
3
8
  - Fix retrieving documentation for referenced elements
@@ -220,7 +220,7 @@ module XSD
220
220
  else
221
221
  # map children recursive
222
222
  map_children(:*).map do |obj|
223
- if obj.is_a?(Element)
223
+ if obj.is_a?(Element) || obj.is_a?(Any)
224
224
  obj
225
225
  else
226
226
  # get elements considering references
@@ -244,7 +244,7 @@ module XSD
244
244
  else
245
245
  # map children recursive
246
246
  map_children(:*).map do |obj|
247
- if obj.is_a?(Attribute)
247
+ if obj.is_a?(Attribute) || obj.is_a?(AnyAttribute)
248
248
  obj
249
249
  else
250
250
  # get attributes considering references
@@ -27,5 +27,11 @@ module XSD
27
27
  # @!attribute process_contents
28
28
  # @return String, nil
29
29
  property :processContents, :string, default: 'strict'
30
+
31
+ # Get virtual element name
32
+ # @return String
33
+ def name
34
+ '#any'
35
+ end
30
36
  end
31
37
  end
@@ -26,5 +26,11 @@ module XSD
26
26
  # @!attribute process_contents
27
27
  # @return String, nil
28
28
  property :processContents, :string, default: 'strict'
29
+
30
+ # Get virtual attribute name
31
+ # @return String
32
+ def name
33
+ '#anyAttribute'
34
+ end
29
35
  end
30
36
  end
@@ -100,12 +100,6 @@ module XSD
100
100
  !required?
101
101
  end
102
102
 
103
- # Determine if element may occur multiple times
104
- # @return Boolean
105
- def multiple_allowed?
106
- computed_max_occurs == :unbounded || computed_max_occurs > 1
107
- end
108
-
109
103
  # Determine if element has complex content
110
104
  # @return Boolean
111
105
  def complex_content?
@@ -42,5 +42,11 @@ module XSD
42
42
  min_occurs
43
43
  end
44
44
  end
45
+
46
+ # Determine if element may occur multiple times
47
+ # @return Boolean
48
+ def multiple_allowed?
49
+ computed_max_occurs == :unbounded || computed_max_occurs > 1
50
+ end
45
51
  end
46
52
  end
data/lib/xsd/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module XSD
4
- VERSION = '2.6.3'
4
+ VERSION = '2.7.1'
5
5
  end
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.6.3
4
+ version: 2.7.1
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-13 00:00:00.000000000 Z
11
+ date: 2024-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder