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

server-side validation: relevance

From: Jay Knight <jhknight@gmail.com>
Date: Sat, 11 Feb 2006 19:06:20 -0600
Message-ID: <f95b617c0602111706i7b358c96y6bca8005233d39a6@mail.gmail.com>
To: www-forms@w3.org

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

            <something />
            <else />
    <bind nodeset="something" relevant="../else = 4" />
    <submission action="..." method="post" />

.... snip ...

<input ref="something"><label>Something</label></input>
<input ref="else"><label>Else</label></input>

And two possible (valid) submitted instances are:



(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
Received on Sunday, 12 February 2006 07:45:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:16 UTC