RE: Grammar doesn't state that in Step AxisSpecifier is optional, assumes child.

(unofficial response: not endorsed by the XSL WG)

> The grammar states:
>
> [4]    Step    ::=    AxisSpecifier NodeTest Predicate*
>    | AbbreviatedStep
> [5]    AxisSpecifier    ::=    AxisName '::'
>    | AbbreviatedAxisSpecifier
>
> Which is confusing because this doesn't allow "node()" or
> "div" or many of
> the other paths given as examples.

These constructs are allowed by virtue of the fact that an
AbbreviatedAxisSpecifier may be empty.

Your observation that the grammar is "confusing" is certainly justified; it
wasn't written as a reference guide for users of the language, much more as
a specification for implementors, and the way the grammar is presented is
influenced by considerations of parser design that should be of no interest
to users of the language.

The style of presentation of the next version is likely to be very
different, though the changes will be geared towards improving the precision
of the specification and not necessarily towards ease of reading by the
end-user of the language.

Mike Kay

Received on Wednesday, 1 August 2001 14:20:06 UTC