protected Element createTransitionElement(Document document,
			Transition transition) {
		// Start the creation of the transition.
		Element te = createElement(document, TRANSITION_NAME, null, null);
		// Encode the from state.
		te.appendChild(createElement(document, TRANSITION_FROM_NAME, null, ""
				+ transition.getFromState().getID()));
		// Encode the to state.
		te.appendChild(createElement(document, TRANSITION_TO_NAME, null, ""
				+ transition.getToState().getID()));

        //if the transition has a control point defined,then get that too
        if (transition.getControl() != null){
            Point p = transition.getControl();
            te.appendChild(createElement(document, TRANSITION_CONTROL_X, null, p.x+""));
            te.appendChild(createElement(document, TRANSITION_CONTROL_Y, null, p.y+""));
        }

		// Return the completed transition encoding element.
		return te;
	}