Re: @if and @src

Hi Leigh,

> [...]
>
> Add @if to all elements except...
>
> [...]

Nice idea, but could I suggest that we don't use @if? The problem is
that it's used on actions, so you have to add an extra step in your
mental process when reading someone's markup, to decide whether what
you are looking at is an action or not.

I think in general it's better to name something as close as possible
to what it is. Even if we later spot common factors and shift the name
slightly, that first step avoids confusion.

So in this case I would say that something like @relevant would be
more fitting for most of your examples:

  <elt ref="x" relevant="pred" /> --> <elt ref="x[pred]" />
  <elt nodeset="x" relevant="pred" /> --> <elt nodeset="x[pred]" />

  <select ref="abc">
    <label>ABC</label>
    <choices>
      <item relevant="../def = 1">
        <label>Hi</label>
        <value>Hi</value>
      </item>
    </choices>
  </select>

We've been talking about 'on the glass' attributes for a while now, so
your proposal fits nicely with that, and you can imagine having
@readonly, etc., as well.

I don't think using @relevant works so well for the bind example that
you gave, though; if you really think that's a useful scenario then I
think it would need a different attribute.

Regards,

Mark

-- 
Mark Birbeck, webBackplane

mark.birbeck@webBackplane.com

http://webBackplane.com/mark-birbeck

webBackplane is a trading name of Backplane Ltd. (company number
05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
London, EC2A 4RR)

Received on Friday, 12 June 2009 10:51:44 UTC