On 1/28/08, Tony Seebregts <[EMAIL PROTECTED]> wrote: > Hi, > > Has the usage/declaration of <var> changed between the SCXMLDigester and > the SCXMLParser ? > <snip/>
Yes, the content model for executable content was opened up such that there is no longer any need for the WD to talk about <var>. However, since it is clearly useful IMO, and for backwards compatibility, we have retained support for it, albeit in our own namespace ( identified by http://commons.apache.org/scxml ). > Using the SCXMLDigester (as allowed but deprecated in 0.7), declaring a > var invokes the Var constructor while compiling the script and the var > is accessible from the context during execution. Compiling the same > script with SCXMLParser never invokes the Var constructor and any > 'assign' statement that references the variables throws an > UNDEFINED_VARIABLE error. > <snap/> Correct, that is as-expected. > The SCXMLParser javadoc does mention that the XML namespace for var's > has changed but there don't seem to be any changes in the sample and > test scripts (at least that I could see). > <snip/> The tests cover both, so it depends on what tests you looked at (OTOH, its known that the tests could be better organized -- that process is starting, slowly). For example, if you are familiar with the microwave example from the first WD, here is the before (long URLs, may get fragmented): http://svn.apache.org/repos/asf/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-01.xml and after: http://svn.apache.org/repos/asf/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/microwave-03.xml You'll need to make similar changes to use the new SCXMLParser. -Rahul > regards > > Tony Seebregts > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
