Simon Belak wrote:
The interface between all these "extras" and Kid seems to be an
ElementTree node. The extra thingy generates it, and Kid knows how to
interpret it. So maybe if Cheetah knew how to interpret it too,
everything would be hunky-dory. (My, I'm using a lot of corny slang
today. It must mean I'm very tired.) Actually, if the thingy has a
suitable .__str__() method that produces the appropriate HTML, the
work would already be done. Oh, but ElementTree produces XML not
HTML, darn. A Cheetah filter would have to do the conversion. Well,
that's not an insurmountable task.
In regard to HTML serialisation, maybe Ian would contribute his patch to
ElementTree [1] as used for Commentary?
[1] http://blog.ianbicking.org/xml-processing.html#comments
What I wrote is just what Kid already has -- writing HTML. ElementTidy
is what parses the HTML, but tidying source is not at all appropriate
for a template. Parsing actual HTML for a template should be more
strict and predictable. So again, I'd recommend looking at the parser
in ZPT:
http://svn.zope.org/Zope3/trunk/src/zope/tal/htmltalparser.py?rev=30078&view=markup
--
Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org