One of the things Nevow, as well as the recent conversion of my site to XHTML, have made me think about is what I can only call "structured templating".
When the output format of your template is something rather unstructured, such as plain text, or even old versions of HTML, you treat your output at the highest level of abstraction you can, which is at the level of strings of text.
However, when your output format is something highly structured, as XML is, it seems that it should be possible to move the level of abstraction up a notch. Not only is the level of abstraction important for "conceptual purity" (ick), but it has the potential to make templating XML (XHTML) easier and importantly, safer. Generating XML is hard to do at the level of text strings. All the broken RSS feeds are a testament to that. Bumping the level of abstraction up is important for correctness.
Nevow seems like it may have a great scheme for exploiting the structure of XML in its templating. I'd like to explore this more, but I'm doubtful PHP is powerful enough to take advantage of this style of templating. I'm going to have to play with Nevow more.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):