Package: XSLT

XSLT

public class XSLT

Return to package list

Version: 1.0
Date: 2001-09-27 11:05:37

Author: John Luxford <lux@simian.ca> <http://www.simian.ca/>

Summary
XSLT is a very minimalistic wrapper around PHP's Sablotron functions.
The benefits in a class such as this are that a) it's Object Oriented,
and b) the Sablotron functions have a big "WARNING: EXPERIMENTAL" in
the documentation, so if one was to code an application using these
method calls as opposed to hard-coding the PHP functions, when the
names change, you simply have to upgrade the class and not your code.

Example
$xslt = new XSLT;

$xmldata = join ('', file ('somefile.xml'));
$xsldata = join ('', file ('stylesheet.xsl'));

if ($newdata = $xslt->process ($xsldata, $xmldata)) {
	echo $newdata;
} else {
	echo $xslt->errno . ': ' . $xslt->error;
}

Properties

public resource $handle

Summary
This is the XSLT processor resource returned by the
xslt_create () function.

Methods

public XSLT () -> void

Summary
Constructor method.

public process (string $xsl_data, string $xml_data) -> string

Summary
Transforms the given XML data and XSL stylesheet and
returns the completed transformation as a string, or returns
zero (0) in case of failure.

public error () -> string

Summary
Returns the current error message.

public errno () -> string

Summary
Returns the current error number.

public free () -> void

Summary
Frees the XSL processor.

Return to Top


This file was created by DocReader, an Open Source class documentation system.
Visit Simian Systems to learn more.