commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sudeep Gandhe <>
Subject [SCXML] problems with Data() function in Jexl
Date Sun, 09 Dec 2007 01:46:05 GMT
I tried the following scxml file with the StandaloneJexlExpressions. I don't get the correct
value for "Data(d, '//tar/@name')". Can you explain, what's wrong ?

-- Sudeep

SCXML file :

<?xml version="1.0"?>
<scxml xmlns=""  version="1.0" initialstate="first">

         <data name="d">
                 <foo xmlns="">
                                 <tar name="po">12</tar>
         <data name="p">
                 <one xmlns=""/>

<state id="first">
                 <log label="//tar" expr="Data(d, '//tar')"/>
                 <!-- //tar/@name doesn't work -->
                 <log label="//tar/@name" expr="Data(d, '//tar/@name')"/>
                 <log label="foo/bar/tar" expr="Data(d, 'foo/bar/tar')"/>
                 <!-- foo/bar/tar/@name  works -->
                 <log label="foo/bar/tar/@name" expr="Data(d, 'foo/bar/tar/@name')"/>
         <transition event="first.done" target="second"/>
                 <assign location="Data(p, 'one')" expr="Data(d, '//bar')"/>

<state id="second" final="true">
                 <log label="//tar" expr="Data(p, '//tar')"/>
                 <!-- //tar/@name doesn't work -->
                 <log label="//tar/@name" expr="Data(p, '//tar/@name')"/>
                 <!-- one/tar/@name  works -->
                 <log label="one/tar/@name" expr="Data(p, 'one/tar/@name')"/>

View raw message