Class | Nokogiri::XSLT::Stylesheet
In: | lib/nokogiri/ffi/xslt/stylesheet.rb lib/nokogiri/xslt/stylesheet.rb ext/nokogiri/xslt_stylesheet.c
Parent: | Object

call-seq:

      transform(document, params = [])

Apply an XSLT stylesheet to an XML::Document. `params` is an array of strings used as XSLT parameters. returns Nokogiri::XML::Document

Example:

      doc   = Nokogiri::XML(File.read(ARGV[0]))
      xslt  = Nokogiri::XSLT(File.read(ARGV[1]))
      puts xslt.transform(doc, ['key', 'value'])

### Methods

apply_to parse_stylesheet_doc serialize transform

### Public Class methods

parse_stylesheet_doc(document)

Parse a stylesheet from `document`.

### Public Instance methods

apply_to(document, params = [])

Apply an XSLT stylesheet to an XML::Document. `params` is an array of strings used as XSLT parameters. returns serialized document

serialize(document)

Serialize `document` to an xml string.

transform(document, params = [])

Apply an XSLT stylesheet to an XML::Document. `params` is an array of strings used as XSLT parameters. returns Nokogiri::XML::Document

Example:

      doc   = Nokogiri::XML(File.read(ARGV[0]))
      xslt  = Nokogiri::XSLT(File.read(ARGV[1]))
      puts xslt.transform(doc, ['key', 'value'])

[Validate]