![]() |
# Class: XML::XSLT [ "README", "AUTHORS", "ChangeLog", "xslt.c", nil].each do XML.view_html XML::XSLT.view_html XML::XSLT::TransformationError.view_html XML::XSLT::ParsingError.view_html XML::XSLT::XSLTError.view_html end |

XML::XSLT::extFunction( "round-trip", "test.none", rbObj ) registers an extension function "round-trip" in the namespace "test.none"
when XPath like ex:round-trip(arg) is encountered in the XSLT it will call the method "round_trip" on the rbObj object with the argument arg
[ show source ]
/**
* XML::XSLT::extFunction( "round-trip", "http://test.none", rbObj )
* registers an extension function "round-trip" in the namespace "http://test.none"
*
* when XPath like ex:round-trip(arg) is encountered in the XSLT it will call the method "round_trip" on the rbObj object with the argument arg
*/
VALUE ruby_xslt_define_ext_function( VALUE class, VALUE name, VALUE ns_uri, VALUE method ) {

error_ary = XML::XSLT::errors( )
Return an Array containing all the xml errors
This method is only available if Ruby/XSLT has been configured with —enable-error-handler option
[ show source ]
/**
* error_ary = XML::XSLT::errors( )
*
* Return an Array containing all the xml errors
*
* This method is only available if Ruby/XSLT has been configured with --enable-error-handler option
*/
VALUE rb_xslt_errors(VALUE class) {

oXSLT = XML::XSLT::new()
Create a new XML::XSLT object
[ show source ]
/**
* oXSLT = XML::XSLT::new()
*
* Create a new XML::XSLT object
*/
VALUE ruby_xslt_new( VALUE class ) {

mediaTypeString = oXSLT.mediaType( )
Return the XSL output’s media type
[ show source ]
/**
* mediaTypeString = oXSLT.mediaType( )
*
* Return the XSL output's media type
*/
VALUE ruby_xslt_media_type( VALUE self ) {

oXSLT.parameters={ "key" => "value", "key" => "value", … }
[ show source ]
/**
* oXSLT.parameters={ "key" => "value", "key" => "value", ... }
*/
VALUE ruby_xslt_parameters_set( VALUE self, VALUE parameters ) {

oXSLT.save( "result.xml" )
Save the stylesheet transformation to file
[ show source ]
/**
* oXSLT.save( "result.xml" )
*
* Save the stylesheet transformation to file
*/
VALUE ruby_xslt_save( VALUE self, VALUE xOutFilename ) {

output_string = oXSLT.serve( )
Return the stylesheet transformation
[ show source ]
/**
* output_string = oXSLT.serve( )
*
* Return the stylesheet transformation
*/
VALUE ruby_xslt_serve( VALUE self ) {

string = oXSLT.xml
Return XML, set by XML::XSLT#xml=, as string
[ show source ]
/**
* string = oXSLT.xml
*
* Return XML, set by XML::XSLT#xml=, as string
*/
VALUE ruby_xslt_xml_2str_get( VALUE self ) {

oXSLT.xml=<data|REXML::Document|XML::Smart|file>
Set XML data.
Parameter can be type String, REXML::Document, XML::Smart::Dom or Filename
Examples :
# Parameter as String oXSLT.xml = <<XML <?xml version="1.0" encoding="UTF-8"?> <test>This is a test string</test> XML # Parameter as REXML::Document require 'rexml/document' oXSLT.xml = REXML::Document.new File.open( "test.xml" ) # Parameter as XML::Smart::Dom require 'xml/smart' oXSLT.xml = XML::Smart.open( "test.xml" ) # Parameter as Filename oXSLT.xml = "test.xml"
[ show source ]
/**
* oXSLT.xml=<data|REXML::Document|XML::Smart|file>
*
* Set XML data.
*
* Parameter can be type String, REXML::Document, XML::Smart::Dom or Filename
*
* Examples :
* # Parameter as String
* oXSLT.xml = <<XML
* <?xml version="1.0" encoding="UTF-8"?>
* <test>This is a test string</test>
* XML
*
* # Parameter as REXML::Document
* require 'rexml/document'
* oXSLT.xml = REXML::Document.new File.open( "test.xml" )
*
* # Parameter as XML::Smart::Dom
* require 'xml/smart'
* oXSLT.xml = XML::Smart.open( "test.xml" )
*
* # Parameter as Filename
* oXSLT.xml = "test.xml"
*/
VALUE ruby_xslt_xml_obj_set( VALUE self, VALUE xml_doc_obj ) {

XML::XSLT#xmlfile=<file> is deprecated. Please use XML::XSLT#xml=<file>
[ show source ]
/**
* XML::XSLT#xmlfile=<file> is deprecated. Please use XML::XSLT#xml=<file>
*/
VALUE ruby_xslt_xml_obj_set_d( VALUE self, VALUE xml_doc_obj ) {

object = oXSLT.xmlobject
Return the XML object set by XML::XSLT#xml=
[ show source ]
/**
* object = oXSLT.xmlobject
*
* Return the XML object set by XML::XSLT#xml=
*/
VALUE ruby_xslt_xml_2obj_get( VALUE self ) {

string = oXSLT.xsl
Return XSL, set by XML::XSLT#xsl=, as string
[ show source ]
/**
* string = oXSLT.xsl
*
* Return XSL, set by XML::XSLT#xsl=, as string
*/
VALUE ruby_xslt_xsl_2str_get( VALUE self ) {

oXSLT.xsl=<data|REXML::Document|XML::Smart|file>
Set XSL data.
Parameter can be type String, REXML::Document, XML::Smart::Dom or Filename
Examples :
# Parameter as String
oXSLT.xsl = <<XML
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
</xsl:stylesheet>
XML
# Parameter as REXML::Document
require 'rexml/document'
oXSLT.xsl = REXML::Document.new File.open( "test.xsl" )
# Parameter as XML::Smart::Dom
require 'xml/smart'
oXSLT.xsl = XML::Smart.open( "test.xsl" )
# Parameter as Filename
oXSLT.xsl = "test.xsl"
[ show source ]
/**
* oXSLT.xsl=<data|REXML::Document|XML::Smart|file>
*
* Set XSL data.
*
* Parameter can be type String, REXML::Document, XML::Smart::Dom or Filename
*
* Examples :
* # Parameter as String
* oXSLT.xsl = <<XML
* <?xml version="1.0" ?>
* <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
* <xsl:template match="/">
* <xsl:apply-templates />
* </xsl:template>
* </xsl:stylesheet>
* XML
*
* # Parameter as REXML::Document
* require 'rexml/document'
* oXSLT.xsl = REXML::Document.new File.open( "test.xsl" )
*
* # Parameter as XML::Smart::Dom
* require 'xml/smart'
* oXSLT.xsl = XML::Smart.open( "test.xsl" )
*
* # Parameter as Filename
* oXSLT.xsl = "test.xsl"
*/
VALUE ruby_xslt_xsl_obj_set( VALUE self, VALUE xsl_doc_obj ) {

string = oXSLT.xsl_to_s( )
[ show source ]
/**
* string = oXSLT.xsl_to_s( )
*/
VALUE ruby_xslt_to_s( VALUE self ) {

XML::XSLT#xslfile=<file> is deprecated. Please use XML::XSLT#xsl=<file>
[ show source ]
/**
* XML::XSLT#xslfile=<file> is deprecated. Please use XML::XSLT#xsl=<file>
*/
VALUE ruby_xslt_xsl_obj_set_d( VALUE self, VALUE xsl_doc_obj ) {

object = oXSLT.xslobject
Return the XSL object set by XML::XSLT#xsl=
[ show source ]
/**
* object = oXSLT.xslobject
*
* Return the XSL object set by XML::XSLT#xsl=
*/
VALUE ruby_xslt_xsl_2obj_get( VALUE self ) {