super.validate(content, state);
StateMessageDatatype message = (StateMessageDatatype) state;
if (message != null && message.getDatatypeState() == ENTITY_VALIDATE) {
Object[] params = (Object[])message.getDatatypeObject();
DefaultEntityHandler entityHandler = (DefaultEntityHandler)params[0];
StringPool stringPool = (StringPool)params[1];
int attValueHandle = stringPool.addSymbol( content );
if (!entityHandler.isUnparsedEntity( attValueHandle ) ) {
InvalidDatatypeValueException error =
new InvalidDatatypeValueException( "ENTITY '"+ content +"' is not valid" );
error.setMinorCode(XMLMessages.MSG_ENTITY_INVALID);
error.setMajorCode(XMLMessages.VC_ENTITY_DECLARED);
throw error;