Re: Follow-up on issue #73

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
attribute!

 > 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.

-Erik

-- 
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/

Received on Wednesday, 27 June 2007 23:04:36 UTC