Dispatch dispatch;
if (handler.getPhase() == Phase.ACTION) {
dispatch = new Phase.Action.Dispatch(spi);
} else if (handler.getPhase() == Phase.VIEW) {
dispatch = new Phase.View.Dispatch(spi);
dispatch.escapeXML(desc.getEscapeXML());
} else if (handler.getPhase() == Phase.RESOURCE) {
dispatch = new Phase.Resource.Dispatch(spi);
dispatch.escapeXML(desc.getEscapeXML());
} else {
throw new AssertionError();