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

Elvis Stansvik <[email protected]> Tue, 21 Oct 2014 00:12:59 +0200
Newsgroups gmane.comp.web.voice
Message-ID <CAHms=easyeOoL9LNp1LqSD-y=QkFswuCeq0G0mdXK6L4txwRzg@mail.gmail.com>
(Sorry. Forgot to send my answer to list)

2014-10-20 23:40 GMT+02:00 Jim Barnett <[email protected]>:

> 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 <[email protected]> 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
>