Skip to content
A ruby gem that wrappers various schematron implementations so they can be easily used in ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
iso-schematron-xslt2
lib
spec
.gitignore
.rspec
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
schematron_wrapper.gemspec

README.md

Schematron-wrapper Build Status

A wrapper around various schematron implementations.

Currently we support: saxon.

Prerequierments

Java should be install in the bin PATH on the target machine.

Usage

# schematron_file - the schematron file content used for validation
# the compilation is time consuming you might consider caching the result
compiled_schematron = Schematron::XSLT2.compile(schematron_file)

# target_xml - a file you will use to validate against
validation_result = Schematron::XSLT2.validate(compiled_schematron, target_xml)

# and finally get the errors
errors = Schematron::XSLT2.get_errors(validation_result)

Check our spec/lib/schematron_spec.rb for a complete example.

Compatibility

Schematron-wrapper is tested against Ruby 2.1.0

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
You can’t perform that action at this time.