Re: Discrepancy in normative XPath references (XPath 1 and 2)?

Elvis,
  There are three implementations of the XPath data model that I am aware of, though none of them have yet submitted implementation reports. From comments from the developers of those implementations, I gather that finding a suitable XPath implementation requires some thought.
Jim



On Oct 20, 2014, at 5:15 PM, Elvis Stansvik <elvstone@gmail.com<mailto:elvstone@gmail.com>> wrote:

(Sorry. Forgot to send my answer to list)

2014-10-20 23:40 GMT+02:00 Jim Barnett <1jhbarnett@gmail.com<mailto:1jhbarnett@gmail.com>>:
Elvis,
  I will have to check with other group members before giving a definitive reply, but we do intend to specify XPath 1.0, while we like 2.0's definition of effective Boolean value to describe what to do when you pull a value out of XPath into SCXML in a Boolean context.  I will have to make sure we think that this is acceptably clear spec language.

Ah. Then I see the reason. Maybe it could be made more explicit what role the different references has. But good that you'll bring it up.


Note that you can build your data model on XPath 2 if you want. You just have to give it a different name than the one we define. Data models are intended to be pluggable and extensible, and you aren't limited to the ones that we define.

Yep. Upon reading further I realized that, and also saw in some earlier mail that there are no actual implementations of the XPath data model yet. Is that still the case?

One thing about implementing that is a little problematic is that not all XPath implementations allow you to define custom functions, which is needed to add the In(), and I think that some which do allow it will only allow functions with some "prefix:" to be added. Not sure though. This is of course assuming that you use a pre-built XPath library, and is no problem if you implement it yourself as part of implementing SCXML. I see no way around that though, just one thing that limits the selection of XPath libraries to pick from when implementing.

Thanks for your answers.

Elvis


Jim Barnett
Genesys

> On Oct 18, 2014, at 5:55 AM, Elvis Stansvik <elvstone@gmail.com<mailto:elvstone@gmail.com>> wrote:
>
> Hi folks,
>
> I only just heard about SCXML.. I got interested and started reading the spec.
>
> In "B.3 The XPath Data Model", the section starts out by referencing XPath 1.0:
>
>    "Implementations that support this data model must support [XPath 1.0]."
>
> But then in "B.3.2 Conditional Expressions" goes on to require XPath 2.0:
>
>     "The SCXML Processor must accept any XPath expression as
>       a conditional expression and must convert it into its effective
>       boolean value as described in section 2.4.3 of the [XPath 2.0]
>       specification."
>
> Could someone clarify? Should the first reference be to XPath 2.0 or is the discrepancy intended?
>
> Cheers,
> Elvis Stansvik

Received on Monday, 20 October 2014 22:24:57 UTC