error ("Illegal character(':') in entity name ", name, null); if (peFlag) {
{ error("Illegal character(':') in entity name ", name, null); } if (peFlag) {
    private void parseEntityDecl ()    throws Exception    {	boolean peFlag = false;	int flags = 0;	// Check for a parameter entity.	expandPE = false;	requireWhitespace ();	if (tryRead ('%')) {	    peFlag = true;	    requireWhitespace ();	}	expandPE = true;	// Read the entity name, and prepend	// '%' if necessary.	String name = readNmtoken (true);        //NE08	if (name.indexOf(':') >= 0)           error ("Illegal character(':') in entity name ", name, null);	if (peFlag) {	    name = "%" + name;	}	// Read the entity value.	requireWhitespace ();	char c = readCh ();	unread (c);	if (c == '"' || c == '\'') {	    // Internal entity ... replacement text has expanded refs	    // to characters and PEs, but not to general entities	    String value = readLiteral (flags);	    setInternalEntity (name, value);	} else {	    // Read the external IDs	    String ids [] = readExternalIds (false, false);	    // Check for NDATA declaration.	    boolean white = tryWhitespace ();	    if (!peFlag && tryRead ("NDATA")) {		if (!white)		    error ("whitespace required before NDATA");		requireWhitespace ();		String notationName = readNmtoken (true);		if (!skippedPE) {		    setExternalEntity (name, ENTITY_NDATA, ids, notationName);		    handler.unparsedEntityDecl (name, ids, notationName);		}	    } else if (!skippedPE) {		setExternalEntity (name, ENTITY_TEXT, ids, null);		handler.getDeclHandler ()		    .externalEntityDecl (name, ids [0],			    handler.resolveURIs ()	    				// FIXME: ASSUMES not skipped					// "false" forces error on bad URI				? handler.absolutize (ids [2], ids [1], false)				: ids [1]);	    }	}	// Finish the declaration.	skipWhitespace ();	require ('>');    }