|
Subject: [xsl] Re: Problem with $proc = new XSLTProcessor(); in the browser From: Gábor Tóth <roysy@xxxxxxxx> Date: Fri, 20 May 2011 14:22:44 +0100 |
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, Gabor Tsth <roysy@xxxxxxxx> 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 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 -> |
|---|---|---|
| [xsl] Problem with $proc = new XSLT, Gábor Tóth | Thread | [xsl] [ann] oXygen XML Editor 12.2, George Cristian Bina |
| [xsl] Problem with $proc = new XSLT, Gábor Tóth | Date | [xsl] [ann] oXygen XML Editor 12.2, George Cristian Bina |
| Month |