const char *internalEventEndPtr;
struct open_internal_entity *next;
ENTITY *entity;
+ int startTagLevel;
XML_Bool betweenDecl; /* WFC: PE Between Declarations */
} OPEN_INTERNAL_ENTITY;
openEntity->next = openInternalEntities;
openInternalEntities = openEntity;
openEntity->entity = entity;
+ openEntity->startTagLevel = tagLevel;
openEntity->betweenDecl = betweenDecl;
openEntity->internalEventPtr = NULL;
openEntity->internalEventEndPtr = NULL;
ENTITY *entity;
const char *textStart, *textEnd;
const char *next;
- int processorTagLevel;
enum XML_Error result;
OPEN_INTERNAL_ENTITY *openEntity = openInternalEntities;
if (!openEntity)
entity = openEntity->entity;
textStart = ((char *)entity->textPtr) + entity->processed;
textEnd = (char *)(entity->textPtr + entity->textLen);
- /* compare with cdataSectionProcessor */
- if (parentParser)
- processorTagLevel = 1;
- else
- processorTagLevel = 0;
#ifdef XML_DTD
if (entity->is_param) {
}
else
#endif /* XML_DTD */
- result = doContent(parser, processorTagLevel, internalEncoding,
+ result = doContent(parser, openEntity->startTagLevel, internalEncoding,
textStart, textEnd, &next, XML_FALSE);
if (result != XML_ERROR_NONE)
#endif /* XML_DTD */
{
processor = contentProcessor;
- return doContent(parser, processorTagLevel, encoding, s, end, nextPtr,
- (XML_Bool)!finalBuffer);
+ /* see externalEntityContentProcessor vs contentProcessor */
+ return doContent(parser, parentParser ? 1 : 0, encoding, s, end,
+ nextPtr, (XML_Bool)!finalBuffer);
}
}