W3C home > Mailing lists > Public > www-forms@w3.org > November 2006

Re: repeats

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Mon, 13 Nov 2006 15:22:17 +0100
Message-ID: <45587F99.7040209@orbeon.com>
CC: www-forms@w3.org

Jason,

 > really?

 > I haven't checked the detail of the new insert attributes - are you
 > seriously saying that you cannot use a bind as an origin or context?

The @origin and @context attributes are XPath expressions.

 > If thats the case then its just another nail in the whole bind
 > coffin I think - w3c folk - What is the point of creating binds if
 > you cant use them anywhere?

XForms uses different attribute names to refer to binds (@bind)
vs. XPath expressions (@ref, @nodeset, @context, @origin). From that
you can infer that @context and @origin must support either XPath, or
bind ids. Currently, it's the former. What you would probably want is
something like @context-bind and @origin-bind, but these attributes
are currently not defined in XForms 1.1.

This is good feedback for the working group though: I am not sure
whether we have considered using binds for the functionality or
@context or @origin so far.

 > please consider this when designing this stuff because xforms is
 > threatening to become a nightmare of xpath to manage.

Well, that's a open debate. You want to use binds everywhere, but I
usually don't use them much. So I for one don't have any problem at
all writing:

   @origin="instance('my-template')"

That's simple and clear enough for me (but that's just me).

 > Just think how painful it would be to add/remove/change any data
 > structure in any big complex array of forms if they are just
 > completely littered with xpath.

That's probably subjective. Someone could argue that you are littering
your form with binds ;-) Binds add an additional indirection, which
has benefits but also drawbacks - like the fact that you add to the
existing XPath "space" a new space of bind ids.

(Digression: This reminds me of things like Java ant files: people
always tend to write things like:

   <property name="war.lib" value="${war.inf}/lib"/>

Somebody could argue that sure, that's a valuable indirection, just in
case someday you want to change where the WAR lib directory is, or
where the WEB-INF directory is. The truth is that you are never going
to move it, and that the indirection is fairly pointless: you will be
as clear writing WEB-INF/lib instead of ${war.inf}/lib.

This not to say that binds are useless, but that they may, in some
circumstances, be just pointless indirections. End of philosophical
digression.)

-Erik

-- 
Orbeon Forms - XForms Everywhere
http://www.orbeon.com/blog/
Received on Monday, 13 November 2006 14:20:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:08 GMT