Spec-ready text for the valid() function (ACTION-1820 - Bruchez to write up valid function)

All,

Here it is:

http://www.w3.org/MarkUp/Forms/wiki/XPath_Expressions_Module#The_valid.28.29_Function

This is based on the ehforms proposal [1], the Orbeon implementation
[2], and our discussions on Monday.

Some notable points:

1. I integrated the notion of ignoring non-relevant nodes by default.
Like for submission, I added an optional parameter to turn this
behavior off.

2. I created a version of the function that doesn't take any
parameters at all, as it is convenient for uses such as
ref=".[valid()]".

3. We could in theory add a fourth version of the function that just
takes a boolean, but I am not entirely sure if this kind of
overloading is kosher in XPath 2.0:

  xf:valid($relevant as xs:boolean) as xs:boolean

4. I added a note to clarify that the function can be "dangerous", and
I created a list of "safe" uses. Comments on whether this is a good
idea are welcome.

5. Finally, the function prohibits use in binds as this is usually unsafe.

Requesting comments on this.

-Erik

[1] http://www.exforms.org/all.html#id4497998
[2] http://wiki.orbeon.com/forms/doc/developer-guide/xforms-xpath-functions#TOC-xxforms:valid-

Received on Thursday, 1 September 2011 17:02:24 UTC