[SCXML] Question regarding the meaning and purpose of type 'location expression in namelist and param location attributes

Hi,

I'm puzzled about the meaning and purpose of the type 'location expression' for 
the <invoke> and <send> namelist attribute and the <param> location attribute in 
the SCXML specification.

The namelist attribute is described in the specification as

   "A space-separated list of one or more data model locations to be included as 
attribute/value pairs with the message."

followed with

   "(The name of the location is the attribute [...])".

All the examples given in the specification as well as in the IPR tests only 
make use of datamodel data id values as 'names'.

If that is the (only) intended usage, why then should this be of type 'location 
expression' and not more transparently typed as "data element IDs"?

On the other hand, if this really should be interpreted as dynamic location 
expressions *yielding* a datamodel value, then "(The name of the location is the 
attribute [...])" becomes a very complex one, where only the result of the 
expression is a location for which the 'name' has to be derived dynamically.

Currently I presume the first interpretation is intended, but in any case IMO 
the current type definition and description can use some stronger clarification.


And I have a somewhat related question concerning the purpose of and distinction 
between the <param> expr and location attributes, which are to be used mutually 
exclusive.

The description for the <param> location attribute says:

   "A location expression [...] that specifies the location in the datamodel to 
use as the value."

Taken literally, this actually means the location *itself* should be passed as 
value, not the value *at* the location.
But I don't think that is the intended purpose, right?

AFAICT the purpose of the location attribute is only to yield the value at the 
specified location, not the location itself.
But then: why not just and only use the expr attribute always, which should be 
giving the exact same result, if it targets a datamodel location?

Maybe there is some nuance I'm overlooking here, possibly particular to certain 
expression languages, but AFAIK the intend for both the expr and location 
attributes is or should be exactly the same: yield the data value.
So I'm missing the point why I ever would need to use (and therefore need to 
implement) the location attribute.

I hope I've described my confusion clearly enough :)

Kind regards,

Ate

Received on Tuesday, 28 October 2014 02:32:26 UTC