XPath 1.0 or 2.0 (Was: Re: XProc Minutes 11 May 2006)

Hi,

The minutes from 11/05/2006 say:
>    Richard: Isn't it the case that if you have XPath 2.0, you have to worry
>    about whether the data has schema type and so on.
>    ... I know that there are XSLT 2.0 implementations that don't support the
>    schema stuff and can give different answers.
>    ... If we introduce XPath 2.0 are we introducing new levels of
>    conformance.
> 
>    Norm: Yes, I think they would.
>    ... This seems useful and interesting, but not necessary.
> 
>    Norm observes, in response to Richard, that having XPath 2.0 would mean
>    that the pipeline engine would have to be able to import schemas
> 
>    Alessandro: In environments where 2.0 is available, requiring XPath 1.0
>    seems like a burden
> 
>    Norm prefers a single choice for interoperability
> 
>    Alex: By the time we become a recommendation, we have to have a cohesive
>    store around XSLT 2.0, XPath 2.0, XQuery, etc.
>    ... I don't think we can push that to V.next, we need to come out with a
>    recommendation that works well with those technologies.
> 
>    Norm: Wow. Ok.
> 
>    Norm worries that dealing with those things in 1.0 makes our goal of
>    finishing this year hopeless.
> 
>    Alessandro: I agree that there's complexity, but I think we should try
>    just a little bit harder to try to accommodate schemas and XPath 2.0
>    ... It might be the case that we come to the conclusion that we can't do
>    it in 1.0
> 
>    Murray: I would tend to agree with Norm, let's do something we can
>    accomplish in the timeframe we set out, even if it isn't' as grand and
>    robust and wonderful as we might achieve in the fullness of time.
>    ... We can move onto the next stage afterwards.
> 
>    Norm: Can Alex/Alessandro make some proposals to see if you can convince
>    us that using schemas, XPath 2.0, etc. is achievable in our timeframe?

I'm afraid that I've grown so used to having XPath 2.0 that I would be 
loath to be without it. It's not the schema-awareness or the type 
checking, it's the support for conditionals, regular expressions etc.

For example, I was thinking about how to set a parameter to hold a 
space-separated sequence of URIs where those URIs come from an arbitrary 
number of attributes in a document. In XPath 2.0, you can use the 
string-join() function, but there's no way of doing it in XPath 1.0.

I think we could get away with the same subset of XPath 2.0 
functionality as is used in Basic XSLT 2.0, namely:

  - no support for user-defined types (i.e. no importing of schemas)
  - all element and attribute nodes are untyped
  - only a subset of the XML Schema datatypes are supported

We would avoid all the schema import problems, but still give users the 
XPath 2.0 functionality that they will find useful.

Cheers,

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

Received on Friday, 12 May 2006 14:40:22 UTC