Abbreviated Syntax "//"

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;

http://www.w3.org/TR/xpath20/#abbrev

The abreviated, location path in 1.0 speak, or path expression in 2.0
language  i.e. "//"
Is actually interpreted as "/descendant-or-self::node()/" rather than
"/descendant-or-self::node()"

I beg to ask, why the trailing slash "/" ?  

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

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

emerson

Received on Monday, 15 September 2003 22:11:22 UTC