boolean inconsistency

Subject: boolean inconsistency
From: Elliotte Rusty Harold <elharo@xxxxxxxxxxxxxxx>
Date: Thu, 30 Nov 2000 10:21:03 -0500
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?

If not, I wouldn't suggest changing it now, but it's probably something to think about for XPath 1.1. This change shouldn't make illegal any existing legal XPaths.

--

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@xxxxxxxxxxxxxxx | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|                  The XML Bible (IDG Books, 1999)                   |
|              http://metalab.unc.edu/xml/books/bible/               |
|   http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ |
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |
+----------------------------------+---------------------------------+


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



Current Thread