[albatross-users] Re: Python embedded like PHP

Dave Cole djc at object-craft.com.au
Fri Mar 22 18:31:07 EST 2002


>>>>> "Ian" == Ian Bicking <ianb at colorstudy.com> writes:

>> The intention is that Albatross templates be valid XML - while
>> Albatross will do the expected thing in the example you give above,
>> it generally provides a "better" way, such as:
>> 
>> <al-img expr="something">

Ian> Do you mean that you have a template tag for every kind of tag
Ian> for which you would want to modify an attribute?  That's every
Ian> single HTML tag -- IMG is hardly the only one.  A dynamic CSS
Ian> class attribute, for instance, or events (onMouseOver, etc), id
Ian> tags, background colors...  there's a million possibilities.

I think I can see your point.  If I knew the perfect solution I would
have tried implementing that.

Ian> Plus you've got the same problems ZPT has, where it's not really
Ian> proper -- or perhaps even possible -- to dynamically generate CSS
Ian> or Javascript with your language, since they are generally
Ian> guarded by comments and are thus opaque to XML.

Ian> XML just seems so darn *hard*.

I tried doing the ZPT thing - it made the template loading run like a
slug on valium.  You end up with at least one object for every tag and
every attribute.  With the Albatross templates you only end up with
objects for the Albatross tags and attributes.  As machines get faster
this will not be such an issue.

- Dave

-- 
http://www.object-craft.com.au




More information about the Albatross-users mailing list