Subject: [xsl] xpath2 functions returning () From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 4 Jan 2002 15:14:27 GMT |
Jeni > I think that rubs up against the problem that the name() function > actually returns an empty sequence for the document node (new > terminology 'root node' is 'document node' in XPath 2.0), rather than > an empty string Yet another example of the rather bizarre affection and special attention shown to empty sequences in X*2. In Xpath 1 an empty node set was just a node set that happened to be empty and had no special semantics, although did coerce to false rather than true. 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) David _____________________________________________________________________ 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: RE: Postional predica, Jeni Tennison | Thread | Re: [xsl] xpath2 functions returnin, Jeni Tennison |
Re: [xsl] Re: RE: Postional predica, Jeni Tennison | Date | Re: [xsl] xpath2 functions returnin, Jeni Tennison |
Month |