xslt_output_begintransform

(PHP 4 >= 4.0.3)

xslt_output_begintransform -- Begin an XSLT transformation on the output

Description

void xslt_output_begintransform (string xslt_filename)

Warning

This function is EXPERIMENTAL. That means, that the behaviour of this function, this function name, in concreto ANYTHING documented here can change in a future release of PHP WITHOUT NOTICE. Be warned, and use this function at your own risk.

This function will begin the output transformation on your data. From the point you call xslt_output_begintransform() till the point you call xslt_output_endtransform() all output will be transformed through the xslt stylesheet given by the first argument.

Note: This function does not currently support nested output transformations.

Example 1. Transforming output through an XSLT stylesheet, using the DOM-XML functions for xml generation


<?php

$xsl_file = "article.xsl";
xslt_output_begintransform($xsl_file);

$doc = new_xmldoc('1.0');
$article = $doc->new_root('article');

$article->new_child('title', 'The History of South Tyrol');
$article->new_child('author', 'Sterling Hughes');
$article->new_child('body', 'Back after WWI, Italy gained South Tyrol from 
                             Austria.  Since that point nothing interesting has
                             happened');

echo $doc->dumpmem();

xslt_output_endtransform();