rexslt 0.5.14 → 0.5.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74ebd52f673bd7270758857d59ec2ef4fff46c0e
4
- data.tar.gz: 318604f1ffed35693c27ad3cda2f0e47a3591e3d
3
+ metadata.gz: 8d5d054b7c9afc95ea5a2923a2fd9d9629c72052
4
+ data.tar.gz: c8dec6d7efee0004c0d7202cd8cd953a8c942191
5
5
  SHA512:
6
- metadata.gz: 906c59a61bd6c02a7e5c8b5dafbd1c89bd95fd945025a052dd9513ca0adc1afd8798c6ce938c93a60ffcfe255ec1f4b2cd5171ad30c0d52a8f549229e227a6d5
7
- data.tar.gz: 457de1d3f878a3b904d0660831031fc11211657bd1d9fdb34d29f80aa86eecd66d60c1c37e09d79691c725b063377c0161ba0da9f3b1186d21ae4fb96ff1853c
6
+ metadata.gz: a552b4345c5464eeb10185b005a5324572a07196336ba4ebf31a46ef01bc34b39aaaac7438c2d4acf432638e95322b413b40309207a54b44e665165d84d5c3b4
7
+ data.tar.gz: cd95db8717a01f278e8c187c7bdc2ef8f884d396493581e058aa3f34ca93aca36e8bbeeb6b49e371f362abb64267278fcef2333711d9f2f221383bb6c523cfb7
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/rexslt.rb CHANGED
@@ -506,6 +506,7 @@ class Rexslt
506
506
 
507
507
  @doc_xsl = raw_xsl.is_a?(Rexle) ? raw_xsl : Rexle.new(raw_xsl)
508
508
 
509
+
509
510
  filter_out_spaces @doc_xsl.root
510
511
 
511
512
  @doc = Rexle.new '<root></root>'
@@ -551,6 +552,23 @@ class Rexslt
551
552
  # using the 1st template
552
553
  xpath = String.new @templates.to_a[0][0]
553
554
  out = read_node(@templates.to_a[0][-1], doc_xml.element(xpath), @doc.root, indent)
555
+
556
+
557
+ if @doc_xsl.root.element('xsl:output[@method="html"]') then
558
+
559
+ head = @doc.root.element('html/head')
560
+
561
+ if head and not head.element('meta[@content]') then
562
+
563
+ h = {
564
+ :'http-equiv' => "Content-Type",
565
+ content: 'text/html; charset=utf-8'
566
+ }
567
+ meta_element = Rexle::Element.new('meta', attributes: h)
568
+ head.add meta_element
569
+
570
+ end
571
+ end
554
572
 
555
573
  out
556
574
 
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.14
4
+ version: 0.5.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  38j2+6ULVWalsVein3whb7qB6IOvxoSqjz6n7jAKFGHovoXPUqpv5y5Yor23rTrn
32
32
  0YwisIc3UkL30g==
33
33
  -----END CERTIFICATE-----
34
- date: 2016-04-06 00:00:00.000000000 Z
34
+ date: 2016-04-07 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rxfhelper
metadata.gz.sig CHANGED
Binary file