Refactored XSD schema generation