On 3/1/07, David Huynh <[EMAIL PROTECTED]> wrote:
> Hi Johan, I have a similar need elsewhere... and I'd propose yet another
> solution specifically for the tabular view: support row templates. E.g.,
>
>     <table ex:role="view" ex:viewClass="Exhibit.TabularView">
>           <tr>
>              <td ex:content=".foo"></td>
>              <td><a ex:href=".url" ex:content=".title"></a></td>
>              <td class="foo-bar"><span ex:content=".first-name"></span>
> <span ex:content=".last-name"></span></td>
>           </tr>
>     </table>

Not too bad, despite losing much of the beautifully condensed power of
the original, when used.

I'd still want to be able to generate a title which has no link,
though. Add an ex:if-not-exists test, and we're there, or, better
still, something along the lines of the case construct, but
implementing the LISP "cond" construct instead, i e:

(cond ((eq name "Johan") (take some action))
      ((is-after year 2000) (some other action))
      (t (otherwise))

...testing one condition at a time until it finds a true one, or going
with the final option.

-- 
 / Johan Sundström, http://ecmanaut.blogspot.com/

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to