Subject:Help with XSLT and PHP Author:Don Voltz Date:26 Feb 2007 09:17 AM
Would someone be able to point me in the right direction on the
following issue. I have uncovered how to do this with PHP4 but can not
seem to do it in PHP5
I have some php code to access a mysql database and return the data in
and XML docuement.
I am trying to convert this with XSLT using an XSL document on the
server. I want to somehow complete the transformation without having
to save the database query as an XML document, but instead process the
php generated XML dynamically by calling the XSL page.
Thanks in advance for any direction on this problem
Subject:Help with XSLT and PHP Author:Vasil Rangelov Date:27 Feb 2007 04:07 PM Originally Posted: 27 Feb 2007 04:04 PM
If the XML is generated as a plain text, you can use the loadXML() function. Once you've loaded the XML as a DOM tree, you can use the XSL functions to perform the XSLT tranformation.
NOTE: In order to use the XSL extension, you need to uncomment (or add) the line
extension=php_xsl.dll
in php.ini. I take it your extension_dir is OK, scince you're already using MySQL.
P.S. PHP forums say "we don't know XSLT" and XSL(T) forums say "this is not a PHP forum"... where is this madness going to end?