I mean, really, how many of us have actually taken the time out to view the page source which is generated by the chamelelon theme? It generates tons of non-sensical, unruly tangled HTML. I understand that we all get ants in our pants sometimes, especially when we see it working on the screen, but I would be embarrassed to have released that theme file with my name in it. Seriously.
On the other hand, while working with the theme file in order to get it to yield some valid (or closer to valid) XHTML I was awestruck by the possibilities of this theming method. If you actually could get a plain php theme to yield XHTML which was completely valid, then applying a CSS style to that page would be a breeze. Is it really necesscary to have table based themes and intermediate engines involved, when we have complete control over the look and feel of the page with just CSS? Sure, if you want to offer some customization options to those who aren't well-versed in CSS or PHP, I can understand, but I would have to argue that learning CSS would be a much more valuable way to spend time than banging one's head around to learn PHP, theme engines, template files, AND CSS. What do we need to do to get there?
First, clean up the output. By simply keeping track of the page source while editing the plain php theme file, you can achieve the correct indentation to nest your tags. This is the first step to acheiving a source XHTML that we can work with. Also, by creating clean, valid output, the page becomes infinitely extensible. For instance, if I can make sense of and read what my XHTML output is (which is not currently the case) then if I need to add a few div tags with ids to nest a few components of the page in my .theme file, this is easy. A new class? No problem. Currently, due to the undicpherable output of the theme file, this is not possible.