Download ZIP file: congress.zip
congress |-- congress.php |-- data | |-- people.xml | `-- usps.xml |-- index.php `-- xsl |-- grid.xsl |-- list.xsl `-- toc.xsl
<?php
$fXml = "data/people.xml";
# LOAD XML FILE
$XML = new DOMDocument();
$XML->load( $fXml );
# START XSLT
$xsltproc = new XSLTProcessor();
$XSL = new DOMDocument();
$fXslBase = './xsl/';
$fXsl = $fXslBase.'list.xsl';
if ($_GET['view']) {
$fXsl = $fXslBase.$_GET['view'].'.xsl';
}
$XSL->load( $fXsl, LIBXML_NOCDATA);
$xsltproc->importStylesheet( $XSL );
if ($_GET['st']) {
$xsltproc->setParameter('','ST',$_GET['st']);
}
#PRINT
print $xsltproc->transformToXML( $XML );
?>r