According to the error message, the DTD expects all category elements to be ahead of the root element. You have them the wrong way round.
According to the error message, the DTD expects all category elements to be ahead of the root element. You have them the wrong way round.