[albatross-users] Re: Python embedded like PHP
Dave Cole
djc at object-craft.com.au
Tue Mar 26 01:09:44 EST 2002
> For this problem, I think the solution is in the interpreter -- your
> macros are just hard to work with (from what I can see), because
> they are dynamically scoped and being used in lieu of real
> functions. It's not a syntax issue.
I would really like it if you could explain a little further.
The macros do sort of work like functions in that they pass arbitrary
template content to the macro for substitution at the location
specified by the macro.
I tried to work out a simple way in which values from the execution
context namespace could be passed as arguments but couldn't see how to
do it in a nice fashion
> I'm not sold on all the benefits of ZPT either, but I think it's a
> natural fit for the particular case of replacing an attribute value.
> To me, <td al:bgcolor="something dynamic"> reads pretty well, and
> should make some intuitive sense even if you don't understand the
> scripting itself. All attributes are kind of hidden, and the
> dynamic statement is no more hidden than the thing it is replacing.
I agree. My biggest problem with ZPT was the control flow.
> Also, you're left with a mostly-intact tag -- al-td isn't an HTML
> tag, and software that understands HTML won't understand that tag.
> That means you can't preview the unrendered code in a browser and
> you can't let a WYSIWYG editor touch it.
The reason for the al- prefix is to allow the regex parser to
recognise the tag in amongst the plain HTML tags.
- Dave
--
http://www.object-craft.com.au
More information about the Albatross-users
mailing list