Mountain Trail Photo
(about me)
(family & friends)


Technical note on photo pages

I wanted to find a way to display my photographs on pages that use the same format as the rest of my web site, without having to create a separate page for each picture. There's no way I would have time to maintain that! I'd have used ASP, but my site is on a Unix server. I considered PHP, but I'm learning enough new languages now, so I didn't want to add another one.

What I settled on is to create an XML file containing the data (JPEG filenames, etc.) for each page, and two XSL stylesheet files to format them like my other web pages. The browser renders the XML file using the XSL stylesheet and the result looks like a normal web page. I don't know if this is commonly done, but I've never seen it done before.

If you want to look at the details, go to one of my photo list pages (for example, More Hike Photos) and one of my photo pages (for example, Deer at Dunnfield Creek) and view the source. That will show you the XML file for each of those pages. The two stylesheets are:

If you know a better way to do this, please let me know.

Copyright © 2004 by Joel Justiss. All rights reserved. Unless otherwise noted, text and photos on this site are property of the author and may not used, reproduced or distributed without prior permission.