*/
private static void readHistory(final XMLStreamReader reader, final Configuration configuration,
final SCXML scxml, final TransitionalState ts)
throws XMLStreamException, ModelException {
History history = new History();
history.setId(readOrGeneratedTransitionTargetId(reader, scxml, ELEM_HISTORY));
history.setType(readAV(reader, ATTR_TYPE));
ts.addHistory(history);
scxml.addTarget(history);
loop : while (reader.hasNext()) {
String name, nsURI;
switch (reader.next()) {
case XMLStreamConstants.START_ELEMENT:
pushNamespaces(reader, configuration);
nsURI = reader.getNamespaceURI();
name = reader.getLocalName();
if (XMLNS_SCXML.equals(nsURI)) {
if (ELEM_TRANSITION.equals(name)) {
history.setTransition(readTransition(reader, configuration));
} else {
reportIgnoredElement(reader, configuration, ELEM_HISTORY, nsURI, name);
}
} else {
reportIgnoredElement(reader, configuration, ELEM_HISTORY, nsURI, name);