D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
td-agent
/
embedded
/
lib
/
ruby
/
gems
/
2.1.0
/
gems
/
nokogiri-1.8.1
/
lib
/
nokogiri
/
xslt
/
Filename :
stylesheet.rb
back
Copy
module Nokogiri module XSLT ### # A Stylesheet represents an XSLT Stylesheet object. Stylesheet creation # is done through Nokogiri.XSLT. Here is an example of transforming # an XML::Document with a Stylesheet: # # doc = Nokogiri::XML(File.read('some_file.xml')) # xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) # # puts xslt.transform(doc) # # See Nokogiri::XSLT::Stylesheet#transform for more transformation # information. class Stylesheet ### # Apply an XSLT stylesheet to an XML::Document. # +params+ is an array of strings used as XSLT parameters. # returns serialized document def apply_to document, params = [] serialize(transform(document, params)) end end end end