David Bernard wrote:
Putting any style debates aside, I think that formencode.htmlgen might
be useful to the discussion, especially since it is already available in
TurboGears.  It looks kind of like STAN, but creates ElementTree nodes.
I think(?) that Kid will already handle these well, or at least
somewhat well (there's no way to indicate a parentless set of nodes in
ElementTree, which I find useful in practice, and I don't know if
there's any convention that Kid uses to include a series of elements --
if there is, I can certainly add that to htmlgen).


Thanks Ian, it's exactly what I search to replace html/kid string from
my python code :
- less readable code than html :-)
+ avoid generate bad formed xml (every tag and attributes are closed)
+ ability to change/enhance result in a decorator function,...

but How to generate special tag like :
<!-- comments -->

html.comment('comments')

<? processing instruction ?>

I didn't think of that one. Patch welcome (should look like comments); I don't know how ElementTree represents these internally.

--
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org

Reply via email to