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

@context everywhere; applies to ref and value separately, or applies before ref, then ref applies to value?

From: Leigh L. Klotz, Jr. <Leigh.Klotz@Xerox.com>
Date: Thu, 17 Jun 2010 23:33:21 -0700
Message-ID: <4C1B1331.4060704@Xerox.com>
To: public-forms@w3.org
When we add @context to actions [1], would this work to deal with the 
lost repeat context in setvalue problem?

<repeat nodeset="instance('directory')/hotels/hotel[@good='yes' and 
@cheap='yes']">
<trigger>
<label>Book <output ref="name" /></label>
<setvalue ev:event="DOMActivate" context="." 
ref="instance('home')/hang/your/hat" value="name" />
</trigger>
</repeat>

(You can work around this loss of context with index(), but not in the 
case of nested repeats.)

Interestingly, Mark Birbeck suggests [2] that current() solves this 
problem, but my understanding was that
<setvalue ref="instance('home')/hang/your/hat" value="current()/name" />
was the same as
<setvalue ref="instance('home')/hang/your/hat" value="./name" />
and current() would be useful only inside predicates.

Am I wrong on this count?

[1] http://www.w3.org/MarkUp/Forms/wiki/@context_everywhere
[2] http://www.formsplayer.com/node/200

Leigh.
Received on Friday, 18 June 2010 06:33:53 UTC

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