Re: Erratum: XPaths in Canonical XML Recommendation

Hi John,

> Thanks for the note, but I don't understand why you claim that //.
> is illegal. From the XPath spec:
>
> Expr -> ... -> LocationPath -> AbsoluteLocationPath ->
> AbbreviatedAbsoluteLocationPath -> '//' RelativeLocationPath -> '//'
> Step -> '//' AbbreviatedStep -> '//.'
>
> Clearly it is legal according the BNF rules in the XPath
> specification. Perhaps you have an implementation of XPath that
> contains an error?

Cripes, you're right. I apologise. I'd never seen that construction
used before because it's meaningless except, I guess, in this case.
When you write it out in full you can see why:

  /descendant-or-self::node()/self::node()

is equivalent to:

  /descendant-or-self::node()

Sorry for my error,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Friday, 14 December 2001 13:36:47 UTC