W3C home > Mailing lists > Public > public-forms@w3.org > June 2009

Re: @if and @src

From: Mark Birbeck <mark.birbeck@webbackplane.com>
Date: Fri, 12 Jun 2009 11:51:04 +0100
Message-ID: <ed77aa9f0906120351q3d20aca5h74661148f4f2ad06@mail.gmail.com>
To: "Leigh L. Klotz, Jr." <Leigh.Klotz@xerox.com>
Cc: public-forms@w3.org
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

This archive was generated by hypermail 2.3.1 : Tuesday, 1 October 2013 22:06:51 UTC