Sha256: ff840d6f373a68eec1bc893a748e73479cc696da7cbd790aa5c15c287e5344f7

Contents?: true

Size: 1.28 KB

Versions: 3

Compression:

Stored size: 1.28 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-nokogiri

Command line example
-------------------

    % stron-nokogiri my_schema.stron my_xml_document.xml

Ruby API example
----------------

    # overhead
    require "nokogiri"
    require "schematron"
      
    # load the schematron xml
    stron_doc = Nokogiri::XML File.open "/path/to/my_schema.stron"
    
    # make a schematron object
    stron = SchematronNokogiri::Schema.new stron_doc
    
    # load the xml document you wish to validate
    xml_doc = Nokogiri::XML File.open "/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
    
---
This gem replaces the libxml and libxslt-ruby with Nokogiri in the gem https://github.com/flazz/schematron
The replacement was done by Alexandru Szasz at https://github.com/alexxed/schematron
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

3 entries across 3 versions & 1 rubygems

Version Path
schematron-nokogiri-0.0.3 README.md
schematron-nokogiri-0.0.2 README.md
schematron-nokogiri-0.0.1 README.md