Minor refactoring
Add cache on the result of the dtd parser