schematron 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. data/README.md +47 -0
  2. data/bin/stron +1 -1
  3. data/schematron.gemspec +4 -4
  4. metadata +10 -12
  5. data/README +0 -3
data/README.md ADDED
@@ -0,0 +1,47 @@
1
+ ISO Schematron
2
+ ==============
3
+
4
+ Ruby gem for validating XML against schematron schema
5
+
6
+ Uses [ISO Schematron](http://www.schematron.com) version: 2008-07-28
7
+
8
+ Installation
9
+ ------------
10
+ % gem install schematron
11
+ the rubyforge gem is no deprecated. [Use gemcutter](http://gemcutter.org/gems/schematron)
12
+
13
+ Command line example
14
+ -------------------
15
+
16
+ % stron my_schema.stron my_xml_document.xml
17
+
18
+ Ruby API example
19
+ ----------------
20
+
21
+ # overhead
22
+ require "libxml"
23
+ require "schematron"
24
+
25
+ include LibXML
26
+
27
+ # load the schematron xml
28
+ stron_doc = XML::Document.file "/path/to/my_schema.stron"
29
+
30
+ # make a schematron object
31
+ stron = Schematron::Schema.new stron_doc
32
+
33
+ # load the xml document you wish to validate
34
+ xml_doc = XML::Document.file "/path/to/my_xml_document.xml"
35
+
36
+ # validate it
37
+ results = stron.validate xml_doc
38
+
39
+ # print out the results
40
+ stron.validate(instance_doc).each do |error|
41
+ puts "#{error[:line]}: #{error[:message]}"
42
+ end
43
+
44
+ ---
45
+
46
+ Copyright © 2009 Francesco Lazzarino.
47
+ See LICENSE.txt for terms.
data/bin/stron CHANGED
@@ -7,7 +7,7 @@ require 'schematron'
7
7
  include LibXML
8
8
 
9
9
 
10
- puts "Usage: validate [schematron] [instance]" if ARGV.size != 2
10
+ puts "Usage: stron [schematron] [instance doc]" if ARGV.size != 2
11
11
 
12
12
  # use the line numbers
13
13
  XML.default_line_numbers = true
data/schematron.gemspec CHANGED
@@ -1,15 +1,15 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "schematron"
3
- spec.version = '0.1.0'
3
+ spec.version = '0.1.1'
4
4
  spec.summary = "ISO Schematron Validation"
5
5
  spec.email = "flazzarino@gmail.com"
6
- spec.homepage = 'http://github.com/flazz/iso-schematron'
6
+ spec.homepage = 'http://github.com/flazz/schematron'
7
7
  spec.authors = ["Francesco Lazzarino"]
8
- spec.rubyforge_project = 'schematron'
8
+ #spec.rubyforge_project = 'schematron'
9
9
 
10
10
  spec.executables << 'stron'
11
11
 
12
- spec.files = ["Rakefile", "schematron.gemspec", "README", "LICENSE.txt",
12
+ spec.files = ["Rakefile", "schematron.gemspec", "README.md", "LICENSE.txt",
13
13
  "bin/stron",
14
14
  "lib/schematron.rb",
15
15
  "iso_impl/iso_abstract_expand.xsl",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schematron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Lazzarino
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-31 00:00:00 -04:00
12
+ date: 2009-10-29 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -43,7 +43,7 @@ extra_rdoc_files: []
43
43
  files:
44
44
  - Rakefile
45
45
  - schematron.gemspec
46
- - README
46
+ - README.md
47
47
  - LICENSE.txt
48
48
  - bin/stron
49
49
  - lib/schematron.rb
@@ -55,20 +55,18 @@ files:
55
55
  - iso_impl/iso_svrl.xsl
56
56
  - spec/command_spec.rb
57
57
  - spec/feature_requests_spec.rb
58
- - spec/instances
59
- - spec/instances/daitss-sip
60
58
  - spec/instances/daitss-sip/Example1.xml
61
59
  - spec/instances/daitss-sip/Example2.xml
62
- - spec/instances/premis-in-mets
63
60
  - spec/instances/premis-in-mets/bad.xml
64
61
  - spec/instances/premis-in-mets/good.xml
65
- - spec/schema
66
62
  - spec/schema/fda_sip.sch
67
63
  - spec/schema/pim.sch
68
64
  - spec/schema_spec.rb
69
65
  - spec/spec_helper.rb
70
- has_rdoc: false
71
- homepage: http://github.com/flazz/iso-schematron
66
+ has_rdoc: true
67
+ homepage: http://github.com/flazz/schematron
68
+ licenses: []
69
+
72
70
  post_install_message:
73
71
  rdoc_options: []
74
72
 
@@ -88,10 +86,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
86
  version:
89
87
  requirements: []
90
88
 
91
- rubyforge_project: schematron
92
- rubygems_version: 1.3.1
89
+ rubyforge_project:
90
+ rubygems_version: 1.3.5
93
91
  signing_key:
94
- specification_version: 2
92
+ specification_version: 3
95
93
  summary: ISO Schematron Validation
96
94
  test_files: []
97
95
 
data/README DELETED
@@ -1,3 +0,0 @@
1
- Copyright © 2009 Francesco Lazzarino.
2
-
3
- See LICENSE.txt for terms.