|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-03-05 17:33 UTC] fabpicca at inwind dot it
the script is very easy taken from the shared documentation
<?php
// Allocate a new XSLT processor
// $xh=xslt_create();
// Process the document
if (xslt_process($xh, 'rubrica.xml', 'trasformatore.xsl', 'result.xml')) {
print "SUCCESS, sample.xml was transformed by sample.xsl into result.xml";
print ", result.xml has the following contents\n<br>\n";
print "<pre>\n";
readfile('result.xml');
print "</pre>\n";
}
else {
print "Sorry, sample.xml could not be transformed by sample.xsl into";
print " result.xml the reason is that " . xslt_error($xh) . " and the ";
print "error code is " . xslt_errno($xh);
}
xslt_free($xh);
?>
the output is
Fatal error: Call to undefined function: xslt_process() in C:\apache\htdocs\webpages\html2xml\converter.php on line 11
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 12:00:01 2025 UTC |
I'm suffering from the same problem using: Win2000 (build 5.00.2195 SP2) PHP 4.3.1 Apache2 My PHP script stops executing when hitting the row containing 'xslt_create()', without saying a word... See code below. I have no problem using the xml parser (expat.dll) and I've moved the contents of the c:\php\dlls folder to my c:\winnt\system32 folder that is in my system PATH, so it should have anything to do with not finding the 'sablot.dll'. Everything besides the XSLT operations seems to work alright for my system. <code> <?php // Create an XSLT processor print "This line will get printed..."; $xsltHandle = xslt_create(); print "This line WILL NOT get printed..."; // Perform the transformation $html = xslt_process($xsltHandle, 'test.xml', 'test.xsl'); // Detect errors if (!$html) die('XSLT processing error: '.xslt_error($xsltHandle)); // Destroy the XSLT processor xslt_free($xsltHandle); // Output the resulting HTML echo $html; ?> </code>