if (p == NULL)
return p;
poolInit(&(p->pool), ms);
-#ifdef XML_DTD
poolInit(&(p->entityValuePool), ms);
-#endif /* XML_DTD */
hashTableInit(&(p->generalEntities), ms);
hashTableInit(&(p->elementTypes), ms);
hashTableInit(&(p->attributeIds), ms);
hashTableClear(&(p->attributeIds));
hashTableClear(&(p->prefixes));
poolClear(&(p->pool));
-#ifdef XML_DTD
poolClear(&(p->entityValuePool));
-#endif /* XML_DTD */
p->defaultPrefix.name = NULL;
p->defaultPrefix.binding = NULL;
hashTableDestroy(&(p->attributeIds));
hashTableDestroy(&(p->prefixes));
poolDestroy(&(p->pool));
-#ifdef XML_DTD
poolDestroy(&(p->entityValuePool));
-#endif /* XML_DTD */
if (isDocEntity) {
ms->free_fcn(p->scaffIndex);
ms->free_fcn(p->scaffold);