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

Re: xpath2 functions returning ()

Subject: Re: xpath2 functions returning ()
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 4 Jan 2002 17:37:36 GMT
past functions of carlisle
Mike Kay (on xsl-list)
> Most of this came from a desire to do something akin to null values in
> SQL. 

Yes, but null makes sense in a table model as you've got to put
something there, but an XML query language shouldn't be making
assumptions about how data is encoded in the XML.

I may want to mark missing or unknown data with an attribute or a
different element or any number of possible encodings, so the query
language should make the minimum possible assumptions about the
relevance of a sequence being empty. The Xpath 1.0 behaviour of coercing
empty node sets to false was good and useful (as in lisp) but this seems
to be severely compromised in xpath 2.

> This [sum()] is flagged in the draft as an open issue 

Saying that perhaps
should return 0 rather than () for compatibility reasons suggests that
somehow one would want () but that 0 is being forced by the past, but I
can't see how this can ever be useful, if the stylesheet author wants to
special case an empty node set want to special case the empty sequence
(s)he can always do that before calling sum().

the situation with min or max is rather different as an empty set
doesn't have a maximum value, so here you might want to return ()
as essentially an error flag. (Alternative would be to return the infinte
float value, except that probably doesn't type check in general, or an


This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

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

Current Thread


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.
First Name
Last Name
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.