Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix #502. fix #494. Added test for issue #494

  • Loading branch information...
commit 68e1e98bfafd26dfeb783f71202fca323b3fbee0 1 parent 557a633
Shih-gian Lee sglee77 authored jvshahid committed
Showing with 25 additions and 0 deletions.
  1. +25 −0 test/test_xslt_transforms.rb
25 test/test_xslt_transforms.rb
View
@@ -251,4 +251,29 @@ def check_params result_doc, params
assert_equal p.content, params[p.name.intern]
end
end
+
+ def test_non_html_xslt_transform
+ xml = Nokogiri.XML(<<-EOXML)
+ <a>
+ <b>
+ <c>123</c>
+ </b>
+ </a>
+ EOXML
+
+ xsl = Nokogiri.XSLT(<<-EOXSL)
+ <xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:output encoding="UTF-8" indent="yes" method="xml" />
+
+ <xsl:template match="/">
+ <xsl:value-of select="/a" />
+ </xsl:template>
+ </xsl:stylesheet>
+ EOXSL
+
+ result = xsl.transform xml
+ assert !result.html?
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.