You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Tony Seebregts <to...@iveri.com> on 2008/01/28 11:30:18 UTC

SCXML . handled differently between SCXMLDigester and SCXMLParser ?

Hi,

Has the usage/declaration of <var> changed between the SCXMLDigester and 
the SCXMLParser ?

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.

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).

regards

Tony Seebregts



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: SCXML . handled differently between SCXMLDigester and SCXMLParser ?

Posted by Tony Seebregts <to...@iveri.com>.
Thanks Rahul - I somehow missed the update in the microwave example. 
Works perfectly now :-).

regards

Tony Seebregts

> 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
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: SCXML . handled differently between SCXMLDigester and SCXMLParser ?

Posted by Rahul Akolkar <ra...@gmail.com>.
On 1/28/08, Tony Seebregts <to...@iveri.com> 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: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org