Skip to content

NoMethodError: undefined method `to_class_builder' for "xsd:anyType":String #19

Open
@dmolesUC

Description

@dmolesUC

I get the error above under Ruby 1.9.3-p551 when I try to follow the README example with the ResourceSync schema. My script:

#! /usr/bin/env ruby
require 'rxsd'
xsd_uri = 'http://www.openarchives.org/rs/0.9.1/resourcesync.xsd'
schema = RXSD::Parser.parse_xsd :uri => xsd_uri
classes = schema.to :ruby_classes

Result:

/Users/dmoles/.rvm/gems/ruby-1.9.3-p551/gems/rxsd-0.5.2/lib/rxsd/xsd/restriction.rb:110:in `to_class_builder': undefined method `to_class_builder' for "xsd:anyType":String (NoMethodError)
    from /Users/dmoles/.rvm/gems/ruby-1.9.3-p551/gems/rxsd-0.5.2/lib/rxsd/xsd/complex_content.rb:67:in `to_class_builder'
    from /Users/dmoles/.rvm/gems/ruby-1.9.3-p551/gems/rxsd-0.5.2/lib/rxsd/xsd/complex_type.rb:83:in `to_class_builder'
    from /Users/dmoles/.rvm/gems/ruby-1.9.3-p551/gems/rxsd-0.5.2/lib/rxsd/xsd/element.rb:135:in `to_class_builder'
    from /Users/dmoles/.rvm/gems/ruby-1.9.3-p551/gems/rxsd-0.5.2/lib/rxsd/xsd/schema.rb:105:in `block in to_class_builders'
    from /Users/dmoles/.rvm/gems/ruby-1.9.3-p551/gems/rxsd-0.5.2/lib/rxsd/xsd/schema.rb:104:in `each'
    from /Users/dmoles/.rvm/gems/ruby-1.9.3-p551/gems/rxsd-0.5.2/lib/rxsd/xsd/schema.rb:104:in `to_class_builders'
    from /Users/dmoles/.rvm/gems/ruby-1.9.3-p551/gems/rxsd-0.5.2/lib/rxsd/translator.rb:44:in `all_class_builders'
    from /Users/dmoles/.rvm/gems/ruby-1.9.3-p551/gems/rxsd-0.5.2/lib/rxsd/translator.rb:54:in `to'
    from ./schema.rb:9:in `<main>'

Possibly related to #6?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions