Subject: [xsl] Problem with $proc = new XSLTProcessor(); in the browser From: Gábor Tóth <roysy@xxxxxxxx> Date: Fri, 20 May 2011 13:09:02 +0100 |
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 don4t 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 don4t 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); ?>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] two regexp related questi, Julian Reschke | Thread | [xsl] Re: Problem with $proc = new , Gábor Tóth |
Re: [xsl] two regexp related questi, Julian Reschke | Date | [xsl] Re: Problem with $proc = new , Gábor Tóth |
Month |