TCH-James Posted November 21, 2007 Posted November 21, 2007 With the transition to PHP5, XSLT support has been discontinued in favor of XSL. While they achieve the same result, many people using XSLT specific functions in their code are experiencing breakdowns. In researching this issue, I have found an excellent work around that is quite literally a drop-in fix: http://alexandre.alapetite.net/doc-alex/xs...5/index.en.html You simply need to upload a copy of xslt-php4-to-php5.php and add a single line to your XSLT code page: >if (version_compare(PHP_VERSION,'5','>=')&&extension_loaded('xsl')) require_once('xslt-php4-to-php5.php'); If anyone has any trouble with the transition or setting this up, please open a ticket with the help desk. Quote
bbeirnaert Posted December 13, 2007 Posted December 13, 2007 (edited) Hi Jesse, Thanks for the information, I was using xslt functions, and had problems after the migration to php 5. I tried using the code you suggest, but it still doesn't work. I have a Fatal error: Class 'XSLTProcessor' not found Is it because the lib/plugin/extension is not correctly installed? What should I do, or who should I ask to install it? Thanks Benjamin ps: for information, I'm on the vortex server Edited December 13, 2007 by bbeirnaert Quote
TCH-James Posted December 13, 2007 Author Posted December 13, 2007 Benjamin, If you can open a ticket with the help desk, I'll take a look at the issue. It sounds as though the script isn't setup to handle the translation from XSLT to XSL. Quote
asaxe Posted April 15, 2009 Posted April 15, 2009 Hello: I was wondering if there was any update on this or if anyone can provide any assistance. I've been trying to transform an XML file using XSL, but am not having any luck. I've tried about every possible method of transforming the XML, but always get an error - it's almost as if whatever methods are needed to transform XML are not turned on on the server (can anyone at TCH shed light on this?). Currently, I'm trying to use: $xsl = new DomDocument; $xsl->load('distanceorder.xsl'); $xp = new XsltProcessor(); $xp->importStylesheet($xsl); $xml_doc = new DomDocument; $xml_doc->loadXML($data); $newdata=$xp->transformToXML($xml_doc); And I get, in return: Fatal Error: Class 'XsltProcessor' not found Any suggestions or ideas? Any thoughts on which PHP functions to use to process the XML? Thanks! Andrew Quote
TCH-Thomas Posted April 15, 2009 Posted April 15, 2009 Welcome to the forum, Andrew. If you´ve tried what James suggests in the first post in this thread and still no luck, I would open a ticket and ask the techs if they can look into this. Link to the helpdesk is on top of page and in my signature. Quote
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.