I managed to resolve it, the php-xsl was not installed on my server,
sorry for this.
On Fri, May 20, 2011 at 1:09 PM, Gábor Tóth <roysy(_at_)g0n0z(_dot_)hu> wrote:
Dear All,
I am trying to make an xsl transformation of a DOM object in php, the
stylesheet I am loading is ok, the xml file is also ok, in the
terminal the php works fine, I got the html result, I don´t see any
any error in the log file, however, in the browser the $proc = new
XSLTProcessor(); does not work, I see the echo before it but after
that I don´t see. Here is my code, if it is necessary I can upload
also the stylesheet and the xml file, but since it works fine in the
terminal, the problem should be somewhere else. I searched this
problem on the web, also other people had it, but I could not find any
solution, please let me know if came accross this issue and what
solution helped.
Thanks,
Gabor
<?php
$xslDoc = new DOMDocument();
$xslDoc->load("Transformation2.xsl");
$xmlDoc = new DOMDocument();
$xmlDoc->load("Text.xml");
$xpath = new DOMXPath($xmlDoc);
// We starts from the root element
$query = '//div1[@xml:id="ch.1"]';
$result = $xpath->query($query);
$resultNode = $result->item(0);
$newDom = new DOMDocument;
$newDom->appendChild($newDom->importNode($resultNode,1));
echo "I see this";
$proc = new XSLTProcessor();
echo "I dont see this";
$proc->importStylesheet($xslDoc);
echo $proc->transformToXML($newDom);
?>
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--