XSLT_Processor

Wrapper class for the Sablotron XSLT extension

!!! REQUIRES Installed Sablotron to run !!!

Example:

$xslt = new XSLT_Processor;

$xslt->setXmlFile("foo.xml"); $xslt->setXslFile("bar.xslt");

$html = $xslt->process();

deprecated 2011-09-02 this class is not supported any longer

 Methods

Constructor

XsltProcessor() 
access private

Initialize the class

_init() : void
access private

Manual free of the parser

free() : void

Translate literal to numeric entities to avoid the 'undefined entity error' that a literal entity would cause.

literal2NumericEntities(string $stringXml) : string
access private

Parameters

$stringXml

string

XML String with literal entities

Returns

stringXML string with numeric entites

Prints the Error message and number if an error occured

printErrors() : void
access public

Transform the XML data using the XSL and return the results of the transformation

process() : string
access public

Returns

stringTransformed data

Return the contents of a file if the passed parameter is a file.

readFromFile(string $file) : string
access private

Parameters

$file

string

File location

Returns

stringFile contents

Pass top level parameters to the XSLT processor.

setParam(string $name, string $value) : void

The parameters can be accessed in XSL with

Parameters

$name

string

Name

$value

string

Value

setSchemeHandlers()

setSchemeHandlers($aHandlers) 

Parameters

$aHandlers

Set the XML to be Transformed

setXml(string $xml) : void
access public

Parameters

$xml

string

The XML String

Set the XML-File to be Transformed

setXmlFile(string $file) : void
access public

Parameters

$file

string

Location of the XML file

Set the XSLT for the Transformation

setXsl(string $xsl) : void
access public

Parameters

$xsl

string

The XML String

Set the XSL-File for the Transformation

setXslFile(string $file) : void
access public

Parameters

$file

string

Location of the XSL file

 Properties

 

$arguments : array
access private
 

$autofree : bool
access private
 

$errno : int
access private
 

$error : string
access private
 

$parameters : array
access private
 

$processor : object
access private
 

$result : string
access private
 

$xml : string
access private
 

$xslt : string
access private