Code optimisation deal with .dtd