load('./xslt/displayShortStory.xsl'); $xp->setParameter('', 'storyId', $story_id); } else { $xsl->load('./xslt/listShortStories.xsl'); } # Assign the value of the translated XML to the variable $xmlResult. $xp->importStylesheet($xsl); $xml_doc = new DomDocument; $xml_doc->load('./xml/shortStories.xml'); if (! ($xmlResult = $xp->transformToXML($xml_doc))) { trigger_error('XSL transformation failed.', E_USER_ERROR); } ?>