class Nokogiri::XSLT::Stylesheet

See Nokogiri::XSLT::Stylesheet#transform for more information and examples.
xslt.apply_to(doc) # => String
xslt = Nokogiri::XSLT(File.read(‘some_transformer.xslt’))
doc = Nokogiri::XML(File.read(‘some_file.xml’))
or use the #apply_to method, which is a shortcut for ‘serialize(transform(document))`:
xslt.serialize(xslt.transform(doc)) # => String
xslt = Nokogiri::XSLT(File.read(’some_transformer.xslt’))
doc = Nokogiri::XML(File.read(‘some_file.xml’))
cases, please take care to invoke the #serialize method on the result of the transformation:
Many XSLT transformations include serialization behavior to emit a non-XML document. For these
xslt.transform(doc) # => Nokogiri::XML::Document
xslt = Nokogiri::XSLT(File.read(‘some_transformer.xslt’))
doc = Nokogiri::XML(File.read(‘some_file.xml’))
an XML::Document with a Stylesheet:
is done through Nokogiri.XSLT. Here is an example of transforming
A Stylesheet represents an XSLT Stylesheet object. Stylesheet creation
##

def apply_to(document, params = [])

See Nokogiri::XSLT::Stylesheet#transform for more information and examples.

A string containing the serialized result of the transformation.
[Returns]

- +params+ is an array of strings used as XSLT parameters, passed into #transform
- +document+ is an instance of XML::Document to transform
[Parameters]

equivalent to calling #serialize on the result of #transform.
Apply an XSLT stylesheet to an XML::Document and serialize it properly. This method is

apply_to(document, params = []) -> String
:call-seq:
def apply_to(document, params = [])
  serialize(transform(document, params))
end