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

Re: server-side validation: relevance

From: Aaron Reed <aaronr@us.ibm.com>
Date: Tue, 14 Feb 2006 17:48:50 -0600
To: www-forms@w3.org
Message-ID: <dstqd0$lrr$1@sea.gmane.org>

Jay Knight wrote:

> I'm playing arround with validating xforms submission on the
> server.... and this question came up.... How can I tell if something
> was supposed to be relevant on submission?  Consider this simple
> example.
> 
> <model>
>     <instance>
>         <things>
>             <something />
>             <else />
>         </things>
>     </instance>
>     <bind nodeset="something" relevant="../else = 4" />
>     <submission action="..." method="post" />
> </model>
> 
> .... snip ...
> 
> <input ref="something"><label>Something</label></input>
> <input ref="else"><label>Else</label></input>
> 
> And two possible (valid) submitted instances are:
> 
> <things>
>     <something>blah</something>
>     <else>4</else>
> </things>
> 
> 
> <things>
>     <else>3</else>
> </things>
> 
> (Pease excuse any errors... I haven't actually tested this one out :)
> 
> The idea is that "something" should only be relevant if the value of
> 'else' is 4.  The problem is that "../else = 4" is a relative xpath
> expression whose context node is /things/something, which in the case
> of the second submission is not present.  Therfore, I cannot evaluate
> that xpath expression meaningfully (so it seems).
> 
> Any ideas?
> 
> Jay K
> 
> 
> 

I guess that I don't get what you are asking.  Irrelevant data nodes are 
not submitted by an xform 
(http://www.w3.org/TR/2005/PER-xforms-20051006/index-all.html#submit). 
Any node in a submission that reaches the server will be relevant.
Received on Wednesday, 15 February 2006 00:00:22 GMT

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