We should probably use a template engine. I'm sure there's a python equivalent for something like velocity (or smarty).
First, I like the dynamic 'tree of nodes' based approach to writing HTML/XML, rather than template
I like merging the concepts. Once you've built the tree, flatten the part of it that will make up the page, and feed that to the template engine. Even if you don't use a template engine, seperate the flattening and splitting from the transformation step.
This is different from stuff like anakia, where the template walks the tree directly (bad).
-- in the main because of pleasant
experiences with the Perl modules for this in the past. That said, even though there are some huge fields here (build output logs)
hehehe. Look here:
http://www.cheetahtemplate.org/docs/users_guide_html_multipage/language.constructs.html
this is what things like #include are for!
maybe a template mechanism is enough for the simple structure (results tables, lists, etc.) that we have. We have huge pages, with options missing (or not) based off content. I'm not sure any template could cope with that, but I am open minded to it.
The biggest ISP in the Netherlands with the biggest content portal in the Netherlands uses a template engine as a core part of their view layer (but don't tell 'em ;) :D. At least they used to...
Second, I didn't realize that Python DOM had nice serialization mechanism. Maybe I should've used that from the start.
No idea what you're talking about :D
Now Gump generates it's xdocs using an object tree structure. Watching the python memory grow from 20M (after loading all XML) to 136M (during generating these pages) it has some sort of leak (actual or effective)
ouch! Maybe it would pay off to use pipelining (you know, SAX, stuff) instead of DOM to generate the object tree.
Fixing this area is clearly important, and I'd appreciate all insights...
No insights here, just babbling along ;)
-- cheers,
- Leo Simons
----------------------------------------------------------------------- Weblog -- http://leosimons.com/ IoC Component Glue -- http://jicarilla.org/ Articles & Opinions -- http://articles.leosimons.com/ ----------------------------------------------------------------------- "We started off trying to set up a small anarchist community, but people wouldn't obey the rules." -- Alan Bennett
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]