Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/11/2006, 10:23
Avatar de clonn
clonn
 
Fecha de Ingreso: octubre-2006
Mensajes: 21
Antigüedad: 17 años, 6 meses
Puntos: 0
ayuda con XSLTProcessor->transformToXML()

Estoy intentando aplicar una plantilla XSL a un XML y me estoy volviendo loco. Lo pruebo en local utilizando el MAMP y funciona, pero al subirlo a mi servidor recibo siempre un error.

El script:

Código:
<?php

// Load the XML source
$xml = new DOMDocument;
$xml->load('midocumento.xml');

$xsl = new DOMDocument;
$xsl->load('miplantilla.xsl');

// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules

echo $proc->transformToXML($xml);

?>
El error:

Cita:
Warning: domdocument() expects at least 1 parameter, 0 given in /miservidor/test.php on line 4
Fatal error: Call to undefined function: load() in /miservidor/test.php on line 5
Supongo que es una tontería, si alguien me echa un cable estaré agradecido.