Photo Gallery using xml and php in a server-side transformation
This is a New Photo Gallery with thumbnails on the left and the enlarged selection on the right. This technique uses php in a server-side xml transformation.
http://www.myxmlproject.com/projects/autogallery/displayautogallery.php5?category=../imagesphotos
Here is yet another attempt at a photo gallery. In this version, the photos are listed in an xml file and formatting is defined by xsl. The key to this successful attempt lies in the very small but important php file that sets up the transformation. Previous attempts at creating a photo gallery using only xml and xsl files failed in firefox because the javascript didn’t run.
Here is the php code:
<?php if (isset($_GET['category'])) $rssfeed_category = (get_magic_quotes_gpc()) ? $_GET['category'] : addslashes($_GET['category']); else $rssfeed_category = ''; $xml = new DomDocument(); $xml->load('photos.xml'); $xsl = new DomDocument(); $xsl->load('photogallery.xsl'); $xslt = new XsltProcessor(); $xslt->importStylesheet($xsl); $transformation = $xslt->transformToXml($xml); echo $transformation; ?>

