This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1449 - Shuld 'to' be reseved?
Summary: Shuld 'to' be reseved?
Status: CLOSED WONTFIX
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 1.0 (show other bugs)
Version: Last Call drafts
Hardware: All Windows 2000
: P2 normal
Target Milestone: ---
Assignee: Don Chamberlin
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-15 01:58 UTC by Henry Luo
Modified: 2005-07-01 16:45 UTC (History)
0 users

See Also:


Attachments

Description Henry Luo 2005-05-15 01:58:17 UTC
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.
Comment 1 Michael Rys 2005-05-15 03:29:06 UTC
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
Comment 2 Henry Luo 2005-05-15 05:38:04 UTC
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.
Comment 3 Henry Luo 2005-05-15 05:56:47 UTC
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.
Comment 4 Don Chamberlin 2005-06-30 22:04:36 UTC
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
Comment 5 Henry Luo 2005-07-01 02:35:43 UTC
I'm OK to close this issue.