<?php

// Definition des variables
$type=$_GET['type'];
$projet=$_GET['projet'];
// Nouvelle instance$xslt = new XSLTProcessor();// Chargement du fichier XML$xml = DOMDocument('1.0','UTF-8');$xml -> load('../xml/laurenthenriot.xml');// Chargement du fichier XSL$xsl = new DOMDocument('1.0','UTF-8');$xsl -> load('../xml/portfolio.xsl');// Import de la feuille XSL$xslt -> importStylesheet($xsl);

// Envoi des variable à la feuille xslt$xslt -> setParameter(null, 'type', $type);
$xslt -> setParameter(null, 'projet', $projet);

// Transformation et affichage du résultat$result=$xslt -> transformToXml($xml);

if ($result) {
echo $result;
}
else {
print "Erreur lors de la transformation.";
}


?>