Re: Selector Clarification

Hi Daniel,

> The XPath expresssion in the SchForSch is actually very broken, like
> in accepting "a:1", it seems it wasn't defined and tested with the
> idea that the expression would really be the normative definition.
> http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002AprJun/0005.html
> I would give more trust to the written section over the expression
> itself.

Sure, but the written section at
http://www.w3.org/TR/xmlschema-1/#scc-selector-value-ok gives a more
detailed description, including some BNF which I'd take as normative,
and that allows a selector XPath of '.':

  [1]    Selector    ::=    Path ( '|' Path )*
  [2]    Path        ::=    ('.//')? Step ( '/' Step )*
  [3]    Step        ::=    '.' | NameTest
  [4]    NameTest    ::=    QName | '*' | NCName ':' '*'

I suspect that allowing '.' is actually an oversight, since compliance
with this BNF has an alternative which I think is meant to be
equivalent: "[The selector value] must be an XPath expression
involving the child axis whose abbreviated form is as given [in the
BNF] above." Mind you, they wouldn't be equivalent anyway, since the
BNF allows the descendant-or-self:: axis to be used (in the
abbreviation //), though only at the start of the path.

Cheers,

Jeni

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

Received on Wednesday, 10 April 2002 04:55:17 UTC