- Symphony 2.7.6
-
› assets
14 -
› boot
15 -
› core
24 -
› cryptography
4 -
› data-sources
6 -
› email-gateways
3 -
› events
3 -
› global
61 -
› interface
9 -
› toolkit
60 - Delegates101
- Deprecated28
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public class XsltProcess
class.xsltprocess.php #13The XsltProcess
class is responsible for taking a chunk of XML
and applying an XSLT stylesheet to it. Custom error handlers are
used to capture any errors that occurred during this process, and
are exposed to the ExceptionHandler
's for display to the user.
Methods
void __construct(
$xml, $xsl)
The XsltProcess
constructor takes a two parameters for the
XML and the XSL and initialises the $this->_xml
and $this->_xsl
variables.
If an XSLTProcessor
is not available, this function will return false
Parameters
void __error(
$number, $message, $file, $line, $type)
Writes an error to the $_errors
array, which contains the error information
and some basic debugging information.
Parameters
See Also
array getError(
$all, $rewind)
Provides an Iterator interface to return an error from the $_errors
array. Repeat calls to this function to get all errors
Parameters
Returns
Either an array of error array's or just an error array
boolean isErrors()
Returns boolean if any errors occurred during the transformation.
See Also
static boolean isXSLTProcessorAvailable()
Checks if there is an available XSLTProcessor
Returns
true if there is an existing XsltProcessor
class, false otherwise
string|boolean process(
$xml, $xsl, $parameters, $register_functions)
This function will take a given XML file, a stylesheet and apply
the transformation. Any errors will call the error function to log
them into the $_errors
array
Parameters
Returns
The string of the resulting transform, or false if there was an error
See Also
void trapXMLError(
$errno, $errstr, $errfile, $errline)
A custom error handler especially for XML errors.
See Also
void trapXSDError(
$errno, $errstr, $errfile, $errline)
A custom error handler especially for XSD errors.
See Also
void trapXSLError(
$errno, $errstr, $errfile, $errline)
A custom error handler especially for XSL errors.
See Also
boolean validate(
$xsd, $xml)
That validate function takes an XSD to valid against $this->_xml
returning boolean. Optionally, a second parameter $xml
can be
passed that will be used instead of $this->_xml
.
Parameters
Returns
Returns true if the $xml
validates against $xsd
, false otherwise. If false is returned, the errors can be obtained with XSLTProcess->getErrors()