WST

Home

WST stands for WebSite Transcluder, and is pretty much just like it sounds. The way it works is pieces of a webpage that need to exist in multiple places, but should only be changed once (like the navigation menu to the left on this page), are called elements. Each element is stored in its own XML file, while an Element Definition File links the element's XML file to a unique element name. Then, in the XHTML pages (no HTML pages, the files must be valid XML as well) of the site, you use these element names wherever you want to transclude the text stored in the element's XML file into the XHTML file.

Why program this when there are other ways of transcluding text (such as PHP)? Sometimes, you just don't have access to other ways, and so transclusion must occur before uploading the files to the server. Besides, using WST within a Makefile opens the doors for a bit more flexibility and fun...

This is actually the tool I've used to help out with this very site. So to use it as an example, the navigation menu on the left and the footer at the bottom are both elements stored in their own XML files. My element definition file says that the menu on the left is called a navmenu while the footer is simply called a footer. So in my XHTML pages, wherever I want my navigation menu, I simply include the tag <navmenu />. Once I pass everything through WST, it outputs final XHTML files. This means I only change the navigation menu once when I have to.

A list of possible arguments can be accessed by passing the --help argument to WST.

Downloads

WST is not quite ready for its first release. Check back by November 15th, 2007.

Changes

An RSS feed of the changelog is available here.

(C) 2007-2008 Andrew Jones-Gonzales (<dj.haruko@gmail.com>)
This site is managed using WST.