$_SESSION['cache'] = $recipe; } $resultXML = $recipe->getResult(); print '<pre>' . htmlentities(var_export($resultXML, true)) . '</pre>'; if (array_key_exists('stylesheetURL', $_POST) && $_POST['stylesheetURL']) { $xslDoc = new DOMDocument(); $xslDoc->load($_POST['stylesheetURL']); $xmlDoc = DOMDocument::loadXML($resultXML); $proc = new XSLTProcessor(); $proc->importStylesheet($xslDoc); $proc->registerPHPFunctions(); $resultXML = $proc->transformToXML($xmlDoc); } print $resultXML; } ?> </section> <?php } Consume::printErrors(); ?> </article> <?php } ?> </section> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"></script> <script type="text/javascript" src="script.js"></script> </body> </html>