schematronium 0.1.4-java → 0.2.0-java

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 74beaa03afb2404a3160870d78430983bc61622d
4
- data.tar.gz: 56a65d7aaadce1887c8d4055e2578903ae7dafbd
2
+ SHA256:
3
+ metadata.gz: d5cc95bc703f60a8795c0c2747d95a3c04ef5cdba885a2b0b8a7933cdbeffa2f
4
+ data.tar.gz: f1a67bc1782d0cf73d5fe3422af01435e181c4ddc68dd52be7746904d8056d39
5
5
  SHA512:
6
- metadata.gz: 97e89b77ba28e47f438ed80c7b4ea34f61c6d2c5af43610b09f79d8c12c13444d276d7f35ba5fb8ebbd0f125465b8d50f61f41790e10506112dd6c84aace5457
7
- data.tar.gz: b0212f6ef6a938ccab58f9dc142181a36406fb5bc57ea7db8e501f4106cba012b4c612180fbf44ca5a7bf8bc4348b7d58d3cdd4684748a6dd9c2548a07ec7e82
6
+ metadata.gz: 751e9d030217d1ab47749825ff1f996c0e2b3096e1b2badb7c63e1fa554eb93c2901c8a7ac8e75a3f0677c0882c39ec9d454112dbf31e80f00c82d66779c665a
7
+ data.tar.gz: 4a1bb36329324fc42b6fa51b478840557cc05fd5bc3624f37be0d3d6f3c014f3d0c78ee958ca8b7f93a80c46f296a4b95a81ee51db1c11c428b1a7e6be16200c
@@ -63,7 +63,7 @@
63
63
 
64
64
  3. This notice may not be removed or altered from any source distribution.
65
65
  -->
66
- <xslt:stylesheet version="1.0" xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
66
+ <xslt:stylesheet version="2.0" xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
67
67
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
68
68
  xmlns:iso="http://purl.oclc.org/dsdl/schematron"
69
69
  xmlns:nvdl="http://purl.oclc.org/dsdl/nvdl"
@@ -294,4 +294,4 @@
294
294
 
295
295
 
296
296
 
297
- </xslt:stylesheet>
297
+ </xslt:stylesheet>
@@ -101,7 +101,7 @@
101
101
 
102
102
  3. This notice may not be removed or altered from any source distribution.
103
103
  -->
104
- <xslt:stylesheet version="1.0"
104
+ <xslt:stylesheet version="2.0"
105
105
  xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
106
106
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
107
107
  xmlns:iso="http://purl.oclc.org/dsdl/schematron"
@@ -1505,4 +1505,4 @@
1505
1505
 
1506
1506
 
1507
1507
 
1508
- </xslt:stylesheet>
1508
+ </xslt:stylesheet>
@@ -139,7 +139,7 @@
139
139
  -->
140
140
 
141
141
  <xsl:stylesheet
142
- version="1.0"
142
+ version="2.0"
143
143
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
144
144
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
145
145
  xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias"
data/lib/schematronium.rb CHANGED
@@ -39,10 +39,15 @@ class Schematronium
39
39
  # Run schematron over xml document, returning the resulting XML
40
40
  #
41
41
  # @param [Saxon::XML::Document, IO, File] xml An XML document
42
+ # @param [Boolean] nokogiri Whether to process with Nokogiri or return Saxon::XML doc
42
43
  # @return [Nokogiri::XML::Document]
43
- def check(xml)
44
+ def check(xml, nokogiri: true)
44
45
  xml = Saxon.XML(xml) unless xml.is_a? Saxon::XML::Document
45
- xml = Nokogiri::XML(@sch_script.transform(xml).to_s)
46
+ xml = @sch_script.transform(xml)
47
+ if nokogiri
48
+ xml = Nokogiri::XML(xml.to_s)
49
+ end
50
+ xml
46
51
  end
47
52
 
48
53
  private
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'schematronium'
3
- gem.version = '0.1.4'
3
+ gem.version = '0.2.0'
4
4
  gem.date = '2015-07-27'
5
5
  gem.summary = 'Tool for running schematron against XML strings/files'
6
6
  gem.description = 'Wraps the saxon-xslt wrapper for Saxon 9 HE, providing a simple (one function) interface for running a schematron against an XML string or file'
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.license = 'GPLv3'
18
18
 
19
19
  # Runtime dependencies
20
- gem.add_runtime_dependency "saxon-xslt", '~> 0.7'
20
+ gem.add_runtime_dependency "saxon-xslt", '~> 0.8'
21
21
  gem.add_runtime_dependency "nokogiri", '~> 1.6'
22
22
 
23
23
  gem.add_development_dependency "rake", '~> 10.4'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schematronium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: java
6
6
  authors:
7
7
  - Dave Mayo
@@ -13,21 +13,21 @@ dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - ~>
16
+ - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '0.7'
18
+ version: '0.8'
19
19
  name: saxon-xslt
20
20
  prerelease: false
21
21
  type: :runtime
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.7'
26
+ version: '0.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - ~>
30
+ - - "~>"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '1.6'
33
33
  name: nokogiri
@@ -35,13 +35,13 @@ dependencies:
35
35
  type: :runtime
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.6'
41
41
  - !ruby/object:Gem::Dependency
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ~>
44
+ - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '10.4'
47
47
  name: rake
@@ -49,13 +49,13 @@ dependencies:
49
49
  type: :development
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - '>='
58
+ - - ">="
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  name: minitest
@@ -63,19 +63,20 @@ dependencies:
63
63
  type: :development
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: Wraps the saxon-xslt wrapper for Saxon 9 HE, providing a simple (one function) interface for running a schematron against an XML string or file
69
+ description: Wraps the saxon-xslt wrapper for Saxon 9 HE, providing a simple (one
70
+ function) interface for running a schematron against an XML string or file
70
71
  email: dave_mayo@harvard.edu
71
72
  executables:
72
73
  - schematronium
73
74
  extensions: []
74
75
  extra_rdoc_files: []
75
76
  files:
76
- - .gitignore
77
- - .ruby-version
78
- - .travis.yml
77
+ - ".gitignore"
78
+ - ".ruby-version"
79
+ - ".travis.yml"
79
80
  - Gemfile
80
81
  - README.md
81
82
  - Rakefile
@@ -109,17 +110,17 @@ require_paths:
109
110
  - lib
110
111
  required_ruby_version: !ruby/object:Gem::Requirement
111
112
  requirements:
112
- - - '>='
113
+ - - ">="
113
114
  - !ruby/object:Gem::Version
114
115
  version: '0'
115
116
  required_rubygems_version: !ruby/object:Gem::Requirement
116
117
  requirements:
117
- - - '>='
118
+ - - ">="
118
119
  - !ruby/object:Gem::Version
119
120
  version: '0'
120
121
  requirements: []
121
122
  rubyforge_project:
122
- rubygems_version: 2.4.8
123
+ rubygems_version: 2.6.13
123
124
  signing_key:
124
125
  specification_version: 4
125
126
  summary: Tool for running schematron against XML strings/files