note 9843 deleted from function.xslt-transform by nlopess

From: Date: Mon, 28 Jun 2004 15:07:34 +0000
Subject: note 9843 deleted from function.xslt-transform by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-72037@lists.php.net to get a copy of this message
Note Submitter: dietricha@subpop.com ---- the syntax for the first example is wrong, and the second sample is a bit misleading. The $xsl and $xml arguments for xslt_transform() are *URI's*, not strings of xml data. using strings of xml data will stop script execution and give this error: Error [code:237] unsupported URI scheme '<?xml version="1.0"?> <xsl'.... here is the sample code from my enhanced version of the XSLTransformer wrapper class (originally by Justin Grant, from an article on phpbuilder.com). my version added support for this function, and is available here: http://www.subpop.com/~dietricha/php_sablot.zip <? include "../classes/class.XSLTransformer.php"; $params = array("display" => "category"); $xslt = new XSLTransformer(); $xslt->setVars('api.xsl','api_domxml.xml',$params); if($xslt->xslt_transform()){ echo $xslt->getOutput(); } else { echo $xslt->getError(); } ?>

« previous php.notes (#72037) next »