I think you could actually implement the vBulletin templating system if you wanted to.
Magento’s system is basically
\_ phtml file
\_ phtml file.
There shouldn’t be any problem with replacing the XML file with more PHP and HTML files. You’re going to need the logic that decides “should I put a box over here or not?”, in magento, that logic is in XML rather than PHP IF()s or includes()s.
Actually, it’s something that I’ve been thinking about doing now for a while. How do you let users completely control the templates of an application, w/o having them muck around next to the code. The issue is mostly with end-user’s comfort level in understanding what they can and can’t edit. Also, you want to protect their work during upgraes. The only thing I don’t like is that $this is always pointing to different Objects. It would be nice if $this always pointed to 1 particular object and then you could get the current block with $this->block->… but that might be too much typing… ehh, it’s a toss up at that point.