Class | XSLT::Stylesheet |
In: |
ext/libxslt/ruby_xslt_stylesheet.c
|
Parent: | Object |
The XSLT::Stylesheet represents a XSL stylesheet that can be used to transform an XML document. For usage information refer to XSLT::Stylesheet#apply
Creates a new XSLT stylesheet based on the provided document.
stylesheet_doc = XML::Document.file('stylesheet_file') stylesheet = XSLT::Stylesheet.new(stylesheet_doc)
/* call-seq: * XSLT::Stylesheet.new(document) -> XSLT::Stylesheet * * Creates a new XSLT stylesheet based on the provided document. * * stylesheet_doc = XML::Document.file('stylesheet_file') * stylesheet = XSLT::Stylesheet.new(stylesheet_doc) * */ VALUE ruby_xslt_stylesheet_initialize(VALUE self, VALUE document) {
Apply this stylesheet transformation to the provided document. This method may be invoked multiple times.
Params:
document = An instance of an XML::Document params = An optional hash table that specifies the values
for xsl:param values embedded in the stylesheet.
Example:
stylesheet_doc = XML::Document.file('stylesheet_file') stylesheet = XSLT::Stylesheet.new(stylesheet_doc) xml_doc = XML::Document.file('xml_file') result = stylesheet.apply(xml_doc) result = stylesheet.apply(xml_doc, {:foo => 'bar'})
/* call-seq: * stylesheet.apply(document, {params}) -> XML::Document * * Apply this stylesheet transformation to the provided document. * This method may be invoked multiple times. * * Params: * * document = An instance of an XML::Document * params = An optional hash table that specifies the values * for xsl:param values embedded in the stylesheet. * * Example: * * stylesheet_doc = XML::Document.file('stylesheet_file') * stylesheet = XSLT::Stylesheet.new(stylesheet_doc) * * xml_doc = XML::Document.file('xml_file') * result = stylesheet.apply(xml_doc) * result = stylesheet.apply(xml_doc, {:foo => 'bar'}) */ VALUE ruby_xslt_stylesheet_apply(int argc, VALUE *argv, VALUE self) {