W3C home > Mailing lists > Public > www-xpath-comments@w3.org > July to September 1999

FW: Issue: bracket-overload

From: Kay Michael <Michael.Kay@icl.com>
Date: Wed, 14 Jul 1999 17:50:12 +0100
Message-ID: <93CB64052F94D211BC5D0010A800133170EFA4@wwmess3.bra01.icl.co.uk>
To: "'www-xpath-comments@w3.org'" <www-xpath-comments@w3.org>
I'm pleased to see "bracket-overload" raised as an issue in section 2.2, and
since the question is asked, "what can be done about this?", I offer a
suggestion.

I see this as a significant potential cause of user errors, given that in
nearly all other contexts, strings are converted automatically to numbers
when the context requires it.

My vote would be to use [] for boolean predicates and "!" as a subscripting
operator, so one could write "foo[position()=3]" or "foo!3"; "foo[1]" would
then mean "foo[boolean(1)]" , while "foo!'3'" would mean the same as
"foo!3".

Mike Kay
Received on Wednesday, 14 July 1999 12:49:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:05:53 GMT