Templating mechanism for creating XML-based Spring context definitions