PHP XSLT Functions

EditRocket provides the following information on XSLT functions in the PHP source code builder.

string xslt_backend_info ( void ) - xslt_backend_info() gets information about the compilation settings of the backend.

string xslt_backend_name ( void ) - xslt_backend_name() gets the name of the backend.

string xslt_backend_version ( void ) - xslt_backend_version() gets the version number of Sablotron.

resource xslt_create ( void ) - Create and return a new XSLT processor resource for manipulation by the other XSLT functions.

int xslt_errno ( resource $xh ) - Returns an error code describing the last error that occurred on the passed XSLT processor.

string xslt_error ( resource $xh ) - Returns a string describing the last error that occurred on the passed XSLT processor.

void xslt_free ( resource $xh ) - Free the XSLT processor identified by the given handle.

int xslt_getopt ( resource $processor ) - xslt_getopt() returns the options on the given processor.

mixed xslt_process ( resource $xh , string $xmlcontainer , string $xslcontainer [, string $resultcontainer [, array $arguments [, array $parameters ]]] ) - The xslt_process() function is the crux of the XSLT extension. It allows you to perform an XSLT transformation using almost any type of input source - the containers. This is accomplished through the use of argument buffers -- a concept taken from the Sablotron XSLT processor (currently the only XSLT processor this extension supports). The input containers default to a filename 'containing' the document to be processed.

void xslt_set_base ( resource $xh , string $uri ) - Sets the base URI for all XSLT transformations, the base URI is used with Xpath instructions to resolve document() and other commands which access external resources. It is also used to resolve URIs for the and elements.

void xslt_set_encoding ( resource $xh , string $encoding ) - Set the output encoding for the XSLT transformations. When using the Sablotron backend, this option is only available when you compile Sablotron with encoding support.

void xslt_set_error_handler ( resource $xh , mixed $handler ) - Set an error handler function for the XSLT processor given by xh, this function will be called whenever an error occurs in the XSLT transformation (this function is also called for notices).

void xslt_set_log ( resource $xh [, mixed $log ] ) - This function allows you to set the file in which you want XSLT log messages to, XSLT log messages are different than error messages, in that log messages are not actually error messages but rather messages related to the state of the XSLT processor. They are useful for debugging XSLT, when something goes wrong.

bool xslt_set_object ( resource $processor , object &$obj ) - This function allows to use the processor inside an object and to resolve all callback functions in it.

void xslt_set_sax_handler ( resource $xh , array $handlers ) - Set SAX handlers on the resource handle given by xh.

void xslt_set_sax_handlers ( resource $processor , array $handlers ) - xslt_set_sax_handlers() registers the SAX handlers for the document, given a XSLT processor resource.

void xslt_set_scheme_handler ( resource $xh , array $handlers ) - Set Scheme handlers on the resource handle given by xh.

mixed xslt_setopt ( resource $processor , int $newmask ) - xslt_setopt() sets the options specified by newmask on the given processor.