- From: Ulrich Nicolas Lissé <unl@dreamlab.net>
- Date: Wed, 17 Jun 2009 15:18:07 +0200
- To: "Leigh L. Klotz, Jr." <Leigh.Klotz@Xerox.com>
- Cc: public-forms@w3.org
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