Mozesz dolaczyc css albo xsl wprost - nowoczesne przegladarki powinny sobie z tym poradzic bezposrednio, ale lepszym rozwiazaniem jest dokonanie przeksztalcen w php i przesylanie do klienta wyniku w formacie html. Mozesz do tego uzyc ponizszej clasy ktora zwraca w wyniku kod html.
<?php
class bigXslt {
var $xsltproc;
function bigXslt () {
if (PHP_VERSION >= 5) {
$this->xsltproc = new XsltProcessor();
} else {
$this->xsltproc = xslt_create();
}
}
function createHtml ($xml, $xsl) {
return false;
}
'/_xml' => $xml,
'/_xsl' =>$xsl
);
$html = $this->_xsltProcess ('arg:/_xml', 'arg:/_xsl', null, $arguments);
$this->_xsltFree();
return $html;
}
function _xsltProcess($xml_arg,$xsl_arg,$xslcontainer = null,$args = null,$params = null) {
// Start with preparing the arguments
// Create instances of the DomDocument class
$xml = new DomDocument;
$xsl = new DomDocument;
// Load the xml document and the xsl template
$xml->loadXML($args[$xml_arg]);
$xsl->loadXML($args[$xsl_arg]);
// Load the xsl template
$this->xsltproc->importStyleSheet($xsl);
// Set parameters when defined
if ($params) {
foreach ($params as $param => $value) {
$xsltproc->setParameter(\"\", $param, $value);
}
}
// Start the transformation
$processed = $this->xsltproc->transformToXML($xml);
// Put the result in a file when specified
if ($xslcontainer) {
return @file_put_contents($xslcontainer, $processed);
} else {
return $processed;
}
}
function _xsltFree() {
}
}
$parser = new bigXslt ();
$html = $parser->createHtml (\"file.xml\", \"file.xsl\");
?>