xsd-reader 0.3.0 → 0.4.0

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.
@@ -6,6 +6,9 @@ describe XsdReader do
6
6
  XsdReader::XML.new(:xsd_file => File.expand_path(File.join(File.dirname(__FILE__), 'examples', 'ddex-v36', 'ddex-ern-v36.xsd')))
7
7
  }
8
8
 
9
+ let(:mlc_reader){
10
+ XsdReader::XML.new(:xsd_file => File.expand_path(File.join(File.dirname(__FILE__), 'examples', 'ddex-mlc', 'music-licensing-companies.xsd')))
11
+ }
9
12
  describe XsdReader::XML do
10
13
  it "gives a schema_node" do
11
14
  expect(reader.schema_node.name).to eq 'schema'
@@ -16,6 +19,10 @@ describe XsdReader do
16
19
  expect(reader.schema.class).to eq XsdReader::Schema
17
20
  end
18
21
 
22
+ it "reads referenced schemas which bind the xmlschema namespace to the root namespace instead of xs" do
23
+ expect(mlc_reader['DeclarationOfSoundRecordingRightsClaimMessage'].elements.first.name).to eq 'MessageHeader'
24
+ end
25
+
19
26
  it "gives an elements shortcut to its schema's shortcuts" do
20
27
  expect(reader.elements.map(&:name)).to eq reader.schema.elements.map(&:name)
21
28
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "xsd-reader"
3
- s.version = '0.3.0'
3
+ s.version = '0.4.0'
4
4
  s.files = `git ls-files`.split($/)
5
5
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xsd-reader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark van de Korput
@@ -95,6 +95,8 @@ files:
95
95
  - lib/xsd_reader/xml.rb
96
96
  - spec/attribute_spec.rb
97
97
  - spec/element_spec.rb
98
+ - spec/examples/ddex-mlc/avs.xsd
99
+ - spec/examples/ddex-mlc/music-licensing-companies.xsd
98
100
  - spec/examples/ddex-v32/ddex.xsd
99
101
  - spec/examples/ddex-v32/ddexC.xsd
100
102
  - spec/examples/ddex-v32/ern-main.xsd