load('./xml/displayRecipe.xsl'); $xp->setParameter('', 'recipeId', $recipe_id); } else { $xsl->load('./xml/listRecipes.xsl'); } // Assign the value of the translated XML to the variable $kafkaXMLResult. $xp->importStylesheet($xsl); $xml_doc = new DomDocument; $xml_doc->load('./xml/recipes.xml'); if (! ($recipeXmlResult = $xp->transformToXML($xml_doc))) { trigger_error('XSL transformation failed.', E_USER_ERROR); } ?>