Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
XSLT in PHP4 (Read 2311 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
XSLT in PHP4
07.01.08 at 22:27:53
 
XSLT in PHP4
 
To do a XSLT transformation in PHP4 you can use the following code. XSLT is the process to convert one XML document according to a set of transformations defined in a .xsl document to a new XML document. You can use this technique to separate content in HTML files (the content is the XML) from the layout (this is the XSL). The resulting XML can be written as XHTML so therefore HTML results.
 
Code:
$xml     = "mysource.xml";
$xsl     = "myxsl.xsl";
$result = "result.html";

$xslt   = xslt_create();
$output = xslt_process($xslt, $xml, $xsl);

xslt_free($xslt);

unlink($result);
$handle = fopen($result,'w');
fwrite($handle, $output);
fclose($handle);
 

Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1