|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Problem with $proc = new XSLTProcessor(); in the brows
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);
?>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








