- From: Howard Katz <howardk@fatdog.com>
- Date: Fri, 4 Jul 2003 09:10:46 -0700
- To: "Kay, Michael" <Michael.Kay@softwareag.com>, <www-ql@w3.org>
- Message-ID: <IKEOLCDFPBBPPAHGNKKOKEOICFAA.howardk@fatdog.com>
RE: what is the meaning of literals in step expressions?Thanks for the clarification. The other viewpoint (not that I'm espousing it, just pointing it out as a point of information) is that the more rules the grammar enforces, the less the type system (and the poor implementer :-) has to do. Ta, Howard -----Original Message----- From: www-ql-request@w3.org [mailto:www-ql-request@w3.org]On Behalf Of Kay, Michael Sent: Friday, July 04, 2003 7:47 AM To: Howard Katz; www-ql@w3.org Subject: RE: what is the meaning of literals in step expressions? > > I just realized that the existing grammar allows expressions > such as "1/3", "//book/2", and "/bib//46.5/editor". Do > patterns such as these (with literals in step expressions) > have any valid semantic interpretation? What should an XQuery > implementation do on encountering such an expression? Thanks, Howard > The operands of "/" must be nodes, and literals are never nodes, so such expressions will always give a type error. We have generally chosen not to make the grammar enforce rules that are better enforced by the type system. Writing 1/3 is just like writing "a"+"b", which is also a type error rather than a syntax error. Michael Kay
Received on Friday, 4 July 2003 12:09:18 UTC