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

Re: @if and @src

From: Ulrich Nicolas Lissť <unl@dreamlab.net>
Date: Wed, 17 Jun 2009 15:18:07 +0200
Cc: public-forms@w3.org
Message-Id: <EAD581AF-F31F-46A4-A500-B8A0DEA2602C@dreamlab.net>
To: "Leigh L. Klotz, Jr." <Leigh.Klotz@Xerox.com>
Hi Leigh,

I like the idea of allowing @if virtually everywhere. I think it has  
one more advantage: It might open up XForms for expression languages  
which - other than XPath - might not support something like predicates  
or filters.

Uli.

On 11.06.2009, at 22:11, Leigh L. Klotz, Jr. wrote:
> Here's a partly-baked idea that came from today's vFtF:
>
> Add @src to model as Steven suggested, but also to bind.
> Add @if to all elements except
> - model
> - value
> - label
> - submission
> - mediatype
> - filename
>
> For all elements already posessing @ref or @nodeset, @if is roughly  
> equivalent to what can be done by these existing patterns:
> <elt ref="x" if="pred" /> --> <elt ref="x[pred]" />
> <elt nodeset="x" if="pred" /> --> <elt nodeset="x[pred]" />
>
> but it's more declarative and it's less likely to lead to unintended  
> consequences
> - relative paths would be allowed with context references, instead  
> of having to be absolute
> - no interop problem of some processors supporting "." in variance  
> with XPath 1.0 spec and others properly but pedantically requiring  
> self::node().
>
> So, putting them together:
>
> <bind if="mode=view">
> <bind nodeset="/" readonly="true" />
> </bind>
>
> Or, consider this:
>
> <select ref="abc">
> <label>ABC</label>
> <choices>
>    <item if="../def = 1">
>       <label>Hi</label>
>       <value>Hi</value>
>    </item>
> </choices>
> </select>
>
>

--
Ulrich Nicolas Lissť
Received on Wednesday, 17 June 2009 13:18:46 UTC

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