If you feel like building on a RelaxNG validator, the Rexml gem has a partly-built implementation.

https://github.com/ruby/rexml/blob/master/lib/rexml/validation/relaxng.rb

#ruby #opensource

rexml/lib/rexml/validation/relaxng.rb at master · ruby/rexml

REXML is an XML toolkit for Ruby. Contribute to ruby/rexml development by creating an account on GitHub.

GitHub