RE: @if and @src

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