you usually see that error when you omit the whitespace between parts of a DOCTYPE declaration. I've never seen that one emerge from XML validation.
But I'd be willing to wager there's a bit of whitespace missing that needs to be there, perhaps between your attributes?
I use a text editor where hidden+whitespace characters (like space, tab, and newline) are indicated in a faint grey color. They don't interfere with visual appreciation of the text, but you can tell they're there. If your editor has an option to show hidden characters, it can help you to find these kinds of whitespace problems.
FYI, rogue whitespace in XSLT can be exceptionally hazardous