Re: XML and Albatross templates?

Frederick Polgardy <[email protected]> Thu, 05 May 2005 09:38:31 -0500
Newsgroups gmane.comp.web.albatross.general
Message-ID <[email protected]>
Agreed.  In fact, I've always avoided the lookup scheme, because I 
haven't had the time to grok exactly how it works and what it buys you 
(maybe I've just not seen any really good examples).

My only objection to the suggestion quoted below is that the al-if is at 
a different level of nesting than the other elements.  The only thing I 
could come up with off the top of my head would be something 
structurally more like:

<cond>
    <if test="">
    </if>

    <if test="">
    </if>

    <else>
    </else>
</cond>

But I'm not sold on it, and any change like that is bound to break 
existing stuff.

Miguel Marques wrote:

>Greetings...
>On Thu, 05 May 2005 14:03:31 +1000, Andrew McNamara <[email protected]> wrote:
>  
>
>>I suspect something like the following is closer to the spirit of the
>>current Albatross code:
>>
>>  <al-if expr="...">
>>    abc
>>    <al-elif expr="...">
>>      def
>>    </al-elif>
>>    <al-elif expr="...">
>>      ghi
>>    </al-elif>
>>    <al-else>
>>      jkl
>>    </al-else>
>>  </al-if>
>>
>>But I don't see that as any sort of improvement over the <al-lookup>
>>    
>>
>I think the improvement is that it  makes it much clearer that it's a
>if/elif/else construct than the al-lookup one does.  
>I often have web designers without a lot
>of programming experience build/edit pages and I think the above would
>be preferable.
>IMHO.
>
>							Miguel
>