[Xpath-ng] xpath-ng requirements

David Rosenborg darolst at pantor.com
Fri Nov 29 15:33:42 MST 2002


Hi Robin,

> I think we can first brainstorm and spec what we want, and then try to fix
the
> proposed syntax to be more compatible. One compatibility option that I see as
> more important is grammar-compatibility, ie that a parser written for either
> version (ideally, but if not at least a NG parser) ought to be able to parse
the
> tokens of the other version even if they don't make sense. It should be
possible
> for it to skip parts that it doesn't understand and keep on parsing, the way
CSS
> tried to do it.

I think grammar-compatibility will cripple the language. Forward compatibility
is handled at very specific points, like functions and hopefully extension axes
but
it need not be at the grammar level. In my opinion, there's really no point in
having
partial grammar level forward compatibility. It will be partial because
you have all different kinds of operators already. If you want full grammar
level
compatibility you'd need to explicitly differentiate among prefix, infix,
suffix
and what not operators.

The primary focus should be on making the syntax easy to parse for humans,
rather than
machines.

However, one possibility rises if we should decide to define a normative XML
syntax
mapping for XPath NG. The schema could be designed to allow all sorts of
directions of
compatiblility. Implementations of XPath NG could then be written on top of say
SAX or DOM
and just rely on commodity converters from XPath NG native syntax to XML.

Cheers,
David




More information about the Xpath-ng mailing list