Forum Moderators: coopster
Many XSLT processors come with built-in servlet support. For example, with SAXON, if you install the supplied SaxonServlet class in your servlets directory, then you can process an XML document simply by using a URL such as
mysite.com/servlets/SaxonServlet?source=source-url.xml&style=stylesheet.xslThe output of the stylesheet processing will be displayed in the browser.
(I'm not sure what PHP can do with XSL that isn't better tackled by an XSLT processor)
many thanks for this post ;) Also, I will prefer to use a full PHP environment (if possible) to do this transformation. I saw that in PHP5, you can load a XML and a XSL as:
<?php
/* Load the two XML sources */
$xml = new DomDocument; // from /ext/dom
$xml->load('example.xml');
$xsl = new DomDocument;
$xsl->load('example.xsl');
/* Configure the transformer */
$proc = new xsltprocessor;
$proc->importStyleSheet($xsl); // attach the xsl rules
echo $proc->transformToXML($xml); // actual transformation
?>
How present is PHP5 on the Internet? Any idea in PHP4?
Thx
pH
I know that the pre-processing is based on the server ;) My concern is based on the scalability of the project. I wouldn't like to have the entire project based on PHP5 and then have all servers around providing only PHP4 ;)
I'll check how present is PHP5 before continuing ;)
In all the case, many thanks for your help ;)
pH