imported and repackaged from https://code.google.com/p/dtd2xsdjava