Re: [SCXML] Incorrect XPath expressions in IR tests 153 & 155

Hi Ate,


> What I'm wondering about is why there is this required to define a <data>
> element in the first place. I assume there is (was) a good and explicit
> reason
> for it.
> The only argument I could come up with was that it is used/needed for
> data communication, ensuring a predefined 'container' <data> node.
> But if that argument is correct, *then* it doesn't make sense to NOT
> require
> this throughout all xpath data model accessors, including the variables, as
> otherwise this whole 'assurance' would break, depending on which xpath
> variable
> could/might have been 'broken' this 'contract' because of some
> intermediate <foreach> usage somewhere. Especially for xpath variables
> which *initially* were
> initialized/binded to a 'top level' <data> element.
>
> Anyway, this of course all is speculation and interpretation my side.
> As you said: the xpath data model definitely is causing a lot of problems.
>
> And just FYI (and I already informed Jim about this), I've decided earlier
> today to cancel my attempt to implement and complete the xpath data model
> for
> Apache Commons SCXML.
> Not all of a sudden or because of the current topic we're discussing, but
> because it just turns out too much trouble getting it right, for very
> little
> actual gain/usage. That is: in the case of Apache Commmons SCXML.
>

After a better review of the initial case you've mentioned here I
understand that:
Consistent setting of Var2 would result in:  Var2 => <data
id="Var2"><node>1</node></data>
However, my workaround resulted in:         Var2 => <node>1</node>

So I understand your proposal and why the extra access specifier is
required in order to reach the text node value.
I would also argue that consistent setting of Var2 (which is an upper-level
variable) would seem correct.

In any event, a pity to hear your XPath datamodel venture is coming to an
end.

Do you happen to have a list of other problem areas with the XPath
datamodel and tests, that could guide others who might want to pick up the
task?

Kind regards,
Zjnue

Received on Thursday, 12 February 2015 08:06:45 UTC