I discovered a wonderful Template Toolkit
plugin yesterday: XML::Style.
The basic idea, according to the docs, is that you can apply various
attributes to your HTML. The example given is of transforming an HTML
table:

[% USE xmlstyle

[...]

Scott Johnson is not a moron. I must be. I had exactly the same problem as him, but never solved it. As I said to Dave Winer at the time: “I’m obviously missing something really obvious here…”
But, I’ve changed my mind. It’s not at all obvious. “Choose the Open command from the File menu in [...]

Scott Andrew has a nice drag and drop window demonstration. Unfortunately there’s a nasty bug where Mozilla can’t drop the box, but the concept is good. There’s lots of little loose ends that he’s tossing out for other people to fill in, which is good too. This is already very neat, but it could be [...]