This actually sounds a like a problem that could/should be directed to Altova XMLSpy. Or if you don't have the background knowledge to understand the question from JSWolf, I would suggest you find an alternative product for conversion. For example you may find
Sigil useful for creating your EPub, or if the source is in Word or OpenOffice there are other tools available to help.