* http://server_ip/hotspot_status.php?format=XML&xslt=http://xslt_server/xslt/wifidog_status.xsl */ // If a XSL transform stylesheet has been specified, try to use it. if ($format == "XML" && !empty($_REQUEST['xslt'])) { if (Dependency::check("xsl")) { // Load the XSLT if (($xslt_dom = @DomDocument::load(trim($_REQUEST['xslt']))) === false) { echo sprintf("Unable to load XSTL : %s", $_REQUEST['xslt']); } else { $xslt_proc = new XSLTProcessor(); $xslt_proc->importStyleSheet($xslt_dom); // Prepare HTML header("Content-Type: text/html; charset=UTF-8"); echo $xslt_proc->transformToXML($nodeList->getOutput(true)); } } else { $dep = Dependency::getObject("xsl"); echo sprintf("Missing dependency: %s: %s", $dep->getId(), $dep->getDescription()); } } else { // Deliver node list $nodeList->getOutput(); } } /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * c-hanging-comment-ender-p: nil * End: */