The spec should probably say, but does not, that when it says "in error", it is using the term "error" in precisely the sense described in the following paragraph. That is to say, this is a class of errors which you can't always be sure of detecting. An obvious example would be an external entity which says it's encoded in Shift-JIS but is actually in ISO-Latin-1; in some circumstances, particularly if it didn't contain any of the magic XML syntax characters, there would be no way for an XML processor to detect this, but it would still be an error.
Copyright © 1998, Tim Bray. All rights reserved.