private void checkLegalVersion(String version) throws SAXException {
        int len = version.length();
        for (int i = 0; i < len; i++) {
            char c = version.charAt(i);
            if (('0' <= c) && (c <= '9')) {
                continue;
            }
            if ((c == '_') || (c == '.') || (c == ':') || (c == '-')) {
                continue;
            }
            if (('a' <= c) && (c <= 'z')) {
                continue;
            }
            if (('A' <= c) && (c <= 'Z')) {
                continue;
            }
            fatal("illegal character in version", version, "1.0");
        }
    }
Parse the prolog of an XML document.

<pre>
 [22] prolog ::= XMLDecl? Misc* (Doctypedecl Misc*)?
</pre>

<p>
We do not look for the XML declaration here, because it was handled by
pushURL ().

@see pushURL
@return true if a DTD was read.
src/nu/validator/gnu/xml/aelfred2/XmlParser.java