On Thu, May 6, 2010 at 10:37, Rahul Akolkar <[email protected]> wrote: > Ah, too much cut and paste. Since this assignment isn't necessarily > using a location expression, use: > > <assign name="AAA" expr="'s3'"/> > > For details, see: > > http://commons.apache.org/scxml/guide/datamodel.html#assign > > Alternatively, the <data> could be made to store XML content (like the > travel reservation example at the above URL), and the location > attribute could then be used in a portable way.
using name= instead of location= solves the problem. however it's not clear to me why it solves the problem (i did read the doc page you pointed at). From the doc: using name is for: "Assigning to a scratch space variable" using location is for "Assigning a literal to a data subtree" our case here is the second, however the one that works is the first. If we want to assign to a <data> item that is inherited from a parent scxml file, why do we have to use name instead of location? finally, what do you mean with your last paragraph? (in particular with: "and the location attribute could then be used in a portable way", do you mean that there is a way to decouple b.scxml from being usable only in a.scxml (or anything providing a <data> item named AAA) if the link AAA is implemented as xml as in the reservation example?) thanks again. best, fabrizio. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
