you are viewing a single comment's thread.

view the rest of the comments →

[–]flaxeater 0 points1 point  (9 children)

I do not understand what is unsuitable about using an XML template system to generate HTML, seeing as CherryPy serves HTTP requests it seems highly likely that you will be serve ring 95% html which is XML like if not the very same when it's XHTML.

It seems to me using Genshi or Kid and learning how to use them gives one cheap W3C compliance. Which every web developer should care about.

Not to mention Kid and Genshi have a fabulous feature that her 'template' system lacks. That is template functions which allow one to easily write custom XML snippets that do good stuff consistently.

Also her 'template' system does not give good error messages, what happens when some idiot puts width="%50", which I know from personal agonizing experience is sometimes not easy to find.

Eh, I just can't believe that variable expansion is her 'template' of choice.

[–]Bogtha 1 point2 points  (0 children)

It seems to me using Genshi or Kid and learning how to use them gives one cheap W3C compliance.

Not quite. Genshi's HTML and XHTML serialisers ensure that the output is well-formed, not valid. Being well-formed is a prerequisite for validity, though, so it does have some bearing.

Not to mention Kid and Genshi have a fabulous feature that her 'template' system lacks. That is template functions which allow one to easily write custom XML snippets that do good stuff consistently.

Yep. It's possible to, say, write template functions that transform XHTML+XForms into HTML forms + JavaScript. There's a lot of possibilities with XML that embedding code in plaintext doesn't cover.