Estoy queriendo imprimir un archivo XML como una lista anidada HTML usando XSLT, y por lo que sé que el código es correcto, sin embargo estoy recibiendo este error¿Cómo habilito las funciones XSLT en PHP 5?
Fatal error: Call to undefined function xslt_create()
que supongo que significa que el Las funciones xslt no han sido habilitadas. ¿Cómo habilito estas funciones dentro de PHP? ¿Hay algún archivo php que deba incluir (como la forma en que funcionan las bibliotecas Javascript) o es algo más complicado? Estoy alojado en MediaTemple.
Aquí está el código php que estoy usando:
<?php
// Allocate a new XSLT processor
$xh = xslt_create();
// Process the document, returning the result into the $result variable
$result = xslt_process($xh, 'armstrong.xml', 'familyToNestedList.xsl');
if ($result) {
print "SUCCESS, sample.xml was transformed by sample.xsl into the \$result";
print " variable, the \$result variable has the following contents\n<br>\n";
print "<pre>\n";
print $result;
print "</pre>\n";
}
else {
print "Sorry, sample.xml could not be transformed by sample.xsl into";
print " the \$result variable the reason is that " . xslt_error($xh) .
print " and the error code is " . xslt_errno($xh);
}
xslt_free($xh);
?>
Gracias de antemano!
http://www.php.net/manual/en/xslt.installation.php – DampeS8N