Re: php fop (XSLFO)

From: Date: Mon, 09 Mar 2009 13:35:02 +0000
Subject: Re: php fop (XSLFO)
References: 1  Groups: php.general php.general 
Request: Send a blank email to php-general+get-289636@lists.php.net to get a copy of this message
Tom Sparks wrote:
is there a php Fop (XSLFO)? if not are there any that are not java based and can be run o a website that has php support only?
Hi Tom, Not XSLFO as such, this was split up years ago in to it's comprising parts - XSLT, XSL and XPath, all of which PHP supports with the fantastic addition of a full DOM API for XML based documents. http://php.net/dom (includes DOMXPath) http://php.net/xsl (XSLTProcessor) example: <?php // load xsl $XSLDocument = new DOMDocument(); $XSLDocument->load("xsl_document.xsl"); // load xml $XMLDocument = new DOMDocument(); $XMLDocument->load('xml_document.xml'); //run xslt transformation $XSLTProcessor = new XSLTProcessor(); $XSLTProcessor->importStylesheet($XSLDocument); $NEWDoc = $XSLTProcessor->transformToDoc($XMLDocument); // echo the new document echo $NEWDoc->saveXML(); ?> Regards :) Nathan

« previous php.general (#289636) next »