<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<!-- www.matthewwest.co.uk                                              -->
<!-- Layout $LastChangedDate:: 2007-05-12 08:36:32 -0700 (Sat, 12 May#$ -->
<!-- Layout $Revision:: 134                                           $ -->
<!-- Copyright (C) 2005-2007 Matthew West                               -->
  
  <head profile="http://gmpg.org/xfn/11">
    <meta name="title" content="Blog - Photo Album" />
    <meta name="author" content="Matthew West" />
    <title>
      Blog - Photo Album
    </title>
        
    <link href="/stylesheets/site.css?1184434403" media="all" rel="Stylesheet" type="text/css" />
    
    <link href="/stylesheets/print.css?1184459558" media="print" rel="Stylesheet" type="text/css" />
    <link href="/stylesheets/syntax.css?1184434403" media="all" rel="Stylesheet" type="text/css" />
    <link href="/favicon.ico?1167527172" rel="shortcut icon" />
    <style type="text/css">
      
    </style>
              <link href="/blog/2002/8/19/3-link-checker" rel="next" title="Blog - Link Checker" />
      <link href="/blog/2007/9/16/12-find-fixtures-without-thinking" rel="last" title="Blog - Find Fixtures Without Thinking" />
        <link href="http://www.matthewwest.co.uk/" rel="home" title="Index" />
    <link href="#&lt;#&lt;Class:0xb787fe50&gt;:0xb7164de4&gt;" rel="up" title="Blog" />
    <link href="http://www.matthewwest.co.uk/blog/feeds" rel="alternate" title="ATOM" type="application/atom+xml" />
    <link href="http://www.matthewwest.co.uk/blog/feeds/rss2" rel="alternate" title="RSS" type="application/rss+xml" />
  </head>

  <body>
    <div id="bannerhead" >
      <span class="right">www.matthewwest.co.uk</span>
    </div>
     
    <div id="crumbs">
              <a href="/blog">Blog</a>
                  &#160;&gt;&#160;
                      <a href="/blog/2002/8/1/4-photo-album">Photo Album</a>
                        </div>
    <h1>
      Blog - Photo Album
    </h1>
        
      <div class="floatr">
    <a href="/blog/2002/8/19/3-link-checker">Link Checker&raquo;</a>
  </div>
<div style="width:100%;clear:both;">
</div>

<div class="sidebarr tag-cloud">
  Tags:<br />
  <a href="http://www.matthewwest.co.uk/tags/Lucky+Soul" style="font-size: 58%;">Lucky Soul</a> <a href="http://www.matthewwest.co.uk/tags/avolites" style="font-size: 48%;">avolites</a> <a href="http://www.matthewwest.co.uk/tags/chamsys" style="font-size: 58%;">chamsys</a> <a href="http://www.matthewwest.co.uk/tags/computing" style="font-size: 77%;">computing</a> <a href="http://www.matthewwest.co.uk/tags/echelon" style="font-size: 82%;">echelon</a> <a href="http://www.matthewwest.co.uk/tags/hog+1000" style="font-size: 48%;">hog 1000</a> <a href="http://www.matthewwest.co.uk/tags/hog+2" style="font-size: 48%;">hog 2</a> <a href="http://www.matthewwest.co.uk/tags/hog+3" style="font-size: 110%;">hog 3</a> <a href="http://www.matthewwest.co.uk/tags/hog+iPc" style="font-size: 110%;">hog iPc</a> <a href="http://www.matthewwest.co.uk/tags/java" style="font-size: 58%;">java</a> <a href="http://www.matthewwest.co.uk/tags/lighting" style="font-size: 150%;">lighting</a> <a href="http://www.matthewwest.co.uk/tags/magicq" style="font-size: 58%;">magicq</a> <a href="http://www.matthewwest.co.uk/tags/music" style="font-size: 48%;">music</a> <a href="http://www.matthewwest.co.uk/tags/pearl+2004" style="font-size: 48%;">pearl 2004</a> <a href="http://www.matthewwest.co.uk/tags/pearl+expert" style="font-size: 48%;">pearl expert</a> <a href="http://www.matthewwest.co.uk/tags/rails" style="font-size: 48%;">rails</a> <a href="http://www.matthewwest.co.uk/tags/ruby" style="font-size: 48%;">ruby</a> <a href="http://www.matthewwest.co.uk/tags/sailing" style="font-size: 133%;">sailing</a> <a href="http://www.matthewwest.co.uk/tags/website" style="font-size: 77%;">website</a> <a href="http://www.matthewwest.co.uk/tags/xhtml" style="font-size: 72%;">xhtml</a> <a href="http://www.matthewwest.co.uk/tags/xml" style="font-size: 58%;">xml</a> <a href="http://www.matthewwest.co.uk/tags/xsl" style="font-size: 65%;">xsl</a> 
</div>

<dl class="sidebarr frame">
  <dt class="header">Recent Updates</dt>
      <dd><a href="http://www.matthewwest.co.uk/blog/2007/9/16/12-find-fixtures-without-thinking" rel="bookmark">Find Fixtures Without Thinking</a></dd>
      <dd><a href="http://www.matthewwest.co.uk/blog/2007/6/3/11-bush-hall-reviews" rel="bookmark">Bush Hall Reviews</a></dd>
      <dd><a href="http://www.matthewwest.co.uk/blog/2007/5/25/10-lucky-soul-at-bush-hall" rel="bookmark">Lucky Soul at Bush Hall</a></dd>
      <dd><a href="http://www.matthewwest.co.uk/blog/2005/2/21/9-xsl-contents" rel="bookmark">XSL Contents</a></dd>
      <dd><a href="http://www.matthewwest.co.uk/blog/2007/4/15/8-new-website" rel="bookmark">New Website</a></dd>
  </dl>

<div class="post hentry">
  <h2 class="entry-title"><a href="http://www.matthewwest.co.uk/blog/2002/8/1/4-photo-album" rel="bookmark">Photo Album</a></h2>
  <h4 class="tags floatr">
    Tags: <a href="http://www.matthewwest.co.uk/tags/computing" rel="tag">computing</a>, <a href="http://www.matthewwest.co.uk/tags/java" rel="tag">java</a>, <a href="http://www.matthewwest.co.uk/tags/website" rel="tag">website</a>, <a href="http://www.matthewwest.co.uk/tags/xml" rel="tag">xml</a>, <a href="http://www.matthewwest.co.uk/tags/xhtml" rel="tag">xhtml</a>, <a href="http://www.matthewwest.co.uk/tags/xsl" rel="tag">xsl</a>
  </h4>
  <h4 class="datetime">
          Posted
      <abbr class="published" title="2002-08-01T14:39:00Z">
        at August 01, 2002 14:39
      </abbr>
      | Updated
      <abbr class="modified" title="2007-04-13T21:57:10Z">
        at April 13, 2007 21:57
      </abbr>
      </h4>
  <div class="entry-content">
    
    <p><strong>Album</strong> is a program that creates an <span class="caps">HTML</span> photo album.  All that is needed is an <a href="http://www.w3.org/XML/"><span class="caps">XML</span></a> file that describes the layout of the album and provides captions etc, an <a href="http://www.w3.org/Style/XSL/"><span class="caps">XSL</span></a> file describing the layout of the pages and the images themselves.  The images must be in Jpeg format, which most photo CD&#8217;s seem to have.  The program automatically scales them so that their long edges are the same length.  It is assumed that they are already the right way up(some photo CD&#8217;s don&#8217;t do this).  The program takes all these and spits out a directory full of <span class="caps">HTML</span> pages and image files.  These can be uploaded straight onto a website.</p>


	<h3>Libraries</h3>


	<p>The program is supplied with <a href="http://xml.apache.org/xerces2-j/index.html">Xerces</a>, an <span class="caps">XML</span> parser and <a href="http://xml.apache.org/xalan-j/index.html">Xalan</a>, an <span class="caps">XSLT</span> processor.  The program accesses them through a standardised <a href="http://java.sun.com/xml/jaxp/"><span class="caps">JAXP</span></a> interface, so they can probably be replaced with other <span class="caps">JAXP</span> compliant libraries.  Both of these programs were developed by the <a href="http://xml.apache.org">Apache Software Foundation</a>.  Another program from Apache, <a href="http://jakarta.apache.org/ant/">Ant</a> is used to build the project.</p>


	<h3>Download</h3>


	<p>The program is available for download as a <a href="/docs/album-0.1.zip">.zip file</a>, or a <a href="/docs/album-0.1.tar.gz">.tar.gz file</a>.  My code is released under the terms of the <span class="caps">GPL</span>, Xalan and Xerces are covered by the Apache Licence.  There is a sample Photo Album included.  This is still very much a work in progress, there is no documentation, few error messages, and some fairly bizarre &#8216;features&#8217;.  One such feature is that it pauses between compressing each image.  This is because my PC has a propensity for overheating&#8230;</p>


	<h3>Improvements</h3>


	<p>I can only really see this program being useful for people who are already creating static pages using <span class="caps">XSL</span>.  Most people seem to be moving toward dynamic pages that apply style sheets &#8216;on the fly&#8217;, so this program is probably already out of date.  Each run of the program takes quite a long time.  It only creates the image files once, and doesn&#8217;t overwrite them, however it creates all the <span class="caps">HTML</span> files every time.  A better way might be to have a &#8216;build&#8217; directory which stores all the image files, and a list of creation dates and names, and all the <span class="caps">XML</span> files prior to their conversion to <span class="caps">XML</span>.  This would make it less painful to play with different styles and layouts.</p>


	<p>I think overall the best solution would have been to make an interactive program with a <span class="caps">GUI</span>.  However it would have a lot longer to write.  There are commercial websites that allow people to upload their photos, however I&#8217;m not sure that they would give as much flexibility as this solution, especially in terms of the final layout.  With so much &#8216;free&#8217; web space available I think there may be a market for an interactive program.</p>


	<h3>Updated (April 2007)</h3>


	<p>I no longer use this program, instead I&#8217;ve gone for a database backed dynamic site, created using Ruby on Rails.  It gives me more flexibility then the likes of Flickr, but at the cost of a lot more effort.</p>
      </div>
</div>


    <div id="footer">
             <span class="left">
          Last modified : 13 Apr 2007
        </span>
        
      <span class="right vcard">
       <a href="http://www.matthewwest.co.uk/website-information">Copyright &#169; 2002-2007</a>
       <a href="/email/send_email" class="fn" id="mehcardname" title="E-mail me">Matthew West</a>
      </span>
    </div>
    
    
<!-- Menu                                                            -->
<!-- $Rev:: 10#$ $Date:: 2006-12-11 03:28:11 +0000 (Mon, 11 Dec 20#$ -->  
    <div id="menu">
    <ul class="main">
      <li class="page vcard">
        <a href="#mehcardname" class="include"></a>
        <a href="http://www.matthewwest.co.uk/" class="url" rel="me">Index</a>
      </li>
      <li class="menu"><a href="/professional-experience">Professional</a>  <ul class="sub"><li class="page"><a href="/docs/cv.pdf">Resumé</a></li><li class="page"><a href="/professional-experience/earlier-lighting-work">Earlier Work</a></li><li class="page"><a href="/professional-experience/lighting-photos">Portfolio</a></li>  </ul></li><li class="menu"><a href="/lightingdb">Lighting Database</a>  <ul class="sub"><li class="menu"><a href="/lightingdb/showmanufacturer/Clay Paky">Clay Paky</a>  <ul class="sub"><li class="section"><a href="/lightingdb/showlantern/Clay Paky/Golden Scan HPE">Golden Scan HPE</a></li><li class="section"><a href="/lightingdb/showlantern/Clay Paky/MiniScan">MiniScan</a></li>  </ul></li><li class="menu"><a href="/lightingdb/showmanufacturer/High End">High End</a>  <ul class="sub"><li class="section"><a href="/lightingdb/showlantern/High End/Studio Spot 575">Studio Spot 575</a></li>  </ul></li><li class="menu"><a href="/lightingdb/showmanufacturer/Martin">Martin</a>  <ul class="sub"><li class="section"><a href="/lightingdb/showlantern/Martin/Mac 600E">Mac 600E</a></li><li class="section"><a href="/lightingdb/showlantern/Martin/Mac 2000 Wash">Mac 2000 Wash</a></li><li class="section"><a href="/lightingdb/showlantern/Martin/Mac 500">Mac 500</a></li><li class="section"><a href="/lightingdb/showlantern/Martin/Mac 250">Mac 250</a></li><li class="section"><a href="/lightingdb/showlantern/Martin/Mac 2000 Profile">Mac 2000 Profile</a></li><li class="section"><a href="/lightingdb/showlantern/Martin/Mac 500E">Mac 500E</a></li><li class="section"><a href="/lightingdb/showlantern/Martin/Mac 550">Mac 550</a></li><li class="page">...</li>  </ul></li>  </ul></li><li class="menu"><a href="/photos">Photos</a>  <ul class="sub"><li class="page"><a href="/photos/all">See them all</a></li><li class="menu"><a href="/photos/holidays">Holidays</a>  <ul class="sub"><li class="page"><a href="/photos/holidays/lofoten-islands">Lofoten</a></li><li class="section"><a href="/photos/holidays/eastern-europe">Eastern Europe</a></li><li class="page"><a href="/photos/holidays/cornwall-break">Cornwall Break</a></li><li class="page"><a href="/photos/holidays/cornish-sailing">Cornish Sailing</a></li>  </ul></li><li class="menu"><a href="/photos/lighting-photos">Lighting Photos</a>  <ul class="sub"><li class="page"><a href="/photos/lighting-photos/hampton-court">Hampton Court</a></li><li class="page"><a href="/photos/lighting-photos/dreamgirls">Dreamgirls</a></li>  </ul></li><li class="menu"><a href="/photos/misc">Other photos</a>  <ul class="sub"><li class="page"><a href="/photos/misc/bristol">Bristol</a></li><li class="page"><a href="/photos/misc/portsmouth">Portsmouth</a></li><li class="page"><a href="/photos/misc/oakley">Oakley</a></li><li class="page"><a href="/photos/misc/kingston">Kingston</a></li><li class="page"><a href="/photos/misc/cats-in-portugal">Cats</a></li>  </ul></li>  </ul></li><li class="page"><a href="/blog">Blog</a></li><li class="page"><a href="/links">Links</a></li><li class="page"><a href="/site-info">Site Info</a></li><li class="page"><a href="/email">Contact Me</a></li>
      <li class="google">
        <form action="http://www.google.com/custom" method="get">
     	  <div>
	        <a href="http://www.google.com/search">
  	          <img alt="Google" width="128" height="53" src="/images/google40.png" />
	        </a>
	        <input class="text" value="" maxlength="255" size="12" name="q" type="text" /><br />
	        <div>
	          <input value="" name="sitesearch" type="radio" />
	          All WWW<br />
	          <input checked="checked" value="www.matthewwest.co.uk" name="sitesearch" type="radio" />
	          This site only<br />
	        </div>
	        <input type="hidden" name="cof"
		           value="S:http://www.matthewwest.co.uk;GL:0;VLC:#3333ff;AH:left;LH:80;LC:#3333ff;L:http://www.matthewwest.co.uk/images/h80google.png;ALC:#3333ff;BIMG:http://www.matthewwest.co.uk/images/beams.png;LW:1165;AWFID:ab0c1f8918996ca6;"
		           />
	        <input value="www.matthewwest.co.uk" name="domains" type="hidden" />
	        <input value="Search" name="sa" type="submit" />
	      </div>
        </form>
      </li>
    </ul>
        <script type="text/javascript" src="http://embed.technorati.com/embed/hi6ybdyt32.js"> </script>
  </div>

  </body>
</html>