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

Re: Follow-up on issue #73

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Thu, 28 Jun 2007 00:47:39 +0200
Message-ID: <4682E90B.5070706@orbeon.com>
To: public-forms@w3.org

John & all,

 > Moreover, the contention you make below, that @ref is used to bind
 > something to a single node, is not uniformly true in XForms.
 > In fact, it is ironic that one counterexample to your point is the
 > very mediatype element on *upload*, with which we seek authoring
 > consistency.

Mmhh, I discuss xforms:upload/xforms:mediatype in my email. It is an
example of how @ref is used to write data to a node.

 > The ref is also used on metadata elements such as label, help, hint
 > and alert *without* the imparting the behaviors you described for
 > MIPs and UI eventing.  These things are only true of *form controls*
 > that use a single node binding.

Good point here...

 > Other easy counterexamples come from the actions, including
 > setvalue, message and load.

With xforms:setvalue, @ref makes a lot of sense because the action
*writes* to a node. This is one case where the behavior is consistent
with UI controls (which in fact must write to nodes as per
xforms:setvalue according to the spec),

For xforms:message and xforms:load, I agree that it's different.

 > Then there is submission, too!

You can only submit a hierarchy that starts at a given node. So I
think @ref is good here too. For sure, you couldn't use a @value

 > The sum total of these serve to illustrate that by no means is it
 > correct to say that ref can only be used when you want MIPs or want
 > to write to a node, which should address your objections below,
 > except the last.

I should say that you make a good case above that the spec uses @ref
in more situations than I admitted (although I don't agree that
xforms:submission and xforms:setvalue fall in that category).

So I have to recognize that my argument is killed, mostly by the fact
that @ref is used on xforms:label and the likes. This is a strong
historical precedent if I can say so.

If we were designing things from scratch now, I would probably argue
that it is "bad" to use @ref on xforms:label and the likes, and that
@value should be used there because the purpose is just to extracts a
string value using an XPath expression, and @ref only accepts limited
XPath expressions.

I wish @ref was used consistently for actual "bindings"
(i.e. establishing a relationship between an object like a control and
a single node) rather than just extracting a value. But I guess that
will have to remain a wish unless we want to start deprecating the use
of @ref on xforms:label and co.


Orbeon Forms - Web Forms for the Enterprise Done the Right Way
Received on Wednesday, 27 June 2007 23:04:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:52 UTC