This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Currently, 'to' is used in XQuery as an operator for range expression. However, 'to' is also a commonly used auxiliary word that can combine with many verbs. E.g. set ... to ..., update .... to ..., move ... to ..., send ... to ..., apply ... to .... However we might need to instroduce those statements when we introduce XML Update in next version. And there might be future prologs that need to use 'to'. If 'to' is a range operator like now, we cannot than introduce update expr to expr (: as 'to' always associates tighter as range operator :) but how to use syntax twist like update (expr) to expr (: where () is like in if () :) So I think it might be better to reserver 'to' for future use. And use other character for the range operator, e.g. '~'. Actuall, all auxialiary words like 'as', 'by', 'from' should not be used as an operator alone, which ensures maximum flexibility to introduce future syntax. I think now, only 'to' is an exception.
Good point, but we do not have reserved keywords since that would lead to backwards-compatibility. Also note that instead of update ... to ... you can say something else such as replace value of ... with ... Best regards Michael
I'm not saying reserving as keyword. I know XQuery does not have keyword. I'm just saying auxiliary word like 'to' should not be used as stand alone operator, which prevents it from being used in phrases and clauses in future. Of course, in future, we can always work around with syntax twists. So the trade-off is between twisting range operator now or twisting future syntax. I prefer twist the range operator now. '~' is not a bad candidate.
Because we know for sure now there's only one to twist. But we don't know how many we might need to twist in future. And 'to' is commonly used in many English phrases.
Henry, On June 29, 2005, the Query Working Group discussed your suggestion and decided to retain the current syntax of the "to" expression. We do not plan to make any changes to the XQuery specification based on this comment. If this response is acceptable to you, please respond by closing this bug report. Thanks, Don Chamberlin
I'm OK to close this issue.