CoreyR Posted May 26, 2007 Share Posted May 26, 2007 I've been doing PHP for about 2 months now. The project I'm working on currently is taking an XML feed and translating it into HTML. I have done tons of research on this and found there are several ways to go about this depending on what it installed on my server. I wrote XSLT templates for years now and that is my proffered method of tackling this project. The server I am using is PHP5 The problem I am facing is this. I have a php file that contains the following: <? $parser = xslt_create(); $html = xslt_process($parser, "test.xml", "gen_page.xsl"); xslt_free($parser); echo $html; ?> I am getting this error message "Fatal error: Call to undefined function xslt_create()" and was wondering if anyone has come across this error and what it means. I'm thinking the XSLT extensions are not configured in the server. Thank You, Corey Romero Quote Link to comment https://forums.phpfreaks.com/topic/53041-wow-i-need-help/ Share on other sites More sharing options...
chigley Posted May 26, 2007 Share Posted May 26, 2007 PHP5 has its own XML functions (SimpleXML) so you don't need to bother with XSLT anyway! Quote Link to comment https://forums.phpfreaks.com/topic/53041-wow-i-need-help/#findComment-262008 Share on other sites More sharing options...
Barand Posted May 26, 2007 Share Posted May 26, 2007 Have oa look at the Requirements and Installation notes here http://www.php.net/manual/en/ref.xslt.php ~chigley The two aren't mutually exclusive <?php $xml = simpleXML_load_file('newsfeed.xml'); $xsl = simpleXML_load_file('newsfeed.xsl'); $proc = new XsltProcessor(); $proc->importStylesheet($xsl); $newxml = $proc->transformToDoc($xml); print $newxml->saveXML(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/53041-wow-i-need-help/#findComment-262009 Share on other sites More sharing options...
CoreyR Posted May 26, 2007 Author Share Posted May 26, 2007 WOW, I hope this can shed some light. Maybe I need some sleep, I've been up working on web sites since 8am PST. I will look into it more in the morning. Thanks for your input!! Quote Link to comment https://forums.phpfreaks.com/topic/53041-wow-i-need-help/#findComment-262010 Share on other sites More sharing options...
CoreyR Posted May 26, 2007 Author Share Posted May 26, 2007 Still not working. I've figured out that the server I am using uses mod-rewrite but I have no idea what I need to do. Quote Link to comment https://forums.phpfreaks.com/topic/53041-wow-i-need-help/#findComment-262134 Share on other sites More sharing options...
CoreyR Posted May 26, 2007 Author Share Posted May 26, 2007 Is there a way to add a handler in my .htaccess file to fix the XSLT errors? It's been two days and I'm beating my brain. Thanks for any help with this. Quote Link to comment https://forums.phpfreaks.com/topic/53041-wow-i-need-help/#findComment-262156 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.