[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xpath2 functions returning ()

Subject: xpath2 functions returning ()
From: Mulberry Technologies List Owner<xsl-list-owner@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 4 Jan 2002 18:47:03 -0500
xpath2
>To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>Reply-To: burisch@xxxxxxxxxxx
>Subject:  xpath2 functions returning ()
>From: Curtis Burisch <burisch@xxxxxxxxxxx>
>Date: Fri, 04 Jan 2002 15:49:21 +0000
>
>All,
>
>>Xpath 2 seems to want to treat () special in many contexts. Most of
>which
>>seem unfortunate:-) The example above is one, sum() returning the
>empty
>>sequence instead of 0 is another (that seems to be much worse, and
>will
>>mean that you will almost always have to special case any value
>returned
>>from sum() to check if it is empty and if so replace it with 0)
>
>Isn't this just asking for trouble? Any programmer knows instinctively
>that a function is declared to have a particular result-type. Having
>sum(something) return a number *or* an empty sequence depending on what
>is passed in is ludicrous. I can't think of a single valid reason for
>this behaviour. In a generic pseudo-language, I'd expect sum('Fred', '
>Marmalade', 23) to be 23; and sum() to be 0. Are we prepared to teach
>an endless string of newbies how to use sum() ??
>
>Sorry for the 'me too' rant but it had to be said ...
>
>Best regards,
>Curtis
>
>--



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.