[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Problem with $proc = new XSLTProcessor(); in the brows

Subject: Problem with $proc = new XSLTProcessor(); in the browser
From: Gábor Tóth <roysy@xxxxxxxx>
Date: Fri, 20 May 2011 13:09:02 +0100
 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);


?>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.