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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rexslt.rb +7 -2
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a33893806342b2a7a9d034f08fed41b7c39d44e9
|
|
4
|
+
data.tar.gz: 4eedf31ade9daef05b50e7cbe3ba870186ee5865
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
metadata.gz.sig
CHANGED
|
Binary file
|