Re: php fop (XSLFO)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux