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

RE: @if and @src

From: Klotz, Leigh <Leigh.Klotz@xerox.com>
Date: Fri, 12 Jun 2009 11:16:27 -0700
Message-ID: <E254B0A7E0268949ABFE5EA97B7D0CF407F492A3@USA7061MS01.na.xerox.net>
To: "Mark Birbeck" <mark.birbeck@webbackplane.com>
Cc: <public-forms@w3.org>
Mark, this is a comment only on the bind use case issue.  I posted this proposal in response to a use case being discussed by Steven Pemberton and John Boyer concening an XForms model externally referenced by two pages, with submission-based page transition unhindered by validity constraints of the final submission.  Erik Bruchez and I sugested using the opacity of HTTP GET to produce variant models from the same (or similar) URIs, relying on the resource to produce a model appropriate to the page state.  John asked for a single lexical representation of a model, and I proposed bind/@if with nested binds as a means to achieve it.  I believe someone else on the call (Erik? Nick van den Bleeken?) also mentioned the idea of using XPath predicates accessing the resource GET parameters as well, combining the two proposals of using a single lexical representation and allowing the including pages to pass state to the model through its resource reference.

So that's the use case for bind/@if, however it's spelled.

Leigh.

-----Original Message-----
From: Mark Birbeck [mailto:mark.birbeck@webbackplane.com] 
Sent: Friday, June 12, 2009 3:51 AM
To: Klotz, Leigh
Cc: public-forms@w3.org
Subject: 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 18:17:11 UTC

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