Re: XPath 1.0 or 2.0

Grosso, Paul wrote:
> I'm not a fan of predicating the XML processing model spec
> on XPath 2.0.  Allowing use of XPath 2.0 is fine, but requiring
> support of it for XML processing, nope, bad idea.

I'm in agreement with not requiring it.

I do like the idea of declaring what XPath version you are using
and implementations can choose to refuse pipelines or have
some default compatibility story.

Maybe we can have a requirement for all implementations to
support XPath 1.0 and allow pipeline authors to specify 2.0?  If
you specify 2.0, you necessarily subset your choice of implementations.

The default could be XPath 1.0.

This allows allows us to change the default in future versions
of the spec.

Here's a proposal:

   * if you specify an XPath version, you are declaring an
     explicit requirement.
   * implementations are allowed to provide XPath 2.0 or
     other future versions.
   * if you specify an earlier version (e.g. 1.0) when
     a later version is available, there is already a well-defined
     compatibility between the versions (see the XPath 2.0
     spec for that).
   * implementations should/must warn users when they use
     a different version than what the author of the pipeline
     specified.
   * if you don't specify the version of XPath, it defaults
     to the version specified by the pipeline language
     version--which would be 1.0 for our first version.

An optional feature would be the "halt and catch fire" option
for when the XPath version doesn't match.  I'm not sure that
is a good idea since there is already a compatibility story
for what happens to XPath 1.0 expressions in XPath 2.0.


--Alex Milowski

Received on Sunday, 14 May 2006 21:07:54 UTC