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()
Initialize the class
_init() : void
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
Parameters
$stringXml
string
XML String with literal entities
Returns
string
XML string with numeric entites
Prints the Error message and number
if an error occured
printErrors() : void
Transform the XML data using the XSL and
return the results of the transformation
process() : string
Returns
string
Transformed data
Return the contents of a file if
the passed parameter is a file.
readFromFile(string $file) : string
Parameters
$file
string
File location
Returns
string
File contents
Pass top level parameters to the XSLT processor.
setParam(string $name, string $value) : void
The parameters can be accessed in XSL
with
Parameters
setSchemeHandlers()
setSchemeHandlers($aHandlers)
Set the XML to be Transformed
setXml(string $xml) : void
Parameters
$xml
string
The XML String
Set the XML-File to be Transformed
setXmlFile(string $file) : void
Parameters
$file
string
Location of the XML file
Set the XSLT for the Transformation
setXsl(string $xsl) : void
Parameters
$xsl
string
The XML String
Set the XSL-File for the Transformation
setXslFile(string $file) : void
Parameters
$file
string
Location of the XSL file
Properties