W3C home > Mailing lists > Public > www-xpath-comments@w3.org > October to December 2000

Re: boolean inconsistency

From: James Clark <jjc@jclark.com>
Date: Fri, 01 Dec 2000 09:02:04 +0700
Message-ID: <3A27069C.3B70BA0B@jclark.com>
To: Elliotte Rusty Harold <elharo@metalab.unc.edu>
CC: www-xpath-comments@w3.org
Elliotte Rusty Harold wrote:

> I've noticed an inconsistency in the XPath 1.0 spec. The boolean()
> type conversion function is defined like this:
> boolean boolean(object)
> However the other type conversion functions are defined like this:
> string string(object?)
> number number(object?)
> In other words, all the type conversion functions except boolean()
> will operate on the context node if the argument is omitted. Is there
> a reason for this inconsistency?

Yes.  boolean(.) always returns true(), so omitting the argument to
boolean() is pointless and allowing it would serve only to provide
another way for a user to make a mistake that couldn't be detected by
the XSLT processor.

Received on Thursday, 30 November 2000 21:09:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:02:14 UTC