qt - Splitting SCXML over multiple xml files -
i crating different scxml files used qt application. in order structure better state machine separate common part part of 1 machine custom state of every other machine. do thought split state machine on 2 files.
parent file: parentstatemachine.scxml
<?xml version="1.0" encoding="utf-8"?> <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" binding="early" xmlns:qt="http://www.qt.io/2015/02/scxml-ext" name="mystatemachine.scxml" qt:editorversion="4.2.2" datamodel="ecmascript" initial="s1" xmlns:xi="http://www.w3.org/2001/xinclude"> <state id="init"> <transition type="external" event="prepare" target="configure"/> </state> <state id="configure"> <transition type="external" event="start" target="run"/> </state> <parallel id="run"> <!-- include here application specific states--> <transition type="external" event="stop" target="end"/> </parallel> <final id="end"> </final> </scxml>
application specific: applicationspecific1.scxml
<state id="applicationspecificstate1"/> <state id="applicationspecificstate2"/> <state id="applicationspecificstate3"/>
i have tried including application specific within parent 1 in 2 ways:
i tried inserting
<xi:include href="applicationspecific1.xml"parse="text"/>
instead of comment.i tried adding
<!doctype scxml [<!entity innerfile system "applicationspecific1.scxml">]>
right afterxml
tag , adding&innerfile;
instead of comment.
when load documents parsed fine behavior deduce not takes account whatever defined in application specific scxml.
ps: have found old unresolved bug report hope resolved. https://bugreports.qt.io/browse/qtbug-1088
Comments
Post a Comment