// @Override
protected EntityDecl findEntity(String id, Object arg)
throws XMLStreamException
{
EntityDecl ed = null;
if (mCustomEntities != null) {
ed = (EntityDecl) mCustomEntities.get(id);
}
if (ed == null && mGeneralEntities != null) {
ed = (EntityDecl) mGeneralEntities.get(id);
}
/* 05-Mar-2006, TSa: Externally declared entities are illegal
* if we were declared as "standalone='yes'"...
*/
if (mDocStandalone == DOC_STANDALONE_YES) {
if (ed != null && ed.wasDeclaredExternally()) {
throwParseError(ErrorConsts.ERR_WF_ENTITY_EXT_DECLARED, ed.getName());
}
}
return ed;
}