note 75054 added to function.xslt-process

From: Date: Thu, 10 May 2007 09:18:55 +0000
Subject: note 75054 added to function.xslt-process
Groups: php.notes 
Request: Send a blank email to php-notes+get-126380@lists.php.net to get a copy of this message
i used <?php // $xml and $xsl contain the XML and XSL data $xml = 'tablets.xml'; $xsl = 'tablets.xsl'; $resultdoc = 'result.html'; $arguments = array( '/_xml' => $xml, '/_xsl' => $xsl ); // Allocate a new XSLT processor $xh = xslt_create(); $filebase = 'file://' . getcwd () . '/'; xslt_set_base($xh,$filebase); // Process the document //$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments); $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments); echo(xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments)); if ($result) { echo "SUCCESS, sample.xml was transformed by sample.xsl into the \$result"; echo " variable, the \$result variable has the following contents\n<br />\n"; echo "<pre>\n"; echo $result; echo "</pre>\n"; } else { echo "Sorry, sample.xml could not be transformed by sample.xsl into"; echo " the \$result variable the reason is that " . xslt_error($xh); echo " and the error code is " . xslt_errno($xh); } xslt_free($xh); ?><a href="test/<?=$resultdoc?>">The result document</a><? ?> and i get this error : Warning: Sablotron error on line 1: XML parser error 2: syntax error in D:\robert\XMLtest\test.php on line 21 Does anybody can help me? ---- Server IP: 69.147.83.197 Probable Submitter: 86.121.48.172 ---- Manual Page -- http://www.php.net/manual/en/function.xslt-process.php Edit -- https://master.php.net/note/edit/75054 Del: integrated -- https://master.php.net/note/delete/75054/integrated Del: useless -- https://master.php.net/note/delete/75054/useless Del: bad code -- https://master.php.net/note/delete/75054/bad+code Del: spam -- https://master.php.net/note/delete/75054/spam Del: non-english -- https://master.php.net/note/delete/75054/non-english Del: in docs -- https://master.php.net/note/delete/75054/in+docs Del: other reasons-- https://master.php.net/note/delete/75054 Reject -- https://master.php.net/note/reject/75054 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#126380) next »