Don't miss entity declarations when generate auto complete prompt

This commit is contained in:
Zane U. Ji 2014-04-27 22:07:35 +08:00
parent 47483ca5d8
commit 87eac6e5aa
1 changed files with 8 additions and 0 deletions

View File

@ -346,6 +346,14 @@ int XMLCALL XmlPromptGenerator::externalentityrefhandler (
pThis->buildElementPrompt ( d, &curElem, substitutions );
}
NameIdPoolEnumerator<DTDEntityDecl>
entityEnum = grammar->getEntityEnumerator();
while ( entityEnum.hasMoreElements() && !pThis->TestDestroy() )
{
const DTDEntityDecl &entity = entityEnum.nextElement();
d->entitySet.insert ( WrapXerces::toString ( entity.getName() ) );
}
return pThis->TestDestroy() ? XML_STATUS_ERROR : XML_STATUS_OK;
#else // !PREFER_EXPAT_TO_XERCES_C