Sha256: cdbbf0b6b56b6ba5e640c4f95a0d22794a991f86ba7a82156ac6dbe341d5f43c
Contents?: true
Size: 695 Bytes
Versions: 2
Compression:
Stored size: 695 Bytes
Contents
#!/usr/bin/ruby require 'optparse' require 'libxml' require 'schematron' include LibXML puts "Usage: stron [schematron] [instance doc]" if ARGV.size != 2 # use the line numbers XML.default_line_numbers = true # Get sch and xml from command line schema_doc = XML::Document.file ARGV[0] instance_doc = XML::Document.file ARGV[1] stron = Schematron::Schema.new schema_doc stron.validate(instance_doc).each do |error| puts '%s "%s" on line %d: %s' % [ error[:type], error[:name], error[:line], error[:message] ] end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
schematron-0.1.2 | bin/stron |
schematron-0.1.1 | bin/stron |