Sha256: 21e75203940a9056bc0abf29f174e2dc6df20faac3ea28aa852169cec94049d7
Contents?: true
Size: 1.08 KB
Versions: 2
Compression:
Stored size: 1.08 KB
Contents
ISO Schematron ============== Ruby gem for validating XML against schematron schema Uses [ISO Schematron](http://www.schematron.com) version: 2010-01-25 Installation ------------ % gem install schematron Command line example ------------------- % stron my_schema.stron my_xml_document.xml Ruby API example ---------------- # overhead require "libxml" require "schematron" include LibXML # load the schematron xml stron_doc = XML::Document.file "/path/to/my_schema.stron" # make a schematron object stron = Schematron::Schema.new stron_doc # load the xml document you wish to validate xml_doc = XML::Document.file "/path/to/my_xml_document.xml" # validate it results = stron.validate xml_doc # print out the results stron.validate(instance_doc).each do |error| puts "#{error[:line]}: #{error[:message]}" end --- Copyright © 2009-2010 [Francesco Lazzarino](mailto:flazzarino@gmail.com). Sponsored by [Florida Center for Library Automation](http://www.fcla.edu). See LICENSE.txt for terms.
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
schematron-1.1.1 | README.md |
schematron-1.0.0 | README.md |