durusmail: quixote-users: Quixote with ZPT?
Quixote with ZPT?
2002-11-05
2002-11-06
2002-11-06
This is why Quixote appeals to me (was: Quixote with ZPT?)
2002-11-06
This is why Quixote appeals to me (was: Quixote with ZPT?)
This is why Quixote appeals to me (was: Quixote with ZPT?)
2002-11-06
This is why Quixote appeals to me
2002-11-06
2002-11-11
Quixote with ZPT?
holger krekel
2002-11-11
Greg Ward wrote:
> On 06 November 2002, Bud P. Bruegger said:
> > A shortcoming of this and all DOM-based methods (and I believe also
> > ZTP?) is in the granularity; I don't believe it is the page (document)
> > that should be the object of design but rather a page fragment (DOM
> > fragment) that I normally call widget.  These are parts like headers,
> > footers, titles, nav bars, form elements, etc. that are typically
> > reused on multiple pages.
>
> Good point, and a very good argument in favour of PTL.  Perhaps my
> favourite thing about PTL is that it lets *you* decide on the level of
> granularity you want.  You can have a PTL template (or Python function)
> return a single HTML tag, a whole document, or anywhere in between.
>
> I think I can make a solemn vow that nothing DOM-like will ever appear
> in Quixote.

do you know about XIST?

    http://www.livinglogic.de/Python/xist/

it works with python objects trees where you can construct - say -
html like

    sometag = html.ul(
                html.li('one point'),
                html.li('another point'),
                type='1'  # attribute 'type' with value '1'
              )

pass around the tag, insert in that or this tree.  Finally you can do

    sometag.asBytes(encoding='utf8')

to get the byte-representation of a node.

I find the use of python classes and especially keyword-arguments
for constructing the attributes *extremely* elegant and it makes
working with dom-like stuff easy and nice to read.

regards,

    holger

reply