It sounds very painful.

Please pardon my ignorance, but why did you have to go through all these contortions to generate a Word document from XML? Aren't there Python or similar tools that will do what you need? Are the capabilities of XSL/FO so much better than the other tools? (I realize that the tool was working fine until you hit this particular pothole.)

I suspect (as it seems you found) it's not a character in the file that's causing problems, but rather something in the parser.

Does [link|http://www.javaworld.com/javaworld/jw-05-2002/jw-0517-sax.html?|this] help? It talks about generating the source for a SAX parser.

HTH a bit. Good luck!

Cheers,
Scott.