Hi,
I've an issue regarding the migration from SCXMLDigest to the new
SCXMLParser. I've attached both the test and the input file.
Is it a known bug?
--
Best Regards,
Davide Angelocola
import java.io.IOException;
import org.apache.commons.scxml.io.SCXMLDigester;
import org.apache.commons.scxml.io.SCXMLParser;
import org.apache.commons.scxml.model.ModelException;
import org.apache.commons.scxml.model.SCXML;
import org.junit.Test;
import org.xml.sax.SAXException;
public class SCXMLDigesterTest {
@Test
public void digest() {
SCXML scxml;
try {
scxml =
SCXMLDigester.digest(this.getClass().getResource("/dummy.xml"),
null);
} catch (IOException e) {
throw new RuntimeException(e);
} catch (SAXException e) {
throw new RuntimeException(e);
} catch (ModelException e) {
throw new RuntimeException(e);
}
}
@Test
public void parse() {
SCXML scxml;
try {
scxml =
SCXMLParser.parse(this.getClass().getResource("/dummy.xml"),
null);
} catch (IOException e) {
throw new RuntimeException(e);
} catch (SAXException e) {
throw new RuntimeException(e);
} catch (ModelException e) {
throw new RuntimeException(e);
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initialstate="Stato_0">
<datamodel>
<data name="tables">
<actions/>
<preActions/>
<conditions/>
<events>
<event name="Evento_0"/>
<event name="Evento_1"/>
</events>
</data>
</datamodel>
<state id="Stato_0">
<state id="Stato_0.1" parentid="Stato_0">
<datamodel>
<data name="AdditionalInformation">
<information label="Stato_0.1" lastID="0" type="3">
<position heigth="76" width="103" x="29" y="59"/>
</information>
</data>
</datamodel>
<transition event="Evento_0" cond="null">
<target next="Stato_0.2">
</target>
</transition>
</state>
<initial parentid="Stato_0">
<transition event="null" cond="null">
<target next="Stato_0.1">
</target>
</transition>
</initial>
<datamodel>
<data name="AdditionalInformation">
<information label="Stato_0" lastID="2" type="0">
<position heigth="1000" width="1000" x="0" y="0"/>
</information>
</data>
</datamodel>
<state id="Stato_0.2" parentid="Stato_0">
<datamodel>
<data name="AdditionalInformation">
<information label="Stato_0.2" lastID="0" type="3">
<position heigth="73" width="110" x="178" y="95"/>
</information>
</data>
</datamodel>
<transition event="Evento_1" cond="null">
<target next="Stato_0.2">
</target>
</transition>
</state>
</state>
</scxml>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]