REXML::Validation::RelaxNG

Open
#32 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
tooling

Research direction

Start with REXML::Validation::RelaxNG and reproduce the failure using the supplied openmath2.rng example in Ruby 2.7 and IRB. Inspect relaxng.rb around line 89 and determine why the AnyName constant is unavailable. Done means the schema can be passed to RelaxNG without this NameError and the supported usage is documented.

Written by the indexing model from the issue text.

Description

Let openmath2.rng be the file https://www.openmath.org/standard/om20-2019-07-01/openmath2.rng

If I try to validate using that file, I get the following error:

$ gem list |grep rexml
rexml (default: 3.2.3)
$ ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
$ irb -v
irb 1.2.1 (2019-12-24)
$ irb
irb(main):001:0> require "rexml/validation/relaxng"
=> true
irb(main):002:0> schema = File.new( "openmath2.rng" )
irb(main):003:0> validator = REXML::Validation::RelaxNG.new( schema )
Traceback (most recent call last):
        6: from /usr/bin/irb:23:in `<main>'
        5: from /usr/bin/irb:23:in `load'
        4: from /usr/lib/ruby/gems/2.7.0/gems/irb-1.2.1/exe/irb:11:in `<top (required)>'
        3: from (irb):3
        2: from (irb):3:in `new'
        1: from /usr/lib/ruby/2.7.0/rexml/validation/relaxng.rb:89:in `initialize'
NameError (uninitialized constant REXML::Validation::RelaxNG::AnyName)
irb(main):004:0>

Apart the AnyName, how exactly is used REXML::Validation::RelaxNG ? I didn't find the documentation about it

Dominant language
Ruby
Stars
181
Forks
105
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ruby/rexml

All issues in ruby/rexml

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.