contenido\classes\class.xsltprocessor.php
Description: XSLT_Processor class
Requirements:
- Author
- Jan Lengowski
- Con_php_req
- 5.0
- Copyright
- four for business AG
- License
- http://www.contenido.org/license/LIZENZ.txt
- Link
- http://www.4fb.de
- Link
- http://www.contenido.org
- Package
- 4fb_XML
- Since
- file available since contenido release <= 4.6 {@internal created unknown modified 2008-06-30, Dominik Ziegler, add security fix $Id: class.xsltprocessor.php 387 2008-06-30 10:01:05Z timo.trautmann $: }}
- Version
- 1.0.0
\XsltProcessor
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();
Properties


array $arguments = array()
array()
Details- Type
- array
- Access
- private


array $parameters = array()
array()
Details- Type
- array
- Access
- private


string $result = ""
""
Details- Type
- string
- Access
- private
Methods


literal2NumericEntities(string $stringXml) : string
Translate literal to numeric entities to avoid the 'undefined entity error' that a literal entity would cause.
Name | Type | Description |
---|---|---|
$stringXml | string | XML String with literal entities |
Type | Description |
---|---|
string | XML string with numeric entites |
- Access
- private


process() : string
Transform the XML data using the XSL and return the results of the transformation
Type | Description |
---|---|
string | Transformed data |
- Access
- public


readFromFile(string $file) : string
Return the contents of a file if the passed parameter is a file.
Name | Type | Description |
---|---|---|
$file | string | File location |
Type | Description |
---|---|
string | File contents |
- Access
- private


setParam(string $name, string $value) : void
Pass top level parameters to the XSLT processor.
The parameters can be accessed in XSL
with
Name | Type | Description |
---|---|---|
$name | string | Name |
$value | string | Value |


setXml(string $xml) : void
Set the XML to be Transformed
Name | Type | Description |
---|---|---|
$xml | string | The XML String |
- Access
- public


setXmlFile(string $file) : void
Set the XML-File to be Transformed
Name | Type | Description |
---|---|---|
$file | string | Location of the XML file |
- Access
- public


setXsl(string $xsl) : void
Set the XSLT for the Transformation
Name | Type | Description |
---|---|---|
$xsl | string | The XML String |
- Access
- public