commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gavin Lei <gavingui2...@gmail.com>
Subject [SCXML] Do Apache Commons SCXML support XInclude and XPath 2.0?
Date Wed, 23 Feb 2011 14:19:44 GMT
Hi guys,
Do Apache Commons SCXML support XInclude and XPath 2.0? Today i want
to do some experiments to confirm this, but it seems that Commons
SCXML does not support XInclude and XPath 2.0.
1. about XInclude
I try to run such a SCXML document in Commons SCXML engine:

<scxml initial="s1" xmlns:xi="http://www.w3.org/2001/XInclude">

<xi:include href="datamodel.xml" parse="xml"/>

<state id="s1">

<onentry>

<script>x = x + 5;</script>

</onentry>

        <transition cond="x &gt; 1" target="print">

</transition>

    </state>

    <state id="print">

     <onexit>

     <log label="Result" expr="x"/>

     </onexit>

     <transition event="result" target="result" />

    </state>

   <final id="result"/>

</scxml>

datamodel.xml:

<datamodel>

<data id="x" expr="1"/>

</datamodel>

But it seems that Commons SCXML does not work for me. So, i want to
confirm that Commons SCXML support XInclude or not.

2, about XPath 2.0
In W3C's SCXML recommendation specification, it show that SCXML engine
should support XPath 2.0 and XPath 2.0 functions. And i tried a SCXML
document with this State in it:

<state id="errorSwitch" xmlns:fn="http://www.w3.org/2005/xpath-functions">
  <datamodel>
    <data id="time"/>
  </datamodel>

  <onentry>
    <assign location="$time" expr="fn:current-dateTime()"/>
  </onentry>

  <transition cond="fn:year-from-dateTime($time) > 2009" target="newBehavior"/>
  <transition target="currentBehavior"/>
</state>



But it seems that Commons SCXML does not work for me too. I think
XInclude and XPath support are both very importmant in SCXML
application.  So i want to confirm Commons SCXML support these
features or not. If yes, how can we use them ? If not, may be we can
do something to improve Commons SCXML. Thank You.

--
---------------------------------
Best Regards
Gavin Lei (雷银)
Email: gavingui2011@gmail.com

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


Mime
View raw message