[xquery-talk] operations on derived numeric type

Michael Sokolov msokolov at safaribooksonline.com
Fri Aug 30 07:57:37 PDT 2013

On 08/30/2013 10:45 AM, David Carlisle wrote:
> On 30/08/2013 15:07, Michael Sokolov wrote:
>> PS how many times will I forget that $x-1 is parsed as a variable
>> name. A token allowed in a symbol *and* as an operator makes no
>> sense.  Old argument I'm sure.
> for variables it could (perhaps) have been different but it's more
> consistent to keep all identifiers based on the XML Name production, and
> the fact that x-1 is parsed as the element name x-1 but x -1 is parsed
> as the value of the element x minus 1 caused a lot of headaches in the
> design of xpath1, but couldn't really be avoided given that x-1 is a
> legal element name. It's not really any different to the difference
> between $x div 1 and $xdiv1.
> David
It is different because of conventional expectations about operators 
being represented by punctuation characters.  If only we had ÷ on our 


More information about the talk mailing list