rexslt 0.5.9 → 0.5.10

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
2
  SHA1:
3
- metadata.gz: b8efb63a73f6e44cc0bba3a83df21d8049c4652e
4
- data.tar.gz: f6df4f89457e9b1f38aaaa006c9de44a0af1e2d6
3
+ metadata.gz: a33893806342b2a7a9d034f08fed41b7c39d44e9
4
+ data.tar.gz: 4eedf31ade9daef05b50e7cbe3ba870186ee5865
5
5
  SHA512:
6
- metadata.gz: 6b2f105524b555d7f6e9814187b0228208aa24c75fabfdc4c8b274feea6d038642ca9cc1d417815c2f3638ef7cea70a69dc55f53a6b112ffad944bf6793db13f
7
- data.tar.gz: f1bbb22f70becfaa98021a5e6fb3a785df7dd480bb8b873da5d16930ea251c28657cac639415aa145dd11269b409c36a5013a096eb052e7d721066f693f4d538
6
+ metadata.gz: 4c2776e2e4e9773fc000e8284303868e52e1114d7056664126a976e7af570ca2d6b5b859965f5951fb0c8ad86df678e9d3493cab9ae2f12dbf9a7005c5f9540b
7
+ data.tar.gz: 266a5221da2e4fd4558acfc96b9a1e5d37ddd046e0d5844b494ee90bb1b4e2fb6f4749600179a111570329455f863dff406492d07a95bea130b835c6b8659671
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/rexslt.rb CHANGED
@@ -41,13 +41,14 @@ class Rexslt
41
41
 
42
42
 
43
43
  super()
44
+ @options = {}
44
45
  custom_params = params.inject({}){|r,x| r.merge(Hash[x[0].to_s,x[1]])}
45
46
 
46
47
  xslt_transform(*[xsl, xml].map{|x| RXFHelper.read(x).first}, custom_params)
47
48
  end
48
49
 
49
- def to_s(options={})
50
- @doc.to_s(options).sub('<root>','').sub(/<\/root>$/m,'')
50
+ def to_s(options={})
51
+ @doc.to_s(@options.merge(options)).sub('<root>','').sub(/<\/root>$/m,'')
51
52
  end
52
53
 
53
54
  def to_doc(); @doc; end
@@ -503,6 +504,10 @@ class Rexslt
503
504
  end
504
505
 
505
506
  h = @doc_xsl.root.element("xsl:output/attribute::*")
507
+
508
+ if h and h[:method] and h[:method].downcase == 'html' then
509
+ @options[:declaration] = :none
510
+ end
506
511
 
507
512
  @indent = (h and h[:indent] == 'yes') ? true : false
508
513
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rexslt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9
4
+ version: 0.5.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file