load('menu.xsl');
// import the XSL styelsheet into the XSLT process
$xp->importStylesheet($xsl);
// create a DOM document and load the XML datat
$xml_doc = new DomDocument;
$xml_doc->load('menu.xml');
// Set css parameter
if (isset($_REQUEST['css']))
{
$xp->setParameter($namespace, 'css', $_REQUEST['css']);
}
// transform the XML into HTML using the XSL file
if ($html = $xp->transformToXML($xml_doc)) {
echo $html;
} else {
trigger_error('XSL transformation failed.', E_USER_ERROR);
} // if
?>