PHP: XML/XSL

From: Date: Tue, 27 Aug 2002 06:52:28 +0000
Subject: PHP: XML/XSL
Groups: php.general 
Request: Send a blank email to php-general+get-114223@lists.php.net to get a copy of this message
Hi everybody, I'm using Sablotron to transform XML with XSL and this is the PHP file: <?PHP $strXhtml = "<?xml version=\"1.0\"?>\n"; $strXhtml = $strXhtml . "<html><body>\n"; $strXhtml = $strXhtml . "<p><b><font color=\"#800080 \">Balance:</font></b></p>\n"; $strXhtml = $strXhtml . "<p align=\"left\"><input type=\"text\" name=\"balanceText\" size=\"20\" value=\"200$\"/></p>\n"; $strXhtml = $strXhtml ."</body></html>"; //echo(trim($strXhtml)); include("XSLTransformer.php"); $xml=$strXhtml; $xsl="testing.xsl"; $transform = new XSLTransformer(); if($transform->setXsl($xsl)) { if($transform->setXmlString($xml)) { $transform->transform(); if ($transform->getError() == 0) { echo $transform->getOutput(); } else { echo "<p>Error transforming ",$xml,".</p>\n"; } } else { echo "<p>",$xml,": ",$transform->getError(),"</p>\n"; } $transform->destroy(); } ?> I'm getting the following warning although I'm sure that if I applied XSL to the XML file without php, it's working. Plz can u help me and tell me what could be the problem? Warning: xslt_process(): supplied argument is not a valid XSLT Processor resource in /home/alia/public_html/XHTML/XSLTransformer.php on line 69 Thx a lot

« previous php.general (#114223) next »