load("${source}.xml"); $xsl = new DOMDocument; $xsl->load("${source}_xhtml.xsl"); // Configure the transformer $proc = new XSLTProcessor; foreach ($_GET as $key => $value) $proc->setParameter('', $key, $value); $todayy = getdate(date('U')); $proc->setParameter('', '_year', $todayy['year']); $proc->setParameter('', '_month', $todayy['mon']); $proc->setParameter('', '_day', $todayy['mday']); $proc->importStyleSheet($xsl); // attach the xsl rules echo $proc->transformToXML($xml); ?>