Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> xslt w php5 (libxml2)
knockout
post
Post #1





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 18.03.2005

Ostrzeżenie: (0%)
-----


Witam,
mam takie lamerskie pytanie, co trzeba zrobić aby móc używać xslt w php5. Ponoć nie używa się już rozserzenia php_xslt tylko biblioteki libxml2. Jak to zainstalować aby móc używać w php5.

Ten post edytował knockout 22.04.2005, 16:25:25
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 7)
dr_bonzo
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 5 724
Pomógł: 259
Dołączył: 13.04.2004
Skąd: N/A

Ostrzeżenie: (0%)
-----


A do manuala zajrzec sie nie chce?

http://pl.php.net/manual/pl/ref.xslt.php
Go to the top of the page
+Quote Post
bela
post
Post #3


Administrator PHPedia.pl


Grupa: Developerzy
Postów: 1 102
Pomógł: 2
Dołączył: 14.09.2003

Ostrzeżenie: (0%)
-----


Cytat(dr_bonzo @ 2005-04-22 17:09:25)
A do manuala zajrzec sie nie chce?

http://pl.php.net/manual/pl/ref.xslt.php

Dokładniej to http://pl.php.net/manual/pl/ref.xsl.php
Go to the top of the page
+Quote Post
knockout
post
Post #4





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 18.03.2005

Ostrzeżenie: (0%)
-----


Ściągnąłem bibliotekę http://xmlsoft.org/XSLT/ ale nie wiem jak zainstalować to pod WINXP. Zgrałem do WINDOWS/SYSTEM32/ wszystkie *.dll i dalej mam :
Fatal error: Call to undefined function xslt_create() in C:\Program Files\WebServ\httpd\xslt\simple.php on line 8


a phpinfo() pokazuje:

XSL enabled
libxslt Version 1.1.7
libxslt compiled against libxml Version 2.6.11
EXSLT enabled
libexslt Version 0.8.5

Ten post edytował knockout 22.04.2005, 18:06:57
Go to the top of the page
+Quote Post
dasko
post
Post #5





Grupa: Zarejestrowani
Postów: 179
Pomógł: 0
Dołączył: 9.11.2004

Ostrzeżenie: (0%)
-----


To znaczy, że masz już zainstalowane libxslt. Wszystko prawdopodobnie dobrze ci działa, tylko zamiast xslt_create(), musisz korzystac z:
  1. <?php
  2.  
  3. $xsl = new XSLTProcessor;
  4.  
  5. ?>


Więcej informacji tutaj:
http://www.php.net/manual/en/ref.xsl.php
Go to the top of the page
+Quote Post
bela
post
Post #6


Administrator PHPedia.pl


Grupa: Developerzy
Postów: 1 102
Pomógł: 2
Dołączył: 14.09.2003

Ostrzeżenie: (0%)
-----


Po co sciagasz biblioteke jak ją masz :]
  1. <?php
  2. $xsl = new DomDocument();
  3. $xsl->load(&#092;"plistConvert.xsl\");
  4. $inputdom = new DomDocument();
  5. $inputdom->load(&#092;"iTunes Music Library.xml\");
  6. $proc = new XsltProcessor();
  7. $xsl = $proc->importStylesheet($xsl);
  8. $newdom = $proc->transformToDoc($inputdom);
  9. $sxe = simplexml_import_dom($newdom);
  10. print('<pre>');
  11. print_r($sxe->dict);
  12. print('</pre>');
  13. ?>

Dostosuj sobie ;]
Go to the top of the page
+Quote Post
knockout
post
Post #7





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 18.03.2005

Ostrzeżenie: (0%)
-----


No w sumie właśnie do tego samego doszedłem, pomyliły mi się (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) (korzystałem z tej starej wersji). Dzięki wszystkim za radę (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

Ten post edytował knockout 22.04.2005, 18:18:18
Go to the top of the page
+Quote Post
aleksander
post
Post #8





Grupa: Przyjaciele php.pl
Postów: 742
Pomógł: 0
Dołączył: 14.12.2003
Skąd: Gdańsk, Trójmiasto

Ostrzeżenie: (0%)
-----


http://forum.php.pl/index.php?showtopic=12840
Go to the top of the page
+Quote Post

Closed TopicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 20:39