Re: choose() function return type

Hi Erik,

Please send the discussion emails to public-forms (or www-forms) but not 
www-forms-editor.

It's a good point you make.  If I recall correctly here, the feeling was 
that more efficient code could be written to produce the result if the 
type of the output could be decided from the types of the inputs.

So the discussion here would be to weigh that possible efficiency against 
the generalization.

Cheers,
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





Erik Bruchez <ebruchez@orbeon.com> 
Sent by: www-forms-editor-request@w3.org
07/18/2007 06:46 AM
Please respond to
ebruchez@orbeon.com


To
"Forms WG (new)" <public-forms@w3.org>
cc
www-forms-editor@w3.org
Subject
choose() function return type







All,

In section "7.11.3 The choose() Function", I read:

   "If the types of the two object parameters are not the same
    (e.g. one node-set and the other a string), then the type of the
    object returned is determined by rationalizing the types of the two
    object parameters in the same manner as XPath comparison."

I am wondering why this needs to be specified at all. As per its
prototype, the function returns an object. At runtime, the returned
object will be either of the type of the first object parameter if
that first object is returned, of the type of the second object
parameter if that second object is returned.

Am I missing something?

-Erik

-- 
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/

Received on Monday, 23 July 2007 16:32:32 UTC