/** * FIXME Exceptions Not Handled * \algo * $this->responceBuffer: The XSLT as String * $xdoPath: Path to XML DataObject * \endalgo * @param string $xdoPath */ private function processXSLView($xdoPath) { $xdo = new DOMDocument(); $xdo->load($xdoPath); $xslt = new DOMDocument(); if (!@$xslt->loadXML($this->responseBuffer)) { //TODO Handle Exceptions echo $this->responseBuffer; assert("/*Response Malformed Not Parsable as XML TODO Throw Exception*/"); } $transformer = new XSLTProcessor(); if (!@$transformer->importStylesheet($xslt)) { //TODO Handle Exceptions echo $transformer->saveXML(); assert("/*Response Not XSL TODO Throw Exception*/"); } $responseXML = $transformer->transformToDoc($xdo); //Response as a DOMDocument $this->responseBuffer = $responseXML->saveHTML(); //TODO will it be HTML or XML should be decided based upon Content Mime Type }