FWIW, the error is thrown by the Xalan XSLT processor, not by Filemaker itself - and I believe you would get the same error if using any other XSLT processor.
Doing such a mass replacement (whether through replace field content or iterating over records) tends to slow the system for the live users.
Well, you only need to do it once. Then you can install auto-enters and/or validation to prevent further abuse.
But FileMaker is the program pushing that invalid data into the processor. I know, FileMaker is actually accepting all data and pushing all data, and if I had what I wanted right now, others would say "don't filter my data, give it all to me". They can't win, can they? :-)
Long term I don't need to worry about the auto-enter, as the export I'm creating is so they can move to SalesForce instead of FileMaker, was just hoping there was a way to export without the invalid characters.
Guess they'll have to grin and bear it today!