XML based templating system
Introduction to XML::Template (name suggestions welcome)
XML::Template is a templating system; there are already many others, so if you do not like it, look into a different one (its design is inspired by at least Template Toolkit and Kid, probably also including elements from others). XML::Template is (like Kid or TAL) designed to guarantee that your output is well-formed XML, which is a good step on the road to give you valid XHTML.
You can get the latest version of XML::Template with bzr; get bzr from your favourite distribution and do “bzr get http://bzr.sesse.net/xml-template/” to check out the code and this documentation.