W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2003

Re: Abbreviated Syntax "//"

From: Jonathan Robie <jonathan.robie@datadirect.com>
Date: Tue, 16 Sep 2003 15:07:16 -0400
Message-Id: <>
To: <emerson@harvestman.net>, <public-qt-comments@w3.org>

At 10:07 PM 9/15/2003, Emerson wrote:

>Ive just noticed something that hasn't bothered me in the past due
>mainly to an omission on my part.  In implementing some Xpath 2.0
>features into my now hybrid 1.0 processor I noticed that according to
>both specifications;
>The abreviated, location path in 1.0 speak, or path expression in 2.0
>language  i.e. "//"
>Is actually interpreted as "    " rather than
>I beg to ask, why the trailing slash "/" ?

To make it possible to say both:

     =>  /descendant-or-self::node()/foo


     => /descendant-or-self::node()/@foo

>This forces the abreviated syntax to have a following step, when there
>is a perfectly valid reason for wanting to use "//" alone.

I assume that the semantics you want are the same as this:


Of course, you might have some other semantics in mind, but I'm pretty sure 
what you want can be expressed in the current language.

>I don't like to deviate, but this is one part of the grammar that I
>don't think I will be enforcing...

Then you might not be completely conformant with the spec. There's no law 
against that, but it leads to interoperability problems, and you might want 
to consider whether you can simply document how your users can express the 
semantics you want to associate with '//'. Especially if you need to be 
able to advertise that you conform to our specs.

Received on Tuesday, 16 September 2003 15:07:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:49 UTC