2 ms·
If you really want to be able to split the document like that you can use a more "document streaming model", SAX-style, with separate functions for opening and
by ufo 14y ago
If you really want to be able to split the document like that you can use a more "document streaming model", SAX-style, with separate functions for opening and closing the tags. What really matters is that the system knows what tags and attributes are so if can do things like quote attributes for you, check that closing tags match correctly and so on. (saying forcing complete subtemplates is a feature might have been too strong of a language, but I don't think its that big of a deal since you can usually work around it by splitting things up a bit)
As you said, the real advantage of text-based systems is that they can generate text in other languages (sql, configuration files, etc) and that its easier to interoperate with other tools that spit out raw output. However, I fell things get really kludgy when you try to add automatic escaping to the text-based systems, for the reasons outlined in the original article.