diff --git a/src/xmlpromptgenerator.cpp b/src/xmlpromptgenerator.cpp index 744ef23..25178ad 100644 --- a/src/xmlpromptgenerator.cpp +++ b/src/xmlpromptgenerator.cpp @@ -346,6 +346,14 @@ int XMLCALL XmlPromptGenerator::externalentityrefhandler ( pThis->buildElementPrompt ( d, &curElem, substitutions ); } + NameIdPoolEnumerator + 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