Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64
Your IP : 3.128.168.219
<?php
$xml = file_get_contents($_GET['xml']);
$xsl = str_replace('../xml', '/home/www/lhjmq-records.qc.ca/xsl/records/book/xml/', file_get_contents($_GET['xsl']));
// XML
$xml_doc = new DOMDocument();
$xml_doc->loadXML($xml);
// XSL
$xsl_doc = new DOMDocument();
$xsl_doc->loadXML($xsl);
// Proc
$proc = new XSLTProcessor();
$proc->importStylesheet($xsl_doc);
foreach ($_GET['param'] as $name => $value) {
$proc->setParameter('', $name, $value);
}
$newdom = $proc->transformToDoc($xml_doc);
echo $newdom->saveHTML();
|