Displaying a database in a web-browser

I use a program called KimDaBa to store metadata for my photo collection. It stores the database as an XML file in the same directory as the photographs, and stores 64×64 pixel thumbnails in subdirectory. To make the image folder browseable, I used to insert the directory listing into an index.html file and use regular expressions to turn each file entry into an a element wrapping an img element, with the image source poiting to the thumbnail. But every time I added or deleted a photo, I had to repeat the process. Then I learned about XSLT.

XSLT allows you to transform an XML file served to the browser into an XHTML file. Either the browser or the server does the work, depending on how compatible you want it to be. I’m writing an XSLT file that will enable direct in-browser display of the database, without requiring any special plug-ins. Since the database contains metadata such as time, date, name, notes, keywords, locations, people, category trees, and settings, I’ll add javascript to do dynamic sorting and searching.

This is gonna be fun.


No comments yet. Commenting is not yet reimplemented after the Wordpress migration, sorry! For now, you can email me and I can manually add comments. Feed icon