W3C home > Mailing lists > Public > www-forms@w3.org > July 2007

Re: function-available gone?

From: John Boyer <boyerj@ca.ibm.com>
Date: Fri, 13 Jul 2007 09:18:28 -0700
To: Elliotte Harold <elharo@metalab.unc.edu>
Cc: www-forms@w3.org
Message-ID: <OF21098BC5.FDADDBDB-ON88257317.005843DA-88257317.00599835@ca.ibm.com>
Hi Elliotte,

Answers inline below.

John M. Boyer, Ph.D.
STSM: Lotus Forms Architect and Researcher
Chair, W3C Forms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com 

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer

Elliotte Harold <elharo@metalab.unc.edu> 
07/13/2007 03:12 AM

John Boyer/CanWest/IBM@IBMCA
Re: function-available gone?

John Boyer wrote:

> 1) the form author would have to set up an event handler to run the 
> XPath that called the function-available() function.

No, they just would have needed to use the if function in their XPath.

jb: every 'if' function is in an xpath that must be caused to run by 
something.  Above, I was getting at the fact that you must set up the 
conditions to cause that to happen.  To discover that you lack the 
equipment to run the form on startup, you do need to capture 
xforms-model-construct, for example, and then do an action that runs an 
XPath.  An easy action would be a message informing the user that the form 
will suck wind because the function is missing, but being able to halt the 
form is even better.  The mechanism as of Jan. 2002 is streamlined to do 

> 2) The form author would have needed a way to generate a processing halt 

> if the function returned false. 

Or they could have called a different expression instead,

jb: Assuming a different expression existed.  If one has an alternate 
expression involving the core functions, there would be little need to 
bother with the alternate execution path that calls the extension 
function.  So I have to assume you want to call different extension 
functions on a per XForms processor basis.  See below.

> By comparison, the current method allows the XForms processor to 
> determine very early in the lifecycle of the document (i.e. before 
> running any XPaths) whether or not the necessary functions are 
> available.  It is also a much easier way to make such a statement 
> compared to the function method outlined above.

How does one use the current machinery to take one path if a function is 
available and another if the function is not? Assume I do not want to 
halt procesing just because an extension function is missing.

jb: One doesn't do that right now because it was not (at the time) 
considered to be a very important use case.  About the only use for it is 
to create hack code that says "if processor A, f(x), else if processor B, 
g(x), else..." which smacks of the IE vs. Netscape fiasco all over again. 
Extensions allow the implementers to experiment with possible new 
functions for the standard and to deploy software, make money, and 
otherwise survive the here and now.  But they tend to be limited to 
systems deployed by that XForms provider, where 99% adherence to XForms 
provides 99% of the business advantage.  Meanwhile, maybe the hack stuff 
will be inevitable, but we've at least made some effort to suppress it. 

Elliotte Rusty Harold  elharo@metalab.unc.edu
Java I/O 2nd Edition Just Published!
Received on Friday, 13 July 2007 16:19:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:56 UTC