Skip to content
No description or website provided.
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
Gemfile
Gemfile.lock
README
sample_schema.xsd
test_doc.xml
validate_xsd.rb

README

Ruby 1.9.2
==========

# Display Ruby version
scotts-macbook-pro:nokogiri-java-bug-report scott$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]

# Run script: Load XML doc, load XSD and validate
scotts-macbook-pro:nokogiri-java-bug-report scott$ ruby validate_xsd.rb

# Result
XSD is valid? : true


JRuby 1.5.5
===========

# Display Ruby version
scotts-macbook-pro:nokogiri-java-bug-report scott$ ruby -v
jruby 1.5.5 (ruby 1.8.7 patchlevel 249) (2010-11-10 4bd4200) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_20) [x86_64-java]

# Run script: Load XML doc, load XSD and validate
scotts-macbook-pro:nokogiri-java-bug-report scott$ jruby -S validate_xsd.rb 

# Result
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
/Users/scott/.rvm/gems/jruby-1.5.5/gems/nokogiri-1.5.0.beta.2-java/lib/nokogiri/xml/schema.rb:46:in `validate': Could not parse document: cos-element-consistent: Error for type '#AnonType_customer_addresses'. Multiple elements with name 'address_type', with different types, appear in the model group. (RuntimeError)
  from /Users/scott/.rvm/gems/jruby-1.5.5/gems/nokogiri-1.5.0.beta.2-java/lib/nokogiri/xml/schema.rb:53:in `valid?'
    from validate_xsd.rb:12
    scotts-macbook-pro:nokogiri-java-bug-report scott$ 

Something went wrong with that request. Please try again.